diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b36cc4802..3caddf6622 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -129,7 +129,7 @@ jobs: command: | python -m venv venv . venv/bin/activate - pip install black==22.3.0 + pip install black==25.1.0 - run: name: Check formatting with black command: | diff --git a/_plotly_utils/basevalidators.py b/_plotly_utils/basevalidators.py index 3e7bd9fadd..e54d8f65e7 100644 --- a/_plotly_utils/basevalidators.py +++ b/_plotly_utils/basevalidators.py @@ -1328,25 +1328,14 @@ def numbers_allowed(self): return self.colorscale_path is not None def description(self): - - named_clrs_str = "\n".join( - textwrap.wrap( - ", ".join(self.named_colors), - width=79 - 16, - initial_indent=" " * 12, - subsequent_indent=" " * 12, - ) - ) - valid_color_description = """\ The '{plotly_name}' property is a color and may be specified as: - A hex string (e.g. '#ff0000') - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: -{clrs}""".format( - plotly_name=self.plotly_name, clrs=named_clrs_str + - A named CSS color""".format( + plotly_name=self.plotly_name ) if self.colorscale_path: @@ -2483,15 +2472,11 @@ def description(self): that may be specified as: - An instance of :class:`{module_str}.{class_str}` - A dict of string/value properties that will be passed - to the {class_str} constructor - - Supported dict properties: - {constructor_params_str}""" + to the {class_str} constructor""" ).format( plotly_name=self.plotly_name, class_str=self.data_class_str, module_str=self.module_str, - constructor_params_str=self.data_docs, ) return desc @@ -2560,15 +2545,11 @@ def description(self): {class_str} that may be specified as: - A list or tuple of instances of {module_str}.{class_str} - A list or tuple of dicts of string/value properties that - will be passed to the {class_str} constructor - - Supported dict properties: - {constructor_params_str}""" + will be passed to the {class_str} constructor""" ).format( plotly_name=self.plotly_name, class_str=self.data_class_str, module_str=self.module_str, - constructor_params_str=self.data_docs, ) return desc diff --git a/_plotly_utils/colors/__init__.py b/_plotly_utils/colors/__init__.py index 794c20d2e5..6c6b819904 100644 --- a/_plotly_utils/colors/__init__.py +++ b/_plotly_utils/colors/__init__.py @@ -73,6 +73,7 @@ Be careful! If you have a lot of unique numbers in your color column you will end up with a colormap that is massive and may slow down graphing performance. """ + import decimal from numbers import Number diff --git a/codegen/__init__.py b/codegen/__init__.py index ffc1525721..cbca36a34e 100644 --- a/codegen/__init__.py +++ b/codegen/__init__.py @@ -26,6 +26,10 @@ get_data_validator_instance, ) +# Target Python version for code formatting with Black. +# Must be one of the values listed in pyproject.toml. +BLACK_TARGET_VERSION = "py311" + # Import notes # ------------ @@ -85,7 +89,7 @@ def preprocess_schema(plotly_schema): items["colorscale"] = items.pop("concentrationscales") -def perform_codegen(): +def perform_codegen(reformat=True): # Set root codegen output directory # --------------------------------- # (relative to project root) @@ -267,36 +271,24 @@ def perform_codegen(): root_datatype_imports.append(f"._deprecations.{dep_clas}") optional_figure_widget_import = f""" -if sys.version_info < (3, 7) or TYPE_CHECKING: - try: - import ipywidgets as _ipywidgets - from packaging.version import Version as _Version - if _Version(_ipywidgets.__version__) >= _Version("7.0.0"): - from ..graph_objs._figurewidget import FigureWidget - else: - raise ImportError() - except Exception: - from ..missing_anywidget import FigureWidget -else: - __all__.append("FigureWidget") - orig_getattr = __getattr__ - def __getattr__(import_name): - if import_name == "FigureWidget": - try: - import ipywidgets - from packaging.version import Version - - if Version(ipywidgets.__version__) >= Version("7.0.0"): - from ..graph_objs._figurewidget import FigureWidget - - return FigureWidget - else: - raise ImportError() - except Exception: - from ..missing_anywidget import FigureWidget +__all__.append("FigureWidget") +orig_getattr = __getattr__ +def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from packaging.version import Version + + if Version(ipywidgets.__version__) >= Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget return FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget + return FigureWidget - return orig_getattr(import_name) + return orig_getattr(import_name) """ # ### __all__ ### for path_parts, class_names in alls.items(): @@ -337,9 +329,13 @@ def __getattr__(import_name): f.write(graph_objects_init_source) # ### Run black code formatter on output directories ### - subprocess.call(["black", "--target-version=py36", validators_pkgdir]) - subprocess.call(["black", "--target-version=py36", graph_objs_pkgdir]) - subprocess.call(["black", "--target-version=py36", graph_objects_path]) + if reformat: + target_version = f"--target-version={BLACK_TARGET_VERSION}" + subprocess.call(["black", target_version, validators_pkgdir]) + subprocess.call(["black", target_version, graph_objs_pkgdir]) + subprocess.call(["black", target_version, graph_objects_path]) + else: + print("skipping reformatting") if __name__ == "__main__": diff --git a/codegen/compatibility.py b/codegen/compatibility.py index 65baf3860e..d806afa09f 100644 --- a/codegen/compatibility.py +++ b/codegen/compatibility.py @@ -89,7 +89,7 @@ def __init__(self, *args, **kwargs): {depr_msg} \"\"\" warnings.warn(\"\"\"{depr_msg}\"\"\", DeprecationWarning) - super({class_name}, self).__init__(*args, **kwargs)\n\n\n""" + super().__init__(*args, **kwargs)\n\n\n""" ) # Return source string diff --git a/codegen/datatypes.py b/codegen/datatypes.py index 178c777850..8d41bb467f 100644 --- a/codegen/datatypes.py +++ b/codegen/datatypes.py @@ -12,7 +12,7 @@ ] -def get_typing_type(plotly_type, array_ok=False): +def get_python_type(plotly_type, array_ok=False, compound_as_none=False): """ Get Python type corresponding to a valType string from the plotly schema @@ -28,7 +28,7 @@ def get_typing_type(plotly_type, array_ok=False): Python type string """ if plotly_type == "data_array": - pytype = "numpy.ndarray" + pytype = "NDArray" elif plotly_type == "info_array": pytype = "list" elif plotly_type == "colorlist": @@ -43,11 +43,13 @@ def get_typing_type(plotly_type, array_ok=False): pytype = "int" elif plotly_type == "boolean": pytype = "bool" + elif (plotly_type in ("compound", "compound_array")) and compound_as_none: + pytype = None else: raise ValueError("Unknown plotly type: %s" % plotly_type) if array_ok: - return f"{pytype}|numpy.ndarray" + return f"{pytype}|NDArray" else: return pytype @@ -69,11 +71,10 @@ def build_datatype_py(node): """ # Validate inputs - # --------------- assert node.is_compound # Handle template traces - # ---------------------- + # # We want template trace/layout classes like # plotly.graph_objs.layout.template.data.Scatter to map to the # corresponding trace/layout class (e.g. plotly.graph_objs.Scatter). @@ -85,22 +86,22 @@ def build_datatype_py(node): return "from plotly.graph_objs import Layout" # Extract node properties - # ----------------------- undercase = node.name_undercase datatype_class = node.name_datatype_class literal_nodes = [n for n in node.child_literals if n.plotly_name in ["type"]] # Initialze source code buffer - # ---------------------------- buffer = StringIO() # Imports - # ------- + buffer.write("from __future__ import annotations\n") + buffer.write("from typing import Any\n") + buffer.write("from numpy.typing import NDArray\n") buffer.write( - f"from plotly.basedatatypes " + "from plotly.basedatatypes " f"import {node.name_base_datatype} as _{node.name_base_datatype}\n" ) - buffer.write(f"import copy as _copy\n") + buffer.write("import copy as _copy\n") if ( node.name_property in deprecated_mapbox_traces @@ -109,14 +110,13 @@ def build_datatype_py(node): buffer.write(f"import warnings\n") # Write class definition - # ---------------------- buffer.write( f""" class {datatype_class}(_{node.name_base_datatype}):\n""" ) - # ### Layout subplot properties ### + ### Layout subplot properties if datatype_class == "Layout": subplot_nodes = [ node @@ -171,17 +171,16 @@ def _subplot_re_match(self, prop): valid_props_list = sorted( [node.name_property for node in subtype_nodes + literal_nodes] ) + # class properties buffer.write( f""" - # class properties - # -------------------- _parent_path_str = '{node.parent_path_str}' _path_str = '{node.path_str}' _valid_props = {{"{'", "'.join(valid_props_list)}"}} """ ) - # ### Property definitions ### + ### Property definitions for subtype_node in subtype_nodes: if subtype_node.is_array_element: prop_type = ( @@ -200,9 +199,11 @@ def _subplot_re_match(self, prop): elif subtype_node.is_mapped: prop_type = "" else: - prop_type = get_typing_type(subtype_node.datatype, subtype_node.is_array_ok) + prop_type = get_python_type( + subtype_node.datatype, array_ok=subtype_node.is_array_ok + ) - # #### Get property description #### + #### Get property description #### raw_description = subtype_node.description property_description = "\n".join( textwrap.wrap( @@ -213,12 +214,12 @@ def _subplot_re_match(self, prop): ) ) - # # #### Get validator description #### + # #### Get validator description #### validator = subtype_node.get_validator_instance() if validator: validator_description = reindent_validator_description(validator, 4) - # #### Combine to form property docstring #### + #### Combine to form property docstring #### if property_description.strip(): property_docstring = f"""{property_description} @@ -228,12 +229,10 @@ def _subplot_re_match(self, prop): else: property_docstring = property_description - # #### Write get property #### + #### Write get property #### buffer.write( f"""\ - # {subtype_node.name_property} - # {'-' * len(subtype_node.name_property)} @property def {subtype_node.name_property}(self): \"\"\" @@ -246,7 +245,7 @@ def {subtype_node.name_property}(self): return self['{subtype_node.name_property}']""" ) - # #### Write set property #### + #### Write set property #### buffer.write( f""" @@ -255,24 +254,20 @@ def {subtype_node.name_property}(self, val): self['{subtype_node.name_property}'] = val\n""" ) - # ### Literals ### + ### Literals for literal_node in literal_nodes: buffer.write( f"""\ - # {literal_node.name_property} - # {'-' * len(literal_node.name_property)} @property def {literal_node.name_property}(self): return self._props['{literal_node.name_property}']\n""" ) - # ### Private properties descriptions ### + ### Private properties descriptions valid_props = {node.name_property for node in subtype_nodes} buffer.write( f""" - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return \"\"\"\\""" @@ -294,7 +289,7 @@ def _prop_descriptions(self): _mapped_properties = {repr(mapped_properties)}""" ) - # ### Constructor ### + ### Constructor buffer.write( f""" def __init__(self""" @@ -302,7 +297,7 @@ def __init__(self""" add_constructor_params(buffer, subtype_nodes, prepend_extras=["arg"]) - # ### Constructor Docstring ### + ### Constructor Docstring header = f"Construct a new {datatype_class} object" class_name = ( f"plotly.graph_objs" f"{node.parent_dotpath_str}." f"{node.name_datatype_class}" @@ -326,8 +321,7 @@ def __init__(self""" buffer.write( f""" - super({datatype_class}, self).__init__('{node.name_property}') - + super().__init__('{node.name_property}') if '_parent' in kwargs: self._parent = kwargs['_parent'] return @@ -335,18 +329,17 @@ def __init__(self""" ) if datatype_class == "Layout": - buffer.write( - f""" # Override _valid_props for instance so that instance can mutate set # to support subplot properties (e.g. xaxis2) + buffer.write( + f""" self._valid_props = {{"{'", "'.join(valid_props_list)}"}} """ ) + # Validate arg buffer.write( f""" - # Validate arg - # ------------ if arg is None: arg = {{}} elif isinstance(arg, self.__class__): @@ -359,53 +352,34 @@ def __init__(self""" constructor must be a dict or an instance of :class:`{class_name}`\"\"\") - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop('skip_invalid', False) self._validate = kwargs.pop('_validate', True) """ ) - buffer.write( - f""" - - # Populate data dict with properties - # ----------------------------------""" - ) + buffer.write("\n\n") for subtype_node in subtype_nodes: name_prop = subtype_node.name_property - buffer.write( - f""" - _v = arg.pop('{name_prop}', None) - _v = {name_prop} if {name_prop} is not None else _v - if _v is not None:""" - ) if datatype_class == "Template" and name_prop == "data": buffer.write( - """ - # Template.data contains a 'scattermapbox' key, which causes a - # go.Scattermapbox trace object to be created during validation. - # In order to prevent false deprecation warnings from surfacing, - # we suppress deprecation warnings for this line only. - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", category=DeprecationWarning) - self["data"] = _v""" + f""" + # Template.data contains a 'scattermapbox' key, which causes a + # go.Scattermapbox trace object to be created during validation. + # In order to prevent false deprecation warnings from surfacing, + # we suppress deprecation warnings for this line only. + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + self._init_provided('{name_prop}', arg, {name_prop})""" ) else: buffer.write( f""" - self['{name_prop}'] = _v""" + self._init_provided('{name_prop}', arg, {name_prop})""" ) - # ### Literals ### + ### Literals if literal_nodes: - buffer.write( - f""" - - # Read-only literals - # ------------------ -""" - ) + buffer.write("\n\n") for literal_node in literal_nodes: lit_name = literal_node.name_property lit_val = repr(literal_node.node_data) @@ -417,13 +391,7 @@ def __init__(self""" buffer.write( f""" - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False """ ) @@ -442,7 +410,6 @@ def __init__(self""" ) # Return source string - # -------------------- return buffer.getvalue() @@ -496,10 +463,11 @@ def add_constructor_params( {extra}=None""" ) - for i, subtype_node in enumerate(subtype_nodes): + for subtype_node in subtype_nodes: + py_type = get_python_type(subtype_node.datatype, compound_as_none=True) buffer.write( f""", - {subtype_node.name_property}=None""" + {subtype_node.name_property}: {py_type}|None = None""" ) for extra in append_extras: @@ -549,11 +517,9 @@ def add_docstring( """ # Validate inputs - # --------------- assert node.is_compound # Build wrapped description - # ------------------------- node_description = node.description if node_description: description_lines = textwrap.wrap( @@ -566,7 +532,6 @@ def add_docstring( node_description = "\n".join(description_lines) + "\n\n" # Write header and description - # ---------------------------- buffer.write( f""" \"\"\" @@ -577,7 +542,7 @@ def add_docstring( ) # Write parameter descriptions - # ---------------------------- + # Write any prepend extras for p, v in prepend_extras: v_wrapped = "\n".join( @@ -616,7 +581,6 @@ def add_docstring( ) # Write return block and close docstring - # -------------------------------------- buffer.write( f""" @@ -645,16 +609,13 @@ def write_datatype_py(outdir, node): """ # Build file path - # --------------- # filepath = opath.join(outdir, "graph_objs", *node.parent_path_parts, "__init__.py") filepath = opath.join( outdir, "graph_objs", *node.parent_path_parts, "_" + node.name_undercase + ".py" ) # Generate source code - # -------------------- datatype_source = build_datatype_py(node) # Write file - # ---------- write_source_py(datatype_source, filepath, leading_newlines=2) diff --git a/codegen/figure.py b/codegen/figure.py index a77fa0678f..8e875f3d7e 100644 --- a/codegen/figure.py +++ b/codegen/figure.py @@ -61,8 +61,9 @@ def build_figure_py( trace_nodes = trace_node.child_compound_datatypes # Write imports - # ------------- - # ### Import base class ### + buffer.write("from __future__ import annotations\n") + buffer.write("from typing import Any\n") + buffer.write("from numpy.typing import NDArray\n") buffer.write(f"from plotly.{base_package} import {base_classname}\n") # Write class definition @@ -82,7 +83,7 @@ class {fig_classname}({base_classname}):\n""" buffer.write( f""" def __init__(self, data=None, layout=None, - frames=None, skip_invalid=False, **kwargs): + frames=None, skip_invalid: bool = False, **kwargs): \"\"\" Create a new :class:{fig_classname} instance @@ -108,9 +109,7 @@ def __init__(self, data=None, layout=None, if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False \"\"\" - super({fig_classname} ,self).__init__(data, layout, - frames, skip_invalid, - **kwargs) + super().__init__(data, layout, frames, skip_invalid, **kwargs) """ ) @@ -121,7 +120,7 @@ def {wrapped_name}(self, {full_params}) -> "{fig_classname}": ''' {getattr(BaseFigure, wrapped_name).__doc__} ''' - return super({fig_classname}, self).{wrapped_name}({param_list}) + return super().{wrapped_name}({param_list}) """ ) diff --git a/codegen/resources/plot-schema.json b/codegen/resources/plot-schema.json index 6aa77cf333..fe1eb67d81 100644 --- a/codegen/resources/plot-schema.json +++ b/codegen/resources/plot-schema.json @@ -761,7 +761,7 @@ "description": "Sets the annotation text font.", "editType": "calc+arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc+arraydraw", "noBlank": true, "strict": true, @@ -869,7 +869,7 @@ "description": "Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`.", "editType": "arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "arraydraw", "noBlank": true, "strict": true, @@ -1415,7 +1415,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -1661,7 +1661,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -2000,7 +2000,7 @@ "description": "Sets the global font. Note that fonts used in traces and other layout components inherit from the global font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "\"Open Sans\", verdana, arial, sans-serif", "editType": "calc", "noBlank": true, @@ -2840,7 +2840,7 @@ "description": "Sets the default hover label font used by all traces on the graph.", "editType": "none", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "Arial, sans-serif", "editType": "none", "noBlank": true, @@ -2931,7 +2931,7 @@ "description": "Sets the font for group titles in hover (unified modes). Defaults to `hoverlabel.font`.", "editType": "none", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -3216,7 +3216,7 @@ "description": "Sets the font used to text the legend items.", "editType": "legend", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "legend", "noBlank": true, "strict": true, @@ -3315,7 +3315,7 @@ "description": "Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.", "editType": "legend", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "legend", "noBlank": true, "strict": true, @@ -3463,7 +3463,7 @@ "description": "Sets this legend's title font. Defaults to `legend.font` with its size increased about 20%.", "editType": "legend", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "legend", "noBlank": true, "strict": true, @@ -3933,7 +3933,7 @@ "description": "Sets the icon text font (color=map.layer.paint.text-color, size=map.layer.layout.text-size). Has an effect only when `type` is set to *symbol*.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "Open Sans Regular, Arial Unicode MS Regular", "editType": "plot", "noBlank": true, @@ -4339,7 +4339,7 @@ "description": "Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size). Has an effect only when `type` is set to *symbol*.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "Open Sans Regular, Arial Unicode MS Regular", "editType": "plot", "noBlank": true, @@ -4675,7 +4675,7 @@ "description": "Sets the new shape label text font.", "editType": "none", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -4857,7 +4857,7 @@ "description": "Sets this legend group's title font.", "editType": "none", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -5306,7 +5306,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -5919,7 +5919,7 @@ "valType": "info_array" }, "rangemode": { - "description": "If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. If *normal*, the range is computed in relation to the extrema of the input data (same behavior as for cartesian axes).", + "description": "If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. If *normal*, the range is computed in relation to the extrema of the input data (same behavior as for cartesian axes).", "dflt": "tozero", "editType": "calc", "valType": "enumerated", @@ -6028,7 +6028,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -6245,7 +6245,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "ticks", "noBlank": true, "strict": true, @@ -6494,7 +6494,7 @@ "description": "Sets the annotation text font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -6602,7 +6602,7 @@ "description": "Sets the hover label text font. By default uses the global hover font and size, with color from `hoverlabel.bordercolor`.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -7325,7 +7325,7 @@ "valType": "info_array" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", "dflt": "normal", "editType": "plot", "valType": "enumerated", @@ -7460,7 +7460,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -7670,7 +7670,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -8064,7 +8064,7 @@ "valType": "info_array" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", "dflt": "normal", "editType": "plot", "valType": "enumerated", @@ -8199,7 +8199,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -8409,7 +8409,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -8803,7 +8803,7 @@ "valType": "info_array" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", "dflt": "normal", "editType": "plot", "valType": "enumerated", @@ -8938,7 +8938,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -9148,7 +9148,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -9443,7 +9443,7 @@ "description": "Sets the shape label text font.", "editType": "calc+arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc+arraydraw", "noBlank": true, "strict": true, @@ -9625,7 +9625,7 @@ "description": "Sets this legend group's title font.", "editType": "calc+arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc+arraydraw", "noBlank": true, "strict": true, @@ -9964,7 +9964,7 @@ "description": "Sets the font of the current value label text.", "editType": "arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "arraydraw", "noBlank": true, "strict": true, @@ -10089,7 +10089,7 @@ "description": "Sets the font of the slider step labels.", "editType": "arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "arraydraw", "noBlank": true, "strict": true, @@ -10633,7 +10633,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -10916,7 +10916,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -11281,7 +11281,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -11498,7 +11498,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -11794,7 +11794,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -12011,7 +12011,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -12313,7 +12313,7 @@ "description": "Sets the tick font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -12530,7 +12530,7 @@ "description": "Sets this axis' title font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -12719,7 +12719,7 @@ "description": "Sets the title font.", "editType": "layoutstyle", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "layoutstyle", "noBlank": true, "strict": true, @@ -12840,7 +12840,7 @@ "description": "Sets the subtitle font.", "editType": "layoutstyle", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "layoutstyle", "noBlank": true, "strict": true, @@ -13228,7 +13228,7 @@ "description": "Sets the font of the update menu button text.", "editType": "arraydraw", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "arraydraw", "noBlank": true, "strict": true, @@ -14032,7 +14032,7 @@ "role": "object" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", "dflt": "normal", "editType": "plot", "valType": "enumerated", @@ -14139,7 +14139,7 @@ "description": "Sets the font of the range selector button text.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -14540,7 +14540,7 @@ "description": "Sets the tick font.", "editType": "ticks", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "ticks", "noBlank": true, "strict": true, @@ -14829,7 +14829,7 @@ "description": "Sets this axis' title font.", "editType": "ticks", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "ticks", "noBlank": true, "strict": true, @@ -15583,7 +15583,7 @@ "role": "object" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data. Applies only to linear axes.", "dflt": "normal", "editType": "plot", "valType": "enumerated", @@ -15774,7 +15774,7 @@ "description": "Sets the tick font.", "editType": "ticks", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "ticks", "noBlank": true, "strict": true, @@ -16063,7 +16063,7 @@ "description": "Sets this axis' title font.", "editType": "ticks", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "ticks", "noBlank": true, "strict": true, @@ -16323,7 +16323,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -16412,7 +16412,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -16528,7 +16528,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -16732,7 +16732,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -16882,7 +16882,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -17233,7 +17233,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -17479,7 +17479,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -17939,7 +17939,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -18154,7 +18154,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -18716,7 +18716,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -18915,7 +18915,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -19266,7 +19266,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -19512,7 +19512,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -20287,7 +20287,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -20503,7 +20503,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -21824,7 +21824,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -22043,7 +22043,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -22654,7 +22654,7 @@ "valType": "info_array" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", "dflt": "normal", "editType": "calc", "valType": "enumerated", @@ -22775,7 +22775,7 @@ "description": "Sets the tick font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -22959,7 +22959,7 @@ "description": "Sets this axis' title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -23325,7 +23325,7 @@ "valType": "info_array" }, "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", "dflt": "normal", "editType": "calc", "valType": "enumerated", @@ -23446,7 +23446,7 @@ "description": "Sets the tick font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -23630,7 +23630,7 @@ "description": "Sets this axis' title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -23791,7 +23791,7 @@ "description": "The default font used for axis & tick labels on this carpet", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "\"Open Sans\", verdana, arial, sans-serif", "editType": "calc", "noBlank": true, @@ -23901,7 +23901,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -24336,7 +24336,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -24582,7 +24582,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -24860,7 +24860,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -25059,7 +25059,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -25623,7 +25623,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -25869,7 +25869,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -26141,7 +26141,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -26340,7 +26340,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -26900,7 +26900,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -27146,7 +27146,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -27418,7 +27418,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -27617,7 +27617,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -28216,7 +28216,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -28462,7 +28462,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -28728,7 +28728,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -28927,7 +28927,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -29561,7 +29561,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -29807,7 +29807,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -30019,7 +30019,7 @@ "description": "Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -30289,7 +30289,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -30492,7 +30492,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -30712,7 +30712,7 @@ "description": "For this trace it only has an effect if `coloring` is set to *heatmap*. Sets the text font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -31378,7 +31378,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -31624,7 +31624,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -31830,7 +31830,7 @@ "description": "Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -32062,7 +32062,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -32604,7 +32604,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -32850,7 +32850,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -33112,7 +33112,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -33321,7 +33321,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -33819,7 +33819,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -34065,7 +34065,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -34327,7 +34327,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -34536,7 +34536,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -34992,7 +34992,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -35195,7 +35195,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -35345,7 +35345,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -35696,7 +35696,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -35942,7 +35942,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -36298,7 +36298,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -36484,7 +36484,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -37020,7 +37020,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -37212,7 +37212,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -37378,7 +37378,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -37690,7 +37690,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -37882,7 +37882,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -38309,7 +38309,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -38555,7 +38555,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -38840,7 +38840,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -39043,7 +39043,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -39219,7 +39219,7 @@ "description": "Sets the text font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -39770,7 +39770,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -39859,7 +39859,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -40001,7 +40001,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -40197,7 +40197,7 @@ "description": "Sets the font used for `text` lying inside the bar.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -40300,7 +40300,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -40651,7 +40651,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -40897,7 +40897,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -41351,7 +41351,7 @@ "description": "Sets the font used for `text` lying outside the bar.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -41512,7 +41512,7 @@ "description": "Sets the text font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -42097,7 +42097,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -42343,7 +42343,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -42631,7 +42631,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -42818,7 +42818,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -43017,7 +43017,7 @@ "description": "Sets the text font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -43595,7 +43595,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -43841,7 +43841,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -44048,7 +44048,7 @@ "description": "Sets the font used for labeling the contour levels. The default color comes from the lines, if shown. The default family and size come from `layout.font`.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -44321,7 +44321,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -44508,7 +44508,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -44752,7 +44752,7 @@ "description": "For this trace it only has an effect if `coloring` is set to *heatmap*. Sets the text font.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -45247,7 +45247,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -45440,7 +45440,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -45605,7 +45605,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -45956,7 +45956,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -46202,7 +46202,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -46566,7 +46566,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -46745,7 +46745,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -46941,7 +46941,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -47322,7 +47322,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -47513,7 +47513,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -47851,7 +47851,7 @@ "description": "Set the font used to display the delta", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -48191,7 +48191,7 @@ "description": "Sets the color bar's tick label font", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -48600,7 +48600,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -48738,7 +48738,7 @@ "description": "Set the font used to display main number", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -48878,7 +48878,7 @@ "description": "Set the font used to display the title", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -49310,7 +49310,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -49556,7 +49556,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -49848,7 +49848,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -50057,7 +50057,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -50830,7 +50830,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -51076,7 +51076,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -51389,7 +51389,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -51638,7 +51638,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -52216,7 +52216,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -52444,7 +52444,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -52990,7 +52990,7 @@ "description": "Sets the font for the `dimension` labels.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -53081,7 +53081,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -53426,7 +53426,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -53672,7 +53672,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -53933,7 +53933,7 @@ "description": "Sets the font for the `category` labels.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -54251,7 +54251,7 @@ "description": "Sets the font for the `dimension` labels.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -54358,7 +54358,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -54709,7 +54709,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -54955,7 +54955,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -55240,7 +55240,7 @@ "description": "Sets the font for the `dimension` range values.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -55348,7 +55348,7 @@ "description": "Sets the font for the `dimension` tick values.", "editType": "plot", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -55672,7 +55672,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -55864,7 +55864,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -56042,7 +56042,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -56318,7 +56318,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -56523,7 +56523,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -56717,7 +56717,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -57091,7 +57091,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -57260,7 +57260,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -57525,7 +57525,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -57890,7 +57890,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -58167,7 +58167,7 @@ "description": "Sets the font for node labels", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -58393,7 +58393,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -58482,7 +58482,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -58754,7 +58754,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -58963,7 +58963,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -59412,7 +59412,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -59658,7 +59658,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -60700,7 +60700,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -61194,7 +61194,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -61287,7 +61287,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -61376,7 +61376,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -61492,7 +61492,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -61691,7 +61691,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -62042,7 +62042,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -62288,7 +62288,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -62751,7 +62751,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -62997,7 +62997,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -63528,7 +63528,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -63936,7 +63936,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -64144,7 +64144,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -64578,7 +64578,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -64824,7 +64824,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -65831,7 +65831,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -66220,7 +66220,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -66429,7 +66429,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -66865,7 +66865,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -67111,7 +67111,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -68111,7 +68111,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -68437,7 +68437,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -68526,7 +68526,7 @@ "valType": "integer" }, "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", + "description": "Determines the rule used to generate the error bars. If *constant*, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the square of the underlying data. If *data*, the bar lengths are set with data set `array`.", "editType": "calc", "valType": "enumerated", "values": [ @@ -68662,7 +68662,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -68861,7 +68861,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -69267,7 +69267,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -69513,7 +69513,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -70466,7 +70466,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -70985,7 +70985,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -71194,7 +71194,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -71589,7 +71589,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -71835,7 +71835,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -72203,7 +72203,7 @@ "description": "Sets the icon text font (color=map.layer.paint.text-color, size=map.layer.layout.text-size). Has an effect only when `type` is set to *symbol*.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "Open Sans Regular, Arial Unicode MS Regular", "editType": "calc", "noBlank": true, @@ -72522,7 +72522,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -72731,7 +72731,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -73126,7 +73126,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -73372,7 +73372,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -73740,7 +73740,7 @@ "description": "Sets the icon text font (color=mapbox.layer.paint.text-color, size=mapbox.layer.layout.text-size). Has an effect only when `type` is set to *symbol*.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "dflt": "Open Sans Regular, Arial Unicode MS Regular", "editType": "calc", "noBlank": true, @@ -74004,7 +74004,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -74212,7 +74212,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -74646,7 +74646,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -74892,7 +74892,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -75920,7 +75920,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -76314,7 +76314,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -76513,7 +76513,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -76906,7 +76906,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -77152,7 +77152,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -78127,7 +78127,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -78458,7 +78458,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -78676,7 +78676,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -79110,7 +79110,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -79356,7 +79356,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -80378,7 +80378,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -80767,7 +80767,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -80975,7 +80975,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -81409,7 +81409,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -81655,7 +81655,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -82675,7 +82675,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -83077,7 +83077,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -83276,7 +83276,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -83639,7 +83639,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -83885,7 +83885,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -85160,7 +85160,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -85406,7 +85406,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -85673,7 +85673,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -85866,7 +85866,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -86484,7 +86484,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -86677,7 +86677,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -86854,7 +86854,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -87205,7 +87205,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -87451,7 +87451,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -87815,7 +87815,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -88014,7 +88014,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -88475,7 +88475,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -88721,7 +88721,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -89272,7 +89272,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -89471,7 +89471,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -89944,7 +89944,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -90299,7 +90299,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -90587,7 +90587,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -90756,7 +90756,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -91103,7 +91103,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -91296,7 +91296,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -91450,7 +91450,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -91801,7 +91801,7 @@ "description": "Sets the color bar's tick label font", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -92047,7 +92047,7 @@ "description": "Sets this color bar's title font.", "editType": "colorbars", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "colorbars", "noBlank": true, "strict": true, @@ -92456,7 +92456,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -92635,7 +92635,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -92831,7 +92831,7 @@ "editType": "plot", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "plot", "noBlank": true, "strict": true, @@ -93253,7 +93253,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -93473,7 +93473,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -94829,7 +94829,7 @@ "description": "Sets the color bar's tick label font", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -95075,7 +95075,7 @@ "description": "Sets this color bar's title font.", "editType": "calc", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -95367,7 +95367,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -95576,7 +95576,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -96318,7 +96318,7 @@ "editType": "none", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "none", "noBlank": true, "strict": true, @@ -96553,7 +96553,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -96703,7 +96703,7 @@ "description": "Sets this legend group's title font.", "editType": "style", "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "style", "noBlank": true, "strict": true, @@ -96881,7 +96881,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, @@ -97067,7 +97067,7 @@ "editType": "calc", "family": { "arrayOk": true, - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser can only apply a font if it is available on the system where it runs. Provide multiple font families, separated by commas, to indicate the order in which to apply fonts if they aren't available.", "editType": "calc", "noBlank": true, "strict": true, diff --git a/codegen/utils.py b/codegen/utils.py index 087e3d683b..105c2d44f6 100644 --- a/codegen/utils.py +++ b/codegen/utils.py @@ -75,16 +75,12 @@ def build_from_imports_py(rel_modules=(), rel_classes=(), init_extra=""): result = f"""\ import sys -from typing import TYPE_CHECKING -if sys.version_info < (3, 7) or TYPE_CHECKING: - {imports_str} -else: - from _plotly_utils.importers import relative_import - __all__, __getattr__, __dir__ = relative_import( - __name__, - {repr(rel_modules)}, - {repr(rel_classes)} - ) +from _plotly_utils.importers import relative_import +__all__, __getattr__, __dir__ = relative_import( + __name__, + {repr(rel_modules)}, + {repr(rel_classes)} +) {init_extra} """ @@ -126,14 +122,14 @@ def write_init_py(pkg_root, path_parts, rel_modules=(), rel_classes=(), init_ext def format_description(desc): # Remove surrounding *s from numbers - desc = re.sub("(^|[\s(,.:])\*([\d.]+)\*([\s),.:]|$)", r"\1\2\3", desc) + desc = re.sub(r"(^|[\s(,.:])\*([\d.]+)\*([\s),.:]|$)", r"\1\2\3", desc) # replace *true* with True desc = desc.replace("*true*", "True") desc = desc.replace("*false*", "False") # Replace *word* with "word" - desc = re.sub("(^|[\s(,.:])\*(\S+)\*([\s),.:]|$)", r'\1"\2"\3', desc) + desc = re.sub(r"(^|[\s(,.:])\*(\S+)\*([\s),.:]|$)", r'\1"\2"\3', desc) # Special case strings that don't satisfy regex above other_strings = [ @@ -456,9 +452,7 @@ def get_validator_params(self): if self.is_compound: params["data_class_str"] = repr(self.name_datatype_class) - params["data_docs"] = ( - '"""' + self.get_constructor_params_docstring() + '\n"""' - ) + params["data_docs"] = '"""\n"""' else: assert self.is_simple diff --git a/codegen/validators.py b/codegen/validators.py index 6867e2fd3a..840ab6c88a 100644 --- a/codegen/validators.py +++ b/codegen/validators.py @@ -24,15 +24,15 @@ def build_validator_py(node: PlotlyNode): # --------------- assert node.is_datatype - # Initialize source code buffer - # ----------------------------- + # Initialize buffer = StringIO() + import_alias = "_bv" # Imports # ------- # ### Import package of the validator's superclass ### import_str = ".".join(node.name_base_validator.split(".")[:-1]) - buffer.write(f"import {import_str }\n") + buffer.write(f"import {import_str} as {import_alias}\n") # Build Validator # --------------- @@ -41,11 +41,11 @@ def build_validator_py(node: PlotlyNode): # ### Write class definition ### class_name = node.name_validator_class - superclass_name = node.name_base_validator + superclass_name = node.name_base_validator.split(".")[-1] buffer.write( f""" -class {class_name}({superclass_name}): +class {class_name}({import_alias}.{superclass_name}): def __init__(self, plotly_name={params['plotly_name']}, parent_name={params['parent_name']}, **kwargs):""" @@ -54,8 +54,7 @@ def __init__(self, plotly_name={params['plotly_name']}, # ### Write constructor ### buffer.write( f""" - super({class_name}, self).__init__(plotly_name=plotly_name, - parent_name=parent_name""" + super().__init__(plotly_name, parent_name""" ) # Write out remaining constructor parameters @@ -198,10 +197,7 @@ def __init__(self, plotly_name={params['plotly_name']}, parent_name={params['parent_name']}, **kwargs): - super(DataValidator, self).__init__(class_strs_map={params['class_strs_map']}, - plotly_name=plotly_name, - parent_name=parent_name, - **kwargs)""" + super().__init__({params['class_strs_map']}, plotly_name, parent_name, **kwargs)""" ) return buffer.getvalue() diff --git a/commands.py b/commands.py index 9c529e87e9..3d9977bdd9 100644 --- a/commands.py +++ b/commands.py @@ -1,31 +1,31 @@ +from distutils import log +import json import os -import sys -import time import platform -import json import shutil - from subprocess import check_call -from distutils import log +import sys +import time -project_root = os.path.dirname(os.path.abspath(__file__)) -node_root = os.path.join(project_root, "js") -is_repo = os.path.exists(os.path.join(project_root, ".git")) -node_modules = os.path.join(node_root, "node_modules") -targets = [ - os.path.join(project_root, "plotly", "package_data", "widgetbundle.js"), +USAGE = "usage: python commands.py [updateplotlyjsdev | updateplotlyjs | codegen]" +PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) +NODE_ROOT = os.path.join(PROJECT_ROOT, "js") +NODE_MODULES = os.path.join(NODE_ROOT, "node_modules") +TARGETS = [ + os.path.join(PROJECT_ROOT, "plotly", "package_data", "widgetbundle.js"), ] -npm_path = os.pathsep.join( +NPM_PATH = os.pathsep.join( [ - os.path.join(node_root, "node_modules", ".bin"), + os.path.join(NODE_ROOT, "node_modules", ".bin"), os.environ.get("PATH", os.defpath), ] ) + # Load plotly.js version from js/package.json def plotly_js_version(): - path = os.path.join(project_root, "js", "package.json") + path = os.path.join(PROJECT_ROOT, "js", "package.json") with open(path, "rt") as f: package_json = json.load(f) version = package_json["dependencies"]["plotly.js"] @@ -57,13 +57,13 @@ def install_js_deps(local): ) env = os.environ.copy() - env["PATH"] = npm_path + env["PATH"] = NPM_PATH if has_npm: log.info("Installing build dependencies with npm. This may take a while...") check_call( [npmName, "install"], - cwd=node_root, + cwd=NODE_ROOT, stdout=sys.stdout, stderr=sys.stderr, ) @@ -71,19 +71,19 @@ def install_js_deps(local): plotly_archive = os.path.join(local, "plotly.js.tgz") check_call( [npmName, "install", plotly_archive], - cwd=node_root, + cwd=NODE_ROOT, stdout=sys.stdout, stderr=sys.stderr, ) check_call( [npmName, "run", "build"], - cwd=node_root, + cwd=NODE_ROOT, stdout=sys.stdout, stderr=sys.stderr, ) - os.utime(node_modules, None) + os.utime(NODE_MODULES, None) - for t in targets: + for t in TARGETS: if not os.path.exists(t): msg = "Missing file: %s" % t raise ValueError(msg) @@ -100,7 +100,7 @@ def run_codegen(): def overwrite_schema_local(uri): - path = os.path.join(project_root, "codegen", "resources", "plot-schema.json") + path = os.path.join(PROJECT_ROOT, "codegen", "resources", "plot-schema.json") shutil.copyfile(uri, path) @@ -109,13 +109,13 @@ def overwrite_schema(url): req = requests.get(url) assert req.status_code == 200 - path = os.path.join(project_root, "codegen", "resources", "plot-schema.json") + path = os.path.join(PROJECT_ROOT, "codegen", "resources", "plot-schema.json") with open(path, "wb") as f: f.write(req.content) def overwrite_bundle_local(uri): - path = os.path.join(project_root, "plotly", "package_data", "plotly.min.js") + path = os.path.join(PROJECT_ROOT, "plotly", "package_data", "plotly.min.js") shutil.copyfile(uri, path) @@ -125,13 +125,13 @@ def overwrite_bundle(url): req = requests.get(url) print("url:", url) assert req.status_code == 200 - path = os.path.join(project_root, "plotly", "package_data", "plotly.min.js") + path = os.path.join(PROJECT_ROOT, "plotly", "package_data", "plotly.min.js") with open(path, "wb") as f: f.write(req.content) def overwrite_plotlyjs_version_file(plotlyjs_version): - path = os.path.join(project_root, "plotly", "offline", "_plotlyjs_version.py") + path = os.path.join(PROJECT_ROOT, "plotly", "offline", "_plotlyjs_version.py") with open(path, "w") as f: f.write( """\ @@ -274,7 +274,7 @@ def update_schema_bundle_from_master(): overwrite_schema_local(schema_uri) # Update plotly.js url in package.json - package_json_path = os.path.join(node_root, "package.json") + package_json_path = os.path.join(NODE_ROOT, "package.json") with open(package_json_path, "r") as f: package_json = json.load(f) @@ -299,9 +299,18 @@ def update_plotlyjs_dev(): run_codegen() -if __name__ == "__main__": - if "updateplotlyjsdev" in sys.argv: +def main(): + if len(sys.argv) != 2: + print(USAGE, file=sys.stderr) + sys.exit(1) + elif sys.argv[1] == "codegen": + run_codegen() + elif sys.argv[1] == "updateplotlyjsdev": update_plotlyjs_dev() - elif "updateplotlyjs" in sys.argv: + elif sys.argv[1] == "updateplotlyjs": print(plotly_js_version()) update_plotlyjs(plotly_js_version()) + + +if __name__ == "__main__": + main() diff --git a/plotly/__init__.py b/plotly/__init__.py index 024801a98b..a51256132f 100644 --- a/plotly/__init__.py +++ b/plotly/__init__.py @@ -25,6 +25,7 @@ - exceptions: defines our custom exception classes """ + import sys from typing import TYPE_CHECKING from _plotly_utils.importers import relative_import diff --git a/plotly/basedatatypes.py b/plotly/basedatatypes.py index a3044f6763..c6f564c847 100644 --- a/plotly/basedatatypes.py +++ b/plotly/basedatatypes.py @@ -86,6 +86,7 @@ def _make_underscore_key(key): return key.replace("-", "_") key_path2b = list(map(_make_hyphen_key, key_path2)) + # Here we want to split up each non-empty string in the list at # underscores and recombine the strings using chomp_empty_strings so # that leading, trailing and multiple _ will be preserved @@ -385,6 +386,18 @@ def _generator(i): yield x +def _initialize_provided(obj, name, arg, provided): + """ + Initialize a property of this object using the provided value + or a value popped from the arguments dictionary. If neither + is available, do not set the property. + """ + val = arg.pop(name, None) + val = provided if provided is not None else val + if val is not None: + obj[name] = val + + class BaseFigure(object): """ Base class for all figure types (both widget and non-widget) @@ -834,6 +847,14 @@ def _ipython_display_(self): else: print(repr(self)) + def _init_provided(self, name, arg, provided): + """ + Initialize a property of this object using the provided value + or a value popped from the arguments dictionary. If neither + is available, do not set the property. + """ + _initialize_provided(self, name, arg, provided) + def update(self, dict1=None, overwrite=False, **kwargs): """ Update the properties of the figure with a dict and/or with @@ -1591,6 +1612,7 @@ def _add_annotation_like( ) ): return self + # in case the user specified they wanted an axis to refer to the # domain of that axis and not the data, append ' domain' to the # computed axis accordingly @@ -4329,6 +4351,14 @@ def _get_validator(self, prop): return ValidatorCache.get_validator(self._path_str, prop) + def _init_provided(self, name, arg, provided): + """ + Initialize a property of this object using the provided value + or a value popped from the arguments dictionary. If neither + is available, do not set the property. + """ + _initialize_provided(self, name, arg, provided) + @property def _validators(self): """ diff --git a/plotly/data/__init__.py b/plotly/data/__init__.py index ef6bcdd2f0..3bba38974b 100644 --- a/plotly/data/__init__.py +++ b/plotly/data/__init__.py @@ -1,6 +1,7 @@ """ Built-in datasets for demonstration, educational and test purposes. """ + import os from importlib import import_module diff --git a/plotly/express/_core.py b/plotly/express/_core.py index 5f0eb53f95..3e0675dcbb 100644 --- a/plotly/express/_core.py +++ b/plotly/express/_core.py @@ -985,9 +985,11 @@ def make_trace_spec(args, constructor, attrs, trace_patch): def make_trendline_spec(args, constructor): trace_spec = TraceSpec( - constructor=go.Scattergl - if constructor == go.Scattergl # could be contour - else go.Scatter, + constructor=( + go.Scattergl + if constructor == go.Scattergl # could be contour + else go.Scatter + ), attrs=["trendline"], trace_patch=dict(mode="lines"), marginal=None, @@ -2456,9 +2458,11 @@ def get_groups_and_orders(args, grouper): full_sorted_group_names = [ tuple( [ - "" - if col == one_group - else sub_group_names[required_grouper.index(col)] + ( + "" + if col == one_group + else sub_group_names[required_grouper.index(col)] + ) for col in grouper ] ) diff --git a/plotly/express/data/__init__.py b/plotly/express/data/__init__.py index 02c8753175..25ce826d87 100644 --- a/plotly/express/data/__init__.py +++ b/plotly/express/data/__init__.py @@ -1,5 +1,4 @@ -"""Built-in datasets for demonstration, educational and test purposes. -""" +"""Built-in datasets for demonstration, educational and test purposes.""" from plotly.data import * diff --git a/plotly/graph_objects/__init__.py b/plotly/graph_objects/__init__.py index 2e6e5980cf..6ac98aa458 100644 --- a/plotly/graph_objects/__init__.py +++ b/plotly/graph_objects/__init__.py @@ -1,303 +1,161 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ..graph_objs import Waterfall - from ..graph_objs import Volume - from ..graph_objs import Violin - from ..graph_objs import Treemap - from ..graph_objs import Table - from ..graph_objs import Surface - from ..graph_objs import Sunburst - from ..graph_objs import Streamtube - from ..graph_objs import Splom - from ..graph_objs import Scatterternary - from ..graph_objs import Scattersmith - from ..graph_objs import Scatterpolargl - from ..graph_objs import Scatterpolar - from ..graph_objs import Scattermapbox - from ..graph_objs import Scattermap - from ..graph_objs import Scattergl - from ..graph_objs import Scattergeo - from ..graph_objs import Scattercarpet - from ..graph_objs import Scatter3d - from ..graph_objs import Scatter - from ..graph_objs import Sankey - from ..graph_objs import Pie - from ..graph_objs import Parcoords - from ..graph_objs import Parcats - from ..graph_objs import Ohlc - from ..graph_objs import Mesh3d - from ..graph_objs import Isosurface - from ..graph_objs import Indicator - from ..graph_objs import Image - from ..graph_objs import Icicle - from ..graph_objs import Histogram2dContour - from ..graph_objs import Histogram2d - from ..graph_objs import Histogram - from ..graph_objs import Heatmap - from ..graph_objs import Funnelarea - from ..graph_objs import Funnel - from ..graph_objs import Densitymapbox - from ..graph_objs import Densitymap - from ..graph_objs import Contourcarpet - from ..graph_objs import Contour - from ..graph_objs import Cone - from ..graph_objs import Choroplethmapbox - from ..graph_objs import Choroplethmap - from ..graph_objs import Choropleth - from ..graph_objs import Carpet - from ..graph_objs import Candlestick - from ..graph_objs import Box - from ..graph_objs import Barpolar - from ..graph_objs import Bar - from ..graph_objs import Layout - from ..graph_objs import Frame - from ..graph_objs import Figure - from ..graph_objs import Data - from ..graph_objs import Annotations - from ..graph_objs import Frames - from ..graph_objs import AngularAxis - from ..graph_objs import Annotation - from ..graph_objs import ColorBar - from ..graph_objs import Contours - from ..graph_objs import ErrorX - from ..graph_objs import ErrorY - from ..graph_objs import ErrorZ - from ..graph_objs import Font - from ..graph_objs import Legend - from ..graph_objs import Line - from ..graph_objs import Margin - from ..graph_objs import Marker - from ..graph_objs import RadialAxis - from ..graph_objs import Scene - from ..graph_objs import Stream - from ..graph_objs import XAxis - from ..graph_objs import YAxis - from ..graph_objs import ZAxis - from ..graph_objs import XBins - from ..graph_objs import YBins - from ..graph_objs import Trace - from ..graph_objs import Histogram2dcontour - from ..graph_objs import waterfall - from ..graph_objs import volume - from ..graph_objs import violin - from ..graph_objs import treemap - from ..graph_objs import table - from ..graph_objs import surface - from ..graph_objs import sunburst - from ..graph_objs import streamtube - from ..graph_objs import splom - from ..graph_objs import scatterternary - from ..graph_objs import scattersmith - from ..graph_objs import scatterpolargl - from ..graph_objs import scatterpolar - from ..graph_objs import scattermapbox - from ..graph_objs import scattermap - from ..graph_objs import scattergl - from ..graph_objs import scattergeo - from ..graph_objs import scattercarpet - from ..graph_objs import scatter3d - from ..graph_objs import scatter - from ..graph_objs import sankey - from ..graph_objs import pie - from ..graph_objs import parcoords - from ..graph_objs import parcats - from ..graph_objs import ohlc - from ..graph_objs import mesh3d - from ..graph_objs import isosurface - from ..graph_objs import indicator - from ..graph_objs import image - from ..graph_objs import icicle - from ..graph_objs import histogram2dcontour - from ..graph_objs import histogram2d - from ..graph_objs import histogram - from ..graph_objs import heatmap - from ..graph_objs import funnelarea - from ..graph_objs import funnel - from ..graph_objs import densitymapbox - from ..graph_objs import densitymap - from ..graph_objs import contourcarpet - from ..graph_objs import contour - from ..graph_objs import cone - from ..graph_objs import choroplethmapbox - from ..graph_objs import choroplethmap - from ..graph_objs import choropleth - from ..graph_objs import carpet - from ..graph_objs import candlestick - from ..graph_objs import box - from ..graph_objs import barpolar - from ..graph_objs import bar - from ..graph_objs import layout -else: - from _plotly_utils.importers import relative_import +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + "..graph_objs.waterfall", + "..graph_objs.volume", + "..graph_objs.violin", + "..graph_objs.treemap", + "..graph_objs.table", + "..graph_objs.surface", + "..graph_objs.sunburst", + "..graph_objs.streamtube", + "..graph_objs.splom", + "..graph_objs.scatterternary", + "..graph_objs.scattersmith", + "..graph_objs.scatterpolargl", + "..graph_objs.scatterpolar", + "..graph_objs.scattermapbox", + "..graph_objs.scattermap", + "..graph_objs.scattergl", + "..graph_objs.scattergeo", + "..graph_objs.scattercarpet", + "..graph_objs.scatter3d", + "..graph_objs.scatter", + "..graph_objs.sankey", + "..graph_objs.pie", + "..graph_objs.parcoords", + "..graph_objs.parcats", + "..graph_objs.ohlc", + "..graph_objs.mesh3d", + "..graph_objs.isosurface", + "..graph_objs.indicator", + "..graph_objs.image", + "..graph_objs.icicle", + "..graph_objs.histogram2dcontour", + "..graph_objs.histogram2d", + "..graph_objs.histogram", + "..graph_objs.heatmap", + "..graph_objs.funnelarea", + "..graph_objs.funnel", + "..graph_objs.densitymapbox", + "..graph_objs.densitymap", + "..graph_objs.contourcarpet", + "..graph_objs.contour", + "..graph_objs.cone", + "..graph_objs.choroplethmapbox", + "..graph_objs.choroplethmap", + "..graph_objs.choropleth", + "..graph_objs.carpet", + "..graph_objs.candlestick", + "..graph_objs.box", + "..graph_objs.barpolar", + "..graph_objs.bar", + "..graph_objs.layout", + ], + [ + "..graph_objs.Waterfall", + "..graph_objs.Volume", + "..graph_objs.Violin", + "..graph_objs.Treemap", + "..graph_objs.Table", + "..graph_objs.Surface", + "..graph_objs.Sunburst", + "..graph_objs.Streamtube", + "..graph_objs.Splom", + "..graph_objs.Scatterternary", + "..graph_objs.Scattersmith", + "..graph_objs.Scatterpolargl", + "..graph_objs.Scatterpolar", + "..graph_objs.Scattermapbox", + "..graph_objs.Scattermap", + "..graph_objs.Scattergl", + "..graph_objs.Scattergeo", + "..graph_objs.Scattercarpet", + "..graph_objs.Scatter3d", + "..graph_objs.Scatter", + "..graph_objs.Sankey", + "..graph_objs.Pie", + "..graph_objs.Parcoords", + "..graph_objs.Parcats", + "..graph_objs.Ohlc", + "..graph_objs.Mesh3d", + "..graph_objs.Isosurface", + "..graph_objs.Indicator", + "..graph_objs.Image", + "..graph_objs.Icicle", + "..graph_objs.Histogram2dContour", + "..graph_objs.Histogram2d", + "..graph_objs.Histogram", + "..graph_objs.Heatmap", + "..graph_objs.Funnelarea", + "..graph_objs.Funnel", + "..graph_objs.Densitymapbox", + "..graph_objs.Densitymap", + "..graph_objs.Contourcarpet", + "..graph_objs.Contour", + "..graph_objs.Cone", + "..graph_objs.Choroplethmapbox", + "..graph_objs.Choroplethmap", + "..graph_objs.Choropleth", + "..graph_objs.Carpet", + "..graph_objs.Candlestick", + "..graph_objs.Box", + "..graph_objs.Barpolar", + "..graph_objs.Bar", + "..graph_objs.Layout", + "..graph_objs.Frame", + "..graph_objs.Figure", + "..graph_objs.Data", + "..graph_objs.Annotations", + "..graph_objs.Frames", + "..graph_objs.AngularAxis", + "..graph_objs.Annotation", + "..graph_objs.ColorBar", + "..graph_objs.Contours", + "..graph_objs.ErrorX", + "..graph_objs.ErrorY", + "..graph_objs.ErrorZ", + "..graph_objs.Font", + "..graph_objs.Legend", + "..graph_objs.Line", + "..graph_objs.Margin", + "..graph_objs.Marker", + "..graph_objs.RadialAxis", + "..graph_objs.Scene", + "..graph_objs.Stream", + "..graph_objs.XAxis", + "..graph_objs.YAxis", + "..graph_objs.ZAxis", + "..graph_objs.XBins", + "..graph_objs.YBins", + "..graph_objs.Trace", + "..graph_objs.Histogram2dcontour", + ], +) - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - "..graph_objs.waterfall", - "..graph_objs.volume", - "..graph_objs.violin", - "..graph_objs.treemap", - "..graph_objs.table", - "..graph_objs.surface", - "..graph_objs.sunburst", - "..graph_objs.streamtube", - "..graph_objs.splom", - "..graph_objs.scatterternary", - "..graph_objs.scattersmith", - "..graph_objs.scatterpolargl", - "..graph_objs.scatterpolar", - "..graph_objs.scattermapbox", - "..graph_objs.scattermap", - "..graph_objs.scattergl", - "..graph_objs.scattergeo", - "..graph_objs.scattercarpet", - "..graph_objs.scatter3d", - "..graph_objs.scatter", - "..graph_objs.sankey", - "..graph_objs.pie", - "..graph_objs.parcoords", - "..graph_objs.parcats", - "..graph_objs.ohlc", - "..graph_objs.mesh3d", - "..graph_objs.isosurface", - "..graph_objs.indicator", - "..graph_objs.image", - "..graph_objs.icicle", - "..graph_objs.histogram2dcontour", - "..graph_objs.histogram2d", - "..graph_objs.histogram", - "..graph_objs.heatmap", - "..graph_objs.funnelarea", - "..graph_objs.funnel", - "..graph_objs.densitymapbox", - "..graph_objs.densitymap", - "..graph_objs.contourcarpet", - "..graph_objs.contour", - "..graph_objs.cone", - "..graph_objs.choroplethmapbox", - "..graph_objs.choroplethmap", - "..graph_objs.choropleth", - "..graph_objs.carpet", - "..graph_objs.candlestick", - "..graph_objs.box", - "..graph_objs.barpolar", - "..graph_objs.bar", - "..graph_objs.layout", - ], - [ - "..graph_objs.Waterfall", - "..graph_objs.Volume", - "..graph_objs.Violin", - "..graph_objs.Treemap", - "..graph_objs.Table", - "..graph_objs.Surface", - "..graph_objs.Sunburst", - "..graph_objs.Streamtube", - "..graph_objs.Splom", - "..graph_objs.Scatterternary", - "..graph_objs.Scattersmith", - "..graph_objs.Scatterpolargl", - "..graph_objs.Scatterpolar", - "..graph_objs.Scattermapbox", - "..graph_objs.Scattermap", - "..graph_objs.Scattergl", - "..graph_objs.Scattergeo", - "..graph_objs.Scattercarpet", - "..graph_objs.Scatter3d", - "..graph_objs.Scatter", - "..graph_objs.Sankey", - "..graph_objs.Pie", - "..graph_objs.Parcoords", - "..graph_objs.Parcats", - "..graph_objs.Ohlc", - "..graph_objs.Mesh3d", - "..graph_objs.Isosurface", - "..graph_objs.Indicator", - "..graph_objs.Image", - "..graph_objs.Icicle", - "..graph_objs.Histogram2dContour", - "..graph_objs.Histogram2d", - "..graph_objs.Histogram", - "..graph_objs.Heatmap", - "..graph_objs.Funnelarea", - "..graph_objs.Funnel", - "..graph_objs.Densitymapbox", - "..graph_objs.Densitymap", - "..graph_objs.Contourcarpet", - "..graph_objs.Contour", - "..graph_objs.Cone", - "..graph_objs.Choroplethmapbox", - "..graph_objs.Choroplethmap", - "..graph_objs.Choropleth", - "..graph_objs.Carpet", - "..graph_objs.Candlestick", - "..graph_objs.Box", - "..graph_objs.Barpolar", - "..graph_objs.Bar", - "..graph_objs.Layout", - "..graph_objs.Frame", - "..graph_objs.Figure", - "..graph_objs.Data", - "..graph_objs.Annotations", - "..graph_objs.Frames", - "..graph_objs.AngularAxis", - "..graph_objs.Annotation", - "..graph_objs.ColorBar", - "..graph_objs.Contours", - "..graph_objs.ErrorX", - "..graph_objs.ErrorY", - "..graph_objs.ErrorZ", - "..graph_objs.Font", - "..graph_objs.Legend", - "..graph_objs.Line", - "..graph_objs.Margin", - "..graph_objs.Marker", - "..graph_objs.RadialAxis", - "..graph_objs.Scene", - "..graph_objs.Stream", - "..graph_objs.XAxis", - "..graph_objs.YAxis", - "..graph_objs.ZAxis", - "..graph_objs.XBins", - "..graph_objs.YBins", - "..graph_objs.Trace", - "..graph_objs.Histogram2dcontour", - ], - ) +__all__.append("FigureWidget") +orig_getattr = __getattr__ -if sys.version_info < (3, 7) or TYPE_CHECKING: - try: - import ipywidgets as _ipywidgets - from packaging.version import Version as _Version - if _Version(_ipywidgets.__version__) >= _Version("7.0.0"): - from ..graph_objs._figurewidget import FigureWidget - else: - raise ImportError() - except Exception: - from ..missing_anywidget import FigureWidget -else: - __all__.append("FigureWidget") - orig_getattr = __getattr__ +def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from packaging.version import Version - def __getattr__(import_name): - if import_name == "FigureWidget": - try: - import ipywidgets - from packaging.version import Version - - if Version(ipywidgets.__version__) >= Version("7.0.0"): - from ..graph_objs._figurewidget import FigureWidget - - return FigureWidget - else: - raise ImportError() - except Exception: - from ..missing_anywidget import FigureWidget + if Version(ipywidgets.__version__) >= Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget return FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget + + return FigureWidget - return orig_getattr(import_name) + return orig_getattr(import_name) diff --git a/plotly/graph_objs/__init__.py b/plotly/graph_objs/__init__.py index 9e80b4063e..5e36196d07 100644 --- a/plotly/graph_objs/__init__.py +++ b/plotly/graph_objs/__init__.py @@ -1,303 +1,161 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._bar import Bar - from ._barpolar import Barpolar - from ._box import Box - from ._candlestick import Candlestick - from ._carpet import Carpet - from ._choropleth import Choropleth - from ._choroplethmap import Choroplethmap - from ._choroplethmapbox import Choroplethmapbox - from ._cone import Cone - from ._contour import Contour - from ._contourcarpet import Contourcarpet - from ._densitymap import Densitymap - from ._densitymapbox import Densitymapbox - from ._deprecations import AngularAxis - from ._deprecations import Annotation - from ._deprecations import Annotations - from ._deprecations import ColorBar - from ._deprecations import Contours - from ._deprecations import Data - from ._deprecations import ErrorX - from ._deprecations import ErrorY - from ._deprecations import ErrorZ - from ._deprecations import Font - from ._deprecations import Frames - from ._deprecations import Histogram2dcontour - from ._deprecations import Legend - from ._deprecations import Line - from ._deprecations import Margin - from ._deprecations import Marker - from ._deprecations import RadialAxis - from ._deprecations import Scene - from ._deprecations import Stream - from ._deprecations import Trace - from ._deprecations import XAxis - from ._deprecations import XBins - from ._deprecations import YAxis - from ._deprecations import YBins - from ._deprecations import ZAxis - from ._figure import Figure - from ._frame import Frame - from ._funnel import Funnel - from ._funnelarea import Funnelarea - from ._heatmap import Heatmap - from ._histogram import Histogram - from ._histogram2d import Histogram2d - from ._histogram2dcontour import Histogram2dContour - from ._icicle import Icicle - from ._image import Image - from ._indicator import Indicator - from ._isosurface import Isosurface - from ._layout import Layout - from ._mesh3d import Mesh3d - from ._ohlc import Ohlc - from ._parcats import Parcats - from ._parcoords import Parcoords - from ._pie import Pie - from ._sankey import Sankey - from ._scatter import Scatter - from ._scatter3d import Scatter3d - from ._scattercarpet import Scattercarpet - from ._scattergeo import Scattergeo - from ._scattergl import Scattergl - from ._scattermap import Scattermap - from ._scattermapbox import Scattermapbox - from ._scatterpolar import Scatterpolar - from ._scatterpolargl import Scatterpolargl - from ._scattersmith import Scattersmith - from ._scatterternary import Scatterternary - from ._splom import Splom - from ._streamtube import Streamtube - from ._sunburst import Sunburst - from ._surface import Surface - from ._table import Table - from ._treemap import Treemap - from ._violin import Violin - from ._volume import Volume - from ._waterfall import Waterfall - from . import bar - from . import barpolar - from . import box - from . import candlestick - from . import carpet - from . import choropleth - from . import choroplethmap - from . import choroplethmapbox - from . import cone - from . import contour - from . import contourcarpet - from . import densitymap - from . import densitymapbox - from . import funnel - from . import funnelarea - from . import heatmap - from . import histogram - from . import histogram2d - from . import histogram2dcontour - from . import icicle - from . import image - from . import indicator - from . import isosurface - from . import layout - from . import mesh3d - from . import ohlc - from . import parcats - from . import parcoords - from . import pie - from . import sankey - from . import scatter - from . import scatter3d - from . import scattercarpet - from . import scattergeo - from . import scattergl - from . import scattermap - from . import scattermapbox - from . import scatterpolar - from . import scatterpolargl - from . import scattersmith - from . import scatterternary - from . import splom - from . import streamtube - from . import sunburst - from . import surface - from . import table - from . import treemap - from . import violin - from . import volume - from . import waterfall -else: - from _plotly_utils.importers import relative_import +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".bar", + ".barpolar", + ".box", + ".candlestick", + ".carpet", + ".choropleth", + ".choroplethmap", + ".choroplethmapbox", + ".cone", + ".contour", + ".contourcarpet", + ".densitymap", + ".densitymapbox", + ".funnel", + ".funnelarea", + ".heatmap", + ".histogram", + ".histogram2d", + ".histogram2dcontour", + ".icicle", + ".image", + ".indicator", + ".isosurface", + ".layout", + ".mesh3d", + ".ohlc", + ".parcats", + ".parcoords", + ".pie", + ".sankey", + ".scatter", + ".scatter3d", + ".scattercarpet", + ".scattergeo", + ".scattergl", + ".scattermap", + ".scattermapbox", + ".scatterpolar", + ".scatterpolargl", + ".scattersmith", + ".scatterternary", + ".splom", + ".streamtube", + ".sunburst", + ".surface", + ".table", + ".treemap", + ".violin", + ".volume", + ".waterfall", + ], + [ + "._bar.Bar", + "._barpolar.Barpolar", + "._box.Box", + "._candlestick.Candlestick", + "._carpet.Carpet", + "._choropleth.Choropleth", + "._choroplethmap.Choroplethmap", + "._choroplethmapbox.Choroplethmapbox", + "._cone.Cone", + "._contour.Contour", + "._contourcarpet.Contourcarpet", + "._densitymap.Densitymap", + "._densitymapbox.Densitymapbox", + "._deprecations.AngularAxis", + "._deprecations.Annotation", + "._deprecations.Annotations", + "._deprecations.ColorBar", + "._deprecations.Contours", + "._deprecations.Data", + "._deprecations.ErrorX", + "._deprecations.ErrorY", + "._deprecations.ErrorZ", + "._deprecations.Font", + "._deprecations.Frames", + "._deprecations.Histogram2dcontour", + "._deprecations.Legend", + "._deprecations.Line", + "._deprecations.Margin", + "._deprecations.Marker", + "._deprecations.RadialAxis", + "._deprecations.Scene", + "._deprecations.Stream", + "._deprecations.Trace", + "._deprecations.XAxis", + "._deprecations.XBins", + "._deprecations.YAxis", + "._deprecations.YBins", + "._deprecations.ZAxis", + "._figure.Figure", + "._frame.Frame", + "._funnel.Funnel", + "._funnelarea.Funnelarea", + "._heatmap.Heatmap", + "._histogram.Histogram", + "._histogram2d.Histogram2d", + "._histogram2dcontour.Histogram2dContour", + "._icicle.Icicle", + "._image.Image", + "._indicator.Indicator", + "._isosurface.Isosurface", + "._layout.Layout", + "._mesh3d.Mesh3d", + "._ohlc.Ohlc", + "._parcats.Parcats", + "._parcoords.Parcoords", + "._pie.Pie", + "._sankey.Sankey", + "._scatter.Scatter", + "._scatter3d.Scatter3d", + "._scattercarpet.Scattercarpet", + "._scattergeo.Scattergeo", + "._scattergl.Scattergl", + "._scattermap.Scattermap", + "._scattermapbox.Scattermapbox", + "._scatterpolar.Scatterpolar", + "._scatterpolargl.Scatterpolargl", + "._scattersmith.Scattersmith", + "._scatterternary.Scatterternary", + "._splom.Splom", + "._streamtube.Streamtube", + "._sunburst.Sunburst", + "._surface.Surface", + "._table.Table", + "._treemap.Treemap", + "._violin.Violin", + "._volume.Volume", + "._waterfall.Waterfall", + ], +) - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".bar", - ".barpolar", - ".box", - ".candlestick", - ".carpet", - ".choropleth", - ".choroplethmap", - ".choroplethmapbox", - ".cone", - ".contour", - ".contourcarpet", - ".densitymap", - ".densitymapbox", - ".funnel", - ".funnelarea", - ".heatmap", - ".histogram", - ".histogram2d", - ".histogram2dcontour", - ".icicle", - ".image", - ".indicator", - ".isosurface", - ".layout", - ".mesh3d", - ".ohlc", - ".parcats", - ".parcoords", - ".pie", - ".sankey", - ".scatter", - ".scatter3d", - ".scattercarpet", - ".scattergeo", - ".scattergl", - ".scattermap", - ".scattermapbox", - ".scatterpolar", - ".scatterpolargl", - ".scattersmith", - ".scatterternary", - ".splom", - ".streamtube", - ".sunburst", - ".surface", - ".table", - ".treemap", - ".violin", - ".volume", - ".waterfall", - ], - [ - "._bar.Bar", - "._barpolar.Barpolar", - "._box.Box", - "._candlestick.Candlestick", - "._carpet.Carpet", - "._choropleth.Choropleth", - "._choroplethmap.Choroplethmap", - "._choroplethmapbox.Choroplethmapbox", - "._cone.Cone", - "._contour.Contour", - "._contourcarpet.Contourcarpet", - "._densitymap.Densitymap", - "._densitymapbox.Densitymapbox", - "._deprecations.AngularAxis", - "._deprecations.Annotation", - "._deprecations.Annotations", - "._deprecations.ColorBar", - "._deprecations.Contours", - "._deprecations.Data", - "._deprecations.ErrorX", - "._deprecations.ErrorY", - "._deprecations.ErrorZ", - "._deprecations.Font", - "._deprecations.Frames", - "._deprecations.Histogram2dcontour", - "._deprecations.Legend", - "._deprecations.Line", - "._deprecations.Margin", - "._deprecations.Marker", - "._deprecations.RadialAxis", - "._deprecations.Scene", - "._deprecations.Stream", - "._deprecations.Trace", - "._deprecations.XAxis", - "._deprecations.XBins", - "._deprecations.YAxis", - "._deprecations.YBins", - "._deprecations.ZAxis", - "._figure.Figure", - "._frame.Frame", - "._funnel.Funnel", - "._funnelarea.Funnelarea", - "._heatmap.Heatmap", - "._histogram.Histogram", - "._histogram2d.Histogram2d", - "._histogram2dcontour.Histogram2dContour", - "._icicle.Icicle", - "._image.Image", - "._indicator.Indicator", - "._isosurface.Isosurface", - "._layout.Layout", - "._mesh3d.Mesh3d", - "._ohlc.Ohlc", - "._parcats.Parcats", - "._parcoords.Parcoords", - "._pie.Pie", - "._sankey.Sankey", - "._scatter.Scatter", - "._scatter3d.Scatter3d", - "._scattercarpet.Scattercarpet", - "._scattergeo.Scattergeo", - "._scattergl.Scattergl", - "._scattermap.Scattermap", - "._scattermapbox.Scattermapbox", - "._scatterpolar.Scatterpolar", - "._scatterpolargl.Scatterpolargl", - "._scattersmith.Scattersmith", - "._scatterternary.Scatterternary", - "._splom.Splom", - "._streamtube.Streamtube", - "._sunburst.Sunburst", - "._surface.Surface", - "._table.Table", - "._treemap.Treemap", - "._violin.Violin", - "._volume.Volume", - "._waterfall.Waterfall", - ], - ) +__all__.append("FigureWidget") +orig_getattr = __getattr__ -if sys.version_info < (3, 7) or TYPE_CHECKING: - try: - import ipywidgets as _ipywidgets - from packaging.version import Version as _Version - if _Version(_ipywidgets.__version__) >= _Version("7.0.0"): - from ..graph_objs._figurewidget import FigureWidget - else: - raise ImportError() - except Exception: - from ..missing_anywidget import FigureWidget -else: - __all__.append("FigureWidget") - orig_getattr = __getattr__ +def __getattr__(import_name): + if import_name == "FigureWidget": + try: + import ipywidgets + from packaging.version import Version - def __getattr__(import_name): - if import_name == "FigureWidget": - try: - import ipywidgets - from packaging.version import Version - - if Version(ipywidgets.__version__) >= Version("7.0.0"): - from ..graph_objs._figurewidget import FigureWidget - - return FigureWidget - else: - raise ImportError() - except Exception: - from ..missing_anywidget import FigureWidget + if Version(ipywidgets.__version__) >= Version("7.0.0"): + from ..graph_objs._figurewidget import FigureWidget return FigureWidget + else: + raise ImportError() + except Exception: + from ..missing_anywidget import FigureWidget + + return FigureWidget - return orig_getattr(import_name) + return orig_getattr(import_name) diff --git a/plotly/graph_objs/_bar.py b/plotly/graph_objs/_bar.py index 0b5e5a9671..ba486764de 100644 --- a/plotly/graph_objs/_bar.py +++ b/plotly/graph_objs/_bar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Bar(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "bar" _valid_props = { @@ -86,8 +87,6 @@ class Bar(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -109,8 +108,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # base - # ---- @property def base(self): """ @@ -122,7 +119,7 @@ def base(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["base"] @@ -130,8 +127,6 @@ def base(self): def base(self, val): self["base"] = val - # basesrc - # ------- @property def basesrc(self): """ @@ -150,8 +145,6 @@ def basesrc(self): def basesrc(self, val): self["basesrc"] = val - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -173,8 +166,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # constraintext - # ------------- @property def constraintext(self): """ @@ -195,8 +186,6 @@ def constraintext(self): def constraintext(self, val): self["constraintext"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -210,7 +199,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -218,8 +207,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -239,8 +226,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -259,8 +244,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -279,8 +262,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # error_x - # ------- @property def error_x(self): """ @@ -290,66 +271,6 @@ def error_x(self): - A dict of string/value properties that will be passed to the ErrorX constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.bar.ErrorX @@ -360,8 +281,6 @@ def error_x(self): def error_x(self, val): self["error_x"] = val - # error_y - # ------- @property def error_y(self): """ @@ -371,64 +290,6 @@ def error_y(self): - A dict of string/value properties that will be passed to the ErrorY constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.bar.ErrorY @@ -439,8 +300,6 @@ def error_y(self): def error_y(self, val): self["error_y"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -457,7 +316,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -465,8 +324,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -486,8 +343,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -497,44 +352,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.bar.Hoverlabel @@ -545,8 +362,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -583,7 +398,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -591,8 +406,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -612,8 +425,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -630,7 +441,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -638,8 +449,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -659,8 +468,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -673,7 +480,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -681,8 +488,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -701,8 +506,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextanchor - # ---------------- @property def insidetextanchor(self): """ @@ -723,8 +526,6 @@ def insidetextanchor(self): def insidetextanchor(self, val): self["insidetextanchor"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -736,79 +537,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.bar.Insidetextfont @@ -819,8 +547,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # legend - # ------ @property def legend(self): """ @@ -844,8 +570,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -867,8 +591,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -878,13 +600,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.bar.Legendgrouptitle @@ -895,8 +610,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -922,8 +635,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -943,8 +654,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -954,112 +663,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.bar.marker.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - cornerradius - Sets the rounding of corners. May be an integer - number of pixels, or a percentage of bar width - (as a string ending in %). Defaults to - `layout.barcornerradius`. In stack or relative - barmode, the first trace to set cornerradius is - used for the whole stack. - line - :class:`plotly.graph_objects.bar.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - Returns ------- plotly.graph_objs.bar.Marker @@ -1070,8 +673,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1090,7 +691,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1098,8 +699,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1118,8 +717,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1140,8 +737,6 @@ def name(self): def name(self, val): self["name"] = val - # offset - # ------ @property def offset(self): """ @@ -1155,7 +750,7 @@ def offset(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["offset"] @@ -1163,8 +758,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -1186,8 +779,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # offsetsrc - # --------- @property def offsetsrc(self): """ @@ -1206,8 +797,6 @@ def offsetsrc(self): def offsetsrc(self, val): self["offsetsrc"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1226,8 +815,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -1248,8 +835,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -1261,79 +846,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.bar.Outsidetextfont @@ -1344,8 +856,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # selected - # -------- @property def selected(self): """ @@ -1355,16 +865,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.bar.selected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.selected.Textf - ont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.bar.Selected @@ -1375,8 +875,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1399,8 +897,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1420,8 +916,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1431,18 +925,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.bar.Stream @@ -1453,8 +935,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1472,7 +952,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1480,8 +960,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -1505,8 +983,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1518,79 +994,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.bar.Textfont @@ -1601,8 +1004,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1622,7 +1023,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1630,8 +1031,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1651,8 +1050,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1671,8 +1068,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1698,7 +1093,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1706,8 +1101,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1727,8 +1120,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1749,8 +1140,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1782,8 +1171,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1793,17 +1180,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.bar.unselected.Mar - ker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.bar.unselected.Tex - tfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.bar.Unselected @@ -1814,8 +1190,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1837,8 +1211,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -1850,7 +1222,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -1858,8 +1230,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -1878,8 +1248,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # x - # - @property def x(self): """ @@ -1890,7 +1258,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1898,8 +1266,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1919,8 +1285,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1944,8 +1308,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1968,8 +1330,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1999,8 +1359,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -2021,8 +1379,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -2044,8 +1400,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -2066,8 +1420,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -2086,8 +1438,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -2098,7 +1448,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -2106,8 +1456,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -2127,8 +1475,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -2152,8 +1498,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -2176,8 +1520,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -2207,8 +1549,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -2229,8 +1569,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -2252,8 +1590,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -2274,8 +1610,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2294,8 +1628,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2316,14 +1648,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2704,80 +2032,80 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - base=None, - basesrc=None, - cliponaxis=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + base: Any | None = None, + basesrc: str | None = None, + cliponaxis: bool | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -3170,14 +2498,11 @@ def __init__( ------- Bar """ - super(Bar, self).__init__("bar") - + super().__init__("bar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3192,320 +2517,85 @@ def __init__( an instance of :class:`plotly.graph_objs.Bar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("base", None) - _v = base if base is not None else _v - if _v is not None: - self["base"] = _v - _v = arg.pop("basesrc", None) - _v = basesrc if basesrc is not None else _v - if _v is not None: - self["basesrc"] = _v - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("constraintext", None) - _v = constraintext if constraintext is not None else _v - if _v is not None: - self["constraintext"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("error_x", None) - _v = error_x if error_x is not None else _v - if _v is not None: - self["error_x"] = _v - _v = arg.pop("error_y", None) - _v = error_y if error_y is not None else _v - if _v is not None: - self["error_y"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextanchor", None) - _v = insidetextanchor if insidetextanchor is not None else _v - if _v is not None: - self["insidetextanchor"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("offsetsrc", None) - _v = offsetsrc if offsetsrc is not None else _v - if _v is not None: - self["offsetsrc"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("base", arg, base) + self._init_provided("basesrc", arg, basesrc) + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("constraintext", arg, constraintext) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("error_x", arg, error_x) + self._init_provided("error_y", arg, error_y) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextanchor", arg, insidetextanchor) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("offset", arg, offset) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("offsetsrc", arg, offsetsrc) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "bar" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_barpolar.py b/plotly/graph_objs/_barpolar.py index 56101f1da9..4fa82968ef 100644 --- a/plotly/graph_objs/_barpolar.py +++ b/plotly/graph_objs/_barpolar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Barpolar(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "barpolar" _valid_props = { @@ -59,8 +60,6 @@ class Barpolar(_BaseTraceType): "widthsrc", } - # base - # ---- @property def base(self): """ @@ -72,7 +71,7 @@ def base(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["base"] @@ -80,8 +79,6 @@ def base(self): def base(self, val): self["base"] = val - # basesrc - # ------- @property def basesrc(self): """ @@ -100,8 +97,6 @@ def basesrc(self): def basesrc(self, val): self["basesrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -115,7 +110,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -123,8 +118,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -144,8 +137,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dr - # -- @property def dr(self): """ @@ -164,8 +155,6 @@ def dr(self): def dr(self, val): self["dr"] = val - # dtheta - # ------ @property def dtheta(self): """ @@ -186,8 +175,6 @@ def dtheta(self): def dtheta(self, val): self["dtheta"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -204,7 +191,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -212,8 +199,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -233,8 +218,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -244,44 +227,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.barpolar.Hoverlabel @@ -292,8 +237,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -328,7 +271,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -336,8 +279,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -357,8 +298,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -371,7 +310,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -379,8 +318,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -400,8 +337,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -414,7 +349,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -422,8 +357,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -442,8 +375,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -467,8 +398,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -490,8 +419,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -501,13 +428,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.barpolar.Legendgrouptitle @@ -518,8 +438,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -545,8 +463,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -566,8 +482,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -577,106 +491,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.barpolar.marker.Co - lorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.barpolar.marker.Li - ne` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - Returns ------- plotly.graph_objs.barpolar.Marker @@ -687,8 +501,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -707,7 +519,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -715,8 +527,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -735,8 +545,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -757,8 +565,6 @@ def name(self): def name(self, val): self["name"] = val - # offset - # ------ @property def offset(self): """ @@ -771,7 +577,7 @@ def offset(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["offset"] @@ -779,8 +585,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # offsetsrc - # --------- @property def offsetsrc(self): """ @@ -799,8 +603,6 @@ def offsetsrc(self): def offsetsrc(self, val): self["offsetsrc"] = val - # opacity - # ------- @property def opacity(self): """ @@ -819,8 +621,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # r - # - @property def r(self): """ @@ -831,7 +631,7 @@ def r(self): Returns ------- - numpy.ndarray + NDArray """ return self["r"] @@ -839,8 +639,6 @@ def r(self): def r(self, val): self["r"] = val - # r0 - # -- @property def r0(self): """ @@ -860,8 +658,6 @@ def r0(self): def r0(self, val): self["r0"] = val - # rsrc - # ---- @property def rsrc(self): """ @@ -880,8 +676,6 @@ def rsrc(self): def rsrc(self, val): self["rsrc"] = val - # selected - # -------- @property def selected(self): """ @@ -891,17 +685,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.barpolar.selected. - Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.selected. - Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.barpolar.Selected @@ -912,8 +695,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -936,8 +717,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -957,8 +736,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -968,18 +745,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.barpolar.Stream @@ -990,8 +755,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1015,8 +778,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1032,7 +793,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1040,8 +801,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1060,8 +819,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # theta - # ----- @property def theta(self): """ @@ -1072,7 +829,7 @@ def theta(self): Returns ------- - numpy.ndarray + NDArray """ return self["theta"] @@ -1080,8 +837,6 @@ def theta(self): def theta(self, val): self["theta"] = val - # theta0 - # ------ @property def theta0(self): """ @@ -1101,8 +856,6 @@ def theta0(self): def theta0(self, val): self["theta0"] = val - # thetasrc - # -------- @property def thetasrc(self): """ @@ -1121,8 +874,6 @@ def thetasrc(self): def thetasrc(self, val): self["thetasrc"] = val - # thetaunit - # --------- @property def thetaunit(self): """ @@ -1143,8 +894,6 @@ def thetaunit(self): def thetaunit(self, val): self["thetaunit"] = val - # uid - # --- @property def uid(self): """ @@ -1165,8 +914,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1198,8 +945,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1209,17 +954,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.barpolar.unselecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.unselecte - d.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.barpolar.Unselected @@ -1230,8 +964,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1253,8 +985,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -1266,7 +996,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -1274,8 +1004,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -1294,14 +1022,10 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1527,53 +1251,53 @@ def _prop_descriptions(self): def __init__( self, arg=None, - base=None, - basesrc=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetsrc=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, + base: Any | None = None, + basesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -1809,14 +1533,11 @@ def __init__( ------- Barpolar """ - super(Barpolar, self).__init__("barpolar") - + super().__init__("barpolar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1831,212 +1552,58 @@ def __init__( an instance of :class:`plotly.graph_objs.Barpolar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("base", None) - _v = base if base is not None else _v - if _v is not None: - self["base"] = _v - _v = arg.pop("basesrc", None) - _v = basesrc if basesrc is not None else _v - if _v is not None: - self["basesrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dr", None) - _v = dr if dr is not None else _v - if _v is not None: - self["dr"] = _v - _v = arg.pop("dtheta", None) - _v = dtheta if dtheta is not None else _v - if _v is not None: - self["dtheta"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("offsetsrc", None) - _v = offsetsrc if offsetsrc is not None else _v - if _v is not None: - self["offsetsrc"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("r0", None) - _v = r0 if r0 is not None else _v - if _v is not None: - self["r0"] = _v - _v = arg.pop("rsrc", None) - _v = rsrc if rsrc is not None else _v - if _v is not None: - self["rsrc"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("theta", None) - _v = theta if theta is not None else _v - if _v is not None: - self["theta"] = _v - _v = arg.pop("theta0", None) - _v = theta0 if theta0 is not None else _v - if _v is not None: - self["theta0"] = _v - _v = arg.pop("thetasrc", None) - _v = thetasrc if thetasrc is not None else _v - if _v is not None: - self["thetasrc"] = _v - _v = arg.pop("thetaunit", None) - _v = thetaunit if thetaunit is not None else _v - if _v is not None: - self["thetaunit"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("base", arg, base) + self._init_provided("basesrc", arg, basesrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dr", arg, dr) + self._init_provided("dtheta", arg, dtheta) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("offset", arg, offset) + self._init_provided("offsetsrc", arg, offsetsrc) + self._init_provided("opacity", arg, opacity) + self._init_provided("r", arg, r) + self._init_provided("r0", arg, r0) + self._init_provided("rsrc", arg, rsrc) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("theta", arg, theta) + self._init_provided("theta0", arg, theta0) + self._init_provided("thetasrc", arg, thetasrc) + self._init_provided("thetaunit", arg, thetaunit) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._props["type"] = "barpolar" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_box.py b/plotly/graph_objs/_box.py index 0e372f6507..a74631a60e 100644 --- a/plotly/graph_objs/_box.py +++ b/plotly/graph_objs/_box.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Box(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "box" _valid_props = { @@ -98,8 +99,6 @@ class Box(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -121,8 +120,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # boxmean - # ------- @property def boxmean(self): """ @@ -145,8 +142,6 @@ def boxmean(self): def boxmean(self, val): self["boxmean"] = val - # boxpoints - # --------- @property def boxpoints(self): """ @@ -174,8 +169,6 @@ def boxpoints(self): def boxpoints(self, val): self["boxpoints"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -189,7 +182,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -197,8 +190,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -218,8 +209,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -239,8 +228,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -260,8 +247,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -274,42 +259,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -321,8 +271,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -339,7 +287,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -347,8 +295,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -368,8 +314,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -379,44 +323,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.box.Hoverlabel @@ -427,8 +333,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -450,8 +354,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -486,7 +388,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -494,8 +396,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -515,8 +415,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -529,7 +427,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -537,8 +435,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -558,8 +454,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -572,7 +466,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -580,8 +474,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -600,8 +492,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # jitter - # ------ @property def jitter(self): """ @@ -623,8 +513,6 @@ def jitter(self): def jitter(self, val): self["jitter"] = val - # legend - # ------ @property def legend(self): """ @@ -648,8 +536,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -671,8 +557,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -682,13 +566,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.box.Legendgrouptitle @@ -699,8 +576,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -726,8 +601,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -747,8 +620,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -758,14 +629,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - Returns ------- plotly.graph_objs.box.Line @@ -776,8 +639,6 @@ def line(self): def line(self, val): self["line"] = val - # lowerfence - # ---------- @property def lowerfence(self): """ @@ -792,7 +653,7 @@ def lowerfence(self): Returns ------- - numpy.ndarray + NDArray """ return self["lowerfence"] @@ -800,8 +661,6 @@ def lowerfence(self): def lowerfence(self, val): self["lowerfence"] = val - # lowerfencesrc - # ------------- @property def lowerfencesrc(self): """ @@ -821,8 +680,6 @@ def lowerfencesrc(self): def lowerfencesrc(self, val): self["lowerfencesrc"] = val - # marker - # ------ @property def marker(self): """ @@ -832,33 +689,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.box.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - Returns ------- plotly.graph_objs.box.Marker @@ -869,8 +699,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # mean - # ---- @property def mean(self): """ @@ -885,7 +713,7 @@ def mean(self): Returns ------- - numpy.ndarray + NDArray """ return self["mean"] @@ -893,8 +721,6 @@ def mean(self): def mean(self, val): self["mean"] = val - # meansrc - # ------- @property def meansrc(self): """ @@ -913,8 +739,6 @@ def meansrc(self): def meansrc(self, val): self["meansrc"] = val - # median - # ------ @property def median(self): """ @@ -926,7 +750,7 @@ def median(self): Returns ------- - numpy.ndarray + NDArray """ return self["median"] @@ -934,8 +758,6 @@ def median(self): def median(self, val): self["median"] = val - # mediansrc - # --------- @property def mediansrc(self): """ @@ -954,8 +776,6 @@ def mediansrc(self): def mediansrc(self, val): self["mediansrc"] = val - # meta - # ---- @property def meta(self): """ @@ -974,7 +794,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -982,8 +802,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1002,8 +820,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1026,8 +842,6 @@ def name(self): def name(self, val): self["name"] = val - # notched - # ------- @property def notched(self): """ @@ -1054,8 +868,6 @@ def notched(self): def notched(self, val): self["notched"] = val - # notchspan - # --------- @property def notchspan(self): """ @@ -1071,7 +883,7 @@ def notchspan(self): Returns ------- - numpy.ndarray + NDArray """ return self["notchspan"] @@ -1079,8 +891,6 @@ def notchspan(self): def notchspan(self, val): self["notchspan"] = val - # notchspansrc - # ------------ @property def notchspansrc(self): """ @@ -1100,8 +910,6 @@ def notchspansrc(self): def notchspansrc(self, val): self["notchspansrc"] = val - # notchwidth - # ---------- @property def notchwidth(self): """ @@ -1121,8 +929,6 @@ def notchwidth(self): def notchwidth(self, val): self["notchwidth"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -1144,8 +950,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1164,8 +968,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -1186,8 +988,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # pointpos - # -------- @property def pointpos(self): """ @@ -1210,8 +1010,6 @@ def pointpos(self): def pointpos(self, val): self["pointpos"] = val - # q1 - # -- @property def q1(self): """ @@ -1223,7 +1021,7 @@ def q1(self): Returns ------- - numpy.ndarray + NDArray """ return self["q1"] @@ -1231,8 +1029,6 @@ def q1(self): def q1(self, val): self["q1"] = val - # q1src - # ----- @property def q1src(self): """ @@ -1251,8 +1047,6 @@ def q1src(self): def q1src(self, val): self["q1src"] = val - # q3 - # -- @property def q3(self): """ @@ -1264,7 +1058,7 @@ def q3(self): Returns ------- - numpy.ndarray + NDArray """ return self["q3"] @@ -1272,8 +1066,6 @@ def q3(self): def q3(self, val): self["q3"] = val - # q3src - # ----- @property def q3src(self): """ @@ -1292,8 +1084,6 @@ def q3src(self): def q3src(self, val): self["q3src"] = val - # quartilemethod - # -------------- @property def quartilemethod(self): """ @@ -1324,8 +1114,6 @@ def quartilemethod(self): def quartilemethod(self, val): self["quartilemethod"] = val - # sd - # -- @property def sd(self): """ @@ -1340,7 +1128,7 @@ def sd(self): Returns ------- - numpy.ndarray + NDArray """ return self["sd"] @@ -1348,8 +1136,6 @@ def sd(self): def sd(self, val): self["sd"] = val - # sdmultiple - # ---------- @property def sdmultiple(self): """ @@ -1370,8 +1156,6 @@ def sdmultiple(self): def sdmultiple(self, val): self["sdmultiple"] = val - # sdsrc - # ----- @property def sdsrc(self): """ @@ -1390,8 +1174,6 @@ def sdsrc(self): def sdsrc(self, val): self["sdsrc"] = val - # selected - # -------- @property def selected(self): """ @@ -1401,12 +1183,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.box.selected.Marke - r` instance or dict with compatible properties - Returns ------- plotly.graph_objs.box.Selected @@ -1417,8 +1193,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1441,8 +1215,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1462,8 +1234,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showwhiskers - # ------------ @property def showwhiskers(self): """ @@ -1483,8 +1253,6 @@ def showwhiskers(self): def showwhiskers(self, val): self["showwhiskers"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1508,8 +1276,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # stream - # ------ @property def stream(self): """ @@ -1519,18 +1285,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.box.Stream @@ -1541,8 +1295,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1559,7 +1311,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1567,8 +1319,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1587,8 +1337,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1609,8 +1357,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1642,8 +1388,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1653,13 +1397,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.box.unselected.Mar - ker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.box.Unselected @@ -1670,8 +1407,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # upperfence - # ---------- @property def upperfence(self): """ @@ -1686,7 +1421,7 @@ def upperfence(self): Returns ------- - numpy.ndarray + NDArray """ return self["upperfence"] @@ -1694,8 +1429,6 @@ def upperfence(self): def upperfence(self, val): self["upperfence"] = val - # upperfencesrc - # ------------- @property def upperfencesrc(self): """ @@ -1715,8 +1448,6 @@ def upperfencesrc(self): def upperfencesrc(self, val): self["upperfencesrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1738,8 +1469,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # whiskerwidth - # ------------ @property def whiskerwidth(self): """ @@ -1759,8 +1488,6 @@ def whiskerwidth(self): def whiskerwidth(self, val): self["whiskerwidth"] = val - # width - # ----- @property def width(self): """ @@ -1781,8 +1508,6 @@ def width(self): def width(self, val): self["width"] = val - # x - # - @property def x(self): """ @@ -1794,7 +1519,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1802,8 +1527,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1823,8 +1546,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1848,8 +1569,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1872,8 +1591,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1903,8 +1620,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1925,8 +1640,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1948,8 +1661,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1970,8 +1681,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1990,8 +1699,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -2003,7 +1710,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -2011,8 +1718,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -2032,8 +1737,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -2057,8 +1760,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -2081,8 +1782,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -2112,8 +1811,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -2134,8 +1831,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -2157,8 +1852,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -2179,8 +1872,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2199,8 +1890,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2221,14 +1910,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2682,92 +2367,92 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - boxmean=None, - boxpoints=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lowerfence=None, - lowerfencesrc=None, - marker=None, - mean=None, - meansrc=None, - median=None, - mediansrc=None, - meta=None, - metasrc=None, - name=None, - notched=None, - notchspan=None, - notchspansrc=None, - notchwidth=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - q1=None, - q1src=None, - q3=None, - q3src=None, - quartilemethod=None, - sd=None, - sdmultiple=None, - sdsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - showwhiskers=None, - sizemode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - upperfence=None, - upperfencesrc=None, - visible=None, - whiskerwidth=None, - width=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + boxmean: Any | None = None, + boxpoints: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + jitter: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lowerfence: NDArray | None = None, + lowerfencesrc: str | None = None, + marker: None | None = None, + mean: NDArray | None = None, + meansrc: str | None = None, + median: NDArray | None = None, + mediansrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + notched: bool | None = None, + notchspan: NDArray | None = None, + notchspansrc: str | None = None, + notchwidth: int | float | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + pointpos: int | float | None = None, + q1: NDArray | None = None, + q1src: str | None = None, + q3: NDArray | None = None, + q3src: str | None = None, + quartilemethod: Any | None = None, + sd: NDArray | None = None, + sdmultiple: int | float | None = None, + sdsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showwhiskers: bool | None = None, + sizemode: Any | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + upperfence: NDArray | None = None, + upperfencesrc: str | None = None, + visible: Any | None = None, + whiskerwidth: int | float | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -3253,14 +2938,11 @@ def __init__( ------- Box """ - super(Box, self).__init__("box") - + super().__init__("box") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3275,368 +2957,97 @@ def __init__( an instance of :class:`plotly.graph_objs.Box`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("boxmean", None) - _v = boxmean if boxmean is not None else _v - if _v is not None: - self["boxmean"] = _v - _v = arg.pop("boxpoints", None) - _v = boxpoints if boxpoints is not None else _v - if _v is not None: - self["boxpoints"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("jitter", None) - _v = jitter if jitter is not None else _v - if _v is not None: - self["jitter"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("lowerfence", None) - _v = lowerfence if lowerfence is not None else _v - if _v is not None: - self["lowerfence"] = _v - _v = arg.pop("lowerfencesrc", None) - _v = lowerfencesrc if lowerfencesrc is not None else _v - if _v is not None: - self["lowerfencesrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("mean", None) - _v = mean if mean is not None else _v - if _v is not None: - self["mean"] = _v - _v = arg.pop("meansrc", None) - _v = meansrc if meansrc is not None else _v - if _v is not None: - self["meansrc"] = _v - _v = arg.pop("median", None) - _v = median if median is not None else _v - if _v is not None: - self["median"] = _v - _v = arg.pop("mediansrc", None) - _v = mediansrc if mediansrc is not None else _v - if _v is not None: - self["mediansrc"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("notched", None) - _v = notched if notched is not None else _v - if _v is not None: - self["notched"] = _v - _v = arg.pop("notchspan", None) - _v = notchspan if notchspan is not None else _v - if _v is not None: - self["notchspan"] = _v - _v = arg.pop("notchspansrc", None) - _v = notchspansrc if notchspansrc is not None else _v - if _v is not None: - self["notchspansrc"] = _v - _v = arg.pop("notchwidth", None) - _v = notchwidth if notchwidth is not None else _v - if _v is not None: - self["notchwidth"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("pointpos", None) - _v = pointpos if pointpos is not None else _v - if _v is not None: - self["pointpos"] = _v - _v = arg.pop("q1", None) - _v = q1 if q1 is not None else _v - if _v is not None: - self["q1"] = _v - _v = arg.pop("q1src", None) - _v = q1src if q1src is not None else _v - if _v is not None: - self["q1src"] = _v - _v = arg.pop("q3", None) - _v = q3 if q3 is not None else _v - if _v is not None: - self["q3"] = _v - _v = arg.pop("q3src", None) - _v = q3src if q3src is not None else _v - if _v is not None: - self["q3src"] = _v - _v = arg.pop("quartilemethod", None) - _v = quartilemethod if quartilemethod is not None else _v - if _v is not None: - self["quartilemethod"] = _v - _v = arg.pop("sd", None) - _v = sd if sd is not None else _v - if _v is not None: - self["sd"] = _v - _v = arg.pop("sdmultiple", None) - _v = sdmultiple if sdmultiple is not None else _v - if _v is not None: - self["sdmultiple"] = _v - _v = arg.pop("sdsrc", None) - _v = sdsrc if sdsrc is not None else _v - if _v is not None: - self["sdsrc"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showwhiskers", None) - _v = showwhiskers if showwhiskers is not None else _v - if _v is not None: - self["showwhiskers"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("upperfence", None) - _v = upperfence if upperfence is not None else _v - if _v is not None: - self["upperfence"] = _v - _v = arg.pop("upperfencesrc", None) - _v = upperfencesrc if upperfencesrc is not None else _v - if _v is not None: - self["upperfencesrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("whiskerwidth", None) - _v = whiskerwidth if whiskerwidth is not None else _v - if _v is not None: - self["whiskerwidth"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("boxmean", arg, boxmean) + self._init_provided("boxpoints", arg, boxpoints) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("jitter", arg, jitter) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("lowerfence", arg, lowerfence) + self._init_provided("lowerfencesrc", arg, lowerfencesrc) + self._init_provided("marker", arg, marker) + self._init_provided("mean", arg, mean) + self._init_provided("meansrc", arg, meansrc) + self._init_provided("median", arg, median) + self._init_provided("mediansrc", arg, mediansrc) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("notched", arg, notched) + self._init_provided("notchspan", arg, notchspan) + self._init_provided("notchspansrc", arg, notchspansrc) + self._init_provided("notchwidth", arg, notchwidth) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("pointpos", arg, pointpos) + self._init_provided("q1", arg, q1) + self._init_provided("q1src", arg, q1src) + self._init_provided("q3", arg, q3) + self._init_provided("q3src", arg, q3src) + self._init_provided("quartilemethod", arg, quartilemethod) + self._init_provided("sd", arg, sd) + self._init_provided("sdmultiple", arg, sdmultiple) + self._init_provided("sdsrc", arg, sdsrc) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showwhiskers", arg, showwhiskers) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("upperfence", arg, upperfence) + self._init_provided("upperfencesrc", arg, upperfencesrc) + self._init_provided("visible", arg, visible) + self._init_provided("whiskerwidth", arg, whiskerwidth) + self._init_provided("width", arg, width) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "box" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_candlestick.py b/plotly/graph_objs/_candlestick.py index 946743d944..a7dce6eb15 100644 --- a/plotly/graph_objs/_candlestick.py +++ b/plotly/graph_objs/_candlestick.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Candlestick(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "candlestick" _valid_props = { @@ -61,8 +62,6 @@ class Candlestick(_BaseTraceType): "zorder", } - # close - # ----- @property def close(self): """ @@ -73,7 +72,7 @@ def close(self): Returns ------- - numpy.ndarray + NDArray """ return self["close"] @@ -81,8 +80,6 @@ def close(self): def close(self, val): self["close"] = val - # closesrc - # -------- @property def closesrc(self): """ @@ -101,8 +98,6 @@ def closesrc(self): def closesrc(self, val): self["closesrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -116,7 +111,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -124,8 +119,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -145,8 +138,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # decreasing - # ---------- @property def decreasing(self): """ @@ -156,18 +147,6 @@ def decreasing(self): - A dict of string/value properties that will be passed to the Decreasing constructor - Supported dict properties: - - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.decrea - sing.Line` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.candlestick.Decreasing @@ -178,8 +157,6 @@ def decreasing(self): def decreasing(self, val): self["decreasing"] = val - # high - # ---- @property def high(self): """ @@ -190,7 +167,7 @@ def high(self): Returns ------- - numpy.ndarray + NDArray """ return self["high"] @@ -198,8 +175,6 @@ def high(self): def high(self, val): self["high"] = val - # highsrc - # ------- @property def highsrc(self): """ @@ -218,8 +193,6 @@ def highsrc(self): def highsrc(self, val): self["highsrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -236,7 +209,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -244,8 +217,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -265,8 +236,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -276,47 +245,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - split - Show hover information (open, close, high, low) - in separate labels. - Returns ------- plotly.graph_objs.candlestick.Hoverlabel @@ -327,8 +255,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -341,7 +267,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -349,8 +275,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -370,8 +294,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -384,7 +306,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -392,8 +314,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -412,8 +332,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # increasing - # ---------- @property def increasing(self): """ @@ -423,18 +341,6 @@ def increasing(self): - A dict of string/value properties that will be passed to the Increasing constructor - Supported dict properties: - - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.increa - sing.Line` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.candlestick.Increasing @@ -445,8 +351,6 @@ def increasing(self): def increasing(self, val): self["increasing"] = val - # legend - # ------ @property def legend(self): """ @@ -470,8 +374,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -493,8 +395,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -504,13 +404,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.candlestick.Legendgrouptitle @@ -521,8 +414,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -548,8 +439,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -569,8 +458,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -580,15 +467,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - width - Sets the width (in px) of line bounding the - box(es). Note that this style setting can also - be set per direction via - `increasing.line.width` and - `decreasing.line.width`. - Returns ------- plotly.graph_objs.candlestick.Line @@ -599,8 +477,6 @@ def line(self): def line(self, val): self["line"] = val - # low - # --- @property def low(self): """ @@ -611,7 +487,7 @@ def low(self): Returns ------- - numpy.ndarray + NDArray """ return self["low"] @@ -619,8 +495,6 @@ def low(self): def low(self, val): self["low"] = val - # lowsrc - # ------ @property def lowsrc(self): """ @@ -639,8 +513,6 @@ def lowsrc(self): def lowsrc(self, val): self["lowsrc"] = val - # meta - # ---- @property def meta(self): """ @@ -659,7 +531,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -667,8 +539,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -687,8 +557,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -709,8 +577,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -729,8 +595,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # open - # ---- @property def open(self): """ @@ -741,7 +605,7 @@ def open(self): Returns ------- - numpy.ndarray + NDArray """ return self["open"] @@ -749,8 +613,6 @@ def open(self): def open(self, val): self["open"] = val - # opensrc - # ------- @property def opensrc(self): """ @@ -769,8 +631,6 @@ def opensrc(self): def opensrc(self, val): self["opensrc"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -793,8 +653,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -814,8 +672,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -825,18 +681,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.candlestick.Stream @@ -847,8 +691,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -864,7 +706,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -872,8 +714,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -892,8 +732,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -914,8 +752,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -947,8 +783,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -970,8 +804,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # whiskerwidth - # ------------ @property def whiskerwidth(self): """ @@ -991,8 +823,6 @@ def whiskerwidth(self): def whiskerwidth(self, val): self["whiskerwidth"] = val - # x - # - @property def x(self): """ @@ -1004,7 +834,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1012,8 +842,6 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1037,8 +865,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1061,8 +887,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1092,8 +916,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1114,8 +936,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1137,8 +957,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1159,8 +977,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1179,8 +995,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1204,8 +1018,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1235,8 +1047,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # zorder - # ------ @property def zorder(self): """ @@ -1257,14 +1067,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1498,55 +1304,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - whiskerwidth=None, - x=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - yaxis=None, - yhoverformat=None, - zorder=None, + close: NDArray | None = None, + closesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + high: NDArray | None = None, + highsrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + low: NDArray | None = None, + lowsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + open: NDArray | None = None, + opensrc: str | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + whiskerwidth: int | float | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -1796,14 +1602,11 @@ def __init__( ------- Candlestick """ - super(Candlestick, self).__init__("candlestick") - + super().__init__("candlestick") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1818,220 +1621,60 @@ def __init__( an instance of :class:`plotly.graph_objs.Candlestick`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("close", None) - _v = close if close is not None else _v - if _v is not None: - self["close"] = _v - _v = arg.pop("closesrc", None) - _v = closesrc if closesrc is not None else _v - if _v is not None: - self["closesrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("decreasing", None) - _v = decreasing if decreasing is not None else _v - if _v is not None: - self["decreasing"] = _v - _v = arg.pop("high", None) - _v = high if high is not None else _v - if _v is not None: - self["high"] = _v - _v = arg.pop("highsrc", None) - _v = highsrc if highsrc is not None else _v - if _v is not None: - self["highsrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("increasing", None) - _v = increasing if increasing is not None else _v - if _v is not None: - self["increasing"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("low", None) - _v = low if low is not None else _v - if _v is not None: - self["low"] = _v - _v = arg.pop("lowsrc", None) - _v = lowsrc if lowsrc is not None else _v - if _v is not None: - self["lowsrc"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("open", None) - _v = open if open is not None else _v - if _v is not None: - self["open"] = _v - _v = arg.pop("opensrc", None) - _v = opensrc if opensrc is not None else _v - if _v is not None: - self["opensrc"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("whiskerwidth", None) - _v = whiskerwidth if whiskerwidth is not None else _v - if _v is not None: - self["whiskerwidth"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("close", arg, close) + self._init_provided("closesrc", arg, closesrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("decreasing", arg, decreasing) + self._init_provided("high", arg, high) + self._init_provided("highsrc", arg, highsrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("increasing", arg, increasing) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("low", arg, low) + self._init_provided("lowsrc", arg, lowsrc) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("open", arg, open) + self._init_provided("opensrc", arg, opensrc) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("whiskerwidth", arg, whiskerwidth) + self._init_provided("x", arg, x) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("zorder", arg, zorder) self._props["type"] = "candlestick" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_carpet.py b/plotly/graph_objs/_carpet.py index 71a5c95019..00f08bcbd1 100644 --- a/plotly/graph_objs/_carpet.py +++ b/plotly/graph_objs/_carpet.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Carpet(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "carpet" _valid_props = { @@ -49,8 +50,6 @@ class Carpet(_BaseTraceType): "zorder", } - # a - # - @property def a(self): """ @@ -61,7 +60,7 @@ def a(self): Returns ------- - numpy.ndarray + NDArray """ return self["a"] @@ -69,8 +68,6 @@ def a(self): def a(self, val): self["a"] = val - # a0 - # -- @property def a0(self): """ @@ -91,8 +88,6 @@ def a0(self): def a0(self, val): self["a0"] = val - # aaxis - # ----- @property def aaxis(self): """ @@ -102,244 +97,6 @@ def aaxis(self): - A dict of string/value properties that will be passed to the Aaxis constructor - Supported dict properties: - - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the axis line. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minexponent - Hide SI prefix for 10^n if |n| is below this - number - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgriddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - aaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.aaxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - title - :class:`plotly.graph_objects.carpet.aaxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - Returns ------- plotly.graph_objs.carpet.Aaxis @@ -350,8 +107,6 @@ def aaxis(self): def aaxis(self, val): self["aaxis"] = val - # asrc - # ---- @property def asrc(self): """ @@ -370,8 +125,6 @@ def asrc(self): def asrc(self, val): self["asrc"] = val - # b - # - @property def b(self): """ @@ -382,7 +135,7 @@ def b(self): Returns ------- - numpy.ndarray + NDArray """ return self["b"] @@ -390,8 +143,6 @@ def b(self): def b(self, val): self["b"] = val - # b0 - # -- @property def b0(self): """ @@ -412,8 +163,6 @@ def b0(self): def b0(self, val): self["b0"] = val - # baxis - # ----- @property def baxis(self): """ @@ -423,244 +172,6 @@ def baxis(self): - A dict of string/value properties that will be passed to the Baxis constructor - Supported dict properties: - - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the axis line. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minexponent - Hide SI prefix for 10^n if |n| is below this - number - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgriddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - baxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.baxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - title - :class:`plotly.graph_objects.carpet.baxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - Returns ------- plotly.graph_objs.carpet.Baxis @@ -671,8 +182,6 @@ def baxis(self): def baxis(self, val): self["baxis"] = val - # bsrc - # ---- @property def bsrc(self): """ @@ -691,8 +200,6 @@ def bsrc(self): def bsrc(self, val): self["bsrc"] = val - # carpet - # ------ @property def carpet(self): """ @@ -714,8 +221,6 @@ def carpet(self): def carpet(self, val): self["carpet"] = val - # cheaterslope - # ------------ @property def cheaterslope(self): """ @@ -735,8 +240,6 @@ def cheaterslope(self): def cheaterslope(self, val): self["cheaterslope"] = val - # color - # ----- @property def color(self): """ @@ -750,42 +253,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -797,8 +265,6 @@ def color(self): def color(self, val): self["color"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -812,7 +278,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -820,8 +286,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -841,8 +305,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # da - # -- @property def da(self): """ @@ -861,8 +323,6 @@ def da(self): def da(self, val): self["da"] = val - # db - # -- @property def db(self): """ @@ -881,8 +341,6 @@ def db(self): def db(self, val): self["db"] = val - # font - # ---- @property def font(self): """ @@ -894,52 +352,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.carpet.Font @@ -950,8 +362,6 @@ def font(self): def font(self, val): self["font"] = val - # ids - # --- @property def ids(self): """ @@ -964,7 +374,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -972,8 +382,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -992,8 +400,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -1017,8 +423,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1028,13 +432,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.carpet.Legendgrouptitle @@ -1045,8 +442,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1072,8 +467,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1093,8 +486,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # meta - # ---- @property def meta(self): """ @@ -1113,7 +504,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1121,8 +512,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1141,8 +530,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1163,8 +550,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1183,8 +568,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # stream - # ------ @property def stream(self): """ @@ -1194,18 +577,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.carpet.Stream @@ -1216,8 +587,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # uid - # --- @property def uid(self): """ @@ -1238,8 +607,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1271,8 +638,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1294,8 +659,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1308,7 +671,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1316,8 +679,6 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1341,8 +702,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1361,8 +720,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1373,7 +730,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1381,8 +738,6 @@ def y(self): def y(self, val): self["y"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1406,8 +761,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1426,8 +779,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -1448,14 +799,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1626,43 +973,43 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - a0=None, - aaxis=None, - asrc=None, - b=None, - b0=None, - baxis=None, - bsrc=None, - carpet=None, - cheaterslope=None, - color=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - font=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xsrc=None, - y=None, - yaxis=None, - ysrc=None, - zorder=None, + a: NDArray | None = None, + a0: int | float | None = None, + aaxis: None | None = None, + asrc: str | None = None, + b: NDArray | None = None, + b0: int | float | None = None, + baxis: None | None = None, + bsrc: str | None = None, + carpet: str | None = None, + cheaterslope: int | float | None = None, + color: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + da: int | float | None = None, + db: int | float | None = None, + font: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + stream: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -1847,14 +1194,11 @@ def __init__( ------- Carpet """ - super(Carpet, self).__init__("carpet") - + super().__init__("carpet") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1869,172 +1213,48 @@ def __init__( an instance of :class:`plotly.graph_objs.Carpet`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - _v = a if a is not None else _v - if _v is not None: - self["a"] = _v - _v = arg.pop("a0", None) - _v = a0 if a0 is not None else _v - if _v is not None: - self["a0"] = _v - _v = arg.pop("aaxis", None) - _v = aaxis if aaxis is not None else _v - if _v is not None: - self["aaxis"] = _v - _v = arg.pop("asrc", None) - _v = asrc if asrc is not None else _v - if _v is not None: - self["asrc"] = _v - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("b0", None) - _v = b0 if b0 is not None else _v - if _v is not None: - self["b0"] = _v - _v = arg.pop("baxis", None) - _v = baxis if baxis is not None else _v - if _v is not None: - self["baxis"] = _v - _v = arg.pop("bsrc", None) - _v = bsrc if bsrc is not None else _v - if _v is not None: - self["bsrc"] = _v - _v = arg.pop("carpet", None) - _v = carpet if carpet is not None else _v - if _v is not None: - self["carpet"] = _v - _v = arg.pop("cheaterslope", None) - _v = cheaterslope if cheaterslope is not None else _v - if _v is not None: - self["cheaterslope"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("da", None) - _v = da if da is not None else _v - if _v is not None: - self["da"] = _v - _v = arg.pop("db", None) - _v = db if db is not None else _v - if _v is not None: - self["db"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("a", arg, a) + self._init_provided("a0", arg, a0) + self._init_provided("aaxis", arg, aaxis) + self._init_provided("asrc", arg, asrc) + self._init_provided("b", arg, b) + self._init_provided("b0", arg, b0) + self._init_provided("baxis", arg, baxis) + self._init_provided("bsrc", arg, bsrc) + self._init_provided("carpet", arg, carpet) + self._init_provided("cheaterslope", arg, cheaterslope) + self._init_provided("color", arg, color) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("da", arg, da) + self._init_provided("db", arg, db) + self._init_provided("font", arg, font) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("stream", arg, stream) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "carpet" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_choropleth.py b/plotly/graph_objs/_choropleth.py index bad982915b..1701556b33 100644 --- a/plotly/graph_objs/_choropleth.py +++ b/plotly/graph_objs/_choropleth.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Choropleth(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "choropleth" _valid_props = { @@ -60,8 +61,6 @@ class Choropleth(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -85,8 +84,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -112,8 +109,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -123,272 +118,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - eth.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choropleth.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of choropleth.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choropleth.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.choropleth.ColorBar @@ -399,8 +128,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -452,8 +179,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -467,7 +192,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -475,8 +200,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -496,8 +219,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # featureidkey - # ------------ @property def featureidkey(self): """ @@ -520,8 +241,6 @@ def featureidkey(self): def featureidkey(self, val): self["featureidkey"] = val - # geo - # --- @property def geo(self): """ @@ -545,8 +264,6 @@ def geo(self): def geo(self, val): self["geo"] = val - # geojson - # ------- @property def geojson(self): """ @@ -568,8 +285,6 @@ def geojson(self): def geojson(self, val): self["geojson"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -586,7 +301,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -594,8 +309,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -615,8 +328,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -626,44 +337,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.choropleth.Hoverlabel @@ -674,8 +347,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -710,7 +381,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -718,8 +389,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -739,8 +408,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -753,7 +420,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -761,8 +428,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -782,8 +447,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -796,7 +459,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -804,8 +467,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -824,8 +485,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -849,8 +508,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -872,8 +529,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -883,13 +538,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.choropleth.Legendgrouptitle @@ -900,8 +548,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -927,8 +573,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -948,8 +592,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # locationmode - # ------------ @property def locationmode(self): """ @@ -973,8 +615,6 @@ def locationmode(self): def locationmode(self, val): self["locationmode"] = val - # locations - # --------- @property def locations(self): """ @@ -986,7 +626,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -994,8 +634,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -1015,8 +653,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # marker - # ------ @property def marker(self): """ @@ -1026,18 +662,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.choropleth.marker. - Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - Returns ------- plotly.graph_objs.choropleth.Marker @@ -1048,8 +672,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1068,7 +690,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1076,8 +698,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1096,8 +716,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1118,8 +736,6 @@ def name(self): def name(self, val): self["name"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1140,8 +756,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # selected - # -------- @property def selected(self): """ @@ -1151,13 +765,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.choropleth.selecte - d.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.choropleth.Selected @@ -1168,8 +775,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1192,8 +797,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1213,8 +816,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1234,8 +835,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1245,18 +844,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.choropleth.Stream @@ -1267,8 +854,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1281,7 +866,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1289,8 +874,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1309,8 +892,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1331,8 +912,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1364,8 +943,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1375,13 +952,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.choropleth.unselec - ted.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.choropleth.Unselected @@ -1392,8 +962,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1415,8 +983,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # z - # - @property def z(self): """ @@ -1427,7 +993,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1435,8 +1001,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1458,8 +1022,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1479,8 +1041,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1501,8 +1061,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -1522,8 +1080,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1542,14 +1098,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1810,54 +1362,54 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locationmode=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geo: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locationmode: Any | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2129,14 +1681,11 @@ def __init__( ------- Choropleth """ - super(Choropleth, self).__init__("choropleth") - + super().__init__("choropleth") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2151,216 +1700,59 @@ def __init__( an instance of :class:`plotly.graph_objs.Choropleth`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("featureidkey", None) - _v = featureidkey if featureidkey is not None else _v - if _v is not None: - self["featureidkey"] = _v - _v = arg.pop("geo", None) - _v = geo if geo is not None else _v - if _v is not None: - self["geo"] = _v - _v = arg.pop("geojson", None) - _v = geojson if geojson is not None else _v - if _v is not None: - self["geojson"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("locationmode", None) - _v = locationmode if locationmode is not None else _v - if _v is not None: - self["locationmode"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("featureidkey", arg, featureidkey) + self._init_provided("geo", arg, geo) + self._init_provided("geojson", arg, geojson) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("locationmode", arg, locationmode) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "choropleth" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_choroplethmap.py b/plotly/graph_objs/_choroplethmap.py index 86edbf5362..19ba62aacd 100644 --- a/plotly/graph_objs/_choroplethmap.py +++ b/plotly/graph_objs/_choroplethmap.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Choroplethmap(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "choroplethmap" _valid_props = { @@ -60,8 +61,6 @@ class Choroplethmap(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -85,8 +84,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # below - # ----- @property def below(self): """ @@ -109,8 +106,6 @@ def below(self): def below(self, val): self["below"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -136,8 +131,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -147,273 +140,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - ethmap.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choroplethmap.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - choroplethmap.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmap.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.choroplethmap.ColorBar @@ -424,8 +150,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -477,8 +201,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -492,7 +214,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -500,8 +222,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -521,8 +241,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # featureidkey - # ------------ @property def featureidkey(self): """ @@ -544,8 +262,6 @@ def featureidkey(self): def featureidkey(self, val): self["featureidkey"] = val - # geojson - # ------- @property def geojson(self): """ @@ -566,8 +282,6 @@ def geojson(self): def geojson(self, val): self["geojson"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -584,7 +298,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -592,8 +306,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -613,8 +325,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -624,44 +334,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.choroplethmap.Hoverlabel @@ -672,8 +344,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -709,7 +379,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -717,8 +387,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -738,8 +406,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -752,7 +418,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -760,8 +426,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -781,8 +445,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -795,7 +457,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -803,8 +465,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -823,8 +483,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -848,8 +506,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -871,8 +527,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -882,13 +536,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.choroplethmap.Legendgrouptitle @@ -899,8 +546,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -926,8 +571,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -947,8 +590,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # locations - # --------- @property def locations(self): """ @@ -960,7 +601,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -968,8 +609,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -989,8 +628,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # marker - # ------ @property def marker(self): """ @@ -1000,18 +637,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.choroplethmap.mark - er.Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - Returns ------- plotly.graph_objs.choroplethmap.Marker @@ -1022,8 +647,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1042,7 +665,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1050,8 +673,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1070,8 +691,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1092,8 +711,6 @@ def name(self): def name(self, val): self["name"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1114,8 +731,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # selected - # -------- @property def selected(self): """ @@ -1125,13 +740,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.choroplethmap.sele - cted.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.choroplethmap.Selected @@ -1142,8 +750,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1166,8 +772,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1187,8 +791,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1208,8 +810,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1219,18 +819,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.choroplethmap.Stream @@ -1241,8 +829,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1266,8 +852,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1280,7 +864,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1288,8 +872,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1308,8 +890,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1330,8 +910,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1363,8 +941,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1374,13 +950,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.choroplethmap.unse - lected.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.choroplethmap.Unselected @@ -1391,8 +960,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1414,8 +981,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # z - # - @property def z(self): """ @@ -1426,7 +991,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1434,8 +999,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1457,8 +1020,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1478,8 +1039,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1500,8 +1059,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -1521,8 +1078,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1541,14 +1096,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1807,54 +1358,54 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2124,14 +1675,11 @@ def __init__( ------- Choroplethmap """ - super(Choroplethmap, self).__init__("choroplethmap") - + super().__init__("choroplethmap") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2146,216 +1694,59 @@ def __init__( an instance of :class:`plotly.graph_objs.Choroplethmap`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("featureidkey", None) - _v = featureidkey if featureidkey is not None else _v - if _v is not None: - self["featureidkey"] = _v - _v = arg.pop("geojson", None) - _v = geojson if geojson is not None else _v - if _v is not None: - self["geojson"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("below", arg, below) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("featureidkey", arg, featureidkey) + self._init_provided("geojson", arg, geojson) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "choroplethmap" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_choroplethmapbox.py b/plotly/graph_objs/_choroplethmapbox.py index 9169bfcc15..e7a312ff51 100644 --- a/plotly/graph_objs/_choroplethmapbox.py +++ b/plotly/graph_objs/_choroplethmapbox.py @@ -1,3 +1,6 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy import warnings @@ -5,8 +8,6 @@ class Choroplethmapbox(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "choroplethmapbox" _valid_props = { @@ -61,8 +62,6 @@ class Choroplethmapbox(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -86,8 +85,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # below - # ----- @property def below(self): """ @@ -110,8 +107,6 @@ def below(self): def below(self, val): self["below"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -137,8 +132,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -148,273 +141,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - ethmapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choroplethmapbox.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - choroplethmapbox.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmapbox.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.choroplethmapbox.ColorBar @@ -425,8 +151,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -478,8 +202,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -493,7 +215,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -501,8 +223,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -522,8 +242,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # featureidkey - # ------------ @property def featureidkey(self): """ @@ -545,8 +263,6 @@ def featureidkey(self): def featureidkey(self, val): self["featureidkey"] = val - # geojson - # ------- @property def geojson(self): """ @@ -567,8 +283,6 @@ def geojson(self): def geojson(self, val): self["geojson"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -585,7 +299,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -593,8 +307,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -614,8 +326,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -625,44 +335,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.choroplethmapbox.Hoverlabel @@ -673,8 +345,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -710,7 +380,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -718,8 +388,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -739,8 +407,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -753,7 +419,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -761,8 +427,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -782,8 +446,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -796,7 +458,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -804,8 +466,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -824,8 +484,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -849,8 +507,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -872,8 +528,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -883,13 +537,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.choroplethmapbox.Legendgrouptitle @@ -900,8 +547,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -927,8 +572,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -948,8 +591,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # locations - # --------- @property def locations(self): """ @@ -961,7 +602,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -969,8 +610,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -990,8 +629,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # marker - # ------ @property def marker(self): """ @@ -1001,18 +638,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.choroplethmapbox.m - arker.Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - Returns ------- plotly.graph_objs.choroplethmapbox.Marker @@ -1023,8 +648,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1043,7 +666,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1051,8 +674,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1071,8 +692,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1093,8 +712,6 @@ def name(self): def name(self, val): self["name"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1115,8 +732,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # selected - # -------- @property def selected(self): """ @@ -1126,13 +741,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.choroplethmapbox.s - elected.Marker` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.choroplethmapbox.Selected @@ -1143,8 +751,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1167,8 +773,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1188,8 +792,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1209,8 +811,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1220,18 +820,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.choroplethmapbox.Stream @@ -1242,8 +830,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1271,8 +857,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1285,7 +869,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1293,8 +877,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1313,8 +895,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1335,8 +915,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1368,8 +946,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1379,13 +955,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.choroplethmapbox.u - nselected.Marker` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.choroplethmapbox.Unselected @@ -1396,8 +965,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1419,8 +986,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # z - # - @property def z(self): """ @@ -1431,7 +996,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1439,8 +1004,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1462,8 +1025,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1483,8 +1044,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1505,8 +1064,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -1526,8 +1083,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1546,14 +1101,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1817,54 +1368,54 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2144,14 +1695,11 @@ def __init__( ------- Choroplethmapbox """ - super(Choroplethmapbox, self).__init__("choroplethmapbox") - + super().__init__("choroplethmapbox") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2166,218 +1714,61 @@ def __init__( an instance of :class:`plotly.graph_objs.Choroplethmapbox`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("featureidkey", None) - _v = featureidkey if featureidkey is not None else _v - if _v is not None: - self["featureidkey"] = _v - _v = arg.pop("geojson", None) - _v = geojson if geojson is not None else _v - if _v is not None: - self["geojson"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("below", arg, below) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("featureidkey", arg, featureidkey) + self._init_provided("geojson", arg, geojson) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "choroplethmapbox" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False warnings.warn( diff --git a/plotly/graph_objs/_cone.py b/plotly/graph_objs/_cone.py index 1c902d7183..751b286f47 100644 --- a/plotly/graph_objs/_cone.py +++ b/plotly/graph_objs/_cone.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Cone(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "cone" _valid_props = { @@ -73,8 +74,6 @@ class Cone(_BaseTraceType): "zsrc", } - # anchor - # ------ @property def anchor(self): """ @@ -96,8 +95,6 @@ def anchor(self): def anchor(self, val): self["anchor"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -121,8 +118,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -144,8 +139,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -166,8 +159,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -189,8 +180,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -211,8 +200,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -238,8 +225,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -249,271 +234,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.cone.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.cone.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of cone.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.cone.colorbar.Titl - e` instance or dict with compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.cone.ColorBar @@ -524,8 +244,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -577,8 +295,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -592,7 +308,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -600,8 +316,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -621,8 +335,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -639,7 +351,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -647,8 +359,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -668,8 +378,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -679,44 +387,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.cone.Hoverlabel @@ -727,8 +397,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -764,7 +432,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -772,8 +440,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -793,8 +459,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -807,7 +471,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -815,8 +479,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -836,8 +498,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -850,7 +510,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -858,8 +518,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -878,8 +536,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -903,8 +559,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -926,8 +580,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -937,13 +589,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.cone.Legendgrouptitle @@ -954,8 +599,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -981,8 +624,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1002,8 +643,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lighting - # -------- @property def lighting(self): """ @@ -1013,33 +652,6 @@ def lighting(self): - A dict of string/value properties that will be passed to the Lighting constructor - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - Returns ------- plotly.graph_objs.cone.Lighting @@ -1050,8 +662,6 @@ def lighting(self): def lighting(self, val): self["lighting"] = val - # lightposition - # ------------- @property def lightposition(self): """ @@ -1061,18 +671,6 @@ def lightposition(self): - A dict of string/value properties that will be passed to the Lightposition constructor - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - Returns ------- plotly.graph_objs.cone.Lightposition @@ -1083,8 +681,6 @@ def lightposition(self): def lightposition(self, val): self["lightposition"] = val - # meta - # ---- @property def meta(self): """ @@ -1103,7 +699,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1111,8 +707,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1131,8 +725,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1153,8 +745,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1178,8 +768,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1200,8 +788,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- @property def scene(self): """ @@ -1225,8 +811,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1246,8 +830,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1267,8 +849,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1292,8 +872,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1322,8 +900,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # stream - # ------ @property def stream(self): """ @@ -1333,18 +909,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.cone.Stream @@ -1355,8 +919,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1371,7 +933,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1379,8 +941,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1399,8 +959,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # u - # - @property def u(self): """ @@ -1411,7 +969,7 @@ def u(self): Returns ------- - numpy.ndarray + NDArray """ return self["u"] @@ -1419,8 +977,6 @@ def u(self): def u(self, val): self["u"] = val - # uhoverformat - # ------------ @property def uhoverformat(self): """ @@ -1444,8 +1000,6 @@ def uhoverformat(self): def uhoverformat(self, val): self["uhoverformat"] = val - # uid - # --- @property def uid(self): """ @@ -1466,8 +1020,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1499,8 +1051,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # usrc - # ---- @property def usrc(self): """ @@ -1519,8 +1069,6 @@ def usrc(self): def usrc(self, val): self["usrc"] = val - # v - # - @property def v(self): """ @@ -1531,7 +1079,7 @@ def v(self): Returns ------- - numpy.ndarray + NDArray """ return self["v"] @@ -1539,8 +1087,6 @@ def v(self): def v(self, val): self["v"] = val - # vhoverformat - # ------------ @property def vhoverformat(self): """ @@ -1564,8 +1110,6 @@ def vhoverformat(self): def vhoverformat(self, val): self["vhoverformat"] = val - # visible - # ------- @property def visible(self): """ @@ -1587,8 +1131,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # vsrc - # ---- @property def vsrc(self): """ @@ -1607,8 +1149,6 @@ def vsrc(self): def vsrc(self, val): self["vsrc"] = val - # w - # - @property def w(self): """ @@ -1619,7 +1159,7 @@ def w(self): Returns ------- - numpy.ndarray + NDArray """ return self["w"] @@ -1627,8 +1167,6 @@ def w(self): def w(self, val): self["w"] = val - # whoverformat - # ------------ @property def whoverformat(self): """ @@ -1652,8 +1190,6 @@ def whoverformat(self): def whoverformat(self, val): self["whoverformat"] = val - # wsrc - # ---- @property def wsrc(self): """ @@ -1672,8 +1208,6 @@ def wsrc(self): def wsrc(self, val): self["wsrc"] = val - # x - # - @property def x(self): """ @@ -1685,7 +1219,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1693,8 +1227,6 @@ def x(self): def x(self, val): self["x"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1724,8 +1256,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1744,8 +1274,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1757,7 +1285,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1765,8 +1293,6 @@ def y(self): def y(self, val): self["y"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1796,8 +1322,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1816,8 +1340,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1829,7 +1351,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1837,8 +1359,6 @@ def z(self): def z(self, val): self["z"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1868,8 +1388,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1888,14 +1406,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2241,67 +1755,67 @@ def _prop_descriptions(self): def __init__( self, arg=None, - anchor=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizemode=None, - sizeref=None, - stream=None, - text=None, - textsrc=None, - u=None, - uhoverformat=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - vhoverformat=None, - visible=None, - vsrc=None, - w=None, - whoverformat=None, - wsrc=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + anchor: Any | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + u: NDArray | None = None, + uhoverformat: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + usrc: str | None = None, + v: NDArray | None = None, + vhoverformat: str | None = None, + visible: Any | None = None, + vsrc: str | None = None, + w: NDArray | None = None, + whoverformat: str | None = None, + wsrc: str | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2659,14 +2173,11 @@ def __init__( ------- Cone """ - super(Cone, self).__init__("cone") - + super().__init__("cone") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2681,268 +2192,72 @@ def __init__( an instance of :class:`plotly.graph_objs.Cone`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("anchor", None) - _v = anchor if anchor is not None else _v - if _v is not None: - self["anchor"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lighting", None) - _v = lighting if lighting is not None else _v - if _v is not None: - self["lighting"] = _v - _v = arg.pop("lightposition", None) - _v = lightposition if lightposition is not None else _v - if _v is not None: - self["lightposition"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("u", None) - _v = u if u is not None else _v - if _v is not None: - self["u"] = _v - _v = arg.pop("uhoverformat", None) - _v = uhoverformat if uhoverformat is not None else _v - if _v is not None: - self["uhoverformat"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("usrc", None) - _v = usrc if usrc is not None else _v - if _v is not None: - self["usrc"] = _v - _v = arg.pop("v", None) - _v = v if v is not None else _v - if _v is not None: - self["v"] = _v - _v = arg.pop("vhoverformat", None) - _v = vhoverformat if vhoverformat is not None else _v - if _v is not None: - self["vhoverformat"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("vsrc", None) - _v = vsrc if vsrc is not None else _v - if _v is not None: - self["vsrc"] = _v - _v = arg.pop("w", None) - _v = w if w is not None else _v - if _v is not None: - self["w"] = _v - _v = arg.pop("whoverformat", None) - _v = whoverformat if whoverformat is not None else _v - if _v is not None: - self["whoverformat"] = _v - _v = arg.pop("wsrc", None) - _v = wsrc if wsrc is not None else _v - if _v is not None: - self["wsrc"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("anchor", arg, anchor) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lighting", arg, lighting) + self._init_provided("lightposition", arg, lightposition) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("u", arg, u) + self._init_provided("uhoverformat", arg, uhoverformat) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("usrc", arg, usrc) + self._init_provided("v", arg, v) + self._init_provided("vhoverformat", arg, vhoverformat) + self._init_provided("visible", arg, visible) + self._init_provided("vsrc", arg, vsrc) + self._init_provided("w", arg, w) + self._init_provided("whoverformat", arg, whoverformat) + self._init_provided("wsrc", arg, wsrc) + self._init_provided("x", arg, x) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "cone" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_contour.py b/plotly/graph_objs/_contour.py index 889a1aa7dc..438e221793 100644 --- a/plotly/graph_objs/_contour.py +++ b/plotly/graph_objs/_contour.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Contour(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "contour" _valid_props = { @@ -85,8 +86,6 @@ class Contour(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -110,8 +109,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # autocontour - # ----------- @property def autocontour(self): """ @@ -133,8 +130,6 @@ def autocontour(self): def autocontour(self, val): self["autocontour"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -160,8 +155,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -171,272 +164,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contour.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of contour.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contour.colorbar.T - itle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.contour.ColorBar @@ -447,8 +174,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -500,8 +225,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -522,8 +245,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # contours - # -------- @property def contours(self): """ @@ -533,72 +254,6 @@ def contours(self): - A dict of string/value properties that will be passed to the Contours constructor - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - Returns ------- plotly.graph_objs.contour.Contours @@ -609,8 +264,6 @@ def contours(self): def contours(self, val): self["contours"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -624,7 +277,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -632,8 +285,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -653,8 +304,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -673,8 +322,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -693,8 +340,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -707,42 +352,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to contour.colorscale @@ -756,8 +366,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -774,7 +382,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -782,8 +390,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -803,8 +409,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -814,44 +418,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.contour.Hoverlabel @@ -862,8 +428,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoverongaps - # ----------- @property def hoverongaps(self): """ @@ -883,8 +447,6 @@ def hoverongaps(self): def hoverongaps(self, val): self["hoverongaps"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -919,7 +481,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -927,8 +489,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -948,8 +508,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -960,7 +518,7 @@ def hovertext(self): Returns ------- - numpy.ndarray + NDArray """ return self["hovertext"] @@ -968,8 +526,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -989,8 +545,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -1003,7 +557,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -1011,8 +565,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -1031,8 +583,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -1056,8 +606,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -1079,8 +627,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1090,13 +636,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.contour.Legendgrouptitle @@ -1107,8 +646,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1134,8 +671,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1155,8 +690,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -1166,26 +699,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". - Returns ------- plotly.graph_objs.contour.Line @@ -1196,8 +709,6 @@ def line(self): def line(self, val): self["line"] = val - # meta - # ---- @property def meta(self): """ @@ -1216,7 +727,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1224,8 +735,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1244,8 +753,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1266,8 +773,6 @@ def name(self): def name(self, val): self["name"] = val - # ncontours - # --------- @property def ncontours(self): """ @@ -1290,8 +795,6 @@ def ncontours(self): def ncontours(self, val): self["ncontours"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1310,8 +813,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1332,8 +833,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1353,8 +852,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1374,8 +871,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1385,18 +880,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.contour.Stream @@ -1407,8 +890,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1419,7 +900,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1427,8 +908,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1441,52 +920,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contour.Textfont @@ -1497,8 +930,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1517,8 +948,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1552,8 +981,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # transpose - # --------- @property def transpose(self): """ @@ -1572,8 +999,6 @@ def transpose(self): def transpose(self, val): self["transpose"] = val - # uid - # --- @property def uid(self): """ @@ -1594,8 +1019,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1627,8 +1050,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1650,8 +1071,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1662,7 +1081,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1670,8 +1089,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1691,8 +1108,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1716,8 +1131,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1740,8 +1153,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1771,8 +1182,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1793,8 +1202,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1816,8 +1223,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1838,8 +1243,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1858,8 +1261,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # xtype - # ----- @property def xtype(self): """ @@ -1882,8 +1283,6 @@ def xtype(self): def xtype(self, val): self["xtype"] = val - # y - # - @property def y(self): """ @@ -1894,7 +1293,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1902,8 +1301,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -1923,8 +1320,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1948,8 +1343,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1972,8 +1365,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -2003,8 +1394,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -2025,8 +1414,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -2048,8 +1435,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -2070,8 +1455,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2090,8 +1473,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # ytype - # ----- @property def ytype(self): """ @@ -2114,8 +1495,6 @@ def ytype(self): def ytype(self, val): self["ytype"] = val - # z - # - @property def z(self): """ @@ -2126,7 +1505,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -2134,8 +1513,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -2157,8 +1534,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -2182,8 +1557,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zmax - # ---- @property def zmax(self): """ @@ -2203,8 +1576,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -2225,8 +1596,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -2246,8 +1615,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2268,8 +1635,6 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -2288,14 +1653,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2682,79 +2043,79 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - autocontour=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textfont=None, - textsrc=None, - texttemplate=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsrc=None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoverongaps: bool | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + xtype: Any | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + ytype: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -3156,14 +2517,11 @@ def __init__( ------- Contour """ - super(Contour, self).__init__("contour") - + super().__init__("contour") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3178,316 +2536,84 @@ def __init__( an instance of :class:`plotly.graph_objs.Contour`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("autocontour", None) - _v = autocontour if autocontour is not None else _v - if _v is not None: - self["autocontour"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("contours", None) - _v = contours if contours is not None else _v - if _v is not None: - self["contours"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoverongaps", None) - _v = hoverongaps if hoverongaps is not None else _v - if _v is not None: - self["hoverongaps"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("ncontours", None) - _v = ncontours if ncontours is not None else _v - if _v is not None: - self["ncontours"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("transpose", None) - _v = transpose if transpose is not None else _v - if _v is not None: - self["transpose"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("xtype", None) - _v = xtype if xtype is not None else _v - if _v is not None: - self["xtype"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("ytype", None) - _v = ytype if ytype is not None else _v - if _v is not None: - self["ytype"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("autocontour", arg, autocontour) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("contours", arg, contours) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoverongaps", arg, hoverongaps) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("ncontours", arg, ncontours) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("transpose", arg, transpose) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("xtype", arg, xtype) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("ytype", arg, ytype) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zorder", arg, zorder) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "contour" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_contourcarpet.py b/plotly/graph_objs/_contourcarpet.py index 02dd7d6040..5c866f50cd 100644 --- a/plotly/graph_objs/_contourcarpet.py +++ b/plotly/graph_objs/_contourcarpet.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Contourcarpet(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "contourcarpet" _valid_props = { @@ -66,8 +67,6 @@ class Contourcarpet(_BaseTraceType): "zsrc", } - # a - # - @property def a(self): """ @@ -78,7 +77,7 @@ def a(self): Returns ------- - numpy.ndarray + NDArray """ return self["a"] @@ -86,8 +85,6 @@ def a(self): def a(self, val): self["a"] = val - # a0 - # -- @property def a0(self): """ @@ -107,8 +104,6 @@ def a0(self): def a0(self, val): self["a0"] = val - # asrc - # ---- @property def asrc(self): """ @@ -127,8 +122,6 @@ def asrc(self): def asrc(self, val): self["asrc"] = val - # atype - # ----- @property def atype(self): """ @@ -151,8 +144,6 @@ def atype(self): def atype(self, val): self["atype"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -176,8 +167,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # autocontour - # ----------- @property def autocontour(self): """ @@ -199,8 +188,6 @@ def autocontour(self): def autocontour(self, val): self["autocontour"] = val - # b - # - @property def b(self): """ @@ -211,7 +198,7 @@ def b(self): Returns ------- - numpy.ndarray + NDArray """ return self["b"] @@ -219,8 +206,6 @@ def b(self): def b(self, val): self["b"] = val - # b0 - # -- @property def b0(self): """ @@ -240,8 +225,6 @@ def b0(self): def b0(self, val): self["b0"] = val - # bsrc - # ---- @property def bsrc(self): """ @@ -260,8 +243,6 @@ def bsrc(self): def bsrc(self, val): self["bsrc"] = val - # btype - # ----- @property def btype(self): """ @@ -284,8 +265,6 @@ def btype(self): def btype(self, val): self["btype"] = val - # carpet - # ------ @property def carpet(self): """ @@ -306,8 +285,6 @@ def carpet(self): def carpet(self, val): self["carpet"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -333,8 +310,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -344,273 +319,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - carpet.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contourcarpet.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - contourcarpet.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contourcarpet.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.contourcarpet.ColorBar @@ -621,8 +329,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -674,8 +380,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contours - # -------- @property def contours(self): """ @@ -685,70 +389,6 @@ def contours(self): - A dict of string/value properties that will be passed to the Contours constructor - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "lines", - coloring is done on the contour lines. If - "none", no coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - Returns ------- plotly.graph_objs.contourcarpet.Contours @@ -759,8 +399,6 @@ def contours(self): def contours(self, val): self["contours"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -774,7 +412,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -782,8 +420,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -803,8 +439,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # da - # -- @property def da(self): """ @@ -823,8 +457,6 @@ def da(self): def da(self, val): self["da"] = val - # db - # -- @property def db(self): """ @@ -843,8 +475,6 @@ def db(self): def db(self, val): self["db"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -857,42 +487,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to contourcarpet.colorscale @@ -906,8 +501,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -918,7 +511,7 @@ def hovertext(self): Returns ------- - numpy.ndarray + NDArray """ return self["hovertext"] @@ -926,8 +519,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -947,8 +538,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -961,7 +550,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -969,8 +558,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -989,8 +576,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -1014,8 +599,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -1037,8 +620,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1048,13 +629,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.contourcarpet.Legendgrouptitle @@ -1065,8 +639,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1092,8 +664,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1113,8 +683,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -1124,26 +692,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". - Returns ------- plotly.graph_objs.contourcarpet.Line @@ -1154,8 +702,6 @@ def line(self): def line(self, val): self["line"] = val - # meta - # ---- @property def meta(self): """ @@ -1174,7 +720,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1182,8 +728,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1202,8 +746,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1224,8 +766,6 @@ def name(self): def name(self, val): self["name"] = val - # ncontours - # --------- @property def ncontours(self): """ @@ -1248,8 +788,6 @@ def ncontours(self): def ncontours(self, val): self["ncontours"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1268,8 +806,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1290,8 +826,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1311,8 +845,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1332,8 +864,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1343,18 +873,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.contourcarpet.Stream @@ -1365,8 +883,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1377,7 +893,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1385,8 +901,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1405,8 +919,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # transpose - # --------- @property def transpose(self): """ @@ -1425,8 +937,6 @@ def transpose(self): def transpose(self, val): self["transpose"] = val - # uid - # --- @property def uid(self): """ @@ -1447,8 +957,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1480,8 +988,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1503,8 +1009,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1528,8 +1032,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1553,8 +1055,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # z - # - @property def z(self): """ @@ -1565,7 +1065,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1573,8 +1073,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1596,8 +1094,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1617,8 +1113,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1639,8 +1133,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -1660,8 +1152,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zorder - # ------ @property def zorder(self): """ @@ -1682,8 +1172,6 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1702,14 +1190,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1959,60 +1443,60 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - a0=None, - asrc=None, - atype=None, - autocolorscale=None, - autocontour=None, - b=None, - b0=None, - bsrc=None, - btype=None, - carpet=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - fillcolor=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - xaxis=None, - yaxis=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsrc=None, + a: NDArray | None = None, + a0: Any | None = None, + asrc: str | None = None, + atype: Any | None = None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + b: NDArray | None = None, + b0: Any | None = None, + bsrc: str | None = None, + btype: Any | None = None, + carpet: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + da: int | float | None = None, + db: int | float | None = None, + fillcolor: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textsrc: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + xaxis: str | None = None, + yaxis: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2273,14 +1757,11 @@ def __init__( ------- Contourcarpet """ - super(Contourcarpet, self).__init__("contourcarpet") - + super().__init__("contourcarpet") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2295,240 +1776,65 @@ def __init__( an instance of :class:`plotly.graph_objs.Contourcarpet`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - _v = a if a is not None else _v - if _v is not None: - self["a"] = _v - _v = arg.pop("a0", None) - _v = a0 if a0 is not None else _v - if _v is not None: - self["a0"] = _v - _v = arg.pop("asrc", None) - _v = asrc if asrc is not None else _v - if _v is not None: - self["asrc"] = _v - _v = arg.pop("atype", None) - _v = atype if atype is not None else _v - if _v is not None: - self["atype"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("autocontour", None) - _v = autocontour if autocontour is not None else _v - if _v is not None: - self["autocontour"] = _v - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("b0", None) - _v = b0 if b0 is not None else _v - if _v is not None: - self["b0"] = _v - _v = arg.pop("bsrc", None) - _v = bsrc if bsrc is not None else _v - if _v is not None: - self["bsrc"] = _v - _v = arg.pop("btype", None) - _v = btype if btype is not None else _v - if _v is not None: - self["btype"] = _v - _v = arg.pop("carpet", None) - _v = carpet if carpet is not None else _v - if _v is not None: - self["carpet"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("contours", None) - _v = contours if contours is not None else _v - if _v is not None: - self["contours"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("da", None) - _v = da if da is not None else _v - if _v is not None: - self["da"] = _v - _v = arg.pop("db", None) - _v = db if db is not None else _v - if _v is not None: - self["db"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("ncontours", None) - _v = ncontours if ncontours is not None else _v - if _v is not None: - self["ncontours"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("transpose", None) - _v = transpose if transpose is not None else _v - if _v is not None: - self["transpose"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("a", arg, a) + self._init_provided("a0", arg, a0) + self._init_provided("asrc", arg, asrc) + self._init_provided("atype", arg, atype) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("autocontour", arg, autocontour) + self._init_provided("b", arg, b) + self._init_provided("b0", arg, b0) + self._init_provided("bsrc", arg, bsrc) + self._init_provided("btype", arg, btype) + self._init_provided("carpet", arg, carpet) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("contours", arg, contours) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("da", arg, da) + self._init_provided("db", arg, db) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("ncontours", arg, ncontours) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("transpose", arg, transpose) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zorder", arg, zorder) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "contourcarpet" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_densitymap.py b/plotly/graph_objs/_densitymap.py index 5fc0b4bd1d..41932b6cd3 100644 --- a/plotly/graph_objs/_densitymap.py +++ b/plotly/graph_objs/_densitymap.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Densitymap(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "densitymap" _valid_props = { @@ -59,8 +60,6 @@ class Densitymap(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -84,8 +83,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # below - # ----- @property def below(self): """ @@ -108,8 +105,6 @@ def below(self): def below(self, val): self["below"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -135,8 +130,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -146,272 +139,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.density - map.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.densitymap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of densitymap.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymap.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.densitymap.ColorBar @@ -422,8 +149,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -475,8 +200,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -490,7 +213,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -498,8 +221,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -519,8 +240,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -537,7 +256,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -545,8 +264,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -566,8 +283,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -577,44 +292,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.densitymap.Hoverlabel @@ -625,8 +302,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -661,7 +336,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -669,8 +344,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -690,8 +363,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -708,7 +379,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -716,8 +387,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -737,8 +406,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -751,7 +418,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -759,8 +426,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -779,8 +444,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- @property def lat(self): """ @@ -791,7 +454,7 @@ def lat(self): Returns ------- - numpy.ndarray + NDArray """ return self["lat"] @@ -799,8 +462,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # latsrc - # ------ @property def latsrc(self): """ @@ -819,8 +480,6 @@ def latsrc(self): def latsrc(self, val): self["latsrc"] = val - # legend - # ------ @property def legend(self): """ @@ -844,8 +503,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -867,8 +524,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -878,13 +533,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.densitymap.Legendgrouptitle @@ -895,8 +543,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -922,8 +568,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -943,8 +587,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lon - # --- @property def lon(self): """ @@ -955,7 +597,7 @@ def lon(self): Returns ------- - numpy.ndarray + NDArray """ return self["lon"] @@ -963,8 +605,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # lonsrc - # ------ @property def lonsrc(self): """ @@ -983,8 +623,6 @@ def lonsrc(self): def lonsrc(self, val): self["lonsrc"] = val - # meta - # ---- @property def meta(self): """ @@ -1003,7 +641,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1011,8 +649,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1031,8 +667,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1053,8 +687,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1073,8 +705,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # radius - # ------ @property def radius(self): """ @@ -1088,7 +718,7 @@ def radius(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["radius"] @@ -1096,8 +726,6 @@ def radius(self): def radius(self, val): self["radius"] = val - # radiussrc - # --------- @property def radiussrc(self): """ @@ -1116,8 +744,6 @@ def radiussrc(self): def radiussrc(self, val): self["radiussrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1138,8 +764,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1159,8 +783,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1180,8 +802,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1191,18 +811,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.densitymap.Stream @@ -1213,8 +821,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1238,8 +844,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1257,7 +861,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1265,8 +869,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1285,8 +887,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1307,8 +907,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1340,8 +938,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1363,8 +959,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # z - # - @property def z(self): """ @@ -1376,7 +970,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1384,8 +978,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1407,8 +999,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1428,8 +1018,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1450,8 +1038,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -1471,8 +1057,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1491,14 +1075,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1755,53 +1335,53 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + radius: int | float | None = None, + radiussrc: str | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2069,14 +1649,11 @@ def __init__( ------- Densitymap """ - super(Densitymap, self).__init__("densitymap") - + super().__init__("densitymap") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2091,212 +1668,58 @@ def __init__( an instance of :class:`plotly.graph_objs.Densitymap`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("latsrc", None) - _v = latsrc if latsrc is not None else _v - if _v is not None: - self["latsrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - _v = arg.pop("lonsrc", None) - _v = lonsrc if lonsrc is not None else _v - if _v is not None: - self["lonsrc"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("radius", None) - _v = radius if radius is not None else _v - if _v is not None: - self["radius"] = _v - _v = arg.pop("radiussrc", None) - _v = radiussrc if radiussrc is not None else _v - if _v is not None: - self["radiussrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("below", arg, below) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("lat", arg, lat) + self._init_provided("latsrc", arg, latsrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lon", arg, lon) + self._init_provided("lonsrc", arg, lonsrc) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("radius", arg, radius) + self._init_provided("radiussrc", arg, radiussrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "densitymap" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_densitymapbox.py b/plotly/graph_objs/_densitymapbox.py index 3623258306..7acf5b5b9c 100644 --- a/plotly/graph_objs/_densitymapbox.py +++ b/plotly/graph_objs/_densitymapbox.py @@ -1,3 +1,6 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy import warnings @@ -5,8 +8,6 @@ class Densitymapbox(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "densitymapbox" _valid_props = { @@ -60,8 +61,6 @@ class Densitymapbox(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -85,8 +84,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # below - # ----- @property def below(self): """ @@ -109,8 +106,6 @@ def below(self): def below(self, val): self["below"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -136,8 +131,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -147,273 +140,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.density - mapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.densitymapbox.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - densitymapbox.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymapbox.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.densitymapbox.ColorBar @@ -424,8 +150,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -477,8 +201,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -492,7 +214,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -500,8 +222,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -521,8 +241,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -539,7 +257,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -547,8 +265,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -568,8 +284,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -579,44 +293,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.densitymapbox.Hoverlabel @@ -627,8 +303,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -663,7 +337,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -671,8 +345,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -692,8 +364,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -710,7 +380,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -718,8 +388,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -739,8 +407,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -753,7 +419,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -761,8 +427,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -781,8 +445,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- @property def lat(self): """ @@ -793,7 +455,7 @@ def lat(self): Returns ------- - numpy.ndarray + NDArray """ return self["lat"] @@ -801,8 +463,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # latsrc - # ------ @property def latsrc(self): """ @@ -821,8 +481,6 @@ def latsrc(self): def latsrc(self, val): self["latsrc"] = val - # legend - # ------ @property def legend(self): """ @@ -846,8 +504,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -869,8 +525,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -880,13 +534,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.densitymapbox.Legendgrouptitle @@ -897,8 +544,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -924,8 +569,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -945,8 +588,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lon - # --- @property def lon(self): """ @@ -957,7 +598,7 @@ def lon(self): Returns ------- - numpy.ndarray + NDArray """ return self["lon"] @@ -965,8 +606,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # lonsrc - # ------ @property def lonsrc(self): """ @@ -985,8 +624,6 @@ def lonsrc(self): def lonsrc(self, val): self["lonsrc"] = val - # meta - # ---- @property def meta(self): """ @@ -1005,7 +642,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1013,8 +650,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1033,8 +668,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1055,8 +688,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1075,8 +706,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # radius - # ------ @property def radius(self): """ @@ -1090,7 +719,7 @@ def radius(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["radius"] @@ -1098,8 +727,6 @@ def radius(self): def radius(self, val): self["radius"] = val - # radiussrc - # --------- @property def radiussrc(self): """ @@ -1118,8 +745,6 @@ def radiussrc(self): def radiussrc(self, val): self["radiussrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1140,8 +765,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1161,8 +784,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1182,8 +803,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1193,18 +812,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.densitymapbox.Stream @@ -1215,8 +822,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1244,8 +849,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1263,7 +866,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1271,8 +874,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1291,8 +892,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1313,8 +912,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1346,8 +943,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1369,8 +964,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # z - # - @property def z(self): """ @@ -1382,7 +975,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1390,8 +983,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1413,8 +1004,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1434,8 +1023,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1456,8 +1043,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -1477,8 +1062,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1497,14 +1080,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1766,53 +1345,53 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + radius: int | float | None = None, + radiussrc: str | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2089,14 +1668,11 @@ def __init__( ------- Densitymapbox """ - super(Densitymapbox, self).__init__("densitymapbox") - + super().__init__("densitymapbox") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2111,214 +1687,60 @@ def __init__( an instance of :class:`plotly.graph_objs.Densitymapbox`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("latsrc", None) - _v = latsrc if latsrc is not None else _v - if _v is not None: - self["latsrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - _v = arg.pop("lonsrc", None) - _v = lonsrc if lonsrc is not None else _v - if _v is not None: - self["lonsrc"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("radius", None) - _v = radius if radius is not None else _v - if _v is not None: - self["radius"] = _v - _v = arg.pop("radiussrc", None) - _v = radiussrc if radiussrc is not None else _v - if _v is not None: - self["radiussrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("below", arg, below) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("lat", arg, lat) + self._init_provided("latsrc", arg, latsrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lon", arg, lon) + self._init_provided("lonsrc", arg, lonsrc) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("radius", arg, radius) + self._init_provided("radiussrc", arg, radiussrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "densitymapbox" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False warnings.warn( diff --git a/plotly/graph_objs/_deprecations.py b/plotly/graph_objs/_deprecations.py index d8caedcb79..aa08325deb 100644 --- a/plotly/graph_objs/_deprecations.py +++ b/plotly/graph_objs/_deprecations.py @@ -39,7 +39,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Data, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Annotations(list): @@ -67,7 +67,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Annotations, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Frames(list): @@ -92,7 +92,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Frames, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class AngularAxis(dict): @@ -120,7 +120,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(AngularAxis, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Annotation(dict): @@ -148,7 +148,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Annotation, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class ColorBar(dict): @@ -179,7 +179,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(ColorBar, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Contours(dict): @@ -210,7 +210,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Contours, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class ErrorX(dict): @@ -241,7 +241,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(ErrorX, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class ErrorY(dict): @@ -272,7 +272,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(ErrorY, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class ErrorZ(dict): @@ -297,7 +297,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(ErrorZ, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Font(dict): @@ -328,7 +328,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Font, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Legend(dict): @@ -353,7 +353,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Legend, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Line(dict): @@ -384,7 +384,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Line, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Margin(dict): @@ -409,7 +409,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Margin, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Marker(dict): @@ -440,7 +440,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Marker, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class RadialAxis(dict): @@ -468,7 +468,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(RadialAxis, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Scene(dict): @@ -493,7 +493,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Scene, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Stream(dict): @@ -521,7 +521,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Stream, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class XAxis(dict): @@ -549,7 +549,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(XAxis, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class YAxis(dict): @@ -577,7 +577,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(YAxis, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class ZAxis(dict): @@ -602,7 +602,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(ZAxis, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class XBins(dict): @@ -630,7 +630,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(XBins, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class YBins(dict): @@ -658,7 +658,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(YBins, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Trace(dict): @@ -695,7 +695,7 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Trace, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class Histogram2dcontour(dict): @@ -720,4 +720,4 @@ def __init__(self, *args, **kwargs): """, DeprecationWarning, ) - super(Histogram2dcontour, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) diff --git a/plotly/graph_objs/_figure.py b/plotly/graph_objs/_figure.py index 4dd8e88548..78a8d3fab6 100644 --- a/plotly/graph_objs/_figure.py +++ b/plotly/graph_objs/_figure.py @@ -1,9 +1,13 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseFigure class Figure(BaseFigure): + def __init__( - self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs + self, data=None, layout=None, frames=None, skip_invalid: bool = False, **kwargs ): """ Create a new :class:Figure instance @@ -48,552 +52,6 @@ def __init__( - A dict of string/value properties that will be passed to the Layout constructor - Supported dict properties: - - activeselection - :class:`plotly.graph_objects.layout.Activeselec - tion` instance or dict with compatible - properties - activeshape - :class:`plotly.graph_objects.layout.Activeshape - ` instance or dict with compatible properties - annotations - A tuple of - :class:`plotly.graph_objects.layout.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), - sets the default property values to use for - elements of layout.annotations - autosize - Determines whether or not a layout width or - height that has been left undefined by the user - is initialized on each relayout. Note that, - regardless of this attribute, an undefined - layout width or height is always initialized on - the first call to plot. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. This is the default value; - however it could be overridden for individual - axes. - barcornerradius - Sets the rounding of bar corners. May be an - integer number of pixels, or a percentage of - bar width (as a string ending in %). - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "relative", the bars are stacked - on top of one another, with negative values - below the axis, positive values above With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to reduce "opacity" to - see multiple bars. - barnorm - Sets the normalization for bar traces on the - graph. With "fraction", the value of each bar - is divided by the sum of all values at that - location coordinate. "percent" is the same but - multiplied by 100 to show percentages. - boxgap - Sets the gap (in plot fraction) between boxes - of adjacent location coordinates. Has no effect - on traces that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes - of the same location coordinate. Has no effect - on traces that have "width" set. - boxmode - Determines how boxes at the same location - coordinate are displayed on the graph. If - "group", the boxes are plotted next to one - another centered around the shared location. If - "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see - them multiple boxes. Has no effect on traces - that have "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout - the plot. - clickmode - Determines the mode of single click - interactions. "event" is the default value and - emits the `plotly_click` event. In addition - this mode emits the `plotly_selected` event in - drag modes "lasso" and "select", but with no - event data attached (kept for compatibility - reasons). The "select" flag enables selecting - single data points via click. This mode also - supports persistent selections, meaning that - pressing Shift while clicking, adds to / - subtracts from an existing selection. "select" - with `hovermode`: "x" can be confusing, - consider explicitly setting `hovermode`: - "closest" when using this feature. Selection - events are sent accordingly as long as "event" - flag is set as well. When the "event" flag is - missing, `plotly_click` and `plotly_selected` - events are not fired. - coloraxis - :class:`plotly.graph_objects.layout.Coloraxis` - instance or dict with compatible properties - colorscale - :class:`plotly.graph_objects.layout.Colorscale` - instance or dict with compatible properties - colorway - Sets the default trace colors. - computed - Placeholder for exporting automargin-impacting - values namely `margin.t`, `margin.b`, - `margin.l` and `margin.r` in "full-json" mode. - datarevision - If provided, a changed value tells - `Plotly.react` that one or more data arrays has - changed. This way you can modify arrays in- - place rather than making a complete new copy - for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are - being treated as immutable, thus any data array - with a different identity from its predecessor - contains new data. - dragmode - Determines the mode of drag interactions. - "select" and "lasso" apply only to scatter - traces with markers or text. "orbit" and - "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than - trace names and axis titles. Defaults to - `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether - given by `funnelareacolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendiciclecolors - If `true`, the icicle slice colors (whether - given by `iciclecolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendpiecolors - If `true`, the pie slice colors (whether given - by `piecolorway` or inherited from `colorway`) - will be extended to three times its original - length by first repeating every color 20% - lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether - given by `sunburstcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendtreemapcolors - If `true`, the treemap slice colors (whether - given by `treemapcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - font - Sets the global font. Note that fonts used in - traces and other layout components inherit from - the global font. - funnelareacolorway - Sets the default funnelarea slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - funnelmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "group", the bars are plotted next - to one another centered around the shared - location. With "overlay", the bars are plotted - over one another, you might need to reduce - "opacity" to see multiple bars. - geo - :class:`plotly.graph_objects.layout.Geo` - instance or dict with compatible properties - grid - :class:`plotly.graph_objects.layout.Grid` - instance or dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart - analog of visible:'legendonly' but it can - contain many labels, and can simultaneously - hide slices from several pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on Chart Studio Cloud - for `hiddenlabels`. - hidesources - Determines whether or not a text link citing - the data source is placed at the bottom-right - cored of the figure. Has only an effect only on - graphs that have been generated via forked - graphs from the Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise). - hoverdistance - Sets the default distance (in pixels) to look - for data to add hover labels (-1 means no - cutoff, 0 means no looking for data). This is - only a real distance for hovering on point-like - objects, like scatter points. For area-like - objects (bars, scatter fills, etc) hovering is - on inside the area and off outside, but these - objects will not supersede hover on point-like - objects in case of conflict. - hoverlabel - :class:`plotly.graph_objects.layout.Hoverlabel` - instance or dict with compatible properties - hovermode - Determines the mode of hover interactions. If - "closest", a single hoverlabel will appear for - the "closest" point within the `hoverdistance`. - If "x" (or "y"), multiple hoverlabels will - appear for multiple points at the "closest" x- - (or y-) coordinate within the `hoverdistance`, - with the caveat that no more than one - hoverlabel will appear per trace. If *x - unified* (or *y unified*), a single hoverlabel - will appear multiple points at the closest x- - (or y-) coordinate within the `hoverdistance` - with the caveat that no more than one - hoverlabel will appear per trace. In this mode, - spikelines are enabled by default perpendicular - to the specified axis. If false, hover - interactions are disabled. - hoversubplots - Determines expansion of hover effects to other - subplots If "single" just the axis pair of the - primary point is included without overlaying - subplots. If "overlaying" all subplots using - the main axis and occupying the same space are - included. If "axis", also include stacked - subplots using the same axis when `hovermode` - is set to "x", *x unified*, "y" or *y unified*. - iciclecolorway - Sets the default icicle slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendiciclecolors`. - images - A tuple of - :class:`plotly.graph_objects.layout.Image` - instances or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the - default property values to use for elements of - layout.images - legend - :class:`plotly.graph_objects.layout.Legend` - instance or dict with compatible properties - map - :class:`plotly.graph_objects.layout.Map` - instance or dict with compatible properties - mapbox - :class:`plotly.graph_objects.layout.Mapbox` - instance or dict with compatible properties - margin - :class:`plotly.graph_objects.layout.Margin` - instance or dict with compatible properties - meta - Assigns extra meta information that can be used - in various `text` attributes. Attributes such - as the graph, axis and colorbar `title.text`, - annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenus` and `sliders` - `label` text all support `meta`. One can access - `meta` fields using template strings: - `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an - object for example `{key: value}` which can be - accessed %{meta[key]}. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - minreducedheight - Minimum height of the plot with - margin.automargin applied (in px) - minreducedwidth - Minimum width of the plot with - margin.automargin applied (in px) - modebar - :class:`plotly.graph_objects.layout.Modebar` - instance or dict with compatible properties - newselection - :class:`plotly.graph_objects.layout.Newselectio - n` instance or dict with compatible properties - newshape - :class:`plotly.graph_objects.layout.Newshape` - instance or dict with compatible properties - paper_bgcolor - Sets the background color of the paper where - the graph is drawn. - piecolorway - Sets the default pie slice colors. Defaults to - the main `colorway` used for trace colors. If - you specify a new list here it can still be - extended with lighter and darker colors, see - `extendpiecolors`. - plot_bgcolor - Sets the background color of the plotting area - in-between x and y axes. - polar - :class:`plotly.graph_objects.layout.Polar` - instance or dict with compatible properties - scattergap - Sets the gap (in plot fraction) between scatter - points of adjacent location coordinates. - Defaults to `bargap`. - scattermode - Determines how scatter points at the same - location coordinate are displayed on the graph. - With "group", the scatter points are plotted - next to one another centered around the shared - location. With "overlay", the scatter points - are plotted over one another, you might need to - reduce "opacity" to see multiple scatter - points. - scene - :class:`plotly.graph_objects.layout.Scene` - instance or dict with compatible properties - selectdirection - When `dragmode` is set to "select", this limits - the selection of the drag to horizontal, - vertical or diagonal. "h" only allows - horizontal selection, "v" only vertical, "d" - only diagonal and "any" sets no limit. - selectionrevision - Controls persistence of user-driven changes in - selected points from all traces. - selections - A tuple of - :class:`plotly.graph_objects.layout.Selection` - instances or dicts with compatible properties - selectiondefaults - When used in a template (as - layout.template.layout.selectiondefaults), sets - the default property values to use for elements - of layout.selections - separators - Sets the decimal and thousand separators. For - example, *. * puts a '.' before decimals and a - space between thousands. In English locales, - dflt is ".," but other locales may alter this - default. - shapes - A tuple of - :class:`plotly.graph_objects.layout.Shape` - instances or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the - default property values to use for elements of - layout.shapes - showlegend - Determines whether or not a legend is drawn. - Default is `true` if there is a trace to show - and any of these: a) Two or more traces would - by default be shown in the legend. b) One pie - trace is shown in the legend. c) One trace is - explicitly given with `showlegend: true`. - sliders - A tuple of - :class:`plotly.graph_objects.layout.Slider` - instances or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets - the default property values to use for elements - of layout.sliders - smith - :class:`plotly.graph_objects.layout.Smith` - instance or dict with compatible properties - spikedistance - Sets the default distance (in pixels) to look - for data to draw spikelines to (-1 means no - cutoff, 0 means no looking for data). As with - hoverdistance, distance does not apply to area- - like objects. In addition, some objects can be - hovered on but will not generate spikelines, - such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. - This should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: - [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the - structure of `figure.layout` and - `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` - (e.g. 'scatter'). Alternatively, this may be - specified as an instance of - plotly.graph_objs.layout.Template. Trace - templates are applied cyclically to traces of - each type. Container arrays (eg `annotations`) - have special handling: An object ending in - `defaults` (eg `annotationdefaults`) is applied - to each array item. But if an item has a - `templateitemname` key we look in the template - array for an item with matching `name` and - apply that instead. If no matching `name` is - found we mark the item invisible. Any named - template item not referenced is appended to the - end of the array, so this can be used to add a - watermark annotation or a logo image, for - example. To omit one of these items on the - plot, make an item with matching - `templateitemname` and `visible: false`. - ternary - :class:`plotly.graph_objects.layout.Ternary` - instance or dict with compatible properties - title - :class:`plotly.graph_objects.layout.Title` - instance or dict with compatible properties - transition - Sets transition options used during - Plotly.react updates. - treemapcolorway - Sets the default treemap slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendtreemapcolors`. - uirevision - Used to allow user interactions with the plot - to persist after `Plotly.react` calls that are - unaware of these interactions. If `uirevision` - is omitted, or if it is given and it changed - from the previous `Plotly.react` call, the - exact new figure is used. If `uirevision` is - truthy and did NOT change, any attribute that - has been affected by user interactions and did - not receive a different value in the new figure - will keep the interaction value. - `layout.uirevision` attribute serves as the - default for `uirevision` attributes in various - sub-containers. For finer control you can set - these sub-attributes directly. For example, if - your app separately controls the data on the x - and y axes you might set - `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y - data is changed, you can update - `yaxis.uirevision=*quantity*` and the y axis - range will reset but the x axis range will - retain any user-driven zoom. - uniformtext - :class:`plotly.graph_objects.layout.Uniformtext - ` instance or dict with compatible properties - updatemenus - A tuple of - :class:`plotly.graph_objects.layout.Updatemenu` - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), - sets the default property values to use for - elements of layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins - of adjacent location coordinates. Has no effect - on traces that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins - of the same location coordinate. Has no effect - on traces that have "width" set. - violinmode - Determines how violins at the same location - coordinate are displayed on the graph. If - "group", the violins are plotted next to one - another centered around the shared location. If - "overlay", the violins are plotted over one - another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces - that have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - waterfallmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to reduce "opacity" to - see multiple bars. - width - Sets the plot's width (in px). - xaxis - :class:`plotly.graph_objects.layout.XAxis` - instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.YAxis` - instance or dict with compatible properties - frames The 'frames' property is a tuple of instances of Frame that may be specified as: @@ -601,32 +59,6 @@ def __init__( - A list or tuple of dicts of string/value properties that will be passed to the Frame constructor - Supported dict properties: - - baseframe - The name of the frame into which this frame's - properties are merged before applying. This is - used to unify properties and avoid needing to - specify the same values for the same properties - in multiple frames. - data - A list of traces this frame modifies. The - format is identical to the normal trace - definition. - group - An identifier that specifies the group to which - the frame belongs, used by animate to select a - subset of frames. - layout - Layout properties which this frame modifies. - The format is identical to the normal layout - definition. - name - A label by which to identify the frame - traces - A list of trace indices that identify the - respective traces in the data attribute - skip_invalid: bool If True, invalid properties in the figure specification will be skipped silently. If False (default) invalid properties in the @@ -638,7 +70,7 @@ def __init__( if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False """ - super(Figure, self).__init__(data, layout, frames, skip_invalid, **kwargs) + super().__init__(data, layout, frames, skip_invalid, **kwargs) def update(self, dict1=None, overwrite=False, **kwargs) -> "Figure": """ @@ -689,7 +121,7 @@ def update(self, dict1=None, overwrite=False, **kwargs) -> "Figure": Updated figure """ - return super(Figure, self).update(dict1, overwrite, **kwargs) + return super().update(dict1, overwrite, **kwargs) def update_traces( self, @@ -754,7 +186,7 @@ def update_traces( Returns the Figure object that the method was called on """ - return super(Figure, self).update_traces( + return super().update_traces( patch, selector, row, col, secondary_y, overwrite, **kwargs ) @@ -784,7 +216,7 @@ def update_layout(self, dict1=None, overwrite=False, **kwargs) -> "Figure": The Figure object that the update_layout method was called on """ - return super(Figure, self).update_layout(dict1, overwrite, **kwargs) + return super().update_layout(dict1, overwrite, **kwargs) def for_each_trace( self, fn, selector=None, row=None, col=None, secondary_y=None @@ -832,7 +264,7 @@ def for_each_trace( Returns the Figure object that the method was called on """ - return super(Figure, self).for_each_trace(fn, selector, row, col, secondary_y) + return super().for_each_trace(fn, selector, row, col, secondary_y) def add_trace( self, trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False @@ -909,9 +341,7 @@ def add_trace( Figure(...) """ - return super(Figure, self).add_trace( - trace, row, col, secondary_y, exclude_empty_subplots - ) + return super().add_trace(trace, row, col, secondary_y, exclude_empty_subplots) def add_traces( self, @@ -989,7 +419,7 @@ def add_traces( Figure(...) """ - return super(Figure, self).add_traces( + return super().add_traces( data, rows, cols, secondary_ys, exclude_empty_subplots ) @@ -1041,7 +471,7 @@ def add_vline( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(Figure, self).add_vline( + return super().add_vline( x, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1093,7 +523,7 @@ def add_hline( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(Figure, self).add_hline( + return super().add_hline( y, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1149,7 +579,7 @@ def add_vrect( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(Figure, self).add_vrect( + return super().add_vrect( x0, x1, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1205,7 +635,7 @@ def add_hrect( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(Figure, self).add_hrect( + return super().add_hrect( y0, y1, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1217,84 +647,84 @@ def set_subplots(self, rows=None, cols=None, **make_subplots_args) -> "Figure": plotly.subplots.make_subplots accepts. """ - return super(Figure, self).set_subplots(rows, cols, **make_subplots_args) + return super().set_subplots(rows, cols, **make_subplots_args) def add_bar( self, - alignmentgroup=None, - base=None, - basesrc=None, - cliponaxis=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + base: Any | None = None, + basesrc: str | None = None, + cliponaxis: bool | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -1790,53 +1220,53 @@ def add_bar( def add_barpolar( self, - base=None, - basesrc=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetsrc=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, + base: Any | None = None, + basesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, row=None, col=None, **kwargs, @@ -2137,92 +1567,92 @@ def add_barpolar( def add_box( self, - alignmentgroup=None, - boxmean=None, - boxpoints=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lowerfence=None, - lowerfencesrc=None, - marker=None, - mean=None, - meansrc=None, - median=None, - mediansrc=None, - meta=None, - metasrc=None, - name=None, - notched=None, - notchspan=None, - notchspansrc=None, - notchwidth=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - q1=None, - q1src=None, - q3=None, - q3src=None, - quartilemethod=None, - sd=None, - sdmultiple=None, - sdsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - showwhiskers=None, - sizemode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - upperfence=None, - upperfencesrc=None, - visible=None, - whiskerwidth=None, - width=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + boxmean: Any | None = None, + boxpoints: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + jitter: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lowerfence: NDArray | None = None, + lowerfencesrc: str | None = None, + marker: None | None = None, + mean: NDArray | None = None, + meansrc: str | None = None, + median: NDArray | None = None, + mediansrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + notched: bool | None = None, + notchspan: NDArray | None = None, + notchspansrc: str | None = None, + notchwidth: int | float | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + pointpos: int | float | None = None, + q1: NDArray | None = None, + q1src: str | None = None, + q3: NDArray | None = None, + q3src: str | None = None, + quartilemethod: Any | None = None, + sd: NDArray | None = None, + sdmultiple: int | float | None = None, + sdsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showwhiskers: bool | None = None, + sizemode: Any | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + upperfence: NDArray | None = None, + upperfencesrc: str | None = None, + visible: Any | None = None, + whiskerwidth: int | float | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -2823,55 +2253,55 @@ def add_box( def add_candlestick( self, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - whiskerwidth=None, - x=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - yaxis=None, - yhoverformat=None, - zorder=None, + close: NDArray | None = None, + closesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + high: NDArray | None = None, + highsrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + low: NDArray | None = None, + lowsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + open: NDArray | None = None, + opensrc: str | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + whiskerwidth: int | float | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -3199,43 +2629,43 @@ def add_candlestick( def add_carpet( self, - a=None, - a0=None, - aaxis=None, - asrc=None, - b=None, - b0=None, - baxis=None, - bsrc=None, - carpet=None, - cheaterslope=None, - color=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - font=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xsrc=None, - y=None, - yaxis=None, - ysrc=None, - zorder=None, + a: NDArray | None = None, + a0: int | float | None = None, + aaxis: None | None = None, + asrc: str | None = None, + b: NDArray | None = None, + b0: int | float | None = None, + baxis: None | None = None, + bsrc: str | None = None, + carpet: str | None = None, + cheaterslope: int | float | None = None, + color: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + da: int | float | None = None, + db: int | float | None = None, + font: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + stream: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -3486,54 +2916,54 @@ def add_carpet( def add_choropleth( self, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locationmode=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geo: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locationmode: Any | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -3871,54 +3301,54 @@ def add_choropleth( def add_choroplethmap( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -4254,54 +3684,54 @@ def add_choroplethmap( def add_choroplethmapbox( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -4646,67 +4076,67 @@ def add_choroplethmapbox( def add_cone( self, - anchor=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizemode=None, - sizeref=None, - stream=None, - text=None, - textsrc=None, - u=None, - uhoverformat=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - vhoverformat=None, - visible=None, - vsrc=None, - w=None, - whoverformat=None, - wsrc=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + anchor: Any | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + u: NDArray | None = None, + uhoverformat: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + usrc: str | None = None, + v: NDArray | None = None, + vhoverformat: str | None = None, + visible: Any | None = None, + vsrc: str | None = None, + w: NDArray | None = None, + whoverformat: str | None = None, + wsrc: str | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -5143,79 +4573,79 @@ def add_cone( def add_contour( self, - autocolorscale=None, - autocontour=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textfont=None, - textsrc=None, - texttemplate=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsrc=None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoverongaps: bool | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + xtype: Any | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + ytype: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -5719,60 +5149,60 @@ def add_contour( def add_contourcarpet( self, - a=None, - a0=None, - asrc=None, - atype=None, - autocolorscale=None, - autocontour=None, - b=None, - b0=None, - bsrc=None, - btype=None, - carpet=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - fillcolor=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - xaxis=None, - yaxis=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsrc=None, + a: NDArray | None = None, + a0: Any | None = None, + asrc: str | None = None, + atype: Any | None = None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + b: NDArray | None = None, + b0: Any | None = None, + bsrc: str | None = None, + btype: Any | None = None, + carpet: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + da: int | float | None = None, + db: int | float | None = None, + fillcolor: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textsrc: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + xaxis: str | None = None, + yaxis: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -6116,53 +5546,53 @@ def add_contourcarpet( def add_densitymap( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + radius: int | float | None = None, + radiussrc: str | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -6495,53 +5925,53 @@ def add_densitymap( def add_densitymapbox( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + radius: int | float | None = None, + radiussrc: str | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -6883,72 +6313,72 @@ def add_densitymapbox( def add_funnel( self, - alignmentgroup=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + cliponaxis: bool | None = None, + connector: None | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -7420,52 +6850,52 @@ def add_funnel( def add_funnelarea( self, - aspectratio=None, - baseratio=None, - customdata=None, - customdatasrc=None, - dlabel=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - label0=None, - labels=None, - labelssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - scalegroup=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + aspectratio: int | float | None = None, + baseratio: int | float | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dlabel: int | float | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + label0: int | float | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + scalegroup: str | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -7782,77 +7212,77 @@ def add_funnelarea( def add_heatmap( self, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textfont=None, - textsrc=None, - texttemplate=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xgap=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ygap=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsmooth=None, - zsrc=None, + autocolorscale: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoverongaps: bool | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xgap: int | float | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + xtype: Any | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + ygap: int | float | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + ytype: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -8346,72 +7776,72 @@ def add_heatmap( def add_histogram( self, - alignmentgroup=None, - autobinx=None, - autobiny=None, - bingroup=None, - cliponaxis=None, - constraintext=None, - cumulative=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - xaxis=None, - xbins=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybins=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + autobinx: bool | None = None, + autobiny: bool | None = None, + bingroup: str | None = None, + cliponaxis: bool | None = None, + constraintext: Any | None = None, + cumulative: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + error_x: None | None = None, + error_y: None | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -8888,69 +8318,69 @@ def add_histogram( def add_histogram2d( self, - autobinx=None, - autobiny=None, - autocolorscale=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - textfont=None, - texttemplate=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xgap=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - ygap=None, - yhoverformat=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsmooth=None, - zsrc=None, + autobinx: bool | None = None, + autobiny: bool | None = None, + autocolorscale: bool | None = None, + bingroup: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + textfont: None | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbingroup: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xgap: int | float | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybingroup: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + ygap: int | float | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -9421,70 +8851,70 @@ def add_histogram2d( def add_histogram2dcontour( self, - autobinx=None, - autobiny=None, - autocolorscale=None, - autocontour=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - textfont=None, - texttemplate=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autobinx: bool | None = None, + autobiny: bool | None = None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + bingroup: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + textfont: None | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbingroup: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybingroup: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -9969,55 +9399,55 @@ def add_histogram2dcontour( def add_icicle( self, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - leaf=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - root=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + leaf: None | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + pathbar: None | None = None, + root: None | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + tiling: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -10358,45 +9788,45 @@ def add_icicle( def add_image( self, - colormodel=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - source=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x0=None, - xaxis=None, - y0=None, - yaxis=None, - z=None, - zmax=None, - zmin=None, - zorder=None, - zsmooth=None, - zsrc=None, + colormodel: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + source: str | None = None, + stream: None | None = None, + text: NDArray | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x0: Any | None = None, + xaxis: str | None = None, + y0: Any | None = None, + yaxis: str | None = None, + z: NDArray | None = None, + zmax: list | None = None, + zmin: list | None = None, + zorder: int | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -10698,29 +10128,29 @@ def add_image( def add_indicator( self, - align=None, - customdata=None, - customdatasrc=None, - delta=None, - domain=None, - gauge=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - mode=None, - name=None, - number=None, - stream=None, - title=None, - uid=None, - uirevision=None, - value=None, - visible=None, + align: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + delta: None | None = None, + domain: None | None = None, + gauge: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + number: None | None = None, + stream: None | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: int | float | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -10898,66 +10328,66 @@ def add_indicator( def add_isosurface( self, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuehoverformat=None, - valuesrc=None, - visible=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + caps: None | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + isomax: int | float | None = None, + isomin: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + slices: None | None = None, + spaceframe: None | None = None, + stream: None | None = None, + surface: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: NDArray | None = None, + valuehoverformat: str | None = None, + valuesrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -11369,76 +10799,76 @@ def add_isosurface( def add_mesh3d( self, - alphahull=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - delaunayaxis=None, - facecolor=None, - facecolorsrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - i=None, - ids=None, - idssrc=None, - intensity=None, - intensitymode=None, - intensitysrc=None, - isrc=None, - j=None, - jsrc=None, - k=None, - ksrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - vertexcolor=None, - vertexcolorsrc=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + alphahull: int | float | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + delaunayaxis: Any | None = None, + facecolor: NDArray | None = None, + facecolorsrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + i: NDArray | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + intensity: NDArray | None = None, + intensitymode: Any | None = None, + intensitysrc: str | None = None, + isrc: str | None = None, + j: NDArray | None = None, + jsrc: str | None = None, + k: NDArray | None = None, + ksrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + vertexcolor: NDArray | None = None, + vertexcolorsrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -11930,55 +11360,55 @@ def add_mesh3d( def add_ohlc( self, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - tickwidth=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - yaxis=None, - yhoverformat=None, - zorder=None, + close: NDArray | None = None, + closesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + high: NDArray | None = None, + highsrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + low: NDArray | None = None, + lowsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + open: NDArray | None = None, + opensrc: str | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + tickwidth: int | float | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -12305,29 +11735,29 @@ def add_ohlc( def add_parcats( self, - arrangement=None, - bundlecolors=None, - counts=None, - countssrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - hoverinfo=None, - hoveron=None, - hovertemplate=None, - labelfont=None, - legendgrouptitle=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - sortpaths=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - visible=None, + arrangement: Any | None = None, + bundlecolors: bool | None = None, + counts: int | float | None = None, + countssrc: str | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + labelfont: None | None = None, + legendgrouptitle: None | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + sortpaths: Any | None = None, + stream: None | None = None, + tickfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -12529,31 +11959,31 @@ def add_parcats( def add_parcoords( self, - customdata=None, - customdatasrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - ids=None, - idssrc=None, - labelangle=None, - labelfont=None, - labelside=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - rangefont=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + domain: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + labelangle: int | float | None = None, + labelfont: None | None = None, + labelside: Any | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + rangefont: None | None = None, + stream: None | None = None, + tickfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -12738,59 +12168,59 @@ def add_parcoords( def add_pie( self, - automargin=None, - customdata=None, - customdatasrc=None, - direction=None, - dlabel=None, - domain=None, - hole=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - label0=None, - labels=None, - labelssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - pull=None, - pullsrc=None, - rotation=None, - scalegroup=None, - showlegend=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + automargin: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + direction: Any | None = None, + dlabel: int | float | None = None, + domain: None | None = None, + hole: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + insidetextorientation: Any | None = None, + label0: int | float | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + pull: int | float | None = None, + pullsrc: str | None = None, + rotation: int | float | None = None, + scalegroup: str | None = None, + showlegend: bool | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -13143,32 +12573,32 @@ def add_pie( def add_sankey( self, - arrangement=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverlabel=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - link=None, - meta=None, - metasrc=None, - name=None, - node=None, - orientation=None, - selectedpoints=None, - stream=None, - textfont=None, - uid=None, - uirevision=None, - valueformat=None, - valuesuffix=None, - visible=None, + arrangement: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverlabel: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + link: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + node: None | None = None, + orientation: Any | None = None, + selectedpoints: Any | None = None, + stream: None | None = None, + textfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + valueformat: str | None = None, + valuesuffix: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -13365,80 +12795,80 @@ def add_sankey( def add_scatter( self, - alignmentgroup=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - fillgradient=None, - fillpattern=None, - groupnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - selected=None, - selectedpoints=None, - showlegend=None, - stackgaps=None, - stackgroup=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + fillgradient: None | None = None, + fillpattern: None | None = None, + groupnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stackgaps: Any | None = None, + stackgroup: str | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -13983,61 +13413,61 @@ def add_scatter( def add_scatter3d( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - error_z=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - projection=None, - scene=None, - showlegend=None, - stream=None, - surfaceaxis=None, - surfacecolor=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + error_x: None | None = None, + error_y: None | None = None, + error_z: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + projection: None | None = None, + scene: str | None = None, + showlegend: bool | None = None, + stream: None | None = None, + surfaceaxis: Any | None = None, + surfacecolor: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -14419,56 +13849,56 @@ def add_scatter3d( def add_scattercarpet( self, - a=None, - asrc=None, - b=None, - bsrc=None, - carpet=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxis=None, - yaxis=None, - zorder=None, + a: NDArray | None = None, + asrc: str | None = None, + b: NDArray | None = None, + bsrc: str | None = None, + carpet: str | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + xaxis: str | None = None, + yaxis: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -14831,57 +14261,57 @@ def add_scattercarpet( def add_scattergeo( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - fill=None, - fillcolor=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - locationmode=None, - locations=None, - locationssrc=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + geo: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + locationmode: Any | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -15240,69 +14670,69 @@ def add_scattergeo( def add_scattergl( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, row=None, col=None, secondary_y=None, @@ -15752,53 +15182,53 @@ def add_scattergl( def add_scattermap( self, - below=None, - cluster=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + below: str | None = None, + cluster: None | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -16129,53 +15559,53 @@ def add_scattermap( def add_scattermapbox( self, - below=None, - cluster=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + below: str | None = None, + cluster: None | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -16515,59 +15945,59 @@ def add_scattermapbox( def add_scatterpolar( self, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -16937,57 +16367,57 @@ def add_scatterpolar( def add_scatterpolargl( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -17354,54 +16784,54 @@ def add_scatterpolargl( def add_scattersmith( self, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - imag=None, - imagsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - real=None, - realsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + imag: NDArray | None = None, + imagsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + real: NDArray | None = None, + realsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -17753,57 +17183,57 @@ def add_scattersmith( def add_scatterternary( self, - a=None, - asrc=None, - b=None, - bsrc=None, - c=None, - cliponaxis=None, - connectgaps=None, - csrc=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - sum=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + a: NDArray | None = None, + asrc: str | None = None, + b: NDArray | None = None, + bsrc: str | None = None, + c: NDArray | None = None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + csrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + sum: int | float | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -18174,46 +17604,46 @@ def add_scatterternary( def add_splom( self, - customdata=None, - customdatasrc=None, - diagonal=None, - dimensions=None, - dimensiondefaults=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - showlowerhalf=None, - showupperhalf=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxes=None, - xhoverformat=None, - yaxes=None, - yhoverformat=None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + diagonal: None | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showlowerhalf: bool | None = None, + showupperhalf: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + xaxes: list | None = None, + xhoverformat: str | None = None, + yaxes: list | None = None, + yhoverformat: str | None = None, row=None, col=None, **kwargs, @@ -18523,65 +17953,65 @@ def add_splom( def add_streamtube( self, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - maxdisplayed=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizeref=None, - starts=None, - stream=None, - text=None, - u=None, - uhoverformat=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - vhoverformat=None, - visible=None, - vsrc=None, - w=None, - whoverformat=None, - wsrc=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + maxdisplayed: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + sizeref: int | float | None = None, + starts: None | None = None, + stream: None | None = None, + text: str | None = None, + u: NDArray | None = None, + uhoverformat: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + usrc: str | None = None, + v: NDArray | None = None, + vhoverformat: str | None = None, + visible: Any | None = None, + vsrc: str | None = None, + w: NDArray | None = None, + whoverformat: str | None = None, + wsrc: str | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -19001,54 +18431,54 @@ def add_streamtube( def add_sunburst( self, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - labels=None, - labelssrc=None, - leaf=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - root=None, - rotation=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + insidetextorientation: Any | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + leaf: None | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + root: None | None = None, + rotation: int | float | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -19393,64 +18823,64 @@ def add_sunburst( def add_surface( self, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - hidesurface=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - surfacecolor=None, - surfacecolorsrc=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hidesurface: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + opacityscale: Any | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + surfacecolor: NDArray | None = None, + surfacecolorsrc: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -19863,31 +19293,31 @@ def add_surface( def add_table( self, - cells=None, - columnorder=None, - columnordersrc=None, - columnwidth=None, - columnwidthsrc=None, - customdata=None, - customdatasrc=None, - domain=None, - header=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - stream=None, - uid=None, - uirevision=None, - visible=None, + cells: None | None = None, + columnorder: NDArray | None = None, + columnordersrc: str | None = None, + columnwidth: int | float | None = None, + columnwidthsrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + header: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + stream: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -20074,54 +19504,54 @@ def add_table( def add_treemap( self, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - root=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + pathbar: None | None = None, + root: None | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + tiling: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -20459,67 +19889,67 @@ def add_treemap( def add_violin( self, - alignmentgroup=None, - bandwidth=None, - box=None, - customdata=None, - customdatasrc=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meanline=None, - meta=None, - metasrc=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - points=None, - quartilemethod=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + bandwidth: int | float | None = None, + box: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + jitter: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meanline: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + pointpos: int | float | None = None, + points: Any | None = None, + quartilemethod: Any | None = None, + scalegroup: str | None = None, + scalemode: Any | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + side: Any | None = None, + span: list | None = None, + spanmode: Any | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -20975,67 +20405,67 @@ def add_violin( def add_volume( self, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuehoverformat=None, - valuesrc=None, - visible=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + caps: None | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + isomax: int | float | None = None, + isomin: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + opacityscale: Any | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + slices: None | None = None, + spaceframe: None | None = None, + stream: None | None = None, + surface: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: NDArray | None = None, + valuehoverformat: str | None = None, + valuesrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -21459,79 +20889,79 @@ def add_volume( def add_waterfall( self, - alignmentgroup=None, - base=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - decreasing=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - measure=None, - measuresrc=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - totals=None, - uid=None, - uirevision=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + base: int | float | None = None, + cliponaxis: bool | None = None, + connector: None | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + measure: NDArray | None = None, + measuresrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + totals: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -23477,49 +22907,49 @@ def update_annotations( def add_annotation( self, arg=None, - align=None, - arrowcolor=None, - arrowhead=None, - arrowside=None, - arrowsize=None, - arrowwidth=None, - ax=None, - axref=None, - ay=None, - ayref=None, - bgcolor=None, - bordercolor=None, - borderpad=None, - borderwidth=None, - captureevents=None, - clicktoshow=None, - font=None, - height=None, - hoverlabel=None, - hovertext=None, - name=None, - opacity=None, - showarrow=None, - standoff=None, - startarrowhead=None, - startarrowsize=None, - startstandoff=None, - templateitemname=None, - text=None, - textangle=None, - valign=None, - visible=None, - width=None, - x=None, - xanchor=None, - xclick=None, - xref=None, - xshift=None, - y=None, - yanchor=None, - yclick=None, - yref=None, - yshift=None, + align: Any | None = None, + arrowcolor: str | None = None, + arrowhead: int | None = None, + arrowside: Any | None = None, + arrowsize: int | float | None = None, + arrowwidth: int | float | None = None, + ax: Any | None = None, + axref: Any | None = None, + ay: Any | None = None, + ayref: Any | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderpad: int | float | None = None, + borderwidth: int | float | None = None, + captureevents: bool | None = None, + clicktoshow: Any | None = None, + font: None | None = None, + height: int | float | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + showarrow: bool | None = None, + standoff: int | float | None = None, + startarrowhead: int | None = None, + startarrowsize: int | float | None = None, + startstandoff: int | float | None = None, + templateitemname: str | None = None, + text: str | None = None, + textangle: int | float | None = None, + valign: Any | None = None, + visible: bool | None = None, + width: int | float | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xclick: Any | None = None, + xref: Any | None = None, + xshift: int | float | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yclick: Any | None = None, + yref: Any | None = None, + yshift: int | float | None = None, row=None, col=None, secondary_y=None, @@ -24054,21 +23484,21 @@ def update_layout_images( def add_layout_image( self, arg=None, - layer=None, - name=None, - opacity=None, - sizex=None, - sizey=None, - sizing=None, - source=None, - templateitemname=None, - visible=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, + layer: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + sizex: int | float | None = None, + sizey: int | float | None = None, + sizing: Any | None = None, + source: str | None = None, + templateitemname: str | None = None, + visible: bool | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yref: Any | None = None, row=None, col=None, secondary_y=None, @@ -24381,18 +23811,18 @@ def update_selections( def add_selection( self, arg=None, - line=None, - name=None, - opacity=None, - path=None, - templateitemname=None, - type=None, - x0=None, - x1=None, - xref=None, - y0=None, - y1=None, - yref=None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + path: str | None = None, + templateitemname: str | None = None, + type: Any | None = None, + x0: Any | None = None, + x1: Any | None = None, + xref: Any | None = None, + y0: Any | None = None, + y1: Any | None = None, + yref: Any | None = None, row=None, col=None, secondary_y=None, @@ -24685,38 +24115,38 @@ def update_shapes( def add_shape( self, arg=None, - editable=None, - fillcolor=None, - fillrule=None, - label=None, - layer=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - name=None, - opacity=None, - path=None, - showlegend=None, - templateitemname=None, - type=None, - visible=None, - x0=None, - x0shift=None, - x1=None, - x1shift=None, - xanchor=None, - xref=None, - xsizemode=None, - y0=None, - y0shift=None, - y1=None, - y1shift=None, - yanchor=None, - yref=None, - ysizemode=None, + editable: bool | None = None, + fillcolor: str | None = None, + fillrule: Any | None = None, + label: None | None = None, + layer: Any | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + path: str | None = None, + showlegend: bool | None = None, + templateitemname: str | None = None, + type: Any | None = None, + visible: Any | None = None, + x0: Any | None = None, + x0shift: int | float | None = None, + x1: Any | None = None, + x1shift: int | float | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + xsizemode: Any | None = None, + y0: Any | None = None, + y0shift: int | float | None = None, + y1: Any | None = None, + y1shift: int | float | None = None, + yanchor: Any | None = None, + yref: Any | None = None, + ysizemode: Any | None = None, row=None, col=None, secondary_y=None, diff --git a/plotly/graph_objs/_figurewidget.py b/plotly/graph_objs/_figurewidget.py index 4ced40e75f..23063d47ca 100644 --- a/plotly/graph_objs/_figurewidget.py +++ b/plotly/graph_objs/_figurewidget.py @@ -1,9 +1,13 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basewidget import BaseFigureWidget class FigureWidget(BaseFigureWidget): + def __init__( - self, data=None, layout=None, frames=None, skip_invalid=False, **kwargs + self, data=None, layout=None, frames=None, skip_invalid: bool = False, **kwargs ): """ Create a new :class:FigureWidget instance @@ -48,552 +52,6 @@ def __init__( - A dict of string/value properties that will be passed to the Layout constructor - Supported dict properties: - - activeselection - :class:`plotly.graph_objects.layout.Activeselec - tion` instance or dict with compatible - properties - activeshape - :class:`plotly.graph_objects.layout.Activeshape - ` instance or dict with compatible properties - annotations - A tuple of - :class:`plotly.graph_objects.layout.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), - sets the default property values to use for - elements of layout.annotations - autosize - Determines whether or not a layout width or - height that has been left undefined by the user - is initialized on each relayout. Note that, - regardless of this attribute, an undefined - layout width or height is always initialized on - the first call to plot. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. This is the default value; - however it could be overridden for individual - axes. - barcornerradius - Sets the rounding of bar corners. May be an - integer number of pixels, or a percentage of - bar width (as a string ending in %). - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "relative", the bars are stacked - on top of one another, with negative values - below the axis, positive values above With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to reduce "opacity" to - see multiple bars. - barnorm - Sets the normalization for bar traces on the - graph. With "fraction", the value of each bar - is divided by the sum of all values at that - location coordinate. "percent" is the same but - multiplied by 100 to show percentages. - boxgap - Sets the gap (in plot fraction) between boxes - of adjacent location coordinates. Has no effect - on traces that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes - of the same location coordinate. Has no effect - on traces that have "width" set. - boxmode - Determines how boxes at the same location - coordinate are displayed on the graph. If - "group", the boxes are plotted next to one - another centered around the shared location. If - "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see - them multiple boxes. Has no effect on traces - that have "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout - the plot. - clickmode - Determines the mode of single click - interactions. "event" is the default value and - emits the `plotly_click` event. In addition - this mode emits the `plotly_selected` event in - drag modes "lasso" and "select", but with no - event data attached (kept for compatibility - reasons). The "select" flag enables selecting - single data points via click. This mode also - supports persistent selections, meaning that - pressing Shift while clicking, adds to / - subtracts from an existing selection. "select" - with `hovermode`: "x" can be confusing, - consider explicitly setting `hovermode`: - "closest" when using this feature. Selection - events are sent accordingly as long as "event" - flag is set as well. When the "event" flag is - missing, `plotly_click` and `plotly_selected` - events are not fired. - coloraxis - :class:`plotly.graph_objects.layout.Coloraxis` - instance or dict with compatible properties - colorscale - :class:`plotly.graph_objects.layout.Colorscale` - instance or dict with compatible properties - colorway - Sets the default trace colors. - computed - Placeholder for exporting automargin-impacting - values namely `margin.t`, `margin.b`, - `margin.l` and `margin.r` in "full-json" mode. - datarevision - If provided, a changed value tells - `Plotly.react` that one or more data arrays has - changed. This way you can modify arrays in- - place rather than making a complete new copy - for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are - being treated as immutable, thus any data array - with a different identity from its predecessor - contains new data. - dragmode - Determines the mode of drag interactions. - "select" and "lasso" apply only to scatter - traces with markers or text. "orbit" and - "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than - trace names and axis titles. Defaults to - `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether - given by `funnelareacolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendiciclecolors - If `true`, the icicle slice colors (whether - given by `iciclecolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendpiecolors - If `true`, the pie slice colors (whether given - by `piecolorway` or inherited from `colorway`) - will be extended to three times its original - length by first repeating every color 20% - lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether - given by `sunburstcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendtreemapcolors - If `true`, the treemap slice colors (whether - given by `treemapcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - font - Sets the global font. Note that fonts used in - traces and other layout components inherit from - the global font. - funnelareacolorway - Sets the default funnelarea slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - funnelmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "group", the bars are plotted next - to one another centered around the shared - location. With "overlay", the bars are plotted - over one another, you might need to reduce - "opacity" to see multiple bars. - geo - :class:`plotly.graph_objects.layout.Geo` - instance or dict with compatible properties - grid - :class:`plotly.graph_objects.layout.Grid` - instance or dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart - analog of visible:'legendonly' but it can - contain many labels, and can simultaneously - hide slices from several pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on Chart Studio Cloud - for `hiddenlabels`. - hidesources - Determines whether or not a text link citing - the data source is placed at the bottom-right - cored of the figure. Has only an effect only on - graphs that have been generated via forked - graphs from the Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise). - hoverdistance - Sets the default distance (in pixels) to look - for data to add hover labels (-1 means no - cutoff, 0 means no looking for data). This is - only a real distance for hovering on point-like - objects, like scatter points. For area-like - objects (bars, scatter fills, etc) hovering is - on inside the area and off outside, but these - objects will not supersede hover on point-like - objects in case of conflict. - hoverlabel - :class:`plotly.graph_objects.layout.Hoverlabel` - instance or dict with compatible properties - hovermode - Determines the mode of hover interactions. If - "closest", a single hoverlabel will appear for - the "closest" point within the `hoverdistance`. - If "x" (or "y"), multiple hoverlabels will - appear for multiple points at the "closest" x- - (or y-) coordinate within the `hoverdistance`, - with the caveat that no more than one - hoverlabel will appear per trace. If *x - unified* (or *y unified*), a single hoverlabel - will appear multiple points at the closest x- - (or y-) coordinate within the `hoverdistance` - with the caveat that no more than one - hoverlabel will appear per trace. In this mode, - spikelines are enabled by default perpendicular - to the specified axis. If false, hover - interactions are disabled. - hoversubplots - Determines expansion of hover effects to other - subplots If "single" just the axis pair of the - primary point is included without overlaying - subplots. If "overlaying" all subplots using - the main axis and occupying the same space are - included. If "axis", also include stacked - subplots using the same axis when `hovermode` - is set to "x", *x unified*, "y" or *y unified*. - iciclecolorway - Sets the default icicle slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendiciclecolors`. - images - A tuple of - :class:`plotly.graph_objects.layout.Image` - instances or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the - default property values to use for elements of - layout.images - legend - :class:`plotly.graph_objects.layout.Legend` - instance or dict with compatible properties - map - :class:`plotly.graph_objects.layout.Map` - instance or dict with compatible properties - mapbox - :class:`plotly.graph_objects.layout.Mapbox` - instance or dict with compatible properties - margin - :class:`plotly.graph_objects.layout.Margin` - instance or dict with compatible properties - meta - Assigns extra meta information that can be used - in various `text` attributes. Attributes such - as the graph, axis and colorbar `title.text`, - annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenus` and `sliders` - `label` text all support `meta`. One can access - `meta` fields using template strings: - `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an - object for example `{key: value}` which can be - accessed %{meta[key]}. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - minreducedheight - Minimum height of the plot with - margin.automargin applied (in px) - minreducedwidth - Minimum width of the plot with - margin.automargin applied (in px) - modebar - :class:`plotly.graph_objects.layout.Modebar` - instance or dict with compatible properties - newselection - :class:`plotly.graph_objects.layout.Newselectio - n` instance or dict with compatible properties - newshape - :class:`plotly.graph_objects.layout.Newshape` - instance or dict with compatible properties - paper_bgcolor - Sets the background color of the paper where - the graph is drawn. - piecolorway - Sets the default pie slice colors. Defaults to - the main `colorway` used for trace colors. If - you specify a new list here it can still be - extended with lighter and darker colors, see - `extendpiecolors`. - plot_bgcolor - Sets the background color of the plotting area - in-between x and y axes. - polar - :class:`plotly.graph_objects.layout.Polar` - instance or dict with compatible properties - scattergap - Sets the gap (in plot fraction) between scatter - points of adjacent location coordinates. - Defaults to `bargap`. - scattermode - Determines how scatter points at the same - location coordinate are displayed on the graph. - With "group", the scatter points are plotted - next to one another centered around the shared - location. With "overlay", the scatter points - are plotted over one another, you might need to - reduce "opacity" to see multiple scatter - points. - scene - :class:`plotly.graph_objects.layout.Scene` - instance or dict with compatible properties - selectdirection - When `dragmode` is set to "select", this limits - the selection of the drag to horizontal, - vertical or diagonal. "h" only allows - horizontal selection, "v" only vertical, "d" - only diagonal and "any" sets no limit. - selectionrevision - Controls persistence of user-driven changes in - selected points from all traces. - selections - A tuple of - :class:`plotly.graph_objects.layout.Selection` - instances or dicts with compatible properties - selectiondefaults - When used in a template (as - layout.template.layout.selectiondefaults), sets - the default property values to use for elements - of layout.selections - separators - Sets the decimal and thousand separators. For - example, *. * puts a '.' before decimals and a - space between thousands. In English locales, - dflt is ".," but other locales may alter this - default. - shapes - A tuple of - :class:`plotly.graph_objects.layout.Shape` - instances or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the - default property values to use for elements of - layout.shapes - showlegend - Determines whether or not a legend is drawn. - Default is `true` if there is a trace to show - and any of these: a) Two or more traces would - by default be shown in the legend. b) One pie - trace is shown in the legend. c) One trace is - explicitly given with `showlegend: true`. - sliders - A tuple of - :class:`plotly.graph_objects.layout.Slider` - instances or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets - the default property values to use for elements - of layout.sliders - smith - :class:`plotly.graph_objects.layout.Smith` - instance or dict with compatible properties - spikedistance - Sets the default distance (in pixels) to look - for data to draw spikelines to (-1 means no - cutoff, 0 means no looking for data). As with - hoverdistance, distance does not apply to area- - like objects. In addition, some objects can be - hovered on but will not generate spikelines, - such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. - This should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: - [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the - structure of `figure.layout` and - `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` - (e.g. 'scatter'). Alternatively, this may be - specified as an instance of - plotly.graph_objs.layout.Template. Trace - templates are applied cyclically to traces of - each type. Container arrays (eg `annotations`) - have special handling: An object ending in - `defaults` (eg `annotationdefaults`) is applied - to each array item. But if an item has a - `templateitemname` key we look in the template - array for an item with matching `name` and - apply that instead. If no matching `name` is - found we mark the item invisible. Any named - template item not referenced is appended to the - end of the array, so this can be used to add a - watermark annotation or a logo image, for - example. To omit one of these items on the - plot, make an item with matching - `templateitemname` and `visible: false`. - ternary - :class:`plotly.graph_objects.layout.Ternary` - instance or dict with compatible properties - title - :class:`plotly.graph_objects.layout.Title` - instance or dict with compatible properties - transition - Sets transition options used during - Plotly.react updates. - treemapcolorway - Sets the default treemap slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendtreemapcolors`. - uirevision - Used to allow user interactions with the plot - to persist after `Plotly.react` calls that are - unaware of these interactions. If `uirevision` - is omitted, or if it is given and it changed - from the previous `Plotly.react` call, the - exact new figure is used. If `uirevision` is - truthy and did NOT change, any attribute that - has been affected by user interactions and did - not receive a different value in the new figure - will keep the interaction value. - `layout.uirevision` attribute serves as the - default for `uirevision` attributes in various - sub-containers. For finer control you can set - these sub-attributes directly. For example, if - your app separately controls the data on the x - and y axes you might set - `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y - data is changed, you can update - `yaxis.uirevision=*quantity*` and the y axis - range will reset but the x axis range will - retain any user-driven zoom. - uniformtext - :class:`plotly.graph_objects.layout.Uniformtext - ` instance or dict with compatible properties - updatemenus - A tuple of - :class:`plotly.graph_objects.layout.Updatemenu` - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), - sets the default property values to use for - elements of layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins - of adjacent location coordinates. Has no effect - on traces that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins - of the same location coordinate. Has no effect - on traces that have "width" set. - violinmode - Determines how violins at the same location - coordinate are displayed on the graph. If - "group", the violins are plotted next to one - another centered around the shared location. If - "overlay", the violins are plotted over one - another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces - that have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - waterfallmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to reduce "opacity" to - see multiple bars. - width - Sets the plot's width (in px). - xaxis - :class:`plotly.graph_objects.layout.XAxis` - instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.YAxis` - instance or dict with compatible properties - frames The 'frames' property is a tuple of instances of Frame that may be specified as: @@ -601,32 +59,6 @@ def __init__( - A list or tuple of dicts of string/value properties that will be passed to the Frame constructor - Supported dict properties: - - baseframe - The name of the frame into which this frame's - properties are merged before applying. This is - used to unify properties and avoid needing to - specify the same values for the same properties - in multiple frames. - data - A list of traces this frame modifies. The - format is identical to the normal trace - definition. - group - An identifier that specifies the group to which - the frame belongs, used by animate to select a - subset of frames. - layout - Layout properties which this frame modifies. - The format is identical to the normal layout - definition. - name - A label by which to identify the frame - traces - A list of trace indices that identify the - respective traces in the data attribute - skip_invalid: bool If True, invalid properties in the figure specification will be skipped silently. If False (default) invalid properties in the @@ -638,7 +70,7 @@ def __init__( if a property in the specification of data, layout, or frames is invalid AND skip_invalid is False """ - super(FigureWidget, self).__init__(data, layout, frames, skip_invalid, **kwargs) + super().__init__(data, layout, frames, skip_invalid, **kwargs) def update(self, dict1=None, overwrite=False, **kwargs) -> "FigureWidget": """ @@ -689,7 +121,7 @@ def update(self, dict1=None, overwrite=False, **kwargs) -> "FigureWidget": Updated figure """ - return super(FigureWidget, self).update(dict1, overwrite, **kwargs) + return super().update(dict1, overwrite, **kwargs) def update_traces( self, @@ -754,7 +186,7 @@ def update_traces( Returns the Figure object that the method was called on """ - return super(FigureWidget, self).update_traces( + return super().update_traces( patch, selector, row, col, secondary_y, overwrite, **kwargs ) @@ -784,7 +216,7 @@ def update_layout(self, dict1=None, overwrite=False, **kwargs) -> "FigureWidget" The Figure object that the update_layout method was called on """ - return super(FigureWidget, self).update_layout(dict1, overwrite, **kwargs) + return super().update_layout(dict1, overwrite, **kwargs) def for_each_trace( self, fn, selector=None, row=None, col=None, secondary_y=None @@ -832,9 +264,7 @@ def for_each_trace( Returns the Figure object that the method was called on """ - return super(FigureWidget, self).for_each_trace( - fn, selector, row, col, secondary_y - ) + return super().for_each_trace(fn, selector, row, col, secondary_y) def add_trace( self, trace, row=None, col=None, secondary_y=None, exclude_empty_subplots=False @@ -911,9 +341,7 @@ def add_trace( Figure(...) """ - return super(FigureWidget, self).add_trace( - trace, row, col, secondary_y, exclude_empty_subplots - ) + return super().add_trace(trace, row, col, secondary_y, exclude_empty_subplots) def add_traces( self, @@ -991,7 +419,7 @@ def add_traces( Figure(...) """ - return super(FigureWidget, self).add_traces( + return super().add_traces( data, rows, cols, secondary_ys, exclude_empty_subplots ) @@ -1043,7 +471,7 @@ def add_vline( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(FigureWidget, self).add_vline( + return super().add_vline( x, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1095,7 +523,7 @@ def add_hline( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(FigureWidget, self).add_hline( + return super().add_hline( y, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1151,7 +579,7 @@ def add_vrect( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(FigureWidget, self).add_vrect( + return super().add_vrect( x0, x1, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1207,7 +635,7 @@ def add_hrect( Any named function parameters that can be passed to 'add_shape', except for x0, x1, y0, y1 or type. """ - return super(FigureWidget, self).add_hrect( + return super().add_hrect( y0, y1, row, col, exclude_empty_subplots, annotation, **kwargs ) @@ -1221,84 +649,84 @@ def set_subplots( plotly.subplots.make_subplots accepts. """ - return super(FigureWidget, self).set_subplots(rows, cols, **make_subplots_args) + return super().set_subplots(rows, cols, **make_subplots_args) def add_bar( self, - alignmentgroup=None, - base=None, - basesrc=None, - cliponaxis=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + base: Any | None = None, + basesrc: str | None = None, + cliponaxis: bool | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -1794,53 +1222,53 @@ def add_bar( def add_barpolar( self, - base=None, - basesrc=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetsrc=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - widthsrc=None, + base: Any | None = None, + basesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, row=None, col=None, **kwargs, @@ -2141,92 +1569,92 @@ def add_barpolar( def add_box( self, - alignmentgroup=None, - boxmean=None, - boxpoints=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lowerfence=None, - lowerfencesrc=None, - marker=None, - mean=None, - meansrc=None, - median=None, - mediansrc=None, - meta=None, - metasrc=None, - name=None, - notched=None, - notchspan=None, - notchspansrc=None, - notchwidth=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - q1=None, - q1src=None, - q3=None, - q3src=None, - quartilemethod=None, - sd=None, - sdmultiple=None, - sdsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - showwhiskers=None, - sizemode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - upperfence=None, - upperfencesrc=None, - visible=None, - whiskerwidth=None, - width=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + boxmean: Any | None = None, + boxpoints: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + jitter: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lowerfence: NDArray | None = None, + lowerfencesrc: str | None = None, + marker: None | None = None, + mean: NDArray | None = None, + meansrc: str | None = None, + median: NDArray | None = None, + mediansrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + notched: bool | None = None, + notchspan: NDArray | None = None, + notchspansrc: str | None = None, + notchwidth: int | float | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + pointpos: int | float | None = None, + q1: NDArray | None = None, + q1src: str | None = None, + q3: NDArray | None = None, + q3src: str | None = None, + quartilemethod: Any | None = None, + sd: NDArray | None = None, + sdmultiple: int | float | None = None, + sdsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showwhiskers: bool | None = None, + sizemode: Any | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + upperfence: NDArray | None = None, + upperfencesrc: str | None = None, + visible: Any | None = None, + whiskerwidth: int | float | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -2827,55 +2255,55 @@ def add_box( def add_candlestick( self, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - whiskerwidth=None, - x=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - yaxis=None, - yhoverformat=None, - zorder=None, + close: NDArray | None = None, + closesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + high: NDArray | None = None, + highsrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + low: NDArray | None = None, + lowsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + open: NDArray | None = None, + opensrc: str | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + whiskerwidth: int | float | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -3203,43 +2631,43 @@ def add_candlestick( def add_carpet( self, - a=None, - a0=None, - aaxis=None, - asrc=None, - b=None, - b0=None, - baxis=None, - bsrc=None, - carpet=None, - cheaterslope=None, - color=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - font=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - stream=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xsrc=None, - y=None, - yaxis=None, - ysrc=None, - zorder=None, + a: NDArray | None = None, + a0: int | float | None = None, + aaxis: None | None = None, + asrc: str | None = None, + b: NDArray | None = None, + b0: int | float | None = None, + baxis: None | None = None, + bsrc: str | None = None, + carpet: str | None = None, + cheaterslope: int | float | None = None, + color: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + da: int | float | None = None, + db: int | float | None = None, + font: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + stream: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -3490,54 +2918,54 @@ def add_carpet( def add_choropleth( self, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locationmode=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geo: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locationmode: Any | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -3875,54 +3303,54 @@ def add_choropleth( def add_choroplethmap( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -4258,54 +3686,54 @@ def add_choroplethmap( def add_choroplethmapbox( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - locations=None, - locationssrc=None, - marker=None, - meta=None, - metasrc=None, - name=None, - reversescale=None, - selected=None, - selectedpoints=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + reversescale: bool | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -4650,67 +4078,67 @@ def add_choroplethmapbox( def add_cone( self, - anchor=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizemode=None, - sizeref=None, - stream=None, - text=None, - textsrc=None, - u=None, - uhoverformat=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - vhoverformat=None, - visible=None, - vsrc=None, - w=None, - whoverformat=None, - wsrc=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + anchor: Any | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + u: NDArray | None = None, + uhoverformat: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + usrc: str | None = None, + v: NDArray | None = None, + vhoverformat: str | None = None, + visible: Any | None = None, + vsrc: str | None = None, + w: NDArray | None = None, + whoverformat: str | None = None, + wsrc: str | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -5147,79 +4575,79 @@ def add_cone( def add_contour( self, - autocolorscale=None, - autocontour=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textfont=None, - textsrc=None, - texttemplate=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsrc=None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoverongaps: bool | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + xtype: Any | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + ytype: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -5723,60 +5151,60 @@ def add_contour( def add_contourcarpet( self, - a=None, - a0=None, - asrc=None, - atype=None, - autocolorscale=None, - autocontour=None, - b=None, - b0=None, - bsrc=None, - btype=None, - carpet=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - da=None, - db=None, - fillcolor=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - xaxis=None, - yaxis=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsrc=None, + a: NDArray | None = None, + a0: Any | None = None, + asrc: str | None = None, + atype: Any | None = None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + b: NDArray | None = None, + b0: Any | None = None, + bsrc: str | None = None, + btype: Any | None = None, + carpet: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + da: int | float | None = None, + db: int | float | None = None, + fillcolor: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textsrc: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + xaxis: str | None = None, + yaxis: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -6120,53 +5548,53 @@ def add_contourcarpet( def add_densitymap( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + radius: int | float | None = None, + radiussrc: str | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -6499,53 +5927,53 @@ def add_densitymap( def add_densitymapbox( self, - autocolorscale=None, - below=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lon=None, - lonsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - radius=None, - radiussrc=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - subplot=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - z=None, - zauto=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autocolorscale: bool | None = None, + below: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + radius: int | float | None = None, + radiussrc: str | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -6887,72 +6315,72 @@ def add_densitymapbox( def add_funnel( self, - alignmentgroup=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + cliponaxis: bool | None = None, + connector: None | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -7424,52 +6852,52 @@ def add_funnel( def add_funnelarea( self, - aspectratio=None, - baseratio=None, - customdata=None, - customdatasrc=None, - dlabel=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - label0=None, - labels=None, - labelssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - scalegroup=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + aspectratio: int | float | None = None, + baseratio: int | float | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dlabel: int | float | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + label0: int | float | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + scalegroup: str | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -7786,77 +7214,77 @@ def add_funnelarea( def add_heatmap( self, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textfont=None, - textsrc=None, - texttemplate=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xgap=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ygap=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsmooth=None, - zsrc=None, + autocolorscale: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoverongaps: bool | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xgap: int | float | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + xtype: Any | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + ygap: int | float | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + ytype: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -8350,72 +7778,72 @@ def add_heatmap( def add_histogram( self, - alignmentgroup=None, - autobinx=None, - autobiny=None, - bingroup=None, - cliponaxis=None, - constraintext=None, - cumulative=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - xaxis=None, - xbins=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybins=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + autobinx: bool | None = None, + autobiny: bool | None = None, + bingroup: str | None = None, + cliponaxis: bool | None = None, + constraintext: Any | None = None, + cumulative: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + error_x: None | None = None, + error_y: None | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -8892,69 +8320,69 @@ def add_histogram( def add_histogram2d( self, - autobinx=None, - autobiny=None, - autocolorscale=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - textfont=None, - texttemplate=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xgap=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - ygap=None, - yhoverformat=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsmooth=None, - zsrc=None, + autobinx: bool | None = None, + autobiny: bool | None = None, + autocolorscale: bool | None = None, + bingroup: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + textfont: None | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbingroup: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xgap: int | float | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybingroup: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + ygap: int | float | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -9425,70 +8853,70 @@ def add_histogram2d( def add_histogram2dcontour( self, - autobinx=None, - autobiny=None, - autocolorscale=None, - autocontour=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - textfont=None, - texttemplate=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autobinx: bool | None = None, + autobiny: bool | None = None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + bingroup: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + textfont: None | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbingroup: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybingroup: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -9973,55 +9401,55 @@ def add_histogram2dcontour( def add_icicle( self, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - leaf=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - root=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + leaf: None | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + pathbar: None | None = None, + root: None | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + tiling: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -10362,45 +9790,45 @@ def add_icicle( def add_image( self, - colormodel=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - source=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x0=None, - xaxis=None, - y0=None, - yaxis=None, - z=None, - zmax=None, - zmin=None, - zorder=None, - zsmooth=None, - zsrc=None, + colormodel: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + source: str | None = None, + stream: None | None = None, + text: NDArray | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x0: Any | None = None, + xaxis: str | None = None, + y0: Any | None = None, + yaxis: str | None = None, + z: NDArray | None = None, + zmax: list | None = None, + zmin: list | None = None, + zorder: int | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, row=None, col=None, secondary_y=None, @@ -10702,29 +10130,29 @@ def add_image( def add_indicator( self, - align=None, - customdata=None, - customdatasrc=None, - delta=None, - domain=None, - gauge=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - mode=None, - name=None, - number=None, - stream=None, - title=None, - uid=None, - uirevision=None, - value=None, - visible=None, + align: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + delta: None | None = None, + domain: None | None = None, + gauge: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + number: None | None = None, + stream: None | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: int | float | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -10902,66 +10330,66 @@ def add_indicator( def add_isosurface( self, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuehoverformat=None, - valuesrc=None, - visible=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + caps: None | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + isomax: int | float | None = None, + isomin: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + slices: None | None = None, + spaceframe: None | None = None, + stream: None | None = None, + surface: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: NDArray | None = None, + valuehoverformat: str | None = None, + valuesrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -11373,76 +10801,76 @@ def add_isosurface( def add_mesh3d( self, - alphahull=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - delaunayaxis=None, - facecolor=None, - facecolorsrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - i=None, - ids=None, - idssrc=None, - intensity=None, - intensitymode=None, - intensitysrc=None, - isrc=None, - j=None, - jsrc=None, - k=None, - ksrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - vertexcolor=None, - vertexcolorsrc=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + alphahull: int | float | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + delaunayaxis: Any | None = None, + facecolor: NDArray | None = None, + facecolorsrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + i: NDArray | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + intensity: NDArray | None = None, + intensitymode: Any | None = None, + intensitysrc: str | None = None, + isrc: str | None = None, + j: NDArray | None = None, + jsrc: str | None = None, + k: NDArray | None = None, + ksrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + vertexcolor: NDArray | None = None, + vertexcolorsrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -11934,55 +11362,55 @@ def add_mesh3d( def add_ohlc( self, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - tickwidth=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - yaxis=None, - yhoverformat=None, - zorder=None, + close: NDArray | None = None, + closesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + high: NDArray | None = None, + highsrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + low: NDArray | None = None, + lowsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + open: NDArray | None = None, + opensrc: str | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + tickwidth: int | float | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -12309,29 +11737,29 @@ def add_ohlc( def add_parcats( self, - arrangement=None, - bundlecolors=None, - counts=None, - countssrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - hoverinfo=None, - hoveron=None, - hovertemplate=None, - labelfont=None, - legendgrouptitle=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - sortpaths=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - visible=None, + arrangement: Any | None = None, + bundlecolors: bool | None = None, + counts: int | float | None = None, + countssrc: str | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + labelfont: None | None = None, + legendgrouptitle: None | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + sortpaths: Any | None = None, + stream: None | None = None, + tickfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -12533,31 +11961,31 @@ def add_parcats( def add_parcoords( self, - customdata=None, - customdatasrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - ids=None, - idssrc=None, - labelangle=None, - labelfont=None, - labelside=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - rangefont=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + domain: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + labelangle: int | float | None = None, + labelfont: None | None = None, + labelside: Any | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + rangefont: None | None = None, + stream: None | None = None, + tickfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -12742,59 +12170,59 @@ def add_parcoords( def add_pie( self, - automargin=None, - customdata=None, - customdatasrc=None, - direction=None, - dlabel=None, - domain=None, - hole=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - label0=None, - labels=None, - labelssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - pull=None, - pullsrc=None, - rotation=None, - scalegroup=None, - showlegend=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + automargin: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + direction: Any | None = None, + dlabel: int | float | None = None, + domain: None | None = None, + hole: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + insidetextorientation: Any | None = None, + label0: int | float | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + pull: int | float | None = None, + pullsrc: str | None = None, + rotation: int | float | None = None, + scalegroup: str | None = None, + showlegend: bool | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -13147,32 +12575,32 @@ def add_pie( def add_sankey( self, - arrangement=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverlabel=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - link=None, - meta=None, - metasrc=None, - name=None, - node=None, - orientation=None, - selectedpoints=None, - stream=None, - textfont=None, - uid=None, - uirevision=None, - valueformat=None, - valuesuffix=None, - visible=None, + arrangement: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverlabel: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + link: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + node: None | None = None, + orientation: Any | None = None, + selectedpoints: Any | None = None, + stream: None | None = None, + textfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + valueformat: str | None = None, + valuesuffix: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -13369,80 +12797,80 @@ def add_sankey( def add_scatter( self, - alignmentgroup=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - fillgradient=None, - fillpattern=None, - groupnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - selected=None, - selectedpoints=None, - showlegend=None, - stackgaps=None, - stackgroup=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + fillgradient: None | None = None, + fillpattern: None | None = None, + groupnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stackgaps: Any | None = None, + stackgroup: str | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -13987,61 +13415,61 @@ def add_scatter( def add_scatter3d( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - error_z=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - projection=None, - scene=None, - showlegend=None, - stream=None, - surfaceaxis=None, - surfacecolor=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + error_x: None | None = None, + error_y: None | None = None, + error_z: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + projection: None | None = None, + scene: str | None = None, + showlegend: bool | None = None, + stream: None | None = None, + surfaceaxis: Any | None = None, + surfacecolor: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -14423,56 +13851,56 @@ def add_scatter3d( def add_scattercarpet( self, - a=None, - asrc=None, - b=None, - bsrc=None, - carpet=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxis=None, - yaxis=None, - zorder=None, + a: NDArray | None = None, + asrc: str | None = None, + b: NDArray | None = None, + bsrc: str | None = None, + carpet: str | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + xaxis: str | None = None, + yaxis: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -14835,57 +14263,57 @@ def add_scattercarpet( def add_scattergeo( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - fill=None, - fillcolor=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - locationmode=None, - locations=None, - locationssrc=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + geo: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + locationmode: Any | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -15244,69 +14672,69 @@ def add_scattergeo( def add_scattergl( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, row=None, col=None, secondary_y=None, @@ -15756,53 +15184,53 @@ def add_scattergl( def add_scattermap( self, - below=None, - cluster=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + below: str | None = None, + cluster: None | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -16133,53 +15561,53 @@ def add_scattermap( def add_scattermapbox( self, - below=None, - cluster=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + below: str | None = None, + cluster: None | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -16519,59 +15947,59 @@ def add_scattermapbox( def add_scatterpolar( self, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -16941,57 +16369,57 @@ def add_scatterpolar( def add_scatterpolargl( self, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -17358,54 +16786,54 @@ def add_scatterpolargl( def add_scattersmith( self, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - imag=None, - imagsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - real=None, - realsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + imag: NDArray | None = None, + imagsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + real: NDArray | None = None, + realsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -17757,57 +17185,57 @@ def add_scattersmith( def add_scatterternary( self, - a=None, - asrc=None, - b=None, - bsrc=None, - c=None, - cliponaxis=None, - connectgaps=None, - csrc=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - sum=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + a: NDArray | None = None, + asrc: str | None = None, + b: NDArray | None = None, + bsrc: str | None = None, + c: NDArray | None = None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + csrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + sum: int | float | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -18178,46 +17606,46 @@ def add_scatterternary( def add_splom( self, - customdata=None, - customdatasrc=None, - diagonal=None, - dimensions=None, - dimensiondefaults=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - showlowerhalf=None, - showupperhalf=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxes=None, - xhoverformat=None, - yaxes=None, - yhoverformat=None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + diagonal: None | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showlowerhalf: bool | None = None, + showupperhalf: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + xaxes: list | None = None, + xhoverformat: str | None = None, + yaxes: list | None = None, + yhoverformat: str | None = None, row=None, col=None, **kwargs, @@ -18527,65 +17955,65 @@ def add_splom( def add_streamtube( self, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - maxdisplayed=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizeref=None, - starts=None, - stream=None, - text=None, - u=None, - uhoverformat=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - vhoverformat=None, - visible=None, - vsrc=None, - w=None, - whoverformat=None, - wsrc=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + maxdisplayed: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + sizeref: int | float | None = None, + starts: None | None = None, + stream: None | None = None, + text: str | None = None, + u: NDArray | None = None, + uhoverformat: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + usrc: str | None = None, + v: NDArray | None = None, + vhoverformat: str | None = None, + visible: Any | None = None, + vsrc: str | None = None, + w: NDArray | None = None, + whoverformat: str | None = None, + wsrc: str | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -19005,54 +18433,54 @@ def add_streamtube( def add_sunburst( self, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - labels=None, - labelssrc=None, - leaf=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - root=None, - rotation=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + insidetextorientation: Any | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + leaf: None | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + root: None | None = None, + rotation: int | float | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -19397,64 +18825,64 @@ def add_sunburst( def add_surface( self, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - hidesurface=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - surfacecolor=None, - surfacecolorsrc=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hidesurface: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + opacityscale: Any | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + surfacecolor: NDArray | None = None, + surfacecolorsrc: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -19867,31 +19295,31 @@ def add_surface( def add_table( self, - cells=None, - columnorder=None, - columnordersrc=None, - columnwidth=None, - columnwidthsrc=None, - customdata=None, - customdatasrc=None, - domain=None, - header=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - stream=None, - uid=None, - uirevision=None, - visible=None, + cells: None | None = None, + columnorder: NDArray | None = None, + columnordersrc: str | None = None, + columnwidth: int | float | None = None, + columnwidthsrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + header: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + stream: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -20078,54 +19506,54 @@ def add_table( def add_treemap( self, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - root=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + pathbar: None | None = None, + root: None | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + tiling: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, row=None, col=None, **kwargs, @@ -20463,67 +19891,67 @@ def add_treemap( def add_violin( self, - alignmentgroup=None, - bandwidth=None, - box=None, - customdata=None, - customdatasrc=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meanline=None, - meta=None, - metasrc=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - points=None, - quartilemethod=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + bandwidth: int | float | None = None, + box: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + jitter: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meanline: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + pointpos: int | float | None = None, + points: Any | None = None, + quartilemethod: Any | None = None, + scalegroup: str | None = None, + scalemode: Any | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + side: Any | None = None, + span: list | None = None, + spanmode: Any | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -20979,67 +20407,67 @@ def add_violin( def add_volume( self, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuehoverformat=None, - valuesrc=None, - visible=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + caps: None | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + isomax: int | float | None = None, + isomin: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + opacityscale: Any | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + slices: None | None = None, + spaceframe: None | None = None, + stream: None | None = None, + surface: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: NDArray | None = None, + valuehoverformat: str | None = None, + valuesrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, row=None, col=None, **kwargs, @@ -21463,79 +20891,79 @@ def add_volume( def add_waterfall( self, - alignmentgroup=None, - base=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - decreasing=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - measure=None, - measuresrc=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - totals=None, - uid=None, - uirevision=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + base: int | float | None = None, + cliponaxis: bool | None = None, + connector: None | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + measure: NDArray | None = None, + measuresrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + totals: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, row=None, col=None, secondary_y=None, @@ -23483,49 +22911,49 @@ def update_annotations( def add_annotation( self, arg=None, - align=None, - arrowcolor=None, - arrowhead=None, - arrowside=None, - arrowsize=None, - arrowwidth=None, - ax=None, - axref=None, - ay=None, - ayref=None, - bgcolor=None, - bordercolor=None, - borderpad=None, - borderwidth=None, - captureevents=None, - clicktoshow=None, - font=None, - height=None, - hoverlabel=None, - hovertext=None, - name=None, - opacity=None, - showarrow=None, - standoff=None, - startarrowhead=None, - startarrowsize=None, - startstandoff=None, - templateitemname=None, - text=None, - textangle=None, - valign=None, - visible=None, - width=None, - x=None, - xanchor=None, - xclick=None, - xref=None, - xshift=None, - y=None, - yanchor=None, - yclick=None, - yref=None, - yshift=None, + align: Any | None = None, + arrowcolor: str | None = None, + arrowhead: int | None = None, + arrowside: Any | None = None, + arrowsize: int | float | None = None, + arrowwidth: int | float | None = None, + ax: Any | None = None, + axref: Any | None = None, + ay: Any | None = None, + ayref: Any | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderpad: int | float | None = None, + borderwidth: int | float | None = None, + captureevents: bool | None = None, + clicktoshow: Any | None = None, + font: None | None = None, + height: int | float | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + showarrow: bool | None = None, + standoff: int | float | None = None, + startarrowhead: int | None = None, + startarrowsize: int | float | None = None, + startstandoff: int | float | None = None, + templateitemname: str | None = None, + text: str | None = None, + textangle: int | float | None = None, + valign: Any | None = None, + visible: bool | None = None, + width: int | float | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xclick: Any | None = None, + xref: Any | None = None, + xshift: int | float | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yclick: Any | None = None, + yref: Any | None = None, + yshift: int | float | None = None, row=None, col=None, secondary_y=None, @@ -24060,21 +23488,21 @@ def update_layout_images( def add_layout_image( self, arg=None, - layer=None, - name=None, - opacity=None, - sizex=None, - sizey=None, - sizing=None, - source=None, - templateitemname=None, - visible=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, + layer: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + sizex: int | float | None = None, + sizey: int | float | None = None, + sizing: Any | None = None, + source: str | None = None, + templateitemname: str | None = None, + visible: bool | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yref: Any | None = None, row=None, col=None, secondary_y=None, @@ -24387,18 +23815,18 @@ def update_selections( def add_selection( self, arg=None, - line=None, - name=None, - opacity=None, - path=None, - templateitemname=None, - type=None, - x0=None, - x1=None, - xref=None, - y0=None, - y1=None, - yref=None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + path: str | None = None, + templateitemname: str | None = None, + type: Any | None = None, + x0: Any | None = None, + x1: Any | None = None, + xref: Any | None = None, + y0: Any | None = None, + y1: Any | None = None, + yref: Any | None = None, row=None, col=None, secondary_y=None, @@ -24691,38 +24119,38 @@ def update_shapes( def add_shape( self, arg=None, - editable=None, - fillcolor=None, - fillrule=None, - label=None, - layer=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - name=None, - opacity=None, - path=None, - showlegend=None, - templateitemname=None, - type=None, - visible=None, - x0=None, - x0shift=None, - x1=None, - x1shift=None, - xanchor=None, - xref=None, - xsizemode=None, - y0=None, - y0shift=None, - y1=None, - y1shift=None, - yanchor=None, - yref=None, - ysizemode=None, + editable: bool | None = None, + fillcolor: str | None = None, + fillrule: Any | None = None, + label: None | None = None, + layer: Any | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + path: str | None = None, + showlegend: bool | None = None, + templateitemname: str | None = None, + type: Any | None = None, + visible: Any | None = None, + x0: Any | None = None, + x0shift: int | float | None = None, + x1: Any | None = None, + x1shift: int | float | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + xsizemode: Any | None = None, + y0: Any | None = None, + y0shift: int | float | None = None, + y1: Any | None = None, + y1shift: int | float | None = None, + yanchor: Any | None = None, + yref: Any | None = None, + ysizemode: Any | None = None, row=None, col=None, secondary_y=None, diff --git a/plotly/graph_objs/_frame.py b/plotly/graph_objs/_frame.py index a5782f794d..c638a836a5 100644 --- a/plotly/graph_objs/_frame.py +++ b/plotly/graph_objs/_frame.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseFrameHierarchyType as _BaseFrameHierarchyType import copy as _copy class Frame(_BaseFrameHierarchyType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "frame" _valid_props = {"baseframe", "data", "group", "layout", "name", "traces"} - # baseframe - # --------- @property def baseframe(self): """ @@ -34,8 +33,6 @@ def baseframe(self): def baseframe(self, val): self["baseframe"] = val - # data - # ---- @property def data(self): """ @@ -52,8 +49,6 @@ def data(self): def data(self, val): self["data"] = val - # group - # ----- @property def group(self): """ @@ -74,8 +69,6 @@ def group(self): def group(self, val): self["group"] = val - # layout - # ------ @property def layout(self): """ @@ -92,8 +85,6 @@ def layout(self): def layout(self, val): self["layout"] = val - # name - # ---- @property def name(self): """ @@ -113,8 +104,6 @@ def name(self): def name(self, val): self["name"] = val - # traces - # ------ @property def traces(self): """ @@ -133,8 +122,6 @@ def traces(self): def traces(self, val): self["traces"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -163,12 +150,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - baseframe=None, - data=None, - group=None, - layout=None, - name=None, - traces=None, + baseframe: str | None = None, + data: Any | None = None, + group: str | None = None, + layout: Any | None = None, + name: str | None = None, + traces: Any | None = None, **kwargs, ): """ @@ -204,14 +191,11 @@ def __init__( ------- Frame """ - super(Frame, self).__init__("frames") - + super().__init__("frames") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -226,42 +210,14 @@ def __init__( an instance of :class:`plotly.graph_objs.Frame`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("baseframe", None) - _v = baseframe if baseframe is not None else _v - if _v is not None: - self["baseframe"] = _v - _v = arg.pop("data", None) - _v = data if data is not None else _v - if _v is not None: - self["data"] = _v - _v = arg.pop("group", None) - _v = group if group is not None else _v - if _v is not None: - self["group"] = _v - _v = arg.pop("layout", None) - _v = layout if layout is not None else _v - if _v is not None: - self["layout"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("traces", None) - _v = traces if traces is not None else _v - if _v is not None: - self["traces"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("baseframe", arg, baseframe) + self._init_provided("data", arg, data) + self._init_provided("group", arg, group) + self._init_provided("layout", arg, layout) + self._init_provided("name", arg, name) + self._init_provided("traces", arg, traces) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_funnel.py b/plotly/graph_objs/_funnel.py index 020103db49..c3470007ab 100644 --- a/plotly/graph_objs/_funnel.py +++ b/plotly/graph_objs/_funnel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Funnel(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "funnel" _valid_props = { @@ -78,8 +79,6 @@ class Funnel(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -101,8 +100,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -124,8 +121,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # connector - # --------- @property def connector(self): """ @@ -135,18 +130,6 @@ def connector(self): - A dict of string/value properties that will be passed to the Connector constructor - Supported dict properties: - - fillcolor - Sets the fill color. - line - :class:`plotly.graph_objects.funnel.connector.L - ine` instance or dict with compatible - properties - visible - Determines if connector regions and lines are - drawn. - Returns ------- plotly.graph_objs.funnel.Connector @@ -157,8 +140,6 @@ def connector(self): def connector(self, val): self["connector"] = val - # constraintext - # ------------- @property def constraintext(self): """ @@ -179,8 +160,6 @@ def constraintext(self): def constraintext(self, val): self["constraintext"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -194,7 +173,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -202,8 +181,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -223,8 +200,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -243,8 +218,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -263,8 +236,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -281,7 +252,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -289,8 +260,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -310,8 +279,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -321,44 +288,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.funnel.Hoverlabel @@ -369,8 +298,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -407,7 +334,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -415,8 +342,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -436,8 +361,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -454,7 +377,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -462,8 +385,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -483,8 +404,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -497,7 +416,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -505,8 +424,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -525,8 +442,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextanchor - # ---------------- @property def insidetextanchor(self): """ @@ -547,8 +462,6 @@ def insidetextanchor(self): def insidetextanchor(self, val): self["insidetextanchor"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -560,79 +473,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnel.Insidetextfont @@ -643,8 +483,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # legend - # ------ @property def legend(self): """ @@ -668,8 +506,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -691,8 +527,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -702,13 +536,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.funnel.Legendgrouptitle @@ -719,8 +546,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -746,8 +571,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -767,8 +590,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -778,104 +599,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.funnel.marker.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.funnel.marker.Line - ` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - Returns ------- plotly.graph_objs.funnel.Marker @@ -886,8 +609,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -906,7 +627,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -914,8 +635,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -934,8 +653,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -956,8 +673,6 @@ def name(self): def name(self, val): self["name"] = val - # offset - # ------ @property def offset(self): """ @@ -978,8 +693,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -1001,8 +714,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1021,8 +732,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -1047,8 +756,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -1060,79 +767,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnel.Outsidetextfont @@ -1143,8 +777,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1167,8 +799,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1188,8 +818,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1199,18 +827,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.funnel.Stream @@ -1221,8 +837,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1240,7 +854,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1248,8 +862,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -1273,8 +885,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1286,79 +896,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnel.Textfont @@ -1369,8 +906,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1394,8 +929,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1415,7 +948,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1423,8 +956,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1444,8 +975,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1464,8 +993,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1492,7 +1019,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1500,8 +1027,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1521,8 +1046,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1543,8 +1066,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1576,8 +1097,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1599,8 +1118,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -1619,8 +1136,6 @@ def width(self): def width(self, val): self["width"] = val - # x - # - @property def x(self): """ @@ -1631,7 +1146,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1639,8 +1154,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1660,8 +1173,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1685,8 +1196,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1716,8 +1225,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1738,8 +1245,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1761,8 +1266,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1783,8 +1286,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1803,8 +1304,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1815,7 +1314,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1823,8 +1322,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -1844,8 +1341,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1869,8 +1364,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1900,8 +1393,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -1922,8 +1413,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -1945,8 +1434,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -1967,8 +1454,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1987,8 +1472,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2009,14 +1492,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2379,72 +1858,72 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + cliponaxis: bool | None = None, + connector: None | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -2821,14 +2300,11 @@ def __init__( ------- Funnel """ - super(Funnel, self).__init__("funnel") - + super().__init__("funnel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2843,288 +2319,77 @@ def __init__( an instance of :class:`plotly.graph_objs.Funnel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("connector", None) - _v = connector if connector is not None else _v - if _v is not None: - self["connector"] = _v - _v = arg.pop("constraintext", None) - _v = constraintext if constraintext is not None else _v - if _v is not None: - self["constraintext"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextanchor", None) - _v = insidetextanchor if insidetextanchor is not None else _v - if _v is not None: - self["insidetextanchor"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("connector", arg, connector) + self._init_provided("constraintext", arg, constraintext) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextanchor", arg, insidetextanchor) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("offset", arg, offset) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "funnel" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_funnelarea.py b/plotly/graph_objs/_funnelarea.py index 9397fde43d..ea762217b9 100644 --- a/plotly/graph_objs/_funnelarea.py +++ b/plotly/graph_objs/_funnelarea.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Funnelarea(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "funnelarea" _valid_props = { @@ -58,8 +59,6 @@ class Funnelarea(_BaseTraceType): "visible", } - # aspectratio - # ----------- @property def aspectratio(self): """ @@ -78,8 +77,6 @@ def aspectratio(self): def aspectratio(self, val): self["aspectratio"] = val - # baseratio - # --------- @property def baseratio(self): """ @@ -98,8 +95,6 @@ def baseratio(self): def baseratio(self, val): self["baseratio"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -113,7 +108,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -121,8 +116,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -142,8 +135,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dlabel - # ------ @property def dlabel(self): """ @@ -162,8 +153,6 @@ def dlabel(self): def dlabel(self, val): self["dlabel"] = val - # domain - # ------ @property def domain(self): """ @@ -173,23 +162,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this funnelarea - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this funnelarea trace - . - x - Sets the horizontal domain of this funnelarea - trace (in plot fraction). - y - Sets the vertical domain of this funnelarea - trace (in plot fraction). - Returns ------- plotly.graph_objs.funnelarea.Domain @@ -200,8 +172,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -218,7 +188,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -226,8 +196,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -247,8 +215,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -258,44 +224,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.funnelarea.Hoverlabel @@ -306,8 +234,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -344,7 +270,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -352,8 +278,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -373,8 +297,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -391,7 +313,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -399,8 +321,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -420,8 +340,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -434,7 +352,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -442,8 +360,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -462,8 +378,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -475,79 +389,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnelarea.Insidetextfont @@ -558,8 +399,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # label0 - # ------ @property def label0(self): """ @@ -580,8 +419,6 @@ def label0(self): def label0(self, val): self["label0"] = val - # labels - # ------ @property def labels(self): """ @@ -596,7 +433,7 @@ def labels(self): Returns ------- - numpy.ndarray + NDArray """ return self["labels"] @@ -604,8 +441,6 @@ def labels(self): def labels(self, val): self["labels"] = val - # labelssrc - # --------- @property def labelssrc(self): """ @@ -624,8 +459,6 @@ def labelssrc(self): def labelssrc(self, val): self["labelssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -649,8 +482,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -672,8 +503,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -683,13 +512,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.funnelarea.Legendgrouptitle @@ -700,8 +522,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -727,8 +547,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -748,8 +566,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -759,22 +575,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.funnelarea.marker. - Line` instance or dict with compatible - properties - pattern - Sets the pattern within the marker. - Returns ------- plotly.graph_objs.funnelarea.Marker @@ -785,8 +585,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -805,7 +603,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -813,8 +611,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -833,8 +629,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -855,8 +649,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -875,8 +667,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # scalegroup - # ---------- @property def scalegroup(self): """ @@ -898,8 +688,6 @@ def scalegroup(self): def scalegroup(self, val): self["scalegroup"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -919,8 +707,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -930,18 +716,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.funnelarea.Stream @@ -952,8 +726,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -968,7 +740,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -976,8 +748,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -989,79 +759,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnelarea.Textfont @@ -1072,8 +769,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1095,8 +790,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1109,7 +802,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1117,8 +810,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1138,8 +829,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1158,8 +847,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1185,7 +872,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1193,8 +880,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1214,8 +899,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # title - # ----- @property def title(self): """ @@ -1225,16 +908,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets the font used for `title`. - position - Specifies the location of the `title`. - text - Sets the title of the chart. If it is empty, no - title is displayed. - Returns ------- plotly.graph_objs.funnelarea.Title @@ -1245,8 +918,6 @@ def title(self): def title(self, val): self["title"] = val - # uid - # --- @property def uid(self): """ @@ -1267,8 +938,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1300,8 +969,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ @property def values(self): """ @@ -1313,7 +980,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -1321,8 +988,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -1341,8 +1006,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1364,14 +1027,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1611,52 +1270,52 @@ def _prop_descriptions(self): def __init__( self, arg=None, - aspectratio=None, - baseratio=None, - customdata=None, - customdatasrc=None, - dlabel=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - label0=None, - labels=None, - labelssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - scalegroup=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + aspectratio: int | float | None = None, + baseratio: int | float | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dlabel: int | float | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + label0: int | float | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + scalegroup: str | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -1909,14 +1568,11 @@ def __init__( ------- Funnelarea """ - super(Funnelarea, self).__init__("funnelarea") - + super().__init__("funnelarea") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1931,208 +1587,57 @@ def __init__( an instance of :class:`plotly.graph_objs.Funnelarea`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("aspectratio", None) - _v = aspectratio if aspectratio is not None else _v - if _v is not None: - self["aspectratio"] = _v - _v = arg.pop("baseratio", None) - _v = baseratio if baseratio is not None else _v - if _v is not None: - self["baseratio"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dlabel", None) - _v = dlabel if dlabel is not None else _v - if _v is not None: - self["dlabel"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("label0", None) - _v = label0 if label0 is not None else _v - if _v is not None: - self["label0"] = _v - _v = arg.pop("labels", None) - _v = labels if labels is not None else _v - if _v is not None: - self["labels"] = _v - _v = arg.pop("labelssrc", None) - _v = labelssrc if labelssrc is not None else _v - if _v is not None: - self["labelssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("scalegroup", None) - _v = scalegroup if scalegroup is not None else _v - if _v is not None: - self["scalegroup"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("aspectratio", arg, aspectratio) + self._init_provided("baseratio", arg, baseratio) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dlabel", arg, dlabel) + self._init_provided("domain", arg, domain) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("label0", arg, label0) + self._init_provided("labels", arg, labels) + self._init_provided("labelssrc", arg, labelssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("scalegroup", arg, scalegroup) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("title", arg, title) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._props["type"] = "funnelarea" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_heatmap.py b/plotly/graph_objs/_heatmap.py index cd1b72c1e1..524182cc97 100644 --- a/plotly/graph_objs/_heatmap.py +++ b/plotly/graph_objs/_heatmap.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Heatmap(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "heatmap" _valid_props = { @@ -83,8 +84,6 @@ class Heatmap(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -108,8 +107,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -135,8 +132,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -146,272 +141,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmap.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmap.colorbar.T - itle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.heatmap.ColorBar @@ -422,8 +151,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -475,8 +202,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -498,8 +223,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -513,7 +236,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -521,8 +244,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -542,8 +263,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -562,8 +281,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -582,8 +299,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -600,7 +315,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -608,8 +323,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -629,8 +342,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -640,44 +351,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.heatmap.Hoverlabel @@ -688,8 +361,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoverongaps - # ----------- @property def hoverongaps(self): """ @@ -709,8 +380,6 @@ def hoverongaps(self): def hoverongaps(self, val): self["hoverongaps"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -745,7 +414,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -753,8 +422,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -774,8 +441,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -786,7 +451,7 @@ def hovertext(self): Returns ------- - numpy.ndarray + NDArray """ return self["hovertext"] @@ -794,8 +459,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -815,8 +478,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -829,7 +490,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -837,8 +498,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -857,8 +516,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -882,8 +539,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -905,8 +560,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -916,13 +569,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.heatmap.Legendgrouptitle @@ -933,8 +579,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -960,8 +604,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -981,8 +623,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # meta - # ---- @property def meta(self): """ @@ -1001,7 +641,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1009,8 +649,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1029,8 +667,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1051,8 +687,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1071,8 +705,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1093,8 +725,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1114,8 +744,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1135,8 +763,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1146,18 +772,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.heatmap.Stream @@ -1168,8 +782,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1180,7 +792,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1188,8 +800,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1201,52 +811,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.heatmap.Textfont @@ -1257,8 +821,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1277,8 +839,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1311,8 +871,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # transpose - # --------- @property def transpose(self): """ @@ -1331,8 +889,6 @@ def transpose(self): def transpose(self, val): self["transpose"] = val - # uid - # --- @property def uid(self): """ @@ -1353,8 +909,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1386,8 +940,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1409,8 +961,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1421,7 +971,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1429,8 +979,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1450,8 +998,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1475,8 +1021,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1499,8 +1043,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xgap - # ---- @property def xgap(self): """ @@ -1519,8 +1061,6 @@ def xgap(self): def xgap(self, val): self["xgap"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1550,8 +1090,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1572,8 +1110,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1595,8 +1131,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1617,8 +1151,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1637,8 +1169,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # xtype - # ----- @property def xtype(self): """ @@ -1661,8 +1191,6 @@ def xtype(self): def xtype(self, val): self["xtype"] = val - # y - # - @property def y(self): """ @@ -1673,7 +1201,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1681,8 +1209,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -1702,8 +1228,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1727,8 +1251,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1751,8 +1273,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # ygap - # ---- @property def ygap(self): """ @@ -1771,8 +1291,6 @@ def ygap(self): def ygap(self, val): self["ygap"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1802,8 +1320,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -1824,8 +1340,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -1847,8 +1361,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -1869,8 +1381,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1889,8 +1399,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # ytype - # ----- @property def ytype(self): """ @@ -1913,8 +1421,6 @@ def ytype(self): def ytype(self, val): self["ytype"] = val - # z - # - @property def z(self): """ @@ -1925,7 +1431,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1933,8 +1439,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1956,8 +1460,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1981,8 +1483,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zmax - # ---- @property def zmax(self): """ @@ -2002,8 +1502,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -2024,8 +1522,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -2045,8 +1541,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2067,8 +1561,6 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # zsmooth - # ------- @property def zsmooth(self): """ @@ -2088,8 +1580,6 @@ def zsmooth(self): def zsmooth(self, val): self["zsmooth"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -2108,14 +1598,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2484,77 +1970,77 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoverongaps=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textfont=None, - textsrc=None, - texttemplate=None, - transpose=None, - uid=None, - uirevision=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xgap=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - xtype=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - ygap=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - ytype=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zorder=None, - zsmooth=None, - zsrc=None, + autocolorscale: bool | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoverongaps: bool | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + transpose: bool | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xgap: int | float | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + xtype: Any | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + ygap: int | float | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + ytype: Any | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zorder: int | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2948,14 +2434,11 @@ def __init__( ------- Heatmap """ - super(Heatmap, self).__init__("heatmap") - + super().__init__("heatmap") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2970,308 +2453,82 @@ def __init__( an instance of :class:`plotly.graph_objs.Heatmap`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoverongaps", None) - _v = hoverongaps if hoverongaps is not None else _v - if _v is not None: - self["hoverongaps"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("transpose", None) - _v = transpose if transpose is not None else _v - if _v is not None: - self["transpose"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xgap", None) - _v = xgap if xgap is not None else _v - if _v is not None: - self["xgap"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("xtype", None) - _v = xtype if xtype is not None else _v - if _v is not None: - self["xtype"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("ygap", None) - _v = ygap if ygap is not None else _v - if _v is not None: - self["ygap"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("ytype", None) - _v = ytype if ytype is not None else _v - if _v is not None: - self["ytype"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - _v = arg.pop("zsmooth", None) - _v = zsmooth if zsmooth is not None else _v - if _v is not None: - self["zsmooth"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoverongaps", arg, hoverongaps) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("transpose", arg, transpose) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xgap", arg, xgap) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("xtype", arg, xtype) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("ygap", arg, ygap) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("ytype", arg, ytype) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zorder", arg, zorder) + self._init_provided("zsmooth", arg, zsmooth) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "heatmap" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_histogram.py b/plotly/graph_objs/_histogram.py index 19fc25e00c..700a627b55 100644 --- a/plotly/graph_objs/_histogram.py +++ b/plotly/graph_objs/_histogram.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Histogram(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "histogram" _valid_props = { @@ -78,8 +79,6 @@ class Histogram(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -101,8 +100,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # autobinx - # -------- @property def autobinx(self): """ @@ -124,8 +121,6 @@ def autobinx(self): def autobinx(self, val): self["autobinx"] = val - # autobiny - # -------- @property def autobiny(self): """ @@ -147,8 +142,6 @@ def autobiny(self): def autobiny(self, val): self["autobiny"] = val - # bingroup - # -------- @property def bingroup(self): """ @@ -174,8 +167,6 @@ def bingroup(self): def bingroup(self, val): self["bingroup"] = val - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -197,8 +188,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # constraintext - # ------------- @property def constraintext(self): """ @@ -219,8 +208,6 @@ def constraintext(self): def constraintext(self, val): self["constraintext"] = val - # cumulative - # ---------- @property def cumulative(self): """ @@ -230,35 +217,6 @@ def cumulative(self): - A dict of string/value properties that will be passed to the Cumulative constructor - Supported dict properties: - - currentbin - Only applies if cumulative is enabled. Sets - whether the current bin is included, excluded, - or has half of its value included in the - current cumulative value. "include" is the - default for compatibility with various other - tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half- - bin bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If - "increasing" (default) we sum all prior bins, - so the result increases from left to right. If - "decreasing" we sum later bins so the result - decreases from left to right. - enabled - If true, display the cumulative distribution by - summing the binned values. Use the `direction` - and `centralbin` attributes to tune the - accumulation method. Note: in this mode, the - "density" `histnorm` settings behave the same - as their equivalents without "density": "" and - "density" both rise to the number of data - points, and "probability" and *probability - density* both rise to the number of sample - points. - Returns ------- plotly.graph_objs.histogram.Cumulative @@ -269,8 +227,6 @@ def cumulative(self): def cumulative(self, val): self["cumulative"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -284,7 +240,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -292,8 +248,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -313,8 +267,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # error_x - # ------- @property def error_x(self): """ @@ -324,66 +276,6 @@ def error_x(self): - A dict of string/value properties that will be passed to the ErrorX constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.histogram.ErrorX @@ -394,8 +286,6 @@ def error_x(self): def error_x(self, val): self["error_x"] = val - # error_y - # ------- @property def error_y(self): """ @@ -405,64 +295,6 @@ def error_y(self): - A dict of string/value properties that will be passed to the ErrorY constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.histogram.ErrorY @@ -473,8 +305,6 @@ def error_y(self): def error_y(self, val): self["error_y"] = val - # histfunc - # -------- @property def histfunc(self): """ @@ -499,8 +329,6 @@ def histfunc(self): def histfunc(self, val): self["histfunc"] = val - # histnorm - # -------- @property def histnorm(self): """ @@ -533,8 +361,6 @@ def histnorm(self): def histnorm(self, val): self["histnorm"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -551,7 +377,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -559,8 +385,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -580,8 +404,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -591,44 +413,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.histogram.Hoverlabel @@ -639,8 +423,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -676,7 +458,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -684,8 +466,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -705,8 +485,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -719,7 +497,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -727,8 +505,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -748,8 +524,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -762,7 +536,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -770,8 +544,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -790,8 +562,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextanchor - # ---------------- @property def insidetextanchor(self): """ @@ -812,8 +582,6 @@ def insidetextanchor(self): def insidetextanchor(self, val): self["insidetextanchor"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -825,52 +593,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram.Insidetextfont @@ -881,8 +603,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # legend - # ------ @property def legend(self): """ @@ -906,8 +626,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -929,8 +647,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -940,13 +656,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.histogram.Legendgrouptitle @@ -957,8 +666,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -984,8 +691,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1005,8 +710,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -1016,114 +719,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - cornerradius - Sets the rounding of corners. May be an integer - number of pixels, or a percentage of bar width - (as a string ending in %). Defaults to - `layout.barcornerradius`. In stack or relative - barmode, the first trace to set cornerradius is - used for the whole stack. - line - :class:`plotly.graph_objects.histogram.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - Returns ------- plotly.graph_objs.histogram.Marker @@ -1134,8 +729,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1154,7 +747,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1162,8 +755,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1182,8 +773,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1204,8 +793,6 @@ def name(self): def name(self, val): self["name"] = val - # nbinsx - # ------ @property def nbinsx(self): """ @@ -1228,8 +815,6 @@ def nbinsx(self): def nbinsx(self, val): self["nbinsx"] = val - # nbinsy - # ------ @property def nbinsy(self): """ @@ -1252,8 +837,6 @@ def nbinsy(self): def nbinsy(self, val): self["nbinsy"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -1275,8 +858,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1295,8 +876,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -1317,8 +896,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -1330,52 +907,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram.Outsidetextfont @@ -1386,8 +917,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # selected - # -------- @property def selected(self): """ @@ -1397,17 +926,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.histogram.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.selected - .Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.histogram.Selected @@ -1418,8 +936,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1442,8 +958,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1463,8 +977,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1474,18 +986,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.histogram.Stream @@ -1496,8 +996,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1513,7 +1011,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1521,8 +1019,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -1546,8 +1042,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1559,52 +1053,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram.Textfont @@ -1615,8 +1063,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1643,8 +1089,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1663,8 +1107,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1697,8 +1139,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # uid - # --- @property def uid(self): """ @@ -1719,8 +1159,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1752,8 +1190,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1763,17 +1199,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.histogram.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.unselect - ed.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.histogram.Unselected @@ -1784,8 +1209,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1807,8 +1230,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1819,7 +1240,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1827,8 +1248,6 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1852,8 +1271,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xbins - # ----- @property def xbins(self): """ @@ -1863,53 +1280,6 @@ def xbins(self): - A dict of string/value properties that will be passed to the XBins constructor - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. - Returns ------- plotly.graph_objs.histogram.XBins @@ -1920,8 +1290,6 @@ def xbins(self): def xbins(self, val): self["xbins"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1944,8 +1312,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1975,8 +1341,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1995,8 +1359,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -2007,7 +1369,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -2015,8 +1377,6 @@ def y(self): def y(self, val): self["y"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -2040,8 +1400,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ybins - # ----- @property def ybins(self): """ @@ -2051,53 +1409,6 @@ def ybins(self): - A dict of string/value properties that will be passed to the YBins constructor - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. - Returns ------- plotly.graph_objs.histogram.YBins @@ -2108,8 +1419,6 @@ def ybins(self): def ybins(self, val): self["ybins"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -2132,8 +1441,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -2163,8 +1470,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2183,8 +1488,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2205,14 +1508,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2581,72 +1880,72 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - autobinx=None, - autobiny=None, - bingroup=None, - cliponaxis=None, - constraintext=None, - cumulative=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - offsetgroup=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - xaxis=None, - xbins=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybins=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + autobinx: bool | None = None, + autobiny: bool | None = None, + bingroup: str | None = None, + cliponaxis: bool | None = None, + constraintext: Any | None = None, + cumulative: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + error_x: None | None = None, + error_y: None | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -3028,14 +2327,11 @@ def __init__( ------- Histogram """ - super(Histogram, self).__init__("histogram") - + super().__init__("histogram") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3050,288 +2346,77 @@ def __init__( an instance of :class:`plotly.graph_objs.Histogram`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("autobinx", None) - _v = autobinx if autobinx is not None else _v - if _v is not None: - self["autobinx"] = _v - _v = arg.pop("autobiny", None) - _v = autobiny if autobiny is not None else _v - if _v is not None: - self["autobiny"] = _v - _v = arg.pop("bingroup", None) - _v = bingroup if bingroup is not None else _v - if _v is not None: - self["bingroup"] = _v - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("constraintext", None) - _v = constraintext if constraintext is not None else _v - if _v is not None: - self["constraintext"] = _v - _v = arg.pop("cumulative", None) - _v = cumulative if cumulative is not None else _v - if _v is not None: - self["cumulative"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("error_x", None) - _v = error_x if error_x is not None else _v - if _v is not None: - self["error_x"] = _v - _v = arg.pop("error_y", None) - _v = error_y if error_y is not None else _v - if _v is not None: - self["error_y"] = _v - _v = arg.pop("histfunc", None) - _v = histfunc if histfunc is not None else _v - if _v is not None: - self["histfunc"] = _v - _v = arg.pop("histnorm", None) - _v = histnorm if histnorm is not None else _v - if _v is not None: - self["histnorm"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextanchor", None) - _v = insidetextanchor if insidetextanchor is not None else _v - if _v is not None: - self["insidetextanchor"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("nbinsx", None) - _v = nbinsx if nbinsx is not None else _v - if _v is not None: - self["nbinsx"] = _v - _v = arg.pop("nbinsy", None) - _v = nbinsy if nbinsy is not None else _v - if _v is not None: - self["nbinsy"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xbins", None) - _v = xbins if xbins is not None else _v - if _v is not None: - self["xbins"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ybins", None) - _v = ybins if ybins is not None else _v - if _v is not None: - self["ybins"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("autobinx", arg, autobinx) + self._init_provided("autobiny", arg, autobiny) + self._init_provided("bingroup", arg, bingroup) + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("constraintext", arg, constraintext) + self._init_provided("cumulative", arg, cumulative) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("error_x", arg, error_x) + self._init_provided("error_y", arg, error_y) + self._init_provided("histfunc", arg, histfunc) + self._init_provided("histnorm", arg, histnorm) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextanchor", arg, insidetextanchor) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("nbinsx", arg, nbinsx) + self._init_provided("nbinsy", arg, nbinsy) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xbins", arg, xbins) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ybins", arg, ybins) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "histogram" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_histogram2d.py b/plotly/graph_objs/_histogram2d.py index 16b64a1fbc..d43d3f272c 100644 --- a/plotly/graph_objs/_histogram2d.py +++ b/plotly/graph_objs/_histogram2d.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Histogram2d(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "histogram2d" _valid_props = { @@ -75,8 +76,6 @@ class Histogram2d(_BaseTraceType): "zsrc", } - # autobinx - # -------- @property def autobinx(self): """ @@ -98,8 +97,6 @@ def autobinx(self): def autobinx(self, val): self["autobinx"] = val - # autobiny - # -------- @property def autobiny(self): """ @@ -121,8 +118,6 @@ def autobiny(self): def autobiny(self, val): self["autobiny"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -146,8 +141,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # bingroup - # -------- @property def bingroup(self): """ @@ -169,8 +162,6 @@ def bingroup(self): def bingroup(self, val): self["bingroup"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -196,8 +187,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -207,273 +196,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2d.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2d.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - histogram2d.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2d.colorb - ar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.histogram2d.ColorBar @@ -484,8 +206,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -537,8 +257,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -552,7 +270,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -560,8 +278,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -581,8 +297,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # histfunc - # -------- @property def histfunc(self): """ @@ -607,8 +321,6 @@ def histfunc(self): def histfunc(self, val): self["histfunc"] = val - # histnorm - # -------- @property def histnorm(self): """ @@ -641,8 +353,6 @@ def histnorm(self): def histnorm(self, val): self["histnorm"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -659,7 +369,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -667,8 +377,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -688,8 +396,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -699,44 +405,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.histogram2d.Hoverlabel @@ -747,8 +415,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -784,7 +450,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -792,8 +458,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -813,8 +477,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # ids - # --- @property def ids(self): """ @@ -827,7 +489,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -835,8 +497,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -855,8 +515,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -880,8 +538,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -903,8 +559,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -914,13 +568,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.histogram2d.Legendgrouptitle @@ -931,8 +578,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -958,8 +603,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -979,8 +622,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -990,14 +631,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - Returns ------- plotly.graph_objs.histogram2d.Marker @@ -1008,8 +641,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1028,7 +659,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1036,8 +667,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1056,8 +685,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1078,8 +705,6 @@ def name(self): def name(self, val): self["name"] = val - # nbinsx - # ------ @property def nbinsx(self): """ @@ -1102,8 +727,6 @@ def nbinsx(self): def nbinsx(self, val): self["nbinsx"] = val - # nbinsy - # ------ @property def nbinsy(self): """ @@ -1126,8 +749,6 @@ def nbinsy(self): def nbinsy(self, val): self["nbinsy"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1146,8 +767,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1168,8 +787,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1189,8 +806,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1210,8 +825,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1221,18 +834,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.histogram2d.Stream @@ -1243,8 +844,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1256,52 +855,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2d.Textfont @@ -1312,8 +865,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1345,8 +896,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # uid - # --- @property def uid(self): """ @@ -1367,8 +916,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1400,8 +947,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1423,8 +968,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1435,7 +978,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1443,8 +986,6 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1468,8 +1009,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xbingroup - # --------- @property def xbingroup(self): """ @@ -1493,8 +1032,6 @@ def xbingroup(self): def xbingroup(self, val): self["xbingroup"] = val - # xbins - # ----- @property def xbins(self): """ @@ -1504,43 +1041,6 @@ def xbins(self): - A dict of string/value properties that will be passed to the XBins constructor - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - Returns ------- plotly.graph_objs.histogram2d.XBins @@ -1551,8 +1051,6 @@ def xbins(self): def xbins(self, val): self["xbins"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1575,8 +1073,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xgap - # ---- @property def xgap(self): """ @@ -1595,8 +1091,6 @@ def xgap(self): def xgap(self, val): self["xgap"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1626,8 +1120,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1646,8 +1138,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1658,7 +1148,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1666,8 +1156,6 @@ def y(self): def y(self, val): self["y"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1691,8 +1179,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ybingroup - # --------- @property def ybingroup(self): """ @@ -1716,8 +1202,6 @@ def ybingroup(self): def ybingroup(self, val): self["ybingroup"] = val - # ybins - # ----- @property def ybins(self): """ @@ -1727,43 +1211,6 @@ def ybins(self): - A dict of string/value properties that will be passed to the YBins constructor - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - Returns ------- plotly.graph_objs.histogram2d.YBins @@ -1774,8 +1221,6 @@ def ybins(self): def ybins(self, val): self["ybins"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1798,8 +1243,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # ygap - # ---- @property def ygap(self): """ @@ -1818,8 +1261,6 @@ def ygap(self): def ygap(self, val): self["ygap"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1849,8 +1290,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1869,8 +1308,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1881,7 +1318,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1889,8 +1326,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -1912,8 +1347,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1937,8 +1370,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zmax - # ---- @property def zmax(self): """ @@ -1958,8 +1389,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -1980,8 +1409,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -2001,8 +1428,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsmooth - # ------- @property def zsmooth(self): """ @@ -2022,8 +1447,6 @@ def zsmooth(self): def zsmooth(self, val): self["zsmooth"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -2042,14 +1465,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2414,69 +1833,69 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autobinx=None, - autobiny=None, - autocolorscale=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - textfont=None, - texttemplate=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xgap=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - ygap=None, - yhoverformat=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsmooth=None, - zsrc=None, + autobinx: bool | None = None, + autobiny: bool | None = None, + autocolorscale: bool | None = None, + bingroup: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + textfont: None | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbingroup: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xgap: int | float | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybingroup: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + ygap: int | float | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2855,14 +2274,11 @@ def __init__( ------- Histogram2d """ - super(Histogram2d, self).__init__("histogram2d") - + super().__init__("histogram2d") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2877,276 +2293,74 @@ def __init__( an instance of :class:`plotly.graph_objs.Histogram2d`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autobinx", None) - _v = autobinx if autobinx is not None else _v - if _v is not None: - self["autobinx"] = _v - _v = arg.pop("autobiny", None) - _v = autobiny if autobiny is not None else _v - if _v is not None: - self["autobiny"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("bingroup", None) - _v = bingroup if bingroup is not None else _v - if _v is not None: - self["bingroup"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("histfunc", None) - _v = histfunc if histfunc is not None else _v - if _v is not None: - self["histfunc"] = _v - _v = arg.pop("histnorm", None) - _v = histnorm if histnorm is not None else _v - if _v is not None: - self["histnorm"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("nbinsx", None) - _v = nbinsx if nbinsx is not None else _v - if _v is not None: - self["nbinsx"] = _v - _v = arg.pop("nbinsy", None) - _v = nbinsy if nbinsy is not None else _v - if _v is not None: - self["nbinsy"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xbingroup", None) - _v = xbingroup if xbingroup is not None else _v - if _v is not None: - self["xbingroup"] = _v - _v = arg.pop("xbins", None) - _v = xbins if xbins is not None else _v - if _v is not None: - self["xbins"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xgap", None) - _v = xgap if xgap is not None else _v - if _v is not None: - self["xgap"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ybingroup", None) - _v = ybingroup if ybingroup is not None else _v - if _v is not None: - self["ybingroup"] = _v - _v = arg.pop("ybins", None) - _v = ybins if ybins is not None else _v - if _v is not None: - self["ybins"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("ygap", None) - _v = ygap if ygap is not None else _v - if _v is not None: - self["ygap"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsmooth", None) - _v = zsmooth if zsmooth is not None else _v - if _v is not None: - self["zsmooth"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autobinx", arg, autobinx) + self._init_provided("autobiny", arg, autobiny) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("bingroup", arg, bingroup) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("histfunc", arg, histfunc) + self._init_provided("histnorm", arg, histnorm) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("nbinsx", arg, nbinsx) + self._init_provided("nbinsy", arg, nbinsy) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("textfont", arg, textfont) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xbingroup", arg, xbingroup) + self._init_provided("xbins", arg, xbins) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xgap", arg, xgap) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ybingroup", arg, ybingroup) + self._init_provided("ybins", arg, ybins) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("ygap", arg, ygap) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsmooth", arg, zsmooth) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "histogram2d" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_histogram2dcontour.py b/plotly/graph_objs/_histogram2dcontour.py index aedd85a1cb..6cd0e9ae90 100644 --- a/plotly/graph_objs/_histogram2dcontour.py +++ b/plotly/graph_objs/_histogram2dcontour.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Histogram2dContour(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "histogram2dcontour" _valid_props = { @@ -76,8 +77,6 @@ class Histogram2dContour(_BaseTraceType): "zsrc", } - # autobinx - # -------- @property def autobinx(self): """ @@ -99,8 +98,6 @@ def autobinx(self): def autobinx(self, val): self["autobinx"] = val - # autobiny - # -------- @property def autobiny(self): """ @@ -122,8 +119,6 @@ def autobiny(self): def autobiny(self, val): self["autobiny"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -147,8 +142,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # autocontour - # ----------- @property def autocontour(self): """ @@ -170,8 +163,6 @@ def autocontour(self): def autocontour(self, val): self["autocontour"] = val - # bingroup - # -------- @property def bingroup(self): """ @@ -193,8 +184,6 @@ def bingroup(self): def bingroup(self, val): self["bingroup"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -220,8 +209,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -231,273 +218,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2dcontour.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2dcontour.colorbar.tickformatstopdef - aults), sets the default property values to use - for elements of - histogram2dcontour.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2dcontour - .colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.histogram2dcontour.ColorBar @@ -508,8 +228,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -561,8 +279,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contours - # -------- @property def contours(self): """ @@ -572,72 +288,6 @@ def contours(self): - A dict of string/value properties that will be passed to the Contours constructor - Supported dict properties: - - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. - Returns ------- plotly.graph_objs.histogram2dcontour.Contours @@ -648,8 +298,6 @@ def contours(self): def contours(self, val): self["contours"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -663,7 +311,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -671,8 +319,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -692,8 +338,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # histfunc - # -------- @property def histfunc(self): """ @@ -718,8 +362,6 @@ def histfunc(self): def histfunc(self, val): self["histfunc"] = val - # histnorm - # -------- @property def histnorm(self): """ @@ -752,8 +394,6 @@ def histnorm(self): def histnorm(self, val): self["histnorm"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -770,7 +410,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -778,8 +418,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -799,8 +437,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -810,44 +446,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.histogram2dcontour.Hoverlabel @@ -858,8 +456,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -895,7 +491,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -903,8 +499,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -924,8 +518,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # ids - # --- @property def ids(self): """ @@ -938,7 +530,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -946,8 +538,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -966,8 +556,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -991,8 +579,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -1014,8 +600,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1025,13 +609,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.histogram2dcontour.Legendgrouptitle @@ -1042,8 +619,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1069,8 +644,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1090,8 +663,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -1101,23 +672,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) - Returns ------- plotly.graph_objs.histogram2dcontour.Line @@ -1128,8 +682,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -1139,14 +691,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - Returns ------- plotly.graph_objs.histogram2dcontour.Marker @@ -1157,8 +701,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1177,7 +719,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1185,8 +727,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1205,8 +745,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1227,8 +765,6 @@ def name(self): def name(self, val): self["name"] = val - # nbinsx - # ------ @property def nbinsx(self): """ @@ -1251,8 +787,6 @@ def nbinsx(self): def nbinsx(self, val): self["nbinsx"] = val - # nbinsy - # ------ @property def nbinsy(self): """ @@ -1275,8 +809,6 @@ def nbinsy(self): def nbinsy(self, val): self["nbinsy"] = val - # ncontours - # --------- @property def ncontours(self): """ @@ -1299,8 +831,6 @@ def ncontours(self): def ncontours(self, val): self["ncontours"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1319,8 +849,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1341,8 +869,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1362,8 +888,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1383,8 +907,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1394,18 +916,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.histogram2dcontour.Stream @@ -1416,8 +926,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1430,52 +938,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2dcontour.Textfont @@ -1486,8 +948,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1521,8 +981,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # uid - # --- @property def uid(self): """ @@ -1543,8 +1001,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1576,8 +1032,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1599,8 +1053,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1611,7 +1063,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1619,8 +1071,6 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1644,8 +1094,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xbingroup - # --------- @property def xbingroup(self): """ @@ -1669,8 +1117,6 @@ def xbingroup(self): def xbingroup(self, val): self["xbingroup"] = val - # xbins - # ----- @property def xbins(self): """ @@ -1680,43 +1126,6 @@ def xbins(self): - A dict of string/value properties that will be passed to the XBins constructor - Supported dict properties: - - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - Returns ------- plotly.graph_objs.histogram2dcontour.XBins @@ -1727,8 +1136,6 @@ def xbins(self): def xbins(self, val): self["xbins"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1751,8 +1158,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1782,8 +1187,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1802,8 +1205,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1814,7 +1215,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1822,8 +1223,6 @@ def y(self): def y(self, val): self["y"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1847,8 +1246,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ybingroup - # --------- @property def ybingroup(self): """ @@ -1872,8 +1269,6 @@ def ybingroup(self): def ybingroup(self, val): self["ybingroup"] = val - # ybins - # ----- @property def ybins(self): """ @@ -1883,43 +1278,6 @@ def ybins(self): - A dict of string/value properties that will be passed to the YBins constructor - Supported dict properties: - - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. - Returns ------- plotly.graph_objs.histogram2dcontour.YBins @@ -1930,8 +1288,6 @@ def ybins(self): def ybins(self, val): self["ybins"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1954,8 +1310,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1985,8 +1339,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2005,8 +1357,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -2017,7 +1367,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -2025,8 +1375,6 @@ def z(self): def z(self, val): self["z"] = val - # zauto - # ----- @property def zauto(self): """ @@ -2048,8 +1396,6 @@ def zauto(self): def zauto(self, val): self["zauto"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -2073,8 +1419,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zmax - # ---- @property def zmax(self): """ @@ -2094,8 +1438,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmid - # ---- @property def zmid(self): """ @@ -2116,8 +1458,6 @@ def zmid(self): def zmid(self, val): self["zmid"] = val - # zmin - # ---- @property def zmin(self): """ @@ -2137,8 +1477,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -2157,14 +1495,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2542,70 +1876,70 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autobinx=None, - autobiny=None, - autocolorscale=None, - autocontour=None, - bingroup=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contours=None, - customdata=None, - customdatasrc=None, - histfunc=None, - histnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - name=None, - nbinsx=None, - nbinsy=None, - ncontours=None, - opacity=None, - reversescale=None, - showlegend=None, - showscale=None, - stream=None, - textfont=None, - texttemplate=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xbingroup=None, - xbins=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - yaxis=None, - ybingroup=None, - ybins=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zauto=None, - zhoverformat=None, - zmax=None, - zmid=None, - zmin=None, - zsrc=None, + autobinx: bool | None = None, + autobiny: bool | None = None, + autocolorscale: bool | None = None, + autocontour: bool | None = None, + bingroup: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + histfunc: Any | None = None, + histnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + nbinsx: int | None = None, + nbinsy: int | None = None, + ncontours: int | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + textfont: None | None = None, + texttemplate: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xbingroup: str | None = None, + xbins: None | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yaxis: str | None = None, + ybingroup: str | None = None, + ybins: None | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zauto: bool | None = None, + zhoverformat: str | None = None, + zmax: int | float | None = None, + zmid: int | float | None = None, + zmin: int | float | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2998,14 +2332,11 @@ def __init__( ------- Histogram2dContour """ - super(Histogram2dContour, self).__init__("histogram2dcontour") - + super().__init__("histogram2dcontour") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3020,280 +2351,75 @@ def __init__( an instance of :class:`plotly.graph_objs.Histogram2dContour`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autobinx", None) - _v = autobinx if autobinx is not None else _v - if _v is not None: - self["autobinx"] = _v - _v = arg.pop("autobiny", None) - _v = autobiny if autobiny is not None else _v - if _v is not None: - self["autobiny"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("autocontour", None) - _v = autocontour if autocontour is not None else _v - if _v is not None: - self["autocontour"] = _v - _v = arg.pop("bingroup", None) - _v = bingroup if bingroup is not None else _v - if _v is not None: - self["bingroup"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("contours", None) - _v = contours if contours is not None else _v - if _v is not None: - self["contours"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("histfunc", None) - _v = histfunc if histfunc is not None else _v - if _v is not None: - self["histfunc"] = _v - _v = arg.pop("histnorm", None) - _v = histnorm if histnorm is not None else _v - if _v is not None: - self["histnorm"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("nbinsx", None) - _v = nbinsx if nbinsx is not None else _v - if _v is not None: - self["nbinsx"] = _v - _v = arg.pop("nbinsy", None) - _v = nbinsy if nbinsy is not None else _v - if _v is not None: - self["nbinsy"] = _v - _v = arg.pop("ncontours", None) - _v = ncontours if ncontours is not None else _v - if _v is not None: - self["ncontours"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xbingroup", None) - _v = xbingroup if xbingroup is not None else _v - if _v is not None: - self["xbingroup"] = _v - _v = arg.pop("xbins", None) - _v = xbins if xbins is not None else _v - if _v is not None: - self["xbins"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ybingroup", None) - _v = ybingroup if ybingroup is not None else _v - if _v is not None: - self["ybingroup"] = _v - _v = arg.pop("ybins", None) - _v = ybins if ybins is not None else _v - if _v is not None: - self["ybins"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zauto", None) - _v = zauto if zauto is not None else _v - if _v is not None: - self["zauto"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmid", None) - _v = zmid if zmid is not None else _v - if _v is not None: - self["zmid"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autobinx", arg, autobinx) + self._init_provided("autobiny", arg, autobiny) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("autocontour", arg, autocontour) + self._init_provided("bingroup", arg, bingroup) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("contours", arg, contours) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("histfunc", arg, histfunc) + self._init_provided("histnorm", arg, histnorm) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("nbinsx", arg, nbinsx) + self._init_provided("nbinsy", arg, nbinsy) + self._init_provided("ncontours", arg, ncontours) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("textfont", arg, textfont) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xbingroup", arg, xbingroup) + self._init_provided("xbins", arg, xbins) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ybingroup", arg, ybingroup) + self._init_provided("ybins", arg, ybins) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zauto", arg, zauto) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmid", arg, zmid) + self._init_provided("zmin", arg, zmin) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "histogram2dcontour" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_icicle.py b/plotly/graph_objs/_icicle.py index da989e61f2..a9565149e3 100644 --- a/plotly/graph_objs/_icicle.py +++ b/plotly/graph_objs/_icicle.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Icicle(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "icicle" _valid_props = { @@ -61,8 +62,6 @@ class Icicle(_BaseTraceType): "visible", } - # branchvalues - # ------------ @property def branchvalues(self): """ @@ -87,8 +86,6 @@ def branchvalues(self): def branchvalues(self, val): self["branchvalues"] = val - # count - # ----- @property def count(self): """ @@ -111,8 +108,6 @@ def count(self): def count(self, val): self["count"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -126,7 +121,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -134,8 +129,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -155,8 +148,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ @property def domain(self): """ @@ -166,21 +157,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this icicle trace . - row - If there is a layout grid, use the domain for - this row in the grid for this icicle trace . - x - Sets the horizontal domain of this icicle trace - (in plot fraction). - y - Sets the vertical domain of this icicle trace - (in plot fraction). - Returns ------- plotly.graph_objs.icicle.Domain @@ -191,8 +167,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -209,7 +183,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -217,8 +191,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -238,8 +210,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -249,44 +219,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.icicle.Hoverlabel @@ -297,8 +229,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -336,7 +266,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -344,8 +274,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -365,8 +293,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -383,7 +309,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -391,8 +317,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -412,8 +336,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -426,7 +348,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -434,8 +356,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -454,8 +374,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -467,79 +385,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.icicle.Insidetextfont @@ -550,8 +395,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # labels - # ------ @property def labels(self): """ @@ -562,7 +405,7 @@ def labels(self): Returns ------- - numpy.ndarray + NDArray """ return self["labels"] @@ -570,8 +413,6 @@ def labels(self): def labels(self, val): self["labels"] = val - # labelssrc - # --------- @property def labelssrc(self): """ @@ -590,8 +431,6 @@ def labelssrc(self): def labelssrc(self, val): self["labelssrc"] = val - # leaf - # ---- @property def leaf(self): """ @@ -601,13 +440,6 @@ def leaf(self): - A dict of string/value properties that will be passed to the Leaf constructor - Supported dict properties: - - opacity - Sets the opacity of the leaves. With colorscale - it is defaulted to 1; otherwise it is defaulted - to 0.7 - Returns ------- plotly.graph_objs.icicle.Leaf @@ -618,8 +450,6 @@ def leaf(self): def leaf(self, val): self["leaf"] = val - # legend - # ------ @property def legend(self): """ @@ -643,8 +473,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -654,13 +482,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.icicle.Legendgrouptitle @@ -671,8 +492,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -698,8 +517,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -719,8 +536,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # level - # ----- @property def level(self): """ @@ -741,8 +556,6 @@ def level(self): def level(self, val): self["level"] = val - # marker - # ------ @property def marker(self): """ @@ -752,98 +565,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colors is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colors is - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colors is set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.icicle.marker.Colo - rBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colors is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.icicle.marker.Line - ` instance or dict with compatible properties - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if colors is set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colors is set to a numerical array. - Returns ------- plotly.graph_objs.icicle.Marker @@ -854,8 +575,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # maxdepth - # -------- @property def maxdepth(self): """ @@ -875,8 +594,6 @@ def maxdepth(self): def maxdepth(self, val): self["maxdepth"] = val - # meta - # ---- @property def meta(self): """ @@ -895,7 +612,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -903,8 +620,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -923,8 +638,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -945,8 +658,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -965,8 +676,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -982,79 +691,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.icicle.Outsidetextfont @@ -1065,8 +701,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # parents - # ------- @property def parents(self): """ @@ -1082,7 +716,7 @@ def parents(self): Returns ------- - numpy.ndarray + NDArray """ return self["parents"] @@ -1090,8 +724,6 @@ def parents(self): def parents(self, val): self["parents"] = val - # parentssrc - # ---------- @property def parentssrc(self): """ @@ -1110,8 +742,6 @@ def parentssrc(self): def parentssrc(self, val): self["parentssrc"] = val - # pathbar - # ------- @property def pathbar(self): """ @@ -1121,25 +751,6 @@ def pathbar(self): - A dict of string/value properties that will be passed to the Pathbar constructor - Supported dict properties: - - edgeshape - Determines which shape is used for edges - between `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used - with 3 pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. - outside the trace `domain` and with one pixel - gap. - Returns ------- plotly.graph_objs.icicle.Pathbar @@ -1150,8 +761,6 @@ def pathbar(self): def pathbar(self, val): self["pathbar"] = val - # root - # ---- @property def root(self): """ @@ -1161,14 +770,6 @@ def root(self): - A dict of string/value properties that will be passed to the Root constructor - Supported dict properties: - - color - sets the color of the root node for a - sunburst/treemap/icicle trace. this has no - effect when a colorscale is used to set the - markers. - Returns ------- plotly.graph_objs.icicle.Root @@ -1179,8 +780,6 @@ def root(self): def root(self, val): self["root"] = val - # sort - # ---- @property def sort(self): """ @@ -1200,8 +799,6 @@ def sort(self): def sort(self, val): self["sort"] = val - # stream - # ------ @property def stream(self): """ @@ -1211,18 +808,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.icicle.Stream @@ -1233,8 +818,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1249,7 +832,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1257,8 +840,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1270,79 +851,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.icicle.Textfont @@ -1353,8 +861,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1376,8 +882,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1399,8 +903,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1419,8 +921,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1447,7 +947,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1455,8 +955,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1476,8 +974,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # tiling - # ------ @property def tiling(self): """ @@ -1487,26 +983,6 @@ def tiling(self): - A dict of string/value properties that will be passed to the Tiling constructor - Supported dict properties: - - flip - Determines if the positions obtained from - solver are flipped on each axis. - orientation - When set in conjunction with `tiling.flip`, - determines on which side the root nodes are - drawn in the chart. If `tiling.orientation` is - "v" and `tiling.flip` is "", the root nodes - appear at the top. If `tiling.orientation` is - "v" and `tiling.flip` is "y", the root nodes - appear at the bottom. If `tiling.orientation` - is "h" and `tiling.flip` is "", the root nodes - appear at the left. If `tiling.orientation` is - "h" and `tiling.flip` is "x", the root nodes - appear at the right. - pad - Sets the inner padding (in px). - Returns ------- plotly.graph_objs.icicle.Tiling @@ -1517,8 +993,6 @@ def tiling(self): def tiling(self, val): self["tiling"] = val - # uid - # --- @property def uid(self): """ @@ -1539,8 +1013,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1572,8 +1044,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ @property def values(self): """ @@ -1585,7 +1055,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -1593,8 +1063,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -1613,8 +1081,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1636,14 +1102,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1906,55 +1368,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - leaf=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - root=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + leaf: None | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + pathbar: None | None = None, + root: None | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + tiling: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2228,14 +1690,11 @@ def __init__( ------- Icicle """ - super(Icicle, self).__init__("icicle") - + super().__init__("icicle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2250,220 +1709,60 @@ def __init__( an instance of :class:`plotly.graph_objs.Icicle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("branchvalues", None) - _v = branchvalues if branchvalues is not None else _v - if _v is not None: - self["branchvalues"] = _v - _v = arg.pop("count", None) - _v = count if count is not None else _v - if _v is not None: - self["count"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("labels", None) - _v = labels if labels is not None else _v - if _v is not None: - self["labels"] = _v - _v = arg.pop("labelssrc", None) - _v = labelssrc if labelssrc is not None else _v - if _v is not None: - self["labelssrc"] = _v - _v = arg.pop("leaf", None) - _v = leaf if leaf is not None else _v - if _v is not None: - self["leaf"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("level", None) - _v = level if level is not None else _v - if _v is not None: - self["level"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("maxdepth", None) - _v = maxdepth if maxdepth is not None else _v - if _v is not None: - self["maxdepth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("parents", None) - _v = parents if parents is not None else _v - if _v is not None: - self["parents"] = _v - _v = arg.pop("parentssrc", None) - _v = parentssrc if parentssrc is not None else _v - if _v is not None: - self["parentssrc"] = _v - _v = arg.pop("pathbar", None) - _v = pathbar if pathbar is not None else _v - if _v is not None: - self["pathbar"] = _v - _v = arg.pop("root", None) - _v = root if root is not None else _v - if _v is not None: - self["root"] = _v - _v = arg.pop("sort", None) - _v = sort if sort is not None else _v - if _v is not None: - self["sort"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("tiling", None) - _v = tiling if tiling is not None else _v - if _v is not None: - self["tiling"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("branchvalues", arg, branchvalues) + self._init_provided("count", arg, count) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("domain", arg, domain) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("labels", arg, labels) + self._init_provided("labelssrc", arg, labelssrc) + self._init_provided("leaf", arg, leaf) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("level", arg, level) + self._init_provided("marker", arg, marker) + self._init_provided("maxdepth", arg, maxdepth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("parents", arg, parents) + self._init_provided("parentssrc", arg, parentssrc) + self._init_provided("pathbar", arg, pathbar) + self._init_provided("root", arg, root) + self._init_provided("sort", arg, sort) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textposition", arg, textposition) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("tiling", arg, tiling) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._props["type"] = "icicle" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_image.py b/plotly/graph_objs/_image.py index 5e1b935e07..8ff1acaf31 100644 --- a/plotly/graph_objs/_image.py +++ b/plotly/graph_objs/_image.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Image(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "image" _valid_props = { @@ -51,8 +52,6 @@ class Image(_BaseTraceType): "zsrc", } - # colormodel - # ---------- @property def colormodel(self): """ @@ -75,8 +74,6 @@ def colormodel(self): def colormodel(self, val): self["colormodel"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -90,7 +87,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -98,8 +95,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -119,8 +114,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -139,8 +132,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -159,8 +150,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -177,7 +166,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -185,8 +174,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -206,8 +193,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -217,44 +202,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.image.Hoverlabel @@ -265,8 +212,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -303,7 +248,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -311,8 +256,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -332,8 +275,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -344,7 +285,7 @@ def hovertext(self): Returns ------- - numpy.ndarray + NDArray """ return self["hovertext"] @@ -352,8 +293,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -373,8 +312,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -387,7 +324,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -395,8 +332,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -415,8 +350,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -440,8 +373,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -451,13 +382,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.image.Legendgrouptitle @@ -468,8 +392,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -495,8 +417,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -516,8 +436,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # meta - # ---- @property def meta(self): """ @@ -536,7 +454,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -544,8 +462,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -564,8 +480,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -586,8 +500,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -606,8 +518,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # source - # ------ @property def source(self): """ @@ -628,8 +538,6 @@ def source(self): def source(self, val): self["source"] = val - # stream - # ------ @property def stream(self): """ @@ -639,18 +547,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.image.Stream @@ -661,8 +557,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -673,7 +567,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -681,8 +575,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -701,8 +593,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -723,8 +613,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -756,8 +644,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -779,8 +665,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x0 - # -- @property def x0(self): """ @@ -800,8 +684,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -825,8 +707,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # y0 - # -- @property def y0(self): """ @@ -849,8 +729,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -874,8 +752,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # z - # - @property def z(self): """ @@ -887,7 +763,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -895,8 +771,6 @@ def z(self): def z(self, val): self["z"] = val - # zmax - # ---- @property def zmax(self): """ @@ -930,8 +804,6 @@ def zmax(self): def zmax(self, val): self["zmax"] = val - # zmin - # ---- @property def zmin(self): """ @@ -964,8 +836,6 @@ def zmin(self): def zmin(self, val): self["zmin"] = val - # zorder - # ------ @property def zorder(self): """ @@ -986,8 +856,6 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # zsmooth - # ------- @property def zsmooth(self): """ @@ -1008,8 +876,6 @@ def zsmooth(self): def zsmooth(self, val): self["zsmooth"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1028,14 +894,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1255,45 +1117,45 @@ def _prop_descriptions(self): def __init__( self, arg=None, - colormodel=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - source=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x0=None, - xaxis=None, - y0=None, - yaxis=None, - z=None, - zmax=None, - zmin=None, - zorder=None, - zsmooth=None, - zsrc=None, + colormodel: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: NDArray | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + source: str | None = None, + stream: None | None = None, + text: NDArray | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x0: Any | None = None, + xaxis: str | None = None, + y0: Any | None = None, + yaxis: str | None = None, + z: NDArray | None = None, + zmax: list | None = None, + zmin: list | None = None, + zorder: int | None = None, + zsmooth: Any | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -1527,14 +1389,11 @@ def __init__( ------- Image """ - super(Image, self).__init__("image") - + super().__init__("image") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1549,180 +1408,50 @@ def __init__( an instance of :class:`plotly.graph_objs.Image`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colormodel", None) - _v = colormodel if colormodel is not None else _v - if _v is not None: - self["colormodel"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("source", None) - _v = source if source is not None else _v - if _v is not None: - self["source"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zmax", None) - _v = zmax if zmax is not None else _v - if _v is not None: - self["zmax"] = _v - _v = arg.pop("zmin", None) - _v = zmin if zmin is not None else _v - if _v is not None: - self["zmin"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - _v = arg.pop("zsmooth", None) - _v = zsmooth if zsmooth is not None else _v - if _v is not None: - self["zsmooth"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("colormodel", arg, colormodel) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("source", arg, source) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("z", arg, z) + self._init_provided("zmax", arg, zmax) + self._init_provided("zmin", arg, zmin) + self._init_provided("zorder", arg, zorder) + self._init_provided("zsmooth", arg, zsmooth) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "image" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_indicator.py b/plotly/graph_objs/_indicator.py index e459172dac..c1210119e0 100644 --- a/plotly/graph_objs/_indicator.py +++ b/plotly/graph_objs/_indicator.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Indicator(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "indicator" _valid_props = { @@ -35,8 +36,6 @@ class Indicator(_BaseTraceType): "visible", } - # align - # ----- @property def align(self): """ @@ -58,8 +57,6 @@ def align(self): def align(self, val): self["align"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -73,7 +70,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -81,8 +78,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -102,8 +97,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # delta - # ----- @property def delta(self): """ @@ -113,37 +106,6 @@ def delta(self): - A dict of string/value properties that will be passed to the Delta constructor - Supported dict properties: - - decreasing - :class:`plotly.graph_objects.indicator.delta.De - creasing` instance or dict with compatible - properties - font - Set the font used to display the delta - increasing - :class:`plotly.graph_objects.indicator.delta.In - creasing` instance or dict with compatible - properties - position - Sets the position of delta with respect to the - number. - prefix - Sets a prefix appearing before the delta. - reference - Sets the reference value to compute the delta. - By default, it is set to the current value. - relative - Show relative change - suffix - Sets a suffix appearing next to the delta. - valueformat - Sets the value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - Returns ------- plotly.graph_objs.indicator.Delta @@ -154,8 +116,6 @@ def delta(self): def delta(self, val): self["delta"] = val - # domain - # ------ @property def domain(self): """ @@ -165,22 +125,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this indicator - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator - trace (in plot fraction). - y - Sets the vertical domain of this indicator - trace (in plot fraction). - Returns ------- plotly.graph_objs.indicator.Domain @@ -191,8 +135,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # gauge - # ----- @property def gauge(self): """ @@ -204,37 +146,6 @@ def gauge(self): - A dict of string/value properties that will be passed to the Gauge constructor - Supported dict properties: - - axis - :class:`plotly.graph_objects.indicator.gauge.Ax - is` instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the - gauge. - borderwidth - Sets the width (in px) of the border enclosing - the gauge. - shape - Set the shape of the gauge - steps - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.Step` instances or dicts with - compatible properties - stepdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.stepdefaults), sets the - default property values to use for elements of - indicator.gauge.steps - threshold - :class:`plotly.graph_objects.indicator.gauge.Th - reshold` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.indicator.Gauge @@ -245,8 +156,6 @@ def gauge(self): def gauge(self, val): self["gauge"] = val - # ids - # --- @property def ids(self): """ @@ -259,7 +168,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -267,8 +176,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -287,8 +194,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -312,8 +217,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -323,13 +226,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.indicator.Legendgrouptitle @@ -340,8 +236,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -367,8 +261,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -388,8 +280,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # meta - # ---- @property def meta(self): """ @@ -408,7 +298,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -416,8 +306,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -436,8 +324,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -461,8 +347,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -483,8 +367,6 @@ def name(self): def name(self, val): self["name"] = val - # number - # ------ @property def number(self): """ @@ -494,21 +376,6 @@ def number(self): - A dict of string/value properties that will be passed to the Number constructor - Supported dict properties: - - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - Returns ------- plotly.graph_objs.indicator.Number @@ -519,8 +386,6 @@ def number(self): def number(self, val): self["number"] = val - # stream - # ------ @property def stream(self): """ @@ -530,18 +395,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.indicator.Stream @@ -552,8 +405,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # title - # ----- @property def title(self): """ @@ -563,17 +414,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - align - Sets the horizontal alignment of the title. It - defaults to `center` except for bullet charts - for which it defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. - Returns ------- plotly.graph_objs.indicator.Title @@ -584,8 +424,6 @@ def title(self): def title(self, val): self["title"] = val - # uid - # --- @property def uid(self): """ @@ -606,8 +444,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -639,8 +475,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # value - # ----- @property def value(self): """ @@ -659,8 +493,6 @@ def value(self): def value(self, val): self["value"] = val - # visible - # ------- @property def visible(self): """ @@ -682,14 +514,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -812,29 +640,29 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - customdata=None, - customdatasrc=None, - delta=None, - domain=None, - gauge=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - mode=None, - name=None, - number=None, - stream=None, - title=None, - uid=None, - uirevision=None, - value=None, - visible=None, + align: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + delta: None | None = None, + domain: None | None = None, + gauge: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + number: None | None = None, + stream: None | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: int | float | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -971,14 +799,11 @@ def __init__( ------- Indicator """ - super(Indicator, self).__init__("indicator") - + super().__init__("indicator") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -993,116 +818,34 @@ def __init__( an instance of :class:`plotly.graph_objs.Indicator`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("delta", None) - _v = delta if delta is not None else _v - if _v is not None: - self["delta"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("gauge", None) - _v = gauge if gauge is not None else _v - if _v is not None: - self["gauge"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("number", None) - _v = number if number is not None else _v - if _v is not None: - self["number"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("align", arg, align) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("delta", arg, delta) + self._init_provided("domain", arg, domain) + self._init_provided("gauge", arg, gauge) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("number", arg, number) + self._init_provided("stream", arg, stream) + self._init_provided("title", arg, title) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("value", arg, value) + self._init_provided("visible", arg, visible) self._props["type"] = "indicator" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_isosurface.py b/plotly/graph_objs/_isosurface.py index 0d74e1ecd1..0b08581048 100644 --- a/plotly/graph_objs/_isosurface.py +++ b/plotly/graph_objs/_isosurface.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Isosurface(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "isosurface" _valid_props = { @@ -72,8 +73,6 @@ class Isosurface(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -97,8 +96,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # caps - # ---- @property def caps(self): """ @@ -108,18 +105,6 @@ def caps(self): - A dict of string/value properties that will be passed to the Caps constructor - Supported dict properties: - - x - :class:`plotly.graph_objects.isosurface.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.caps.Z` - instance or dict with compatible properties - Returns ------- plotly.graph_objs.isosurface.Caps @@ -130,8 +115,6 @@ def caps(self): def caps(self, val): self["caps"] = val - # cauto - # ----- @property def cauto(self): """ @@ -153,8 +136,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -174,8 +155,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -196,8 +175,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -217,8 +194,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -244,8 +219,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -255,272 +228,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.isosurf - ace.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.isosurface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of isosurface.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.isosurface.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.isosurface.ColorBar @@ -531,8 +238,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -584,8 +289,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contour - # ------- @property def contour(self): """ @@ -595,16 +298,6 @@ def contour(self): - A dict of string/value properties that will be passed to the Contour constructor - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. - Returns ------- plotly.graph_objs.isosurface.Contour @@ -615,8 +308,6 @@ def contour(self): def contour(self, val): self["contour"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -630,7 +321,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -638,8 +329,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -659,8 +348,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # flatshading - # ----------- @property def flatshading(self): """ @@ -681,8 +368,6 @@ def flatshading(self): def flatshading(self, val): self["flatshading"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -699,7 +384,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -707,8 +392,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -728,8 +411,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -739,44 +420,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.isosurface.Hoverlabel @@ -787,8 +430,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -823,7 +464,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -831,8 +472,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -852,8 +491,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -866,7 +503,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -874,8 +511,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -895,8 +530,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -909,7 +542,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -917,8 +550,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -937,8 +568,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # isomax - # ------ @property def isomax(self): """ @@ -957,8 +586,6 @@ def isomax(self): def isomax(self, val): self["isomax"] = val - # isomin - # ------ @property def isomin(self): """ @@ -977,8 +604,6 @@ def isomin(self): def isomin(self, val): self["isomin"] = val - # legend - # ------ @property def legend(self): """ @@ -1002,8 +627,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -1025,8 +648,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1036,13 +657,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.isosurface.Legendgrouptitle @@ -1053,8 +667,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1080,8 +692,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1101,8 +711,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lighting - # -------- @property def lighting(self): """ @@ -1112,33 +720,6 @@ def lighting(self): - A dict of string/value properties that will be passed to the Lighting constructor - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - Returns ------- plotly.graph_objs.isosurface.Lighting @@ -1149,8 +730,6 @@ def lighting(self): def lighting(self, val): self["lighting"] = val - # lightposition - # ------------- @property def lightposition(self): """ @@ -1160,18 +739,6 @@ def lightposition(self): - A dict of string/value properties that will be passed to the Lightposition constructor - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - Returns ------- plotly.graph_objs.isosurface.Lightposition @@ -1182,8 +749,6 @@ def lightposition(self): def lightposition(self, val): self["lightposition"] = val - # meta - # ---- @property def meta(self): """ @@ -1202,7 +767,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1210,8 +775,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1230,8 +793,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1252,8 +813,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1277,8 +836,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1299,8 +856,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- @property def scene(self): """ @@ -1324,8 +879,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1345,8 +898,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1366,8 +917,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # slices - # ------ @property def slices(self): """ @@ -1377,18 +926,6 @@ def slices(self): - A dict of string/value properties that will be passed to the Slices constructor - Supported dict properties: - - x - :class:`plotly.graph_objects.isosurface.slices. - X` instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.slices. - Y` instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.slices. - Z` instance or dict with compatible properties - Returns ------- plotly.graph_objs.isosurface.Slices @@ -1399,8 +936,6 @@ def slices(self): def slices(self, val): self["slices"] = val - # spaceframe - # ---------- @property def spaceframe(self): """ @@ -1410,22 +945,6 @@ def spaceframe(self): - A dict of string/value properties that will be passed to the Spaceframe constructor - Supported dict properties: - - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 0.15 - meaning that only 15% of the area of every - faces of tetras would be shaded. Applying a - greater `fill` ratio would allow the creation - of stronger elements or could be sued to have - entirely closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. - Returns ------- plotly.graph_objs.isosurface.Spaceframe @@ -1436,8 +955,6 @@ def spaceframe(self): def spaceframe(self, val): self["spaceframe"] = val - # stream - # ------ @property def stream(self): """ @@ -1447,18 +964,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.isosurface.Stream @@ -1469,8 +974,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # surface - # ------- @property def surface(self): """ @@ -1480,35 +983,6 @@ def surface(self): - A dict of string/value properties that will be passed to the Surface constructor - Supported dict properties: - - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. - Returns ------- plotly.graph_objs.isosurface.Surface @@ -1519,8 +993,6 @@ def surface(self): def surface(self, val): self["surface"] = val - # text - # ---- @property def text(self): """ @@ -1535,7 +1007,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1543,8 +1015,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1563,8 +1033,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1585,8 +1053,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1618,8 +1084,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # value - # ----- @property def value(self): """ @@ -1630,7 +1094,7 @@ def value(self): Returns ------- - numpy.ndarray + NDArray """ return self["value"] @@ -1638,8 +1102,6 @@ def value(self): def value(self, val): self["value"] = val - # valuehoverformat - # ---------------- @property def valuehoverformat(self): """ @@ -1663,8 +1125,6 @@ def valuehoverformat(self): def valuehoverformat(self, val): self["valuehoverformat"] = val - # valuesrc - # -------- @property def valuesrc(self): """ @@ -1683,8 +1143,6 @@ def valuesrc(self): def valuesrc(self, val): self["valuesrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1706,8 +1164,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1718,7 +1174,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1726,8 +1182,6 @@ def x(self): def x(self, val): self["x"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1757,8 +1211,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1777,8 +1229,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1789,7 +1239,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1797,8 +1247,6 @@ def y(self): def y(self, val): self["y"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1828,8 +1276,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1848,8 +1294,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1860,7 +1304,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1868,8 +1312,6 @@ def z(self): def z(self, val): self["z"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1899,8 +1341,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1919,14 +1359,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2246,66 +1682,66 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuehoverformat=None, - valuesrc=None, - visible=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + caps: None | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + isomax: int | float | None = None, + isomin: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + slices: None | None = None, + spaceframe: None | None = None, + stream: None | None = None, + surface: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: NDArray | None = None, + valuehoverformat: str | None = None, + valuesrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2639,14 +2075,11 @@ def __init__( ------- Isosurface """ - super(Isosurface, self).__init__("isosurface") - + super().__init__("isosurface") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2661,264 +2094,71 @@ def __init__( an instance of :class:`plotly.graph_objs.Isosurface`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("caps", None) - _v = caps if caps is not None else _v - if _v is not None: - self["caps"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("contour", None) - _v = contour if contour is not None else _v - if _v is not None: - self["contour"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("flatshading", None) - _v = flatshading if flatshading is not None else _v - if _v is not None: - self["flatshading"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("isomax", None) - _v = isomax if isomax is not None else _v - if _v is not None: - self["isomax"] = _v - _v = arg.pop("isomin", None) - _v = isomin if isomin is not None else _v - if _v is not None: - self["isomin"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lighting", None) - _v = lighting if lighting is not None else _v - if _v is not None: - self["lighting"] = _v - _v = arg.pop("lightposition", None) - _v = lightposition if lightposition is not None else _v - if _v is not None: - self["lightposition"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("slices", None) - _v = slices if slices is not None else _v - if _v is not None: - self["slices"] = _v - _v = arg.pop("spaceframe", None) - _v = spaceframe if spaceframe is not None else _v - if _v is not None: - self["spaceframe"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("surface", None) - _v = surface if surface is not None else _v - if _v is not None: - self["surface"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valuehoverformat", None) - _v = valuehoverformat if valuehoverformat is not None else _v - if _v is not None: - self["valuehoverformat"] = _v - _v = arg.pop("valuesrc", None) - _v = valuesrc if valuesrc is not None else _v - if _v is not None: - self["valuesrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("caps", arg, caps) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("contour", arg, contour) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("flatshading", arg, flatshading) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("isomax", arg, isomax) + self._init_provided("isomin", arg, isomin) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lighting", arg, lighting) + self._init_provided("lightposition", arg, lightposition) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("slices", arg, slices) + self._init_provided("spaceframe", arg, spaceframe) + self._init_provided("stream", arg, stream) + self._init_provided("surface", arg, surface) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("value", arg, value) + self._init_provided("valuehoverformat", arg, valuehoverformat) + self._init_provided("valuesrc", arg, valuesrc) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "isosurface" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_layout.py b/plotly/graph_objs/_layout.py index c6e9887954..e565ee9e31 100644 --- a/plotly/graph_objs/_layout.py +++ b/plotly/graph_objs/_layout.py @@ -1,3 +1,6 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutType as _BaseLayoutType import copy as _copy @@ -62,8 +65,6 @@ def _subplotid_validators(self): def _subplot_re_match(self, prop): return self._subplotid_prop_re.match(prop) - # class properties - # -------------------- _parent_path_str = "" _path_str = "layout" _valid_props = { @@ -164,8 +165,6 @@ def _subplot_re_match(self, prop): "yaxis", } - # activeselection - # --------------- @property def activeselection(self): """ @@ -175,14 +174,6 @@ def activeselection(self): - A dict of string/value properties that will be passed to the Activeselection constructor - Supported dict properties: - - fillcolor - Sets the color filling the active selection' - interior. - opacity - Sets the opacity of the active selection. - Returns ------- plotly.graph_objs.layout.Activeselection @@ -193,8 +184,6 @@ def activeselection(self): def activeselection(self, val): self["activeselection"] = val - # activeshape - # ----------- @property def activeshape(self): """ @@ -204,14 +193,6 @@ def activeshape(self): - A dict of string/value properties that will be passed to the Activeshape constructor - Supported dict properties: - - fillcolor - Sets the color filling the active shape' - interior. - opacity - Sets the opacity of the active shape. - Returns ------- plotly.graph_objs.layout.Activeshape @@ -222,8 +203,6 @@ def activeshape(self): def activeshape(self, val): self["activeshape"] = val - # annotations - # ----------- @property def annotations(self): """ @@ -233,326 +212,6 @@ def annotations(self): - A list or tuple of dicts of string/value properties that will be passed to the Annotation constructor - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head. If `axref` is `pixel`, a - positive (negative) component corresponds to an - arrow pointing from right to left (left to - right). If `axref` is not `pixel` and is - exactly the same as `xref`, this is an absolute - value on that axis, like `x`, specified in the - same coordinates as `xref`. - axref - Indicates in what coordinates the tail of the - annotation (ax,ay) is specified. If set to a x - axis id (e.g. "x" or "x2"), the `x` position - refers to a x coordinate. If set to "paper", - the `x` position refers to the distance from - the left of the plotting area in normalized - coordinates where 0 (1) corresponds to the left - (right). If set to a x axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the left of the domain of that axis: e.g., *x2 - domain* refers to the domain of the second x - axis and a x position of 0.5 refers to the - point between the left and the right of the - domain of the second x axis. In order for - absolute positioning of the arrow to work, - "axref" must be exactly the same as "xref", - otherwise "axref" will revert to "pixel" - (explained next). For relative positioning, - "axref" can be set to "pixel", in which case - the "ax" value is specified in pixels relative - to "x". Absolute positioning is useful for - trendline annotations which should continue to - indicate the correct trend when zoomed. - Relative positioning is useful for specifying - the text offset for an annotated point. - ay - Sets the y component of the arrow tail about - the arrow head. If `ayref` is `pixel`, a - positive (negative) component corresponds to an - arrow pointing from bottom to top (top to - bottom). If `ayref` is not `pixel` and is - exactly the same as `yref`, this is an absolute - value on that axis, like `y`, specified in the - same coordinates as `yref`. - ayref - Indicates in what coordinates the tail of the - annotation (ax,ay) is specified. If set to a y - axis id (e.g. "y" or "y2"), the `y` position - refers to a y coordinate. If set to "paper", - the `y` position refers to the distance from - the bottom of the plotting area in normalized - coordinates where 0 (1) corresponds to the - bottom (top). If set to a y axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the bottom of the domain of that axis: e.g., - *y2 domain* refers to the domain of the second - y axis and a y position of 0.5 refers to the - point between the bottom and the top of the - domain of the second y axis. In order for - absolute positioning of the arrow to work, - "ayref" must be exactly the same as "yref", - otherwise "ayref" will revert to "pixel" - (explained next). For relative positioning, - "ayref" can be set to "pixel", in which case - the "ay" value is specified in pixels relative - to "y". Absolute positioning is useful for - trendline annotations which should continue to - indicate the correct trend when zoomed. - Relative positioning is useful for specifying - the text offset for an annotated point. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the - plot. If you click a data point that exactly - matches the `x` and `y` values of this - annotation, and it is hidden (visible: false), - it will appear. In "onoff" mode, you must click - the same point again to make it disappear, so - if you click multiple points, you can show - multiple annotations. In "onout" mode, a click - anywhere else in the plot (on another data - point or not) will hide this annotation. If you - need to show/hide this annotation in response - to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for - example to label the side of a bar. To label - markers though, `standoff` is preferred over - `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.annotation. - Hoverlabel` instance or dict with compatible - properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , , , are - also supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xclick - Toggle this annotation when clicking a data - point whose `x` value is `xclick` rather than - the annotation's `x` value. - xref - Sets the annotation's x coordinate axis. If set - to a x axis id (e.g. "x" or "x2"), the `x` - position refers to a x coordinate. If set to - "paper", the `x` position refers to the - distance from the left of the plotting area in - normalized coordinates where 0 (1) corresponds - to the left (right). If set to a x axis ID - followed by "domain" (separated by a space), - the position behaves like for "paper", but - refers to the distance in fractions of the - domain length from the left of the domain of - that axis: e.g., *x2 domain* refers to the - domain of the second x axis and a x position - of 0.5 refers to the point between the left and - the right of the domain of the second x axis. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yclick - Toggle this annotation when clicking a data - point whose `y` value is `yclick` rather than - the annotation's `y` value. - yref - Sets the annotation's y coordinate axis. If set - to a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y coordinate. If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). If set to a y - axis ID followed by "domain" (separated by a - space), the position behaves like for "paper", - but refers to the distance in fractions of the - domain length from the bottom of the domain of - that axis: e.g., *y2 domain* refers to the - domain of the second y axis and a y position - of 0.5 refers to the point between the bottom - and the top of the domain of the second y axis. - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. - Returns ------- tuple[plotly.graph_objs.layout.Annotation] @@ -563,8 +222,6 @@ def annotations(self): def annotations(self, val): self["annotations"] = val - # annotationdefaults - # ------------------ @property def annotationdefaults(self): """ @@ -578,8 +235,6 @@ def annotationdefaults(self): - A dict of string/value properties that will be passed to the Annotation constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.Annotation @@ -590,8 +245,6 @@ def annotationdefaults(self): def annotationdefaults(self, val): self["annotationdefaults"] = val - # autosize - # -------- @property def autosize(self): """ @@ -614,8 +267,6 @@ def autosize(self): def autosize(self, val): self["autosize"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -639,8 +290,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # barcornerradius - # --------------- @property def barcornerradius(self): """ @@ -659,8 +308,6 @@ def barcornerradius(self): def barcornerradius(self, val): self["barcornerradius"] = val - # bargap - # ------ @property def bargap(self): """ @@ -680,8 +327,6 @@ def bargap(self): def bargap(self, val): self["bargap"] = val - # bargroupgap - # ----------- @property def bargroupgap(self): """ @@ -701,8 +346,6 @@ def bargroupgap(self): def bargroupgap(self, val): self["bargroupgap"] = val - # barmode - # ------- @property def barmode(self): """ @@ -729,8 +372,6 @@ def barmode(self): def barmode(self, val): self["barmode"] = val - # barnorm - # ------- @property def barnorm(self): """ @@ -753,8 +394,6 @@ def barnorm(self): def barnorm(self, val): self["barnorm"] = val - # boxgap - # ------ @property def boxgap(self): """ @@ -775,8 +414,6 @@ def boxgap(self): def boxgap(self, val): self["boxgap"] = val - # boxgroupgap - # ----------- @property def boxgroupgap(self): """ @@ -797,8 +434,6 @@ def boxgroupgap(self): def boxgroupgap(self, val): self["boxgroupgap"] = val - # boxmode - # ------- @property def boxmode(self): """ @@ -823,8 +458,6 @@ def boxmode(self): def boxmode(self, val): self["boxmode"] = val - # calendar - # -------- @property def calendar(self): """ @@ -848,8 +481,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # clickmode - # --------- @property def clickmode(self): """ @@ -883,8 +514,6 @@ def clickmode(self): def clickmode(self, val): self["clickmode"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -894,66 +523,6 @@ def coloraxis(self): - A dict of string/value properties that will be passed to the Coloraxis constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - corresponding trace color array(s)) or the - bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the - user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmin` must be - set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as corresponding trace color array(s). Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmax` must be - set as well. - colorbar - :class:`plotly.graph_objects.layout.coloraxis.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. - Returns ------- plotly.graph_objs.layout.Coloraxis @@ -964,8 +533,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -975,21 +542,6 @@ def colorscale(self): - A dict of string/value properties that will be passed to the Colorscale constructor - Supported dict properties: - - diverging - Sets the default diverging colorscale. Note - that `autocolorscale` must be true for this - attribute to work. - sequential - Sets the default sequential colorscale for - positive values. Note that `autocolorscale` - must be true for this attribute to work. - sequentialminus - Sets the default sequential colorscale for - negative values. Note that `autocolorscale` - must be true for this attribute to work. - Returns ------- plotly.graph_objs.layout.Colorscale @@ -1000,8 +552,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorway - # -------- @property def colorway(self): """ @@ -1021,8 +571,6 @@ def colorway(self): def colorway(self, val): self["colorway"] = val - # computed - # -------- @property def computed(self): """ @@ -1042,8 +590,6 @@ def computed(self): def computed(self, val): self["computed"] = val - # datarevision - # ------------ @property def datarevision(self): """ @@ -1067,8 +613,6 @@ def datarevision(self): def datarevision(self, val): self["datarevision"] = val - # dragmode - # -------- @property def dragmode(self): """ @@ -1092,8 +636,6 @@ def dragmode(self): def dragmode(self, val): self["dragmode"] = val - # editrevision - # ------------ @property def editrevision(self): """ @@ -1113,8 +655,6 @@ def editrevision(self): def editrevision(self, val): self["editrevision"] = val - # extendfunnelareacolors - # ---------------------- @property def extendfunnelareacolors(self): """ @@ -1140,8 +680,6 @@ def extendfunnelareacolors(self): def extendfunnelareacolors(self, val): self["extendfunnelareacolors"] = val - # extendiciclecolors - # ------------------ @property def extendiciclecolors(self): """ @@ -1167,8 +705,6 @@ def extendiciclecolors(self): def extendiciclecolors(self, val): self["extendiciclecolors"] = val - # extendpiecolors - # --------------- @property def extendpiecolors(self): """ @@ -1193,8 +729,6 @@ def extendpiecolors(self): def extendpiecolors(self, val): self["extendpiecolors"] = val - # extendsunburstcolors - # -------------------- @property def extendsunburstcolors(self): """ @@ -1220,8 +754,6 @@ def extendsunburstcolors(self): def extendsunburstcolors(self, val): self["extendsunburstcolors"] = val - # extendtreemapcolors - # ------------------- @property def extendtreemapcolors(self): """ @@ -1247,8 +779,6 @@ def extendtreemapcolors(self): def extendtreemapcolors(self, val): self["extendtreemapcolors"] = val - # font - # ---- @property def font(self): """ @@ -1261,52 +791,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.Font @@ -1317,8 +801,6 @@ def font(self): def font(self, val): self["font"] = val - # funnelareacolorway - # ------------------ @property def funnelareacolorway(self): """ @@ -1341,8 +823,6 @@ def funnelareacolorway(self): def funnelareacolorway(self, val): self["funnelareacolorway"] = val - # funnelgap - # --------- @property def funnelgap(self): """ @@ -1362,8 +842,6 @@ def funnelgap(self): def funnelgap(self, val): self["funnelgap"] = val - # funnelgroupgap - # -------------- @property def funnelgroupgap(self): """ @@ -1383,8 +861,6 @@ def funnelgroupgap(self): def funnelgroupgap(self, val): self["funnelgroupgap"] = val - # funnelmode - # ---------- @property def funnelmode(self): """ @@ -1409,8 +885,6 @@ def funnelmode(self): def funnelmode(self, val): self["funnelmode"] = val - # geo - # --- @property def geo(self): """ @@ -1420,107 +894,6 @@ def geo(self): - A dict of string/value properties that will be passed to the Geo constructor - Supported dict properties: - - bgcolor - Set the background color of the map - center - :class:`plotly.graph_objects.layout.geo.Center` - instance or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country - boundaries. - domain - :class:`plotly.graph_objects.layout.geo.Domain` - instance or dict with compatible properties - fitbounds - Determines if this subplot's view settings are - auto-computed to fit trace data. On scoped - maps, setting `fitbounds` leads to `center.lon` - and `center.lat` getting auto-filled. On maps - with a non-clipped projection, setting - `fitbounds` leads to `center.lon`, - `center.lat`, and `projection.rotation.lon` - getting auto-filled. On maps with a clipped - projection, setting `fitbounds` leads to - `center.lon`, `center.lat`, - `projection.rotation.lon`, - `projection.rotation.lat`, `lonaxis.range` and - `lataxis.range` getting auto-filled. If - "locations", only the trace's visible locations - are considered in the `fitbounds` computations. - If "geojson", the entire trace input `geojson` - (if provided) is considered in the `fitbounds` - computations, Defaults to False. - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - :class:`plotly.graph_objects.layout.geo.Lataxis - ` instance or dict with compatible properties - lonaxis - :class:`plotly.graph_objects.layout.geo.Lonaxis - ` instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - :class:`plotly.graph_objects.layout.geo.Project - ion` instance or dict with compatible - properties - resolution - Sets the resolution of the base layers. The - values have units of km/mm e.g. 110 corresponds - to a scale ratio of 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are - drawn. - showframe - Sets whether or not a frame is drawn around the - map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in - color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits - within countries (e.g. states, provinces) are - drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in - the view (projection and center). Defaults to - `layout.uirevision`. - visible - Sets the default visibility of the base layers. - Returns ------- plotly.graph_objs.layout.Geo @@ -1531,8 +904,6 @@ def geo(self): def geo(self, val): self["geo"] = val - # grid - # ---- @property def grid(self): """ @@ -1542,88 +913,6 @@ def grid(self): - A dict of string/value properties that will be passed to the Grid constructor - Supported dict properties: - - columns - The number of columns in the grid. If you - provide a 2D `subplots` array, the length of - its longest row is used as the default. If you - give an `xaxes` array, its length is used as - the default. But it's also possible to have a - different length, if you want to leave a row at - the end for non-cartesian subplots. - domain - :class:`plotly.graph_objects.layout.grid.Domain - ` instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given - but we do have `rows` and `columns`, we can - generate defaults using consecutive axis IDs, - in two ways: "coupled" gives one x axis per - column and one y axis per row. "independent" - uses a new xy pair for each cell, left-to-right - across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note - that columns are always enumerated from left to - right. - rows - The number of rows in the grid. If you provide - a 2D `subplots` array or a `yaxes` array, its - length is used as the default. But it's also - possible to have a different length, if you - want to leave a row at the end for non- - cartesian subplots. - subplots - Used for freeform grids, where some axes may be - shared across subplots but others are not. Each - entry should be a cartesian subplot id, like - "xy" or "x3y2", or "" to leave that cell empty. - You may reuse x axes within the same column, - and y axes within the same row. Non-cartesian - subplots and traces that support `domain` can - place themselves in this grid separately using - the `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an x axis id like "x", "x2", etc., or - "" to not put an x axis in that column. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `yaxes` - is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed - as a fraction of the total width available to - one cell. Defaults to 0.1 for coupled-axes - grids and 0.2 for independent grids. - xside - Sets where the x axis labels and titles go. - "bottom" means the very bottom of the grid. - "bottom plot" is the lowest plot that each x - axis is used in. "top" and "top plot" are - similar. - yaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an y axis id like "y", "y2", etc., or - "" to not put a y axis in that row. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `xaxes` - is present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as - a fraction of the total height available to one - cell. Defaults to 0.1 for coupled-axes grids - and 0.3 for independent grids. - yside - Sets where the y axis labels and titles go. - "left" means the very left edge of the grid. - *left plot* is the leftmost plot that each y - axis is used in. "right" and *right plot* are - similar. - Returns ------- plotly.graph_objs.layout.Grid @@ -1634,8 +923,6 @@ def grid(self): def grid(self, val): self["grid"] = val - # height - # ------ @property def height(self): """ @@ -1654,8 +941,6 @@ def height(self): def height(self, val): self["height"] = val - # hiddenlabels - # ------------ @property def hiddenlabels(self): """ @@ -1668,7 +953,7 @@ def hiddenlabels(self): Returns ------- - numpy.ndarray + NDArray """ return self["hiddenlabels"] @@ -1676,8 +961,6 @@ def hiddenlabels(self): def hiddenlabels(self, val): self["hiddenlabels"] = val - # hiddenlabelssrc - # --------------- @property def hiddenlabelssrc(self): """ @@ -1697,8 +980,6 @@ def hiddenlabelssrc(self): def hiddenlabelssrc(self, val): self["hiddenlabelssrc"] = val - # hidesources - # ----------- @property def hidesources(self): """ @@ -1721,8 +1002,6 @@ def hidesources(self): def hidesources(self, val): self["hidesources"] = val - # hoverdistance - # ------------- @property def hoverdistance(self): """ @@ -1748,8 +1027,6 @@ def hoverdistance(self): def hoverdistance(self, val): self["hoverdistance"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -1759,36 +1036,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - bgcolor - Sets the background color of all hover labels - on graph - bordercolor - Sets the border color of all hover labels on - graph. - font - Sets the default hover label font used by all - traces on the graph. - grouptitlefont - Sets the font for group titles in hover - (unified modes). Defaults to `hoverlabel.font`. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - Returns ------- plotly.graph_objs.layout.Hoverlabel @@ -1799,8 +1046,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovermode - # --------- @property def hovermode(self): """ @@ -1831,8 +1076,6 @@ def hovermode(self): def hovermode(self, val): self["hovermode"] = val - # hoversubplots - # ------------- @property def hoversubplots(self): """ @@ -1857,8 +1100,6 @@ def hoversubplots(self): def hoversubplots(self, val): self["hoversubplots"] = val - # iciclecolorway - # -------------- @property def iciclecolorway(self): """ @@ -1881,8 +1122,6 @@ def iciclecolorway(self): def iciclecolorway(self, val): self["iciclecolorway"] = val - # images - # ------ @property def images(self): """ @@ -1892,106 +1131,6 @@ def images(self): - A list or tuple of dicts of string/value properties that will be passed to the Image constructor - Supported dict properties: - - layer - Specifies whether images are drawn below or - above traces. When `xref` and `yref` are both - set to `paper`, image is drawn below the entire - plot area. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The - image will be sized based on the `position` - value. When `xref` is set to `paper`, units are - sized relative to the plot width. When `xref` - ends with ` domain`, units are sized relative - to the axis width. - sizey - Sets the image container size vertically. The - image will be sized based on the `position` - value. When `yref` is set to `paper`, units are - sized relative to the plot height. When `yref` - ends with ` domain`, units are sized relative - to the axis height. - sizing - Specifies which dimension of the image to - constrain. - source - Specifies the URL of the image to be used. The - URL must be accessible from the domain where - the plot code is run, and can be either - relative or absolute. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this image is - visible. - x - Sets the image's x position. When `xref` is set - to `paper`, units are sized relative to the - plot height. See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to - a x axis id (e.g. "x" or "x2"), the `x` - position refers to a x coordinate. If set to - "paper", the `x` position refers to the - distance from the left of the plotting area in - normalized coordinates where 0 (1) corresponds - to the left (right). If set to a x axis ID - followed by "domain" (separated by a space), - the position behaves like for "paper", but - refers to the distance in fractions of the - domain length from the left of the domain of - that axis: e.g., *x2 domain* refers to the - domain of the second x axis and a x position - of 0.5 refers to the point between the left and - the right of the domain of the second x axis. - y - Sets the image's y position. When `yref` is set - to `paper`, units are sized relative to the - plot height. See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to - a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y coordinate. If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). If set to a y - axis ID followed by "domain" (separated by a - space), the position behaves like for "paper", - but refers to the distance in fractions of the - domain length from the bottom of the domain of - that axis: e.g., *y2 domain* refers to the - domain of the second y axis and a y position - of 0.5 refers to the point between the bottom - and the top of the domain of the second y axis. - Returns ------- tuple[plotly.graph_objs.layout.Image] @@ -2002,8 +1141,6 @@ def images(self): def images(self, val): self["images"] = val - # imagedefaults - # ------------- @property def imagedefaults(self): """ @@ -2017,8 +1154,6 @@ def imagedefaults(self): - A dict of string/value properties that will be passed to the Image constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.Image @@ -2029,8 +1164,6 @@ def imagedefaults(self): def imagedefaults(self, val): self["imagedefaults"] = val - # legend - # ------ @property def legend(self): """ @@ -2040,138 +1173,6 @@ def legend(self): - A dict of string/value properties that will be passed to the Legend constructor - Supported dict properties: - - bgcolor - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - bordercolor - Sets the color of the border enclosing the - legend. - borderwidth - Sets the width (in px) of the border enclosing - the legend. - entrywidth - Sets the width (in px or fraction) of the - legend. Use 0 to size the entry based on the - text width, when `entrywidthmode` is set to - "pixels". - entrywidthmode - Determines what entrywidth means. - font - Sets the font used to text the legend items. - groupclick - Determines the behavior on legend group item - click. "toggleitem" toggles the visibility of - the individual item clicked on the graph. - "togglegroup" toggles the visibility of all - items in the same legendgroup as the item - clicked on the graph. - grouptitlefont - Sets the font for group titles in legend. - Defaults to `legend.font` with its size - increased about 10%. - indentation - Sets the indentation (in px) of the legend - entries. - itemclick - Determines the behavior on legend item click. - "toggle" toggles the visibility of the item - clicked on the graph. "toggleothers" makes the - clicked item the sole visible item on the - graph. False disables legend item click - interactions. - itemdoubleclick - Determines the behavior on legend item double- - click. "toggle" toggles the visibility of the - item clicked on the graph. "toggleothers" makes - the clicked item the sole visible item on the - graph. False disables legend item double-click - interactions. - itemsizing - Determines if the legend items symbols scale - with their corresponding "trace" attributes or - remain "constant" independent of the symbol - size on the graph. - itemwidth - Sets the width (in px) of the legend item - symbols (the part other than the title.text). - orientation - Sets the orientation of the legend. - title - :class:`plotly.graph_objects.layout.legend.Titl - e` instance or dict with compatible properties - tracegroupgap - Sets the amount of vertical space (in px) - between legend groups. - traceorder - Determines the order at which the legend items - are displayed. If "normal", the items are - displayed top-to-bottom in the same order as - the input data. If "reversed", the items are - displayed in the opposite order as "normal". If - "grouped", the items are displayed in groups - (when a trace `legendgroup` is provided). if - "grouped+reversed", the items are displayed in - the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes - in trace and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with - respect to their associated text. - visible - Determines whether or not this legend is - visible. - x - Sets the x position with respect to `xref` (in - normalized coordinates) of the legend. When - `xref` is "paper", defaults to 1.02 for - vertical legends and defaults to 0 for - horizontal legends. When `xref` is "container", - defaults to 1 for vertical legends and defaults - to 0 for horizontal legends. Must be between 0 - and 1 if `xref` is "container". and between - "-2" and 3 if `xref` is "paper". - xanchor - Sets the legend's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the legend. - Value "auto" anchors legends to the right for - `x` values greater than or equal to 2/3, - anchors legends to the left for `x` values less - than or equal to 1/3 and anchors legends with - respect to their center otherwise. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` (in - normalized coordinates) of the legend. When - `yref` is "paper", defaults to 1 for vertical - legends, defaults to "-0.1" for horizontal - legends on graphs w/o range sliders and - defaults to 1.1 for horizontal legends on graph - with one or multiple range sliders. When `yref` - is "container", defaults to 1. Must be between - 0 and 1 if `yref` is "container" and between - "-2" and 3 if `yref` is "paper". - yanchor - Sets the legend's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the legend. Value - "auto" anchors legends at their bottom for `y` - values less than or equal to 1/3, anchors - legends to at their top for `y` values greater - than or equal to 2/3 and anchors legends with - respect to their middle otherwise. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.layout.Legend @@ -2182,8 +1183,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # map - # --- @property def map(self): """ @@ -2193,62 +1192,6 @@ def map(self): - A dict of string/value properties that will be passed to the Map constructor - Supported dict properties: - - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (map.bearing). - bounds - :class:`plotly.graph_objects.layout.map.Bounds` - instance or dict with compatible properties - center - :class:`plotly.graph_objects.layout.map.Center` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.map.Domain` - instance or dict with compatible properties - layers - A tuple of - :class:`plotly.graph_objects.layout.map.Layer` - instances or dicts with compatible properties - layerdefaults - When used in a template (as - layout.template.layout.map.layerdefaults), sets - the default property values to use for elements - of layout.map.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (map.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.map.layers`. These layers can be - defined either explicitly as a Map Style object - which can contain multiple layer definitions - that load data from any public or private Tile - Map Service (TMS or XYZ) or Web Map Service - (WMS) or implicitly by using one of the built- - in style objects which use WMSes or by using a - custom style URL Map Style objects are of the - form described in the MapLibre GL JS - documentation available at - https://maplibre.org/maplibre-style-spec/ The - built-in plotly.js styles objects are: basic, - carto-darkmatter, carto-darkmatter-nolabels, - carto-positron, carto-positron-nolabels, carto- - voyager, carto-voyager-nolabels, dark, light, - open-street-map, outdoors, satellite, - satellite-streets, streets, white-bg. - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (map.zoom). - Returns ------- plotly.graph_objs.layout.Map @@ -2259,8 +1202,6 @@ def map(self): def map(self, val): self["map"] = val - # mapbox - # ------ @property def mapbox(self): """ @@ -2270,78 +1211,6 @@ def mapbox(self): - A dict of string/value properties that will be passed to the Mapbox constructor - Supported dict properties: - - accesstoken - Sets the mapbox access token to be used for - this mapbox map. Alternatively, the mapbox - access token can be set in the configuration - options under `mapboxAccessToken`. Note that - accessToken are only required when `style` (e.g - with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a - layout layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (mapbox.bearing). - bounds - :class:`plotly.graph_objects.layout.mapbox.Boun - ds` instance or dict with compatible properties - center - :class:`plotly.graph_objects.layout.mapbox.Cent - er` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.mapbox.Doma - in` instance or dict with compatible properties - layers - A tuple of :class:`plotly.graph_objects.layout. - mapbox.Layer` instances or dicts with - compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), - sets the default property values to use for - elements of layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (mapbox.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.mapbox.layers`. These layers can be - defined either explicitly as a Mapbox Style - object which can contain multiple layer - definitions that load data from any public or - private Tile Map Service (TMS or XYZ) or Web - Map Service (WMS) or implicitly by using one of - the built-in style objects which use WMSes - which do not require any access tokens, or by - using a default Mapbox style or custom Mapbox - style URL, both of which require a Mapbox - access token Note that Mapbox access token can - be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox - Style objects are of the form described in the - Mapbox GL JS documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec - The built-in plotly.js styles objects are: - carto-darkmatter, carto-positron, open-street- - map, stamen-terrain, stamen-toner, stamen- - watercolor, white-bg The built-in Mapbox - styles are: basic, streets, outdoors, light, - dark, satellite, satellite-streets Mapbox - style URLs are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). - Returns ------- plotly.graph_objs.layout.Mapbox @@ -2352,8 +1221,6 @@ def mapbox(self): def mapbox(self, val): self["mapbox"] = val - # margin - # ------ @property def margin(self): """ @@ -2363,25 +1230,6 @@ def margin(self): - A dict of string/value properties that will be passed to the Margin constructor - Supported dict properties: - - autoexpand - Turns on/off margin expansion computations. - Legends, colorbars, updatemenus, sliders, axis - rangeselector and rangeslider are allowed to - push the margins by defaults. - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the - plotting area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). - Returns ------- plotly.graph_objs.layout.Margin @@ -2392,8 +1240,6 @@ def margin(self): def margin(self, val): self["margin"] = val - # meta - # ---- @property def meta(self): """ @@ -2410,7 +1256,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -2418,8 +1264,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -2438,8 +1282,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # minreducedheight - # ---------------- @property def minreducedheight(self): """ @@ -2459,8 +1301,6 @@ def minreducedheight(self): def minreducedheight(self, val): self["minreducedheight"] = val - # minreducedwidth - # --------------- @property def minreducedwidth(self): """ @@ -2480,8 +1320,6 @@ def minreducedwidth(self): def minreducedwidth(self, val): self["minreducedwidth"] = val - # modebar - # ------- @property def modebar(self): """ @@ -2491,66 +1329,6 @@ def modebar(self): - A dict of string/value properties that will be passed to the Modebar constructor - Supported dict properties: - - activecolor - Sets the color of the active or hovered on - icons in the modebar. - add - Determines which predefined modebar buttons to - add. Please note that these buttons will only - be shown if they are compatible with all trace - types used in a graph. Similar to - `config.modeBarButtonsToAdd` option. This may - include "v1hovermode", "hoverclosest", - "hovercompare", "togglehover", - "togglespikelines", "drawline", "drawopenpath", - "drawclosedpath", "drawcircle", "drawrect", - "eraseshape". - addsrc - Sets the source reference on Chart Studio Cloud - for `add`. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - remove - Determines which predefined modebar buttons to - remove. Similar to - `config.modeBarButtonsToRemove` option. This - may include "autoScale2d", "autoscale", - "editInChartStudio", "editinchartstudio", - "hoverCompareCartesian", "hovercompare", - "lasso", "lasso2d", "orbitRotation", - "orbitrotation", "pan", "pan2d", "pan3d", - "reset", "resetCameraDefault3d", - "resetCameraLastSave3d", "resetGeo", - "resetSankeyGroup", "resetScale2d", - "resetViewMap", "resetViewMapbox", - "resetViews", "resetcameradefault", - "resetcameralastsave", "resetsankeygroup", - "resetscale", "resetview", "resetviews", - "select", "select2d", "sendDataToCloud", - "senddatatocloud", "tableRotation", - "tablerotation", "toImage", "toggleHover", - "toggleSpikelines", "togglehover", - "togglespikelines", "toimage", "zoom", - "zoom2d", "zoom3d", "zoomIn2d", "zoomInGeo", - "zoomInMap", "zoomInMapbox", "zoomOut2d", - "zoomOutGeo", "zoomOutMap", "zoomOutMapbox", - "zoomin", "zoomout". - removesrc - Sets the source reference on Chart Studio Cloud - for `remove`. - uirevision - Controls persistence of user-driven changes - related to the modebar, including `hovermode`, - `dragmode`, and `showspikes` at both the root - level and inside subplots. Defaults to - `layout.uirevision`. - Returns ------- plotly.graph_objs.layout.Modebar @@ -2561,8 +1339,6 @@ def modebar(self): def modebar(self, val): self["modebar"] = val - # newselection - # ------------ @property def newselection(self): """ @@ -2572,21 +1348,6 @@ def newselection(self): - A dict of string/value properties that will be passed to the Newselection constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.layout.newselectio - n.Line` instance or dict with compatible - properties - mode - Describes how a new selection is created. If - `immediate`, a new selection is created after - first mouse up. If `gradual`, a new selection - is not created after first mouse. By adding to - and subtracting from the initial selection, - this option allows declaring extra outlines of - the selection. - Returns ------- plotly.graph_objs.layout.Newselection @@ -2597,8 +1358,6 @@ def newselection(self): def newselection(self, val): self["newselection"] = val - # newshape - # -------- @property def newshape(self): """ @@ -2608,79 +1367,6 @@ def newshape(self): - A dict of string/value properties that will be passed to the Newshape constructor - Supported dict properties: - - drawdirection - When `dragmode` is set to "drawrect", - "drawline" or "drawcircle" this limits the drag - to be horizontal, vertical or diagonal. Using - "diagonal" there is no limit e.g. in drawing - lines in any direction. "ortho" limits the draw - to be either horizontal or vertical. - "horizontal" allows horizontal extend. - "vertical" allows vertical extend. - fillcolor - Sets the color filling new shapes' interior. - Please note that if using a fillcolor with - alpha greater than half, drag inside the active - shape starts moving the shape underneath, - otherwise a new shape could be started over. - fillrule - Determines the path's interior. For more info - please visit https://developer.mozilla.org/en- - US/docs/Web/SVG/Attribute/fill-rule - label - :class:`plotly.graph_objects.layout.newshape.La - bel` instance or dict with compatible - properties - layer - Specifies whether new shapes are drawn below - gridlines ("below"), between gridlines and - traces ("between") or above traces ("above"). - legend - Sets the reference to a legend to show new - shape in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for new shape. Traces and - shapes part of the same legend group hide/show - at the same time when toggling legend items. - legendgrouptitle - :class:`plotly.graph_objects.layout.newshape.Le - gendgrouptitle` instance or dict with - compatible properties - legendrank - Sets the legend rank for new shape. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. - legendwidth - Sets the width (in px or fraction) of the - legend for new shape. - line - :class:`plotly.graph_objects.layout.newshape.Li - ne` instance or dict with compatible properties - name - Sets new shape name. The name appears as the - legend item. - opacity - Sets the opacity of new shapes. - showlegend - Determines whether or not new shape is shown in - the legend. - visible - Determines whether or not new shape is visible. - If "legendonly", the shape is not drawn, but - can appear as a legend item (provided that the - legend itself is visible). - Returns ------- plotly.graph_objs.layout.Newshape @@ -2691,8 +1377,6 @@ def newshape(self): def newshape(self, val): self["newshape"] = val - # paper_bgcolor - # ------------- @property def paper_bgcolor(self): """ @@ -2704,42 +1388,7 @@ def paper_bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -2751,8 +1400,6 @@ def paper_bgcolor(self): def paper_bgcolor(self, val): self["paper_bgcolor"] = val - # piecolorway - # ----------- @property def piecolorway(self): """ @@ -2775,8 +1422,6 @@ def piecolorway(self): def piecolorway(self, val): self["piecolorway"] = val - # plot_bgcolor - # ------------ @property def plot_bgcolor(self): """ @@ -2788,42 +1433,7 @@ def plot_bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -2835,8 +1445,6 @@ def plot_bgcolor(self): def plot_bgcolor(self, val): self["plot_bgcolor"] = val - # polar - # ----- @property def polar(self): """ @@ -2846,57 +1454,6 @@ def polar(self): - A dict of string/value properties that will be passed to the Polar constructor - Supported dict properties: - - angularaxis - :class:`plotly.graph_objects.layout.polar.Angul - arAxis` instance or dict with compatible - properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they - represent fractions of the minimum difference - in bar positions in the data. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "overlay", the bars are plotted - over one another, you might need to reduce - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.polar.Domai - n` instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and - angular axis line are drawn as "circular" - sectors or as "linear" (polygon) sectors. Has - an effect only when the angular axis has `type` - "category". Note that `radialaxis.angle` is - snapped to the angle of the closest vertex when - `gridshape` is "circular" (so that radial axis - scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of - the polar subplot. - radialaxis - :class:`plotly.graph_objects.layout.polar.Radia - lAxis` instance or dict with compatible - properties - sector - Sets angular span of this polar subplot with - two angles (in degrees). Sector are assumed to - be spanned in the counterclockwise direction - with 0 corresponding to rightmost limit of the - polar subplot. - uirevision - Controls persistence of user-driven changes in - axis attributes, if not overridden in the - individual axes. Defaults to - `layout.uirevision`. - Returns ------- plotly.graph_objs.layout.Polar @@ -2907,8 +1464,6 @@ def polar(self): def polar(self, val): self["polar"] = val - # scattergap - # ---------- @property def scattergap(self): """ @@ -2928,8 +1483,6 @@ def scattergap(self): def scattergap(self, val): self["scattergap"] = val - # scattermode - # ----------- @property def scattermode(self): """ @@ -2954,8 +1507,6 @@ def scattermode(self): def scattermode(self, val): self["scattermode"] = val - # scene - # ----- @property def scene(self): """ @@ -2965,60 +1516,6 @@ def scene(self): - A dict of string/value properties that will be passed to the Scene constructor - Supported dict properties: - - annotations - A tuple of :class:`plotly.graph_objects.layout. - scene.Annotation` instances or dicts with - compatible properties - annotationdefaults - When used in a template (as layout.template.lay - out.scene.annotationdefaults), sets the default - property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a - cube, regardless of the axes' ranges. If - "data", this scene's axes are drawn in - proportion with the axes' ranges. If "manual", - this scene's axes are drawn in proportion with - the input of "aspectratio" (the default - behavior if "aspectratio" is provided). If - "auto", this scene's axes are drawn using the - results of "data" except when one axis is more - than four times the size of the two others, - where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor - - camera - :class:`plotly.graph_objects.layout.scene.Camer - a` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.scene.Domai - n` instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for - this scene. - hovermode - Determines the mode of hover interactions for - this scene. - uirevision - Controls persistence of user-driven changes in - camera attributes. Defaults to - `layout.uirevision`. - xaxis - :class:`plotly.graph_objects.layout.scene.XAxis - ` instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.scene.YAxis - ` instance or dict with compatible properties - zaxis - :class:`plotly.graph_objects.layout.scene.ZAxis - ` instance or dict with compatible properties - Returns ------- plotly.graph_objs.layout.Scene @@ -3029,8 +1526,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # selectdirection - # --------------- @property def selectdirection(self): """ @@ -3053,8 +1548,6 @@ def selectdirection(self): def selectdirection(self, val): self["selectdirection"] = val - # selectionrevision - # ----------------- @property def selectionrevision(self): """ @@ -3073,8 +1566,6 @@ def selectionrevision(self): def selectionrevision(self, val): self["selectionrevision"] = val - # selections - # ---------- @property def selections(self): """ @@ -3084,86 +1575,6 @@ def selections(self): - A list or tuple of dicts of string/value properties that will be passed to the Selection constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.layout.selection.L - ine` instance or dict with compatible - properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the selection. - path - For `type` "path" - a valid SVG path similar to - `shapes.path` in data coordinates. Allowed - segments are: M, L and Z. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the selection type to be drawn. If - "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and - (`x0`,`y1`). If "path", draw a custom SVG path - using `path`. - x0 - Sets the selection's starting x position. - x1 - Sets the selection's end x position. - xref - Sets the selection's x coordinate axis. If set - to a x axis id (e.g. "x" or "x2"), the `x` - position refers to a x coordinate. If set to - "paper", the `x` position refers to the - distance from the left of the plotting area in - normalized coordinates where 0 (1) corresponds - to the left (right). If set to a x axis ID - followed by "domain" (separated by a space), - the position behaves like for "paper", but - refers to the distance in fractions of the - domain length from the left of the domain of - that axis: e.g., *x2 domain* refers to the - domain of the second x axis and a x position - of 0.5 refers to the point between the left and - the right of the domain of the second x axis. - y0 - Sets the selection's starting y position. - y1 - Sets the selection's end y position. - yref - Sets the selection's x coordinate axis. If set - to a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y coordinate. If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). If set to a y - axis ID followed by "domain" (separated by a - space), the position behaves like for "paper", - but refers to the distance in fractions of the - domain length from the bottom of the domain of - that axis: e.g., *y2 domain* refers to the - domain of the second y axis and a y position - of 0.5 refers to the point between the bottom - and the top of the domain of the second y axis. - Returns ------- tuple[plotly.graph_objs.layout.Selection] @@ -3174,8 +1585,6 @@ def selections(self): def selections(self, val): self["selections"] = val - # selectiondefaults - # ----------------- @property def selectiondefaults(self): """ @@ -3189,8 +1598,6 @@ def selectiondefaults(self): - A dict of string/value properties that will be passed to the Selection constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.Selection @@ -3201,8 +1608,6 @@ def selectiondefaults(self): def selectiondefaults(self, val): self["selectiondefaults"] = val - # separators - # ---------- @property def separators(self): """ @@ -3225,8 +1630,6 @@ def separators(self): def separators(self, val): self["separators"] = val - # shapes - # ------ @property def shapes(self): """ @@ -3236,243 +1639,6 @@ def shapes(self): - A list or tuple of dicts of string/value properties that will be passed to the Shape constructor - Supported dict properties: - - editable - Determines whether the shape could be activated - for edit or not. Has no effect when the older - editable shapes mode is enabled via - `config.editable` or - `config.edits.shapePosition`. - fillcolor - Sets the color filling the shape's interior. - Only applies to closed shapes. - fillrule - Determines which regions of complex paths - constitute the interior. For more info please - visit https://developer.mozilla.org/en- - US/docs/Web/SVG/Attribute/fill-rule - label - :class:`plotly.graph_objects.layout.shape.Label - ` instance or dict with compatible properties - layer - Specifies whether shapes are drawn below - gridlines ("below"), between gridlines and - traces ("between") or above traces ("above"). - legend - Sets the reference to a legend to show this - shape in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this shape. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.layout.shape.Legen - dgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this shape. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this shape. - line - :class:`plotly.graph_objects.layout.shape.Line` - instance or dict with compatible properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the - pixel values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and - taken unmodified as pixels relative to - `xanchor` and `yanchor` in case of "pixel" size - mode. There are a few restrictions / quirks - only absolute instructions, not relative. So - the allowed segments are: M, L, H, V, Q, C, T, - S, and Z arcs (A) are not allowed because - radius rx and ry are relative. In the future we - could consider supporting relative commands, - but we would have to decide on how to handle - date and log axes. Note that even as is, Q and - C Bezier paths that are smooth on linear axes - may not be smooth on log, and vice versa. no - chained "polybezier" commands - specify the - segment type for each one. On category axes, - values are numbers scaled to the serial numbers - of categories because using the categories - themselves there would be no way to describe - fractional positions On data axes: because - space and T are both normal components of path - strings, we can't use either to separate date - from time parts. Therefore we'll use underscore - for this purpose: 2015-02-21_13:45:56.789 - showlegend - Determines whether or not this shape is shown - in the legend. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If - "line", a line is drawn from (`x0`,`y0`) to - (`x1`,`y1`) with respect to the axes' sizing - mode. If "circle", a circle is drawn from - ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 - -`y0`)|) with respect to the axes' sizing mode. - If "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), - (`x0`,`y1`), (`x0`,`y0`) with respect to the - axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' - sizing mode. - visible - Determines whether or not this shape is - visible. If "legendonly", the shape is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x0 - Sets the shape's starting x position. See - `type` and `xsizemode` for more info. - x0shift - Shifts `x0` away from the center of the - category when `xref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - x1shift - Shifts `x1` away from the center of the - category when `xref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - xanchor - Only relevant in conjunction with `xsizemode` - set to "pixel". Specifies the anchor point on - the x axis to which `x0`, `x1` and x - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `xsizemode` - not set to "pixel". - xref - Sets the shape's x coordinate axis. If set to a - x axis id (e.g. "x" or "x2"), the `x` position - refers to a x coordinate. If set to "paper", - the `x` position refers to the distance from - the left of the plotting area in normalized - coordinates where 0 (1) corresponds to the left - (right). If set to a x axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the left of the domain of that axis: e.g., *x2 - domain* refers to the domain of the second x - axis and a x position of 0.5 refers to the - point between the left and the right of the - domain of the second x axis. - xsizemode - Sets the shapes's sizing mode along the x axis. - If set to "scaled", `x0`, `x1` and x - coordinates within `path` refer to data values - on the x axis or a fraction of the plot area's - width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in - terms of data or plot fraction but `x0`, `x1` - and x coordinates within `path` are pixels - relative to `xanchor`. This way, the shape can - have a fixed width while maintaining a position - relative to data or plot fraction. - y0 - Sets the shape's starting y position. See - `type` and `ysizemode` for more info. - y0shift - Shifts `y0` away from the center of the - category when `yref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - y1shift - Shifts `y1` away from the center of the - category when `yref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - yanchor - Only relevant in conjunction with `ysizemode` - set to "pixel". Specifies the anchor point on - the y axis to which `y0`, `y1` and y - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `ysizemode` - not set to "pixel". - yref - Sets the shape's y coordinate axis. If set to a - y axis id (e.g. "y" or "y2"), the `y` position - refers to a y coordinate. If set to "paper", - the `y` position refers to the distance from - the bottom of the plotting area in normalized - coordinates where 0 (1) corresponds to the - bottom (top). If set to a y axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the bottom of the domain of that axis: e.g., - *y2 domain* refers to the domain of the second - y axis and a y position of 0.5 refers to the - point between the bottom and the top of the - domain of the second y axis. - ysizemode - Sets the shapes's sizing mode along the y axis. - If set to "scaled", `y0`, `y1` and y - coordinates within `path` refer to data values - on the y axis or a fraction of the plot area's - height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in - terms of data or plot fraction but `y0`, `y1` - and y coordinates within `path` are pixels - relative to `yanchor`. This way, the shape can - have a fixed height while maintaining a - position relative to data or plot fraction. - Returns ------- tuple[plotly.graph_objs.layout.Shape] @@ -3483,8 +1649,6 @@ def shapes(self): def shapes(self, val): self["shapes"] = val - # shapedefaults - # ------------- @property def shapedefaults(self): """ @@ -3498,8 +1662,6 @@ def shapedefaults(self): - A dict of string/value properties that will be passed to the Shape constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.Shape @@ -3510,8 +1672,6 @@ def shapedefaults(self): def shapedefaults(self, val): self["shapedefaults"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -3534,8 +1694,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # sliders - # ------- @property def sliders(self): """ @@ -3545,103 +1703,6 @@ def sliders(self): - A list or tuple of dicts of string/value properties that will be passed to the Slider constructor - Supported dict properties: - - active - Determines which button (by index starting from - 0) is considered active. - activebgcolor - Sets the background color of the slider grip - while dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the - slider. - borderwidth - Sets the width (in px) of the border enclosing - the slider. - currentvalue - :class:`plotly.graph_objects.layout.slider.Curr - entvalue` instance or dict with compatible - properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure - excludes the padding of both ends. That is, the - slider's length is this length minus the - padding on both ends. - lenmode - Determines whether this slider length is set in - units of plot "fraction" or in *pixels. Use - `len` to set the value. - minorticklen - Sets the length in pixels of minor step tick - marks - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Set the padding of the slider component along - each side. - steps - A tuple of :class:`plotly.graph_objects.layout. - slider.Step` instances or dicts with compatible - properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), - sets the default property values to use for - elements of layout.slider.steps - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the - slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - :class:`plotly.graph_objects.layout.slider.Tran - sition` instance or dict with compatible - properties - visible - Determines whether or not the slider is - visible. - x - Sets the x position (in normalized coordinates) - of the slider. - xanchor - Sets the slider's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the slider. - yanchor - Sets the slider's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the range selector. - Returns ------- tuple[plotly.graph_objs.layout.Slider] @@ -3652,8 +1713,6 @@ def sliders(self): def sliders(self, val): self["sliders"] = val - # sliderdefaults - # -------------- @property def sliderdefaults(self): """ @@ -3667,8 +1726,6 @@ def sliderdefaults(self): - A dict of string/value properties that will be passed to the Slider constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.Slider @@ -3679,8 +1736,6 @@ def sliderdefaults(self): def sliderdefaults(self, val): self["sliderdefaults"] = val - # smith - # ----- @property def smith(self): """ @@ -3690,22 +1745,6 @@ def smith(self): - A dict of string/value properties that will be passed to the Smith constructor - Supported dict properties: - - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.smith.Domai - n` instance or dict with compatible properties - imaginaryaxis - :class:`plotly.graph_objects.layout.smith.Imagi - naryaxis` instance or dict with compatible - properties - realaxis - :class:`plotly.graph_objects.layout.smith.Reala - xis` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.layout.Smith @@ -3716,8 +1755,6 @@ def smith(self): def smith(self, val): self["smith"] = val - # spikedistance - # ------------- @property def spikedistance(self): """ @@ -3741,8 +1778,6 @@ def spikedistance(self): def spikedistance(self, val): self["spikedistance"] = val - # sunburstcolorway - # ---------------- @property def sunburstcolorway(self): """ @@ -3765,8 +1800,6 @@ def sunburstcolorway(self): def sunburstcolorway(self, val): self["sunburstcolorway"] = val - # template - # -------- @property def template(self): """ @@ -3795,16 +1828,6 @@ def template(self): - An instance of :class:`plotly.graph_objs.layout.Template` - A dict of string/value properties that will be passed to the Template constructor - - Supported dict properties: - - data - :class:`plotly.graph_objects.layout.template.Da - ta` instance or dict with compatible properties - layout - :class:`plotly.graph_objects.Layout` instance - or dict with compatible properties - - The name of a registered template where current registered templates are stored in the plotly.io.templates configuration object. The names of all registered templates can be retrieved with: @@ -3827,8 +1850,6 @@ def template(self): def template(self, val): self["template"] = val - # ternary - # ------- @property def ternary(self): """ @@ -3838,32 +1859,6 @@ def ternary(self): - A dict of string/value properties that will be passed to the Ternary constructor - Supported dict properties: - - aaxis - :class:`plotly.graph_objects.layout.ternary.Aax - is` instance or dict with compatible properties - baxis - :class:`plotly.graph_objects.layout.ternary.Bax - is` instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - :class:`plotly.graph_objects.layout.ternary.Cax - is` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.ternary.Dom - ain` instance or dict with compatible - properties - sum - The number each triplet should sum to, and the - maximum range of each axis - uirevision - Controls persistence of user-driven changes in - axis `min` and `title`, if not overridden in - the individual axes. Defaults to - `layout.uirevision`. - Returns ------- plotly.graph_objs.layout.Ternary @@ -3874,8 +1869,6 @@ def ternary(self): def ternary(self, val): self["ternary"] = val - # title - # ----- @property def title(self): """ @@ -3885,76 +1878,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - automargin - Determines whether the title can automatically - push the figure margins. If `yref='paper'` then - the margin will expand to ensure that the title - doesn’t overlap with the edges of the - container. If `yref='container'` then the - margins will ensure that the title doesn’t - overlap with the plot area, tick labels, and - axis titles. If `automargin=true` and the - margins need to be expanded, then y will be set - to a default 1 and yanchor will be set to an - appropriate default to ensure that minimal - margin space is needed. Note that when - `yref='paper'`, only 1 or 0 are allowed y - values. Invalid values will be reset to the - default 1. - font - Sets the title font. - pad - Sets the padding of the title. Each padding - value only applies when the corresponding - `xanchor`/`yanchor` value is set accordingly. - E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined - automatically. Padding is muted if the - respective anchor value is "middle*/*center". - subtitle - :class:`plotly.graph_objects.layout.title.Subti - tle` instance or dict with compatible - properties - text - Sets the plot's title. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 - (right). - xanchor - Sets the title's horizontal alignment with - respect to its x position. "left" means that - the title starts at x, "right" means that the - title ends at x and "center" means that the - title's center is at x. "auto" divides `xref` - by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 - (top). "auto" places the baseline of the title - onto the vertical center of the top margin. - yanchor - Sets the title's vertical alignment with - respect to its y position. "top" means that the - title's cap line is at y, "bottom" means that - the title's baseline is at y and "middle" means - that the title's midline is at y. "auto" - divides `yref` by three and calculates the - `yanchor` value automatically based on the - value of `y`. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.layout.Title @@ -3965,8 +1888,6 @@ def title(self): def title(self, val): self["title"] = val - # transition - # ---------- @property def transition(self): """ @@ -3978,19 +1899,6 @@ def transition(self): - A dict of string/value properties that will be passed to the Transition constructor - Supported dict properties: - - duration - The duration of the transition, in - milliseconds. If equal to zero, updates are - synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or - traces smoothly transitions during updates that - make both traces and layout change. - Returns ------- plotly.graph_objs.layout.Transition @@ -4001,8 +1909,6 @@ def transition(self): def transition(self, val): self["transition"] = val - # treemapcolorway - # --------------- @property def treemapcolorway(self): """ @@ -4025,8 +1931,6 @@ def treemapcolorway(self): def treemapcolorway(self, val): self["treemapcolorway"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -4059,8 +1963,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # uniformtext - # ----------- @property def uniformtext(self): """ @@ -4070,23 +1972,6 @@ def uniformtext(self): - A dict of string/value properties that will be passed to the Uniformtext constructor - Supported dict properties: - - minsize - Sets the minimum text size between traces of - the same type. - mode - Determines how the font size for various text - elements are uniformed between each trace type. - If the computed text sizes were smaller than - the minimum size defined by - `uniformtext.minsize` using "hide" option hides - the text; and using "show" option shows the - text without further downscaling. Please note - that if the size defined by `minsize` is - greater than the font size defined by trace, - then the `minsize` is used. - Returns ------- plotly.graph_objs.layout.Uniformtext @@ -4097,8 +1982,6 @@ def uniformtext(self): def uniformtext(self, val): self["uniformtext"] = val - # updatemenus - # ----------- @property def updatemenus(self): """ @@ -4108,88 +1991,6 @@ def updatemenus(self): - A list or tuple of dicts of string/value properties that will be passed to the Updatemenu constructor - Supported dict properties: - - active - Determines which button (by index starting from - 0) is considered active. - bgcolor - Sets the background color of the update menu - buttons. - bordercolor - Sets the color of the border enclosing the - update menu. - borderwidth - Sets the width (in px) of the border enclosing - the update menu. - buttons - A tuple of :class:`plotly.graph_objects.layout. - updatemenu.Button` instances or dicts with - compatible properties - buttondefaults - When used in a template (as layout.template.lay - out.updatemenu.buttondefaults), sets the - default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons - are laid out, whether in a dropdown menu or a - row/column of buttons. For `left` and `up`, the - buttons will still appear in left-to-right or - top-to-bottom order respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Sets the padding around the buttons or dropdown - menu. - showactive - Highlights active dropdown item or active - button if true. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible - via a dropdown menu or whether the buttons are - stacked horizontally or vertically - visible - Determines whether or not the update menu is - visible. - x - Sets the x position (in normalized coordinates) - of the update menu. - xanchor - Sets the update menu's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the update menu. - yanchor - Sets the update menu's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the range - selector. - Returns ------- tuple[plotly.graph_objs.layout.Updatemenu] @@ -4200,8 +2001,6 @@ def updatemenus(self): def updatemenus(self, val): self["updatemenus"] = val - # updatemenudefaults - # ------------------ @property def updatemenudefaults(self): """ @@ -4215,8 +2014,6 @@ def updatemenudefaults(self): - A dict of string/value properties that will be passed to the Updatemenu constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.Updatemenu @@ -4227,8 +2024,6 @@ def updatemenudefaults(self): def updatemenudefaults(self, val): self["updatemenudefaults"] = val - # violingap - # --------- @property def violingap(self): """ @@ -4249,8 +2044,6 @@ def violingap(self): def violingap(self, val): self["violingap"] = val - # violingroupgap - # -------------- @property def violingroupgap(self): """ @@ -4271,8 +2064,6 @@ def violingroupgap(self): def violingroupgap(self, val): self["violingroupgap"] = val - # violinmode - # ---------- @property def violinmode(self): """ @@ -4297,8 +2088,6 @@ def violinmode(self): def violinmode(self, val): self["violinmode"] = val - # waterfallgap - # ------------ @property def waterfallgap(self): """ @@ -4318,8 +2107,6 @@ def waterfallgap(self): def waterfallgap(self, val): self["waterfallgap"] = val - # waterfallgroupgap - # ----------------- @property def waterfallgroupgap(self): """ @@ -4339,8 +2126,6 @@ def waterfallgroupgap(self): def waterfallgroupgap(self, val): self["waterfallgroupgap"] = val - # waterfallmode - # ------------- @property def waterfallmode(self): """ @@ -4364,8 +2149,6 @@ def waterfallmode(self): def waterfallmode(self, val): self["waterfallmode"] = val - # width - # ----- @property def width(self): """ @@ -4384,8 +2167,6 @@ def width(self): def width(self, val): self["width"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -4395,578 +2176,6 @@ def xaxis(self): - A dict of string/value properties that will be passed to the XAxis constructor - Supported dict properties: - - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.xaxis.Autor - angeoptions` instance or dict with compatible - properties - autotickangles - When `tickangle` is set to "auto", it will be - set to the first angle in this array that is - large enough to prevent label overlap. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range", or by - decreasing the "domain". Default is "domain" - for axes containing image traces, "range" - otherwise. - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - insiderange - Could be used to set the desired inside range - of this axis (excluding the labels) when - `ticklabelposition` of the anchored axis has - "inside". Not implemented for axes with `type` - "log". This would be ignored when `range` is - provided. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - minor - :class:`plotly.graph_objects.layout.xaxis.Minor - ` instance or dict with compatible properties - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.xaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.xaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - rangeselector - :class:`plotly.graph_objects.layout.xaxis.Range - selector` instance or dict with compatible - properties - rangeslider - :class:`plotly.graph_objects.layout.xaxis.Range - slider` instance or dict with compatible - properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - Setting `false` allows to remove a default - constraint (occasionally, you may need to - prevent a default `scaleanchor` constraint from - being applied, eg. when having an image trace - `yaxis: {scaleanchor: "x"}` is set - automatically in order for pixels to be - rendered as squares, setting `yaxis: - {scaleanchor: false}` allows to remove the - constraint). - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.xaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.xaxis.tickformatstops - ticklabelindex - Only for axes with `type` "date" or "linear". - Instead of drawing the major tick label, draw - the label for the minor tick that is n - positions away from the major tick. E.g. to - always draw the label for the minor tick before - each major tick, choose `ticklabelindex` -1. - This is useful for date axes with - `ticklabelmode` "period" if you want to label - the period that ends with each major tick - instead of the period that begins there. - ticklabelindexsrc - Sets the source reference on Chart Studio Cloud - for `ticklabelindex`. - ticklabelmode - Determines where tick labels are drawn with - respect to their corresponding ticks and grid - lines. Only has an effect for axes of `type` - "date" When set to "period", tick labels are - drawn in the middle of the period between - ticks. - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. Otherwise on - "category" and "multicategory" axes the default - is "allow". In other cases the default is *hide - past div*. - ticklabelposition - Determines where tick labels are drawn with - respect to the axis Please note that top or - bottom has no effect on x axes or when - `ticklabelmode` is set to "period". Similarly - left or right has no effect on y axes or when - `ticklabelmode` is set to "period". Has no - effect on "multicategory" axes or when - `tickson` is set to "boundaries". When used on - axes linked by `matches` or `scaleanchor`, no - extra padding for inside labels would be added - by autorange, so that the scales could match. - ticklabelshift - Shifts the tick labels by the specified number - of pixels in parallel to the axis. Positive - values move the labels in the positive - direction of the axis. - ticklabelstandoff - Sets the standoff distance (in px) between the - axis tick labels and their default position. A - positive `ticklabelstandoff` moves the labels - farther away from the plot area if - `ticklabelposition` is "outside", and deeper - into the plot area if `ticklabelposition` is - "inside". A negative `ticklabelstandoff` works - in the opposite direction, moving outside ticks - towards the plot area and inside ticks towards - the outside. If the negative value is large - enough, inside ticks can even end up outside - and vice versa. - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). If "sync", the number of ticks will - sync with the overlayed axis set by - `overlaying` property. - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.xaxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - Returns ------- plotly.graph_objs.layout.XAxis @@ -4977,8 +2186,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -4988,589 +2195,6 @@ def yaxis(self): - A dict of string/value properties that will be passed to the YAxis constructor - Supported dict properties: - - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.yaxis.Autor - angeoptions` instance or dict with compatible - properties - autoshift - Automatically reposition the axis to avoid - overlap with other axes with the same - `overlaying` value. This repositioning will - account for any `shift` amount applied to other - axes on the same side with `autoshift` is set - to true. Only has an effect if `anchor` is set - to "free". - autotickangles - When `tickangle` is set to "auto", it will be - set to the first angle in this array that is - large enough to prevent label overlap. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range", or by - decreasing the "domain". Default is "domain" - for axes containing image traces, "range" - otherwise. - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - insiderange - Could be used to set the desired inside range - of this axis (excluding the labels) when - `ticklabelposition` of the anchored axis has - "inside". Not implemented for axes with `type` - "log". This would be ignored when `range` is - provided. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - minor - :class:`plotly.graph_objects.layout.yaxis.Minor - ` instance or dict with compatible properties - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.yaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.yaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - Setting `false` allows to remove a default - constraint (occasionally, you may need to - prevent a default `scaleanchor` constraint from - being applied, eg. when having an image trace - `yaxis: {scaleanchor: "x"}` is set - automatically in order for pixels to be - rendered as squares, setting `yaxis: - {scaleanchor: false}` allows to remove the - constraint). - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - shift - Moves the axis a given number of pixels from - where it would have been otherwise. Accepts - both positive and negative values, which will - shift the axis either right or left, - respectively. If `autoshift` is set to true, - then this defaults to a padding of -3 if `side` - is set to "left". and defaults to +3 if `side` - is set to "right". Defaults to 0 if `autoshift` - is set to false. Only has an effect if `anchor` - is set to "free". - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.yaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.yaxis.tickformatstops - ticklabelindex - Only for axes with `type` "date" or "linear". - Instead of drawing the major tick label, draw - the label for the minor tick that is n - positions away from the major tick. E.g. to - always draw the label for the minor tick before - each major tick, choose `ticklabelindex` -1. - This is useful for date axes with - `ticklabelmode` "period" if you want to label - the period that ends with each major tick - instead of the period that begins there. - ticklabelindexsrc - Sets the source reference on Chart Studio Cloud - for `ticklabelindex`. - ticklabelmode - Determines where tick labels are drawn with - respect to their corresponding ticks and grid - lines. Only has an effect for axes of `type` - "date" When set to "period", tick labels are - drawn in the middle of the period between - ticks. - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. Otherwise on - "category" and "multicategory" axes the default - is "allow". In other cases the default is *hide - past div*. - ticklabelposition - Determines where tick labels are drawn with - respect to the axis Please note that top or - bottom has no effect on x axes or when - `ticklabelmode` is set to "period". Similarly - left or right has no effect on y axes or when - `ticklabelmode` is set to "period". Has no - effect on "multicategory" axes or when - `tickson` is set to "boundaries". When used on - axes linked by `matches` or `scaleanchor`, no - extra padding for inside labels would be added - by autorange, so that the scales could match. - ticklabelshift - Shifts the tick labels by the specified number - of pixels in parallel to the axis. Positive - values move the labels in the positive - direction of the axis. - ticklabelstandoff - Sets the standoff distance (in px) between the - axis tick labels and their default position. A - positive `ticklabelstandoff` moves the labels - farther away from the plot area if - `ticklabelposition` is "outside", and deeper - into the plot area if `ticklabelposition` is - "inside". A negative `ticklabelstandoff` works - in the opposite direction, moving outside ticks - towards the plot area and inside ticks towards - the outside. If the negative value is large - enough, inside ticks can even end up outside - and vice versa. - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). If "sync", the number of ticks will - sync with the overlayed axis set by - `overlaying` property. - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.yaxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - Returns ------- plotly.graph_objs.layout.YAxis @@ -5581,8 +2205,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -6081,101 +2703,101 @@ def _prop_descriptions(self): def __init__( self, arg=None, - activeselection=None, - activeshape=None, - annotations=None, - annotationdefaults=None, - autosize=None, - autotypenumbers=None, - barcornerradius=None, - bargap=None, - bargroupgap=None, - barmode=None, - barnorm=None, - boxgap=None, - boxgroupgap=None, - boxmode=None, - calendar=None, - clickmode=None, - coloraxis=None, - colorscale=None, - colorway=None, - computed=None, - datarevision=None, - dragmode=None, - editrevision=None, - extendfunnelareacolors=None, - extendiciclecolors=None, - extendpiecolors=None, - extendsunburstcolors=None, - extendtreemapcolors=None, - font=None, - funnelareacolorway=None, - funnelgap=None, - funnelgroupgap=None, - funnelmode=None, - geo=None, - grid=None, - height=None, - hiddenlabels=None, - hiddenlabelssrc=None, - hidesources=None, - hoverdistance=None, - hoverlabel=None, - hovermode=None, - hoversubplots=None, - iciclecolorway=None, - images=None, - imagedefaults=None, - legend=None, - map=None, - mapbox=None, - margin=None, - meta=None, - metasrc=None, - minreducedheight=None, - minreducedwidth=None, - modebar=None, - newselection=None, - newshape=None, - paper_bgcolor=None, - piecolorway=None, - plot_bgcolor=None, - polar=None, - scattergap=None, - scattermode=None, - scene=None, - selectdirection=None, - selectionrevision=None, - selections=None, - selectiondefaults=None, - separators=None, - shapes=None, - shapedefaults=None, - showlegend=None, - sliders=None, - sliderdefaults=None, - smith=None, - spikedistance=None, - sunburstcolorway=None, - template=None, - ternary=None, - title=None, - transition=None, - treemapcolorway=None, - uirevision=None, - uniformtext=None, - updatemenus=None, - updatemenudefaults=None, - violingap=None, - violingroupgap=None, - violinmode=None, - waterfallgap=None, - waterfallgroupgap=None, - waterfallmode=None, - width=None, - xaxis=None, - yaxis=None, + activeselection: None | None = None, + activeshape: None | None = None, + annotations: None | None = None, + annotationdefaults: None | None = None, + autosize: bool | None = None, + autotypenumbers: Any | None = None, + barcornerradius: Any | None = None, + bargap: int | float | None = None, + bargroupgap: int | float | None = None, + barmode: Any | None = None, + barnorm: Any | None = None, + boxgap: int | float | None = None, + boxgroupgap: int | float | None = None, + boxmode: Any | None = None, + calendar: Any | None = None, + clickmode: Any | None = None, + coloraxis: None | None = None, + colorscale: None | None = None, + colorway: list | None = None, + computed: Any | None = None, + datarevision: Any | None = None, + dragmode: Any | None = None, + editrevision: Any | None = None, + extendfunnelareacolors: bool | None = None, + extendiciclecolors: bool | None = None, + extendpiecolors: bool | None = None, + extendsunburstcolors: bool | None = None, + extendtreemapcolors: bool | None = None, + font: None | None = None, + funnelareacolorway: list | None = None, + funnelgap: int | float | None = None, + funnelgroupgap: int | float | None = None, + funnelmode: Any | None = None, + geo: None | None = None, + grid: None | None = None, + height: int | float | None = None, + hiddenlabels: NDArray | None = None, + hiddenlabelssrc: str | None = None, + hidesources: bool | None = None, + hoverdistance: int | None = None, + hoverlabel: None | None = None, + hovermode: Any | None = None, + hoversubplots: Any | None = None, + iciclecolorway: list | None = None, + images: None | None = None, + imagedefaults: None | None = None, + legend: None | None = None, + map: None | None = None, + mapbox: None | None = None, + margin: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + minreducedheight: int | float | None = None, + minreducedwidth: int | float | None = None, + modebar: None | None = None, + newselection: None | None = None, + newshape: None | None = None, + paper_bgcolor: str | None = None, + piecolorway: list | None = None, + plot_bgcolor: str | None = None, + polar: None | None = None, + scattergap: int | float | None = None, + scattermode: Any | None = None, + scene: None | None = None, + selectdirection: Any | None = None, + selectionrevision: Any | None = None, + selections: None | None = None, + selectiondefaults: None | None = None, + separators: str | None = None, + shapes: None | None = None, + shapedefaults: None | None = None, + showlegend: bool | None = None, + sliders: None | None = None, + sliderdefaults: None | None = None, + smith: None | None = None, + spikedistance: int | None = None, + sunburstcolorway: list | None = None, + template: None | None = None, + ternary: None | None = None, + title: None | None = None, + transition: None | None = None, + treemapcolorway: list | None = None, + uirevision: Any | None = None, + uniformtext: None | None = None, + updatemenus: None | None = None, + updatemenudefaults: None | None = None, + violingap: int | float | None = None, + violingroupgap: int | float | None = None, + violinmode: Any | None = None, + waterfallgap: int | float | None = None, + waterfallgroupgap: int | float | None = None, + waterfallmode: Any | None = None, + width: int | float | None = None, + xaxis: None | None = None, + yaxis: None | None = None, **kwargs, ): """ @@ -6681,14 +3303,11 @@ def __init__( ------- Layout """ - super(Layout, self).__init__("layout") - + super().__init__("layout") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Override _valid_props for instance so that instance can mutate set - # to support subplot properties (e.g. xaxis2) self._valid_props = { "activeselection", "activeshape", @@ -6787,8 +3406,6 @@ def __init__( "yaxis", } - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -6803,398 +3420,103 @@ def __init__( an instance of :class:`plotly.graph_objs.Layout`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("activeselection", None) - _v = activeselection if activeselection is not None else _v - if _v is not None: - self["activeselection"] = _v - _v = arg.pop("activeshape", None) - _v = activeshape if activeshape is not None else _v - if _v is not None: - self["activeshape"] = _v - _v = arg.pop("annotations", None) - _v = annotations if annotations is not None else _v - if _v is not None: - self["annotations"] = _v - _v = arg.pop("annotationdefaults", None) - _v = annotationdefaults if annotationdefaults is not None else _v - if _v is not None: - self["annotationdefaults"] = _v - _v = arg.pop("autosize", None) - _v = autosize if autosize is not None else _v - if _v is not None: - self["autosize"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("barcornerradius", None) - _v = barcornerradius if barcornerradius is not None else _v - if _v is not None: - self["barcornerradius"] = _v - _v = arg.pop("bargap", None) - _v = bargap if bargap is not None else _v - if _v is not None: - self["bargap"] = _v - _v = arg.pop("bargroupgap", None) - _v = bargroupgap if bargroupgap is not None else _v - if _v is not None: - self["bargroupgap"] = _v - _v = arg.pop("barmode", None) - _v = barmode if barmode is not None else _v - if _v is not None: - self["barmode"] = _v - _v = arg.pop("barnorm", None) - _v = barnorm if barnorm is not None else _v - if _v is not None: - self["barnorm"] = _v - _v = arg.pop("boxgap", None) - _v = boxgap if boxgap is not None else _v - if _v is not None: - self["boxgap"] = _v - _v = arg.pop("boxgroupgap", None) - _v = boxgroupgap if boxgroupgap is not None else _v - if _v is not None: - self["boxgroupgap"] = _v - _v = arg.pop("boxmode", None) - _v = boxmode if boxmode is not None else _v - if _v is not None: - self["boxmode"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("clickmode", None) - _v = clickmode if clickmode is not None else _v - if _v is not None: - self["clickmode"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorway", None) - _v = colorway if colorway is not None else _v - if _v is not None: - self["colorway"] = _v - _v = arg.pop("computed", None) - _v = computed if computed is not None else _v - if _v is not None: - self["computed"] = _v - _v = arg.pop("datarevision", None) - _v = datarevision if datarevision is not None else _v - if _v is not None: - self["datarevision"] = _v - _v = arg.pop("dragmode", None) - _v = dragmode if dragmode is not None else _v - if _v is not None: - self["dragmode"] = _v - _v = arg.pop("editrevision", None) - _v = editrevision if editrevision is not None else _v - if _v is not None: - self["editrevision"] = _v - _v = arg.pop("extendfunnelareacolors", None) - _v = extendfunnelareacolors if extendfunnelareacolors is not None else _v - if _v is not None: - self["extendfunnelareacolors"] = _v - _v = arg.pop("extendiciclecolors", None) - _v = extendiciclecolors if extendiciclecolors is not None else _v - if _v is not None: - self["extendiciclecolors"] = _v - _v = arg.pop("extendpiecolors", None) - _v = extendpiecolors if extendpiecolors is not None else _v - if _v is not None: - self["extendpiecolors"] = _v - _v = arg.pop("extendsunburstcolors", None) - _v = extendsunburstcolors if extendsunburstcolors is not None else _v - if _v is not None: - self["extendsunburstcolors"] = _v - _v = arg.pop("extendtreemapcolors", None) - _v = extendtreemapcolors if extendtreemapcolors is not None else _v - if _v is not None: - self["extendtreemapcolors"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("funnelareacolorway", None) - _v = funnelareacolorway if funnelareacolorway is not None else _v - if _v is not None: - self["funnelareacolorway"] = _v - _v = arg.pop("funnelgap", None) - _v = funnelgap if funnelgap is not None else _v - if _v is not None: - self["funnelgap"] = _v - _v = arg.pop("funnelgroupgap", None) - _v = funnelgroupgap if funnelgroupgap is not None else _v - if _v is not None: - self["funnelgroupgap"] = _v - _v = arg.pop("funnelmode", None) - _v = funnelmode if funnelmode is not None else _v - if _v is not None: - self["funnelmode"] = _v - _v = arg.pop("geo", None) - _v = geo if geo is not None else _v - if _v is not None: - self["geo"] = _v - _v = arg.pop("grid", None) - _v = grid if grid is not None else _v - if _v is not None: - self["grid"] = _v - _v = arg.pop("height", None) - _v = height if height is not None else _v - if _v is not None: - self["height"] = _v - _v = arg.pop("hiddenlabels", None) - _v = hiddenlabels if hiddenlabels is not None else _v - if _v is not None: - self["hiddenlabels"] = _v - _v = arg.pop("hiddenlabelssrc", None) - _v = hiddenlabelssrc if hiddenlabelssrc is not None else _v - if _v is not None: - self["hiddenlabelssrc"] = _v - _v = arg.pop("hidesources", None) - _v = hidesources if hidesources is not None else _v - if _v is not None: - self["hidesources"] = _v - _v = arg.pop("hoverdistance", None) - _v = hoverdistance if hoverdistance is not None else _v - if _v is not None: - self["hoverdistance"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovermode", None) - _v = hovermode if hovermode is not None else _v - if _v is not None: - self["hovermode"] = _v - _v = arg.pop("hoversubplots", None) - _v = hoversubplots if hoversubplots is not None else _v - if _v is not None: - self["hoversubplots"] = _v - _v = arg.pop("iciclecolorway", None) - _v = iciclecolorway if iciclecolorway is not None else _v - if _v is not None: - self["iciclecolorway"] = _v - _v = arg.pop("images", None) - _v = images if images is not None else _v - if _v is not None: - self["images"] = _v - _v = arg.pop("imagedefaults", None) - _v = imagedefaults if imagedefaults is not None else _v - if _v is not None: - self["imagedefaults"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("map", None) - _v = map if map is not None else _v - if _v is not None: - self["map"] = _v - _v = arg.pop("mapbox", None) - _v = mapbox if mapbox is not None else _v - if _v is not None: - self["mapbox"] = _v - _v = arg.pop("margin", None) - _v = margin if margin is not None else _v - if _v is not None: - self["margin"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("minreducedheight", None) - _v = minreducedheight if minreducedheight is not None else _v - if _v is not None: - self["minreducedheight"] = _v - _v = arg.pop("minreducedwidth", None) - _v = minreducedwidth if minreducedwidth is not None else _v - if _v is not None: - self["minreducedwidth"] = _v - _v = arg.pop("modebar", None) - _v = modebar if modebar is not None else _v - if _v is not None: - self["modebar"] = _v - _v = arg.pop("newselection", None) - _v = newselection if newselection is not None else _v - if _v is not None: - self["newselection"] = _v - _v = arg.pop("newshape", None) - _v = newshape if newshape is not None else _v - if _v is not None: - self["newshape"] = _v - _v = arg.pop("paper_bgcolor", None) - _v = paper_bgcolor if paper_bgcolor is not None else _v - if _v is not None: - self["paper_bgcolor"] = _v - _v = arg.pop("piecolorway", None) - _v = piecolorway if piecolorway is not None else _v - if _v is not None: - self["piecolorway"] = _v - _v = arg.pop("plot_bgcolor", None) - _v = plot_bgcolor if plot_bgcolor is not None else _v - if _v is not None: - self["plot_bgcolor"] = _v - _v = arg.pop("polar", None) - _v = polar if polar is not None else _v - if _v is not None: - self["polar"] = _v - _v = arg.pop("scattergap", None) - _v = scattergap if scattergap is not None else _v - if _v is not None: - self["scattergap"] = _v - _v = arg.pop("scattermode", None) - _v = scattermode if scattermode is not None else _v - if _v is not None: - self["scattermode"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("selectdirection", None) - _v = selectdirection if selectdirection is not None else _v - if _v is not None: - self["selectdirection"] = _v - _v = arg.pop("selectionrevision", None) - _v = selectionrevision if selectionrevision is not None else _v - if _v is not None: - self["selectionrevision"] = _v - _v = arg.pop("selections", None) - _v = selections if selections is not None else _v - if _v is not None: - self["selections"] = _v - _v = arg.pop("selectiondefaults", None) - _v = selectiondefaults if selectiondefaults is not None else _v - if _v is not None: - self["selectiondefaults"] = _v - _v = arg.pop("separators", None) - _v = separators if separators is not None else _v - if _v is not None: - self["separators"] = _v - _v = arg.pop("shapes", None) - _v = shapes if shapes is not None else _v - if _v is not None: - self["shapes"] = _v - _v = arg.pop("shapedefaults", None) - _v = shapedefaults if shapedefaults is not None else _v - if _v is not None: - self["shapedefaults"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("sliders", None) - _v = sliders if sliders is not None else _v - if _v is not None: - self["sliders"] = _v - _v = arg.pop("sliderdefaults", None) - _v = sliderdefaults if sliderdefaults is not None else _v - if _v is not None: - self["sliderdefaults"] = _v - _v = arg.pop("smith", None) - _v = smith if smith is not None else _v - if _v is not None: - self["smith"] = _v - _v = arg.pop("spikedistance", None) - _v = spikedistance if spikedistance is not None else _v - if _v is not None: - self["spikedistance"] = _v - _v = arg.pop("sunburstcolorway", None) - _v = sunburstcolorway if sunburstcolorway is not None else _v - if _v is not None: - self["sunburstcolorway"] = _v - _v = arg.pop("template", None) - _v = template if template is not None else _v - if _v is not None: - self["template"] = _v - _v = arg.pop("ternary", None) - _v = ternary if ternary is not None else _v - if _v is not None: - self["ternary"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("transition", None) - _v = transition if transition is not None else _v - if _v is not None: - self["transition"] = _v - _v = arg.pop("treemapcolorway", None) - _v = treemapcolorway if treemapcolorway is not None else _v - if _v is not None: - self["treemapcolorway"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("uniformtext", None) - _v = uniformtext if uniformtext is not None else _v - if _v is not None: - self["uniformtext"] = _v - _v = arg.pop("updatemenus", None) - _v = updatemenus if updatemenus is not None else _v - if _v is not None: - self["updatemenus"] = _v - _v = arg.pop("updatemenudefaults", None) - _v = updatemenudefaults if updatemenudefaults is not None else _v - if _v is not None: - self["updatemenudefaults"] = _v - _v = arg.pop("violingap", None) - _v = violingap if violingap is not None else _v - if _v is not None: - self["violingap"] = _v - _v = arg.pop("violingroupgap", None) - _v = violingroupgap if violingroupgap is not None else _v - if _v is not None: - self["violingroupgap"] = _v - _v = arg.pop("violinmode", None) - _v = violinmode if violinmode is not None else _v - if _v is not None: - self["violinmode"] = _v - _v = arg.pop("waterfallgap", None) - _v = waterfallgap if waterfallgap is not None else _v - if _v is not None: - self["waterfallgap"] = _v - _v = arg.pop("waterfallgroupgap", None) - _v = waterfallgroupgap if waterfallgroupgap is not None else _v - if _v is not None: - self["waterfallgroupgap"] = _v - _v = arg.pop("waterfallmode", None) - _v = waterfallmode if waterfallmode is not None else _v - if _v is not None: - self["waterfallmode"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("activeselection", arg, activeselection) + self._init_provided("activeshape", arg, activeshape) + self._init_provided("annotations", arg, annotations) + self._init_provided("annotationdefaults", arg, annotationdefaults) + self._init_provided("autosize", arg, autosize) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("barcornerradius", arg, barcornerradius) + self._init_provided("bargap", arg, bargap) + self._init_provided("bargroupgap", arg, bargroupgap) + self._init_provided("barmode", arg, barmode) + self._init_provided("barnorm", arg, barnorm) + self._init_provided("boxgap", arg, boxgap) + self._init_provided("boxgroupgap", arg, boxgroupgap) + self._init_provided("boxmode", arg, boxmode) + self._init_provided("calendar", arg, calendar) + self._init_provided("clickmode", arg, clickmode) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorway", arg, colorway) + self._init_provided("computed", arg, computed) + self._init_provided("datarevision", arg, datarevision) + self._init_provided("dragmode", arg, dragmode) + self._init_provided("editrevision", arg, editrevision) + self._init_provided("extendfunnelareacolors", arg, extendfunnelareacolors) + self._init_provided("extendiciclecolors", arg, extendiciclecolors) + self._init_provided("extendpiecolors", arg, extendpiecolors) + self._init_provided("extendsunburstcolors", arg, extendsunburstcolors) + self._init_provided("extendtreemapcolors", arg, extendtreemapcolors) + self._init_provided("font", arg, font) + self._init_provided("funnelareacolorway", arg, funnelareacolorway) + self._init_provided("funnelgap", arg, funnelgap) + self._init_provided("funnelgroupgap", arg, funnelgroupgap) + self._init_provided("funnelmode", arg, funnelmode) + self._init_provided("geo", arg, geo) + self._init_provided("grid", arg, grid) + self._init_provided("height", arg, height) + self._init_provided("hiddenlabels", arg, hiddenlabels) + self._init_provided("hiddenlabelssrc", arg, hiddenlabelssrc) + self._init_provided("hidesources", arg, hidesources) + self._init_provided("hoverdistance", arg, hoverdistance) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovermode", arg, hovermode) + self._init_provided("hoversubplots", arg, hoversubplots) + self._init_provided("iciclecolorway", arg, iciclecolorway) + self._init_provided("images", arg, images) + self._init_provided("imagedefaults", arg, imagedefaults) + self._init_provided("legend", arg, legend) + self._init_provided("map", arg, map) + self._init_provided("mapbox", arg, mapbox) + self._init_provided("margin", arg, margin) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("minreducedheight", arg, minreducedheight) + self._init_provided("minreducedwidth", arg, minreducedwidth) + self._init_provided("modebar", arg, modebar) + self._init_provided("newselection", arg, newselection) + self._init_provided("newshape", arg, newshape) + self._init_provided("paper_bgcolor", arg, paper_bgcolor) + self._init_provided("piecolorway", arg, piecolorway) + self._init_provided("plot_bgcolor", arg, plot_bgcolor) + self._init_provided("polar", arg, polar) + self._init_provided("scattergap", arg, scattergap) + self._init_provided("scattermode", arg, scattermode) + self._init_provided("scene", arg, scene) + self._init_provided("selectdirection", arg, selectdirection) + self._init_provided("selectionrevision", arg, selectionrevision) + self._init_provided("selections", arg, selections) + self._init_provided("selectiondefaults", arg, selectiondefaults) + self._init_provided("separators", arg, separators) + self._init_provided("shapes", arg, shapes) + self._init_provided("shapedefaults", arg, shapedefaults) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("sliders", arg, sliders) + self._init_provided("sliderdefaults", arg, sliderdefaults) + self._init_provided("smith", arg, smith) + self._init_provided("spikedistance", arg, spikedistance) + self._init_provided("sunburstcolorway", arg, sunburstcolorway) + self._init_provided("template", arg, template) + self._init_provided("ternary", arg, ternary) + self._init_provided("title", arg, title) + self._init_provided("transition", arg, transition) + self._init_provided("treemapcolorway", arg, treemapcolorway) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("uniformtext", arg, uniformtext) + self._init_provided("updatemenus", arg, updatemenus) + self._init_provided("updatemenudefaults", arg, updatemenudefaults) + self._init_provided("violingap", arg, violingap) + self._init_provided("violingroupgap", arg, violingroupgap) + self._init_provided("violinmode", arg, violinmode) + self._init_provided("waterfallgap", arg, waterfallgap) + self._init_provided("waterfallgroupgap", arg, waterfallgroupgap) + self._init_provided("waterfallmode", arg, waterfallmode) + self._init_provided("width", arg, width) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("yaxis", arg, yaxis) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_mesh3d.py b/plotly/graph_objs/_mesh3d.py index a23756902a..9f4fc8e084 100644 --- a/plotly/graph_objs/_mesh3d.py +++ b/plotly/graph_objs/_mesh3d.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Mesh3d(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "mesh3d" _valid_props = { @@ -82,8 +83,6 @@ class Mesh3d(_BaseTraceType): "zsrc", } - # alphahull - # --------- @property def alphahull(self): """ @@ -117,8 +116,6 @@ def alphahull(self): def alphahull(self, val): self["alphahull"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -142,8 +139,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -165,8 +160,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -187,8 +180,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -210,8 +201,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -232,8 +221,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -244,42 +231,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to mesh3d.colorscale @@ -293,8 +245,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -320,8 +270,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -331,272 +279,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.mesh3d. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.mesh3d.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of mesh3d.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.mesh3d.colorbar.Ti - tle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.mesh3d.ColorBar @@ -607,8 +289,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -660,8 +340,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contour - # ------- @property def contour(self): """ @@ -671,16 +349,6 @@ def contour(self): - A dict of string/value properties that will be passed to the Contour constructor - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. - Returns ------- plotly.graph_objs.mesh3d.Contour @@ -691,8 +359,6 @@ def contour(self): def contour(self, val): self["contour"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -706,7 +372,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -714,8 +380,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -735,8 +399,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # delaunayaxis - # ------------ @property def delaunayaxis(self): """ @@ -759,8 +421,6 @@ def delaunayaxis(self): def delaunayaxis(self, val): self["delaunayaxis"] = val - # facecolor - # --------- @property def facecolor(self): """ @@ -772,7 +432,7 @@ def facecolor(self): Returns ------- - numpy.ndarray + NDArray """ return self["facecolor"] @@ -780,8 +440,6 @@ def facecolor(self): def facecolor(self, val): self["facecolor"] = val - # facecolorsrc - # ------------ @property def facecolorsrc(self): """ @@ -801,8 +459,6 @@ def facecolorsrc(self): def facecolorsrc(self, val): self["facecolorsrc"] = val - # flatshading - # ----------- @property def flatshading(self): """ @@ -823,8 +479,6 @@ def flatshading(self): def flatshading(self, val): self["flatshading"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -841,7 +495,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -849,8 +503,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -870,8 +522,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -881,44 +531,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.mesh3d.Hoverlabel @@ -929,8 +541,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -965,7 +575,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -973,8 +583,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -994,8 +602,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -1008,7 +614,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -1016,8 +622,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -1037,8 +641,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # i - # - @property def i(self): """ @@ -1055,7 +657,7 @@ def i(self): Returns ------- - numpy.ndarray + NDArray """ return self["i"] @@ -1063,8 +665,6 @@ def i(self): def i(self, val): self["i"] = val - # ids - # --- @property def ids(self): """ @@ -1077,7 +677,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -1085,8 +685,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -1105,8 +703,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # intensity - # --------- @property def intensity(self): """ @@ -1118,7 +714,7 @@ def intensity(self): Returns ------- - numpy.ndarray + NDArray """ return self["intensity"] @@ -1126,8 +722,6 @@ def intensity(self): def intensity(self, val): self["intensity"] = val - # intensitymode - # ------------- @property def intensitymode(self): """ @@ -1147,8 +741,6 @@ def intensitymode(self): def intensitymode(self, val): self["intensitymode"] = val - # intensitysrc - # ------------ @property def intensitysrc(self): """ @@ -1168,8 +760,6 @@ def intensitysrc(self): def intensitysrc(self, val): self["intensitysrc"] = val - # isrc - # ---- @property def isrc(self): """ @@ -1188,8 +778,6 @@ def isrc(self): def isrc(self, val): self["isrc"] = val - # j - # - @property def j(self): """ @@ -1206,7 +794,7 @@ def j(self): Returns ------- - numpy.ndarray + NDArray """ return self["j"] @@ -1214,8 +802,6 @@ def j(self): def j(self, val): self["j"] = val - # jsrc - # ---- @property def jsrc(self): """ @@ -1234,8 +820,6 @@ def jsrc(self): def jsrc(self, val): self["jsrc"] = val - # k - # - @property def k(self): """ @@ -1252,7 +836,7 @@ def k(self): Returns ------- - numpy.ndarray + NDArray """ return self["k"] @@ -1260,8 +844,6 @@ def k(self): def k(self, val): self["k"] = val - # ksrc - # ---- @property def ksrc(self): """ @@ -1280,8 +862,6 @@ def ksrc(self): def ksrc(self, val): self["ksrc"] = val - # legend - # ------ @property def legend(self): """ @@ -1305,8 +885,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -1328,8 +906,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1339,13 +915,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.mesh3d.Legendgrouptitle @@ -1356,8 +925,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1383,8 +950,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1404,8 +969,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lighting - # -------- @property def lighting(self): """ @@ -1415,33 +978,6 @@ def lighting(self): - A dict of string/value properties that will be passed to the Lighting constructor - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - Returns ------- plotly.graph_objs.mesh3d.Lighting @@ -1452,8 +988,6 @@ def lighting(self): def lighting(self, val): self["lighting"] = val - # lightposition - # ------------- @property def lightposition(self): """ @@ -1463,18 +997,6 @@ def lightposition(self): - A dict of string/value properties that will be passed to the Lightposition constructor - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - Returns ------- plotly.graph_objs.mesh3d.Lightposition @@ -1485,8 +1007,6 @@ def lightposition(self): def lightposition(self, val): self["lightposition"] = val - # meta - # ---- @property def meta(self): """ @@ -1505,7 +1025,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1513,8 +1033,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1533,8 +1051,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1555,8 +1071,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1580,8 +1094,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1602,8 +1114,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- @property def scene(self): """ @@ -1627,8 +1137,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1648,8 +1156,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1669,8 +1175,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1680,18 +1184,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.mesh3d.Stream @@ -1702,8 +1194,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1718,7 +1208,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1726,8 +1216,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1746,8 +1234,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1768,8 +1254,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1801,8 +1285,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # vertexcolor - # ----------- @property def vertexcolor(self): """ @@ -1816,7 +1298,7 @@ def vertexcolor(self): Returns ------- - numpy.ndarray + NDArray """ return self["vertexcolor"] @@ -1824,8 +1306,6 @@ def vertexcolor(self): def vertexcolor(self, val): self["vertexcolor"] = val - # vertexcolorsrc - # -------------- @property def vertexcolorsrc(self): """ @@ -1845,8 +1325,6 @@ def vertexcolorsrc(self): def vertexcolorsrc(self, val): self["vertexcolorsrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1868,8 +1346,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1882,7 +1358,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1890,8 +1366,6 @@ def x(self): def x(self, val): self["x"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1914,8 +1388,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1945,8 +1417,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1965,8 +1435,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1979,7 +1447,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1987,8 +1455,6 @@ def y(self): def y(self, val): self["y"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -2011,8 +1477,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -2042,8 +1506,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2062,8 +1524,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -2076,7 +1536,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -2084,8 +1544,6 @@ def z(self): def z(self, val): self["z"] = val - # zcalendar - # --------- @property def zcalendar(self): """ @@ -2108,8 +1566,6 @@ def zcalendar(self): def zcalendar(self, val): self["zcalendar"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -2139,8 +1595,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -2159,14 +1613,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2558,76 +2008,76 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alphahull=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - delaunayaxis=None, - facecolor=None, - facecolorsrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - i=None, - ids=None, - idssrc=None, - intensity=None, - intensitymode=None, - intensitysrc=None, - isrc=None, - j=None, - jsrc=None, - k=None, - ksrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - vertexcolor=None, - vertexcolorsrc=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + alphahull: int | float | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + delaunayaxis: Any | None = None, + facecolor: NDArray | None = None, + facecolorsrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + i: NDArray | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + intensity: NDArray | None = None, + intensitymode: Any | None = None, + intensitysrc: str | None = None, + isrc: str | None = None, + j: NDArray | None = None, + jsrc: str | None = None, + k: NDArray | None = None, + ksrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + vertexcolor: NDArray | None = None, + vertexcolorsrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -3031,14 +2481,11 @@ def __init__( ------- Mesh3d """ - super(Mesh3d, self).__init__("mesh3d") - + super().__init__("mesh3d") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3053,304 +2500,81 @@ def __init__( an instance of :class:`plotly.graph_objs.Mesh3d`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alphahull", None) - _v = alphahull if alphahull is not None else _v - if _v is not None: - self["alphahull"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("contour", None) - _v = contour if contour is not None else _v - if _v is not None: - self["contour"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("delaunayaxis", None) - _v = delaunayaxis if delaunayaxis is not None else _v - if _v is not None: - self["delaunayaxis"] = _v - _v = arg.pop("facecolor", None) - _v = facecolor if facecolor is not None else _v - if _v is not None: - self["facecolor"] = _v - _v = arg.pop("facecolorsrc", None) - _v = facecolorsrc if facecolorsrc is not None else _v - if _v is not None: - self["facecolorsrc"] = _v - _v = arg.pop("flatshading", None) - _v = flatshading if flatshading is not None else _v - if _v is not None: - self["flatshading"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("i", None) - _v = i if i is not None else _v - if _v is not None: - self["i"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("intensity", None) - _v = intensity if intensity is not None else _v - if _v is not None: - self["intensity"] = _v - _v = arg.pop("intensitymode", None) - _v = intensitymode if intensitymode is not None else _v - if _v is not None: - self["intensitymode"] = _v - _v = arg.pop("intensitysrc", None) - _v = intensitysrc if intensitysrc is not None else _v - if _v is not None: - self["intensitysrc"] = _v - _v = arg.pop("isrc", None) - _v = isrc if isrc is not None else _v - if _v is not None: - self["isrc"] = _v - _v = arg.pop("j", None) - _v = j if j is not None else _v - if _v is not None: - self["j"] = _v - _v = arg.pop("jsrc", None) - _v = jsrc if jsrc is not None else _v - if _v is not None: - self["jsrc"] = _v - _v = arg.pop("k", None) - _v = k if k is not None else _v - if _v is not None: - self["k"] = _v - _v = arg.pop("ksrc", None) - _v = ksrc if ksrc is not None else _v - if _v is not None: - self["ksrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lighting", None) - _v = lighting if lighting is not None else _v - if _v is not None: - self["lighting"] = _v - _v = arg.pop("lightposition", None) - _v = lightposition if lightposition is not None else _v - if _v is not None: - self["lightposition"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("vertexcolor", None) - _v = vertexcolor if vertexcolor is not None else _v - if _v is not None: - self["vertexcolor"] = _v - _v = arg.pop("vertexcolorsrc", None) - _v = vertexcolorsrc if vertexcolorsrc is not None else _v - if _v is not None: - self["vertexcolorsrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zcalendar", None) - _v = zcalendar if zcalendar is not None else _v - if _v is not None: - self["zcalendar"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alphahull", arg, alphahull) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("contour", arg, contour) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("delaunayaxis", arg, delaunayaxis) + self._init_provided("facecolor", arg, facecolor) + self._init_provided("facecolorsrc", arg, facecolorsrc) + self._init_provided("flatshading", arg, flatshading) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("i", arg, i) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("intensity", arg, intensity) + self._init_provided("intensitymode", arg, intensitymode) + self._init_provided("intensitysrc", arg, intensitysrc) + self._init_provided("isrc", arg, isrc) + self._init_provided("j", arg, j) + self._init_provided("jsrc", arg, jsrc) + self._init_provided("k", arg, k) + self._init_provided("ksrc", arg, ksrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lighting", arg, lighting) + self._init_provided("lightposition", arg, lightposition) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("vertexcolor", arg, vertexcolor) + self._init_provided("vertexcolorsrc", arg, vertexcolorsrc) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zcalendar", arg, zcalendar) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "mesh3d" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_ohlc.py b/plotly/graph_objs/_ohlc.py index b979885827..bd307d95d4 100644 --- a/plotly/graph_objs/_ohlc.py +++ b/plotly/graph_objs/_ohlc.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Ohlc(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "ohlc" _valid_props = { @@ -61,8 +62,6 @@ class Ohlc(_BaseTraceType): "zorder", } - # close - # ----- @property def close(self): """ @@ -73,7 +72,7 @@ def close(self): Returns ------- - numpy.ndarray + NDArray """ return self["close"] @@ -81,8 +80,6 @@ def close(self): def close(self, val): self["close"] = val - # closesrc - # -------- @property def closesrc(self): """ @@ -101,8 +98,6 @@ def closesrc(self): def closesrc(self, val): self["closesrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -116,7 +111,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -124,8 +119,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -145,8 +138,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # decreasing - # ---------- @property def decreasing(self): """ @@ -156,12 +147,6 @@ def decreasing(self): - A dict of string/value properties that will be passed to the Decreasing constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.ohlc.decreasing.Li - ne` instance or dict with compatible properties - Returns ------- plotly.graph_objs.ohlc.Decreasing @@ -172,8 +157,6 @@ def decreasing(self): def decreasing(self, val): self["decreasing"] = val - # high - # ---- @property def high(self): """ @@ -184,7 +167,7 @@ def high(self): Returns ------- - numpy.ndarray + NDArray """ return self["high"] @@ -192,8 +175,6 @@ def high(self): def high(self, val): self["high"] = val - # highsrc - # ------- @property def highsrc(self): """ @@ -212,8 +193,6 @@ def highsrc(self): def highsrc(self, val): self["highsrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -230,7 +209,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -238,8 +217,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -259,8 +236,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -270,47 +245,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - split - Show hover information (open, close, high, low) - in separate labels. - Returns ------- plotly.graph_objs.ohlc.Hoverlabel @@ -321,8 +255,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -335,7 +267,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -343,8 +275,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -364,8 +294,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -378,7 +306,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -386,8 +314,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -406,8 +332,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # increasing - # ---------- @property def increasing(self): """ @@ -417,12 +341,6 @@ def increasing(self): - A dict of string/value properties that will be passed to the Increasing constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.ohlc.increasing.Li - ne` instance or dict with compatible properties - Returns ------- plotly.graph_objs.ohlc.Increasing @@ -433,8 +351,6 @@ def increasing(self): def increasing(self, val): self["increasing"] = val - # legend - # ------ @property def legend(self): """ @@ -458,8 +374,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -481,8 +395,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -492,13 +404,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.ohlc.Legendgrouptitle @@ -509,8 +414,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -536,8 +439,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -557,8 +458,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -568,22 +467,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - Note that this style setting can also be set - per direction via `increasing.line.dash` and - `decreasing.line.dash`. - width - [object Object] Note that this style setting - can also be set per direction via - `increasing.line.width` and - `decreasing.line.width`. - Returns ------- plotly.graph_objs.ohlc.Line @@ -594,8 +477,6 @@ def line(self): def line(self, val): self["line"] = val - # low - # --- @property def low(self): """ @@ -606,7 +487,7 @@ def low(self): Returns ------- - numpy.ndarray + NDArray """ return self["low"] @@ -614,8 +495,6 @@ def low(self): def low(self, val): self["low"] = val - # lowsrc - # ------ @property def lowsrc(self): """ @@ -634,8 +513,6 @@ def lowsrc(self): def lowsrc(self, val): self["lowsrc"] = val - # meta - # ---- @property def meta(self): """ @@ -654,7 +531,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -662,8 +539,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -682,8 +557,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -704,8 +577,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -724,8 +595,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # open - # ---- @property def open(self): """ @@ -736,7 +605,7 @@ def open(self): Returns ------- - numpy.ndarray + NDArray """ return self["open"] @@ -744,8 +613,6 @@ def open(self): def open(self, val): self["open"] = val - # opensrc - # ------- @property def opensrc(self): """ @@ -764,8 +631,6 @@ def opensrc(self): def opensrc(self, val): self["opensrc"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -788,8 +653,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -809,8 +672,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -820,18 +681,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.ohlc.Stream @@ -842,8 +691,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -859,7 +706,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -867,8 +714,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -887,8 +732,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -908,8 +751,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # uid - # --- @property def uid(self): """ @@ -930,8 +771,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -963,8 +802,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -986,8 +823,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -999,7 +834,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1007,8 +842,6 @@ def x(self): def x(self, val): self["x"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1032,8 +865,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1056,8 +887,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1087,8 +916,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1109,8 +936,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1132,8 +957,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1154,8 +977,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1174,8 +995,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1199,8 +1018,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1230,8 +1047,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # zorder - # ------ @property def zorder(self): """ @@ -1252,14 +1067,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1492,55 +1303,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - close=None, - closesrc=None, - customdata=None, - customdatasrc=None, - decreasing=None, - high=None, - highsrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - low=None, - lowsrc=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - open=None, - opensrc=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textsrc=None, - tickwidth=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - yaxis=None, - yhoverformat=None, - zorder=None, + close: NDArray | None = None, + closesrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + high: NDArray | None = None, + highsrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + low: NDArray | None = None, + lowsrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + open: NDArray | None = None, + opensrc: str | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + tickwidth: int | float | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -1789,14 +1600,11 @@ def __init__( ------- Ohlc """ - super(Ohlc, self).__init__("ohlc") - + super().__init__("ohlc") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1811,220 +1619,60 @@ def __init__( an instance of :class:`plotly.graph_objs.Ohlc`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("close", None) - _v = close if close is not None else _v - if _v is not None: - self["close"] = _v - _v = arg.pop("closesrc", None) - _v = closesrc if closesrc is not None else _v - if _v is not None: - self["closesrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("decreasing", None) - _v = decreasing if decreasing is not None else _v - if _v is not None: - self["decreasing"] = _v - _v = arg.pop("high", None) - _v = high if high is not None else _v - if _v is not None: - self["high"] = _v - _v = arg.pop("highsrc", None) - _v = highsrc if highsrc is not None else _v - if _v is not None: - self["highsrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("increasing", None) - _v = increasing if increasing is not None else _v - if _v is not None: - self["increasing"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("low", None) - _v = low if low is not None else _v - if _v is not None: - self["low"] = _v - _v = arg.pop("lowsrc", None) - _v = lowsrc if lowsrc is not None else _v - if _v is not None: - self["lowsrc"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("open", None) - _v = open if open is not None else _v - if _v is not None: - self["open"] = _v - _v = arg.pop("opensrc", None) - _v = opensrc if opensrc is not None else _v - if _v is not None: - self["opensrc"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("close", arg, close) + self._init_provided("closesrc", arg, closesrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("decreasing", arg, decreasing) + self._init_provided("high", arg, high) + self._init_provided("highsrc", arg, highsrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("increasing", arg, increasing) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("low", arg, low) + self._init_provided("lowsrc", arg, lowsrc) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("open", arg, open) + self._init_provided("opensrc", arg, opensrc) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("zorder", arg, zorder) self._props["type"] = "ohlc" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_parcats.py b/plotly/graph_objs/_parcats.py index 14abfac323..f3cc3c4bda 100644 --- a/plotly/graph_objs/_parcats.py +++ b/plotly/graph_objs/_parcats.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Parcats(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "parcats" _valid_props = { @@ -35,8 +36,6 @@ class Parcats(_BaseTraceType): "visible", } - # arrangement - # ----------- @property def arrangement(self): """ @@ -60,8 +59,6 @@ def arrangement(self): def arrangement(self, val): self["arrangement"] = val - # bundlecolors - # ------------ @property def bundlecolors(self): """ @@ -81,8 +78,6 @@ def bundlecolors(self): def bundlecolors(self, val): self["bundlecolors"] = val - # counts - # ------ @property def counts(self): """ @@ -95,7 +90,7 @@ def counts(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["counts"] @@ -103,8 +98,6 @@ def counts(self): def counts(self, val): self["counts"] = val - # countssrc - # --------- @property def countssrc(self): """ @@ -123,8 +116,6 @@ def countssrc(self): def countssrc(self, val): self["countssrc"] = val - # dimensions - # ---------- @property def dimensions(self): """ @@ -136,59 +127,6 @@ def dimensions(self): - A list or tuple of dicts of string/value properties that will be passed to the Dimension constructor - Supported dict properties: - - categoryarray - Sets the order in which categories in this - dimension appear. Only has an effect if - `categoryorder` is set to "array". Used with - `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the categories - in the dimension. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - displayindex - The display index of dimension, from left to - right, zero indexed, defaults to dimension - index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories - in this dimension. Only has an effect if - `categoryorder` is set to "array". Should be an - array the same length as `categoryarray` Used - with `categoryorder`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - values - Dimension values. `values[n]` represents the - category value of the `n`th point in the - dataset, therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. - Returns ------- tuple[plotly.graph_objs.parcats.Dimension] @@ -199,8 +137,6 @@ def dimensions(self): def dimensions(self, val): self["dimensions"] = val - # dimensiondefaults - # ----------------- @property def dimensiondefaults(self): """ @@ -215,8 +151,6 @@ def dimensiondefaults(self): - A dict of string/value properties that will be passed to the Dimension constructor - Supported dict properties: - Returns ------- plotly.graph_objs.parcats.Dimension @@ -227,8 +161,6 @@ def dimensiondefaults(self): def dimensiondefaults(self, val): self["dimensiondefaults"] = val - # domain - # ------ @property def domain(self): """ @@ -238,22 +170,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this parcats trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats - trace (in plot fraction). - y - Sets the vertical domain of this parcats trace - (in plot fraction). - Returns ------- plotly.graph_objs.parcats.Domain @@ -264,8 +180,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -289,8 +203,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -314,8 +226,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -363,8 +273,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # labelfont - # --------- @property def labelfont(self): """ @@ -376,52 +284,6 @@ def labelfont(self): - A dict of string/value properties that will be passed to the Labelfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcats.Labelfont @@ -432,8 +294,6 @@ def labelfont(self): def labelfont(self, val): self["labelfont"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -443,13 +303,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.parcats.Legendgrouptitle @@ -460,8 +313,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -481,8 +332,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -492,135 +341,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color` is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color` is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color` is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets the line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `line.cmin` and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcats.line.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - This value here applies when hovering over - lines.Finally, the template string has access - to variables `count` and `probability`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color` is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - shape - Sets the shape of the paths. If `linear`, paths - are composed of straight lines. If `hspline`, - paths are composed of horizontal curved splines - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color` is set to a numerical array. - Returns ------- plotly.graph_objs.parcats.Line @@ -631,8 +351,6 @@ def line(self): def line(self, val): self["line"] = val - # meta - # ---- @property def meta(self): """ @@ -651,7 +369,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -659,8 +377,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -679,8 +395,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -701,8 +415,6 @@ def name(self): def name(self, val): self["name"] = val - # sortpaths - # --------- @property def sortpaths(self): """ @@ -724,8 +436,6 @@ def sortpaths(self): def sortpaths(self, val): self["sortpaths"] = val - # stream - # ------ @property def stream(self): """ @@ -735,18 +445,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.parcats.Stream @@ -757,8 +455,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -770,52 +466,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcats.Tickfont @@ -826,8 +476,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # uid - # --- @property def uid(self): """ @@ -848,8 +496,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -881,8 +527,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -904,14 +548,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1062,29 +702,29 @@ def _prop_descriptions(self): def __init__( self, arg=None, - arrangement=None, - bundlecolors=None, - counts=None, - countssrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - hoverinfo=None, - hoveron=None, - hovertemplate=None, - labelfont=None, - legendgrouptitle=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - sortpaths=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - visible=None, + arrangement: Any | None = None, + bundlecolors: bool | None = None, + counts: int | float | None = None, + countssrc: str | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + labelfont: None | None = None, + legendgrouptitle: None | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + sortpaths: Any | None = None, + stream: None | None = None, + tickfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -1245,14 +885,11 @@ def __init__( ------- Parcats """ - super(Parcats, self).__init__("parcats") - + super().__init__("parcats") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1267,116 +904,34 @@ def __init__( an instance of :class:`plotly.graph_objs.Parcats`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arrangement", None) - _v = arrangement if arrangement is not None else _v - if _v is not None: - self["arrangement"] = _v - _v = arg.pop("bundlecolors", None) - _v = bundlecolors if bundlecolors is not None else _v - if _v is not None: - self["bundlecolors"] = _v - _v = arg.pop("counts", None) - _v = counts if counts is not None else _v - if _v is not None: - self["counts"] = _v - _v = arg.pop("countssrc", None) - _v = countssrc if countssrc is not None else _v - if _v is not None: - self["countssrc"] = _v - _v = arg.pop("dimensions", None) - _v = dimensions if dimensions is not None else _v - if _v is not None: - self["dimensions"] = _v - _v = arg.pop("dimensiondefaults", None) - _v = dimensiondefaults if dimensiondefaults is not None else _v - if _v is not None: - self["dimensiondefaults"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("labelfont", None) - _v = labelfont if labelfont is not None else _v - if _v is not None: - self["labelfont"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("sortpaths", None) - _v = sortpaths if sortpaths is not None else _v - if _v is not None: - self["sortpaths"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("arrangement", arg, arrangement) + self._init_provided("bundlecolors", arg, bundlecolors) + self._init_provided("counts", arg, counts) + self._init_provided("countssrc", arg, countssrc) + self._init_provided("dimensions", arg, dimensions) + self._init_provided("dimensiondefaults", arg, dimensiondefaults) + self._init_provided("domain", arg, domain) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("labelfont", arg, labelfont) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("sortpaths", arg, sortpaths) + self._init_provided("stream", arg, stream) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) self._props["type"] = "parcats" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_parcoords.py b/plotly/graph_objs/_parcoords.py index 52ce3b4c6e..b226f1f1e7 100644 --- a/plotly/graph_objs/_parcoords.py +++ b/plotly/graph_objs/_parcoords.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Parcoords(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "parcoords" _valid_props = { @@ -37,8 +38,6 @@ class Parcoords(_BaseTraceType): "visible", } - # customdata - # ---------- @property def customdata(self): """ @@ -52,7 +51,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -60,8 +59,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -81,8 +78,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dimensions - # ---------- @property def dimensions(self): """ @@ -95,86 +90,6 @@ def dimensions(self): - A list or tuple of dicts of string/value properties that will be passed to the Dimension constructor - Supported dict properties: - - constraintrange - The domain range to which the filter on the - dimension is constrained. Must be an array of - `[fromValue, toValue]` with `fromValue <= - toValue`, or if `multiselect` is not disabled, - you may give an array of arrays, where each - inner array is `[fromValue, toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a - single range? - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - The domain range that represents the full, - shown axis extent. Defaults to the `values` - extent. Must be an array of `[fromValue, - toValue]` with finite numbers as elements. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticktext - Sets the text displayed at the ticks position - via `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - values - Dimension values. `values[n]` represents the - value of the `n`th point in the dataset, - therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. - Returns ------- tuple[plotly.graph_objs.parcoords.Dimension] @@ -185,8 +100,6 @@ def dimensions(self): def dimensions(self, val): self["dimensions"] = val - # dimensiondefaults - # ----------------- @property def dimensiondefaults(self): """ @@ -201,8 +114,6 @@ def dimensiondefaults(self): - A dict of string/value properties that will be passed to the Dimension constructor - Supported dict properties: - Returns ------- plotly.graph_objs.parcoords.Dimension @@ -213,8 +124,6 @@ def dimensiondefaults(self): def dimensiondefaults(self, val): self["dimensiondefaults"] = val - # domain - # ------ @property def domain(self): """ @@ -224,22 +133,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this parcoords - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords - trace (in plot fraction). - y - Sets the vertical domain of this parcoords - trace (in plot fraction). - Returns ------- plotly.graph_objs.parcoords.Domain @@ -250,8 +143,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # ids - # --- @property def ids(self): """ @@ -264,7 +155,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -272,8 +163,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -292,8 +181,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # labelangle - # ---------- @property def labelangle(self): """ @@ -317,8 +204,6 @@ def labelangle(self): def labelangle(self, val): self["labelangle"] = val - # labelfont - # --------- @property def labelfont(self): """ @@ -330,52 +215,6 @@ def labelfont(self): - A dict of string/value properties that will be passed to the Labelfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcoords.Labelfont @@ -386,8 +225,6 @@ def labelfont(self): def labelfont(self, val): self["labelfont"] = val - # labelside - # --------- @property def labelside(self): """ @@ -410,8 +247,6 @@ def labelside(self): def labelside(self, val): self["labelside"] = val - # legend - # ------ @property def legend(self): """ @@ -435,8 +270,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -446,13 +279,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.parcoords.Legendgrouptitle @@ -463,8 +289,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -490,8 +314,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -511,8 +333,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -522,95 +342,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color` is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color` is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color` is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets the line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `line.cmin` and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcoords.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color` is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color` is set to a numerical array. - Returns ------- plotly.graph_objs.parcoords.Line @@ -621,8 +352,6 @@ def line(self): def line(self, val): self["line"] = val - # meta - # ---- @property def meta(self): """ @@ -641,7 +370,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -649,8 +378,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -669,8 +396,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -691,8 +416,6 @@ def name(self): def name(self, val): self["name"] = val - # rangefont - # --------- @property def rangefont(self): """ @@ -704,52 +427,6 @@ def rangefont(self): - A dict of string/value properties that will be passed to the Rangefont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcoords.Rangefont @@ -760,8 +437,6 @@ def rangefont(self): def rangefont(self, val): self["rangefont"] = val - # stream - # ------ @property def stream(self): """ @@ -771,18 +446,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.parcoords.Stream @@ -793,8 +456,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -806,52 +467,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcoords.Tickfont @@ -862,8 +477,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # uid - # --- @property def uid(self): """ @@ -884,8 +497,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -917,8 +528,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -928,13 +537,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.parcoords.unselect - ed.Line` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.parcoords.Unselected @@ -945,8 +547,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -968,14 +568,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1106,31 +702,31 @@ def _prop_descriptions(self): def __init__( self, arg=None, - customdata=None, - customdatasrc=None, - dimensions=None, - dimensiondefaults=None, - domain=None, - ids=None, - idssrc=None, - labelangle=None, - labelfont=None, - labelside=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - meta=None, - metasrc=None, - name=None, - rangefont=None, - stream=None, - tickfont=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + domain: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + labelangle: int | float | None = None, + labelfont: None | None = None, + labelside: Any | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + rangefont: None | None = None, + stream: None | None = None, + tickfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -1272,14 +868,11 @@ def __init__( ------- Parcoords """ - super(Parcoords, self).__init__("parcoords") - + super().__init__("parcoords") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1294,124 +887,36 @@ def __init__( an instance of :class:`plotly.graph_objs.Parcoords`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dimensions", None) - _v = dimensions if dimensions is not None else _v - if _v is not None: - self["dimensions"] = _v - _v = arg.pop("dimensiondefaults", None) - _v = dimensiondefaults if dimensiondefaults is not None else _v - if _v is not None: - self["dimensiondefaults"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("labelangle", None) - _v = labelangle if labelangle is not None else _v - if _v is not None: - self["labelangle"] = _v - _v = arg.pop("labelfont", None) - _v = labelfont if labelfont is not None else _v - if _v is not None: - self["labelfont"] = _v - _v = arg.pop("labelside", None) - _v = labelside if labelside is not None else _v - if _v is not None: - self["labelside"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("rangefont", None) - _v = rangefont if rangefont is not None else _v - if _v is not None: - self["rangefont"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dimensions", arg, dimensions) + self._init_provided("dimensiondefaults", arg, dimensiondefaults) + self._init_provided("domain", arg, domain) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("labelangle", arg, labelangle) + self._init_provided("labelfont", arg, labelfont) + self._init_provided("labelside", arg, labelside) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("rangefont", arg, rangefont) + self._init_provided("stream", arg, stream) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "parcoords" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_pie.py b/plotly/graph_objs/_pie.py index 199af139f8..e54b989495 100644 --- a/plotly/graph_objs/_pie.py +++ b/plotly/graph_objs/_pie.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Pie(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "pie" _valid_props = { @@ -65,8 +66,6 @@ class Pie(_BaseTraceType): "visible", } - # automargin - # ---------- @property def automargin(self): """ @@ -85,8 +84,6 @@ def automargin(self): def automargin(self, val): self["automargin"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -100,7 +97,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -108,8 +105,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -129,8 +124,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # direction - # --------- @property def direction(self): """ @@ -151,8 +144,6 @@ def direction(self): def direction(self, val): self["direction"] = val - # dlabel - # ------ @property def dlabel(self): """ @@ -171,8 +162,6 @@ def dlabel(self): def dlabel(self, val): self["dlabel"] = val - # domain - # ------ @property def domain(self): """ @@ -182,21 +171,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this pie trace . - row - If there is a layout grid, use the domain for - this row in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace - (in plot fraction). - y - Sets the vertical domain of this pie trace (in - plot fraction). - Returns ------- plotly.graph_objs.pie.Domain @@ -207,8 +181,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hole - # ---- @property def hole(self): """ @@ -228,8 +200,6 @@ def hole(self): def hole(self, val): self["hole"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -246,7 +216,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -254,8 +224,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -275,8 +243,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -286,44 +252,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.pie.Hoverlabel @@ -334,8 +262,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -372,7 +298,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -380,8 +306,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -401,8 +325,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -419,7 +341,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -427,8 +349,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -448,8 +368,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -462,7 +380,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -470,8 +388,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -490,8 +406,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -503,79 +417,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.pie.Insidetextfont @@ -586,8 +427,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # insidetextorientation - # --------------------- @property def insidetextorientation(self): """ @@ -614,8 +453,6 @@ def insidetextorientation(self): def insidetextorientation(self, val): self["insidetextorientation"] = val - # label0 - # ------ @property def label0(self): """ @@ -636,8 +473,6 @@ def label0(self): def label0(self, val): self["label0"] = val - # labels - # ------ @property def labels(self): """ @@ -652,7 +487,7 @@ def labels(self): Returns ------- - numpy.ndarray + NDArray """ return self["labels"] @@ -660,8 +495,6 @@ def labels(self): def labels(self, val): self["labels"] = val - # labelssrc - # --------- @property def labelssrc(self): """ @@ -680,8 +513,6 @@ def labelssrc(self): def labelssrc(self, val): self["labelssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -705,8 +536,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -728,8 +557,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -739,13 +566,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.pie.Legendgrouptitle @@ -756,8 +576,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -783,8 +601,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -804,8 +620,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -815,21 +629,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.pie.marker.Line` - instance or dict with compatible properties - pattern - Sets the pattern within the marker. - Returns ------- plotly.graph_objs.pie.Marker @@ -840,8 +639,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -860,7 +657,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -868,8 +665,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -888,8 +683,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -910,8 +703,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -930,8 +721,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -943,79 +732,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.pie.Outsidetextfont @@ -1026,8 +742,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # pull - # ---- @property def pull(self): """ @@ -1042,7 +756,7 @@ def pull(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["pull"] @@ -1050,8 +764,6 @@ def pull(self): def pull(self, val): self["pull"] = val - # pullsrc - # ------- @property def pullsrc(self): """ @@ -1070,8 +782,6 @@ def pullsrc(self): def pullsrc(self, val): self["pullsrc"] = val - # rotation - # -------- @property def rotation(self): """ @@ -1093,8 +803,6 @@ def rotation(self): def rotation(self, val): self["rotation"] = val - # scalegroup - # ---------- @property def scalegroup(self): """ @@ -1116,8 +824,6 @@ def scalegroup(self): def scalegroup(self, val): self["scalegroup"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1137,8 +843,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # sort - # ---- @property def sort(self): """ @@ -1158,8 +862,6 @@ def sort(self): def sort(self, val): self["sort"] = val - # stream - # ------ @property def stream(self): """ @@ -1169,18 +871,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.pie.Stream @@ -1191,8 +881,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1207,7 +895,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1215,8 +903,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1228,79 +914,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.pie.Textfont @@ -1311,8 +924,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1334,8 +945,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1348,7 +957,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1356,8 +965,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1377,8 +984,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1397,8 +1002,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1424,7 +1027,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1432,8 +1035,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1453,8 +1054,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # title - # ----- @property def title(self): """ @@ -1464,16 +1063,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets the font used for `title`. - position - Specifies the location of the `title`. - text - Sets the title of the chart. If it is empty, no - title is displayed. - Returns ------- plotly.graph_objs.pie.Title @@ -1484,8 +1073,6 @@ def title(self): def title(self, val): self["title"] = val - # uid - # --- @property def uid(self): """ @@ -1506,8 +1093,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1539,8 +1124,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ @property def values(self): """ @@ -1552,7 +1135,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -1560,8 +1143,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -1580,8 +1161,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1603,14 +1182,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1881,59 +1456,59 @@ def _prop_descriptions(self): def __init__( self, arg=None, - automargin=None, - customdata=None, - customdatasrc=None, - direction=None, - dlabel=None, - domain=None, - hole=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - label0=None, - labels=None, - labelssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - pull=None, - pullsrc=None, - rotation=None, - scalegroup=None, - showlegend=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - title=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + automargin: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + direction: Any | None = None, + dlabel: int | float | None = None, + domain: None | None = None, + hole: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + insidetextorientation: Any | None = None, + label0: int | float | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + pull: int | float | None = None, + pullsrc: str | None = None, + rotation: int | float | None = None, + scalegroup: str | None = None, + showlegend: bool | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + title: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2215,14 +1790,11 @@ def __init__( ------- Pie """ - super(Pie, self).__init__("pie") - + super().__init__("pie") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2237,236 +1809,64 @@ def __init__( an instance of :class:`plotly.graph_objs.Pie`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("automargin", None) - _v = automargin if automargin is not None else _v - if _v is not None: - self["automargin"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("direction", None) - _v = direction if direction is not None else _v - if _v is not None: - self["direction"] = _v - _v = arg.pop("dlabel", None) - _v = dlabel if dlabel is not None else _v - if _v is not None: - self["dlabel"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hole", None) - _v = hole if hole is not None else _v - if _v is not None: - self["hole"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("insidetextorientation", None) - _v = insidetextorientation if insidetextorientation is not None else _v - if _v is not None: - self["insidetextorientation"] = _v - _v = arg.pop("label0", None) - _v = label0 if label0 is not None else _v - if _v is not None: - self["label0"] = _v - _v = arg.pop("labels", None) - _v = labels if labels is not None else _v - if _v is not None: - self["labels"] = _v - _v = arg.pop("labelssrc", None) - _v = labelssrc if labelssrc is not None else _v - if _v is not None: - self["labelssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("pull", None) - _v = pull if pull is not None else _v - if _v is not None: - self["pull"] = _v - _v = arg.pop("pullsrc", None) - _v = pullsrc if pullsrc is not None else _v - if _v is not None: - self["pullsrc"] = _v - _v = arg.pop("rotation", None) - _v = rotation if rotation is not None else _v - if _v is not None: - self["rotation"] = _v - _v = arg.pop("scalegroup", None) - _v = scalegroup if scalegroup is not None else _v - if _v is not None: - self["scalegroup"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("sort", None) - _v = sort if sort is not None else _v - if _v is not None: - self["sort"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("automargin", arg, automargin) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("direction", arg, direction) + self._init_provided("dlabel", arg, dlabel) + self._init_provided("domain", arg, domain) + self._init_provided("hole", arg, hole) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("insidetextorientation", arg, insidetextorientation) + self._init_provided("label0", arg, label0) + self._init_provided("labels", arg, labels) + self._init_provided("labelssrc", arg, labelssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("pull", arg, pull) + self._init_provided("pullsrc", arg, pullsrc) + self._init_provided("rotation", arg, rotation) + self._init_provided("scalegroup", arg, scalegroup) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("sort", arg, sort) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("title", arg, title) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._props["type"] = "pie" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_sankey.py b/plotly/graph_objs/_sankey.py index 0baeb303eb..a347a67e65 100644 --- a/plotly/graph_objs/_sankey.py +++ b/plotly/graph_objs/_sankey.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Sankey(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "sankey" _valid_props = { @@ -38,8 +39,6 @@ class Sankey(_BaseTraceType): "visible", } - # arrangement - # ----------- @property def arrangement(self): """ @@ -65,8 +64,6 @@ def arrangement(self): def arrangement(self, val): self["arrangement"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -80,7 +77,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -88,8 +85,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -109,8 +104,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ @property def domain(self): """ @@ -120,21 +113,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for - this row in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace - (in plot fraction). - y - Sets the vertical domain of this sankey trace - (in plot fraction). - Returns ------- plotly.graph_objs.sankey.Domain @@ -145,8 +123,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -172,8 +148,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -183,44 +157,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.sankey.Hoverlabel @@ -231,8 +167,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # ids - # --- @property def ids(self): """ @@ -245,7 +179,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -253,8 +187,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -273,8 +205,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -298,8 +228,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -309,13 +237,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.sankey.Legendgrouptitle @@ -326,8 +247,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -353,8 +272,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -374,8 +291,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # link - # ---- @property def link(self): """ @@ -387,119 +302,6 @@ def link(self): - A dict of string/value properties that will be passed to the Link constructor - Supported dict properties: - - arrowlen - Sets the length (in px) of the links arrow, if - 0 no arrow will be drawn. - color - Sets the `link` color. It can be a single - value, or an array for specifying color for - each `link`. If `link.color` is omitted, then - by default, a translucent grey link will be - used. - colorscales - A tuple of :class:`plotly.graph_objects.sankey. - link.Colorscale` instances or dicts with - compatible properties - colorscaledefaults - When used in a template (as layout.template.dat - a.sankey.link.colorscaledefaults), sets the - default property values to use for elements of - sankey.link.colorscales - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - customdata - Assigns extra data to each link. - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hovercolor - Sets the `link` hover color. It can be a single - value, or an array for specifying hover colors - for each `link`. If `link.hovercolor` is - omitted, then by default, links will become - slightly more opaque when hovered over. - hovercolorsrc - Sets the source reference on Chart Studio Cloud - for `hovercolor`. - hoverinfo - Determines which trace information appear when - hovering links. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.link.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Variables `source` and `target` are node - objects.Finally, the template string has access - to variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - label - The shown name of the link. - labelsrc - Sets the source reference on Chart Studio Cloud - for `label`. - line - :class:`plotly.graph_objects.sankey.link.Line` - instance or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on Chart Studio Cloud - for `source`. - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on Chart Studio Cloud - for `target`. - value - A numeric value representing the flow volume - value. - valuesrc - Sets the source reference on Chart Studio Cloud - for `value`. - Returns ------- plotly.graph_objs.sankey.Link @@ -510,8 +312,6 @@ def link(self): def link(self, val): self["link"] = val - # meta - # ---- @property def meta(self): """ @@ -530,7 +330,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -538,8 +338,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -558,8 +356,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -580,8 +376,6 @@ def name(self): def name(self, val): self["name"] = val - # node - # ---- @property def node(self): """ @@ -593,103 +387,6 @@ def node(self): - A dict of string/value properties that will be passed to the Node constructor - Supported dict properties: - - align - Sets the alignment method used to position the - nodes along the horizontal axis. - color - Sets the `node` color. It can be a single - value, or an array for specifying color for - each `node`. If `node.color` is omitted, then - the default `Plotly` color palette will be - cycled through to have a variety of colors. - These defaults are not fully opaque, to allow - some visibility of what is beneath the node. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - customdata - Assigns extra data to each node. - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - groups - Groups of nodes. Each group is defined by an - array with the indices of the nodes it - contains. Multiple groups can be specified. - hoverinfo - Determines which trace information appear when - hovering nodes. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.node.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Variables `sourceLinks` and `targetLinks` are - arrays of link objects.Finally, the template - string has access to variables `value` and - `label`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - label - The shown name of the node. - labelsrc - Sets the source reference on Chart Studio Cloud - for `label`. - line - :class:`plotly.graph_objects.sankey.node.Line` - instance or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - The normalized vertical position of the node. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - Returns ------- plotly.graph_objs.sankey.Node @@ -700,8 +397,6 @@ def node(self): def node(self, val): self["node"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -721,8 +416,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -745,8 +438,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # stream - # ------ @property def stream(self): """ @@ -756,18 +447,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.sankey.Stream @@ -778,8 +457,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # textfont - # -------- @property def textfont(self): """ @@ -791,52 +468,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.sankey.Textfont @@ -847,8 +478,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # uid - # --- @property def uid(self): """ @@ -869,8 +498,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -902,8 +529,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # valueformat - # ----------- @property def valueformat(self): """ @@ -926,8 +551,6 @@ def valueformat(self): def valueformat(self, val): self["valueformat"] = val - # valuesuffix - # ----------- @property def valuesuffix(self): """ @@ -948,8 +571,6 @@ def valuesuffix(self): def valuesuffix(self, val): self["valuesuffix"] = val - # visible - # ------- @property def visible(self): """ @@ -971,14 +592,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1119,32 +736,32 @@ def _prop_descriptions(self): def __init__( self, arg=None, - arrangement=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverlabel=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - link=None, - meta=None, - metasrc=None, - name=None, - node=None, - orientation=None, - selectedpoints=None, - stream=None, - textfont=None, - uid=None, - uirevision=None, - valueformat=None, - valuesuffix=None, - visible=None, + arrangement: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverlabel: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + link: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + node: None | None = None, + orientation: Any | None = None, + selectedpoints: Any | None = None, + stream: None | None = None, + textfont: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + valueformat: str | None = None, + valuesuffix: str | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -1297,14 +914,11 @@ def __init__( ------- Sankey """ - super(Sankey, self).__init__("sankey") - + super().__init__("sankey") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1319,128 +933,37 @@ def __init__( an instance of :class:`plotly.graph_objs.Sankey`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arrangement", None) - _v = arrangement if arrangement is not None else _v - if _v is not None: - self["arrangement"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("link", None) - _v = link if link is not None else _v - if _v is not None: - self["link"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("node", None) - _v = node if node is not None else _v - if _v is not None: - self["node"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("valueformat", None) - _v = valueformat if valueformat is not None else _v - if _v is not None: - self["valueformat"] = _v - _v = arg.pop("valuesuffix", None) - _v = valuesuffix if valuesuffix is not None else _v - if _v is not None: - self["valuesuffix"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("arrangement", arg, arrangement) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("domain", arg, domain) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("link", arg, link) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("node", arg, node) + self._init_provided("orientation", arg, orientation) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("stream", arg, stream) + self._init_provided("textfont", arg, textfont) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("valueformat", arg, valueformat) + self._init_provided("valuesuffix", arg, valuesuffix) + self._init_provided("visible", arg, visible) self._props["type"] = "sankey" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scatter.py b/plotly/graph_objs/_scatter.py index a7e3556f63..76d425a6b9 100644 --- a/plotly/graph_objs/_scatter.py +++ b/plotly/graph_objs/_scatter.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatter(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scatter" _valid_props = { @@ -86,8 +87,6 @@ class Scatter(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -109,8 +108,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -132,8 +129,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -153,8 +148,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -168,7 +161,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -176,8 +169,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -197,8 +188,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -217,8 +206,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -237,8 +224,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # error_x - # ------- @property def error_x(self): """ @@ -248,66 +233,6 @@ def error_x(self): - A dict of string/value properties that will be passed to the ErrorX constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scatter.ErrorX @@ -318,8 +243,6 @@ def error_x(self): def error_x(self, val): self["error_x"] = val - # error_y - # ------- @property def error_y(self): """ @@ -329,64 +252,6 @@ def error_y(self): - A dict of string/value properties that will be passed to the ErrorY constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scatter.ErrorY @@ -397,8 +262,6 @@ def error_y(self): def error_y(self, val): self["error_y"] = val - # fill - # ---- @property def fill(self): """ @@ -437,8 +300,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -453,42 +314,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -500,8 +326,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # fillgradient - # ------------ @property def fillgradient(self): """ @@ -514,38 +338,6 @@ def fillgradient(self): - A dict of string/value properties that will be passed to the Fillgradient constructor - Supported dict properties: - - colorscale - Sets the fill gradient colors as a color scale. - The color scale is interpreted as a gradient - applied in the direction specified by - "orientation", from the lowest to the highest - value of the scatter plot along that axis, or - from the center to the most distant point from - it, if orientation is "radial". - start - Sets the gradient start value. It is given as - the absolute position on the axis determined by - the orientiation. E.g., if orientation is - "horizontal", the gradient will be horizontal - and start from the x-position given by start. - If omitted, the gradient starts at the lowest - value of the trace along the respective axis. - Ignored if orientation is "radial". - stop - Sets the gradient end value. It is given as the - absolute position on the axis determined by the - orientiation. E.g., if orientation is - "horizontal", the gradient will be horizontal - and end at the x-position given by end. If - omitted, the gradient ends at the highest value - of the trace along the respective axis. Ignored - if orientation is "radial". - type - Sets the type/orientation of the color gradient - for the fill. Defaults to "none". - Returns ------- plotly.graph_objs.scatter.Fillgradient @@ -556,8 +348,6 @@ def fillgradient(self): def fillgradient(self, val): self["fillgradient"] = val - # fillpattern - # ----------- @property def fillpattern(self): """ @@ -569,57 +359,6 @@ def fillpattern(self): - A dict of string/value properties that will be passed to the Fillpattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.scatter.Fillpattern @@ -630,8 +369,6 @@ def fillpattern(self): def fillpattern(self, val): self["fillpattern"] = val - # groupnorm - # --------- @property def groupnorm(self): """ @@ -659,8 +396,6 @@ def groupnorm(self): def groupnorm(self, val): self["groupnorm"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -677,7 +412,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -685,8 +420,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -706,8 +439,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -717,44 +448,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scatter.Hoverlabel @@ -765,8 +458,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -790,8 +481,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -826,7 +515,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -834,8 +523,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -855,8 +542,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -873,7 +558,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -881,8 +566,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -902,8 +585,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -916,7 +597,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -924,8 +605,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -944,8 +623,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -969,8 +646,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -992,8 +667,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1003,13 +676,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scatter.Legendgrouptitle @@ -1020,8 +686,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1047,8 +711,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1068,8 +730,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -1079,44 +739,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - simplify - Simplifies lines by removing nearly-collinear - points. When transitioning lines, it may be - desirable to disable this so that the number of - points along the resulting SVG path is - unaffected. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scatter.Line @@ -1127,8 +749,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -1138,158 +758,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter.marker.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scatter.marker.Gra - dient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatter.marker.Lin - e` instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scatter.Marker @@ -1300,8 +768,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1320,7 +786,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1328,8 +794,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1348,8 +812,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1376,8 +838,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1398,8 +858,6 @@ def name(self): def name(self, val): self["name"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -1421,8 +879,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1441,8 +897,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -1468,8 +922,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # selected - # -------- @property def selected(self): """ @@ -1479,17 +931,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatter.selected.M - arker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.selected.T - extfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scatter.Selected @@ -1500,8 +941,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1524,8 +963,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1545,8 +982,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stackgaps - # --------- @property def stackgaps(self): """ @@ -1573,8 +1008,6 @@ def stackgaps(self): def stackgaps(self, val): self["stackgaps"] = val - # stackgroup - # ---------- @property def stackgroup(self): """ @@ -1605,8 +1038,6 @@ def stackgroup(self): def stackgroup(self, val): self["stackgroup"] = val - # stream - # ------ @property def stream(self): """ @@ -1616,18 +1047,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scatter.Stream @@ -1638,8 +1057,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1657,7 +1074,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1665,8 +1082,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1678,79 +1093,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatter.Textfont @@ -1761,8 +1103,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1778,7 +1118,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1786,8 +1126,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1807,8 +1145,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1827,8 +1163,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1852,7 +1186,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1860,8 +1194,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1881,8 +1213,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1903,8 +1233,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1936,8 +1264,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1947,17 +1273,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatter.unselected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.unselected - .Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scatter.Unselected @@ -1968,8 +1283,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1991,8 +1304,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -2003,7 +1314,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -2011,8 +1322,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -2032,8 +1341,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -2057,8 +1364,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -2081,8 +1386,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -2112,8 +1415,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -2134,8 +1435,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -2157,8 +1456,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -2179,8 +1476,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -2199,8 +1494,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -2211,7 +1504,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -2219,8 +1512,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -2240,8 +1531,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -2265,8 +1554,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -2289,8 +1576,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -2320,8 +1605,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -2342,8 +1625,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -2365,8 +1646,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -2387,8 +1666,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2407,8 +1684,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2429,14 +1704,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2864,80 +2135,80 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - fillgradient=None, - fillpattern=None, - groupnorm=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - selected=None, - selectedpoints=None, - showlegend=None, - stackgaps=None, - stackgroup=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + fillgradient: None | None = None, + fillpattern: None | None = None, + groupnorm: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stackgaps: Any | None = None, + stackgroup: str | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -3379,14 +2650,11 @@ def __init__( ------- Scatter """ - super(Scatter, self).__init__("scatter") - + super().__init__("scatter") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -3401,320 +2669,85 @@ def __init__( an instance of :class:`plotly.graph_objs.Scatter`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("error_x", None) - _v = error_x if error_x is not None else _v - if _v is not None: - self["error_x"] = _v - _v = arg.pop("error_y", None) - _v = error_y if error_y is not None else _v - if _v is not None: - self["error_y"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("fillgradient", None) - _v = fillgradient if fillgradient is not None else _v - if _v is not None: - self["fillgradient"] = _v - _v = arg.pop("fillpattern", None) - _v = fillpattern if fillpattern is not None else _v - if _v is not None: - self["fillpattern"] = _v - _v = arg.pop("groupnorm", None) - _v = groupnorm if groupnorm is not None else _v - if _v is not None: - self["groupnorm"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stackgaps", None) - _v = stackgaps if stackgaps is not None else _v - if _v is not None: - self["stackgaps"] = _v - _v = arg.pop("stackgroup", None) - _v = stackgroup if stackgroup is not None else _v - if _v is not None: - self["stackgroup"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("error_x", arg, error_x) + self._init_provided("error_y", arg, error_y) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("fillgradient", arg, fillgradient) + self._init_provided("fillpattern", arg, fillpattern) + self._init_provided("groupnorm", arg, groupnorm) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stackgaps", arg, stackgaps) + self._init_provided("stackgroup", arg, stackgroup) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "scatter" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scatter3d.py b/plotly/graph_objs/_scatter3d.py index bb0094c928..4de72a9a56 100644 --- a/plotly/graph_objs/_scatter3d.py +++ b/plotly/graph_objs/_scatter3d.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatter3d(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scatter3d" _valid_props = { @@ -67,8 +68,6 @@ class Scatter3d(_BaseTraceType): "zsrc", } - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -88,8 +87,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -103,7 +100,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -111,8 +108,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -132,8 +127,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # error_x - # ------- @property def error_x(self): """ @@ -143,66 +136,6 @@ def error_x(self): - A dict of string/value properties that will be passed to the ErrorX constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scatter3d.ErrorX @@ -213,8 +146,6 @@ def error_x(self): def error_x(self, val): self["error_x"] = val - # error_y - # ------- @property def error_y(self): """ @@ -224,66 +155,6 @@ def error_y(self): - A dict of string/value properties that will be passed to the ErrorY constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scatter3d.ErrorY @@ -294,8 +165,6 @@ def error_y(self): def error_y(self, val): self["error_y"] = val - # error_z - # ------- @property def error_z(self): """ @@ -305,64 +174,6 @@ def error_z(self): - A dict of string/value properties that will be passed to the ErrorZ constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scatter3d.ErrorZ @@ -373,8 +184,6 @@ def error_z(self): def error_z(self, val): self["error_z"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -391,7 +200,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -399,8 +208,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -420,8 +227,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -431,44 +236,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scatter3d.Hoverlabel @@ -479,8 +246,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -515,7 +280,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -523,8 +288,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -544,8 +307,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -562,7 +323,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -570,8 +331,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -591,8 +350,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -605,7 +362,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -613,8 +370,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -633,8 +388,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -658,8 +411,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -681,8 +432,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -692,13 +441,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scatter3d.Legendgrouptitle @@ -709,8 +451,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -736,8 +476,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -757,8 +495,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -768,99 +504,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color` is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color` is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color` is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets the line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `line.cmin` and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color` is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color` is set to a numerical array. - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scatter3d.Line @@ -871,8 +514,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -882,130 +523,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.scatter3d.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. Note that the marker - opacity for scatter3d traces must be a scalar - value for performance reasons. To set a - blending opacity value (i.e. which is not - transparent), set "marker.color" to an rgba - color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scatter3d.Marker @@ -1016,8 +533,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1036,7 +551,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1044,8 +559,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1064,8 +577,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1092,8 +603,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1114,8 +623,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1134,8 +641,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # projection - # ---------- @property def projection(self): """ @@ -1145,21 +650,6 @@ def projection(self): - A dict of string/value properties that will be passed to the Projection constructor - Supported dict properties: - - x - :class:`plotly.graph_objects.scatter3d.projecti - on.X` instance or dict with compatible - properties - y - :class:`plotly.graph_objects.scatter3d.projecti - on.Y` instance or dict with compatible - properties - z - :class:`plotly.graph_objects.scatter3d.projecti - on.Z` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scatter3d.Projection @@ -1170,8 +660,6 @@ def projection(self): def projection(self, val): self["projection"] = val - # scene - # ----- @property def scene(self): """ @@ -1195,8 +683,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1216,8 +702,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1227,18 +711,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scatter3d.Stream @@ -1249,8 +721,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # surfaceaxis - # ----------- @property def surfaceaxis(self): """ @@ -1272,8 +742,6 @@ def surfaceaxis(self): def surfaceaxis(self, val): self["surfaceaxis"] = val - # surfacecolor - # ------------ @property def surfacecolor(self): """ @@ -1284,42 +752,7 @@ def surfacecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1331,8 +764,6 @@ def surfacecolor(self): def surfacecolor(self, val): self["surfacecolor"] = val - # text - # ---- @property def text(self): """ @@ -1350,7 +781,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1358,8 +789,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1371,55 +800,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatter3d.Textfont @@ -1430,8 +810,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1447,7 +825,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1455,8 +833,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1476,8 +852,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1496,8 +870,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1521,7 +893,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1529,8 +901,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1550,8 +920,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1572,8 +940,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1605,8 +971,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1628,8 +992,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1640,7 +1002,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1648,8 +1010,6 @@ def x(self): def x(self, val): self["x"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1672,8 +1032,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1703,8 +1061,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1723,8 +1079,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1735,7 +1089,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1743,8 +1097,6 @@ def y(self): def y(self, val): self["y"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1767,8 +1119,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1798,8 +1148,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1818,8 +1166,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1830,7 +1176,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1838,8 +1184,6 @@ def z(self): def z(self, val): self["z"] = val - # zcalendar - # --------- @property def zcalendar(self): """ @@ -1862,8 +1206,6 @@ def zcalendar(self): def zcalendar(self, val): self["zcalendar"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1893,8 +1235,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1913,14 +1253,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2215,61 +1551,61 @@ def _prop_descriptions(self): def __init__( self, arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - error_x=None, - error_y=None, - error_z=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - projection=None, - scene=None, - showlegend=None, - stream=None, - surfaceaxis=None, - surfacecolor=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + error_x: None | None = None, + error_y: None | None = None, + error_z: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + projection: None | None = None, + scene: str | None = None, + showlegend: bool | None = None, + stream: None | None = None, + surfaceaxis: Any | None = None, + surfacecolor: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2578,14 +1914,11 @@ def __init__( ------- Scatter3d """ - super(Scatter3d, self).__init__("scatter3d") - + super().__init__("scatter3d") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2600,244 +1933,66 @@ def __init__( an instance of :class:`plotly.graph_objs.Scatter3d`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("error_x", None) - _v = error_x if error_x is not None else _v - if _v is not None: - self["error_x"] = _v - _v = arg.pop("error_y", None) - _v = error_y if error_y is not None else _v - if _v is not None: - self["error_y"] = _v - _v = arg.pop("error_z", None) - _v = error_z if error_z is not None else _v - if _v is not None: - self["error_z"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("projection", None) - _v = projection if projection is not None else _v - if _v is not None: - self["projection"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("surfaceaxis", None) - _v = surfaceaxis if surfaceaxis is not None else _v - if _v is not None: - self["surfaceaxis"] = _v - _v = arg.pop("surfacecolor", None) - _v = surfacecolor if surfacecolor is not None else _v - if _v is not None: - self["surfacecolor"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zcalendar", None) - _v = zcalendar if zcalendar is not None else _v - if _v is not None: - self["zcalendar"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("error_x", arg, error_x) + self._init_provided("error_y", arg, error_y) + self._init_provided("error_z", arg, error_z) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("projection", arg, projection) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("surfaceaxis", arg, surfaceaxis) + self._init_provided("surfacecolor", arg, surfacecolor) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zcalendar", arg, zcalendar) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "scatter3d" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scattercarpet.py b/plotly/graph_objs/_scattercarpet.py index 4c66720906..c0f00dbcf3 100644 --- a/plotly/graph_objs/_scattercarpet.py +++ b/plotly/graph_objs/_scattercarpet.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scattercarpet(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scattercarpet" _valid_props = { @@ -62,8 +63,6 @@ class Scattercarpet(_BaseTraceType): "zorder", } - # a - # - @property def a(self): """ @@ -74,7 +73,7 @@ def a(self): Returns ------- - numpy.ndarray + NDArray """ return self["a"] @@ -82,8 +81,6 @@ def a(self): def a(self, val): self["a"] = val - # asrc - # ---- @property def asrc(self): """ @@ -102,8 +99,6 @@ def asrc(self): def asrc(self, val): self["asrc"] = val - # b - # - @property def b(self): """ @@ -114,7 +109,7 @@ def b(self): Returns ------- - numpy.ndarray + NDArray """ return self["b"] @@ -122,8 +117,6 @@ def b(self): def b(self, val): self["b"] = val - # bsrc - # ---- @property def bsrc(self): """ @@ -142,8 +135,6 @@ def bsrc(self): def bsrc(self, val): self["bsrc"] = val - # carpet - # ------ @property def carpet(self): """ @@ -165,8 +156,6 @@ def carpet(self): def carpet(self, val): self["carpet"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -186,8 +175,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -201,7 +188,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -209,8 +196,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -230,8 +215,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fill - # ---- @property def fill(self): """ @@ -259,8 +242,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -273,42 +254,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -320,8 +266,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -338,7 +282,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -346,8 +290,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -367,8 +309,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -378,44 +318,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scattercarpet.Hoverlabel @@ -426,8 +328,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -451,8 +351,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -487,7 +385,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -495,8 +393,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -516,8 +412,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -534,7 +428,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -542,8 +436,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -563,8 +455,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -577,7 +467,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -585,8 +475,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -605,8 +493,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -630,8 +516,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -653,8 +537,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -664,13 +546,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scattercarpet.Legendgrouptitle @@ -681,8 +556,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -708,8 +581,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -729,8 +600,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -740,38 +609,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scattercarpet.Line @@ -782,8 +619,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -793,159 +628,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattercarpet.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scattercarpet.mark - er.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattercarpet.mark - er.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scattercarpet.Marker @@ -956,8 +638,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -976,7 +656,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -984,8 +664,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1004,8 +682,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1032,8 +708,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1054,8 +728,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1074,8 +746,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -1085,17 +755,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattercarpet.sele - cted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.sele - cted.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattercarpet.Selected @@ -1106,8 +765,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1130,8 +787,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1151,8 +806,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1162,18 +815,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scattercarpet.Stream @@ -1184,8 +825,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1203,7 +842,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1211,8 +850,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1224,79 +861,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattercarpet.Textfont @@ -1307,8 +871,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1324,7 +886,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1332,8 +894,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1353,8 +913,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1373,8 +931,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1400,7 +956,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1408,8 +964,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1429,8 +983,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1451,8 +1003,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1484,8 +1034,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1495,17 +1043,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattercarpet.unse - lected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.unse - lected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scattercarpet.Unselected @@ -1516,8 +1053,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1539,8 +1074,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1564,8 +1097,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1589,8 +1120,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # zorder - # ------ @property def zorder(self): """ @@ -1611,14 +1140,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1892,56 +1417,56 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - asrc=None, - b=None, - bsrc=None, - carpet=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxis=None, - yaxis=None, - zorder=None, + a: NDArray | None = None, + asrc: str | None = None, + b: NDArray | None = None, + bsrc: str | None = None, + carpet: str | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + xaxis: str | None = None, + yaxis: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -2225,14 +1750,11 @@ def __init__( ------- Scattercarpet """ - super(Scattercarpet, self).__init__("scattercarpet") - + super().__init__("scattercarpet") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2247,224 +1769,61 @@ def __init__( an instance of :class:`plotly.graph_objs.Scattercarpet`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - _v = a if a is not None else _v - if _v is not None: - self["a"] = _v - _v = arg.pop("asrc", None) - _v = asrc if asrc is not None else _v - if _v is not None: - self["asrc"] = _v - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("bsrc", None) - _v = bsrc if bsrc is not None else _v - if _v is not None: - self["bsrc"] = _v - _v = arg.pop("carpet", None) - _v = carpet if carpet is not None else _v - if _v is not None: - self["carpet"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("a", arg, a) + self._init_provided("asrc", arg, asrc) + self._init_provided("b", arg, b) + self._init_provided("bsrc", arg, bsrc) + self._init_provided("carpet", arg, carpet) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("zorder", arg, zorder) self._props["type"] = "scattercarpet" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scattergeo.py b/plotly/graph_objs/_scattergeo.py index 0fcf2f839a..8c9c90503d 100644 --- a/plotly/graph_objs/_scattergeo.py +++ b/plotly/graph_objs/_scattergeo.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scattergeo(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scattergeo" _valid_props = { @@ -63,8 +64,6 @@ class Scattergeo(_BaseTraceType): "visible", } - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -84,8 +83,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -99,7 +96,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -107,8 +104,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -128,8 +123,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # featureidkey - # ------------ @property def featureidkey(self): """ @@ -152,8 +145,6 @@ def featureidkey(self): def featureidkey(self, val): self["featureidkey"] = val - # fill - # ---- @property def fill(self): """ @@ -175,8 +166,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -189,42 +178,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -236,8 +190,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # geo - # --- @property def geo(self): """ @@ -261,8 +213,6 @@ def geo(self): def geo(self, val): self["geo"] = val - # geojson - # ------- @property def geojson(self): """ @@ -285,8 +235,6 @@ def geojson(self): def geojson(self, val): self["geojson"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -303,7 +251,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -311,8 +259,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -332,8 +278,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -343,44 +287,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scattergeo.Hoverlabel @@ -391,8 +297,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -427,7 +331,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -435,8 +339,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -456,8 +358,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -475,7 +375,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -483,8 +383,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -504,8 +402,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -518,7 +414,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -526,8 +422,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -546,8 +440,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- @property def lat(self): """ @@ -558,7 +450,7 @@ def lat(self): Returns ------- - numpy.ndarray + NDArray """ return self["lat"] @@ -566,8 +458,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # latsrc - # ------ @property def latsrc(self): """ @@ -586,8 +476,6 @@ def latsrc(self): def latsrc(self, val): self["latsrc"] = val - # legend - # ------ @property def legend(self): """ @@ -611,8 +499,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -634,8 +520,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -645,13 +529,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scattergeo.Legendgrouptitle @@ -662,8 +539,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -689,8 +564,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -710,8 +583,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -721,18 +592,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scattergeo.Line @@ -743,8 +602,6 @@ def line(self): def line(self, val): self["line"] = val - # locationmode - # ------------ @property def locationmode(self): """ @@ -768,8 +625,6 @@ def locationmode(self): def locationmode(self, val): self["locationmode"] = val - # locations - # --------- @property def locations(self): """ @@ -782,7 +637,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -790,8 +645,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -811,8 +664,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # lon - # --- @property def lon(self): """ @@ -823,7 +674,7 @@ def lon(self): Returns ------- - numpy.ndarray + NDArray """ return self["lon"] @@ -831,8 +682,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # lonsrc - # ------ @property def lonsrc(self): """ @@ -851,8 +700,6 @@ def lonsrc(self): def lonsrc(self, val): self["lonsrc"] = val - # marker - # ------ @property def marker(self): """ @@ -862,158 +709,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - With "north", angle 0 points north based on the - current map projection. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergeo.marker. - ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scattergeo.marker. - Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattergeo.marker. - Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scattergeo.Marker @@ -1024,8 +719,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1044,7 +737,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1052,8 +745,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1072,8 +763,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1100,8 +789,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1122,8 +809,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1142,8 +827,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -1153,17 +836,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergeo.selecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.selecte - d.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattergeo.Selected @@ -1174,8 +846,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1198,8 +868,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1219,8 +887,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1230,18 +896,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scattergeo.Stream @@ -1252,8 +906,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1272,7 +924,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1280,8 +932,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1293,79 +943,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattergeo.Textfont @@ -1376,8 +953,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1393,7 +968,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1401,8 +976,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1422,8 +995,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1442,8 +1013,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1469,7 +1038,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1477,8 +1046,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1498,8 +1065,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1520,8 +1085,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1553,8 +1116,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1564,17 +1125,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergeo.unselec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.unselec - ted.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattergeo.Unselected @@ -1585,8 +1135,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1608,14 +1156,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1893,57 +1437,57 @@ def _prop_descriptions(self): def __init__( self, arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - featureidkey=None, - fill=None, - fillcolor=None, - geo=None, - geojson=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - locationmode=None, - locations=None, - locationssrc=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + featureidkey: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + geo: str | None = None, + geojson: Any | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + locationmode: Any | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2233,14 +1777,11 @@ def __init__( ------- Scattergeo """ - super(Scattergeo, self).__init__("scattergeo") - + super().__init__("scattergeo") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2255,228 +1796,62 @@ def __init__( an instance of :class:`plotly.graph_objs.Scattergeo`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("featureidkey", None) - _v = featureidkey if featureidkey is not None else _v - if _v is not None: - self["featureidkey"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("geo", None) - _v = geo if geo is not None else _v - if _v is not None: - self["geo"] = _v - _v = arg.pop("geojson", None) - _v = geojson if geojson is not None else _v - if _v is not None: - self["geojson"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("latsrc", None) - _v = latsrc if latsrc is not None else _v - if _v is not None: - self["latsrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("locationmode", None) - _v = locationmode if locationmode is not None else _v - if _v is not None: - self["locationmode"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - _v = arg.pop("lonsrc", None) - _v = lonsrc if lonsrc is not None else _v - if _v is not None: - self["lonsrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("featureidkey", arg, featureidkey) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("geo", arg, geo) + self._init_provided("geojson", arg, geojson) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("lat", arg, lat) + self._init_provided("latsrc", arg, latsrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("locationmode", arg, locationmode) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("lon", arg, lon) + self._init_provided("lonsrc", arg, lonsrc) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scattergeo" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scattergl.py b/plotly/graph_objs/_scattergl.py index ec04368d8b..4faf2287b8 100644 --- a/plotly/graph_objs/_scattergl.py +++ b/plotly/graph_objs/_scattergl.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scattergl(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scattergl" _valid_props = { @@ -75,8 +76,6 @@ class Scattergl(_BaseTraceType): "ysrc", } - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -96,8 +95,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -111,7 +108,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -119,8 +116,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -140,8 +135,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dx - # -- @property def dx(self): """ @@ -160,8 +153,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -180,8 +171,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # error_x - # ------- @property def error_x(self): """ @@ -191,66 +180,6 @@ def error_x(self): - A dict of string/value properties that will be passed to the ErrorX constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scattergl.ErrorX @@ -261,8 +190,6 @@ def error_x(self): def error_x(self, val): self["error_x"] = val - # error_y - # ------- @property def error_y(self): """ @@ -272,64 +199,6 @@ def error_y(self): - A dict of string/value properties that will be passed to the ErrorY constructor - Supported dict properties: - - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. - Returns ------- plotly.graph_objs.scattergl.ErrorY @@ -340,8 +209,6 @@ def error_y(self): def error_y(self, val): self["error_y"] = val - # fill - # ---- @property def fill(self): """ @@ -380,8 +247,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -394,42 +259,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -441,8 +271,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -459,7 +287,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -467,8 +295,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -488,8 +314,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -499,44 +323,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scattergl.Hoverlabel @@ -547,8 +333,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -583,7 +367,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -591,8 +375,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -612,8 +394,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -630,7 +410,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -638,8 +418,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -659,8 +437,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -673,7 +449,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -681,8 +457,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -701,8 +475,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -726,8 +498,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -749,8 +519,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -760,13 +528,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scattergl.Legendgrouptitle @@ -777,8 +538,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -804,8 +563,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -825,8 +582,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -836,18 +591,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scattergl.Line @@ -858,8 +601,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -869,138 +610,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergl.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.scattergl.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scattergl.Marker @@ -1011,8 +620,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1031,7 +638,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1039,8 +646,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1059,8 +664,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1082,8 +685,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1104,8 +705,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1124,8 +723,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -1135,17 +732,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergl.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.selected - .Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattergl.Selected @@ -1156,8 +742,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1180,8 +764,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1201,8 +783,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1212,18 +792,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scattergl.Stream @@ -1234,8 +802,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1253,7 +819,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1261,8 +827,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1274,55 +838,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattergl.Textfont @@ -1333,8 +848,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1350,7 +863,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1358,8 +871,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1379,8 +890,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1399,8 +908,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1424,7 +931,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1432,8 +939,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1453,8 +958,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1475,8 +978,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1508,8 +1009,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1519,17 +1018,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattergl.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.unselect - ed.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattergl.Unselected @@ -1540,8 +1028,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1563,8 +1049,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1575,7 +1059,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1583,8 +1067,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1604,8 +1086,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1629,8 +1109,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1653,8 +1131,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1684,8 +1160,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1706,8 +1180,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1729,8 +1201,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1751,8 +1221,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1771,8 +1239,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1783,7 +1249,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1791,8 +1257,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -1812,8 +1276,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1837,8 +1299,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1861,8 +1321,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1892,8 +1350,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -1914,8 +1370,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -1937,8 +1391,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -1959,8 +1411,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1979,14 +1429,10 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2332,69 +1778,69 @@ def _prop_descriptions(self): def __init__( self, arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dx=None, - dy=None, - error_x=None, - error_y=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - x=None, - x0=None, - xaxis=None, - xcalendar=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - ycalendar=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + error_x: None | None = None, + error_y: None | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, **kwargs, ): """ @@ -2752,14 +2198,11 @@ def __init__( ------- Scattergl """ - super(Scattergl, self).__init__("scattergl") - + super().__init__("scattergl") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2774,276 +2217,74 @@ def __init__( an instance of :class:`plotly.graph_objs.Scattergl`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("error_x", None) - _v = error_x if error_x is not None else _v - if _v is not None: - self["error_x"] = _v - _v = arg.pop("error_y", None) - _v = error_y if error_y is not None else _v - if _v is not None: - self["error_y"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("error_x", arg, error_x) + self._init_provided("error_y", arg, error_y) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) self._props["type"] = "scattergl" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scattermap.py b/plotly/graph_objs/_scattermap.py index cb1b8713c9..8ca7083613 100644 --- a/plotly/graph_objs/_scattermap.py +++ b/plotly/graph_objs/_scattermap.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scattermap(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scattermap" _valid_props = { @@ -59,8 +60,6 @@ class Scattermap(_BaseTraceType): "visible", } - # below - # ----- @property def below(self): """ @@ -83,8 +82,6 @@ def below(self): def below(self, val): self["below"] = val - # cluster - # ------- @property def cluster(self): """ @@ -94,42 +91,6 @@ def cluster(self): - A dict of string/value properties that will be passed to the Cluster constructor - Supported dict properties: - - color - Sets the color for each cluster step. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - enabled - Determines whether clustering is enabled or - disabled. - maxzoom - Sets the maximum zoom level. At zoom levels - equal to or greater than this, points will - never be clustered. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - size - Sets the size for each cluster step. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - step - Sets how many points it takes to create a - cluster or advance to the next cluster step. - Use this in conjunction with arrays for `size` - and / or `color`. If an integer, steps start at - multiples of this number. If an array, each - step extends from the given value until one - less than the next value. - stepsrc - Sets the source reference on Chart Studio Cloud - for `step`. - Returns ------- plotly.graph_objs.scattermap.Cluster @@ -140,8 +101,6 @@ def cluster(self): def cluster(self, val): self["cluster"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -161,8 +120,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -176,7 +133,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -184,8 +141,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -205,8 +160,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fill - # ---- @property def fill(self): """ @@ -228,8 +181,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -242,42 +193,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -289,8 +205,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -307,7 +221,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -315,8 +229,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -336,8 +248,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -347,44 +257,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scattermap.Hoverlabel @@ -395,8 +267,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -431,7 +301,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -439,8 +309,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -460,8 +328,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -478,7 +344,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -486,8 +352,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -507,8 +371,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -521,7 +383,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -529,8 +391,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -549,8 +409,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- @property def lat(self): """ @@ -561,7 +419,7 @@ def lat(self): Returns ------- - numpy.ndarray + NDArray """ return self["lat"] @@ -569,8 +427,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # latsrc - # ------ @property def latsrc(self): """ @@ -589,8 +445,6 @@ def latsrc(self): def latsrc(self, val): self["latsrc"] = val - # legend - # ------ @property def legend(self): """ @@ -614,8 +468,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -637,8 +489,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -648,13 +498,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scattermap.Legendgrouptitle @@ -665,8 +508,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -692,8 +533,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -713,8 +552,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -724,13 +561,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scattermap.Line @@ -741,8 +571,6 @@ def line(self): def line(self, val): self["line"] = val - # lon - # --- @property def lon(self): """ @@ -753,7 +581,7 @@ def lon(self): Returns ------- - numpy.ndarray + NDArray """ return self["lon"] @@ -761,8 +589,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # lonsrc - # ------ @property def lonsrc(self): """ @@ -781,8 +607,6 @@ def lonsrc(self): def lonsrc(self, val): self["lonsrc"] = val - # marker - # ------ @property def marker(self): """ @@ -792,138 +616,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - allowoverlap - Flag to draw all symbols, even if they overlap. - angle - Sets the marker orientation from true North, in - degrees clockwise. When using the "auto" - default, no rotation would be applied in - perspective views which is different from using - a zero angle. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattermap.marker. - ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol. Full list: - https://www.map.com/maki-icons/ Note that the - array `marker.color` and `marker.size` are only - available for "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scattermap.Marker @@ -934,8 +626,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -954,7 +644,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -962,8 +652,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -982,8 +670,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1008,8 +694,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1030,8 +714,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1050,8 +732,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -1061,13 +741,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattermap.selecte - d.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattermap.Selected @@ -1078,8 +751,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1102,8 +773,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1123,8 +792,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1134,18 +801,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scattermap.Stream @@ -1156,8 +811,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1181,8 +834,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1200,7 +851,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1208,8 +859,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1223,35 +872,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermap.Textfont @@ -1262,8 +882,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1286,8 +904,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1306,8 +922,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1333,7 +947,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1341,8 +955,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1362,8 +974,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1384,8 +994,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1417,8 +1025,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1428,13 +1034,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattermap.unselec - ted.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattermap.Unselected @@ -1445,8 +1044,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1468,14 +1065,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1730,53 +1323,53 @@ def _prop_descriptions(self): def __init__( self, arg=None, - below=None, - cluster=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + below: str | None = None, + cluster: None | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2042,14 +1635,11 @@ def __init__( ------- Scattermap """ - super(Scattermap, self).__init__("scattermap") - + super().__init__("scattermap") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2064,212 +1654,58 @@ def __init__( an instance of :class:`plotly.graph_objs.Scattermap`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("cluster", None) - _v = cluster if cluster is not None else _v - if _v is not None: - self["cluster"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("latsrc", None) - _v = latsrc if latsrc is not None else _v - if _v is not None: - self["latsrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - _v = arg.pop("lonsrc", None) - _v = lonsrc if lonsrc is not None else _v - if _v is not None: - self["lonsrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("below", arg, below) + self._init_provided("cluster", arg, cluster) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("lat", arg, lat) + self._init_provided("latsrc", arg, latsrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("lon", arg, lon) + self._init_provided("lonsrc", arg, lonsrc) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scattermap" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scattermapbox.py b/plotly/graph_objs/_scattermapbox.py index 9f98a2b1af..654d255162 100644 --- a/plotly/graph_objs/_scattermapbox.py +++ b/plotly/graph_objs/_scattermapbox.py @@ -1,3 +1,6 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy import warnings @@ -5,8 +8,6 @@ class Scattermapbox(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scattermapbox" _valid_props = { @@ -60,8 +61,6 @@ class Scattermapbox(_BaseTraceType): "visible", } - # below - # ----- @property def below(self): """ @@ -85,8 +84,6 @@ def below(self): def below(self, val): self["below"] = val - # cluster - # ------- @property def cluster(self): """ @@ -96,42 +93,6 @@ def cluster(self): - A dict of string/value properties that will be passed to the Cluster constructor - Supported dict properties: - - color - Sets the color for each cluster step. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - enabled - Determines whether clustering is enabled or - disabled. - maxzoom - Sets the maximum zoom level. At zoom levels - equal to or greater than this, points will - never be clustered. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - size - Sets the size for each cluster step. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - step - Sets how many points it takes to create a - cluster or advance to the next cluster step. - Use this in conjunction with arrays for `size` - and / or `color`. If an integer, steps start at - multiples of this number. If an array, each - step extends from the given value until one - less than the next value. - stepsrc - Sets the source reference on Chart Studio Cloud - for `step`. - Returns ------- plotly.graph_objs.scattermapbox.Cluster @@ -142,8 +103,6 @@ def cluster(self): def cluster(self, val): self["cluster"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -163,8 +122,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -178,7 +135,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -186,8 +143,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -207,8 +162,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fill - # ---- @property def fill(self): """ @@ -230,8 +183,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -244,42 +195,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -291,8 +207,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -309,7 +223,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -317,8 +231,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -338,8 +250,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -349,44 +259,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scattermapbox.Hoverlabel @@ -397,8 +269,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -433,7 +303,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -441,8 +311,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -462,8 +330,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -480,7 +346,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -488,8 +354,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -509,8 +373,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -523,7 +385,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -531,8 +393,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -551,8 +411,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # lat - # --- @property def lat(self): """ @@ -563,7 +421,7 @@ def lat(self): Returns ------- - numpy.ndarray + NDArray """ return self["lat"] @@ -571,8 +429,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # latsrc - # ------ @property def latsrc(self): """ @@ -591,8 +447,6 @@ def latsrc(self): def latsrc(self, val): self["latsrc"] = val - # legend - # ------ @property def legend(self): """ @@ -616,8 +470,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -639,8 +491,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -650,13 +500,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scattermapbox.Legendgrouptitle @@ -667,8 +510,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -694,8 +535,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -715,8 +554,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -726,13 +563,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scattermapbox.Line @@ -743,8 +573,6 @@ def line(self): def line(self, val): self["line"] = val - # lon - # --- @property def lon(self): """ @@ -755,7 +583,7 @@ def lon(self): Returns ------- - numpy.ndarray + NDArray """ return self["lon"] @@ -763,8 +591,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # lonsrc - # ------ @property def lonsrc(self): """ @@ -783,8 +609,6 @@ def lonsrc(self): def lonsrc(self, val): self["lonsrc"] = val - # marker - # ------ @property def marker(self): """ @@ -794,138 +618,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - allowoverlap - Flag to draw all symbols, even if they overlap. - angle - Sets the marker orientation from true North, in - degrees clockwise. When using the "auto" - default, no rotation would be applied in - perspective views which is different from using - a zero angle. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattermapbox.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that - the array `marker.color` and `marker.size` are - only available for "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scattermapbox.Marker @@ -936,8 +628,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -956,7 +646,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -964,8 +654,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -984,8 +672,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1010,8 +696,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1032,8 +716,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1052,8 +734,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -1063,13 +743,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattermapbox.sele - cted.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattermapbox.Selected @@ -1080,8 +753,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1104,8 +775,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1125,8 +794,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1136,18 +803,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scattermapbox.Stream @@ -1158,8 +813,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1187,8 +840,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1206,7 +857,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1214,8 +865,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1229,35 +878,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermapbox.Textfont @@ -1268,8 +888,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1292,8 +910,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1312,8 +928,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1339,7 +953,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1347,8 +961,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1368,8 +980,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1390,8 +1000,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1423,8 +1031,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1434,13 +1040,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattermapbox.unse - lected.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattermapbox.Unselected @@ -1451,8 +1050,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1474,14 +1071,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1741,53 +1334,53 @@ def _prop_descriptions(self): def __init__( self, arg=None, - below=None, - cluster=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - lat=None, - latsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - lon=None, - lonsrc=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + below: str | None = None, + cluster: None | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + lat: NDArray | None = None, + latsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + lon: NDArray | None = None, + lonsrc: str | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2062,14 +1655,11 @@ def __init__( ------- Scattermapbox """ - super(Scattermapbox, self).__init__("scattermapbox") - + super().__init__("scattermapbox") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2084,214 +1674,60 @@ def __init__( an instance of :class:`plotly.graph_objs.Scattermapbox`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("cluster", None) - _v = cluster if cluster is not None else _v - if _v is not None: - self["cluster"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("latsrc", None) - _v = latsrc if latsrc is not None else _v - if _v is not None: - self["latsrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - _v = arg.pop("lonsrc", None) - _v = lonsrc if lonsrc is not None else _v - if _v is not None: - self["lonsrc"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("below", arg, below) + self._init_provided("cluster", arg, cluster) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("lat", arg, lat) + self._init_provided("latsrc", arg, latsrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("lon", arg, lon) + self._init_provided("lonsrc", arg, lonsrc) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scattermapbox" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False warnings.warn( diff --git a/plotly/graph_objs/_scatterpolar.py b/plotly/graph_objs/_scatterpolar.py index 57ba5a4e27..eba4eed277 100644 --- a/plotly/graph_objs/_scatterpolar.py +++ b/plotly/graph_objs/_scatterpolar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatterpolar(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scatterpolar" _valid_props = { @@ -65,8 +66,6 @@ class Scatterpolar(_BaseTraceType): "visible", } - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -88,8 +87,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -109,8 +106,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -124,7 +119,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -132,8 +127,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -153,8 +146,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dr - # -- @property def dr(self): """ @@ -173,8 +164,6 @@ def dr(self): def dr(self, val): self["dr"] = val - # dtheta - # ------ @property def dtheta(self): """ @@ -195,8 +184,6 @@ def dtheta(self): def dtheta(self, val): self["dtheta"] = val - # fill - # ---- @property def fill(self): """ @@ -224,8 +211,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -238,42 +223,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -285,8 +235,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -303,7 +251,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -311,8 +259,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -332,8 +278,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -343,44 +287,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scatterpolar.Hoverlabel @@ -391,8 +297,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -416,8 +320,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -452,7 +354,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -460,8 +362,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -481,8 +381,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -499,7 +397,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -507,8 +405,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -528,8 +424,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -542,7 +436,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -550,8 +444,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -570,8 +462,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -595,8 +485,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -618,8 +506,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -629,13 +515,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scatterpolar.Legendgrouptitle @@ -646,8 +525,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -673,8 +550,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -694,8 +569,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -705,38 +578,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scatterpolar.Line @@ -747,8 +588,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -758,159 +597,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolar.marke - r.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scatterpolar.marke - r.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterpolar.marke - r.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scatterpolar.Marker @@ -921,8 +607,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -941,7 +625,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -949,8 +633,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -969,8 +651,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -997,8 +677,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1019,8 +697,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1039,8 +715,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # r - # - @property def r(self): """ @@ -1051,7 +725,7 @@ def r(self): Returns ------- - numpy.ndarray + NDArray """ return self["r"] @@ -1059,8 +733,6 @@ def r(self): def r(self, val): self["r"] = val - # r0 - # -- @property def r0(self): """ @@ -1080,8 +752,6 @@ def r0(self): def r0(self, val): self["r0"] = val - # rsrc - # ---- @property def rsrc(self): """ @@ -1100,8 +770,6 @@ def rsrc(self): def rsrc(self, val): self["rsrc"] = val - # selected - # -------- @property def selected(self): """ @@ -1111,17 +779,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolar.selec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.selec - ted.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scatterpolar.Selected @@ -1132,8 +789,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1156,8 +811,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1177,8 +830,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1188,18 +839,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scatterpolar.Stream @@ -1210,8 +849,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1235,8 +872,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1254,7 +889,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1262,8 +897,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1275,79 +908,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatterpolar.Textfont @@ -1358,8 +918,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1375,7 +933,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1383,8 +941,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1404,8 +960,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1424,8 +978,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1451,7 +1003,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1459,8 +1011,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1480,8 +1030,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # theta - # ----- @property def theta(self): """ @@ -1492,7 +1040,7 @@ def theta(self): Returns ------- - numpy.ndarray + NDArray """ return self["theta"] @@ -1500,8 +1048,6 @@ def theta(self): def theta(self, val): self["theta"] = val - # theta0 - # ------ @property def theta0(self): """ @@ -1521,8 +1067,6 @@ def theta0(self): def theta0(self, val): self["theta0"] = val - # thetasrc - # -------- @property def thetasrc(self): """ @@ -1541,8 +1085,6 @@ def thetasrc(self): def thetasrc(self, val): self["thetasrc"] = val - # thetaunit - # --------- @property def thetaunit(self): """ @@ -1563,8 +1105,6 @@ def thetaunit(self): def thetaunit(self, val): self["thetaunit"] = val - # uid - # --- @property def uid(self): """ @@ -1585,8 +1125,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1618,8 +1156,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1629,17 +1165,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scatterpolar.Unselected @@ -1650,8 +1175,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1673,14 +1196,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1964,59 +1483,59 @@ def _prop_descriptions(self): def __init__( self, arg=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2315,14 +1834,11 @@ def __init__( ------- Scatterpolar """ - super(Scatterpolar, self).__init__("scatterpolar") - + super().__init__("scatterpolar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2337,236 +1853,64 @@ def __init__( an instance of :class:`plotly.graph_objs.Scatterpolar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dr", None) - _v = dr if dr is not None else _v - if _v is not None: - self["dr"] = _v - _v = arg.pop("dtheta", None) - _v = dtheta if dtheta is not None else _v - if _v is not None: - self["dtheta"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("r0", None) - _v = r0 if r0 is not None else _v - if _v is not None: - self["r0"] = _v - _v = arg.pop("rsrc", None) - _v = rsrc if rsrc is not None else _v - if _v is not None: - self["rsrc"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("theta", None) - _v = theta if theta is not None else _v - if _v is not None: - self["theta"] = _v - _v = arg.pop("theta0", None) - _v = theta0 if theta0 is not None else _v - if _v is not None: - self["theta0"] = _v - _v = arg.pop("thetasrc", None) - _v = thetasrc if thetasrc is not None else _v - if _v is not None: - self["thetasrc"] = _v - _v = arg.pop("thetaunit", None) - _v = thetaunit if thetaunit is not None else _v - if _v is not None: - self["thetaunit"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dr", arg, dr) + self._init_provided("dtheta", arg, dtheta) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("r", arg, r) + self._init_provided("r0", arg, r0) + self._init_provided("rsrc", arg, rsrc) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("theta", arg, theta) + self._init_provided("theta0", arg, theta0) + self._init_provided("thetasrc", arg, thetasrc) + self._init_provided("thetaunit", arg, thetaunit) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scatterpolar" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scatterpolargl.py b/plotly/graph_objs/_scatterpolargl.py index 0269ff4df8..92e0065f49 100644 --- a/plotly/graph_objs/_scatterpolargl.py +++ b/plotly/graph_objs/_scatterpolargl.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatterpolargl(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scatterpolargl" _valid_props = { @@ -63,8 +64,6 @@ class Scatterpolargl(_BaseTraceType): "visible", } - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -84,8 +83,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -99,7 +96,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -107,8 +104,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -128,8 +123,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # dr - # -- @property def dr(self): """ @@ -148,8 +141,6 @@ def dr(self): def dr(self, val): self["dr"] = val - # dtheta - # ------ @property def dtheta(self): """ @@ -170,8 +161,6 @@ def dtheta(self): def dtheta(self, val): self["dtheta"] = val - # fill - # ---- @property def fill(self): """ @@ -210,8 +199,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -224,42 +211,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -271,8 +223,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -289,7 +239,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -297,8 +247,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -318,8 +266,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -329,44 +275,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scatterpolargl.Hoverlabel @@ -377,8 +285,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -413,7 +319,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -421,8 +327,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -442,8 +346,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -460,7 +362,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -468,8 +370,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -489,8 +389,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -503,7 +401,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -511,8 +409,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -531,8 +427,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -556,8 +450,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -579,8 +471,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -590,13 +480,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scatterpolargl.Legendgrouptitle @@ -607,8 +490,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -634,8 +515,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -655,8 +534,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -666,15 +543,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the style of the lines. - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scatterpolargl.Line @@ -685,8 +553,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -696,138 +562,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolargl.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.scatterpolargl.mar - ker.Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scatterpolargl.Marker @@ -838,8 +572,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -858,7 +590,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -866,8 +598,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -886,8 +616,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -914,8 +642,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -936,8 +662,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -956,8 +680,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # r - # - @property def r(self): """ @@ -968,7 +690,7 @@ def r(self): Returns ------- - numpy.ndarray + NDArray """ return self["r"] @@ -976,8 +698,6 @@ def r(self): def r(self, val): self["r"] = val - # r0 - # -- @property def r0(self): """ @@ -997,8 +717,6 @@ def r0(self): def r0(self, val): self["r0"] = val - # rsrc - # ---- @property def rsrc(self): """ @@ -1017,8 +735,6 @@ def rsrc(self): def rsrc(self, val): self["rsrc"] = val - # selected - # -------- @property def selected(self): """ @@ -1028,17 +744,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scatterpolargl.Selected @@ -1049,8 +754,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1073,8 +776,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1094,8 +795,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1105,18 +804,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scatterpolargl.Stream @@ -1127,8 +814,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1152,8 +837,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1171,7 +854,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1179,8 +862,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1192,55 +873,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatterpolargl.Textfont @@ -1251,8 +883,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1268,7 +898,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1276,8 +906,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1297,8 +925,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1317,8 +943,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1344,7 +968,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1352,8 +976,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1373,8 +995,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # theta - # ----- @property def theta(self): """ @@ -1385,7 +1005,7 @@ def theta(self): Returns ------- - numpy.ndarray + NDArray """ return self["theta"] @@ -1393,8 +1013,6 @@ def theta(self): def theta(self, val): self["theta"] = val - # theta0 - # ------ @property def theta0(self): """ @@ -1414,8 +1032,6 @@ def theta0(self): def theta0(self, val): self["theta0"] = val - # thetasrc - # -------- @property def thetasrc(self): """ @@ -1434,8 +1050,6 @@ def thetasrc(self): def thetasrc(self, val): self["thetasrc"] = val - # thetaunit - # --------- @property def thetaunit(self): """ @@ -1456,8 +1070,6 @@ def thetaunit(self): def thetaunit(self, val): self["thetaunit"] = val - # uid - # --- @property def uid(self): """ @@ -1478,8 +1090,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1511,8 +1121,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1522,17 +1130,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scatterpolargl.Unselected @@ -1543,8 +1140,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1566,14 +1161,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1857,57 +1448,57 @@ def _prop_descriptions(self): def __init__( self, arg=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - dr=None, - dtheta=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - r=None, - r0=None, - rsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - theta=None, - theta0=None, - thetasrc=None, - thetaunit=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + dr: int | float | None = None, + dtheta: int | float | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + r: NDArray | None = None, + r0: Any | None = None, + rsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + theta: NDArray | None = None, + theta0: Any | None = None, + thetasrc: str | None = None, + thetaunit: Any | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2206,14 +1797,11 @@ def __init__( ------- Scatterpolargl """ - super(Scatterpolargl, self).__init__("scatterpolargl") - + super().__init__("scatterpolargl") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2228,228 +1816,62 @@ def __init__( an instance of :class:`plotly.graph_objs.Scatterpolargl`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("dr", None) - _v = dr if dr is not None else _v - if _v is not None: - self["dr"] = _v - _v = arg.pop("dtheta", None) - _v = dtheta if dtheta is not None else _v - if _v is not None: - self["dtheta"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("r0", None) - _v = r0 if r0 is not None else _v - if _v is not None: - self["r0"] = _v - _v = arg.pop("rsrc", None) - _v = rsrc if rsrc is not None else _v - if _v is not None: - self["rsrc"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("theta", None) - _v = theta if theta is not None else _v - if _v is not None: - self["theta"] = _v - _v = arg.pop("theta0", None) - _v = theta0 if theta0 is not None else _v - if _v is not None: - self["theta0"] = _v - _v = arg.pop("thetasrc", None) - _v = thetasrc if thetasrc is not None else _v - if _v is not None: - self["thetasrc"] = _v - _v = arg.pop("thetaunit", None) - _v = thetaunit if thetaunit is not None else _v - if _v is not None: - self["thetaunit"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("dr", arg, dr) + self._init_provided("dtheta", arg, dtheta) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("r", arg, r) + self._init_provided("r0", arg, r0) + self._init_provided("rsrc", arg, rsrc) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("theta", arg, theta) + self._init_provided("theta0", arg, theta0) + self._init_provided("thetasrc", arg, thetasrc) + self._init_provided("thetaunit", arg, thetaunit) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scatterpolargl" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scattersmith.py b/plotly/graph_objs/_scattersmith.py index 81f82092bf..8dee9cc3ab 100644 --- a/plotly/graph_objs/_scattersmith.py +++ b/plotly/graph_objs/_scattersmith.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scattersmith(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scattersmith" _valid_props = { @@ -60,8 +61,6 @@ class Scattersmith(_BaseTraceType): "visible", } - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -83,8 +82,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -104,8 +101,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -119,7 +114,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -127,8 +122,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -148,8 +141,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fill - # ---- @property def fill(self): """ @@ -177,8 +168,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -191,42 +180,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -238,8 +192,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -256,7 +208,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -264,8 +216,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -285,8 +235,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -296,44 +244,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scattersmith.Hoverlabel @@ -344,8 +254,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -369,8 +277,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -405,7 +311,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -413,8 +319,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -434,8 +338,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -452,7 +354,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -460,8 +362,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -481,8 +381,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -495,7 +393,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -503,8 +401,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -523,8 +419,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # imag - # ---- @property def imag(self): """ @@ -537,7 +431,7 @@ def imag(self): Returns ------- - numpy.ndarray + NDArray """ return self["imag"] @@ -545,8 +439,6 @@ def imag(self): def imag(self, val): self["imag"] = val - # imagsrc - # ------- @property def imagsrc(self): """ @@ -565,8 +457,6 @@ def imagsrc(self): def imagsrc(self, val): self["imagsrc"] = val - # legend - # ------ @property def legend(self): """ @@ -590,8 +480,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -613,8 +501,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -624,13 +510,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scattersmith.Legendgrouptitle @@ -641,8 +520,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -668,8 +545,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -689,8 +564,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -700,38 +573,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scattersmith.Line @@ -742,8 +583,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -753,159 +592,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattersmith.marke - r.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scattersmith.marke - r.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattersmith.marke - r.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scattersmith.Marker @@ -916,8 +602,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -936,7 +620,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -944,8 +628,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -964,8 +646,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -992,8 +672,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1014,8 +692,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1034,8 +710,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # real - # ---- @property def real(self): """ @@ -1047,7 +721,7 @@ def real(self): Returns ------- - numpy.ndarray + NDArray """ return self["real"] @@ -1055,8 +729,6 @@ def real(self): def real(self, val): self["real"] = val - # realsrc - # ------- @property def realsrc(self): """ @@ -1075,8 +747,6 @@ def realsrc(self): def realsrc(self, val): self["realsrc"] = val - # selected - # -------- @property def selected(self): """ @@ -1086,17 +756,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattersmith.selec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattersmith.selec - ted.Textfont` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.scattersmith.Selected @@ -1107,8 +766,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1131,8 +788,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1152,8 +807,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1163,18 +816,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scattersmith.Stream @@ -1185,8 +826,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1210,8 +849,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # text - # ---- @property def text(self): """ @@ -1229,7 +866,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1237,8 +874,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1250,79 +885,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattersmith.Textfont @@ -1333,8 +895,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1350,7 +910,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1358,8 +918,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1379,8 +937,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1399,8 +955,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1426,7 +980,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1434,8 +988,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1455,8 +1007,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1477,8 +1027,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1510,8 +1058,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1521,17 +1067,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scattersmith.unsel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattersmith.unsel - ected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scattersmith.Unselected @@ -1542,8 +1077,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1565,14 +1098,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1843,54 +1372,54 @@ def _prop_descriptions(self): def __init__( self, arg=None, - cliponaxis=None, - connectgaps=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - imag=None, - imagsrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - real=None, - realsrc=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + imag: NDArray | None = None, + imagsrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + real: NDArray | None = None, + realsrc: str | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2176,14 +1705,11 @@ def __init__( ------- Scattersmith """ - super(Scattersmith, self).__init__("scattersmith") - + super().__init__("scattersmith") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2198,216 +1724,59 @@ def __init__( an instance of :class:`plotly.graph_objs.Scattersmith`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("imag", None) - _v = imag if imag is not None else _v - if _v is not None: - self["imag"] = _v - _v = arg.pop("imagsrc", None) - _v = imagsrc if imagsrc is not None else _v - if _v is not None: - self["imagsrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("real", None) - _v = real if real is not None else _v - if _v is not None: - self["real"] = _v - _v = arg.pop("realsrc", None) - _v = realsrc if realsrc is not None else _v - if _v is not None: - self["realsrc"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("imag", arg, imag) + self._init_provided("imagsrc", arg, imagsrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("real", arg, real) + self._init_provided("realsrc", arg, realsrc) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scattersmith" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_scatterternary.py b/plotly/graph_objs/_scatterternary.py index ed6069b993..23c515db58 100644 --- a/plotly/graph_objs/_scatterternary.py +++ b/plotly/graph_objs/_scatterternary.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatterternary(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "scatterternary" _valid_props = { @@ -63,8 +64,6 @@ class Scatterternary(_BaseTraceType): "visible", } - # a - # - @property def a(self): """ @@ -78,7 +77,7 @@ def a(self): Returns ------- - numpy.ndarray + NDArray """ return self["a"] @@ -86,8 +85,6 @@ def a(self): def a(self, val): self["a"] = val - # asrc - # ---- @property def asrc(self): """ @@ -106,8 +103,6 @@ def asrc(self): def asrc(self, val): self["asrc"] = val - # b - # - @property def b(self): """ @@ -121,7 +116,7 @@ def b(self): Returns ------- - numpy.ndarray + NDArray """ return self["b"] @@ -129,8 +124,6 @@ def b(self): def b(self, val): self["b"] = val - # bsrc - # ---- @property def bsrc(self): """ @@ -149,8 +142,6 @@ def bsrc(self): def bsrc(self, val): self["bsrc"] = val - # c - # - @property def c(self): """ @@ -164,7 +155,7 @@ def c(self): Returns ------- - numpy.ndarray + NDArray """ return self["c"] @@ -172,8 +163,6 @@ def c(self): def c(self, val): self["c"] = val - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -195,8 +184,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -216,8 +203,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # csrc - # ---- @property def csrc(self): """ @@ -236,8 +221,6 @@ def csrc(self): def csrc(self, val): self["csrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -251,7 +234,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -259,8 +242,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -280,8 +261,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fill - # ---- @property def fill(self): """ @@ -309,8 +288,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -323,42 +300,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -370,8 +312,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -388,7 +328,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -396,8 +336,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -417,8 +355,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -428,44 +364,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.scatterternary.Hoverlabel @@ -476,8 +374,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -501,8 +397,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -537,7 +431,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -545,8 +439,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -566,8 +458,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -584,7 +474,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -592,8 +482,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -613,8 +501,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -627,7 +513,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -635,8 +521,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -655,8 +539,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -680,8 +562,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -703,8 +583,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -714,13 +592,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.scatterternary.Legendgrouptitle @@ -731,8 +602,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -758,8 +627,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -779,8 +646,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -790,38 +655,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.scatterternary.Line @@ -832,8 +665,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -843,159 +674,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterternary.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scatterternary.mar - ker.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterternary.mar - ker.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.scatterternary.Marker @@ -1006,8 +684,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -1026,7 +702,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1034,8 +710,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1054,8 +728,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # mode - # ---- @property def mode(self): """ @@ -1082,8 +754,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # name - # ---- @property def name(self): """ @@ -1104,8 +774,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1124,8 +792,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -1135,17 +801,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterternary.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterternary.sel - ected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scatterternary.Selected @@ -1156,8 +811,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1180,8 +833,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1201,8 +852,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1212,18 +861,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.scatterternary.Stream @@ -1234,8 +871,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # subplot - # ------- @property def subplot(self): """ @@ -1259,8 +894,6 @@ def subplot(self): def subplot(self, val): self["subplot"] = val - # sum - # --- @property def sum(self): """ @@ -1283,8 +916,6 @@ def sum(self): def sum(self, val): self["sum"] = val - # text - # ---- @property def text(self): """ @@ -1302,7 +933,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1310,8 +941,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1323,79 +952,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatterternary.Textfont @@ -1406,8 +962,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1423,7 +977,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1431,8 +985,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1452,8 +1004,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1472,8 +1022,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1499,7 +1047,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1507,8 +1055,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1528,8 +1074,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1550,8 +1094,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1583,8 +1125,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1594,17 +1134,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.scatterternary.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.uns - elected.Textfont` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.scatterternary.Unselected @@ -1615,8 +1144,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1638,14 +1165,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1936,57 +1459,57 @@ def _prop_descriptions(self): def __init__( self, arg=None, - a=None, - asrc=None, - b=None, - bsrc=None, - c=None, - cliponaxis=None, - connectgaps=None, - csrc=None, - customdata=None, - customdatasrc=None, - fill=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meta=None, - metasrc=None, - mode=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - stream=None, - subplot=None, - sum=None, - text=None, - textfont=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, + a: NDArray | None = None, + asrc: str | None = None, + b: NDArray | None = None, + bsrc: str | None = None, + c: NDArray | None = None, + cliponaxis: bool | None = None, + connectgaps: bool | None = None, + csrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fill: Any | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + mode: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + subplot: str | None = None, + sum: int | float | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2289,14 +1812,11 @@ def __init__( ------- Scatterternary """ - super(Scatterternary, self).__init__("scatterternary") - + super().__init__("scatterternary") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2311,228 +1831,62 @@ def __init__( an instance of :class:`plotly.graph_objs.Scatterternary`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("a", None) - _v = a if a is not None else _v - if _v is not None: - self["a"] = _v - _v = arg.pop("asrc", None) - _v = asrc if asrc is not None else _v - if _v is not None: - self["asrc"] = _v - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("bsrc", None) - _v = bsrc if bsrc is not None else _v - if _v is not None: - self["bsrc"] = _v - _v = arg.pop("c", None) - _v = c if c is not None else _v - if _v is not None: - self["c"] = _v - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("csrc", None) - _v = csrc if csrc is not None else _v - if _v is not None: - self["csrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("subplot", None) - _v = subplot if subplot is not None else _v - if _v is not None: - self["subplot"] = _v - _v = arg.pop("sum", None) - _v = sum if sum is not None else _v - if _v is not None: - self["sum"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("a", arg, a) + self._init_provided("asrc", arg, asrc) + self._init_provided("b", arg, b) + self._init_provided("bsrc", arg, bsrc) + self._init_provided("c", arg, c) + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("csrc", arg, csrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("fill", arg, fill) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("mode", arg, mode) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("subplot", arg, subplot) + self._init_provided("sum", arg, sum) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) self._props["type"] = "scatterternary" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_splom.py b/plotly/graph_objs/_splom.py index e31ba1d7fe..860978b334 100644 --- a/plotly/graph_objs/_splom.py +++ b/plotly/graph_objs/_splom.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Splom(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "splom" _valid_props = { @@ -52,8 +53,6 @@ class Splom(_BaseTraceType): "yhoverformat", } - # customdata - # ---------- @property def customdata(self): """ @@ -67,7 +66,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -75,8 +74,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -96,8 +93,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # diagonal - # -------- @property def diagonal(self): """ @@ -107,12 +102,6 @@ def diagonal(self): - A dict of string/value properties that will be passed to the Diagonal constructor - Supported dict properties: - - visible - Determines whether or not subplots on the - diagonal are displayed. - Returns ------- plotly.graph_objs.splom.Diagonal @@ -123,8 +112,6 @@ def diagonal(self): def diagonal(self, val): self["diagonal"] = val - # dimensions - # ---------- @property def dimensions(self): """ @@ -134,46 +121,6 @@ def dimensions(self): - A list or tuple of dicts of string/value properties that will be passed to the Dimension constructor - Supported dict properties: - - axis - :class:`plotly.graph_objects.splom.dimension.Ax - is` instance or dict with compatible properties - label - Sets the label corresponding to this splom - dimension. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this dimension is - shown on the graph. Note that even visible - false dimension contribute to the default grid - generate by this splom trace. - Returns ------- tuple[plotly.graph_objs.splom.Dimension] @@ -184,8 +131,6 @@ def dimensions(self): def dimensions(self, val): self["dimensions"] = val - # dimensiondefaults - # ----------------- @property def dimensiondefaults(self): """ @@ -199,8 +144,6 @@ def dimensiondefaults(self): - A dict of string/value properties that will be passed to the Dimension constructor - Supported dict properties: - Returns ------- plotly.graph_objs.splom.Dimension @@ -211,8 +154,6 @@ def dimensiondefaults(self): def dimensiondefaults(self, val): self["dimensiondefaults"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -229,7 +170,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -237,8 +178,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -258,8 +197,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -269,44 +206,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.splom.Hoverlabel @@ -317,8 +216,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -353,7 +250,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -361,8 +258,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -382,8 +277,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -396,7 +289,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -404,8 +297,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -425,8 +316,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -439,7 +328,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -447,8 +336,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -467,8 +354,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -492,8 +377,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -515,8 +398,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -526,13 +407,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.splom.Legendgrouptitle @@ -543,8 +417,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -570,8 +442,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -591,8 +461,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # marker - # ------ @property def marker(self): """ @@ -602,137 +470,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.splom.marker.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.splom.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. - Returns ------- plotly.graph_objs.splom.Marker @@ -743,8 +480,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meta - # ---- @property def meta(self): """ @@ -763,7 +498,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -771,8 +506,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -791,8 +524,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -813,8 +544,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -833,8 +562,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # selected - # -------- @property def selected(self): """ @@ -844,13 +571,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.splom.selected.Mar - ker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.splom.Selected @@ -861,8 +581,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -885,8 +603,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -906,8 +622,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showlowerhalf - # ------------- @property def showlowerhalf(self): """ @@ -927,8 +641,6 @@ def showlowerhalf(self): def showlowerhalf(self, val): self["showlowerhalf"] = val - # showupperhalf - # ------------- @property def showupperhalf(self): """ @@ -948,8 +660,6 @@ def showupperhalf(self): def showupperhalf(self, val): self["showupperhalf"] = val - # stream - # ------ @property def stream(self): """ @@ -959,18 +669,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.splom.Stream @@ -981,8 +679,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -998,7 +694,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1006,8 +702,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1026,8 +720,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1048,8 +740,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1081,8 +771,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1092,13 +780,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.splom.unselected.M - arker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.splom.Unselected @@ -1109,8 +790,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1132,8 +811,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # xaxes - # ----- @property def xaxes(self): """ @@ -1161,8 +838,6 @@ def xaxes(self): def xaxes(self, val): self["xaxes"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1192,8 +867,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # yaxes - # ----- @property def yaxes(self): """ @@ -1221,8 +894,6 @@ def yaxes(self): def yaxes(self, val): self["yaxes"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1252,14 +923,10 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1496,46 +1163,46 @@ def _prop_descriptions(self): def __init__( self, arg=None, - customdata=None, - customdatasrc=None, - diagonal=None, - dimensions=None, - dimensiondefaults=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - marker=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - selected=None, - selectedpoints=None, - showlegend=None, - showlowerhalf=None, - showupperhalf=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - xaxes=None, - xhoverformat=None, - yaxes=None, - yhoverformat=None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + diagonal: None | None = None, + dimensions: None | None = None, + dimensiondefaults: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + marker: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + showlowerhalf: bool | None = None, + showupperhalf: bool | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + xaxes: list | None = None, + xhoverformat: str | None = None, + yaxes: list | None = None, + yhoverformat: str | None = None, **kwargs, ): """ @@ -1787,14 +1454,11 @@ def __init__( ------- Splom """ - super(Splom, self).__init__("splom") - + super().__init__("splom") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1809,184 +1473,51 @@ def __init__( an instance of :class:`plotly.graph_objs.Splom`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("diagonal", None) - _v = diagonal if diagonal is not None else _v - if _v is not None: - self["diagonal"] = _v - _v = arg.pop("dimensions", None) - _v = dimensions if dimensions is not None else _v - if _v is not None: - self["dimensions"] = _v - _v = arg.pop("dimensiondefaults", None) - _v = dimensiondefaults if dimensiondefaults is not None else _v - if _v is not None: - self["dimensiondefaults"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showlowerhalf", None) - _v = showlowerhalf if showlowerhalf is not None else _v - if _v is not None: - self["showlowerhalf"] = _v - _v = arg.pop("showupperhalf", None) - _v = showupperhalf if showupperhalf is not None else _v - if _v is not None: - self["showupperhalf"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("xaxes", None) - _v = xaxes if xaxes is not None else _v - if _v is not None: - self["xaxes"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("yaxes", None) - _v = yaxes if yaxes is not None else _v - if _v is not None: - self["yaxes"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - - # Read-only literals - # ------------------ + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("diagonal", arg, diagonal) + self._init_provided("dimensions", arg, dimensions) + self._init_provided("dimensiondefaults", arg, dimensiondefaults) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("marker", arg, marker) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showlowerhalf", arg, showlowerhalf) + self._init_provided("showupperhalf", arg, showupperhalf) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("xaxes", arg, xaxes) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("yaxes", arg, yaxes) + self._init_provided("yhoverformat", arg, yhoverformat) self._props["type"] = "splom" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_streamtube.py b/plotly/graph_objs/_streamtube.py index b43c7ee8fa..a000c3303c 100644 --- a/plotly/graph_objs/_streamtube.py +++ b/plotly/graph_objs/_streamtube.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Streamtube(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "streamtube" _valid_props = { @@ -71,8 +72,6 @@ class Streamtube(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -96,8 +95,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -119,8 +116,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -141,8 +136,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -164,8 +157,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -186,8 +177,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -213,8 +202,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -224,272 +211,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.streamt - ube.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.streamtube.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of streamtube.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.streamtube.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.streamtube.ColorBar @@ -500,8 +221,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -553,8 +272,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -568,7 +285,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -576,8 +293,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -597,8 +312,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -615,7 +328,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -623,8 +336,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -644,8 +355,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -655,44 +364,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.streamtube.Hoverlabel @@ -703,8 +374,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -742,7 +411,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -750,8 +419,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -771,8 +438,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -792,8 +457,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # ids - # --- @property def ids(self): """ @@ -806,7 +469,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -814,8 +477,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -834,8 +495,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -859,8 +518,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -882,8 +539,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -893,13 +548,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.streamtube.Legendgrouptitle @@ -910,8 +558,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -937,8 +583,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -958,8 +602,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lighting - # -------- @property def lighting(self): """ @@ -969,33 +611,6 @@ def lighting(self): - A dict of string/value properties that will be passed to the Lighting constructor - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - Returns ------- plotly.graph_objs.streamtube.Lighting @@ -1006,8 +621,6 @@ def lighting(self): def lighting(self, val): self["lighting"] = val - # lightposition - # ------------- @property def lightposition(self): """ @@ -1017,18 +630,6 @@ def lightposition(self): - A dict of string/value properties that will be passed to the Lightposition constructor - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - Returns ------- plotly.graph_objs.streamtube.Lightposition @@ -1039,8 +640,6 @@ def lightposition(self): def lightposition(self, val): self["lightposition"] = val - # maxdisplayed - # ------------ @property def maxdisplayed(self): """ @@ -1060,8 +659,6 @@ def maxdisplayed(self): def maxdisplayed(self, val): self["maxdisplayed"] = val - # meta - # ---- @property def meta(self): """ @@ -1080,7 +677,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1088,8 +685,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1108,8 +703,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1130,8 +723,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1155,8 +746,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1177,8 +766,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- @property def scene(self): """ @@ -1202,8 +789,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1223,8 +808,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1244,8 +827,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1266,8 +847,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # starts - # ------ @property def starts(self): """ @@ -1277,27 +856,6 @@ def starts(self): - A dict of string/value properties that will be passed to the Starts constructor - Supported dict properties: - - x - Sets the x components of the starting position - of the streamtubes - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y components of the starting position - of the streamtubes - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the z components of the starting position - of the streamtubes - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. - Returns ------- plotly.graph_objs.streamtube.Starts @@ -1308,8 +866,6 @@ def starts(self): def starts(self, val): self["starts"] = val - # stream - # ------ @property def stream(self): """ @@ -1319,18 +875,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.streamtube.Stream @@ -1341,8 +885,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1365,8 +907,6 @@ def text(self): def text(self, val): self["text"] = val - # u - # - @property def u(self): """ @@ -1377,7 +917,7 @@ def u(self): Returns ------- - numpy.ndarray + NDArray """ return self["u"] @@ -1385,8 +925,6 @@ def u(self): def u(self, val): self["u"] = val - # uhoverformat - # ------------ @property def uhoverformat(self): """ @@ -1410,8 +948,6 @@ def uhoverformat(self): def uhoverformat(self, val): self["uhoverformat"] = val - # uid - # --- @property def uid(self): """ @@ -1432,8 +968,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1465,8 +999,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # usrc - # ---- @property def usrc(self): """ @@ -1485,8 +1017,6 @@ def usrc(self): def usrc(self, val): self["usrc"] = val - # v - # - @property def v(self): """ @@ -1497,7 +1027,7 @@ def v(self): Returns ------- - numpy.ndarray + NDArray """ return self["v"] @@ -1505,8 +1035,6 @@ def v(self): def v(self, val): self["v"] = val - # vhoverformat - # ------------ @property def vhoverformat(self): """ @@ -1530,8 +1058,6 @@ def vhoverformat(self): def vhoverformat(self, val): self["vhoverformat"] = val - # visible - # ------- @property def visible(self): """ @@ -1553,8 +1079,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # vsrc - # ---- @property def vsrc(self): """ @@ -1573,8 +1097,6 @@ def vsrc(self): def vsrc(self, val): self["vsrc"] = val - # w - # - @property def w(self): """ @@ -1585,7 +1107,7 @@ def w(self): Returns ------- - numpy.ndarray + NDArray """ return self["w"] @@ -1593,8 +1115,6 @@ def w(self): def w(self, val): self["w"] = val - # whoverformat - # ------------ @property def whoverformat(self): """ @@ -1618,8 +1138,6 @@ def whoverformat(self): def whoverformat(self, val): self["whoverformat"] = val - # wsrc - # ---- @property def wsrc(self): """ @@ -1638,8 +1156,6 @@ def wsrc(self): def wsrc(self, val): self["wsrc"] = val - # x - # - @property def x(self): """ @@ -1650,7 +1166,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1658,8 +1174,6 @@ def x(self): def x(self, val): self["x"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1689,8 +1203,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1709,8 +1221,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1721,7 +1231,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1729,8 +1239,6 @@ def y(self): def y(self, val): self["y"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1760,8 +1268,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1780,8 +1286,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1792,7 +1296,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1800,8 +1304,6 @@ def z(self): def z(self, val): self["z"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1831,8 +1333,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1851,14 +1351,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2184,65 +1680,65 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - customdata=None, - customdatasrc=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - maxdisplayed=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - sizeref=None, - starts=None, - stream=None, - text=None, - u=None, - uhoverformat=None, - uid=None, - uirevision=None, - usrc=None, - v=None, - vhoverformat=None, - visible=None, - vsrc=None, - w=None, - whoverformat=None, - wsrc=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + maxdisplayed: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + sizeref: int | float | None = None, + starts: None | None = None, + stream: None | None = None, + text: str | None = None, + u: NDArray | None = None, + uhoverformat: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + usrc: str | None = None, + v: NDArray | None = None, + vhoverformat: str | None = None, + visible: Any | None = None, + vsrc: str | None = None, + w: NDArray | None = None, + whoverformat: str | None = None, + wsrc: str | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2585,14 +2081,11 @@ def __init__( ------- Streamtube """ - super(Streamtube, self).__init__("streamtube") - + super().__init__("streamtube") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2607,260 +2100,70 @@ def __init__( an instance of :class:`plotly.graph_objs.Streamtube`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lighting", None) - _v = lighting if lighting is not None else _v - if _v is not None: - self["lighting"] = _v - _v = arg.pop("lightposition", None) - _v = lightposition if lightposition is not None else _v - if _v is not None: - self["lightposition"] = _v - _v = arg.pop("maxdisplayed", None) - _v = maxdisplayed if maxdisplayed is not None else _v - if _v is not None: - self["maxdisplayed"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("starts", None) - _v = starts if starts is not None else _v - if _v is not None: - self["starts"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("u", None) - _v = u if u is not None else _v - if _v is not None: - self["u"] = _v - _v = arg.pop("uhoverformat", None) - _v = uhoverformat if uhoverformat is not None else _v - if _v is not None: - self["uhoverformat"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("usrc", None) - _v = usrc if usrc is not None else _v - if _v is not None: - self["usrc"] = _v - _v = arg.pop("v", None) - _v = v if v is not None else _v - if _v is not None: - self["v"] = _v - _v = arg.pop("vhoverformat", None) - _v = vhoverformat if vhoverformat is not None else _v - if _v is not None: - self["vhoverformat"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("vsrc", None) - _v = vsrc if vsrc is not None else _v - if _v is not None: - self["vsrc"] = _v - _v = arg.pop("w", None) - _v = w if w is not None else _v - if _v is not None: - self["w"] = _v - _v = arg.pop("whoverformat", None) - _v = whoverformat if whoverformat is not None else _v - if _v is not None: - self["whoverformat"] = _v - _v = arg.pop("wsrc", None) - _v = wsrc if wsrc is not None else _v - if _v is not None: - self["wsrc"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lighting", arg, lighting) + self._init_provided("lightposition", arg, lightposition) + self._init_provided("maxdisplayed", arg, maxdisplayed) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("starts", arg, starts) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("u", arg, u) + self._init_provided("uhoverformat", arg, uhoverformat) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("usrc", arg, usrc) + self._init_provided("v", arg, v) + self._init_provided("vhoverformat", arg, vhoverformat) + self._init_provided("visible", arg, visible) + self._init_provided("vsrc", arg, vsrc) + self._init_provided("w", arg, w) + self._init_provided("whoverformat", arg, whoverformat) + self._init_provided("wsrc", arg, wsrc) + self._init_provided("x", arg, x) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "streamtube" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_sunburst.py b/plotly/graph_objs/_sunburst.py index 1772f95271..dc819b52eb 100644 --- a/plotly/graph_objs/_sunburst.py +++ b/plotly/graph_objs/_sunburst.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Sunburst(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "sunburst" _valid_props = { @@ -60,8 +61,6 @@ class Sunburst(_BaseTraceType): "visible", } - # branchvalues - # ------------ @property def branchvalues(self): """ @@ -86,8 +85,6 @@ def branchvalues(self): def branchvalues(self, val): self["branchvalues"] = val - # count - # ----- @property def count(self): """ @@ -110,8 +107,6 @@ def count(self): def count(self, val): self["count"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -125,7 +120,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -133,8 +128,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -154,8 +147,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ @property def domain(self): """ @@ -165,22 +156,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this sunburst trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst - trace (in plot fraction). - y - Sets the vertical domain of this sunburst trace - (in plot fraction). - Returns ------- plotly.graph_objs.sunburst.Domain @@ -191,8 +166,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -209,7 +182,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -217,8 +190,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -238,8 +209,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -249,44 +218,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.sunburst.Hoverlabel @@ -297,8 +228,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -336,7 +265,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -344,8 +273,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -365,8 +292,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -383,7 +308,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -391,8 +316,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -412,8 +335,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -426,7 +347,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -434,8 +355,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -454,8 +373,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -467,79 +384,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sunburst.Insidetextfont @@ -550,8 +394,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # insidetextorientation - # --------------------- @property def insidetextorientation(self): """ @@ -578,8 +420,6 @@ def insidetextorientation(self): def insidetextorientation(self, val): self["insidetextorientation"] = val - # labels - # ------ @property def labels(self): """ @@ -590,7 +430,7 @@ def labels(self): Returns ------- - numpy.ndarray + NDArray """ return self["labels"] @@ -598,8 +438,6 @@ def labels(self): def labels(self, val): self["labels"] = val - # labelssrc - # --------- @property def labelssrc(self): """ @@ -618,8 +456,6 @@ def labelssrc(self): def labelssrc(self, val): self["labelssrc"] = val - # leaf - # ---- @property def leaf(self): """ @@ -629,13 +465,6 @@ def leaf(self): - A dict of string/value properties that will be passed to the Leaf constructor - Supported dict properties: - - opacity - Sets the opacity of the leaves. With colorscale - it is defaulted to 1; otherwise it is defaulted - to 0.7 - Returns ------- plotly.graph_objs.sunburst.Leaf @@ -646,8 +475,6 @@ def leaf(self): def leaf(self, val): self["leaf"] = val - # legend - # ------ @property def legend(self): """ @@ -671,8 +498,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -682,13 +507,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.sunburst.Legendgrouptitle @@ -699,8 +517,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -726,8 +542,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -747,8 +561,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # level - # ----- @property def level(self): """ @@ -769,8 +581,6 @@ def level(self): def level(self, val): self["level"] = val - # marker - # ------ @property def marker(self): """ @@ -780,98 +590,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colors is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colors is - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colors is set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.sunburst.marker.Co - lorBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colors is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.sunburst.marker.Li - ne` instance or dict with compatible properties - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if colors is set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colors is set to a numerical array. - Returns ------- plotly.graph_objs.sunburst.Marker @@ -882,8 +600,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # maxdepth - # -------- @property def maxdepth(self): """ @@ -903,8 +619,6 @@ def maxdepth(self): def maxdepth(self, val): self["maxdepth"] = val - # meta - # ---- @property def meta(self): """ @@ -923,7 +637,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -931,8 +645,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -951,8 +663,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -973,8 +683,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -993,8 +701,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -1010,79 +716,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sunburst.Outsidetextfont @@ -1093,8 +726,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # parents - # ------- @property def parents(self): """ @@ -1110,7 +741,7 @@ def parents(self): Returns ------- - numpy.ndarray + NDArray """ return self["parents"] @@ -1118,8 +749,6 @@ def parents(self): def parents(self, val): self["parents"] = val - # parentssrc - # ---------- @property def parentssrc(self): """ @@ -1138,8 +767,6 @@ def parentssrc(self): def parentssrc(self, val): self["parentssrc"] = val - # root - # ---- @property def root(self): """ @@ -1149,14 +776,6 @@ def root(self): - A dict of string/value properties that will be passed to the Root constructor - Supported dict properties: - - color - sets the color of the root node for a - sunburst/treemap/icicle trace. this has no - effect when a colorscale is used to set the - markers. - Returns ------- plotly.graph_objs.sunburst.Root @@ -1167,8 +786,6 @@ def root(self): def root(self, val): self["root"] = val - # rotation - # -------- @property def rotation(self): """ @@ -1190,8 +807,6 @@ def rotation(self): def rotation(self, val): self["rotation"] = val - # sort - # ---- @property def sort(self): """ @@ -1211,8 +826,6 @@ def sort(self): def sort(self, val): self["sort"] = val - # stream - # ------ @property def stream(self): """ @@ -1222,18 +835,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.sunburst.Stream @@ -1244,8 +845,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1260,7 +859,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1268,8 +867,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1281,79 +878,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sunburst.Textfont @@ -1364,8 +888,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1387,8 +909,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1407,8 +927,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1435,7 +953,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1443,8 +961,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1464,8 +980,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # uid - # --- @property def uid(self): """ @@ -1486,8 +1000,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1519,8 +1031,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ @property def values(self): """ @@ -1532,7 +1042,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -1540,8 +1050,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -1560,8 +1068,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1583,14 +1089,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1858,54 +1360,54 @@ def _prop_descriptions(self): def __init__( self, arg=None, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - insidetextorientation=None, - labels=None, - labelssrc=None, - leaf=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - root=None, - rotation=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + insidetextorientation: Any | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + leaf: None | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + root: None | None = None, + rotation: int | float | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2184,14 +1686,11 @@ def __init__( ------- Sunburst """ - super(Sunburst, self).__init__("sunburst") - + super().__init__("sunburst") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2206,216 +1705,59 @@ def __init__( an instance of :class:`plotly.graph_objs.Sunburst`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("branchvalues", None) - _v = branchvalues if branchvalues is not None else _v - if _v is not None: - self["branchvalues"] = _v - _v = arg.pop("count", None) - _v = count if count is not None else _v - if _v is not None: - self["count"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("insidetextorientation", None) - _v = insidetextorientation if insidetextorientation is not None else _v - if _v is not None: - self["insidetextorientation"] = _v - _v = arg.pop("labels", None) - _v = labels if labels is not None else _v - if _v is not None: - self["labels"] = _v - _v = arg.pop("labelssrc", None) - _v = labelssrc if labelssrc is not None else _v - if _v is not None: - self["labelssrc"] = _v - _v = arg.pop("leaf", None) - _v = leaf if leaf is not None else _v - if _v is not None: - self["leaf"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("level", None) - _v = level if level is not None else _v - if _v is not None: - self["level"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("maxdepth", None) - _v = maxdepth if maxdepth is not None else _v - if _v is not None: - self["maxdepth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("parents", None) - _v = parents if parents is not None else _v - if _v is not None: - self["parents"] = _v - _v = arg.pop("parentssrc", None) - _v = parentssrc if parentssrc is not None else _v - if _v is not None: - self["parentssrc"] = _v - _v = arg.pop("root", None) - _v = root if root is not None else _v - if _v is not None: - self["root"] = _v - _v = arg.pop("rotation", None) - _v = rotation if rotation is not None else _v - if _v is not None: - self["rotation"] = _v - _v = arg.pop("sort", None) - _v = sort if sort is not None else _v - if _v is not None: - self["sort"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("branchvalues", arg, branchvalues) + self._init_provided("count", arg, count) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("domain", arg, domain) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("insidetextorientation", arg, insidetextorientation) + self._init_provided("labels", arg, labels) + self._init_provided("labelssrc", arg, labelssrc) + self._init_provided("leaf", arg, leaf) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("level", arg, level) + self._init_provided("marker", arg, marker) + self._init_provided("maxdepth", arg, maxdepth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("parents", arg, parents) + self._init_provided("parentssrc", arg, parentssrc) + self._init_provided("root", arg, root) + self._init_provided("rotation", arg, rotation) + self._init_provided("sort", arg, sort) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._props["type"] = "sunburst" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_surface.py b/plotly/graph_objs/_surface.py index 79704dbfd1..98c1557fce 100644 --- a/plotly/graph_objs/_surface.py +++ b/plotly/graph_objs/_surface.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Surface(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "surface" _valid_props = { @@ -70,8 +71,6 @@ class Surface(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -95,8 +94,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -118,8 +115,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -140,8 +135,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -163,8 +156,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -185,8 +176,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -212,8 +201,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -223,272 +210,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.surface - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.surface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of surface.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.surface.colorbar.T - itle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.surface.ColorBar @@ -499,8 +220,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -552,8 +271,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # connectgaps - # ----------- @property def connectgaps(self): """ @@ -573,8 +290,6 @@ def connectgaps(self): def connectgaps(self, val): self["connectgaps"] = val - # contours - # -------- @property def contours(self): """ @@ -584,18 +299,6 @@ def contours(self): - A dict of string/value properties that will be passed to the Contours constructor - Supported dict properties: - - x - :class:`plotly.graph_objects.surface.contours.X - ` instance or dict with compatible properties - y - :class:`plotly.graph_objects.surface.contours.Y - ` instance or dict with compatible properties - z - :class:`plotly.graph_objects.surface.contours.Z - ` instance or dict with compatible properties - Returns ------- plotly.graph_objs.surface.Contours @@ -606,8 +309,6 @@ def contours(self): def contours(self, val): self["contours"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -621,7 +322,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -629,8 +330,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -650,8 +349,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hidesurface - # ----------- @property def hidesurface(self): """ @@ -672,8 +369,6 @@ def hidesurface(self): def hidesurface(self, val): self["hidesurface"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -690,7 +385,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -698,8 +393,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -719,8 +412,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -730,44 +421,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.surface.Hoverlabel @@ -778,8 +431,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -814,7 +465,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -822,8 +473,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -843,8 +492,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -857,7 +504,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -865,8 +512,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -886,8 +531,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -900,7 +543,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -908,8 +551,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -928,8 +569,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -953,8 +592,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -976,8 +613,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -987,13 +622,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.surface.Legendgrouptitle @@ -1004,8 +632,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1031,8 +657,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1052,8 +676,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lighting - # -------- @property def lighting(self): """ @@ -1063,27 +685,6 @@ def lighting(self): - A dict of string/value properties that will be passed to the Lighting constructor - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - Returns ------- plotly.graph_objs.surface.Lighting @@ -1094,8 +695,6 @@ def lighting(self): def lighting(self, val): self["lighting"] = val - # lightposition - # ------------- @property def lightposition(self): """ @@ -1105,18 +704,6 @@ def lightposition(self): - A dict of string/value properties that will be passed to the Lightposition constructor - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - Returns ------- plotly.graph_objs.surface.Lightposition @@ -1127,8 +714,6 @@ def lightposition(self): def lightposition(self, val): self["lightposition"] = val - # meta - # ---- @property def meta(self): """ @@ -1147,7 +732,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1155,8 +740,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1175,8 +758,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1197,8 +778,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1222,8 +801,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacityscale - # ------------ @property def opacityscale(self): """ @@ -1249,8 +826,6 @@ def opacityscale(self): def opacityscale(self, val): self["opacityscale"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1271,8 +846,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- @property def scene(self): """ @@ -1296,8 +869,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1317,8 +888,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1338,8 +907,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # stream - # ------ @property def stream(self): """ @@ -1349,18 +916,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.surface.Stream @@ -1371,8 +926,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # surfacecolor - # ------------ @property def surfacecolor(self): """ @@ -1384,7 +937,7 @@ def surfacecolor(self): Returns ------- - numpy.ndarray + NDArray """ return self["surfacecolor"] @@ -1392,8 +945,6 @@ def surfacecolor(self): def surfacecolor(self, val): self["surfacecolor"] = val - # surfacecolorsrc - # --------------- @property def surfacecolorsrc(self): """ @@ -1413,8 +964,6 @@ def surfacecolorsrc(self): def surfacecolorsrc(self, val): self["surfacecolorsrc"] = val - # text - # ---- @property def text(self): """ @@ -1429,7 +978,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1437,8 +986,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1457,8 +1004,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1479,8 +1024,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1512,8 +1055,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1535,8 +1076,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1547,7 +1086,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1555,8 +1094,6 @@ def x(self): def x(self, val): self["x"] = val - # xcalendar - # --------- @property def xcalendar(self): """ @@ -1579,8 +1116,6 @@ def xcalendar(self): def xcalendar(self, val): self["xcalendar"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1610,8 +1145,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1630,8 +1163,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1642,7 +1173,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1650,8 +1181,6 @@ def y(self): def y(self, val): self["y"] = val - # ycalendar - # --------- @property def ycalendar(self): """ @@ -1674,8 +1203,6 @@ def ycalendar(self): def ycalendar(self, val): self["ycalendar"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1705,8 +1232,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1725,8 +1250,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1737,7 +1260,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1745,8 +1268,6 @@ def z(self): def z(self, val): self["z"] = val - # zcalendar - # --------- @property def zcalendar(self): """ @@ -1769,8 +1290,6 @@ def zcalendar(self): def zcalendar(self, val): self["zcalendar"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1800,8 +1319,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1820,14 +1337,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2147,64 +1660,64 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - connectgaps=None, - contours=None, - customdata=None, - customdatasrc=None, - hidesurface=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - stream=None, - surfacecolor=None, - surfacecolorsrc=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - visible=None, - x=None, - xcalendar=None, - xhoverformat=None, - xsrc=None, - y=None, - ycalendar=None, - yhoverformat=None, - ysrc=None, - z=None, - zcalendar=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + connectgaps: bool | None = None, + contours: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hidesurface: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + opacityscale: Any | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + stream: None | None = None, + surfacecolor: NDArray | None = None, + surfacecolorsrc: str | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xcalendar: Any | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ycalendar: Any | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zcalendar: Any | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2541,14 +2054,11 @@ def __init__( ------- Surface """ - super(Surface, self).__init__("surface") - + super().__init__("surface") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2563,256 +2073,69 @@ def __init__( an instance of :class:`plotly.graph_objs.Surface`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("connectgaps", None) - _v = connectgaps if connectgaps is not None else _v - if _v is not None: - self["connectgaps"] = _v - _v = arg.pop("contours", None) - _v = contours if contours is not None else _v - if _v is not None: - self["contours"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("hidesurface", None) - _v = hidesurface if hidesurface is not None else _v - if _v is not None: - self["hidesurface"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lighting", None) - _v = lighting if lighting is not None else _v - if _v is not None: - self["lighting"] = _v - _v = arg.pop("lightposition", None) - _v = lightposition if lightposition is not None else _v - if _v is not None: - self["lightposition"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacityscale", None) - _v = opacityscale if opacityscale is not None else _v - if _v is not None: - self["opacityscale"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("surfacecolor", None) - _v = surfacecolor if surfacecolor is not None else _v - if _v is not None: - self["surfacecolor"] = _v - _v = arg.pop("surfacecolorsrc", None) - _v = surfacecolorsrc if surfacecolorsrc is not None else _v - if _v is not None: - self["surfacecolorsrc"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xcalendar", None) - _v = xcalendar if xcalendar is not None else _v - if _v is not None: - self["xcalendar"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("ycalendar", None) - _v = ycalendar if ycalendar is not None else _v - if _v is not None: - self["ycalendar"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zcalendar", None) - _v = zcalendar if zcalendar is not None else _v - if _v is not None: - self["zcalendar"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("connectgaps", arg, connectgaps) + self._init_provided("contours", arg, contours) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("hidesurface", arg, hidesurface) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lighting", arg, lighting) + self._init_provided("lightposition", arg, lightposition) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacityscale", arg, opacityscale) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("stream", arg, stream) + self._init_provided("surfacecolor", arg, surfacecolor) + self._init_provided("surfacecolorsrc", arg, surfacecolorsrc) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xcalendar", arg, xcalendar) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("ycalendar", arg, ycalendar) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zcalendar", arg, zcalendar) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "surface" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_table.py b/plotly/graph_objs/_table.py index c8dda0a63b..a2164ac8ed 100644 --- a/plotly/graph_objs/_table.py +++ b/plotly/graph_objs/_table.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Table(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "table" _valid_props = { @@ -37,8 +38,6 @@ class Table(_BaseTraceType): "visible", } - # cells - # ----- @property def cells(self): """ @@ -48,58 +47,6 @@ def cells(self): - A dict of string/value properties that will be passed to the Cells constructor - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - fill - :class:`plotly.graph_objects.table.cells.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.cells.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - formatsrc - Sets the source reference on Chart Studio Cloud - for `format`. - height - The height of cells. - line - :class:`plotly.graph_objects.table.cells.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for `prefix`. - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for `suffix`. - values - Cell values. `values[m][n]` represents the - value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - Returns ------- plotly.graph_objs.table.Cells @@ -110,8 +57,6 @@ def cells(self): def cells(self, val): self["cells"] = val - # columnorder - # ----------- @property def columnorder(self): """ @@ -125,7 +70,7 @@ def columnorder(self): Returns ------- - numpy.ndarray + NDArray """ return self["columnorder"] @@ -133,8 +78,6 @@ def columnorder(self): def columnorder(self, val): self["columnorder"] = val - # columnordersrc - # -------------- @property def columnordersrc(self): """ @@ -154,8 +97,6 @@ def columnordersrc(self): def columnordersrc(self, val): self["columnordersrc"] = val - # columnwidth - # ----------- @property def columnwidth(self): """ @@ -168,7 +109,7 @@ def columnwidth(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["columnwidth"] @@ -176,8 +117,6 @@ def columnwidth(self): def columnwidth(self, val): self["columnwidth"] = val - # columnwidthsrc - # -------------- @property def columnwidthsrc(self): """ @@ -197,8 +136,6 @@ def columnwidthsrc(self): def columnwidthsrc(self, val): self["columnwidthsrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -212,7 +149,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -220,8 +157,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -241,8 +176,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ @property def domain(self): """ @@ -252,21 +185,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this table trace . - row - If there is a layout grid, use the domain for - this row in the grid for this table trace . - x - Sets the horizontal domain of this table trace - (in plot fraction). - y - Sets the vertical domain of this table trace - (in plot fraction). - Returns ------- plotly.graph_objs.table.Domain @@ -277,8 +195,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # header - # ------ @property def header(self): """ @@ -288,58 +204,6 @@ def header(self): - A dict of string/value properties that will be passed to the Header constructor - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - fill - :class:`plotly.graph_objects.table.header.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.header.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - formatsrc - Sets the source reference on Chart Studio Cloud - for `format`. - height - The height of cells. - line - :class:`plotly.graph_objects.table.header.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for `prefix`. - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for `suffix`. - values - Header cell values. `values[m][n]` represents - the value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - Returns ------- plotly.graph_objs.table.Header @@ -350,8 +214,6 @@ def header(self): def header(self, val): self["header"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -368,7 +230,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -376,8 +238,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -397,8 +257,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -408,44 +266,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.table.Hoverlabel @@ -456,8 +276,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # ids - # --- @property def ids(self): """ @@ -470,7 +288,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -478,8 +296,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -498,8 +314,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -523,8 +337,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -534,13 +346,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.table.Legendgrouptitle @@ -551,8 +356,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -578,8 +381,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -599,8 +400,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # meta - # ---- @property def meta(self): """ @@ -619,7 +418,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -627,8 +426,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -647,8 +444,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -669,8 +464,6 @@ def name(self): def name(self, val): self["name"] = val - # stream - # ------ @property def stream(self): """ @@ -680,18 +473,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.table.Stream @@ -702,8 +483,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # uid - # --- @property def uid(self): """ @@ -724,8 +503,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -757,8 +534,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -780,14 +555,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -918,31 +689,31 @@ def _prop_descriptions(self): def __init__( self, arg=None, - cells=None, - columnorder=None, - columnordersrc=None, - columnwidth=None, - columnwidthsrc=None, - customdata=None, - customdatasrc=None, - domain=None, - header=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - ids=None, - idssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - meta=None, - metasrc=None, - name=None, - stream=None, - uid=None, - uirevision=None, - visible=None, + cells: None | None = None, + columnorder: NDArray | None = None, + columnordersrc: str | None = None, + columnwidth: int | float | None = None, + columnwidthsrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + header: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + stream: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -1086,14 +857,11 @@ def __init__( ------- Table """ - super(Table, self).__init__("table") - + super().__init__("table") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1108,124 +876,36 @@ def __init__( an instance of :class:`plotly.graph_objs.Table`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cells", None) - _v = cells if cells is not None else _v - if _v is not None: - self["cells"] = _v - _v = arg.pop("columnorder", None) - _v = columnorder if columnorder is not None else _v - if _v is not None: - self["columnorder"] = _v - _v = arg.pop("columnordersrc", None) - _v = columnordersrc if columnordersrc is not None else _v - if _v is not None: - self["columnordersrc"] = _v - _v = arg.pop("columnwidth", None) - _v = columnwidth if columnwidth is not None else _v - if _v is not None: - self["columnwidth"] = _v - _v = arg.pop("columnwidthsrc", None) - _v = columnwidthsrc if columnwidthsrc is not None else _v - if _v is not None: - self["columnwidthsrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("header", None) - _v = header if header is not None else _v - if _v is not None: - self["header"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("cells", arg, cells) + self._init_provided("columnorder", arg, columnorder) + self._init_provided("columnordersrc", arg, columnordersrc) + self._init_provided("columnwidth", arg, columnwidth) + self._init_provided("columnwidthsrc", arg, columnwidthsrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("domain", arg, domain) + self._init_provided("header", arg, header) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("stream", arg, stream) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) self._props["type"] = "table" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_treemap.py b/plotly/graph_objs/_treemap.py index 3a8ecce44e..db38575e51 100644 --- a/plotly/graph_objs/_treemap.py +++ b/plotly/graph_objs/_treemap.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Treemap(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "treemap" _valid_props = { @@ -60,8 +61,6 @@ class Treemap(_BaseTraceType): "visible", } - # branchvalues - # ------------ @property def branchvalues(self): """ @@ -86,8 +85,6 @@ def branchvalues(self): def branchvalues(self, val): self["branchvalues"] = val - # count - # ----- @property def count(self): """ @@ -110,8 +107,6 @@ def count(self): def count(self, val): self["count"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -125,7 +120,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -133,8 +128,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -154,8 +147,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # domain - # ------ @property def domain(self): """ @@ -165,22 +156,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this treemap trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this treemap trace . - x - Sets the horizontal domain of this treemap - trace (in plot fraction). - y - Sets the vertical domain of this treemap trace - (in plot fraction). - Returns ------- plotly.graph_objs.treemap.Domain @@ -191,8 +166,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -209,7 +182,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -217,8 +190,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -238,8 +209,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -249,44 +218,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.treemap.Hoverlabel @@ -297,8 +228,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -336,7 +265,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -344,8 +273,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -365,8 +292,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -383,7 +308,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -391,8 +316,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -412,8 +335,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -426,7 +347,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -434,8 +355,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -454,8 +373,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -467,79 +384,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.treemap.Insidetextfont @@ -550,8 +394,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # labels - # ------ @property def labels(self): """ @@ -562,7 +404,7 @@ def labels(self): Returns ------- - numpy.ndarray + NDArray """ return self["labels"] @@ -570,8 +412,6 @@ def labels(self): def labels(self, val): self["labels"] = val - # labelssrc - # --------- @property def labelssrc(self): """ @@ -590,8 +430,6 @@ def labelssrc(self): def labelssrc(self, val): self["labelssrc"] = val - # legend - # ------ @property def legend(self): """ @@ -615,8 +453,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -626,13 +462,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.treemap.Legendgrouptitle @@ -643,8 +472,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -670,8 +497,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -691,8 +516,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # level - # ----- @property def level(self): """ @@ -713,8 +536,6 @@ def level(self): def level(self, val): self["level"] = val - # marker - # ------ @property def marker(self): """ @@ -724,114 +545,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colors is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colors is - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colors is set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.treemap.marker.Col - orBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colors is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - cornerradius - Sets the maximum rounding of corners (in px). - depthfade - Determines if the sector colors are faded - towards the background from the leaves up to - the headers. This option is unavailable when a - `colorscale` is present, defaults to false when - `marker.colors` is set, but otherwise defaults - to true. When set to "reversed", the fading - direction is inverted, that is the top elements - within hierarchy are drawn with fully saturated - colors while the leaves are faded towards the - background color. - line - :class:`plotly.graph_objects.treemap.marker.Lin - e` instance or dict with compatible properties - pad - :class:`plotly.graph_objects.treemap.marker.Pad - ` instance or dict with compatible properties - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if colors is set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colors is set to a numerical array. - Returns ------- plotly.graph_objs.treemap.Marker @@ -842,8 +555,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # maxdepth - # -------- @property def maxdepth(self): """ @@ -863,8 +574,6 @@ def maxdepth(self): def maxdepth(self, val): self["maxdepth"] = val - # meta - # ---- @property def meta(self): """ @@ -883,7 +592,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -891,8 +600,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -911,8 +618,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -933,8 +638,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -953,8 +656,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -970,79 +671,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.treemap.Outsidetextfont @@ -1053,8 +681,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # parents - # ------- @property def parents(self): """ @@ -1070,7 +696,7 @@ def parents(self): Returns ------- - numpy.ndarray + NDArray """ return self["parents"] @@ -1078,8 +704,6 @@ def parents(self): def parents(self, val): self["parents"] = val - # parentssrc - # ---------- @property def parentssrc(self): """ @@ -1098,8 +722,6 @@ def parentssrc(self): def parentssrc(self, val): self["parentssrc"] = val - # pathbar - # ------- @property def pathbar(self): """ @@ -1109,25 +731,6 @@ def pathbar(self): - A dict of string/value properties that will be passed to the Pathbar constructor - Supported dict properties: - - edgeshape - Determines which shape is used for edges - between `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used - with 3 pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. - outside the trace `domain` and with one pixel - gap. - Returns ------- plotly.graph_objs.treemap.Pathbar @@ -1138,8 +741,6 @@ def pathbar(self): def pathbar(self, val): self["pathbar"] = val - # root - # ---- @property def root(self): """ @@ -1149,14 +750,6 @@ def root(self): - A dict of string/value properties that will be passed to the Root constructor - Supported dict properties: - - color - sets the color of the root node for a - sunburst/treemap/icicle trace. this has no - effect when a colorscale is used to set the - markers. - Returns ------- plotly.graph_objs.treemap.Root @@ -1167,8 +760,6 @@ def root(self): def root(self, val): self["root"] = val - # sort - # ---- @property def sort(self): """ @@ -1188,8 +779,6 @@ def sort(self): def sort(self, val): self["sort"] = val - # stream - # ------ @property def stream(self): """ @@ -1199,18 +788,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.treemap.Stream @@ -1221,8 +798,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1237,7 +812,7 @@ def text(self): Returns ------- - numpy.ndarray + NDArray """ return self["text"] @@ -1245,8 +820,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1258,79 +831,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.treemap.Textfont @@ -1341,8 +841,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1364,8 +862,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1387,8 +883,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1407,8 +901,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1435,7 +927,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1443,8 +935,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1464,8 +954,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # tiling - # ------ @property def tiling(self): """ @@ -1475,34 +963,6 @@ def tiling(self): - A dict of string/value properties that will be passed to the Tiling constructor - Supported dict properties: - - flip - Determines if the positions obtained from - solver are flipped on each axis. - packing - Determines d3 treemap solver. For more info - please refer to - https://github.com/d3/d3-hierarchy#treemap- - tiling - pad - Sets the inner padding (in px). - squarifyratio - When using "squarify" `packing` algorithm, - according to https://github.com/d3/d3- - hierarchy/blob/v3.1.1/README.md#squarify_ratio - this option specifies the desired aspect ratio - of the generated rectangles. The ratio must be - specified as a number greater than or equal to - one. Note that the orientation of the generated - rectangles (tall or wide) is not implied by the - ratio; for example, a ratio of two will attempt - to produce a mixture of rectangles whose - width:height ratio is either 2:1 or 1:2. When - using "squarify", unlike d3 which uses the - Golden Ratio i.e. 1.618034, Plotly applies 1 to - increase squares in treemap layouts. - Returns ------- plotly.graph_objs.treemap.Tiling @@ -1513,8 +973,6 @@ def tiling(self): def tiling(self, val): self["tiling"] = val - # uid - # --- @property def uid(self): """ @@ -1535,8 +993,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1568,8 +1024,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # values - # ------ @property def values(self): """ @@ -1581,7 +1035,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -1589,8 +1043,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -1609,8 +1061,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1632,14 +1082,10 @@ def visible(self): def visible(self, val): self["visible"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1899,54 +1345,54 @@ def _prop_descriptions(self): def __init__( self, arg=None, - branchvalues=None, - count=None, - customdata=None, - customdatasrc=None, - domain=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - insidetextfont=None, - labels=None, - labelssrc=None, - legend=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - level=None, - marker=None, - maxdepth=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - outsidetextfont=None, - parents=None, - parentssrc=None, - pathbar=None, - root=None, - sort=None, - stream=None, - text=None, - textfont=None, - textinfo=None, - textposition=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - tiling=None, - uid=None, - uirevision=None, - values=None, - valuessrc=None, - visible=None, + branchvalues: Any | None = None, + count: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + domain: None | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + insidetextfont: None | None = None, + labels: NDArray | None = None, + labelssrc: str | None = None, + legend: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + level: Any | None = None, + marker: None | None = None, + maxdepth: int | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + outsidetextfont: None | None = None, + parents: NDArray | None = None, + parentssrc: str | None = None, + pathbar: None | None = None, + root: None | None = None, + sort: bool | None = None, + stream: None | None = None, + text: NDArray | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + tiling: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -2218,14 +1664,11 @@ def __init__( ------- Treemap """ - super(Treemap, self).__init__("treemap") - + super().__init__("treemap") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2240,216 +1683,59 @@ def __init__( an instance of :class:`plotly.graph_objs.Treemap`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("branchvalues", None) - _v = branchvalues if branchvalues is not None else _v - if _v is not None: - self["branchvalues"] = _v - _v = arg.pop("count", None) - _v = count if count is not None else _v - if _v is not None: - self["count"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("labels", None) - _v = labels if labels is not None else _v - if _v is not None: - self["labels"] = _v - _v = arg.pop("labelssrc", None) - _v = labelssrc if labelssrc is not None else _v - if _v is not None: - self["labelssrc"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("level", None) - _v = level if level is not None else _v - if _v is not None: - self["level"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("maxdepth", None) - _v = maxdepth if maxdepth is not None else _v - if _v is not None: - self["maxdepth"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("parents", None) - _v = parents if parents is not None else _v - if _v is not None: - self["parents"] = _v - _v = arg.pop("parentssrc", None) - _v = parentssrc if parentssrc is not None else _v - if _v is not None: - self["parentssrc"] = _v - _v = arg.pop("pathbar", None) - _v = pathbar if pathbar is not None else _v - if _v is not None: - self["pathbar"] = _v - _v = arg.pop("root", None) - _v = root if root is not None else _v - if _v is not None: - self["root"] = _v - _v = arg.pop("sort", None) - _v = sort if sort is not None else _v - if _v is not None: - self["sort"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("tiling", None) - _v = tiling if tiling is not None else _v - if _v is not None: - self["tiling"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Read-only literals - # ------------------ + self._init_provided("branchvalues", arg, branchvalues) + self._init_provided("count", arg, count) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("domain", arg, domain) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("labels", arg, labels) + self._init_provided("labelssrc", arg, labelssrc) + self._init_provided("legend", arg, legend) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("level", arg, level) + self._init_provided("marker", arg, marker) + self._init_provided("maxdepth", arg, maxdepth) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("parents", arg, parents) + self._init_provided("parentssrc", arg, parentssrc) + self._init_provided("pathbar", arg, pathbar) + self._init_provided("root", arg, root) + self._init_provided("sort", arg, sort) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textposition", arg, textposition) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("tiling", arg, tiling) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._props["type"] = "treemap" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_violin.py b/plotly/graph_objs/_violin.py index ffb7362db0..976a0e5b75 100644 --- a/plotly/graph_objs/_violin.py +++ b/plotly/graph_objs/_violin.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Violin(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "violin" _valid_props = { @@ -73,8 +74,6 @@ class Violin(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -96,8 +95,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # bandwidth - # --------- @property def bandwidth(self): """ @@ -118,8 +115,6 @@ def bandwidth(self): def bandwidth(self, val): self["bandwidth"] = val - # box - # --- @property def box(self): """ @@ -129,21 +124,6 @@ def box(self): - A dict of string/value properties that will be passed to the Box constructor - Supported dict properties: - - fillcolor - Sets the inner box plot fill color. - line - :class:`plotly.graph_objects.violin.box.Line` - instance or dict with compatible properties - visible - Determines if an miniature box plot is drawn - inside the violins. - width - Sets the width of the inner box plots relative - to the violins' width. For example, with 1, the - inner box plots are as wide as the violins. - Returns ------- plotly.graph_objs.violin.Box @@ -154,8 +134,6 @@ def box(self): def box(self, val): self["box"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -169,7 +147,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -177,8 +155,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -198,8 +174,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -212,42 +186,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -259,8 +198,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -277,7 +214,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -285,8 +222,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -306,8 +241,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -317,44 +250,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.violin.Hoverlabel @@ -365,8 +260,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hoveron - # ------- @property def hoveron(self): """ @@ -390,8 +283,6 @@ def hoveron(self): def hoveron(self, val): self["hoveron"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -426,7 +317,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -434,8 +325,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -455,8 +344,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -469,7 +356,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -477,8 +364,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -498,8 +383,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -512,7 +395,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -520,8 +403,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -540,8 +421,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # jitter - # ------ @property def jitter(self): """ @@ -563,8 +442,6 @@ def jitter(self): def jitter(self, val): self["jitter"] = val - # legend - # ------ @property def legend(self): """ @@ -588,8 +465,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -611,8 +486,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -622,13 +495,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.violin.Legendgrouptitle @@ -639,8 +505,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -666,8 +530,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -687,8 +549,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -698,14 +558,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the - violin(s). - Returns ------- plotly.graph_objs.violin.Line @@ -716,8 +568,6 @@ def line(self): def line(self, val): self["line"] = val - # marker - # ------ @property def marker(self): """ @@ -727,33 +577,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - angle - Sets the marker angle in respect to `angleref`. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.violin.marker.Line - ` instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - Returns ------- plotly.graph_objs.violin.Marker @@ -764,8 +587,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # meanline - # -------- @property def meanline(self): """ @@ -775,20 +596,6 @@ def meanline(self): - A dict of string/value properties that will be passed to the Meanline constructor - Supported dict properties: - - color - Sets the mean line color. - visible - Determines if a line corresponding to the - sample's mean is shown inside the violins. If - `box.visible` is turned on, the mean line is - drawn inside the inner box. Otherwise, the mean - line is drawn from one side of the violin to - other. - width - Sets the mean line width. - Returns ------- plotly.graph_objs.violin.Meanline @@ -799,8 +606,6 @@ def meanline(self): def meanline(self, val): self["meanline"] = val - # meta - # ---- @property def meta(self): """ @@ -819,7 +624,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -827,8 +632,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -847,8 +650,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -874,8 +675,6 @@ def name(self): def name(self, val): self["name"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -897,8 +696,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # opacity - # ------- @property def opacity(self): """ @@ -917,8 +714,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -939,8 +734,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # pointpos - # -------- @property def pointpos(self): """ @@ -963,8 +756,6 @@ def pointpos(self): def pointpos(self, val): self["pointpos"] = val - # points - # ------ @property def points(self): """ @@ -991,8 +782,6 @@ def points(self): def points(self, val): self["points"] = val - # quartilemethod - # -------------- @property def quartilemethod(self): """ @@ -1023,8 +812,6 @@ def quartilemethod(self): def quartilemethod(self, val): self["quartilemethod"] = val - # scalegroup - # ---------- @property def scalegroup(self): """ @@ -1049,8 +836,6 @@ def scalegroup(self): def scalegroup(self, val): self["scalegroup"] = val - # scalemode - # --------- @property def scalemode(self): """ @@ -1073,8 +858,6 @@ def scalemode(self): def scalemode(self, val): self["scalemode"] = val - # selected - # -------- @property def selected(self): """ @@ -1084,13 +867,6 @@ def selected(self): - A dict of string/value properties that will be passed to the Selected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.violin.selected.Ma - rker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.violin.Selected @@ -1101,8 +877,6 @@ def selected(self): def selected(self, val): self["selected"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1125,8 +899,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1146,8 +918,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # side - # ---- @property def side(self): """ @@ -1170,8 +940,6 @@ def side(self): def side(self, val): self["side"] = val - # span - # ---- @property def span(self): """ @@ -1195,8 +963,6 @@ def span(self): def span(self, val): self["span"] = val - # spanmode - # -------- @property def spanmode(self): """ @@ -1222,8 +988,6 @@ def spanmode(self): def spanmode(self, val): self["spanmode"] = val - # stream - # ------ @property def stream(self): """ @@ -1233,18 +997,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.violin.Stream @@ -1255,8 +1007,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1273,7 +1023,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1281,8 +1031,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1301,8 +1049,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1323,8 +1069,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1356,8 +1100,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # unselected - # ---------- @property def unselected(self): """ @@ -1367,13 +1109,6 @@ def unselected(self): - A dict of string/value properties that will be passed to the Unselected constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.violin.unselected. - Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.violin.Unselected @@ -1384,8 +1119,6 @@ def unselected(self): def unselected(self, val): self["unselected"] = val - # visible - # ------- @property def visible(self): """ @@ -1407,8 +1140,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -1429,8 +1160,6 @@ def width(self): def width(self, val): self["width"] = val - # x - # - @property def x(self): """ @@ -1442,7 +1171,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1450,8 +1179,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1471,8 +1198,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1496,8 +1221,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1527,8 +1250,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1547,8 +1268,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1560,7 +1279,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1568,8 +1287,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -1589,8 +1306,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1614,8 +1329,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1645,8 +1358,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1665,8 +1376,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -1687,14 +1396,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2046,67 +1751,67 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - bandwidth=None, - box=None, - customdata=None, - customdatasrc=None, - fillcolor=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hoveron=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - jitter=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - marker=None, - meanline=None, - meta=None, - metasrc=None, - name=None, - offsetgroup=None, - opacity=None, - orientation=None, - pointpos=None, - points=None, - quartilemethod=None, - scalegroup=None, - scalemode=None, - selected=None, - selectedpoints=None, - showlegend=None, - side=None, - span=None, - spanmode=None, - stream=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - unselected=None, - visible=None, - width=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + bandwidth: int | float | None = None, + box: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + fillcolor: str | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hoveron: Any | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + jitter: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + marker: None | None = None, + meanline: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offsetgroup: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + pointpos: int | float | None = None, + points: Any | None = None, + quartilemethod: Any | None = None, + scalegroup: str | None = None, + scalemode: Any | None = None, + selected: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + side: Any | None = None, + span: list | None = None, + spanmode: Any | None = None, + stream: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + unselected: None | None = None, + visible: Any | None = None, + width: int | float | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -2472,14 +2177,11 @@ def __init__( ------- Violin """ - super(Violin, self).__init__("violin") - + super().__init__("violin") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2494,268 +2196,72 @@ def __init__( an instance of :class:`plotly.graph_objs.Violin`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("bandwidth", None) - _v = bandwidth if bandwidth is not None else _v - if _v is not None: - self["bandwidth"] = _v - _v = arg.pop("box", None) - _v = box if box is not None else _v - if _v is not None: - self["box"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hoveron", None) - _v = hoveron if hoveron is not None else _v - if _v is not None: - self["hoveron"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("jitter", None) - _v = jitter if jitter is not None else _v - if _v is not None: - self["jitter"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("meanline", None) - _v = meanline if meanline is not None else _v - if _v is not None: - self["meanline"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("pointpos", None) - _v = pointpos if pointpos is not None else _v - if _v is not None: - self["pointpos"] = _v - _v = arg.pop("points", None) - _v = points if points is not None else _v - if _v is not None: - self["points"] = _v - _v = arg.pop("quartilemethod", None) - _v = quartilemethod if quartilemethod is not None else _v - if _v is not None: - self["quartilemethod"] = _v - _v = arg.pop("scalegroup", None) - _v = scalegroup if scalegroup is not None else _v - if _v is not None: - self["scalegroup"] = _v - _v = arg.pop("scalemode", None) - _v = scalemode if scalemode is not None else _v - if _v is not None: - self["scalemode"] = _v - _v = arg.pop("selected", None) - _v = selected if selected is not None else _v - if _v is not None: - self["selected"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("span", None) - _v = span if span is not None else _v - if _v is not None: - self["span"] = _v - _v = arg.pop("spanmode", None) - _v = spanmode if spanmode is not None else _v - if _v is not None: - self["spanmode"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("unselected", None) - _v = unselected if unselected is not None else _v - if _v is not None: - self["unselected"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("bandwidth", arg, bandwidth) + self._init_provided("box", arg, box) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hoveron", arg, hoveron) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("jitter", arg, jitter) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("marker", arg, marker) + self._init_provided("meanline", arg, meanline) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("pointpos", arg, pointpos) + self._init_provided("points", arg, points) + self._init_provided("quartilemethod", arg, quartilemethod) + self._init_provided("scalegroup", arg, scalegroup) + self._init_provided("scalemode", arg, scalemode) + self._init_provided("selected", arg, selected) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("side", arg, side) + self._init_provided("span", arg, span) + self._init_provided("spanmode", arg, spanmode) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("unselected", arg, unselected) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "violin" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_volume.py b/plotly/graph_objs/_volume.py index 1c86a41552..3eb2c4ca18 100644 --- a/plotly/graph_objs/_volume.py +++ b/plotly/graph_objs/_volume.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Volume(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "volume" _valid_props = { @@ -73,8 +74,6 @@ class Volume(_BaseTraceType): "zsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -98,8 +97,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # caps - # ---- @property def caps(self): """ @@ -109,18 +106,6 @@ def caps(self): - A dict of string/value properties that will be passed to the Caps constructor - Supported dict properties: - - x - :class:`plotly.graph_objects.volume.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.caps.Z` - instance or dict with compatible properties - Returns ------- plotly.graph_objs.volume.Caps @@ -131,8 +116,6 @@ def caps(self): def caps(self, val): self["caps"] = val - # cauto - # ----- @property def cauto(self): """ @@ -154,8 +137,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -175,8 +156,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -197,8 +176,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -218,8 +195,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -245,8 +220,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -256,272 +229,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.volume. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.volume.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of volume.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.volume.colorbar.Ti - tle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.volume.ColorBar @@ -532,8 +239,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -585,8 +290,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # contour - # ------- @property def contour(self): """ @@ -596,16 +299,6 @@ def contour(self): - A dict of string/value properties that will be passed to the Contour constructor - Supported dict properties: - - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. - Returns ------- plotly.graph_objs.volume.Contour @@ -616,8 +309,6 @@ def contour(self): def contour(self, val): self["contour"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -631,7 +322,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -639,8 +330,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -660,8 +349,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # flatshading - # ----------- @property def flatshading(self): """ @@ -682,8 +369,6 @@ def flatshading(self): def flatshading(self, val): self["flatshading"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -700,7 +385,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -708,8 +393,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -729,8 +412,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -740,44 +421,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.volume.Hoverlabel @@ -788,8 +431,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -824,7 +465,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -832,8 +473,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -853,8 +492,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -867,7 +504,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -875,8 +512,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -896,8 +531,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -910,7 +543,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -918,8 +551,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -938,8 +569,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # isomax - # ------ @property def isomax(self): """ @@ -958,8 +587,6 @@ def isomax(self): def isomax(self, val): self["isomax"] = val - # isomin - # ------ @property def isomin(self): """ @@ -978,8 +605,6 @@ def isomin(self): def isomin(self, val): self["isomin"] = val - # legend - # ------ @property def legend(self): """ @@ -1003,8 +628,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -1026,8 +649,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -1037,13 +658,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.volume.Legendgrouptitle @@ -1054,8 +668,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -1081,8 +693,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -1102,8 +712,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # lighting - # -------- @property def lighting(self): """ @@ -1113,33 +721,6 @@ def lighting(self): - A dict of string/value properties that will be passed to the Lighting constructor - Supported dict properties: - - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. - Returns ------- plotly.graph_objs.volume.Lighting @@ -1150,8 +731,6 @@ def lighting(self): def lighting(self, val): self["lighting"] = val - # lightposition - # ------------- @property def lightposition(self): """ @@ -1161,18 +740,6 @@ def lightposition(self): - A dict of string/value properties that will be passed to the Lightposition constructor - Supported dict properties: - - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. - Returns ------- plotly.graph_objs.volume.Lightposition @@ -1183,8 +750,6 @@ def lightposition(self): def lightposition(self, val): self["lightposition"] = val - # meta - # ---- @property def meta(self): """ @@ -1203,7 +768,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -1211,8 +776,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -1231,8 +794,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -1253,8 +814,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1278,8 +837,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacityscale - # ------------ @property def opacityscale(self): """ @@ -1305,8 +862,6 @@ def opacityscale(self): def opacityscale(self, val): self["opacityscale"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -1327,8 +882,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # scene - # ----- @property def scene(self): """ @@ -1352,8 +905,6 @@ def scene(self): def scene(self, val): self["scene"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1373,8 +924,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # showscale - # --------- @property def showscale(self): """ @@ -1394,8 +943,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # slices - # ------ @property def slices(self): """ @@ -1405,18 +952,6 @@ def slices(self): - A dict of string/value properties that will be passed to the Slices constructor - Supported dict properties: - - x - :class:`plotly.graph_objects.volume.slices.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.slices.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.slices.Z` - instance or dict with compatible properties - Returns ------- plotly.graph_objs.volume.Slices @@ -1427,8 +962,6 @@ def slices(self): def slices(self, val): self["slices"] = val - # spaceframe - # ---------- @property def spaceframe(self): """ @@ -1438,20 +971,6 @@ def spaceframe(self): - A dict of string/value properties that will be passed to the Spaceframe constructor - Supported dict properties: - - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 1 meaning - that they are entirely shaded. Applying a - `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. - Returns ------- plotly.graph_objs.volume.Spaceframe @@ -1462,8 +981,6 @@ def spaceframe(self): def spaceframe(self, val): self["spaceframe"] = val - # stream - # ------ @property def stream(self): """ @@ -1473,18 +990,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.volume.Stream @@ -1495,8 +1000,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # surface - # ------- @property def surface(self): """ @@ -1506,35 +1009,6 @@ def surface(self): - A dict of string/value properties that will be passed to the Surface constructor - Supported dict properties: - - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. - Returns ------- plotly.graph_objs.volume.Surface @@ -1545,8 +1019,6 @@ def surface(self): def surface(self, val): self["surface"] = val - # text - # ---- @property def text(self): """ @@ -1561,7 +1033,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1569,8 +1041,6 @@ def text(self): def text(self, val): self["text"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1589,8 +1059,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # uid - # --- @property def uid(self): """ @@ -1611,8 +1079,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1644,8 +1110,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # value - # ----- @property def value(self): """ @@ -1656,7 +1120,7 @@ def value(self): Returns ------- - numpy.ndarray + NDArray """ return self["value"] @@ -1664,8 +1128,6 @@ def value(self): def value(self, val): self["value"] = val - # valuehoverformat - # ---------------- @property def valuehoverformat(self): """ @@ -1689,8 +1151,6 @@ def valuehoverformat(self): def valuehoverformat(self, val): self["valuehoverformat"] = val - # valuesrc - # -------- @property def valuesrc(self): """ @@ -1709,8 +1169,6 @@ def valuesrc(self): def valuesrc(self, val): self["valuesrc"] = val - # visible - # ------- @property def visible(self): """ @@ -1732,8 +1190,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -1744,7 +1200,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1752,8 +1208,6 @@ def x(self): def x(self, val): self["x"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1783,8 +1237,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1803,8 +1255,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1815,7 +1265,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1823,8 +1273,6 @@ def y(self): def y(self, val): self["y"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1854,8 +1302,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -1874,8 +1320,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -1886,7 +1330,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -1894,8 +1338,6 @@ def z(self): def z(self, val): self["z"] = val - # zhoverformat - # ------------ @property def zhoverformat(self): """ @@ -1925,8 +1367,6 @@ def zhoverformat(self): def zhoverformat(self, val): self["zhoverformat"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -1945,14 +1385,10 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2283,67 +1719,67 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - caps=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colorscale=None, - contour=None, - customdata=None, - customdatasrc=None, - flatshading=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - isomax=None, - isomin=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - lighting=None, - lightposition=None, - meta=None, - metasrc=None, - name=None, - opacity=None, - opacityscale=None, - reversescale=None, - scene=None, - showlegend=None, - showscale=None, - slices=None, - spaceframe=None, - stream=None, - surface=None, - text=None, - textsrc=None, - uid=None, - uirevision=None, - value=None, - valuehoverformat=None, - valuesrc=None, - visible=None, - x=None, - xhoverformat=None, - xsrc=None, - y=None, - yhoverformat=None, - ysrc=None, - z=None, - zhoverformat=None, - zsrc=None, + autocolorscale: bool | None = None, + caps: None | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + contour: None | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + flatshading: bool | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + isomax: int | float | None = None, + isomin: int | float | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + lighting: None | None = None, + lightposition: None | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + opacityscale: Any | None = None, + reversescale: bool | None = None, + scene: str | None = None, + showlegend: bool | None = None, + showscale: bool | None = None, + slices: None | None = None, + spaceframe: None | None = None, + stream: None | None = None, + surface: None | None = None, + text: str | None = None, + textsrc: str | None = None, + uid: str | None = None, + uirevision: Any | None = None, + value: NDArray | None = None, + valuehoverformat: str | None = None, + valuesrc: str | None = None, + visible: Any | None = None, + x: NDArray | None = None, + xhoverformat: str | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + yhoverformat: str | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zhoverformat: str | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -2688,14 +2124,11 @@ def __init__( ------- Volume """ - super(Volume, self).__init__("volume") - + super().__init__("volume") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2710,268 +2143,72 @@ def __init__( an instance of :class:`plotly.graph_objs.Volume`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("caps", None) - _v = caps if caps is not None else _v - if _v is not None: - self["caps"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("contour", None) - _v = contour if contour is not None else _v - if _v is not None: - self["contour"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("flatshading", None) - _v = flatshading if flatshading is not None else _v - if _v is not None: - self["flatshading"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("isomax", None) - _v = isomax if isomax is not None else _v - if _v is not None: - self["isomax"] = _v - _v = arg.pop("isomin", None) - _v = isomin if isomin is not None else _v - if _v is not None: - self["isomin"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("lighting", None) - _v = lighting if lighting is not None else _v - if _v is not None: - self["lighting"] = _v - _v = arg.pop("lightposition", None) - _v = lightposition if lightposition is not None else _v - if _v is not None: - self["lightposition"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacityscale", None) - _v = opacityscale if opacityscale is not None else _v - if _v is not None: - self["opacityscale"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("scene", None) - _v = scene if scene is not None else _v - if _v is not None: - self["scene"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("slices", None) - _v = slices if slices is not None else _v - if _v is not None: - self["slices"] = _v - _v = arg.pop("spaceframe", None) - _v = spaceframe if spaceframe is not None else _v - if _v is not None: - self["spaceframe"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("surface", None) - _v = surface if surface is not None else _v - if _v is not None: - self["surface"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valuehoverformat", None) - _v = valuehoverformat if valuehoverformat is not None else _v - if _v is not None: - self["valuehoverformat"] = _v - _v = arg.pop("valuesrc", None) - _v = valuesrc if valuesrc is not None else _v - if _v is not None: - self["valuesrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zhoverformat", None) - _v = zhoverformat if zhoverformat is not None else _v - if _v is not None: - self["zhoverformat"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Read-only literals - # ------------------ + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("caps", arg, caps) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("contour", arg, contour) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("flatshading", arg, flatshading) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("isomax", arg, isomax) + self._init_provided("isomin", arg, isomin) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("lighting", arg, lighting) + self._init_provided("lightposition", arg, lightposition) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacityscale", arg, opacityscale) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("scene", arg, scene) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("showscale", arg, showscale) + self._init_provided("slices", arg, slices) + self._init_provided("spaceframe", arg, spaceframe) + self._init_provided("stream", arg, stream) + self._init_provided("surface", arg, surface) + self._init_provided("text", arg, text) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("value", arg, value) + self._init_provided("valuehoverformat", arg, valuehoverformat) + self._init_provided("valuesrc", arg, valuesrc) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zhoverformat", arg, zhoverformat) + self._init_provided("zsrc", arg, zsrc) self._props["type"] = "volume" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/_waterfall.py b/plotly/graph_objs/_waterfall.py index 42767a089d..9133a78401 100644 --- a/plotly/graph_objs/_waterfall.py +++ b/plotly/graph_objs/_waterfall.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Waterfall(_BaseTraceType): - # class properties - # -------------------- _parent_path_str = "" _path_str = "waterfall" _valid_props = { @@ -85,8 +86,6 @@ class Waterfall(_BaseTraceType): "zorder", } - # alignmentgroup - # -------------- @property def alignmentgroup(self): """ @@ -108,8 +107,6 @@ def alignmentgroup(self): def alignmentgroup(self, val): self["alignmentgroup"] = val - # base - # ---- @property def base(self): """ @@ -128,8 +125,6 @@ def base(self): def base(self, val): self["base"] = val - # cliponaxis - # ---------- @property def cliponaxis(self): """ @@ -151,8 +146,6 @@ def cliponaxis(self): def cliponaxis(self, val): self["cliponaxis"] = val - # connector - # --------- @property def connector(self): """ @@ -162,17 +155,6 @@ def connector(self): - A dict of string/value properties that will be passed to the Connector constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.waterfall.connecto - r.Line` instance or dict with compatible - properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. - Returns ------- plotly.graph_objs.waterfall.Connector @@ -183,8 +165,6 @@ def connector(self): def connector(self, val): self["connector"] = val - # constraintext - # ------------- @property def constraintext(self): """ @@ -205,8 +185,6 @@ def constraintext(self): def constraintext(self, val): self["constraintext"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -220,7 +198,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -228,8 +206,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -249,8 +225,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # decreasing - # ---------- @property def decreasing(self): """ @@ -260,13 +234,6 @@ def decreasing(self): - A dict of string/value properties that will be passed to the Decreasing constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.waterfall.decreasi - ng.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.waterfall.Decreasing @@ -277,8 +244,6 @@ def decreasing(self): def decreasing(self, val): self["decreasing"] = val - # dx - # -- @property def dx(self): """ @@ -297,8 +262,6 @@ def dx(self): def dx(self, val): self["dx"] = val - # dy - # -- @property def dy(self): """ @@ -317,8 +280,6 @@ def dy(self): def dy(self, val): self["dy"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -335,7 +296,7 @@ def hoverinfo(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["hoverinfo"] @@ -343,8 +304,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverinfosrc - # ------------ @property def hoverinfosrc(self): """ @@ -364,8 +323,6 @@ def hoverinfosrc(self): def hoverinfosrc(self, val): self["hoverinfosrc"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -375,44 +332,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.waterfall.Hoverlabel @@ -423,8 +342,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -461,7 +378,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -469,8 +386,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -490,8 +405,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -508,7 +421,7 @@ def hovertext(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertext"] @@ -516,8 +429,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # hovertextsrc - # ------------ @property def hovertextsrc(self): """ @@ -537,8 +448,6 @@ def hovertextsrc(self): def hovertextsrc(self, val): self["hovertextsrc"] = val - # ids - # --- @property def ids(self): """ @@ -551,7 +460,7 @@ def ids(self): Returns ------- - numpy.ndarray + NDArray """ return self["ids"] @@ -559,8 +468,6 @@ def ids(self): def ids(self, val): self["ids"] = val - # idssrc - # ------ @property def idssrc(self): """ @@ -579,8 +486,6 @@ def idssrc(self): def idssrc(self, val): self["idssrc"] = val - # increasing - # ---------- @property def increasing(self): """ @@ -590,13 +495,6 @@ def increasing(self): - A dict of string/value properties that will be passed to the Increasing constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.waterfall.increasi - ng.Marker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.waterfall.Increasing @@ -607,8 +505,6 @@ def increasing(self): def increasing(self, val): self["increasing"] = val - # insidetextanchor - # ---------------- @property def insidetextanchor(self): """ @@ -629,8 +525,6 @@ def insidetextanchor(self): def insidetextanchor(self, val): self["insidetextanchor"] = val - # insidetextfont - # -------------- @property def insidetextfont(self): """ @@ -642,79 +536,6 @@ def insidetextfont(self): - A dict of string/value properties that will be passed to the Insidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.waterfall.Insidetextfont @@ -725,8 +546,6 @@ def insidetextfont(self): def insidetextfont(self, val): self["insidetextfont"] = val - # legend - # ------ @property def legend(self): """ @@ -750,8 +569,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -773,8 +590,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -784,13 +599,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.waterfall.Legendgrouptitle @@ -801,8 +609,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -828,8 +634,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -849,8 +653,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # measure - # ------- @property def measure(self): """ @@ -865,7 +667,7 @@ def measure(self): Returns ------- - numpy.ndarray + NDArray """ return self["measure"] @@ -873,8 +675,6 @@ def measure(self): def measure(self, val): self["measure"] = val - # measuresrc - # ---------- @property def measuresrc(self): """ @@ -893,8 +693,6 @@ def measuresrc(self): def measuresrc(self, val): self["measuresrc"] = val - # meta - # ---- @property def meta(self): """ @@ -913,7 +711,7 @@ def meta(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["meta"] @@ -921,8 +719,6 @@ def meta(self): def meta(self, val): self["meta"] = val - # metasrc - # ------- @property def metasrc(self): """ @@ -941,8 +737,6 @@ def metasrc(self): def metasrc(self, val): self["metasrc"] = val - # name - # ---- @property def name(self): """ @@ -963,8 +757,6 @@ def name(self): def name(self, val): self["name"] = val - # offset - # ------ @property def offset(self): """ @@ -978,7 +770,7 @@ def offset(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["offset"] @@ -986,8 +778,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # offsetgroup - # ----------- @property def offsetgroup(self): """ @@ -1009,8 +799,6 @@ def offsetgroup(self): def offsetgroup(self, val): self["offsetgroup"] = val - # offsetsrc - # --------- @property def offsetsrc(self): """ @@ -1029,8 +817,6 @@ def offsetsrc(self): def offsetsrc(self, val): self["offsetsrc"] = val - # opacity - # ------- @property def opacity(self): """ @@ -1049,8 +835,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -1071,8 +855,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outsidetextfont - # --------------- @property def outsidetextfont(self): """ @@ -1084,79 +866,6 @@ def outsidetextfont(self): - A dict of string/value properties that will be passed to the Outsidetextfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.waterfall.Outsidetextfont @@ -1167,8 +876,6 @@ def outsidetextfont(self): def outsidetextfont(self, val): self["outsidetextfont"] = val - # selectedpoints - # -------------- @property def selectedpoints(self): """ @@ -1191,8 +898,6 @@ def selectedpoints(self): def selectedpoints(self, val): self["selectedpoints"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -1212,8 +917,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # stream - # ------ @property def stream(self): """ @@ -1223,18 +926,6 @@ def stream(self): - A dict of string/value properties that will be passed to the Stream constructor - Supported dict properties: - - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. - Returns ------- plotly.graph_objs.waterfall.Stream @@ -1245,8 +936,6 @@ def stream(self): def stream(self, val): self["stream"] = val - # text - # ---- @property def text(self): """ @@ -1264,7 +953,7 @@ def text(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["text"] @@ -1272,8 +961,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -1297,8 +984,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # textfont - # -------- @property def textfont(self): """ @@ -1310,79 +995,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.waterfall.Textfont @@ -1393,8 +1005,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textinfo - # -------- @property def textinfo(self): """ @@ -1418,8 +1028,6 @@ def textinfo(self): def textinfo(self, val): self["textinfo"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -1439,7 +1047,7 @@ def textposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textposition"] @@ -1447,8 +1055,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # textpositionsrc - # --------------- @property def textpositionsrc(self): """ @@ -1468,8 +1074,6 @@ def textpositionsrc(self): def textpositionsrc(self, val): self["textpositionsrc"] = val - # textsrc - # ------- @property def textsrc(self): """ @@ -1488,8 +1092,6 @@ def textsrc(self): def textsrc(self, val): self["textsrc"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -1515,7 +1117,7 @@ def texttemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["texttemplate"] @@ -1523,8 +1125,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # texttemplatesrc - # --------------- @property def texttemplatesrc(self): """ @@ -1544,8 +1144,6 @@ def texttemplatesrc(self): def texttemplatesrc(self, val): self["texttemplatesrc"] = val - # totals - # ------ @property def totals(self): """ @@ -1555,13 +1153,6 @@ def totals(self): - A dict of string/value properties that will be passed to the Totals constructor - Supported dict properties: - - marker - :class:`plotly.graph_objects.waterfall.totals.M - arker` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.waterfall.Totals @@ -1572,8 +1163,6 @@ def totals(self): def totals(self, val): self["totals"] = val - # uid - # --- @property def uid(self): """ @@ -1594,8 +1183,6 @@ def uid(self): def uid(self, val): self["uid"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1627,8 +1214,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1650,8 +1235,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -1663,7 +1246,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -1671,8 +1254,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -1691,8 +1272,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # x - # - @property def x(self): """ @@ -1703,7 +1282,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -1711,8 +1290,6 @@ def x(self): def x(self, val): self["x"] = val - # x0 - # -- @property def x0(self): """ @@ -1732,8 +1309,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -1757,8 +1332,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # xhoverformat - # ------------ @property def xhoverformat(self): """ @@ -1788,8 +1361,6 @@ def xhoverformat(self): def xhoverformat(self, val): self["xhoverformat"] = val - # xperiod - # ------- @property def xperiod(self): """ @@ -1810,8 +1381,6 @@ def xperiod(self): def xperiod(self, val): self["xperiod"] = val - # xperiod0 - # -------- @property def xperiod0(self): """ @@ -1833,8 +1402,6 @@ def xperiod0(self): def xperiod0(self, val): self["xperiod0"] = val - # xperiodalignment - # ---------------- @property def xperiodalignment(self): """ @@ -1855,8 +1422,6 @@ def xperiodalignment(self): def xperiodalignment(self, val): self["xperiodalignment"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -1875,8 +1440,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -1887,7 +1450,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -1895,8 +1458,6 @@ def y(self): def y(self, val): self["y"] = val - # y0 - # -- @property def y0(self): """ @@ -1916,8 +1477,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -1941,8 +1500,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # yhoverformat - # ------------ @property def yhoverformat(self): """ @@ -1972,8 +1529,6 @@ def yhoverformat(self): def yhoverformat(self, val): self["yhoverformat"] = val - # yperiod - # ------- @property def yperiod(self): """ @@ -1994,8 +1549,6 @@ def yperiod(self): def yperiod(self, val): self["yperiod"] = val - # yperiod0 - # -------- @property def yperiod0(self): """ @@ -2017,8 +1570,6 @@ def yperiod0(self): def yperiod0(self, val): self["yperiod0"] = val - # yperiodalignment - # ---------------- @property def yperiodalignment(self): """ @@ -2039,8 +1590,6 @@ def yperiodalignment(self): def yperiodalignment(self, val): self["yperiodalignment"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -2059,8 +1608,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # zorder - # ------ @property def zorder(self): """ @@ -2081,14 +1628,10 @@ def zorder(self): def zorder(self, val): self["zorder"] = val - # type - # ---- @property def type(self): return self._props["type"] - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -2470,79 +2013,79 @@ def _prop_descriptions(self): def __init__( self, arg=None, - alignmentgroup=None, - base=None, - cliponaxis=None, - connector=None, - constraintext=None, - customdata=None, - customdatasrc=None, - decreasing=None, - dx=None, - dy=None, - hoverinfo=None, - hoverinfosrc=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - hovertext=None, - hovertextsrc=None, - ids=None, - idssrc=None, - increasing=None, - insidetextanchor=None, - insidetextfont=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - measure=None, - measuresrc=None, - meta=None, - metasrc=None, - name=None, - offset=None, - offsetgroup=None, - offsetsrc=None, - opacity=None, - orientation=None, - outsidetextfont=None, - selectedpoints=None, - showlegend=None, - stream=None, - text=None, - textangle=None, - textfont=None, - textinfo=None, - textposition=None, - textpositionsrc=None, - textsrc=None, - texttemplate=None, - texttemplatesrc=None, - totals=None, - uid=None, - uirevision=None, - visible=None, - width=None, - widthsrc=None, - x=None, - x0=None, - xaxis=None, - xhoverformat=None, - xperiod=None, - xperiod0=None, - xperiodalignment=None, - xsrc=None, - y=None, - y0=None, - yaxis=None, - yhoverformat=None, - yperiod=None, - yperiod0=None, - yperiodalignment=None, - ysrc=None, - zorder=None, + alignmentgroup: str | None = None, + base: int | float | None = None, + cliponaxis: bool | None = None, + connector: None | None = None, + constraintext: Any | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + decreasing: None | None = None, + dx: int | float | None = None, + dy: int | float | None = None, + hoverinfo: Any | None = None, + hoverinfosrc: str | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + hovertext: str | None = None, + hovertextsrc: str | None = None, + ids: NDArray | None = None, + idssrc: str | None = None, + increasing: None | None = None, + insidetextanchor: Any | None = None, + insidetextfont: None | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + measure: NDArray | None = None, + measuresrc: str | None = None, + meta: Any | None = None, + metasrc: str | None = None, + name: str | None = None, + offset: int | float | None = None, + offsetgroup: str | None = None, + offsetsrc: str | None = None, + opacity: int | float | None = None, + orientation: Any | None = None, + outsidetextfont: None | None = None, + selectedpoints: Any | None = None, + showlegend: bool | None = None, + stream: None | None = None, + text: str | None = None, + textangle: int | float | None = None, + textfont: None | None = None, + textinfo: Any | None = None, + textposition: Any | None = None, + textpositionsrc: str | None = None, + textsrc: str | None = None, + texttemplate: str | None = None, + texttemplatesrc: str | None = None, + totals: None | None = None, + uid: str | None = None, + uirevision: Any | None = None, + visible: Any | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + x: NDArray | None = None, + x0: Any | None = None, + xaxis: str | None = None, + xhoverformat: str | None = None, + xperiod: Any | None = None, + xperiod0: Any | None = None, + xperiodalignment: Any | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + y0: Any | None = None, + yaxis: str | None = None, + yhoverformat: str | None = None, + yperiod: Any | None = None, + yperiod0: Any | None = None, + yperiodalignment: Any | None = None, + ysrc: str | None = None, + zorder: int | None = None, **kwargs, ): """ @@ -2938,14 +2481,11 @@ def __init__( ------- Waterfall """ - super(Waterfall, self).__init__("waterfall") - + super().__init__("waterfall") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2960,316 +2500,84 @@ def __init__( an instance of :class:`plotly.graph_objs.Waterfall`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("alignmentgroup", None) - _v = alignmentgroup if alignmentgroup is not None else _v - if _v is not None: - self["alignmentgroup"] = _v - _v = arg.pop("base", None) - _v = base if base is not None else _v - if _v is not None: - self["base"] = _v - _v = arg.pop("cliponaxis", None) - _v = cliponaxis if cliponaxis is not None else _v - if _v is not None: - self["cliponaxis"] = _v - _v = arg.pop("connector", None) - _v = connector if connector is not None else _v - if _v is not None: - self["connector"] = _v - _v = arg.pop("constraintext", None) - _v = constraintext if constraintext is not None else _v - if _v is not None: - self["constraintext"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("decreasing", None) - _v = decreasing if decreasing is not None else _v - if _v is not None: - self["decreasing"] = _v - _v = arg.pop("dx", None) - _v = dx if dx is not None else _v - if _v is not None: - self["dx"] = _v - _v = arg.pop("dy", None) - _v = dy if dy is not None else _v - if _v is not None: - self["dy"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverinfosrc", None) - _v = hoverinfosrc if hoverinfosrc is not None else _v - if _v is not None: - self["hoverinfosrc"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("hovertextsrc", None) - _v = hovertextsrc if hovertextsrc is not None else _v - if _v is not None: - self["hovertextsrc"] = _v - _v = arg.pop("ids", None) - _v = ids if ids is not None else _v - if _v is not None: - self["ids"] = _v - _v = arg.pop("idssrc", None) - _v = idssrc if idssrc is not None else _v - if _v is not None: - self["idssrc"] = _v - _v = arg.pop("increasing", None) - _v = increasing if increasing is not None else _v - if _v is not None: - self["increasing"] = _v - _v = arg.pop("insidetextanchor", None) - _v = insidetextanchor if insidetextanchor is not None else _v - if _v is not None: - self["insidetextanchor"] = _v - _v = arg.pop("insidetextfont", None) - _v = insidetextfont if insidetextfont is not None else _v - if _v is not None: - self["insidetextfont"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("measure", None) - _v = measure if measure is not None else _v - if _v is not None: - self["measure"] = _v - _v = arg.pop("measuresrc", None) - _v = measuresrc if measuresrc is not None else _v - if _v is not None: - self["measuresrc"] = _v - _v = arg.pop("meta", None) - _v = meta if meta is not None else _v - if _v is not None: - self["meta"] = _v - _v = arg.pop("metasrc", None) - _v = metasrc if metasrc is not None else _v - if _v is not None: - self["metasrc"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("offsetgroup", None) - _v = offsetgroup if offsetgroup is not None else _v - if _v is not None: - self["offsetgroup"] = _v - _v = arg.pop("offsetsrc", None) - _v = offsetsrc if offsetsrc is not None else _v - if _v is not None: - self["offsetsrc"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outsidetextfont", None) - _v = outsidetextfont if outsidetextfont is not None else _v - if _v is not None: - self["outsidetextfont"] = _v - _v = arg.pop("selectedpoints", None) - _v = selectedpoints if selectedpoints is not None else _v - if _v is not None: - self["selectedpoints"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("stream", None) - _v = stream if stream is not None else _v - if _v is not None: - self["stream"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textinfo", None) - _v = textinfo if textinfo is not None else _v - if _v is not None: - self["textinfo"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("textpositionsrc", None) - _v = textpositionsrc if textpositionsrc is not None else _v - if _v is not None: - self["textpositionsrc"] = _v - _v = arg.pop("textsrc", None) - _v = textsrc if textsrc is not None else _v - if _v is not None: - self["textsrc"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("texttemplatesrc", None) - _v = texttemplatesrc if texttemplatesrc is not None else _v - if _v is not None: - self["texttemplatesrc"] = _v - _v = arg.pop("totals", None) - _v = totals if totals is not None else _v - if _v is not None: - self["totals"] = _v - _v = arg.pop("uid", None) - _v = uid if uid is not None else _v - if _v is not None: - self["uid"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("xhoverformat", None) - _v = xhoverformat if xhoverformat is not None else _v - if _v is not None: - self["xhoverformat"] = _v - _v = arg.pop("xperiod", None) - _v = xperiod if xperiod is not None else _v - if _v is not None: - self["xperiod"] = _v - _v = arg.pop("xperiod0", None) - _v = xperiod0 if xperiod0 is not None else _v - if _v is not None: - self["xperiod0"] = _v - _v = arg.pop("xperiodalignment", None) - _v = xperiodalignment if xperiodalignment is not None else _v - if _v is not None: - self["xperiodalignment"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("yhoverformat", None) - _v = yhoverformat if yhoverformat is not None else _v - if _v is not None: - self["yhoverformat"] = _v - _v = arg.pop("yperiod", None) - _v = yperiod if yperiod is not None else _v - if _v is not None: - self["yperiod"] = _v - _v = arg.pop("yperiod0", None) - _v = yperiod0 if yperiod0 is not None else _v - if _v is not None: - self["yperiod0"] = _v - _v = arg.pop("yperiodalignment", None) - _v = yperiodalignment if yperiodalignment is not None else _v - if _v is not None: - self["yperiodalignment"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("zorder", None) - _v = zorder if zorder is not None else _v - if _v is not None: - self["zorder"] = _v - - # Read-only literals - # ------------------ + self._init_provided("alignmentgroup", arg, alignmentgroup) + self._init_provided("base", arg, base) + self._init_provided("cliponaxis", arg, cliponaxis) + self._init_provided("connector", arg, connector) + self._init_provided("constraintext", arg, constraintext) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("decreasing", arg, decreasing) + self._init_provided("dx", arg, dx) + self._init_provided("dy", arg, dy) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverinfosrc", arg, hoverinfosrc) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("hovertextsrc", arg, hovertextsrc) + self._init_provided("ids", arg, ids) + self._init_provided("idssrc", arg, idssrc) + self._init_provided("increasing", arg, increasing) + self._init_provided("insidetextanchor", arg, insidetextanchor) + self._init_provided("insidetextfont", arg, insidetextfont) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("measure", arg, measure) + self._init_provided("measuresrc", arg, measuresrc) + self._init_provided("meta", arg, meta) + self._init_provided("metasrc", arg, metasrc) + self._init_provided("name", arg, name) + self._init_provided("offset", arg, offset) + self._init_provided("offsetgroup", arg, offsetgroup) + self._init_provided("offsetsrc", arg, offsetsrc) + self._init_provided("opacity", arg, opacity) + self._init_provided("orientation", arg, orientation) + self._init_provided("outsidetextfont", arg, outsidetextfont) + self._init_provided("selectedpoints", arg, selectedpoints) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("stream", arg, stream) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("textfont", arg, textfont) + self._init_provided("textinfo", arg, textinfo) + self._init_provided("textposition", arg, textposition) + self._init_provided("textpositionsrc", arg, textpositionsrc) + self._init_provided("textsrc", arg, textsrc) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("texttemplatesrc", arg, texttemplatesrc) + self._init_provided("totals", arg, totals) + self._init_provided("uid", arg, uid) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) + self._init_provided("x", arg, x) + self._init_provided("x0", arg, x0) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("xhoverformat", arg, xhoverformat) + self._init_provided("xperiod", arg, xperiod) + self._init_provided("xperiod0", arg, xperiod0) + self._init_provided("xperiodalignment", arg, xperiodalignment) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("y0", arg, y0) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("yhoverformat", arg, yhoverformat) + self._init_provided("yperiod", arg, yperiod) + self._init_provided("yperiod0", arg, yperiod0) + self._init_provided("yperiodalignment", arg, yperiodalignment) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("zorder", arg, zorder) self._props["type"] = "waterfall" arg.pop("type", None) - - # Process unknown kwargs - # ---------------------- self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/__init__.py b/plotly/graph_objs/bar/__init__.py index 7a342c0d56..3d2c5be92b 100644 --- a/plotly/graph_objs/bar/__init__.py +++ b/plotly/graph_objs/bar/__init__.py @@ -1,40 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._error_x import ErrorX - from ._error_y import ErrorY - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._error_x.ErrorX", - "._error_y.ErrorY", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._error_x.ErrorX", + "._error_y.ErrorY", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/bar/_error_x.py b/plotly/graph_objs/bar/_error_x.py index b83b39034b..4b4cd57087 100644 --- a/plotly/graph_objs/bar/_error_x.py +++ b/plotly/graph_objs/bar/_error_x.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorX(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.error_x" _valid_props = { @@ -26,8 +27,6 @@ class ErrorX(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -39,7 +38,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -47,8 +46,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -61,7 +58,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -69,8 +66,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -90,8 +85,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -110,8 +103,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -122,42 +113,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +125,6 @@ def color(self): def color(self, val): self["color"] = val - # copy_ystyle - # ----------- @property def copy_ystyle(self): """ @@ -187,8 +141,6 @@ def copy_ystyle(self): def copy_ystyle(self, val): self["copy_ystyle"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -209,8 +161,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -229,8 +179,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -248,8 +196,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -267,13 +213,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -294,8 +238,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -316,8 +258,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -339,8 +279,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -359,8 +297,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -380,8 +316,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -416,7 +350,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -445,21 +379,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + copy_ystyle: bool | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -501,7 +435,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -530,14 +464,11 @@ def __init__( ------- ErrorX """ - super(ErrorX, self).__init__("error_x") - + super().__init__("error_x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -552,78 +483,23 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.ErrorX`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("copy_ystyle", None) - _v = copy_ystyle if copy_ystyle is not None else _v - if _v is not None: - self["copy_ystyle"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("copy_ystyle", arg, copy_ystyle) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_error_y.py b/plotly/graph_objs/bar/_error_y.py index c6b3d93917..62e73b2888 100644 --- a/plotly/graph_objs/bar/_error_y.py +++ b/plotly/graph_objs/bar/_error_y.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorY(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.error_y" _valid_props = { @@ -25,8 +26,6 @@ class ErrorY(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -38,7 +37,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -46,8 +45,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -60,7 +57,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -68,8 +65,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -89,8 +84,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -109,8 +102,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -121,42 +112,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -168,8 +124,6 @@ def color(self): def color(self, val): self["color"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -190,8 +144,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -210,8 +162,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -229,8 +179,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -248,13 +196,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -275,8 +221,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -297,8 +241,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -320,8 +262,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -340,8 +280,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -361,8 +299,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -395,7 +331,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -424,20 +360,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -477,7 +413,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -506,14 +442,11 @@ def __init__( ------- ErrorY """ - super(ErrorY, self).__init__("error_y") - + super().__init__("error_y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -528,74 +461,22 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.ErrorY`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_hoverlabel.py b/plotly/graph_objs/bar/_hoverlabel.py index c3176a3f1a..5070e70668 100644 --- a/plotly/graph_objs/bar/_hoverlabel.py +++ b/plotly/graph_objs/bar/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.bar.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_insidetextfont.py b/plotly/graph_objs/bar/_insidetextfont.py index 6ee256b05e..23107a6bb6 100644 --- a/plotly/graph_objs/bar/_insidetextfont.py +++ b/plotly/graph_objs/bar/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_legendgrouptitle.py b/plotly/graph_objs/bar/_legendgrouptitle.py index 04d4ea9812..ba96a68fcf 100644 --- a/plotly/graph_objs/bar/_legendgrouptitle.py +++ b/plotly/graph_objs/bar/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.bar.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_marker.py b/plotly/graph_objs/bar/_marker.py index 6af1d5c021..37ff2c7fea 100644 --- a/plotly/graph_objs/bar/_marker.py +++ b/plotly/graph_objs/bar/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.marker" _valid_props = { @@ -28,8 +29,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -54,8 +53,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -79,8 +76,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -102,8 +97,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -126,8 +119,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -149,8 +140,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -164,49 +153,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to bar.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -214,8 +168,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -241,8 +193,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -252,272 +202,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.bar.mar - ker.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.bar.marker.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of bar.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.bar.marker.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.bar.marker.ColorBar @@ -528,8 +212,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -582,8 +264,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -602,8 +282,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # cornerradius - # ------------ @property def cornerradius(self): """ @@ -625,8 +303,6 @@ def cornerradius(self): def cornerradius(self, val): self["cornerradius"] = val - # line - # ---- @property def line(self): """ @@ -636,98 +312,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.bar.marker.Line @@ -738,8 +322,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -751,7 +333,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -759,8 +341,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -779,8 +359,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # pattern - # ------- @property def pattern(self): """ @@ -792,57 +370,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.bar.marker.Pattern @@ -853,8 +380,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -876,8 +401,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -898,8 +421,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1000,23 +521,23 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - cornerradius=None, - line=None, - opacity=None, - opacitysrc=None, - pattern=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + cornerradius: Any | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + pattern: None | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -1124,14 +645,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1146,86 +664,25 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("cornerradius", None) - _v = cornerradius if cornerradius is not None else _v - if _v is not None: - self["cornerradius"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("cornerradius", arg, cornerradius) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("pattern", arg, pattern) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_outsidetextfont.py b/plotly/graph_objs/bar/_outsidetextfont.py index 3f549b619c..5947ed43eb 100644 --- a/plotly/graph_objs/bar/_outsidetextfont.py +++ b/plotly/graph_objs/bar/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_selected.py b/plotly/graph_objs/bar/_selected.py index 2cacdf125c..161b1a1a3c 100644 --- a/plotly/graph_objs/bar/_selected.py +++ b/plotly/graph_objs/bar/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,13 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - Returns ------- plotly.graph_objs.bar.selected.Marker @@ -38,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -49,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.bar.selected.Textfont @@ -64,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +60,13 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -97,14 +86,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -119,26 +105,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_stream.py b/plotly/graph_objs/bar/_stream.py index 5b276e2eee..0a6d5d0311 100644 --- a/plotly/graph_objs/bar/_stream.py +++ b/plotly/graph_objs/bar/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_textfont.py b/plotly/graph_objs/bar/_textfont.py index 0dfa461b5a..f35ed91b03 100644 --- a/plotly/graph_objs/bar/_textfont.py +++ b/plotly/graph_objs/bar/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -575,18 +489,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -638,14 +545,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -660,90 +564,26 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/_unselected.py b/plotly/graph_objs/bar/_unselected.py index cac2eb4462..2721e2187f 100644 --- a/plotly/graph_objs/bar/_unselected.py +++ b/plotly/graph_objs/bar/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar" _path_str = "bar.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.bar.unselected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.bar.unselected.Textfont @@ -67,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +60,13 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -101,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -123,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/hoverlabel/__init__.py b/plotly/graph_objs/bar/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/bar/hoverlabel/__init__.py +++ b/plotly/graph_objs/bar/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/bar/hoverlabel/_font.py b/plotly/graph_objs/bar/hoverlabel/_font.py index 9ddfd6157d..0293d43f82 100644 --- a/plotly/graph_objs/bar/hoverlabel/_font.py +++ b/plotly/graph_objs/bar/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.hoverlabel" _path_str = "bar.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/legendgrouptitle/__init__.py b/plotly/graph_objs/bar/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/bar/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/bar/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/bar/legendgrouptitle/_font.py b/plotly/graph_objs/bar/legendgrouptitle/_font.py index a74f82ad72..df28992a94 100644 --- a/plotly/graph_objs/bar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/bar/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.legendgrouptitle" _path_str = "bar.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/__init__.py b/plotly/graph_objs/bar/marker/__init__.py index ce0279c544..700941a53e 100644 --- a/plotly/graph_objs/bar/marker/__init__.py +++ b/plotly/graph_objs/bar/marker/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from ._pattern import Pattern - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/bar/marker/_colorbar.py b/plotly/graph_objs/bar/marker/_colorbar.py index 7f93706dd2..ff7a4acb90 100644 --- a/plotly/graph_objs/bar/marker/_colorbar.py +++ b/plotly/graph_objs/bar/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker" _path_str = "bar.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.bar.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.bar.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -912,8 +637,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.bar.marker.colorbar.Tickformatstop @@ -924,8 +647,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -948,8 +669,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -973,8 +692,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -999,8 +716,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1019,8 +734,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1046,8 +759,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1067,8 +778,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1090,8 +799,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1111,8 +818,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1125,7 +830,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1133,8 +838,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1153,8 +856,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1166,7 +867,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1174,8 +875,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1194,8 +893,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1214,8 +911,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1225,18 +920,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.bar.marker.colorbar.Title @@ -1247,8 +930,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1273,8 +954,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1297,8 +976,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1317,8 +994,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1340,8 +1015,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1366,8 +1039,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1390,8 +1061,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1410,8 +1079,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1433,8 +1100,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1681,55 +1346,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1984,14 +1649,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2006,214 +1668,57 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/_line.py b/plotly/graph_objs/bar/marker/_line.py index ac0e99e0ce..80c6b66fcb 100644 --- a/plotly/graph_objs/bar/marker/_line.py +++ b/plotly/graph_objs/bar/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker" _path_str = "bar.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to bar.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/_pattern.py b/plotly/graph_objs/bar/marker/_pattern.py index 423062a837..1d7122b935 100644 --- a/plotly/graph_objs/bar/marker/_pattern.py +++ b/plotly/graph_objs/bar/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker" _path_str = "bar.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/colorbar/__init__.py b/plotly/graph_objs/bar/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/bar/marker/colorbar/__init__.py +++ b/plotly/graph_objs/bar/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/bar/marker/colorbar/_tickfont.py b/plotly/graph_objs/bar/marker/colorbar/_tickfont.py index 394786fc03..898a3b62a4 100644 --- a/plotly/graph_objs/bar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/bar/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker.colorbar" _path_str = "bar.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py index 43310337d7..b8ba6f52d2 100644 --- a/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/bar/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker.colorbar" _path_str = "bar.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/colorbar/_title.py b/plotly/graph_objs/bar/marker/colorbar/_title.py index 3ad48f55ad..e4872c1901 100644 --- a/plotly/graph_objs/bar/marker/colorbar/_title.py +++ b/plotly/graph_objs/bar/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker.colorbar" _path_str = "bar.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.bar.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/marker/colorbar/title/__init__.py b/plotly/graph_objs/bar/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/bar/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/bar/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/bar/marker/colorbar/title/_font.py b/plotly/graph_objs/bar/marker/colorbar/title/_font.py index c6b3218ea7..ec7bd2d1f5 100644 --- a/plotly/graph_objs/bar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/bar/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.marker.colorbar.title" _path_str = "bar.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.bar.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/selected/__init__.py b/plotly/graph_objs/bar/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/bar/selected/__init__.py +++ b/plotly/graph_objs/bar/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/bar/selected/_marker.py b/plotly/graph_objs/bar/selected/_marker.py index bb3c22b56e..8b06e35bee 100644 --- a/plotly/graph_objs/bar/selected/_marker.py +++ b/plotly/graph_objs/bar/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.selected" _path_str = "bar.selected.marker" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the marker opacity of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/selected/_textfont.py b/plotly/graph_objs/bar/selected/_textfont.py index d6dc88660c..9aaae279ed 100644 --- a/plotly/graph_objs/bar/selected/_textfont.py +++ b/plotly/graph_objs/bar/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.selected" _path_str = "bar.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/unselected/__init__.py b/plotly/graph_objs/bar/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/bar/unselected/__init__.py +++ b/plotly/graph_objs/bar/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/bar/unselected/_marker.py b/plotly/graph_objs/bar/unselected/_marker.py index 61d2d0d8e1..cfb812cc9c 100644 --- a/plotly/graph_objs/bar/unselected/_marker.py +++ b/plotly/graph_objs/bar/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.unselected" _path_str = "bar.unselected.marker" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +64,13 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -125,14 +91,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -147,26 +110,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/bar/unselected/_textfont.py b/plotly/graph_objs/bar/unselected/_textfont.py index 59c239103f..ecb568428f 100644 --- a/plotly/graph_objs/bar/unselected/_textfont.py +++ b/plotly/graph_objs/bar/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "bar.unselected" _path_str = "bar.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.bar.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/__init__.py b/plotly/graph_objs/barpolar/__init__.py index 27b45079d2..0d240d0ac9 100644 --- a/plotly/graph_objs/barpolar/__init__.py +++ b/plotly/graph_objs/barpolar/__init__.py @@ -1,30 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/barpolar/_hoverlabel.py b/plotly/graph_objs/barpolar/_hoverlabel.py index 319d6463b9..6421ded259 100644 --- a/plotly/graph_objs/barpolar/_hoverlabel.py +++ b/plotly/graph_objs/barpolar/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar" _path_str = "barpolar.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.barpolar.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/_legendgrouptitle.py b/plotly/graph_objs/barpolar/_legendgrouptitle.py index 382ec3f2fa..c266c4dbeb 100644 --- a/plotly/graph_objs/barpolar/_legendgrouptitle.py +++ b/plotly/graph_objs/barpolar/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar" _path_str = "barpolar.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.barpolar.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/_marker.py b/plotly/graph_objs/barpolar/_marker.py index 3602ee7081..3d00fedc0f 100644 --- a/plotly/graph_objs/barpolar/_marker.py +++ b/plotly/graph_objs/barpolar/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar" _path_str = "barpolar.marker" _valid_props = { @@ -27,8 +28,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -53,8 +52,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -78,8 +75,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -101,8 +96,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -125,8 +118,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -148,8 +139,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -163,49 +152,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to barpolar.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -213,8 +167,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -240,8 +192,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -251,273 +201,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.barpola - r.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.barpolar.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - barpolar.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.barpolar.marker.co - lorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.barpolar.marker.ColorBar @@ -528,8 +211,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -582,8 +263,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -602,8 +281,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # line - # ---- @property def line(self): """ @@ -613,98 +290,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.barpolar.marker.Line @@ -715,8 +300,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -728,7 +311,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -736,8 +319,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -756,8 +337,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # pattern - # ------- @property def pattern(self): """ @@ -769,57 +348,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.barpolar.marker.Pattern @@ -830,8 +358,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -853,8 +379,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -875,8 +399,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -971,22 +493,22 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - pattern=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + pattern: None | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -1089,14 +611,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1111,82 +630,24 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("pattern", arg, pattern) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/_selected.py b/plotly/graph_objs/barpolar/_selected.py index 2738d420ab..db7ebeef29 100644 --- a/plotly/graph_objs/barpolar/_selected.py +++ b/plotly/graph_objs/barpolar/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar" _path_str = "barpolar.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,13 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - Returns ------- plotly.graph_objs.barpolar.selected.Marker @@ -38,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -49,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.barpolar.selected.Textfont @@ -64,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +60,13 @@ def _prop_descriptions(self): ` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -98,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/_stream.py b/plotly/graph_objs/barpolar/_stream.py index fbfdae7eb2..bf775ce8ad 100644 --- a/plotly/graph_objs/barpolar/_stream.py +++ b/plotly/graph_objs/barpolar/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar" _path_str = "barpolar.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/_unselected.py b/plotly/graph_objs/barpolar/_unselected.py index a83f619986..4f82304a23 100644 --- a/plotly/graph_objs/barpolar/_unselected.py +++ b/plotly/graph_objs/barpolar/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar" _path_str = "barpolar.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.barpolar.unselected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.barpolar.unselected.Textfont @@ -67,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +60,13 @@ def _prop_descriptions(self): nt` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -101,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -123,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/hoverlabel/__init__.py b/plotly/graph_objs/barpolar/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/barpolar/hoverlabel/__init__.py +++ b/plotly/graph_objs/barpolar/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/barpolar/hoverlabel/_font.py b/plotly/graph_objs/barpolar/hoverlabel/_font.py index 7a45bd2cd8..72822828e9 100644 --- a/plotly/graph_objs/barpolar/hoverlabel/_font.py +++ b/plotly/graph_objs/barpolar/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.hoverlabel" _path_str = "barpolar.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py b/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/barpolar/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/barpolar/legendgrouptitle/_font.py b/plotly/graph_objs/barpolar/legendgrouptitle/_font.py index c687282cf1..cf8464c5bd 100644 --- a/plotly/graph_objs/barpolar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/barpolar/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.legendgrouptitle" _path_str = "barpolar.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/__init__.py b/plotly/graph_objs/barpolar/marker/__init__.py index ce0279c544..700941a53e 100644 --- a/plotly/graph_objs/barpolar/marker/__init__.py +++ b/plotly/graph_objs/barpolar/marker/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from ._pattern import Pattern - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/barpolar/marker/_colorbar.py b/plotly/graph_objs/barpolar/marker/_colorbar.py index 1a42eb92b8..dad995b330 100644 --- a/plotly/graph_objs/barpolar/marker/_colorbar.py +++ b/plotly/graph_objs/barpolar/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker" _path_str = "barpolar.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.barpolar.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.barpolar.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/_line.py b/plotly/graph_objs/barpolar/marker/_line.py index 1fc6461876..261caa8bfc 100644 --- a/plotly/graph_objs/barpolar/marker/_line.py +++ b/plotly/graph_objs/barpolar/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker" _path_str = "barpolar.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to barpolar.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/_pattern.py b/plotly/graph_objs/barpolar/marker/_pattern.py index 74f81eefcc..b44c18cb34 100644 --- a/plotly/graph_objs/barpolar/marker/_pattern.py +++ b/plotly/graph_objs/barpolar/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker" _path_str = "barpolar.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/colorbar/__init__.py b/plotly/graph_objs/barpolar/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/__init__.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py b/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py index 2667ba1461..01f2ae32dc 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker.colorbar" _path_str = "barpolar.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py index c74dabd649..6da974c5f8 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker.colorbar" _path_str = "barpolar.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/colorbar/_title.py b/plotly/graph_objs/barpolar/marker/colorbar/_title.py index 0f41b12c58..6169307525 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/_title.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker.colorbar" _path_str = "barpolar.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.barpolar.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py b/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py b/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py index da6165775b..04a0aa2f85 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.marker.colorbar.title" _path_str = "barpolar.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.barpolar.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/selected/__init__.py b/plotly/graph_objs/barpolar/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/barpolar/selected/__init__.py +++ b/plotly/graph_objs/barpolar/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/barpolar/selected/_marker.py b/plotly/graph_objs/barpolar/selected/_marker.py index f8f3979653..28fde526ea 100644 --- a/plotly/graph_objs/barpolar/selected/_marker.py +++ b/plotly/graph_objs/barpolar/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.selected" _path_str = "barpolar.selected.marker" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the marker opacity of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/selected/_textfont.py b/plotly/graph_objs/barpolar/selected/_textfont.py index 55f2e0291d..70752ba0a1 100644 --- a/plotly/graph_objs/barpolar/selected/_textfont.py +++ b/plotly/graph_objs/barpolar/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.selected" _path_str = "barpolar.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/unselected/__init__.py b/plotly/graph_objs/barpolar/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/barpolar/unselected/__init__.py +++ b/plotly/graph_objs/barpolar/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/barpolar/unselected/_marker.py b/plotly/graph_objs/barpolar/unselected/_marker.py index 57a165ddd4..e239a6e3c5 100644 --- a/plotly/graph_objs/barpolar/unselected/_marker.py +++ b/plotly/graph_objs/barpolar/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.unselected" _path_str = "barpolar.unselected.marker" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +64,13 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -125,14 +91,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -147,26 +110,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/barpolar/unselected/_textfont.py b/plotly/graph_objs/barpolar/unselected/_textfont.py index ae9cbbb18d..04076a50ea 100644 --- a/plotly/graph_objs/barpolar/unselected/_textfont.py +++ b/plotly/graph_objs/barpolar/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "barpolar.unselected" _path_str = "barpolar.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.barpolar.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/__init__.py b/plotly/graph_objs/box/__init__.py index b27fd1bac3..230fc72eb2 100644 --- a/plotly/graph_objs/box/__init__.py +++ b/plotly/graph_objs/box/__init__.py @@ -1,32 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/box/_hoverlabel.py b/plotly/graph_objs/box/_hoverlabel.py index 085989401d..0a5224e858 100644 --- a/plotly/graph_objs/box/_hoverlabel.py +++ b/plotly/graph_objs/box/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.box.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.box.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/_legendgrouptitle.py b/plotly/graph_objs/box/_legendgrouptitle.py index 3b29c42997..ef02e3ad76 100644 --- a/plotly/graph_objs/box/_legendgrouptitle.py +++ b/plotly/graph_objs/box/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.box.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.box.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/_line.py b/plotly/graph_objs/box/_line.py index 577cef7233..4a87e029d6 100644 --- a/plotly/graph_objs/box/_line.py +++ b/plotly/graph_objs/box/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the width (in px) of line bounding the box(es). """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -118,14 +84,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -140,26 +103,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.box.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/_marker.py b/plotly/graph_objs/box/_marker.py index 1ff502a66d..ddf05d47b3 100644 --- a/plotly/graph_objs/box/_marker.py +++ b/plotly/graph_objs/box/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.marker" _valid_props = { @@ -18,8 +19,6 @@ class Marker(_BaseTraceHierarchyType): "symbol", } - # angle - # ----- @property def angle(self): """ @@ -40,8 +39,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # color - # ----- @property def color(self): """ @@ -55,42 +52,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -102,8 +64,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -113,25 +73,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. - Returns ------- plotly.graph_objs.box.marker.Line @@ -142,8 +83,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -162,8 +101,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outliercolor - # ------------ @property def outliercolor(self): """ @@ -174,42 +111,7 @@ def outliercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -221,8 +123,6 @@ def outliercolor(self): def outliercolor(self, val): self["outliercolor"] = val - # size - # ---- @property def size(self): """ @@ -241,8 +141,6 @@ def size(self): def size(self, val): self["size"] = val - # symbol - # ------ @property def symbol(self): """ @@ -353,8 +251,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -386,13 +282,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - color=None, - line=None, - opacity=None, - outliercolor=None, - size=None, - symbol=None, + angle: int | float | None = None, + color: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + outliercolor: str | None = None, + size: int | float | None = None, + symbol: Any | None = None, **kwargs, ): """ @@ -431,14 +327,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -453,46 +346,15 @@ def __init__( an instance of :class:`plotly.graph_objs.box.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("outliercolor", None) - _v = outliercolor if outliercolor is not None else _v - if _v is not None: - self["outliercolor"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("outliercolor", arg, outliercolor) + self._init_provided("size", arg, size) + self._init_provided("symbol", arg, symbol) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/_selected.py b/plotly/graph_objs/box/_selected.py index 74b4d95616..e2a6b841a0 100644 --- a/plotly/graph_objs/box/_selected.py +++ b/plotly/graph_objs/box/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.box.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -67,14 +55,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -89,22 +74,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.box.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/_stream.py b/plotly/graph_objs/box/_stream.py index 7f218ccefd..07b2f8b155 100644 --- a/plotly/graph_objs/box/_stream.py +++ b/plotly/graph_objs/box/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.box.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/_unselected.py b/plotly/graph_objs/box/_unselected.py index 05b5168d69..e388eaeb9b 100644 --- a/plotly/graph_objs/box/_unselected.py +++ b/plotly/graph_objs/box/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box" _path_str = "box.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.box.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -71,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.box.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/hoverlabel/__init__.py b/plotly/graph_objs/box/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/box/hoverlabel/__init__.py +++ b/plotly/graph_objs/box/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/box/hoverlabel/_font.py b/plotly/graph_objs/box/hoverlabel/_font.py index 88a5fb615b..a2caef322a 100644 --- a/plotly/graph_objs/box/hoverlabel/_font.py +++ b/plotly/graph_objs/box/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box.hoverlabel" _path_str = "box.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.box.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/legendgrouptitle/__init__.py b/plotly/graph_objs/box/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/box/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/box/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/box/legendgrouptitle/_font.py b/plotly/graph_objs/box/legendgrouptitle/_font.py index 3518bc7dc5..07f8e229a9 100644 --- a/plotly/graph_objs/box/legendgrouptitle/_font.py +++ b/plotly/graph_objs/box/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box.legendgrouptitle" _path_str = "box.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.box.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/marker/__init__.py b/plotly/graph_objs/box/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/box/marker/__init__.py +++ b/plotly/graph_objs/box/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/box/marker/_line.py b/plotly/graph_objs/box/marker/_line.py index ad6e7d2636..d4d28c5eb7 100644 --- a/plotly/graph_objs/box/marker/_line.py +++ b/plotly/graph_objs/box/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box.marker" _path_str = "box.marker.line" _valid_props = {"color", "outliercolor", "outlierwidth", "width"} - # color - # ----- @property def color(self): """ @@ -25,42 +24,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -72,8 +36,6 @@ def color(self): def color(self, val): self["color"] = val - # outliercolor - # ------------ @property def outliercolor(self): """ @@ -85,42 +47,7 @@ def outliercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -132,8 +59,6 @@ def outliercolor(self): def outliercolor(self, val): self["outliercolor"] = val - # outlierwidth - # ------------ @property def outlierwidth(self): """ @@ -153,8 +78,6 @@ def outlierwidth(self): def outlierwidth(self, val): self["outlierwidth"] = val - # width - # ----- @property def width(self): """ @@ -173,8 +96,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -198,10 +119,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - outliercolor=None, - outlierwidth=None, - width=None, + color: str | None = None, + outliercolor: str | None = None, + outlierwidth: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -233,14 +154,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -255,34 +173,12 @@ def __init__( an instance of :class:`plotly.graph_objs.box.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("outliercolor", None) - _v = outliercolor if outliercolor is not None else _v - if _v is not None: - self["outliercolor"] = _v - _v = arg.pop("outlierwidth", None) - _v = outlierwidth if outlierwidth is not None else _v - if _v is not None: - self["outlierwidth"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("outliercolor", arg, outliercolor) + self._init_provided("outlierwidth", arg, outlierwidth) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/selected/__init__.py b/plotly/graph_objs/box/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/box/selected/__init__.py +++ b/plotly/graph_objs/box/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/box/selected/_marker.py b/plotly/graph_objs/box/selected/_marker.py index 271ae2b8b9..57e5f54383 100644 --- a/plotly/graph_objs/box/selected/_marker.py +++ b/plotly/graph_objs/box/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box.selected" _path_str = "box.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.box.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/box/unselected/__init__.py b/plotly/graph_objs/box/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/box/unselected/__init__.py +++ b/plotly/graph_objs/box/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/box/unselected/_marker.py b/plotly/graph_objs/box/unselected/_marker.py index dab1bcd318..061b080d50 100644 --- a/plotly/graph_objs/box/unselected/_marker.py +++ b/plotly/graph_objs/box/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "box.unselected" _path_str = "box.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.box.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/__init__.py b/plotly/graph_objs/candlestick/__init__.py index eef010c140..4b308ef8c3 100644 --- a/plotly/graph_objs/candlestick/__init__.py +++ b/plotly/graph_objs/candlestick/__init__.py @@ -1,29 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._decreasing import Decreasing - from ._hoverlabel import Hoverlabel - from ._increasing import Increasing - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._stream import Stream - from . import decreasing - from . import hoverlabel - from . import increasing - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".decreasing", ".hoverlabel", ".increasing", ".legendgrouptitle"], - [ - "._decreasing.Decreasing", - "._hoverlabel.Hoverlabel", - "._increasing.Increasing", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".decreasing", ".hoverlabel", ".increasing", ".legendgrouptitle"], + [ + "._decreasing.Decreasing", + "._hoverlabel.Hoverlabel", + "._increasing.Increasing", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/candlestick/_decreasing.py b/plotly/graph_objs/candlestick/_decreasing.py index e7bfc44082..b74324bf57 100644 --- a/plotly/graph_objs/candlestick/_decreasing.py +++ b/plotly/graph_objs/candlestick/_decreasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Decreasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick" _path_str = "candlestick.decreasing" _valid_props = {"fillcolor", "line"} - # fillcolor - # --------- @property def fillcolor(self): """ @@ -24,42 +23,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # line - # ---- @property def line(self): """ @@ -82,14 +44,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - Returns ------- plotly.graph_objs.candlestick.decreasing.Line @@ -100,8 +54,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -114,7 +66,9 @@ def _prop_descriptions(self): e` instance or dict with compatible properties """ - def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): + def __init__( + self, arg=None, fillcolor: str | None = None, line: None | None = None, **kwargs + ): """ Construct a new Decreasing object @@ -136,14 +90,11 @@ def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): ------- Decreasing """ - super(Decreasing, self).__init__("decreasing") - + super().__init__("decreasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -158,26 +109,10 @@ def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.Decreasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/_hoverlabel.py b/plotly/graph_objs/candlestick/_hoverlabel.py index 15b35f56c0..48b520ea9f 100644 --- a/plotly/graph_objs/candlestick/_hoverlabel.py +++ b/plotly/graph_objs/candlestick/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick" _path_str = "candlestick.hoverlabel" _valid_props = { @@ -21,8 +22,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "split", } - # align - # ----- @property def align(self): """ @@ -37,7 +36,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -45,8 +44,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -65,8 +62,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -77,47 +72,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -125,8 +85,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -145,8 +103,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -157,47 +113,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -205,8 +126,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -226,8 +145,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -239,79 +156,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.candlestick.hoverlabel.Font @@ -322,8 +166,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -341,7 +183,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -349,8 +191,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -370,8 +210,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # split - # ----- @property def split(self): """ @@ -391,8 +229,6 @@ def split(self): def split(self, val): self["split"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -436,16 +272,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - split=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, + split: bool | None = None, **kwargs, ): """ @@ -497,14 +333,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -519,58 +352,18 @@ def __init__( an instance of :class:`plotly.graph_objs.candlestick.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - _v = arg.pop("split", None) - _v = split if split is not None else _v - if _v is not None: - self["split"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) + self._init_provided("split", arg, split) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/_increasing.py b/plotly/graph_objs/candlestick/_increasing.py index a93cdb43a4..5be62c862a 100644 --- a/plotly/graph_objs/candlestick/_increasing.py +++ b/plotly/graph_objs/candlestick/_increasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Increasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick" _path_str = "candlestick.increasing" _valid_props = {"fillcolor", "line"} - # fillcolor - # --------- @property def fillcolor(self): """ @@ -24,42 +23,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # line - # ---- @property def line(self): """ @@ -82,14 +44,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). - Returns ------- plotly.graph_objs.candlestick.increasing.Line @@ -100,8 +54,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -114,7 +66,9 @@ def _prop_descriptions(self): e` instance or dict with compatible properties """ - def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): + def __init__( + self, arg=None, fillcolor: str | None = None, line: None | None = None, **kwargs + ): """ Construct a new Increasing object @@ -136,14 +90,11 @@ def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): ------- Increasing """ - super(Increasing, self).__init__("increasing") - + super().__init__("increasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -158,26 +109,10 @@ def __init__(self, arg=None, fillcolor=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.Increasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/_legendgrouptitle.py b/plotly/graph_objs/candlestick/_legendgrouptitle.py index a22132a92a..e7ad7c837f 100644 --- a/plotly/graph_objs/candlestick/_legendgrouptitle.py +++ b/plotly/graph_objs/candlestick/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick" _path_str = "candlestick.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.candlestick.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/_line.py b/plotly/graph_objs/candlestick/_line.py index f1c95b633d..79e3ec4a5b 100644 --- a/plotly/graph_objs/candlestick/_line.py +++ b/plotly/graph_objs/candlestick/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick" _path_str = "candlestick.line" _valid_props = {"width"} - # width - # ----- @property def width(self): """ @@ -32,8 +31,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -44,7 +41,7 @@ def _prop_descriptions(self): `decreasing.line.width`. """ - def __init__(self, arg=None, width=None, **kwargs): + def __init__(self, arg=None, width: int | float | None = None, **kwargs): """ Construct a new Line object @@ -64,14 +61,11 @@ def __init__(self, arg=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -86,22 +80,9 @@ def __init__(self, arg=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/_stream.py b/plotly/graph_objs/candlestick/_stream.py index c399e008da..e7cae2252a 100644 --- a/plotly/graph_objs/candlestick/_stream.py +++ b/plotly/graph_objs/candlestick/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick" _path_str = "candlestick.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/decreasing/__init__.py b/plotly/graph_objs/candlestick/decreasing/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/candlestick/decreasing/__init__.py +++ b/plotly/graph_objs/candlestick/decreasing/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/candlestick/decreasing/_line.py b/plotly/graph_objs/candlestick/decreasing/_line.py index e3ea54012a..98eed1b02d 100644 --- a/plotly/graph_objs/candlestick/decreasing/_line.py +++ b/plotly/graph_objs/candlestick/decreasing/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick.decreasing" _path_str = "candlestick.decreasing.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the width (in px) of line bounding the box(es). """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.decreasing.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/hoverlabel/__init__.py b/plotly/graph_objs/candlestick/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/candlestick/hoverlabel/__init__.py +++ b/plotly/graph_objs/candlestick/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/candlestick/hoverlabel/_font.py b/plotly/graph_objs/candlestick/hoverlabel/_font.py index 2d14c6a155..e0f6d937b8 100644 --- a/plotly/graph_objs/candlestick/hoverlabel/_font.py +++ b/plotly/graph_objs/candlestick/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick.hoverlabel" _path_str = "candlestick.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.candlestick.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/increasing/__init__.py b/plotly/graph_objs/candlestick/increasing/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/candlestick/increasing/__init__.py +++ b/plotly/graph_objs/candlestick/increasing/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/candlestick/increasing/_line.py b/plotly/graph_objs/candlestick/increasing/_line.py index 7c40879a53..d0d1103d55 100644 --- a/plotly/graph_objs/candlestick/increasing/_line.py +++ b/plotly/graph_objs/candlestick/increasing/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick.increasing" _path_str = "candlestick.increasing.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the width (in px) of line bounding the box(es). """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.candlestick.increasing.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py b/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/candlestick/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/candlestick/legendgrouptitle/_font.py b/plotly/graph_objs/candlestick/legendgrouptitle/_font.py index 91a143fa79..a29847d0a2 100644 --- a/plotly/graph_objs/candlestick/legendgrouptitle/_font.py +++ b/plotly/graph_objs/candlestick/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "candlestick.legendgrouptitle" _path_str = "candlestick.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.candlestick.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/__init__.py b/plotly/graph_objs/carpet/__init__.py index 32126bf0f8..0c15645762 100644 --- a/plotly/graph_objs/carpet/__init__.py +++ b/plotly/graph_objs/carpet/__init__.py @@ -1,26 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._aaxis import Aaxis - from ._baxis import Baxis - from ._font import Font - from ._legendgrouptitle import Legendgrouptitle - from ._stream import Stream - from . import aaxis - from . import baxis - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".aaxis", ".baxis", ".legendgrouptitle"], - [ - "._aaxis.Aaxis", - "._baxis.Baxis", - "._font.Font", - "._legendgrouptitle.Legendgrouptitle", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".aaxis", ".baxis", ".legendgrouptitle"], + [ + "._aaxis.Aaxis", + "._baxis.Baxis", + "._font.Font", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/carpet/_aaxis.py b/plotly/graph_objs/carpet/_aaxis.py index d8a2d9d28a..a3d180c120 100644 --- a/plotly/graph_objs/carpet/_aaxis.py +++ b/plotly/graph_objs/carpet/_aaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Aaxis(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet" _path_str = "carpet.aaxis" _valid_props = { @@ -69,8 +70,6 @@ class Aaxis(_BaseTraceHierarchyType): "type", } - # arraydtick - # ---------- @property def arraydtick(self): """ @@ -90,8 +89,6 @@ def arraydtick(self): def arraydtick(self, val): self["arraydtick"] = val - # arraytick0 - # ---------- @property def arraytick0(self): """ @@ -111,8 +108,6 @@ def arraytick0(self): def arraytick0(self, val): self["arraytick0"] = val - # autorange - # --------- @property def autorange(self): """ @@ -134,8 +129,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -158,8 +151,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -172,7 +163,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -180,8 +171,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -201,8 +190,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -233,8 +220,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # cheatertype - # ----------- @property def cheatertype(self): """ @@ -252,8 +237,6 @@ def cheatertype(self): def cheatertype(self, val): self["cheatertype"] = val - # color - # ----- @property def color(self): """ @@ -267,42 +250,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -314,8 +262,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -334,8 +280,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # endline - # ------- @property def endline(self): """ @@ -356,8 +300,6 @@ def endline(self): def endline(self, val): self["endline"] = val - # endlinecolor - # ------------ @property def endlinecolor(self): """ @@ -368,42 +310,7 @@ def endlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -415,8 +322,6 @@ def endlinecolor(self): def endlinecolor(self, val): self["endlinecolor"] = val - # endlinewidth - # ------------ @property def endlinewidth(self): """ @@ -435,8 +340,6 @@ def endlinewidth(self): def endlinewidth(self, val): self["endlinewidth"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -460,8 +363,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # fixedrange - # ---------- @property def fixedrange(self): """ @@ -481,8 +382,6 @@ def fixedrange(self): def fixedrange(self, val): self["fixedrange"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -493,42 +392,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -540,8 +404,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -566,8 +428,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -586,8 +446,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -613,8 +471,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # labelpadding - # ------------ @property def labelpadding(self): """ @@ -633,8 +489,6 @@ def labelpadding(self): def labelpadding(self, val): self["labelpadding"] = val - # labelprefix - # ----------- @property def labelprefix(self): """ @@ -654,8 +508,6 @@ def labelprefix(self): def labelprefix(self, val): self["labelprefix"] = val - # labelsuffix - # ----------- @property def labelsuffix(self): """ @@ -675,8 +527,6 @@ def labelsuffix(self): def labelsuffix(self, val): self["labelsuffix"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -687,42 +537,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -734,8 +549,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -754,8 +567,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -774,8 +585,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # minorgridcolor - # -------------- @property def minorgridcolor(self): """ @@ -786,42 +595,7 @@ def minorgridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -833,8 +607,6 @@ def minorgridcolor(self): def minorgridcolor(self, val): self["minorgridcolor"] = val - # minorgridcount - # -------------- @property def minorgridcount(self): """ @@ -854,8 +626,6 @@ def minorgridcount(self): def minorgridcount(self, val): self["minorgridcount"] = val - # minorgriddash - # ------------- @property def minorgriddash(self): """ @@ -880,8 +650,6 @@ def minorgriddash(self): def minorgriddash(self, val): self["minorgriddash"] = val - # minorgridwidth - # -------------- @property def minorgridwidth(self): """ @@ -900,8 +668,6 @@ def minorgridwidth(self): def minorgridwidth(self, val): self["minorgridwidth"] = val - # nticks - # ------ @property def nticks(self): """ @@ -924,8 +690,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -954,13 +718,11 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. @@ -978,8 +740,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -998,8 +758,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -1022,8 +780,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -1043,8 +799,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -1063,8 +817,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1085,8 +837,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1109,8 +859,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1130,8 +878,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -1148,8 +894,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # startline - # --------- @property def startline(self): """ @@ -1170,8 +914,6 @@ def startline(self): def startline(self, val): self["startline"] = val - # startlinecolor - # -------------- @property def startlinecolor(self): """ @@ -1182,42 +924,7 @@ def startlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1229,8 +936,6 @@ def startlinecolor(self): def startlinecolor(self, val): self["startlinecolor"] = val - # startlinewidth - # -------------- @property def startlinewidth(self): """ @@ -1249,8 +954,6 @@ def startlinewidth(self): def startlinewidth(self, val): self["startlinewidth"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1269,8 +972,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1293,8 +994,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -1306,52 +1005,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.carpet.aaxis.Tickfont @@ -1362,8 +1015,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1392,8 +1043,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1403,42 +1052,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.carpet.aaxis.Tickformatstop] @@ -1449,8 +1062,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1465,8 +1076,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.carpet.aaxis.Tickformatstop @@ -1477,8 +1086,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1496,8 +1103,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1517,8 +1122,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1538,8 +1141,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1552,7 +1153,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1560,8 +1161,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1580,8 +1179,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1593,7 +1190,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1601,8 +1198,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1621,8 +1216,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # title - # ----- @property def title(self): """ @@ -1632,16 +1225,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.carpet.aaxis.Title @@ -1652,8 +1235,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -1675,8 +1256,6 @@ def type(self): def type(self, val): self["type"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1803,7 +1382,7 @@ def _prop_descriptions(self): appears. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. @@ -1901,64 +1480,64 @@ def _prop_descriptions(self): def __init__( self, arg=None, - arraydtick=None, - arraytick0=None, - autorange=None, - autotypenumbers=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - cheatertype=None, - color=None, - dtick=None, - endline=None, - endlinecolor=None, - endlinewidth=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - griddash=None, - gridwidth=None, - labelalias=None, - labelpadding=None, - labelprefix=None, - labelsuffix=None, - linecolor=None, - linewidth=None, - minexponent=None, - minorgridcolor=None, - minorgridcount=None, - minorgriddash=None, - minorgridwidth=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - smoothing=None, - startline=None, - startlinecolor=None, - startlinewidth=None, - tick0=None, - tickangle=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - tickmode=None, - tickprefix=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - title=None, - type=None, + arraydtick: int | None = None, + arraytick0: int | None = None, + autorange: Any | None = None, + autotypenumbers: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + cheatertype: Any | None = None, + color: str | None = None, + dtick: int | float | None = None, + endline: bool | None = None, + endlinecolor: str | None = None, + endlinewidth: int | float | None = None, + exponentformat: Any | None = None, + fixedrange: bool | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + labelalias: Any | None = None, + labelpadding: int | None = None, + labelprefix: str | None = None, + labelsuffix: str | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + minexponent: int | float | None = None, + minorgridcolor: str | None = None, + minorgridcount: int | None = None, + minorgriddash: str | None = None, + minorgridwidth: int | float | None = None, + nticks: int | None = None, + range: list | None = None, + rangemode: Any | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: Any | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + smoothing: int | float | None = None, + startline: bool | None = None, + startlinecolor: str | None = None, + startlinewidth: int | float | None = None, + tick0: int | float | None = None, + tickangle: int | float | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + title: None | None = None, + type: Any | None = None, **kwargs, ): """ @@ -2092,7 +1671,7 @@ def __init__( appears. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. @@ -2190,14 +1769,11 @@ def __init__( ------- Aaxis """ - super(Aaxis, self).__init__("aaxis") - + super().__init__("aaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2212,250 +1788,66 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.Aaxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arraydtick", None) - _v = arraydtick if arraydtick is not None else _v - if _v is not None: - self["arraydtick"] = _v - _v = arg.pop("arraytick0", None) - _v = arraytick0 if arraytick0 is not None else _v - if _v is not None: - self["arraytick0"] = _v - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("cheatertype", None) - _v = cheatertype if cheatertype is not None else _v - if _v is not None: - self["cheatertype"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("endline", None) - _v = endline if endline is not None else _v - if _v is not None: - self["endline"] = _v - _v = arg.pop("endlinecolor", None) - _v = endlinecolor if endlinecolor is not None else _v - if _v is not None: - self["endlinecolor"] = _v - _v = arg.pop("endlinewidth", None) - _v = endlinewidth if endlinewidth is not None else _v - if _v is not None: - self["endlinewidth"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("fixedrange", None) - _v = fixedrange if fixedrange is not None else _v - if _v is not None: - self["fixedrange"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("labelpadding", None) - _v = labelpadding if labelpadding is not None else _v - if _v is not None: - self["labelpadding"] = _v - _v = arg.pop("labelprefix", None) - _v = labelprefix if labelprefix is not None else _v - if _v is not None: - self["labelprefix"] = _v - _v = arg.pop("labelsuffix", None) - _v = labelsuffix if labelsuffix is not None else _v - if _v is not None: - self["labelsuffix"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("minorgridcolor", None) - _v = minorgridcolor if minorgridcolor is not None else _v - if _v is not None: - self["minorgridcolor"] = _v - _v = arg.pop("minorgridcount", None) - _v = minorgridcount if minorgridcount is not None else _v - if _v is not None: - self["minorgridcount"] = _v - _v = arg.pop("minorgriddash", None) - _v = minorgriddash if minorgriddash is not None else _v - if _v is not None: - self["minorgriddash"] = _v - _v = arg.pop("minorgridwidth", None) - _v = minorgridwidth if minorgridwidth is not None else _v - if _v is not None: - self["minorgridwidth"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("startline", None) - _v = startline if startline is not None else _v - if _v is not None: - self["startline"] = _v - _v = arg.pop("startlinecolor", None) - _v = startlinecolor if startlinecolor is not None else _v - if _v is not None: - self["startlinecolor"] = _v - _v = arg.pop("startlinewidth", None) - _v = startlinewidth if startlinewidth is not None else _v - if _v is not None: - self["startlinewidth"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("arraydtick", arg, arraydtick) + self._init_provided("arraytick0", arg, arraytick0) + self._init_provided("autorange", arg, autorange) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("cheatertype", arg, cheatertype) + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("endline", arg, endline) + self._init_provided("endlinecolor", arg, endlinecolor) + self._init_provided("endlinewidth", arg, endlinewidth) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("fixedrange", arg, fixedrange) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("labelpadding", arg, labelpadding) + self._init_provided("labelprefix", arg, labelprefix) + self._init_provided("labelsuffix", arg, labelsuffix) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("minorgridcolor", arg, minorgridcolor) + self._init_provided("minorgridcount", arg, minorgridcount) + self._init_provided("minorgriddash", arg, minorgriddash) + self._init_provided("minorgridwidth", arg, minorgridwidth) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("startline", arg, startline) + self._init_provided("startlinecolor", arg, startlinecolor) + self._init_provided("startlinewidth", arg, startlinewidth) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/_baxis.py b/plotly/graph_objs/carpet/_baxis.py index 342ccfb781..ebb782ebad 100644 --- a/plotly/graph_objs/carpet/_baxis.py +++ b/plotly/graph_objs/carpet/_baxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Baxis(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet" _path_str = "carpet.baxis" _valid_props = { @@ -69,8 +70,6 @@ class Baxis(_BaseTraceHierarchyType): "type", } - # arraydtick - # ---------- @property def arraydtick(self): """ @@ -90,8 +89,6 @@ def arraydtick(self): def arraydtick(self, val): self["arraydtick"] = val - # arraytick0 - # ---------- @property def arraytick0(self): """ @@ -111,8 +108,6 @@ def arraytick0(self): def arraytick0(self, val): self["arraytick0"] = val - # autorange - # --------- @property def autorange(self): """ @@ -134,8 +129,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -158,8 +151,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -172,7 +163,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -180,8 +171,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -201,8 +190,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -233,8 +220,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # cheatertype - # ----------- @property def cheatertype(self): """ @@ -252,8 +237,6 @@ def cheatertype(self): def cheatertype(self, val): self["cheatertype"] = val - # color - # ----- @property def color(self): """ @@ -267,42 +250,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -314,8 +262,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -334,8 +280,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # endline - # ------- @property def endline(self): """ @@ -356,8 +300,6 @@ def endline(self): def endline(self, val): self["endline"] = val - # endlinecolor - # ------------ @property def endlinecolor(self): """ @@ -368,42 +310,7 @@ def endlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -415,8 +322,6 @@ def endlinecolor(self): def endlinecolor(self, val): self["endlinecolor"] = val - # endlinewidth - # ------------ @property def endlinewidth(self): """ @@ -435,8 +340,6 @@ def endlinewidth(self): def endlinewidth(self, val): self["endlinewidth"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -460,8 +363,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # fixedrange - # ---------- @property def fixedrange(self): """ @@ -481,8 +382,6 @@ def fixedrange(self): def fixedrange(self, val): self["fixedrange"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -493,42 +392,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -540,8 +404,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -566,8 +428,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -586,8 +446,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -613,8 +471,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # labelpadding - # ------------ @property def labelpadding(self): """ @@ -633,8 +489,6 @@ def labelpadding(self): def labelpadding(self, val): self["labelpadding"] = val - # labelprefix - # ----------- @property def labelprefix(self): """ @@ -654,8 +508,6 @@ def labelprefix(self): def labelprefix(self, val): self["labelprefix"] = val - # labelsuffix - # ----------- @property def labelsuffix(self): """ @@ -675,8 +527,6 @@ def labelsuffix(self): def labelsuffix(self, val): self["labelsuffix"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -687,42 +537,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -734,8 +549,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -754,8 +567,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -774,8 +585,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # minorgridcolor - # -------------- @property def minorgridcolor(self): """ @@ -786,42 +595,7 @@ def minorgridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -833,8 +607,6 @@ def minorgridcolor(self): def minorgridcolor(self, val): self["minorgridcolor"] = val - # minorgridcount - # -------------- @property def minorgridcount(self): """ @@ -854,8 +626,6 @@ def minorgridcount(self): def minorgridcount(self, val): self["minorgridcount"] = val - # minorgriddash - # ------------- @property def minorgriddash(self): """ @@ -880,8 +650,6 @@ def minorgriddash(self): def minorgriddash(self, val): self["minorgriddash"] = val - # minorgridwidth - # -------------- @property def minorgridwidth(self): """ @@ -900,8 +668,6 @@ def minorgridwidth(self): def minorgridwidth(self, val): self["minorgridwidth"] = val - # nticks - # ------ @property def nticks(self): """ @@ -924,8 +690,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -954,13 +718,11 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. @@ -978,8 +740,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -998,8 +758,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -1022,8 +780,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -1043,8 +799,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -1063,8 +817,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1085,8 +837,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1109,8 +859,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1130,8 +878,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -1148,8 +894,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # startline - # --------- @property def startline(self): """ @@ -1170,8 +914,6 @@ def startline(self): def startline(self, val): self["startline"] = val - # startlinecolor - # -------------- @property def startlinecolor(self): """ @@ -1182,42 +924,7 @@ def startlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1229,8 +936,6 @@ def startlinecolor(self): def startlinecolor(self, val): self["startlinecolor"] = val - # startlinewidth - # -------------- @property def startlinewidth(self): """ @@ -1249,8 +954,6 @@ def startlinewidth(self): def startlinewidth(self, val): self["startlinewidth"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1269,8 +972,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1293,8 +994,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -1306,52 +1005,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.carpet.baxis.Tickfont @@ -1362,8 +1015,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1392,8 +1043,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1403,42 +1052,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.carpet.baxis.Tickformatstop] @@ -1449,8 +1062,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1465,8 +1076,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.carpet.baxis.Tickformatstop @@ -1477,8 +1086,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1496,8 +1103,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1517,8 +1122,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1538,8 +1141,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1552,7 +1153,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1560,8 +1161,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1580,8 +1179,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1593,7 +1190,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1601,8 +1198,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1621,8 +1216,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # title - # ----- @property def title(self): """ @@ -1632,16 +1225,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.carpet.baxis.Title @@ -1652,8 +1235,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -1675,8 +1256,6 @@ def type(self): def type(self, val): self["type"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1803,7 +1382,7 @@ def _prop_descriptions(self): appears. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. @@ -1901,64 +1480,64 @@ def _prop_descriptions(self): def __init__( self, arg=None, - arraydtick=None, - arraytick0=None, - autorange=None, - autotypenumbers=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - cheatertype=None, - color=None, - dtick=None, - endline=None, - endlinecolor=None, - endlinewidth=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - griddash=None, - gridwidth=None, - labelalias=None, - labelpadding=None, - labelprefix=None, - labelsuffix=None, - linecolor=None, - linewidth=None, - minexponent=None, - minorgridcolor=None, - minorgridcount=None, - minorgriddash=None, - minorgridwidth=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - smoothing=None, - startline=None, - startlinecolor=None, - startlinewidth=None, - tick0=None, - tickangle=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - tickmode=None, - tickprefix=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - title=None, - type=None, + arraydtick: int | None = None, + arraytick0: int | None = None, + autorange: Any | None = None, + autotypenumbers: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + cheatertype: Any | None = None, + color: str | None = None, + dtick: int | float | None = None, + endline: bool | None = None, + endlinecolor: str | None = None, + endlinewidth: int | float | None = None, + exponentformat: Any | None = None, + fixedrange: bool | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + labelalias: Any | None = None, + labelpadding: int | None = None, + labelprefix: str | None = None, + labelsuffix: str | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + minexponent: int | float | None = None, + minorgridcolor: str | None = None, + minorgridcount: int | None = None, + minorgriddash: str | None = None, + minorgridwidth: int | float | None = None, + nticks: int | None = None, + range: list | None = None, + rangemode: Any | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: Any | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + smoothing: int | float | None = None, + startline: bool | None = None, + startlinecolor: str | None = None, + startlinewidth: int | float | None = None, + tick0: int | float | None = None, + tickangle: int | float | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + title: None | None = None, + type: Any | None = None, **kwargs, ): """ @@ -2092,7 +1671,7 @@ def __init__( appears. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. @@ -2190,14 +1769,11 @@ def __init__( ------- Baxis """ - super(Baxis, self).__init__("baxis") - + super().__init__("baxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2212,250 +1788,66 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.Baxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arraydtick", None) - _v = arraydtick if arraydtick is not None else _v - if _v is not None: - self["arraydtick"] = _v - _v = arg.pop("arraytick0", None) - _v = arraytick0 if arraytick0 is not None else _v - if _v is not None: - self["arraytick0"] = _v - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("cheatertype", None) - _v = cheatertype if cheatertype is not None else _v - if _v is not None: - self["cheatertype"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("endline", None) - _v = endline if endline is not None else _v - if _v is not None: - self["endline"] = _v - _v = arg.pop("endlinecolor", None) - _v = endlinecolor if endlinecolor is not None else _v - if _v is not None: - self["endlinecolor"] = _v - _v = arg.pop("endlinewidth", None) - _v = endlinewidth if endlinewidth is not None else _v - if _v is not None: - self["endlinewidth"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("fixedrange", None) - _v = fixedrange if fixedrange is not None else _v - if _v is not None: - self["fixedrange"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("labelpadding", None) - _v = labelpadding if labelpadding is not None else _v - if _v is not None: - self["labelpadding"] = _v - _v = arg.pop("labelprefix", None) - _v = labelprefix if labelprefix is not None else _v - if _v is not None: - self["labelprefix"] = _v - _v = arg.pop("labelsuffix", None) - _v = labelsuffix if labelsuffix is not None else _v - if _v is not None: - self["labelsuffix"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("minorgridcolor", None) - _v = minorgridcolor if minorgridcolor is not None else _v - if _v is not None: - self["minorgridcolor"] = _v - _v = arg.pop("minorgridcount", None) - _v = minorgridcount if minorgridcount is not None else _v - if _v is not None: - self["minorgridcount"] = _v - _v = arg.pop("minorgriddash", None) - _v = minorgriddash if minorgriddash is not None else _v - if _v is not None: - self["minorgriddash"] = _v - _v = arg.pop("minorgridwidth", None) - _v = minorgridwidth if minorgridwidth is not None else _v - if _v is not None: - self["minorgridwidth"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("startline", None) - _v = startline if startline is not None else _v - if _v is not None: - self["startline"] = _v - _v = arg.pop("startlinecolor", None) - _v = startlinecolor if startlinecolor is not None else _v - if _v is not None: - self["startlinecolor"] = _v - _v = arg.pop("startlinewidth", None) - _v = startlinewidth if startlinewidth is not None else _v - if _v is not None: - self["startlinewidth"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("arraydtick", arg, arraydtick) + self._init_provided("arraytick0", arg, arraytick0) + self._init_provided("autorange", arg, autorange) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("cheatertype", arg, cheatertype) + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("endline", arg, endline) + self._init_provided("endlinecolor", arg, endlinecolor) + self._init_provided("endlinewidth", arg, endlinewidth) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("fixedrange", arg, fixedrange) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("labelpadding", arg, labelpadding) + self._init_provided("labelprefix", arg, labelprefix) + self._init_provided("labelsuffix", arg, labelsuffix) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("minorgridcolor", arg, minorgridcolor) + self._init_provided("minorgridcount", arg, minorgridcount) + self._init_provided("minorgriddash", arg, minorgriddash) + self._init_provided("minorgridwidth", arg, minorgridwidth) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("startline", arg, startline) + self._init_provided("startlinecolor", arg, startlinecolor) + self._init_provided("startlinewidth", arg, startlinewidth) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/_font.py b/plotly/graph_objs/carpet/_font.py index 0c9a268fe4..98de868c89 100644 --- a/plotly/graph_objs/carpet/_font.py +++ b/plotly/graph_objs/carpet/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet" _path_str = "carpet.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -337,18 +269,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -376,14 +301,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -398,54 +320,17 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/_legendgrouptitle.py b/plotly/graph_objs/carpet/_legendgrouptitle.py index 21c3ed89ce..92e5ed0f80 100644 --- a/plotly/graph_objs/carpet/_legendgrouptitle.py +++ b/plotly/graph_objs/carpet/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet" _path_str = "carpet.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.carpet.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.carpet.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/_stream.py b/plotly/graph_objs/carpet/_stream.py index c5480dabab..6ed4294d74 100644 --- a/plotly/graph_objs/carpet/_stream.py +++ b/plotly/graph_objs/carpet/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet" _path_str = "carpet.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.carpet.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/aaxis/__init__.py b/plotly/graph_objs/carpet/aaxis/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/carpet/aaxis/__init__.py +++ b/plotly/graph_objs/carpet/aaxis/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/carpet/aaxis/_tickfont.py b/plotly/graph_objs/carpet/aaxis/_tickfont.py index 7f475688ca..c120283dc1 100644 --- a/plotly/graph_objs/carpet/aaxis/_tickfont.py +++ b/plotly/graph_objs/carpet/aaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.aaxis" _path_str = "carpet.aaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/aaxis/_tickformatstop.py b/plotly/graph_objs/carpet/aaxis/_tickformatstop.py index 00b65384ce..ad30b10b17 100644 --- a/plotly/graph_objs/carpet/aaxis/_tickformatstop.py +++ b/plotly/graph_objs/carpet/aaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.aaxis" _path_str = "carpet.aaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.aaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/aaxis/_title.py b/plotly/graph_objs/carpet/aaxis/_title.py index c679b74e5e..e9d745084c 100644 --- a/plotly/graph_objs/carpet/aaxis/_title.py +++ b/plotly/graph_objs/carpet/aaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.aaxis" _path_str = "carpet.aaxis.title" _valid_props = {"font", "offset", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.carpet.aaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # offset - # ------ @property def offset(self): """ @@ -100,8 +51,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # text - # ---- @property def text(self): """ @@ -121,8 +70,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -135,7 +82,14 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + offset: int | float | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -157,14 +111,11 @@ def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -179,30 +130,11 @@ def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.carpet.aaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("offset", arg, offset) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/aaxis/title/__init__.py b/plotly/graph_objs/carpet/aaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/carpet/aaxis/title/__init__.py +++ b/plotly/graph_objs/carpet/aaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/carpet/aaxis/title/_font.py b/plotly/graph_objs/carpet/aaxis/title/_font.py index 68c94793e8..a4717d236e 100644 --- a/plotly/graph_objs/carpet/aaxis/title/_font.py +++ b/plotly/graph_objs/carpet/aaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.aaxis.title" _path_str = "carpet.aaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.aaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/baxis/__init__.py b/plotly/graph_objs/carpet/baxis/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/carpet/baxis/__init__.py +++ b/plotly/graph_objs/carpet/baxis/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/carpet/baxis/_tickfont.py b/plotly/graph_objs/carpet/baxis/_tickfont.py index b213684bd4..a23fc1997b 100644 --- a/plotly/graph_objs/carpet/baxis/_tickfont.py +++ b/plotly/graph_objs/carpet/baxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.baxis" _path_str = "carpet.baxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.baxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/baxis/_tickformatstop.py b/plotly/graph_objs/carpet/baxis/_tickformatstop.py index 8fdb187c5a..273fcd085b 100644 --- a/plotly/graph_objs/carpet/baxis/_tickformatstop.py +++ b/plotly/graph_objs/carpet/baxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.baxis" _path_str = "carpet.baxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.baxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/baxis/_title.py b/plotly/graph_objs/carpet/baxis/_title.py index d2faac44c8..1208bee734 100644 --- a/plotly/graph_objs/carpet/baxis/_title.py +++ b/plotly/graph_objs/carpet/baxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.baxis" _path_str = "carpet.baxis.title" _valid_props = {"font", "offset", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.carpet.baxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # offset - # ------ @property def offset(self): """ @@ -100,8 +51,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # text - # ---- @property def text(self): """ @@ -121,8 +70,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -135,7 +82,14 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + offset: int | float | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -157,14 +111,11 @@ def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -179,30 +130,11 @@ def __init__(self, arg=None, font=None, offset=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.carpet.baxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("offset", arg, offset) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/baxis/title/__init__.py b/plotly/graph_objs/carpet/baxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/carpet/baxis/title/__init__.py +++ b/plotly/graph_objs/carpet/baxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/carpet/baxis/title/_font.py b/plotly/graph_objs/carpet/baxis/title/_font.py index 5977cc199c..c0ebf9855a 100644 --- a/plotly/graph_objs/carpet/baxis/title/_font.py +++ b/plotly/graph_objs/carpet/baxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.baxis.title" _path_str = "carpet.baxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.baxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/carpet/legendgrouptitle/__init__.py b/plotly/graph_objs/carpet/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/carpet/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/carpet/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/carpet/legendgrouptitle/_font.py b/plotly/graph_objs/carpet/legendgrouptitle/_font.py index cf69105682..9f62bfe919 100644 --- a/plotly/graph_objs/carpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/carpet/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "carpet.legendgrouptitle" _path_str = "carpet.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.carpet.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/__init__.py b/plotly/graph_objs/choropleth/__init__.py index bb31cb6217..7467efa587 100644 --- a/plotly/graph_objs/choropleth/__init__.py +++ b/plotly/graph_objs/choropleth/__init__.py @@ -1,40 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".colorbar", - ".hoverlabel", - ".legendgrouptitle", - ".marker", - ".selected", - ".unselected", - ], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".colorbar", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/choropleth/_colorbar.py b/plotly/graph_objs/choropleth/_colorbar.py index adf4d0c779..329e9d3f68 100644 --- a/plotly/graph_objs/choropleth/_colorbar.py +++ b/plotly/graph_objs/choropleth/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choropleth.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.choropleth.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -912,8 +637,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.choropleth.colorbar.Tickformatstop @@ -924,8 +647,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -948,8 +669,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -973,8 +692,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -999,8 +716,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1019,8 +734,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1046,8 +759,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1067,8 +778,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1090,8 +799,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1111,8 +818,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1125,7 +830,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1133,8 +838,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1153,8 +856,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1166,7 +867,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1174,8 +875,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1194,8 +893,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1214,8 +911,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1225,18 +920,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.choropleth.colorbar.Title @@ -1247,8 +930,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1273,8 +954,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1297,8 +976,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1317,8 +994,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1340,8 +1015,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1366,8 +1039,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1390,8 +1061,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1410,8 +1079,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1433,8 +1100,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1681,55 +1346,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1984,14 +1649,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2006,214 +1668,57 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/_hoverlabel.py b/plotly/graph_objs/choropleth/_hoverlabel.py index 0bdd610b66..cdad2927ca 100644 --- a/plotly/graph_objs/choropleth/_hoverlabel.py +++ b/plotly/graph_objs/choropleth/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.choropleth.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/_legendgrouptitle.py b/plotly/graph_objs/choropleth/_legendgrouptitle.py index 74bf725c37..bb954c4540 100644 --- a/plotly/graph_objs/choropleth/_legendgrouptitle.py +++ b/plotly/graph_objs/choropleth/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choropleth.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/_marker.py b/plotly/graph_objs/choropleth/_marker.py index 190fbf219b..0261d88fc5 100644 --- a/plotly/graph_objs/choropleth/_marker.py +++ b/plotly/graph_objs/choropleth/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.marker" _valid_props = {"line", "opacity", "opacitysrc"} - # line - # ---- @property def line(self): """ @@ -21,25 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.choropleth.marker.Line @@ -50,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -63,7 +41,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -71,8 +49,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -91,8 +67,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -106,7 +80,14 @@ def _prop_descriptions(self): `opacity`. """ - def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + def __init__( + self, + arg=None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -129,14 +110,11 @@ def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs) ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -151,30 +129,11 @@ def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs) an instance of :class:`plotly.graph_objs.choropleth.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/_selected.py b/plotly/graph_objs/choropleth/_selected.py index b0918c3ec2..48bd7b5f6a 100644 --- a/plotly/graph_objs/choropleth/_selected.py +++ b/plotly/graph_objs/choropleth/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,11 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - opacity - Sets the marker opacity of selected points. - Returns ------- plotly.graph_objs.choropleth.selected.Marker @@ -36,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -46,7 +38,7 @@ def _prop_descriptions(self): ` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -64,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -86,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/_stream.py b/plotly/graph_objs/choropleth/_stream.py index 8a641e2d19..7cf6480515 100644 --- a/plotly/graph_objs/choropleth/_stream.py +++ b/plotly/graph_objs/choropleth/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/_unselected.py b/plotly/graph_objs/choropleth/_unselected.py index f43fcdfbd9..45ca76bbd4 100644 --- a/plotly/graph_objs/choropleth/_unselected.py +++ b/plotly/graph_objs/choropleth/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth" _path_str = "choropleth.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,12 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.choropleth.unselected.Marker @@ -37,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -47,7 +38,7 @@ def _prop_descriptions(self): er` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -65,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -87,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/colorbar/__init__.py b/plotly/graph_objs/choropleth/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/choropleth/colorbar/__init__.py +++ b/plotly/graph_objs/choropleth/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/choropleth/colorbar/_tickfont.py b/plotly/graph_objs/choropleth/colorbar/_tickfont.py index ec56e3bf55..ba10db1c67 100644 --- a/plotly/graph_objs/choropleth/colorbar/_tickfont.py +++ b/plotly/graph_objs/choropleth/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.colorbar" _path_str = "choropleth.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py b/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py index 6ebb3aafc7..148e8db64b 100644 --- a/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/choropleth/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.colorbar" _path_str = "choropleth.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/colorbar/_title.py b/plotly/graph_objs/choropleth/colorbar/_title.py index 51207da44d..15f62a10b3 100644 --- a/plotly/graph_objs/choropleth/colorbar/_title.py +++ b/plotly/graph_objs/choropleth/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.colorbar" _path_str = "choropleth.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choropleth.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/colorbar/title/__init__.py b/plotly/graph_objs/choropleth/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choropleth/colorbar/title/__init__.py +++ b/plotly/graph_objs/choropleth/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choropleth/colorbar/title/_font.py b/plotly/graph_objs/choropleth/colorbar/title/_font.py index c906610bcc..1171e183f4 100644 --- a/plotly/graph_objs/choropleth/colorbar/title/_font.py +++ b/plotly/graph_objs/choropleth/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.colorbar.title" _path_str = "choropleth.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/hoverlabel/__init__.py b/plotly/graph_objs/choropleth/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choropleth/hoverlabel/__init__.py +++ b/plotly/graph_objs/choropleth/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choropleth/hoverlabel/_font.py b/plotly/graph_objs/choropleth/hoverlabel/_font.py index eb251f0f84..689e51c722 100644 --- a/plotly/graph_objs/choropleth/hoverlabel/_font.py +++ b/plotly/graph_objs/choropleth/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.hoverlabel" _path_str = "choropleth.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py b/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/choropleth/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choropleth/legendgrouptitle/_font.py b/plotly/graph_objs/choropleth/legendgrouptitle/_font.py index bff087169d..0b20e76347 100644 --- a/plotly/graph_objs/choropleth/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choropleth/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.legendgrouptitle" _path_str = "choropleth.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/marker/__init__.py b/plotly/graph_objs/choropleth/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/choropleth/marker/__init__.py +++ b/plotly/graph_objs/choropleth/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/choropleth/marker/_line.py b/plotly/graph_objs/choropleth/marker/_line.py index 8bc91d727d..8181bc3954 100644 --- a/plotly/graph_objs/choropleth/marker/_line.py +++ b/plotly/graph_objs/choropleth/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.marker" _path_str = "choropleth.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -25,47 +24,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -73,8 +37,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -93,8 +55,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -106,7 +66,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -114,8 +74,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -134,8 +92,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -157,7 +113,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -188,14 +150,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -210,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.choropleth.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/selected/__init__.py b/plotly/graph_objs/choropleth/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/choropleth/selected/__init__.py +++ b/plotly/graph_objs/choropleth/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/choropleth/selected/_marker.py b/plotly/graph_objs/choropleth/selected/_marker.py index a7c7881506..757a81e371 100644 --- a/plotly/graph_objs/choropleth/selected/_marker.py +++ b/plotly/graph_objs/choropleth/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.selected" _path_str = "choropleth.selected.marker" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -30,8 +29,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -39,7 +36,7 @@ def _prop_descriptions(self): Sets the marker opacity of selected points. """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Marker object @@ -56,14 +53,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -78,22 +72,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choropleth/unselected/__init__.py b/plotly/graph_objs/choropleth/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/choropleth/unselected/__init__.py +++ b/plotly/graph_objs/choropleth/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/choropleth/unselected/_marker.py b/plotly/graph_objs/choropleth/unselected/_marker.py index 5b1f9b9c4c..4a84df57e1 100644 --- a/plotly/graph_objs/choropleth/unselected/_marker.py +++ b/plotly/graph_objs/choropleth/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choropleth.unselected" _path_str = "choropleth.unselected.marker" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -31,8 +30,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Marker object @@ -59,14 +56,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -81,22 +75,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.choropleth.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/__init__.py b/plotly/graph_objs/choroplethmap/__init__.py index bb31cb6217..7467efa587 100644 --- a/plotly/graph_objs/choroplethmap/__init__.py +++ b/plotly/graph_objs/choroplethmap/__init__.py @@ -1,40 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".colorbar", - ".hoverlabel", - ".legendgrouptitle", - ".marker", - ".selected", - ".unselected", - ], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".colorbar", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/choroplethmap/_colorbar.py b/plotly/graph_objs/choroplethmap/_colorbar.py index b01c415ff5..a7bcff3429 100644 --- a/plotly/graph_objs/choroplethmap/_colorbar.py +++ b/plotly/graph_objs/choroplethmap/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choroplethmap.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.choroplethmap.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.choroplethmap.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.choroplethmap.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/_hoverlabel.py b/plotly/graph_objs/choroplethmap/_hoverlabel.py index 6997ee43b3..c9eb1a25d7 100644 --- a/plotly/graph_objs/choroplethmap/_hoverlabel.py +++ b/plotly/graph_objs/choroplethmap/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.choroplethmap.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/_legendgrouptitle.py b/plotly/graph_objs/choroplethmap/_legendgrouptitle.py index 944e0f424c..ed0ef8df4c 100644 --- a/plotly/graph_objs/choroplethmap/_legendgrouptitle.py +++ b/plotly/graph_objs/choroplethmap/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choroplethmap.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/_marker.py b/plotly/graph_objs/choroplethmap/_marker.py index 29e701b4b5..a2a9294d45 100644 --- a/plotly/graph_objs/choroplethmap/_marker.py +++ b/plotly/graph_objs/choroplethmap/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.marker" _valid_props = {"line", "opacity", "opacitysrc"} - # line - # ---- @property def line(self): """ @@ -21,25 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.choroplethmap.marker.Line @@ -50,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -63,7 +41,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -71,8 +49,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -91,8 +67,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -106,7 +80,14 @@ def _prop_descriptions(self): `opacity`. """ - def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + def __init__( + self, + arg=None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -129,14 +110,11 @@ def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs) ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -151,30 +129,11 @@ def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs) an instance of :class:`plotly.graph_objs.choroplethmap.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/_selected.py b/plotly/graph_objs/choroplethmap/_selected.py index 4261b3718a..8d327f2b38 100644 --- a/plotly/graph_objs/choroplethmap/_selected.py +++ b/plotly/graph_objs/choroplethmap/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,11 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - opacity - Sets the marker opacity of selected points. - Returns ------- plotly.graph_objs.choroplethmap.selected.Marker @@ -36,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -46,7 +38,7 @@ def _prop_descriptions(self): ker` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -64,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -86,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/_stream.py b/plotly/graph_objs/choroplethmap/_stream.py index dd9f018e60..01adf32a77 100644 --- a/plotly/graph_objs/choroplethmap/_stream.py +++ b/plotly/graph_objs/choroplethmap/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/_unselected.py b/plotly/graph_objs/choroplethmap/_unselected.py index 9a3eaf7c93..94d7a2b7a3 100644 --- a/plotly/graph_objs/choroplethmap/_unselected.py +++ b/plotly/graph_objs/choroplethmap/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap" _path_str = "choroplethmap.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,12 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.choroplethmap.unselected.Marker @@ -37,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -47,7 +38,7 @@ def _prop_descriptions(self): arker` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -65,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -87,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/colorbar/__init__.py b/plotly/graph_objs/choroplethmap/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/__init__.py +++ b/plotly/graph_objs/choroplethmap/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py b/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py index dc9704e0ba..6caa0a0b27 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py +++ b/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.colorbar" _path_str = "choroplethmap.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py b/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py index 2d76600577..a4a301fcf0 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/choroplethmap/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.colorbar" _path_str = "choroplethmap.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/colorbar/_title.py b/plotly/graph_objs/choroplethmap/colorbar/_title.py index 4d42a1c321..8648776aaa 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/_title.py +++ b/plotly/graph_objs/choroplethmap/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.colorbar" _path_str = "choroplethmap.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choroplethmap.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py b/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py +++ b/plotly/graph_objs/choroplethmap/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choroplethmap/colorbar/title/_font.py b/plotly/graph_objs/choroplethmap/colorbar/title/_font.py index 4b8af44ad0..502c5a09ff 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/title/_font.py +++ b/plotly/graph_objs/choroplethmap/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.colorbar.title" _path_str = "choroplethmap.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py b/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py +++ b/plotly/graph_objs/choroplethmap/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choroplethmap/hoverlabel/_font.py b/plotly/graph_objs/choroplethmap/hoverlabel/_font.py index fdf1c6d1d0..37b9e2141f 100644 --- a/plotly/graph_objs/choroplethmap/hoverlabel/_font.py +++ b/plotly/graph_objs/choroplethmap/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.hoverlabel" _path_str = "choroplethmap.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py b/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/choroplethmap/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py b/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py index a1eed39e11..9ba578c8fc 100644 --- a/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.legendgrouptitle" _path_str = "choroplethmap.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/marker/__init__.py b/plotly/graph_objs/choroplethmap/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/choroplethmap/marker/__init__.py +++ b/plotly/graph_objs/choroplethmap/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/choroplethmap/marker/_line.py b/plotly/graph_objs/choroplethmap/marker/_line.py index a0e551b88b..ecbc945e27 100644 --- a/plotly/graph_objs/choroplethmap/marker/_line.py +++ b/plotly/graph_objs/choroplethmap/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.marker" _path_str = "choroplethmap.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -25,47 +24,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -73,8 +37,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -93,8 +55,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -106,7 +66,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -114,8 +74,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -134,8 +92,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -157,7 +113,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -188,14 +150,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -210,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmap.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/selected/__init__.py b/plotly/graph_objs/choroplethmap/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/choroplethmap/selected/__init__.py +++ b/plotly/graph_objs/choroplethmap/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/choroplethmap/selected/_marker.py b/plotly/graph_objs/choroplethmap/selected/_marker.py index 9b659e40c7..a6731156d6 100644 --- a/plotly/graph_objs/choroplethmap/selected/_marker.py +++ b/plotly/graph_objs/choroplethmap/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.selected" _path_str = "choroplethmap.selected.marker" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -30,8 +29,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -39,7 +36,7 @@ def _prop_descriptions(self): Sets the marker opacity of selected points. """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Marker object @@ -56,14 +53,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -78,22 +72,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmap/unselected/__init__.py b/plotly/graph_objs/choroplethmap/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/choroplethmap/unselected/__init__.py +++ b/plotly/graph_objs/choroplethmap/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/choroplethmap/unselected/_marker.py b/plotly/graph_objs/choroplethmap/unselected/_marker.py index c2fd93944a..02f95ca8fc 100644 --- a/plotly/graph_objs/choroplethmap/unselected/_marker.py +++ b/plotly/graph_objs/choroplethmap/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmap.unselected" _path_str = "choroplethmap.unselected.marker" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -31,8 +30,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Marker object @@ -59,14 +56,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -81,22 +75,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmap.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/__init__.py b/plotly/graph_objs/choroplethmapbox/__init__.py index bb31cb6217..7467efa587 100644 --- a/plotly/graph_objs/choroplethmapbox/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/__init__.py @@ -1,40 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".colorbar", - ".hoverlabel", - ".legendgrouptitle", - ".marker", - ".selected", - ".unselected", - ], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".colorbar", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/choroplethmapbox/_colorbar.py b/plotly/graph_objs/choroplethmapbox/_colorbar.py index c3e5f1f710..a03e4b2a18 100644 --- a/plotly/graph_objs/choroplethmapbox/_colorbar.py +++ b/plotly/graph_objs/choroplethmapbox/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choroplethmapbox.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.choroplethmapbox.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/_hoverlabel.py b/plotly/graph_objs/choroplethmapbox/_hoverlabel.py index de0a533c59..da495d9479 100644 --- a/plotly/graph_objs/choroplethmapbox/_hoverlabel.py +++ b/plotly/graph_objs/choroplethmapbox/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.choroplethmapbox.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py b/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py index 9056854540..b5faaaed5b 100644 --- a/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py +++ b/plotly/graph_objs/choroplethmapbox/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choroplethmapbox.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/_marker.py b/plotly/graph_objs/choroplethmapbox/_marker.py index 40f0fe6516..cfaa146603 100644 --- a/plotly/graph_objs/choroplethmapbox/_marker.py +++ b/plotly/graph_objs/choroplethmapbox/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.marker" _valid_props = {"line", "opacity", "opacitysrc"} - # line - # ---- @property def line(self): """ @@ -21,25 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.choroplethmapbox.marker.Line @@ -50,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -63,7 +41,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -71,8 +49,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -91,8 +67,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -106,7 +80,14 @@ def _prop_descriptions(self): `opacity`. """ - def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs): + def __init__( + self, + arg=None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -129,14 +110,11 @@ def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs) ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -151,30 +129,11 @@ def __init__(self, arg=None, line=None, opacity=None, opacitysrc=None, **kwargs) an instance of :class:`plotly.graph_objs.choroplethmapbox.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/_selected.py b/plotly/graph_objs/choroplethmapbox/_selected.py index 0d8b3d0bce..ac20c2feaa 100644 --- a/plotly/graph_objs/choroplethmapbox/_selected.py +++ b/plotly/graph_objs/choroplethmapbox/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,11 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - opacity - Sets the marker opacity of selected points. - Returns ------- plotly.graph_objs.choroplethmapbox.selected.Marker @@ -36,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -46,7 +38,7 @@ def _prop_descriptions(self): Marker` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -64,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -86,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/_stream.py b/plotly/graph_objs/choroplethmapbox/_stream.py index 109aa2aaad..ab5680a39c 100644 --- a/plotly/graph_objs/choroplethmapbox/_stream.py +++ b/plotly/graph_objs/choroplethmapbox/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/_unselected.py b/plotly/graph_objs/choroplethmapbox/_unselected.py index e42b481cb2..6fd9604429 100644 --- a/plotly/graph_objs/choroplethmapbox/_unselected.py +++ b/plotly/graph_objs/choroplethmapbox/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox" _path_str = "choroplethmapbox.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,12 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.choroplethmapbox.unselected.Marker @@ -37,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -47,7 +38,7 @@ def _prop_descriptions(self): d.Marker` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -65,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -87,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py b/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py b/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py index 749bc578d0..7f2439e3de 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.colorbar" _path_str = "choroplethmapbox.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py b/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py index 396ee959d2..7030bc829c 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.colorbar" _path_str = "choroplethmapbox.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/_title.py b/plotly/graph_objs/choroplethmapbox/colorbar/_title.py index 2fe9e2be4e..a31272fa38 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/_title.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.colorbar" _path_str = "choroplethmapbox.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.choroplethmapbox.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py b/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py b/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py index 91f2657d33..973c2f4dfe 100644 --- a/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py +++ b/plotly/graph_objs/choroplethmapbox/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.colorbar.title" _path_str = "choroplethmapbox.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py b/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py b/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py index 20baef3110..0e33be8abf 100644 --- a/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py +++ b/plotly/graph_objs/choroplethmapbox/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.hoverlabel" _path_str = "choroplethmapbox.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py b/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py b/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py index cfc6f22938..7b2ea4afaf 100644 --- a/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choroplethmapbox/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.legendgrouptitle" _path_str = "choroplethmapbox.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/marker/__init__.py b/plotly/graph_objs/choroplethmapbox/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/choroplethmapbox/marker/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/choroplethmapbox/marker/_line.py b/plotly/graph_objs/choroplethmapbox/marker/_line.py index 356d7ba20d..d8d9d16178 100644 --- a/plotly/graph_objs/choroplethmapbox/marker/_line.py +++ b/plotly/graph_objs/choroplethmapbox/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.marker" _path_str = "choroplethmapbox.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -25,47 +24,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -73,8 +37,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -93,8 +55,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -106,7 +66,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -114,8 +74,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -134,8 +92,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -157,7 +113,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -188,14 +150,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -210,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.choroplethmapbox.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/selected/__init__.py b/plotly/graph_objs/choroplethmapbox/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/choroplethmapbox/selected/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/choroplethmapbox/selected/_marker.py b/plotly/graph_objs/choroplethmapbox/selected/_marker.py index f4ec556e34..ceb38c2a17 100644 --- a/plotly/graph_objs/choroplethmapbox/selected/_marker.py +++ b/plotly/graph_objs/choroplethmapbox/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.selected" _path_str = "choroplethmapbox.selected.marker" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -30,8 +29,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -39,7 +36,7 @@ def _prop_descriptions(self): Sets the marker opacity of selected points. """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Marker object @@ -56,14 +53,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -78,22 +72,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/choroplethmapbox/unselected/__init__.py b/plotly/graph_objs/choroplethmapbox/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/choroplethmapbox/unselected/__init__.py +++ b/plotly/graph_objs/choroplethmapbox/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/choroplethmapbox/unselected/_marker.py b/plotly/graph_objs/choroplethmapbox/unselected/_marker.py index 1d6bdff0ab..c3446a7e4f 100644 --- a/plotly/graph_objs/choroplethmapbox/unselected/_marker.py +++ b/plotly/graph_objs/choroplethmapbox/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "choroplethmapbox.unselected" _path_str = "choroplethmapbox.unselected.marker" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -31,8 +30,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Marker object @@ -59,14 +56,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -81,22 +75,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.choroplethmapbox.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/__init__.py b/plotly/graph_objs/cone/__init__.py index 6faa693279..c3eb9c5f21 100644 --- a/plotly/graph_objs/cone/__init__.py +++ b/plotly/graph_objs/cone/__init__.py @@ -1,28 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._lighting import Lighting - from ._lightposition import Lightposition - from ._stream import Stream - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._lighting.Lighting", - "._lightposition.Lightposition", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/cone/_colorbar.py b/plotly/graph_objs/cone/_colorbar.py index d0a9bfcca9..9a1ac987f8 100644 --- a/plotly/graph_objs/cone/_colorbar.py +++ b/plotly/graph_objs/cone/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone" _path_str = "cone.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.cone.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.cone.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.cone.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.cone.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1984,14 +1649,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2006,214 +1668,57 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/_hoverlabel.py b/plotly/graph_objs/cone/_hoverlabel.py index ef2366f78b..85ce40fb4b 100644 --- a/plotly/graph_objs/cone/_hoverlabel.py +++ b/plotly/graph_objs/cone/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone" _path_str = "cone.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.cone.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/_legendgrouptitle.py b/plotly/graph_objs/cone/_legendgrouptitle.py index 24dc61b02e..97fbb09103 100644 --- a/plotly/graph_objs/cone/_legendgrouptitle.py +++ b/plotly/graph_objs/cone/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone" _path_str = "cone.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.cone.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.cone.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/_lighting.py b/plotly/graph_objs/cone/_lighting.py index d30017a71f..8edc9c71c6 100644 --- a/plotly/graph_objs/cone/_lighting.py +++ b/plotly/graph_objs/cone/_lighting.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lighting(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone" _path_str = "cone.lighting" _valid_props = { @@ -18,8 +19,6 @@ class Lighting(_BaseTraceHierarchyType): "vertexnormalsepsilon", } - # ambient - # ------- @property def ambient(self): """ @@ -39,8 +38,6 @@ def ambient(self): def ambient(self, val): self["ambient"] = val - # diffuse - # ------- @property def diffuse(self): """ @@ -60,8 +57,6 @@ def diffuse(self): def diffuse(self, val): self["diffuse"] = val - # facenormalsepsilon - # ------------------ @property def facenormalsepsilon(self): """ @@ -81,8 +76,6 @@ def facenormalsepsilon(self): def facenormalsepsilon(self, val): self["facenormalsepsilon"] = val - # fresnel - # ------- @property def fresnel(self): """ @@ -103,8 +96,6 @@ def fresnel(self): def fresnel(self, val): self["fresnel"] = val - # roughness - # --------- @property def roughness(self): """ @@ -124,8 +115,6 @@ def roughness(self): def roughness(self, val): self["roughness"] = val - # specular - # -------- @property def specular(self): """ @@ -145,8 +134,6 @@ def specular(self): def specular(self, val): self["specular"] = val - # vertexnormalsepsilon - # -------------------- @property def vertexnormalsepsilon(self): """ @@ -166,8 +153,6 @@ def vertexnormalsepsilon(self): def vertexnormalsepsilon(self, val): self["vertexnormalsepsilon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -199,13 +184,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, + ambient: int | float | None = None, + diffuse: int | float | None = None, + facenormalsepsilon: int | float | None = None, + fresnel: int | float | None = None, + roughness: int | float | None = None, + specular: int | float | None = None, + vertexnormalsepsilon: int | float | None = None, **kwargs, ): """ @@ -244,14 +229,11 @@ def __init__( ------- Lighting """ - super(Lighting, self).__init__("lighting") - + super().__init__("lighting") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -266,46 +248,15 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.Lighting`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - _v = ambient if ambient is not None else _v - if _v is not None: - self["ambient"] = _v - _v = arg.pop("diffuse", None) - _v = diffuse if diffuse is not None else _v - if _v is not None: - self["diffuse"] = _v - _v = arg.pop("facenormalsepsilon", None) - _v = facenormalsepsilon if facenormalsepsilon is not None else _v - if _v is not None: - self["facenormalsepsilon"] = _v - _v = arg.pop("fresnel", None) - _v = fresnel if fresnel is not None else _v - if _v is not None: - self["fresnel"] = _v - _v = arg.pop("roughness", None) - _v = roughness if roughness is not None else _v - if _v is not None: - self["roughness"] = _v - _v = arg.pop("specular", None) - _v = specular if specular is not None else _v - if _v is not None: - self["specular"] = _v - _v = arg.pop("vertexnormalsepsilon", None) - _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - if _v is not None: - self["vertexnormalsepsilon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("ambient", arg, ambient) + self._init_provided("diffuse", arg, diffuse) + self._init_provided("facenormalsepsilon", arg, facenormalsepsilon) + self._init_provided("fresnel", arg, fresnel) + self._init_provided("roughness", arg, roughness) + self._init_provided("specular", arg, specular) + self._init_provided("vertexnormalsepsilon", arg, vertexnormalsepsilon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/_lightposition.py b/plotly/graph_objs/cone/_lightposition.py index 9751ecc083..a966f8f69d 100644 --- a/plotly/graph_objs/cone/_lightposition.py +++ b/plotly/graph_objs/cone/_lightposition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone" _path_str = "cone.lightposition" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -30,8 +29,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -50,8 +47,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -70,8 +65,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): vertex. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Lightposition object @@ -110,14 +110,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Lightposition """ - super(Lightposition, self).__init__("lightposition") - + super().__init__("lightposition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.cone.Lightposition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/_stream.py b/plotly/graph_objs/cone/_stream.py index 369a19fffe..19aee35333 100644 --- a/plotly/graph_objs/cone/_stream.py +++ b/plotly/graph_objs/cone/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone" _path_str = "cone.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.cone.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/colorbar/__init__.py b/plotly/graph_objs/cone/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/cone/colorbar/__init__.py +++ b/plotly/graph_objs/cone/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/cone/colorbar/_tickfont.py b/plotly/graph_objs/cone/colorbar/_tickfont.py index 2381270385..fc88b91c04 100644 --- a/plotly/graph_objs/cone/colorbar/_tickfont.py +++ b/plotly/graph_objs/cone/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone.colorbar" _path_str = "cone.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/colorbar/_tickformatstop.py b/plotly/graph_objs/cone/colorbar/_tickformatstop.py index e0fee742fd..d031dd6b35 100644 --- a/plotly/graph_objs/cone/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/cone/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone.colorbar" _path_str = "cone.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/colorbar/_title.py b/plotly/graph_objs/cone/colorbar/_title.py index 97e1d202eb..7344dc8811 100644 --- a/plotly/graph_objs/cone/colorbar/_title.py +++ b/plotly/graph_objs/cone/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone.colorbar" _path_str = "cone.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.cone.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.cone.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/colorbar/title/__init__.py b/plotly/graph_objs/cone/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/cone/colorbar/title/__init__.py +++ b/plotly/graph_objs/cone/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/cone/colorbar/title/_font.py b/plotly/graph_objs/cone/colorbar/title/_font.py index 9f0f703aa9..1b55d29b78 100644 --- a/plotly/graph_objs/cone/colorbar/title/_font.py +++ b/plotly/graph_objs/cone/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone.colorbar.title" _path_str = "cone.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/hoverlabel/__init__.py b/plotly/graph_objs/cone/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/cone/hoverlabel/__init__.py +++ b/plotly/graph_objs/cone/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/cone/hoverlabel/_font.py b/plotly/graph_objs/cone/hoverlabel/_font.py index b91545dc98..911ea64200 100644 --- a/plotly/graph_objs/cone/hoverlabel/_font.py +++ b/plotly/graph_objs/cone/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone.hoverlabel" _path_str = "cone.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/cone/legendgrouptitle/__init__.py b/plotly/graph_objs/cone/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/cone/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/cone/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/cone/legendgrouptitle/_font.py b/plotly/graph_objs/cone/legendgrouptitle/_font.py index 63ce18de9a..5518e1f9c5 100644 --- a/plotly/graph_objs/cone/legendgrouptitle/_font.py +++ b/plotly/graph_objs/cone/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "cone.legendgrouptitle" _path_str = "cone.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.cone.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/__init__.py b/plotly/graph_objs/contour/__init__.py index 7b983d6452..6830694f75 100644 --- a/plotly/graph_objs/contour/__init__.py +++ b/plotly/graph_objs/contour/__init__.py @@ -1,31 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._contours import Contours - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._stream import Stream - from ._textfont import Textfont - from . import colorbar - from . import contours - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._contours.Contours", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._stream.Stream", - "._textfont.Textfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contours.Contours", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + "._textfont.Textfont", + ], +) diff --git a/plotly/graph_objs/contour/_colorbar.py b/plotly/graph_objs/contour/_colorbar.py index 317b4ef44b..dcca8b752c 100644 --- a/plotly/graph_objs/contour/_colorbar.py +++ b/plotly/graph_objs/contour/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contour.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.contour.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.contour.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.contour.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/_contours.py b/plotly/graph_objs/contour/_contours.py index 4ad82b3cd1..1d5f4d7939 100644 --- a/plotly/graph_objs/contour/_contours.py +++ b/plotly/graph_objs/contour/_contours.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contours(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.contours" _valid_props = { @@ -22,8 +23,6 @@ class Contours(_BaseTraceHierarchyType): "value", } - # coloring - # -------- @property def coloring(self): """ @@ -47,8 +46,6 @@ def coloring(self): def coloring(self, val): self["coloring"] = val - # end - # --- @property def end(self): """ @@ -68,8 +65,6 @@ def end(self): def end(self, val): self["end"] = val - # labelfont - # --------- @property def labelfont(self): """ @@ -83,52 +78,6 @@ def labelfont(self): - A dict of string/value properties that will be passed to the Labelfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contour.contours.Labelfont @@ -139,8 +88,6 @@ def labelfont(self): def labelfont(self, val): self["labelfont"] = val - # labelformat - # ----------- @property def labelformat(self): """ @@ -163,8 +110,6 @@ def labelformat(self): def labelformat(self, val): self["labelformat"] = val - # operation - # --------- @property def operation(self): """ @@ -192,8 +137,6 @@ def operation(self): def operation(self, val): self["operation"] = val - # showlabels - # ---------- @property def showlabels(self): """ @@ -213,8 +156,6 @@ def showlabels(self): def showlabels(self, val): self["showlabels"] = val - # showlines - # --------- @property def showlines(self): """ @@ -234,8 +175,6 @@ def showlines(self): def showlines(self, val): self["showlines"] = val - # size - # ---- @property def size(self): """ @@ -254,8 +193,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -275,8 +212,6 @@ def start(self): def start(self, val): self["start"] = val - # type - # ---- @property def type(self): """ @@ -299,8 +234,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -324,8 +257,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -389,17 +320,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - coloring=None, - end=None, - labelfont=None, - labelformat=None, - operation=None, - showlabels=None, - showlines=None, - size=None, - start=None, - type=None, - value=None, + coloring: Any | None = None, + end: int | float | None = None, + labelfont: None | None = None, + labelformat: str | None = None, + operation: Any | None = None, + showlabels: bool | None = None, + showlines: bool | None = None, + size: int | float | None = None, + start: int | float | None = None, + type: Any | None = None, + value: Any | None = None, **kwargs, ): """ @@ -471,14 +402,11 @@ def __init__( ------- Contours """ - super(Contours, self).__init__("contours") - + super().__init__("contours") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -493,62 +421,19 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.Contours`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("coloring", None) - _v = coloring if coloring is not None else _v - if _v is not None: - self["coloring"] = _v - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("labelfont", None) - _v = labelfont if labelfont is not None else _v - if _v is not None: - self["labelfont"] = _v - _v = arg.pop("labelformat", None) - _v = labelformat if labelformat is not None else _v - if _v is not None: - self["labelformat"] = _v - _v = arg.pop("operation", None) - _v = operation if operation is not None else _v - if _v is not None: - self["operation"] = _v - _v = arg.pop("showlabels", None) - _v = showlabels if showlabels is not None else _v - if _v is not None: - self["showlabels"] = _v - _v = arg.pop("showlines", None) - _v = showlines if showlines is not None else _v - if _v is not None: - self["showlines"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("coloring", arg, coloring) + self._init_provided("end", arg, end) + self._init_provided("labelfont", arg, labelfont) + self._init_provided("labelformat", arg, labelformat) + self._init_provided("operation", arg, operation) + self._init_provided("showlabels", arg, showlabels) + self._init_provided("showlines", arg, showlines) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/_hoverlabel.py b/plotly/graph_objs/contour/_hoverlabel.py index 52d7b6bf37..59b7a0aff3 100644 --- a/plotly/graph_objs/contour/_hoverlabel.py +++ b/plotly/graph_objs/contour/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.contour.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/_legendgrouptitle.py b/plotly/graph_objs/contour/_legendgrouptitle.py index 40421668d9..d19a221fad 100644 --- a/plotly/graph_objs/contour/_legendgrouptitle.py +++ b/plotly/graph_objs/contour/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contour.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.contour.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/_line.py b/plotly/graph_objs/contour/_line.py index 9e307806d7..9276a2462c 100644 --- a/plotly/graph_objs/contour/_line.py +++ b/plotly/graph_objs/contour/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.line" _valid_props = {"color", "dash", "smoothing", "width"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -96,8 +58,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -117,8 +77,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -139,8 +97,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -162,7 +118,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, dash=None, smoothing=None, width=None, **kwargs + self, + arg=None, + color: str | None = None, + dash: str | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, + **kwargs, ): """ Construct a new Line object @@ -192,14 +154,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -214,34 +173,12 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/_stream.py b/plotly/graph_objs/contour/_stream.py index 25e7f6ff1d..a285f8ca39 100644 --- a/plotly/graph_objs/contour/_stream.py +++ b/plotly/graph_objs/contour/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.contour.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/_textfont.py b/plotly/graph_objs/contour/_textfont.py index 96dabd6ae9..87fb7be74d 100644 --- a/plotly/graph_objs/contour/_textfont.py +++ b/plotly/graph_objs/contour/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour" _path_str = "contour.textfont" _valid_props = { @@ -20,8 +21,6 @@ class Textfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/colorbar/__init__.py b/plotly/graph_objs/contour/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/contour/colorbar/__init__.py +++ b/plotly/graph_objs/contour/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/contour/colorbar/_tickfont.py b/plotly/graph_objs/contour/colorbar/_tickfont.py index b1bdca8419..03ce15ec0f 100644 --- a/plotly/graph_objs/contour/colorbar/_tickfont.py +++ b/plotly/graph_objs/contour/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.colorbar" _path_str = "contour.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/colorbar/_tickformatstop.py b/plotly/graph_objs/contour/colorbar/_tickformatstop.py index 6fc65bf498..c1ab01a5ed 100644 --- a/plotly/graph_objs/contour/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/contour/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.colorbar" _path_str = "contour.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/colorbar/_title.py b/plotly/graph_objs/contour/colorbar/_title.py index 6e1d84d778..e5df1eba1b 100644 --- a/plotly/graph_objs/contour/colorbar/_title.py +++ b/plotly/graph_objs/contour/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.colorbar" _path_str = "contour.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contour.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.contour.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/colorbar/title/__init__.py b/plotly/graph_objs/contour/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/contour/colorbar/title/__init__.py +++ b/plotly/graph_objs/contour/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/contour/colorbar/title/_font.py b/plotly/graph_objs/contour/colorbar/title/_font.py index 88ab8d6366..8c0c88a6d6 100644 --- a/plotly/graph_objs/contour/colorbar/title/_font.py +++ b/plotly/graph_objs/contour/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.colorbar.title" _path_str = "contour.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/contours/__init__.py b/plotly/graph_objs/contour/contours/__init__.py index f1ee5b7524..ca8d81e748 100644 --- a/plotly/graph_objs/contour/contours/__init__.py +++ b/plotly/graph_objs/contour/contours/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._labelfont import Labelfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._labelfont.Labelfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._labelfont.Labelfont"]) diff --git a/plotly/graph_objs/contour/contours/_labelfont.py b/plotly/graph_objs/contour/contours/_labelfont.py index 1e3a2c32d3..f856f4e1a8 100644 --- a/plotly/graph_objs/contour/contours/_labelfont.py +++ b/plotly/graph_objs/contour/contours/_labelfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Labelfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.contours" _path_str = "contour.contours.labelfont" _valid_props = { @@ -20,8 +21,6 @@ class Labelfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -340,18 +272,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -379,14 +304,11 @@ def __init__( ------- Labelfont """ - super(Labelfont, self).__init__("labelfont") - + super().__init__("labelfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -401,54 +323,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.contours.Labelfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/hoverlabel/__init__.py b/plotly/graph_objs/contour/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/contour/hoverlabel/__init__.py +++ b/plotly/graph_objs/contour/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/contour/hoverlabel/_font.py b/plotly/graph_objs/contour/hoverlabel/_font.py index 0eea706a79..1f20c7c44d 100644 --- a/plotly/graph_objs/contour/hoverlabel/_font.py +++ b/plotly/graph_objs/contour/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.hoverlabel" _path_str = "contour.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contour/legendgrouptitle/__init__.py b/plotly/graph_objs/contour/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/contour/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/contour/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/contour/legendgrouptitle/_font.py b/plotly/graph_objs/contour/legendgrouptitle/_font.py index 936dcca095..ca90db774f 100644 --- a/plotly/graph_objs/contour/legendgrouptitle/_font.py +++ b/plotly/graph_objs/contour/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contour.legendgrouptitle" _path_str = "contour.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contour.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/__init__.py b/plotly/graph_objs/contourcarpet/__init__.py index 30f6437a53..8fe23c2e45 100644 --- a/plotly/graph_objs/contourcarpet/__init__.py +++ b/plotly/graph_objs/contourcarpet/__init__.py @@ -1,26 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._contours import Contours - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._stream import Stream - from . import colorbar - from . import contours - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".contours", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._contours.Contours", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".contours", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contours.Contours", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/contourcarpet/_colorbar.py b/plotly/graph_objs/contourcarpet/_colorbar.py index 9a7d615e5f..d636d0a84d 100644 --- a/plotly/graph_objs/contourcarpet/_colorbar.py +++ b/plotly/graph_objs/contourcarpet/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet" _path_str = "contourcarpet.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contourcarpet.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.contourcarpet.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.contourcarpet.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.contourcarpet.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/_contours.py b/plotly/graph_objs/contourcarpet/_contours.py index 1a42279c36..daf42050f1 100644 --- a/plotly/graph_objs/contourcarpet/_contours.py +++ b/plotly/graph_objs/contourcarpet/_contours.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contours(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet" _path_str = "contourcarpet.contours" _valid_props = { @@ -22,8 +23,6 @@ class Contours(_BaseTraceHierarchyType): "value", } - # coloring - # -------- @property def coloring(self): """ @@ -46,8 +45,6 @@ def coloring(self): def coloring(self, val): self["coloring"] = val - # end - # --- @property def end(self): """ @@ -67,8 +64,6 @@ def end(self): def end(self, val): self["end"] = val - # labelfont - # --------- @property def labelfont(self): """ @@ -82,52 +77,6 @@ def labelfont(self): - A dict of string/value properties that will be passed to the Labelfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contourcarpet.contours.Labelfont @@ -138,8 +87,6 @@ def labelfont(self): def labelfont(self, val): self["labelfont"] = val - # labelformat - # ----------- @property def labelformat(self): """ @@ -162,8 +109,6 @@ def labelformat(self): def labelformat(self, val): self["labelformat"] = val - # operation - # --------- @property def operation(self): """ @@ -191,8 +136,6 @@ def operation(self): def operation(self, val): self["operation"] = val - # showlabels - # ---------- @property def showlabels(self): """ @@ -212,8 +155,6 @@ def showlabels(self): def showlabels(self, val): self["showlabels"] = val - # showlines - # --------- @property def showlines(self): """ @@ -233,8 +174,6 @@ def showlines(self): def showlines(self, val): self["showlines"] = val - # size - # ---- @property def size(self): """ @@ -253,8 +192,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -274,8 +211,6 @@ def start(self): def start(self, val): self["start"] = val - # type - # ---- @property def type(self): """ @@ -298,8 +233,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -323,8 +256,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -387,17 +318,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - coloring=None, - end=None, - labelfont=None, - labelformat=None, - operation=None, - showlabels=None, - showlines=None, - size=None, - start=None, - type=None, - value=None, + coloring: Any | None = None, + end: int | float | None = None, + labelfont: None | None = None, + labelformat: str | None = None, + operation: Any | None = None, + showlabels: bool | None = None, + showlines: bool | None = None, + size: int | float | None = None, + start: int | float | None = None, + type: Any | None = None, + value: Any | None = None, **kwargs, ): """ @@ -468,14 +399,11 @@ def __init__( ------- Contours """ - super(Contours, self).__init__("contours") - + super().__init__("contours") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,62 +418,19 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.Contours`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("coloring", None) - _v = coloring if coloring is not None else _v - if _v is not None: - self["coloring"] = _v - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("labelfont", None) - _v = labelfont if labelfont is not None else _v - if _v is not None: - self["labelfont"] = _v - _v = arg.pop("labelformat", None) - _v = labelformat if labelformat is not None else _v - if _v is not None: - self["labelformat"] = _v - _v = arg.pop("operation", None) - _v = operation if operation is not None else _v - if _v is not None: - self["operation"] = _v - _v = arg.pop("showlabels", None) - _v = showlabels if showlabels is not None else _v - if _v is not None: - self["showlabels"] = _v - _v = arg.pop("showlines", None) - _v = showlines if showlines is not None else _v - if _v is not None: - self["showlines"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("coloring", arg, coloring) + self._init_provided("end", arg, end) + self._init_provided("labelfont", arg, labelfont) + self._init_provided("labelformat", arg, labelformat) + self._init_provided("operation", arg, operation) + self._init_provided("showlabels", arg, showlabels) + self._init_provided("showlines", arg, showlines) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/_legendgrouptitle.py b/plotly/graph_objs/contourcarpet/_legendgrouptitle.py index d2762d9296..7fd1fc7c3e 100644 --- a/plotly/graph_objs/contourcarpet/_legendgrouptitle.py +++ b/plotly/graph_objs/contourcarpet/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet" _path_str = "contourcarpet.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contourcarpet.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.contourcarpet.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/_line.py b/plotly/graph_objs/contourcarpet/_line.py index 3fb5eced23..a605a4bacd 100644 --- a/plotly/graph_objs/contourcarpet/_line.py +++ b/plotly/graph_objs/contourcarpet/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet" _path_str = "contourcarpet.line" _valid_props = {"color", "dash", "smoothing", "width"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -96,8 +58,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -117,8 +77,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -139,8 +97,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -162,7 +118,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, dash=None, smoothing=None, width=None, **kwargs + self, + arg=None, + color: str | None = None, + dash: str | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, + **kwargs, ): """ Construct a new Line object @@ -193,14 +155,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -215,34 +174,12 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/_stream.py b/plotly/graph_objs/contourcarpet/_stream.py index a2e5b4b748..0b5838250e 100644 --- a/plotly/graph_objs/contourcarpet/_stream.py +++ b/plotly/graph_objs/contourcarpet/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet" _path_str = "contourcarpet.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.contourcarpet.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/colorbar/__init__.py b/plotly/graph_objs/contourcarpet/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/__init__.py +++ b/plotly/graph_objs/contourcarpet/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py b/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py index f2b70b48f4..931c11783f 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py +++ b/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet.colorbar" _path_str = "contourcarpet.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py b/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py index 6ebdca1e99..60924d30b3 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/contourcarpet/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet.colorbar" _path_str = "contourcarpet.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/colorbar/_title.py b/plotly/graph_objs/contourcarpet/colorbar/_title.py index 6bcccdb484..55c1d6bdf8 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/_title.py +++ b/plotly/graph_objs/contourcarpet/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet.colorbar" _path_str = "contourcarpet.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.contourcarpet.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py b/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py +++ b/plotly/graph_objs/contourcarpet/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/contourcarpet/colorbar/title/_font.py b/plotly/graph_objs/contourcarpet/colorbar/title/_font.py index 088c55b62b..b010933d4b 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/title/_font.py +++ b/plotly/graph_objs/contourcarpet/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet.colorbar.title" _path_str = "contourcarpet.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/contours/__init__.py b/plotly/graph_objs/contourcarpet/contours/__init__.py index f1ee5b7524..ca8d81e748 100644 --- a/plotly/graph_objs/contourcarpet/contours/__init__.py +++ b/plotly/graph_objs/contourcarpet/contours/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._labelfont import Labelfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._labelfont.Labelfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._labelfont.Labelfont"]) diff --git a/plotly/graph_objs/contourcarpet/contours/_labelfont.py b/plotly/graph_objs/contourcarpet/contours/_labelfont.py index b00c790bea..e8f87e2dd9 100644 --- a/plotly/graph_objs/contourcarpet/contours/_labelfont.py +++ b/plotly/graph_objs/contourcarpet/contours/_labelfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Labelfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet.contours" _path_str = "contourcarpet.contours.labelfont" _valid_props = { @@ -20,8 +21,6 @@ class Labelfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -340,18 +272,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -379,14 +304,11 @@ def __init__( ------- Labelfont """ - super(Labelfont, self).__init__("labelfont") - + super().__init__("labelfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -401,54 +323,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.contours.Labelfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py b/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/contourcarpet/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py b/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py index 0a27236553..4977dae3a2 100644 --- a/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "contourcarpet.legendgrouptitle" _path_str = "contourcarpet.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.contourcarpet.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/__init__.py b/plotly/graph_objs/densitymap/__init__.py index 1735c919df..90ecc6d2d0 100644 --- a/plotly/graph_objs/densitymap/__init__.py +++ b/plotly/graph_objs/densitymap/__init__.py @@ -1,24 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._stream import Stream - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/densitymap/_colorbar.py b/plotly/graph_objs/densitymap/_colorbar.py index 5ebb30f470..89d8d4868a 100644 --- a/plotly/graph_objs/densitymap/_colorbar.py +++ b/plotly/graph_objs/densitymap/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap" _path_str = "densitymap.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.densitymap.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.densitymap.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -912,8 +637,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.densitymap.colorbar.Tickformatstop @@ -924,8 +647,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -948,8 +669,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -973,8 +692,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -999,8 +716,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1019,8 +734,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1046,8 +759,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1067,8 +778,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1090,8 +799,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1111,8 +818,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1125,7 +830,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1133,8 +838,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1153,8 +856,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1166,7 +867,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1174,8 +875,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1194,8 +893,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1214,8 +911,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1225,18 +920,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.densitymap.colorbar.Title @@ -1247,8 +930,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1273,8 +954,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1297,8 +976,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1317,8 +994,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1340,8 +1015,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1366,8 +1039,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1390,8 +1061,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1410,8 +1079,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1433,8 +1100,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1681,55 +1346,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1984,14 +1649,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2006,214 +1668,57 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/_hoverlabel.py b/plotly/graph_objs/densitymap/_hoverlabel.py index afefd7894b..3819eff3c5 100644 --- a/plotly/graph_objs/densitymap/_hoverlabel.py +++ b/plotly/graph_objs/densitymap/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap" _path_str = "densitymap.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.densitymap.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/_legendgrouptitle.py b/plotly/graph_objs/densitymap/_legendgrouptitle.py index c5e3e59928..be14f286f3 100644 --- a/plotly/graph_objs/densitymap/_legendgrouptitle.py +++ b/plotly/graph_objs/densitymap/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap" _path_str = "densitymap.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.densitymap.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.densitymap.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/_stream.py b/plotly/graph_objs/densitymap/_stream.py index 07ae6f1546..e8ec3bf2b8 100644 --- a/plotly/graph_objs/densitymap/_stream.py +++ b/plotly/graph_objs/densitymap/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap" _path_str = "densitymap.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.densitymap.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/colorbar/__init__.py b/plotly/graph_objs/densitymap/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/densitymap/colorbar/__init__.py +++ b/plotly/graph_objs/densitymap/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/densitymap/colorbar/_tickfont.py b/plotly/graph_objs/densitymap/colorbar/_tickfont.py index a015d64eea..54b0d39523 100644 --- a/plotly/graph_objs/densitymap/colorbar/_tickfont.py +++ b/plotly/graph_objs/densitymap/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap.colorbar" _path_str = "densitymap.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py b/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py index c8dffcdf78..f996c3551f 100644 --- a/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/densitymap/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap.colorbar" _path_str = "densitymap.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/colorbar/_title.py b/plotly/graph_objs/densitymap/colorbar/_title.py index 07e58bbd21..b8ec8ff9d6 100644 --- a/plotly/graph_objs/densitymap/colorbar/_title.py +++ b/plotly/graph_objs/densitymap/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap.colorbar" _path_str = "densitymap.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.densitymap.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.densitymap.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/colorbar/title/__init__.py b/plotly/graph_objs/densitymap/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/densitymap/colorbar/title/__init__.py +++ b/plotly/graph_objs/densitymap/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/densitymap/colorbar/title/_font.py b/plotly/graph_objs/densitymap/colorbar/title/_font.py index 8d5633e92b..65c2af1238 100644 --- a/plotly/graph_objs/densitymap/colorbar/title/_font.py +++ b/plotly/graph_objs/densitymap/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap.colorbar.title" _path_str = "densitymap.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/hoverlabel/__init__.py b/plotly/graph_objs/densitymap/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/densitymap/hoverlabel/__init__.py +++ b/plotly/graph_objs/densitymap/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/densitymap/hoverlabel/_font.py b/plotly/graph_objs/densitymap/hoverlabel/_font.py index 689a1d3fc7..4d1608ad89 100644 --- a/plotly/graph_objs/densitymap/hoverlabel/_font.py +++ b/plotly/graph_objs/densitymap/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap.hoverlabel" _path_str = "densitymap.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py b/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/densitymap/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/densitymap/legendgrouptitle/_font.py b/plotly/graph_objs/densitymap/legendgrouptitle/_font.py index d89764fba7..ed964ecbe8 100644 --- a/plotly/graph_objs/densitymap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/densitymap/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymap.legendgrouptitle" _path_str = "densitymap.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymap.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/__init__.py b/plotly/graph_objs/densitymapbox/__init__.py index 1735c919df..90ecc6d2d0 100644 --- a/plotly/graph_objs/densitymapbox/__init__.py +++ b/plotly/graph_objs/densitymapbox/__init__.py @@ -1,24 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._stream import Stream - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/densitymapbox/_colorbar.py b/plotly/graph_objs/densitymapbox/_colorbar.py index ea1484fe32..fff908eae2 100644 --- a/plotly/graph_objs/densitymapbox/_colorbar.py +++ b/plotly/graph_objs/densitymapbox/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox" _path_str = "densitymapbox.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.densitymapbox.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.densitymapbox.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.densitymapbox.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.densitymapbox.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/_hoverlabel.py b/plotly/graph_objs/densitymapbox/_hoverlabel.py index 58d689d30a..657c4f64fd 100644 --- a/plotly/graph_objs/densitymapbox/_hoverlabel.py +++ b/plotly/graph_objs/densitymapbox/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox" _path_str = "densitymapbox.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.densitymapbox.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/_legendgrouptitle.py b/plotly/graph_objs/densitymapbox/_legendgrouptitle.py index 73db098292..de897cec3b 100644 --- a/plotly/graph_objs/densitymapbox/_legendgrouptitle.py +++ b/plotly/graph_objs/densitymapbox/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox" _path_str = "densitymapbox.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.densitymapbox.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.densitymapbox.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/_stream.py b/plotly/graph_objs/densitymapbox/_stream.py index de8233ade4..dcdd0c5e87 100644 --- a/plotly/graph_objs/densitymapbox/_stream.py +++ b/plotly/graph_objs/densitymapbox/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox" _path_str = "densitymapbox.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.densitymapbox.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/colorbar/__init__.py b/plotly/graph_objs/densitymapbox/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/__init__.py +++ b/plotly/graph_objs/densitymapbox/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py b/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py index ea94f9a537..9ea69476fb 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py +++ b/plotly/graph_objs/densitymapbox/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox.colorbar" _path_str = "densitymapbox.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py b/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py index ac85a0876e..c644b491b3 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/densitymapbox/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox.colorbar" _path_str = "densitymapbox.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/colorbar/_title.py b/plotly/graph_objs/densitymapbox/colorbar/_title.py index 0e0f9e2bfd..0d3926f31e 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/_title.py +++ b/plotly/graph_objs/densitymapbox/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox.colorbar" _path_str = "densitymapbox.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.densitymapbox.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py b/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py +++ b/plotly/graph_objs/densitymapbox/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/densitymapbox/colorbar/title/_font.py b/plotly/graph_objs/densitymapbox/colorbar/title/_font.py index b2df8f5e18..0744b3f8d6 100644 --- a/plotly/graph_objs/densitymapbox/colorbar/title/_font.py +++ b/plotly/graph_objs/densitymapbox/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox.colorbar.title" _path_str = "densitymapbox.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py b/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py +++ b/plotly/graph_objs/densitymapbox/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/densitymapbox/hoverlabel/_font.py b/plotly/graph_objs/densitymapbox/hoverlabel/_font.py index 911b301cd2..00a61df476 100644 --- a/plotly/graph_objs/densitymapbox/hoverlabel/_font.py +++ b/plotly/graph_objs/densitymapbox/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox.hoverlabel" _path_str = "densitymapbox.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/densitymapbox/legendgrouptitle/__init__.py b/plotly/graph_objs/densitymapbox/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/densitymapbox/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/densitymapbox/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py b/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py index 56a65819eb..0b3cd0b891 100644 --- a/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py +++ b/plotly/graph_objs/densitymapbox/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "densitymapbox.legendgrouptitle" _path_str = "densitymapbox.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.densitymapbox.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/__init__.py b/plotly/graph_objs/funnel/__init__.py index 9123f70c41..e0dcdc7a11 100644 --- a/plotly/graph_objs/funnel/__init__.py +++ b/plotly/graph_objs/funnel/__init__.py @@ -1,33 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._connector import Connector - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._stream import Stream - from ._textfont import Textfont - from . import connector - from . import hoverlabel - from . import legendgrouptitle - from . import marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".connector", ".hoverlabel", ".legendgrouptitle", ".marker"], - [ - "._connector.Connector", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._stream.Stream", - "._textfont.Textfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".connector", ".hoverlabel", ".legendgrouptitle", ".marker"], + [ + "._connector.Connector", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._stream.Stream", + "._textfont.Textfont", + ], +) diff --git a/plotly/graph_objs/funnel/_connector.py b/plotly/graph_objs/funnel/_connector.py index e50299bb7b..eb7d43079f 100644 --- a/plotly/graph_objs/funnel/_connector.py +++ b/plotly/graph_objs/funnel/_connector.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Connector(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.connector" _valid_props = {"fillcolor", "line", "visible"} - # fillcolor - # --------- @property def fillcolor(self): """ @@ -22,42 +21,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # line - # ---- @property def line(self): """ @@ -80,18 +42,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.funnel.connector.Line @@ -102,8 +52,6 @@ def line(self): def line(self, val): self["line"] = val - # visible - # ------- @property def visible(self): """ @@ -122,8 +70,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -136,7 +82,14 @@ def _prop_descriptions(self): Determines if connector regions and lines are drawn. """ - def __init__(self, arg=None, fillcolor=None, line=None, visible=None, **kwargs): + def __init__( + self, + arg=None, + fillcolor: str | None = None, + line: None | None = None, + visible: bool | None = None, + **kwargs, + ): """ Construct a new Connector object @@ -158,14 +111,11 @@ def __init__(self, arg=None, fillcolor=None, line=None, visible=None, **kwargs): ------- Connector """ - super(Connector, self).__init__("connector") - + super().__init__("connector") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -180,30 +130,11 @@ def __init__(self, arg=None, fillcolor=None, line=None, visible=None, **kwargs): an instance of :class:`plotly.graph_objs.funnel.Connector`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("line", arg, line) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_hoverlabel.py b/plotly/graph_objs/funnel/_hoverlabel.py index 4b8cd699fd..be476cfb1e 100644 --- a/plotly/graph_objs/funnel/_hoverlabel.py +++ b/plotly/graph_objs/funnel/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnel.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_insidetextfont.py b/plotly/graph_objs/funnel/_insidetextfont.py index 15d1bd879c..25079e8810 100644 --- a/plotly/graph_objs/funnel/_insidetextfont.py +++ b/plotly/graph_objs/funnel/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_legendgrouptitle.py b/plotly/graph_objs/funnel/_legendgrouptitle.py index 832af37c03..15bc5071f0 100644 --- a/plotly/graph_objs/funnel/_legendgrouptitle.py +++ b/plotly/graph_objs/funnel/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.funnel.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.funnel.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_marker.py b/plotly/graph_objs/funnel/_marker.py index ceb50cabef..d603a69227 100644 --- a/plotly/graph_objs/funnel/_marker.py +++ b/plotly/graph_objs/funnel/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.marker" _valid_props = { @@ -26,8 +27,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -52,8 +51,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -77,8 +74,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -100,8 +95,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -124,8 +117,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -147,8 +138,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -162,49 +151,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to funnel.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -212,8 +166,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -239,8 +191,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -250,273 +200,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.funnel. - marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.funnel.marker.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - funnel.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.funnel.marker.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.funnel.marker.ColorBar @@ -527,8 +210,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -581,8 +262,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -601,8 +280,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # line - # ---- @property def line(self): """ @@ -612,98 +289,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.funnel.marker.Line @@ -714,8 +299,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -727,7 +310,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -735,8 +318,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -755,8 +336,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -778,8 +357,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -800,8 +377,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -894,21 +469,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -1008,14 +583,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1030,78 +602,23 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_outsidetextfont.py b/plotly/graph_objs/funnel/_outsidetextfont.py index cdd87277e5..303e627bdd 100644 --- a/plotly/graph_objs/funnel/_outsidetextfont.py +++ b/plotly/graph_objs/funnel/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_stream.py b/plotly/graph_objs/funnel/_stream.py index 9cc6b82f1c..44f86e16a1 100644 --- a/plotly/graph_objs/funnel/_stream.py +++ b/plotly/graph_objs/funnel/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.funnel.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/_textfont.py b/plotly/graph_objs/funnel/_textfont.py index 819d8a9a27..37622df1ae 100644 --- a/plotly/graph_objs/funnel/_textfont.py +++ b/plotly/graph_objs/funnel/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel" _path_str = "funnel.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/connector/__init__.py b/plotly/graph_objs/funnel/connector/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/funnel/connector/__init__.py +++ b/plotly/graph_objs/funnel/connector/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/funnel/connector/_line.py b/plotly/graph_objs/funnel/connector/_line.py index 3439f83ece..ccfd227ca3 100644 --- a/plotly/graph_objs/funnel/connector/_line.py +++ b/plotly/graph_objs/funnel/connector/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.connector" _path_str = "funnel.connector.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.funnel.connector.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/hoverlabel/__init__.py b/plotly/graph_objs/funnel/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/funnel/hoverlabel/__init__.py +++ b/plotly/graph_objs/funnel/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/funnel/hoverlabel/_font.py b/plotly/graph_objs/funnel/hoverlabel/_font.py index 2a28014f01..dee724a813 100644 --- a/plotly/graph_objs/funnel/hoverlabel/_font.py +++ b/plotly/graph_objs/funnel/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.hoverlabel" _path_str = "funnel.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/legendgrouptitle/__init__.py b/plotly/graph_objs/funnel/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/funnel/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/funnel/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/funnel/legendgrouptitle/_font.py b/plotly/graph_objs/funnel/legendgrouptitle/_font.py index dd8ff5b48a..7590241c55 100644 --- a/plotly/graph_objs/funnel/legendgrouptitle/_font.py +++ b/plotly/graph_objs/funnel/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.legendgrouptitle" _path_str = "funnel.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/marker/__init__.py b/plotly/graph_objs/funnel/marker/__init__.py index 8481520e3c..ff536ec8b2 100644 --- a/plotly/graph_objs/funnel/marker/__init__.py +++ b/plotly/graph_objs/funnel/marker/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] +) diff --git a/plotly/graph_objs/funnel/marker/_colorbar.py b/plotly/graph_objs/funnel/marker/_colorbar.py index 4d63541914..ed25e1580f 100644 --- a/plotly/graph_objs/funnel/marker/_colorbar.py +++ b/plotly/graph_objs/funnel/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.marker" _path_str = "funnel.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.funnel.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.funnel.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.funnel.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.funnel.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/marker/_line.py b/plotly/graph_objs/funnel/marker/_line.py index cb030f324a..9b51ac932e 100644 --- a/plotly/graph_objs/funnel/marker/_line.py +++ b/plotly/graph_objs/funnel/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.marker" _path_str = "funnel.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to funnel.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/marker/colorbar/__init__.py b/plotly/graph_objs/funnel/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/__init__.py +++ b/plotly/graph_objs/funnel/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py b/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py index fe9990088c..bfb110fc4e 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.marker.colorbar" _path_str = "funnel.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py index 152426ad61..ec9b8b182a 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/funnel/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.marker.colorbar" _path_str = "funnel.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/marker/colorbar/_title.py b/plotly/graph_objs/funnel/marker/colorbar/_title.py index 9e42b31823..61aa351c98 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/_title.py +++ b/plotly/graph_objs/funnel/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.marker.colorbar" _path_str = "funnel.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.funnel.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py b/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/funnel/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/funnel/marker/colorbar/title/_font.py b/plotly/graph_objs/funnel/marker/colorbar/title/_font.py index c4ec5defb1..6efee2159f 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/funnel/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnel.marker.colorbar.title" _path_str = "funnel.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.funnel.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/__init__.py b/plotly/graph_objs/funnelarea/__init__.py index 735b2c9691..2cf7d53da7 100644 --- a/plotly/graph_objs/funnelarea/__init__.py +++ b/plotly/graph_objs/funnelarea/__init__.py @@ -1,33 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._stream import Stream - from ._textfont import Textfont - from ._title import Title - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".title"], - [ - "._domain.Domain", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._stream.Stream", - "._textfont.Textfont", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".title"], + [ + "._domain.Domain", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._stream.Stream", + "._textfont.Textfont", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/funnelarea/_domain.py b/plotly/graph_objs/funnelarea/_domain.py index 8768025974..f1b40cb3d4 100644 --- a/plotly/graph_objs/funnelarea/_domain.py +++ b/plotly/graph_objs/funnelarea/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): plot fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.funnelarea.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_hoverlabel.py b/plotly/graph_objs/funnelarea/_hoverlabel.py index 68437d3f5b..9f78fcb824 100644 --- a/plotly/graph_objs/funnelarea/_hoverlabel.py +++ b/plotly/graph_objs/funnelarea/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnelarea.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_insidetextfont.py b/plotly/graph_objs/funnelarea/_insidetextfont.py index 1c8e79cf57..67550d0df5 100644 --- a/plotly/graph_objs/funnelarea/_insidetextfont.py +++ b/plotly/graph_objs/funnelarea/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_legendgrouptitle.py b/plotly/graph_objs/funnelarea/_legendgrouptitle.py index 4e4a440462..5deee13382 100644 --- a/plotly/graph_objs/funnelarea/_legendgrouptitle.py +++ b/plotly/graph_objs/funnelarea/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.funnelarea.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.funnelarea.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_marker.py b/plotly/graph_objs/funnelarea/_marker.py index bcd9f7c595..cd9b871204 100644 --- a/plotly/graph_objs/funnelarea/_marker.py +++ b/plotly/graph_objs/funnelarea/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.marker" _valid_props = {"colors", "colorssrc", "line", "pattern"} - # colors - # ------ @property def colors(self): """ @@ -23,7 +22,7 @@ def colors(self): Returns ------- - numpy.ndarray + NDArray """ return self["colors"] @@ -31,8 +30,6 @@ def colors(self): def colors(self, val): self["colors"] = val - # colorssrc - # --------- @property def colorssrc(self): """ @@ -51,8 +48,6 @@ def colorssrc(self): def colorssrc(self, val): self["colorssrc"] = val - # line - # ---- @property def line(self): """ @@ -62,21 +57,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.funnelarea.marker.Line @@ -87,8 +67,6 @@ def line(self): def line(self, val): self["line"] = val - # pattern - # ------- @property def pattern(self): """ @@ -100,57 +78,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.funnelarea.marker.Pattern @@ -161,8 +88,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -181,7 +106,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, colors=None, colorssrc=None, line=None, pattern=None, **kwargs + self, + arg=None, + colors: NDArray | None = None, + colorssrc: str | None = None, + line: None | None = None, + pattern: None | None = None, + **kwargs, ): """ Construct a new Marker object @@ -209,14 +140,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -231,34 +159,12 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colors", None) - _v = colors if colors is not None else _v - if _v is not None: - self["colors"] = _v - _v = arg.pop("colorssrc", None) - _v = colorssrc if colorssrc is not None else _v - if _v is not None: - self["colorssrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("colors", arg, colors) + self._init_provided("colorssrc", arg, colorssrc) + self._init_provided("line", arg, line) + self._init_provided("pattern", arg, pattern) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_stream.py b/plotly/graph_objs/funnelarea/_stream.py index 2d4b1cbced..c58afbf391 100644 --- a/plotly/graph_objs/funnelarea/_stream.py +++ b/plotly/graph_objs/funnelarea/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.funnelarea.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_textfont.py b/plotly/graph_objs/funnelarea/_textfont.py index 3ba02007f0..d89626b2af 100644 --- a/plotly/graph_objs/funnelarea/_textfont.py +++ b/plotly/graph_objs/funnelarea/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/_title.py b/plotly/graph_objs/funnelarea/_title.py index 18a6f7781e..83639d93ce 100644 --- a/plotly/graph_objs/funnelarea/_title.py +++ b/plotly/graph_objs/funnelarea/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea" _path_str = "funnelarea.title" _valid_props = {"font", "position", "text"} - # font - # ---- @property def font(self): """ @@ -23,79 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.funnelarea.title.Font @@ -106,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # position - # -------- @property def position(self): """ @@ -127,8 +51,6 @@ def position(self): def position(self, val): self["position"] = val - # text - # ---- @property def text(self): """ @@ -149,8 +71,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -163,7 +83,14 @@ def _prop_descriptions(self): is displayed. """ - def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + position: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -185,14 +112,11 @@ def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -207,30 +131,11 @@ def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.funnelarea.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("position", None) - _v = position if position is not None else _v - if _v is not None: - self["position"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("position", arg, position) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/hoverlabel/__init__.py b/plotly/graph_objs/funnelarea/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/funnelarea/hoverlabel/__init__.py +++ b/plotly/graph_objs/funnelarea/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/funnelarea/hoverlabel/_font.py b/plotly/graph_objs/funnelarea/hoverlabel/_font.py index 32d628d3c0..88feb083c3 100644 --- a/plotly/graph_objs/funnelarea/hoverlabel/_font.py +++ b/plotly/graph_objs/funnelarea/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea.hoverlabel" _path_str = "funnelarea.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/legendgrouptitle/__init__.py b/plotly/graph_objs/funnelarea/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/funnelarea/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/funnelarea/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py b/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py index 63d3af7147..7c2bfdf8bb 100644 --- a/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py +++ b/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea.legendgrouptitle" _path_str = "funnelarea.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/marker/__init__.py b/plotly/graph_objs/funnelarea/marker/__init__.py index 9f8ac2640c..4e5d01c99b 100644 --- a/plotly/graph_objs/funnelarea/marker/__init__.py +++ b/plotly/graph_objs/funnelarea/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line - from ._pattern import Pattern -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.Line", "._pattern.Pattern"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/funnelarea/marker/_line.py b/plotly/graph_objs/funnelarea/marker/_line.py index d7768d59e2..73fd06a169 100644 --- a/plotly/graph_objs/funnelarea/marker/_line.py +++ b/plotly/graph_objs/funnelarea/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea.marker" _path_str = "funnelarea.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -104,7 +64,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -112,8 +72,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -132,8 +90,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -152,7 +108,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -180,14 +142,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -202,34 +161,12 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/marker/_pattern.py b/plotly/graph_objs/funnelarea/marker/_pattern.py index fc694d431a..2b386bbc27 100644 --- a/plotly/graph_objs/funnelarea/marker/_pattern.py +++ b/plotly/graph_objs/funnelarea/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea.marker" _path_str = "funnelarea.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/funnelarea/title/__init__.py b/plotly/graph_objs/funnelarea/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/funnelarea/title/__init__.py +++ b/plotly/graph_objs/funnelarea/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/funnelarea/title/_font.py b/plotly/graph_objs/funnelarea/title/_font.py index 46206667e0..69d350bf53 100644 --- a/plotly/graph_objs/funnelarea/title/_font.py +++ b/plotly/graph_objs/funnelarea/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "funnelarea.title" _path_str = "funnelarea.title.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.funnelarea.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/__init__.py b/plotly/graph_objs/heatmap/__init__.py index d11fcc4952..6049317791 100644 --- a/plotly/graph_objs/heatmap/__init__.py +++ b/plotly/graph_objs/heatmap/__init__.py @@ -1,26 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._stream import Stream - from ._textfont import Textfont - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._stream.Stream", - "._textfont.Textfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + "._textfont.Textfont", + ], +) diff --git a/plotly/graph_objs/heatmap/_colorbar.py b/plotly/graph_objs/heatmap/_colorbar.py index 65f4b6ccf6..9924cb70aa 100644 --- a/plotly/graph_objs/heatmap/_colorbar.py +++ b/plotly/graph_objs/heatmap/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap" _path_str = "heatmap.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.heatmap.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.heatmap.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.heatmap.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.heatmap.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/_hoverlabel.py b/plotly/graph_objs/heatmap/_hoverlabel.py index 736d3e4baf..a6e8019b39 100644 --- a/plotly/graph_objs/heatmap/_hoverlabel.py +++ b/plotly/graph_objs/heatmap/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap" _path_str = "heatmap.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.heatmap.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/_legendgrouptitle.py b/plotly/graph_objs/heatmap/_legendgrouptitle.py index 36b4fc7f80..67306224f4 100644 --- a/plotly/graph_objs/heatmap/_legendgrouptitle.py +++ b/plotly/graph_objs/heatmap/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap" _path_str = "heatmap.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.heatmap.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.heatmap.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/_stream.py b/plotly/graph_objs/heatmap/_stream.py index 9873a8efbd..6610358989 100644 --- a/plotly/graph_objs/heatmap/_stream.py +++ b/plotly/graph_objs/heatmap/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap" _path_str = "heatmap.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.heatmap.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/_textfont.py b/plotly/graph_objs/heatmap/_textfont.py index 552355ffff..db1ce0983f 100644 --- a/plotly/graph_objs/heatmap/_textfont.py +++ b/plotly/graph_objs/heatmap/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap" _path_str = "heatmap.textfont" _valid_props = { @@ -20,8 +21,6 @@ class Textfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/colorbar/__init__.py b/plotly/graph_objs/heatmap/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/heatmap/colorbar/__init__.py +++ b/plotly/graph_objs/heatmap/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/heatmap/colorbar/_tickfont.py b/plotly/graph_objs/heatmap/colorbar/_tickfont.py index 41542ed437..fa61e6e4ef 100644 --- a/plotly/graph_objs/heatmap/colorbar/_tickfont.py +++ b/plotly/graph_objs/heatmap/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap.colorbar" _path_str = "heatmap.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py b/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py index 33191724a4..023f4d7c58 100644 --- a/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/heatmap/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap.colorbar" _path_str = "heatmap.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/colorbar/_title.py b/plotly/graph_objs/heatmap/colorbar/_title.py index 02cdcf6431..75fabda0fc 100644 --- a/plotly/graph_objs/heatmap/colorbar/_title.py +++ b/plotly/graph_objs/heatmap/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap.colorbar" _path_str = "heatmap.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.heatmap.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.heatmap.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/colorbar/title/__init__.py b/plotly/graph_objs/heatmap/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/heatmap/colorbar/title/__init__.py +++ b/plotly/graph_objs/heatmap/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/heatmap/colorbar/title/_font.py b/plotly/graph_objs/heatmap/colorbar/title/_font.py index 81a2c54ac2..1d8e655bf9 100644 --- a/plotly/graph_objs/heatmap/colorbar/title/_font.py +++ b/plotly/graph_objs/heatmap/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap.colorbar.title" _path_str = "heatmap.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/hoverlabel/__init__.py b/plotly/graph_objs/heatmap/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/heatmap/hoverlabel/__init__.py +++ b/plotly/graph_objs/heatmap/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/heatmap/hoverlabel/_font.py b/plotly/graph_objs/heatmap/hoverlabel/_font.py index deaf08155d..3b36a1fae8 100644 --- a/plotly/graph_objs/heatmap/hoverlabel/_font.py +++ b/plotly/graph_objs/heatmap/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap.hoverlabel" _path_str = "heatmap.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/heatmap/legendgrouptitle/__init__.py b/plotly/graph_objs/heatmap/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/heatmap/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/heatmap/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/heatmap/legendgrouptitle/_font.py b/plotly/graph_objs/heatmap/legendgrouptitle/_font.py index f426b334be..fcf53ca8d6 100644 --- a/plotly/graph_objs/heatmap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/heatmap/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "heatmap.legendgrouptitle" _path_str = "heatmap.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.heatmap.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/__init__.py b/plotly/graph_objs/histogram/__init__.py index 3817ff41de..54f32ea233 100644 --- a/plotly/graph_objs/histogram/__init__.py +++ b/plotly/graph_objs/histogram/__init__.py @@ -1,46 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._cumulative import Cumulative - from ._error_x import ErrorX - from ._error_y import ErrorY - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from ._xbins import XBins - from ._ybins import YBins - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._cumulative.Cumulative", - "._error_x.ErrorX", - "._error_y.ErrorY", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - "._xbins.XBins", - "._ybins.YBins", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._cumulative.Cumulative", + "._error_x.ErrorX", + "._error_y.ErrorY", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + "._xbins.XBins", + "._ybins.YBins", + ], +) diff --git a/plotly/graph_objs/histogram/_cumulative.py b/plotly/graph_objs/histogram/_cumulative.py index a0f4f94d07..ec5ec2c08a 100644 --- a/plotly/graph_objs/histogram/_cumulative.py +++ b/plotly/graph_objs/histogram/_cumulative.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Cumulative(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.cumulative" _valid_props = {"currentbin", "direction", "enabled"} - # currentbin - # ---------- @property def currentbin(self): """ @@ -36,8 +35,6 @@ def currentbin(self): def currentbin(self, val): self["currentbin"] = val - # direction - # --------- @property def direction(self): """ @@ -60,8 +57,6 @@ def direction(self): def direction(self, val): self["direction"] = val - # enabled - # ------- @property def enabled(self): """ @@ -86,8 +81,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -116,7 +109,12 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, currentbin=None, direction=None, enabled=None, **kwargs + self, + arg=None, + currentbin: Any | None = None, + direction: Any | None = None, + enabled: bool | None = None, + **kwargs, ): """ Construct a new Cumulative object @@ -154,14 +152,11 @@ def __init__( ------- Cumulative """ - super(Cumulative, self).__init__("cumulative") - + super().__init__("cumulative") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -176,30 +171,11 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.Cumulative`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("currentbin", None) - _v = currentbin if currentbin is not None else _v - if _v is not None: - self["currentbin"] = _v - _v = arg.pop("direction", None) - _v = direction if direction is not None else _v - if _v is not None: - self["direction"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("currentbin", arg, currentbin) + self._init_provided("direction", arg, direction) + self._init_provided("enabled", arg, enabled) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_error_x.py b/plotly/graph_objs/histogram/_error_x.py index 0a3abfec72..22fb0186bc 100644 --- a/plotly/graph_objs/histogram/_error_x.py +++ b/plotly/graph_objs/histogram/_error_x.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorX(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.error_x" _valid_props = { @@ -26,8 +27,6 @@ class ErrorX(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -39,7 +38,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -47,8 +46,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -61,7 +58,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -69,8 +66,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -90,8 +85,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -110,8 +103,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -122,42 +113,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +125,6 @@ def color(self): def color(self, val): self["color"] = val - # copy_ystyle - # ----------- @property def copy_ystyle(self): """ @@ -187,8 +141,6 @@ def copy_ystyle(self): def copy_ystyle(self, val): self["copy_ystyle"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -209,8 +161,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -229,8 +179,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -248,8 +196,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -267,13 +213,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -294,8 +238,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -316,8 +258,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -339,8 +279,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -359,8 +297,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -380,8 +316,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -416,7 +350,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -445,21 +379,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + copy_ystyle: bool | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -502,7 +436,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -531,14 +465,11 @@ def __init__( ------- ErrorX """ - super(ErrorX, self).__init__("error_x") - + super().__init__("error_x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -553,78 +484,23 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.ErrorX`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("copy_ystyle", None) - _v = copy_ystyle if copy_ystyle is not None else _v - if _v is not None: - self["copy_ystyle"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("copy_ystyle", arg, copy_ystyle) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_error_y.py b/plotly/graph_objs/histogram/_error_y.py index 3f8d67a828..4093a07d5f 100644 --- a/plotly/graph_objs/histogram/_error_y.py +++ b/plotly/graph_objs/histogram/_error_y.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorY(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.error_y" _valid_props = { @@ -25,8 +26,6 @@ class ErrorY(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -38,7 +37,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -46,8 +45,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -60,7 +57,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -68,8 +65,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -89,8 +84,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -109,8 +102,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -121,42 +112,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -168,8 +124,6 @@ def color(self): def color(self, val): self["color"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -190,8 +144,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -210,8 +162,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -229,8 +179,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -248,13 +196,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -275,8 +221,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -297,8 +241,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -320,8 +262,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -340,8 +280,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -361,8 +299,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -395,7 +331,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -424,20 +360,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -478,7 +414,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -507,14 +443,11 @@ def __init__( ------- ErrorY """ - super(ErrorY, self).__init__("error_y") - + super().__init__("error_y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -529,74 +462,22 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.ErrorY`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_hoverlabel.py b/plotly/graph_objs/histogram/_hoverlabel.py index 89296ba702..b9918e7d49 100644 --- a/plotly/graph_objs/histogram/_hoverlabel.py +++ b/plotly/graph_objs/histogram/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.histogram.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_insidetextfont.py b/plotly/graph_objs/histogram/_insidetextfont.py index e62907cb35..31374fb4ee 100644 --- a/plotly/graph_objs/histogram/_insidetextfont.py +++ b/plotly/graph_objs/histogram/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.insidetextfont" _valid_props = { @@ -20,8 +21,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_legendgrouptitle.py b/plotly/graph_objs/histogram/_legendgrouptitle.py index 97d65c720d..c8ec6ede0f 100644 --- a/plotly/graph_objs/histogram/_legendgrouptitle.py +++ b/plotly/graph_objs/histogram/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_marker.py b/plotly/graph_objs/histogram/_marker.py index d215a26dff..eb15904652 100644 --- a/plotly/graph_objs/histogram/_marker.py +++ b/plotly/graph_objs/histogram/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.marker" _valid_props = { @@ -28,8 +29,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -54,8 +53,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -79,8 +76,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -102,8 +97,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -126,8 +119,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -149,8 +140,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -164,49 +153,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to histogram.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -214,8 +168,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -241,8 +193,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -252,273 +202,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - histogram.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram.marker.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.histogram.marker.ColorBar @@ -529,8 +212,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -583,8 +264,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -603,8 +282,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # cornerradius - # ------------ @property def cornerradius(self): """ @@ -626,8 +303,6 @@ def cornerradius(self): def cornerradius(self, val): self["cornerradius"] = val - # line - # ---- @property def line(self): """ @@ -637,98 +312,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.histogram.marker.Line @@ -739,8 +322,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -752,7 +333,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -760,8 +341,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -780,8 +359,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # pattern - # ------- @property def pattern(self): """ @@ -793,57 +370,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.histogram.marker.Pattern @@ -854,8 +380,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -877,8 +401,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -899,8 +421,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1001,23 +521,23 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - cornerradius=None, - line=None, - opacity=None, - opacitysrc=None, - pattern=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + cornerradius: Any | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + pattern: None | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -1126,14 +646,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1148,86 +665,25 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("cornerradius", None) - _v = cornerradius if cornerradius is not None else _v - if _v is not None: - self["cornerradius"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("cornerradius", arg, cornerradius) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("pattern", arg, pattern) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_outsidetextfont.py b/plotly/graph_objs/histogram/_outsidetextfont.py index 2e9ff3e407..dd38cdc94b 100644 --- a/plotly/graph_objs/histogram/_outsidetextfont.py +++ b/plotly/graph_objs/histogram/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.outsidetextfont" _valid_props = { @@ -20,8 +21,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_selected.py b/plotly/graph_objs/histogram/_selected.py index 22a7e2d3c7..4385a5e150 100644 --- a/plotly/graph_objs/histogram/_selected.py +++ b/plotly/graph_objs/histogram/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,13 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - Returns ------- plotly.graph_objs.histogram.selected.Marker @@ -38,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -49,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.histogram.selected.Textfont @@ -64,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +60,13 @@ def _prop_descriptions(self): t` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -98,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_stream.py b/plotly/graph_objs/histogram/_stream.py index 8fbbfc36c8..e65f998151 100644 --- a/plotly/graph_objs/histogram/_stream.py +++ b/plotly/graph_objs/histogram/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_textfont.py b/plotly/graph_objs/histogram/_textfont.py index e8a97b2f5a..46737c7654 100644 --- a/plotly/graph_objs/histogram/_textfont.py +++ b/plotly/graph_objs/histogram/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.textfont" _valid_props = { @@ -20,8 +21,6 @@ class Textfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_unselected.py b/plotly/graph_objs/histogram/_unselected.py index 833fb1aaa8..b07e21fd2b 100644 --- a/plotly/graph_objs/histogram/_unselected.py +++ b/plotly/graph_objs/histogram/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.histogram.unselected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.histogram.unselected.Textfont @@ -67,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +60,13 @@ def _prop_descriptions(self): ont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -101,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -123,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_xbins.py b/plotly/graph_objs/histogram/_xbins.py index 472c012587..cad0fdc279 100644 --- a/plotly/graph_objs/histogram/_xbins.py +++ b/plotly/graph_objs/histogram/_xbins.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class XBins(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.xbins" _valid_props = {"end", "size", "start"} - # end - # --- @property def end(self): """ @@ -34,8 +33,6 @@ def end(self): def end(self, val): self["end"] = val - # size - # ---- @property def size(self): """ @@ -64,8 +61,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -95,8 +90,6 @@ def start(self): def start(self, val): self["start"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +132,14 @@ def _prop_descriptions(self): by an integer number of bins. """ - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + def __init__( + self, + arg=None, + end: Any | None = None, + size: Any | None = None, + start: Any | None = None, + **kwargs, + ): """ Construct a new XBins object @@ -191,14 +191,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): ------- XBins """ - super(XBins, self).__init__("xbins") - + super().__init__("xbins") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -213,30 +210,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.XBins`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("end", arg, end) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/_ybins.py b/plotly/graph_objs/histogram/_ybins.py index f5a44a21db..ee566c0486 100644 --- a/plotly/graph_objs/histogram/_ybins.py +++ b/plotly/graph_objs/histogram/_ybins.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class YBins(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram" _path_str = "histogram.ybins" _valid_props = {"end", "size", "start"} - # end - # --- @property def end(self): """ @@ -34,8 +33,6 @@ def end(self): def end(self, val): self["end"] = val - # size - # ---- @property def size(self): """ @@ -64,8 +61,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -95,8 +90,6 @@ def start(self): def start(self, val): self["start"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +132,14 @@ def _prop_descriptions(self): by an integer number of bins. """ - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + def __init__( + self, + arg=None, + end: Any | None = None, + size: Any | None = None, + start: Any | None = None, + **kwargs, + ): """ Construct a new YBins object @@ -191,14 +191,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): ------- YBins """ - super(YBins, self).__init__("ybins") - + super().__init__("ybins") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -213,30 +210,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.YBins`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("end", arg, end) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/hoverlabel/__init__.py b/plotly/graph_objs/histogram/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram/hoverlabel/__init__.py +++ b/plotly/graph_objs/histogram/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram/hoverlabel/_font.py b/plotly/graph_objs/histogram/hoverlabel/_font.py index 098db6c9dc..ee14e070c3 100644 --- a/plotly/graph_objs/histogram/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.hoverlabel" _path_str = "histogram.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/legendgrouptitle/__init__.py b/plotly/graph_objs/histogram/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/histogram/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram/legendgrouptitle/_font.py b/plotly/graph_objs/histogram/legendgrouptitle/_font.py index 734c1a794a..12f53b9ba1 100644 --- a/plotly/graph_objs/histogram/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.legendgrouptitle" _path_str = "histogram.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/__init__.py b/plotly/graph_objs/histogram/marker/__init__.py index ce0279c544..700941a53e 100644 --- a/plotly/graph_objs/histogram/marker/__init__.py +++ b/plotly/graph_objs/histogram/marker/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from ._pattern import Pattern - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/histogram/marker/_colorbar.py b/plotly/graph_objs/histogram/marker/_colorbar.py index e7402db0a9..757ab30997 100644 --- a/plotly/graph_objs/histogram/marker/_colorbar.py +++ b/plotly/graph_objs/histogram/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker" _path_str = "histogram.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.histogram.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.histogram.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.histogram.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/_line.py b/plotly/graph_objs/histogram/marker/_line.py index cf6c096ec3..19d27ed92e 100644 --- a/plotly/graph_objs/histogram/marker/_line.py +++ b/plotly/graph_objs/histogram/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker" _path_str = "histogram.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to histogram.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/_pattern.py b/plotly/graph_objs/histogram/marker/_pattern.py index 240c87677d..6d0cddc9c6 100644 --- a/plotly/graph_objs/histogram/marker/_pattern.py +++ b/plotly/graph_objs/histogram/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker" _path_str = "histogram.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/colorbar/__init__.py b/plotly/graph_objs/histogram/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/__init__.py +++ b/plotly/graph_objs/histogram/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py b/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py index 645c1e21bf..b9a5d39e64 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker.colorbar" _path_str = "histogram.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py index 68061da88f..e0038e271f 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/histogram/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker.colorbar" _path_str = "histogram.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/colorbar/_title.py b/plotly/graph_objs/histogram/marker/colorbar/_title.py index 6a563fa927..dd210f8689 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/_title.py +++ b/plotly/graph_objs/histogram/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker.colorbar" _path_str = "histogram.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py b/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/histogram/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram/marker/colorbar/title/_font.py b/plotly/graph_objs/histogram/marker/colorbar/title/_font.py index 3cee6565b9..0405b929ad 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.marker.colorbar.title" _path_str = "histogram.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/selected/__init__.py b/plotly/graph_objs/histogram/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/histogram/selected/__init__.py +++ b/plotly/graph_objs/histogram/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/histogram/selected/_marker.py b/plotly/graph_objs/histogram/selected/_marker.py index 5f9d22286b..8cb5450eab 100644 --- a/plotly/graph_objs/histogram/selected/_marker.py +++ b/plotly/graph_objs/histogram/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.selected" _path_str = "histogram.selected.marker" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the marker opacity of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/selected/_textfont.py b/plotly/graph_objs/histogram/selected/_textfont.py index 90cc38844d..54ca36923d 100644 --- a/plotly/graph_objs/histogram/selected/_textfont.py +++ b/plotly/graph_objs/histogram/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.selected" _path_str = "histogram.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/unselected/__init__.py b/plotly/graph_objs/histogram/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/histogram/unselected/__init__.py +++ b/plotly/graph_objs/histogram/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/histogram/unselected/_marker.py b/plotly/graph_objs/histogram/unselected/_marker.py index 9db19dffb2..f1838afb2c 100644 --- a/plotly/graph_objs/histogram/unselected/_marker.py +++ b/plotly/graph_objs/histogram/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.unselected" _path_str = "histogram.unselected.marker" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +64,13 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -125,14 +91,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -147,26 +110,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram/unselected/_textfont.py b/plotly/graph_objs/histogram/unselected/_textfont.py index 746af4b38c..fe6e1c2577 100644 --- a/plotly/graph_objs/histogram/unselected/_textfont.py +++ b/plotly/graph_objs/histogram/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram.unselected" _path_str = "histogram.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/__init__.py b/plotly/graph_objs/histogram2d/__init__.py index 158cf59c39..0c0f648831 100644 --- a/plotly/graph_objs/histogram2d/__init__.py +++ b/plotly/graph_objs/histogram2d/__init__.py @@ -1,32 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._stream import Stream - from ._textfont import Textfont - from ._xbins import XBins - from ._ybins import YBins - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._stream.Stream", - "._textfont.Textfont", - "._xbins.XBins", - "._ybins.YBins", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._stream.Stream", + "._textfont.Textfont", + "._xbins.XBins", + "._ybins.YBins", + ], +) diff --git a/plotly/graph_objs/histogram2d/_colorbar.py b/plotly/graph_objs/histogram2d/_colorbar.py index ab3d968697..15ed7ac713 100644 --- a/plotly/graph_objs/histogram2d/_colorbar.py +++ b/plotly/graph_objs/histogram2d/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2d.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.histogram2d.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.histogram2d.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.histogram2d.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_hoverlabel.py b/plotly/graph_objs/histogram2d/_hoverlabel.py index 715c1cc3db..2e9d8361e7 100644 --- a/plotly/graph_objs/histogram2d/_hoverlabel.py +++ b/plotly/graph_objs/histogram2d/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.histogram2d.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_legendgrouptitle.py b/plotly/graph_objs/histogram2d/_legendgrouptitle.py index 979b092a17..9f9f007664 100644 --- a/plotly/graph_objs/histogram2d/_legendgrouptitle.py +++ b/plotly/graph_objs/histogram2d/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2d.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2d.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_marker.py b/plotly/graph_objs/histogram2d/_marker.py index 54184ac1ec..4c491591bc 100644 --- a/plotly/graph_objs/histogram2d/_marker.py +++ b/plotly/graph_objs/histogram2d/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.marker" _valid_props = {"color", "colorsrc"} - # color - # ----- @property def color(self): """ @@ -22,7 +21,7 @@ def color(self): Returns ------- - numpy.ndarray + NDArray """ return self["color"] @@ -30,8 +29,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -50,8 +47,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -62,7 +57,13 @@ def _prop_descriptions(self): `color`. """ - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + def __init__( + self, + arg=None, + color: NDArray | None = None, + colorsrc: str | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -82,14 +83,11 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -104,26 +102,10 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2d.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_stream.py b/plotly/graph_objs/histogram2d/_stream.py index 6f36c5ab36..26e81e670d 100644 --- a/plotly/graph_objs/histogram2d/_stream.py +++ b/plotly/graph_objs/histogram2d/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2d.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_textfont.py b/plotly/graph_objs/histogram2d/_textfont.py index ca9fc73e12..5edf7da1e7 100644 --- a/plotly/graph_objs/histogram2d/_textfont.py +++ b/plotly/graph_objs/histogram2d/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.textfont" _valid_props = { @@ -20,8 +21,6 @@ class Textfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_xbins.py b/plotly/graph_objs/histogram2d/_xbins.py index 0f81cdb039..cb032c17a1 100644 --- a/plotly/graph_objs/histogram2d/_xbins.py +++ b/plotly/graph_objs/histogram2d/_xbins.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class XBins(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.xbins" _valid_props = {"end", "size", "start"} - # end - # --- @property def end(self): """ @@ -34,8 +33,6 @@ def end(self): def end(self, val): self["end"] = val - # size - # ---- @property def size(self): """ @@ -60,8 +57,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -88,8 +83,6 @@ def start(self): def start(self, val): self["start"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -124,7 +117,14 @@ def _prop_descriptions(self): category serial numbers, and defaults to -0.5. """ - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + def __init__( + self, + arg=None, + end: Any | None = None, + size: Any | None = None, + start: Any | None = None, + **kwargs, + ): """ Construct a new XBins object @@ -168,14 +168,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): ------- XBins """ - super(XBins, self).__init__("xbins") - + super().__init__("xbins") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -190,30 +187,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2d.XBins`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("end", arg, end) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/_ybins.py b/plotly/graph_objs/histogram2d/_ybins.py index 1332dd8f48..b226fb9652 100644 --- a/plotly/graph_objs/histogram2d/_ybins.py +++ b/plotly/graph_objs/histogram2d/_ybins.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class YBins(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d" _path_str = "histogram2d.ybins" _valid_props = {"end", "size", "start"} - # end - # --- @property def end(self): """ @@ -34,8 +33,6 @@ def end(self): def end(self, val): self["end"] = val - # size - # ---- @property def size(self): """ @@ -60,8 +57,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -88,8 +83,6 @@ def start(self): def start(self, val): self["start"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -124,7 +117,14 @@ def _prop_descriptions(self): category serial numbers, and defaults to -0.5. """ - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + def __init__( + self, + arg=None, + end: Any | None = None, + size: Any | None = None, + start: Any | None = None, + **kwargs, + ): """ Construct a new YBins object @@ -168,14 +168,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): ------- YBins """ - super(YBins, self).__init__("ybins") - + super().__init__("ybins") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -190,30 +187,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2d.YBins`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("end", arg, end) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/colorbar/__init__.py b/plotly/graph_objs/histogram2d/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/histogram2d/colorbar/__init__.py +++ b/plotly/graph_objs/histogram2d/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/histogram2d/colorbar/_tickfont.py b/plotly/graph_objs/histogram2d/colorbar/_tickfont.py index 53a01f84f1..1c65057f25 100644 --- a/plotly/graph_objs/histogram2d/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram2d/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d.colorbar" _path_str = "histogram2d.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py b/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py index 026a050d68..25cc563e8d 100644 --- a/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/histogram2d/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d.colorbar" _path_str = "histogram2d.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/colorbar/_title.py b/plotly/graph_objs/histogram2d/colorbar/_title.py index fa7662a0ee..fd71c04124 100644 --- a/plotly/graph_objs/histogram2d/colorbar/_title.py +++ b/plotly/graph_objs/histogram2d/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d.colorbar" _path_str = "histogram2d.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2d.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2d.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/colorbar/title/__init__.py b/plotly/graph_objs/histogram2d/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram2d/colorbar/title/__init__.py +++ b/plotly/graph_objs/histogram2d/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram2d/colorbar/title/_font.py b/plotly/graph_objs/histogram2d/colorbar/title/_font.py index f1d194ff41..159daf731e 100644 --- a/plotly/graph_objs/histogram2d/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram2d/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d.colorbar.title" _path_str = "histogram2d.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/hoverlabel/__init__.py b/plotly/graph_objs/histogram2d/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram2d/hoverlabel/__init__.py +++ b/plotly/graph_objs/histogram2d/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram2d/hoverlabel/_font.py b/plotly/graph_objs/histogram2d/hoverlabel/_font.py index 91b139efb2..e67c8940f5 100644 --- a/plotly/graph_objs/histogram2d/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram2d/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d.hoverlabel" _path_str = "histogram2d.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2d/legendgrouptitle/__init__.py b/plotly/graph_objs/histogram2d/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram2d/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/histogram2d/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py b/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py index 37188e5d4e..8ae55a4801 100644 --- a/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2d.legendgrouptitle" _path_str = "histogram2d.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2d.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/__init__.py b/plotly/graph_objs/histogram2dcontour/__init__.py index 91d3b3e29c..2d04faeed7 100644 --- a/plotly/graph_objs/histogram2dcontour/__init__.py +++ b/plotly/graph_objs/histogram2dcontour/__init__.py @@ -1,37 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._contours import Contours - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._stream import Stream - from ._textfont import Textfont - from ._xbins import XBins - from ._ybins import YBins - from . import colorbar - from . import contours - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._contours.Contours", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._stream.Stream", - "._textfont.Textfont", - "._xbins.XBins", - "._ybins.YBins", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contours.Contours", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._stream.Stream", + "._textfont.Textfont", + "._xbins.XBins", + "._ybins.YBins", + ], +) diff --git a/plotly/graph_objs/histogram2dcontour/_colorbar.py b/plotly/graph_objs/histogram2dcontour/_colorbar.py index dafdc0e28b..7b97cfaa11 100644 --- a/plotly/graph_objs/histogram2dcontour/_colorbar.py +++ b/plotly/graph_objs/histogram2dcontour/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2dcontour.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.histogram2dcontour.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_contours.py b/plotly/graph_objs/histogram2dcontour/_contours.py index 3bde7c8a43..6bd9350aa2 100644 --- a/plotly/graph_objs/histogram2dcontour/_contours.py +++ b/plotly/graph_objs/histogram2dcontour/_contours.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contours(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.contours" _valid_props = { @@ -22,8 +23,6 @@ class Contours(_BaseTraceHierarchyType): "value", } - # coloring - # -------- @property def coloring(self): """ @@ -47,8 +46,6 @@ def coloring(self): def coloring(self, val): self["coloring"] = val - # end - # --- @property def end(self): """ @@ -68,8 +65,6 @@ def end(self): def end(self, val): self["end"] = val - # labelfont - # --------- @property def labelfont(self): """ @@ -83,52 +78,6 @@ def labelfont(self): - A dict of string/value properties that will be passed to the Labelfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2dcontour.contours.Labelfont @@ -139,8 +88,6 @@ def labelfont(self): def labelfont(self, val): self["labelfont"] = val - # labelformat - # ----------- @property def labelformat(self): """ @@ -163,8 +110,6 @@ def labelformat(self): def labelformat(self, val): self["labelformat"] = val - # operation - # --------- @property def operation(self): """ @@ -192,8 +137,6 @@ def operation(self): def operation(self, val): self["operation"] = val - # showlabels - # ---------- @property def showlabels(self): """ @@ -213,8 +156,6 @@ def showlabels(self): def showlabels(self, val): self["showlabels"] = val - # showlines - # --------- @property def showlines(self): """ @@ -234,8 +175,6 @@ def showlines(self): def showlines(self, val): self["showlines"] = val - # size - # ---- @property def size(self): """ @@ -254,8 +193,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -275,8 +212,6 @@ def start(self): def start(self, val): self["start"] = val - # type - # ---- @property def type(self): """ @@ -299,8 +234,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -324,8 +257,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -389,17 +320,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - coloring=None, - end=None, - labelfont=None, - labelformat=None, - operation=None, - showlabels=None, - showlines=None, - size=None, - start=None, - type=None, - value=None, + coloring: Any | None = None, + end: int | float | None = None, + labelfont: None | None = None, + labelformat: str | None = None, + operation: Any | None = None, + showlabels: bool | None = None, + showlines: bool | None = None, + size: int | float | None = None, + start: int | float | None = None, + type: Any | None = None, + value: Any | None = None, **kwargs, ): """ @@ -471,14 +402,11 @@ def __init__( ------- Contours """ - super(Contours, self).__init__("contours") - + super().__init__("contours") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -493,62 +421,19 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.Contours`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("coloring", None) - _v = coloring if coloring is not None else _v - if _v is not None: - self["coloring"] = _v - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("labelfont", None) - _v = labelfont if labelfont is not None else _v - if _v is not None: - self["labelfont"] = _v - _v = arg.pop("labelformat", None) - _v = labelformat if labelformat is not None else _v - if _v is not None: - self["labelformat"] = _v - _v = arg.pop("operation", None) - _v = operation if operation is not None else _v - if _v is not None: - self["operation"] = _v - _v = arg.pop("showlabels", None) - _v = showlabels if showlabels is not None else _v - if _v is not None: - self["showlabels"] = _v - _v = arg.pop("showlines", None) - _v = showlines if showlines is not None else _v - if _v is not None: - self["showlines"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("coloring", arg, coloring) + self._init_provided("end", arg, end) + self._init_provided("labelfont", arg, labelfont) + self._init_provided("labelformat", arg, labelformat) + self._init_provided("operation", arg, operation) + self._init_provided("showlabels", arg, showlabels) + self._init_provided("showlines", arg, showlines) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_hoverlabel.py b/plotly/graph_objs/histogram2dcontour/_hoverlabel.py index ff167f7ff3..4153d993e1 100644 --- a/plotly/graph_objs/histogram2dcontour/_hoverlabel.py +++ b/plotly/graph_objs/histogram2dcontour/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.histogram2dcontour.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_legendgrouptitle.py b/plotly/graph_objs/histogram2dcontour/_legendgrouptitle.py index 2223befe89..5bb88be796 100644 --- a/plotly/graph_objs/histogram2dcontour/_legendgrouptitle.py +++ b/plotly/graph_objs/histogram2dcontour/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2dcontour.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2dcontour.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_line.py b/plotly/graph_objs/histogram2dcontour/_line.py index 5f94b32130..33201a7337 100644 --- a/plotly/graph_objs/histogram2dcontour/_line.py +++ b/plotly/graph_objs/histogram2dcontour/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.line" _valid_props = {"color", "dash", "smoothing", "width"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -96,8 +58,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -117,8 +77,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -137,8 +95,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -158,7 +114,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, dash=None, smoothing=None, width=None, **kwargs + self, + arg=None, + color: str | None = None, + dash: str | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, + **kwargs, ): """ Construct a new Line object @@ -187,14 +149,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -209,34 +168,12 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_marker.py b/plotly/graph_objs/histogram2dcontour/_marker.py index bb0de7e438..e11eac9a88 100644 --- a/plotly/graph_objs/histogram2dcontour/_marker.py +++ b/plotly/graph_objs/histogram2dcontour/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.marker" _valid_props = {"color", "colorsrc"} - # color - # ----- @property def color(self): """ @@ -22,7 +21,7 @@ def color(self): Returns ------- - numpy.ndarray + NDArray """ return self["color"] @@ -30,8 +29,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -50,8 +47,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -62,7 +57,13 @@ def _prop_descriptions(self): `color`. """ - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + def __init__( + self, + arg=None, + color: NDArray | None = None, + colorsrc: str | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -82,14 +83,11 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -104,26 +102,10 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2dcontour.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_stream.py b/plotly/graph_objs/histogram2dcontour/_stream.py index aa5f6ad009..9173e9f2b5 100644 --- a/plotly/graph_objs/histogram2dcontour/_stream.py +++ b/plotly/graph_objs/histogram2dcontour/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2dcontour.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_textfont.py b/plotly/graph_objs/histogram2dcontour/_textfont.py index 7be04af0de..ec52446a86 100644 --- a/plotly/graph_objs/histogram2dcontour/_textfont.py +++ b/plotly/graph_objs/histogram2dcontour/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.textfont" _valid_props = { @@ -20,8 +21,6 @@ class Textfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_xbins.py b/plotly/graph_objs/histogram2dcontour/_xbins.py index 18519299c9..cc6357a104 100644 --- a/plotly/graph_objs/histogram2dcontour/_xbins.py +++ b/plotly/graph_objs/histogram2dcontour/_xbins.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class XBins(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.xbins" _valid_props = {"end", "size", "start"} - # end - # --- @property def end(self): """ @@ -34,8 +33,6 @@ def end(self): def end(self, val): self["end"] = val - # size - # ---- @property def size(self): """ @@ -60,8 +57,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -88,8 +83,6 @@ def start(self): def start(self, val): self["start"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -124,7 +117,14 @@ def _prop_descriptions(self): category serial numbers, and defaults to -0.5. """ - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + def __init__( + self, + arg=None, + end: Any | None = None, + size: Any | None = None, + start: Any | None = None, + **kwargs, + ): """ Construct a new XBins object @@ -168,14 +168,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): ------- XBins """ - super(XBins, self).__init__("xbins") - + super().__init__("xbins") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -190,30 +187,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2dcontour.XBins`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("end", arg, end) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/_ybins.py b/plotly/graph_objs/histogram2dcontour/_ybins.py index f34bcf2949..bf8d360a77 100644 --- a/plotly/graph_objs/histogram2dcontour/_ybins.py +++ b/plotly/graph_objs/histogram2dcontour/_ybins.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class YBins(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour" _path_str = "histogram2dcontour.ybins" _valid_props = {"end", "size", "start"} - # end - # --- @property def end(self): """ @@ -34,8 +33,6 @@ def end(self): def end(self, val): self["end"] = val - # size - # ---- @property def size(self): """ @@ -60,8 +57,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -88,8 +83,6 @@ def start(self): def start(self, val): self["start"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -124,7 +117,14 @@ def _prop_descriptions(self): category serial numbers, and defaults to -0.5. """ - def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): + def __init__( + self, + arg=None, + end: Any | None = None, + size: Any | None = None, + start: Any | None = None, + **kwargs, + ): """ Construct a new YBins object @@ -168,14 +168,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): ------- YBins """ - super(YBins, self).__init__("ybins") - + super().__init__("ybins") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -190,30 +187,11 @@ def __init__(self, arg=None, end=None, size=None, start=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2dcontour.YBins`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("end", arg, end) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py b/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py b/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py index 0e9fb3405d..e1b5e2fac0 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.colorbar" _path_str = "histogram2dcontour.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py b/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py index 1699fa77ad..1c4ea2b8ad 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.colorbar" _path_str = "histogram2dcontour.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/_title.py b/plotly/graph_objs/histogram2dcontour/colorbar/_title.py index 752885dec3..1eb26ce121 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/_title.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.colorbar" _path_str = "histogram2dcontour.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.histogram2dcontour.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py b/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py b/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py index 50c3d16cae..aaa4ca129e 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.colorbar.title" _path_str = "histogram2dcontour.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/contours/__init__.py b/plotly/graph_objs/histogram2dcontour/contours/__init__.py index f1ee5b7524..ca8d81e748 100644 --- a/plotly/graph_objs/histogram2dcontour/contours/__init__.py +++ b/plotly/graph_objs/histogram2dcontour/contours/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._labelfont import Labelfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._labelfont.Labelfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._labelfont.Labelfont"]) diff --git a/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py b/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py index 52126661af..41062fd448 100644 --- a/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py +++ b/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Labelfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.contours" _path_str = "histogram2dcontour.contours.labelfont" _valid_props = { @@ -20,8 +21,6 @@ class Labelfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -340,18 +272,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -379,14 +304,11 @@ def __init__( ------- Labelfont """ - super(Labelfont, self).__init__("labelfont") - + super().__init__("labelfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -401,54 +323,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.contours.Labelfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py b/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py +++ b/plotly/graph_objs/histogram2dcontour/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py b/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py index 405e7222a0..a7dc9463d0 100644 --- a/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.hoverlabel" _path_str = "histogram2dcontour.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/__init__.py b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py index 3252767329..5f6bb1f1e9 100644 --- a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "histogram2dcontour.legendgrouptitle" _path_str = "histogram2dcontour.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.histogram2dcontour.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/__init__.py b/plotly/graph_objs/icicle/__init__.py index 3fba9b90da..714467ed34 100644 --- a/plotly/graph_objs/icicle/__init__.py +++ b/plotly/graph_objs/icicle/__init__.py @@ -1,41 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._leaf import Leaf - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._pathbar import Pathbar - from ._root import Root - from ._stream import Stream - from ._textfont import Textfont - from ._tiling import Tiling - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import pathbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".pathbar"], - [ - "._domain.Domain", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._leaf.Leaf", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._pathbar.Pathbar", - "._root.Root", - "._stream.Stream", - "._textfont.Textfont", - "._tiling.Tiling", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".pathbar"], + [ + "._domain.Domain", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._leaf.Leaf", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._pathbar.Pathbar", + "._root.Root", + "._stream.Stream", + "._textfont.Textfont", + "._tiling.Tiling", + ], +) diff --git a/plotly/graph_objs/icicle/_domain.py b/plotly/graph_objs/icicle/_domain.py index 756a061f1a..ef9ba52e28 100644 --- a/plotly/graph_objs/icicle/_domain.py +++ b/plotly/graph_objs/icicle/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -151,14 +150,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -173,34 +169,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_hoverlabel.py b/plotly/graph_objs/icicle/_hoverlabel.py index 6e4ba23e95..f46505c65a 100644 --- a/plotly/graph_objs/icicle/_hoverlabel.py +++ b/plotly/graph_objs/icicle/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.icicle.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_insidetextfont.py b/plotly/graph_objs/icicle/_insidetextfont.py index 60f0e664fe..1c582281ab 100644 --- a/plotly/graph_objs/icicle/_insidetextfont.py +++ b/plotly/graph_objs/icicle/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_leaf.py b/plotly/graph_objs/icicle/_leaf.py index 9ba8f9a043..3fb20f979c 100644 --- a/plotly/graph_objs/icicle/_leaf.py +++ b/plotly/graph_objs/icicle/_leaf.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Leaf(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.leaf" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -31,8 +30,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): defaulted to 1; otherwise it is defaulted to 0.7 """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Leaf object @@ -58,14 +55,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Leaf """ - super(Leaf, self).__init__("leaf") - + super().__init__("leaf") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -80,22 +74,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.Leaf`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_legendgrouptitle.py b/plotly/graph_objs/icicle/_legendgrouptitle.py index bf46d58bb5..771dbf1be9 100644 --- a/plotly/graph_objs/icicle/_legendgrouptitle.py +++ b/plotly/graph_objs/icicle/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.icicle.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_marker.py b/plotly/graph_objs/icicle/_marker.py index 4528bbdd1f..30dd0e3524 100644 --- a/plotly/graph_objs/icicle/_marker.py +++ b/plotly/graph_objs/icicle/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.marker" _valid_props = { @@ -25,8 +26,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -51,8 +50,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -75,8 +72,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -121,8 +114,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -143,8 +134,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -170,8 +159,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -181,273 +168,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.icicle. - marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.icicle.marker.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - icicle.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.icicle.marker.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.icicle.marker.ColorBar @@ -458,8 +178,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colors - # ------ @property def colors(self): """ @@ -471,7 +189,7 @@ def colors(self): Returns ------- - numpy.ndarray + NDArray """ return self["colors"] @@ -479,8 +197,6 @@ def colors(self): def colors(self, val): self["colors"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -533,8 +249,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorssrc - # --------- @property def colorssrc(self): """ @@ -553,8 +267,6 @@ def colorssrc(self): def colorssrc(self, val): self["colorssrc"] = val - # line - # ---- @property def line(self): """ @@ -564,21 +276,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.icicle.marker.Line @@ -589,8 +286,6 @@ def line(self): def line(self, val): self["line"] = val - # pattern - # ------- @property def pattern(self): """ @@ -602,57 +297,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.icicle.marker.Pattern @@ -663,8 +307,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -686,8 +328,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -708,8 +348,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -796,20 +434,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colors=None, - colorscale=None, - colorssrc=None, - line=None, - pattern=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colors: NDArray | None = None, + colorscale: str | None = None, + colorssrc: str | None = None, + line: None | None = None, + pattern: None | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -903,14 +541,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -925,74 +560,22 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colors", None) - _v = colors if colors is not None else _v - if _v is not None: - self["colors"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorssrc", None) - _v = colorssrc if colorssrc is not None else _v - if _v is not None: - self["colorssrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colors", arg, colors) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorssrc", arg, colorssrc) + self._init_provided("line", arg, line) + self._init_provided("pattern", arg, pattern) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_outsidetextfont.py b/plotly/graph_objs/icicle/_outsidetextfont.py index e6b2e9096c..a858148c44 100644 --- a/plotly/graph_objs/icicle/_outsidetextfont.py +++ b/plotly/graph_objs/icicle/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -580,18 +494,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -643,14 +550,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -665,90 +569,26 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_pathbar.py b/plotly/graph_objs/icicle/_pathbar.py index ce07a887ef..c68e81a71b 100644 --- a/plotly/graph_objs/icicle/_pathbar.py +++ b/plotly/graph_objs/icicle/_pathbar.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pathbar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.pathbar" _valid_props = {"edgeshape", "side", "textfont", "thickness", "visible"} - # edgeshape - # --------- @property def edgeshape(self): """ @@ -32,8 +31,6 @@ def edgeshape(self): def edgeshape(self, val): self["edgeshape"] = val - # side - # ---- @property def side(self): """ @@ -54,8 +51,6 @@ def side(self): def side(self, val): self["side"] = val - # textfont - # -------- @property def textfont(self): """ @@ -67,79 +62,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.icicle.pathbar.Textfont @@ -150,8 +72,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # thickness - # --------- @property def thickness(self): """ @@ -172,8 +92,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # visible - # ------- @property def visible(self): """ @@ -193,8 +111,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -218,11 +134,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - edgeshape=None, - side=None, - textfont=None, - thickness=None, - visible=None, + edgeshape: Any | None = None, + side: Any | None = None, + textfont: None | None = None, + thickness: int | float | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -254,14 +170,11 @@ def __init__( ------- Pathbar """ - super(Pathbar, self).__init__("pathbar") - + super().__init__("pathbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -276,38 +189,13 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.Pathbar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("edgeshape", None) - _v = edgeshape if edgeshape is not None else _v - if _v is not None: - self["edgeshape"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("edgeshape", arg, edgeshape) + self._init_provided("side", arg, side) + self._init_provided("textfont", arg, textfont) + self._init_provided("thickness", arg, thickness) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_root.py b/plotly/graph_objs/icicle/_root.py index 4077928046..a40d325b8a 100644 --- a/plotly/graph_objs/icicle/_root.py +++ b/plotly/graph_objs/icicle/_root.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Root(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.root" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -24,42 +23,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -82,7 +44,7 @@ def _prop_descriptions(self): a colorscale is used to set the markers. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Root object @@ -100,14 +62,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Root """ - super(Root, self).__init__("root") - + super().__init__("root") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,22 +81,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.Root`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_stream.py b/plotly/graph_objs/icicle/_stream.py index 9efe2d5e3b..1b19177534 100644 --- a/plotly/graph_objs/icicle/_stream.py +++ b/plotly/graph_objs/icicle/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_textfont.py b/plotly/graph_objs/icicle/_textfont.py index 98bcd51c13..05665e2216 100644 --- a/plotly/graph_objs/icicle/_textfont.py +++ b/plotly/graph_objs/icicle/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/_tiling.py b/plotly/graph_objs/icicle/_tiling.py index 59a3f88164..00a11e5390 100644 --- a/plotly/graph_objs/icicle/_tiling.py +++ b/plotly/graph_objs/icicle/_tiling.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tiling(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle" _path_str = "icicle.tiling" _valid_props = {"flip", "orientation", "pad"} - # flip - # ---- @property def flip(self): """ @@ -33,8 +32,6 @@ def flip(self): def flip(self, val): self["flip"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -61,8 +58,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # pad - # --- @property def pad(self): """ @@ -81,8 +76,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +97,14 @@ def _prop_descriptions(self): Sets the inner padding (in px). """ - def __init__(self, arg=None, flip=None, orientation=None, pad=None, **kwargs): + def __init__( + self, + arg=None, + flip: Any | None = None, + orientation: Any | None = None, + pad: int | float | None = None, + **kwargs, + ): """ Construct a new Tiling object @@ -134,14 +134,11 @@ def __init__(self, arg=None, flip=None, orientation=None, pad=None, **kwargs): ------- Tiling """ - super(Tiling, self).__init__("tiling") - + super().__init__("tiling") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -156,30 +153,11 @@ def __init__(self, arg=None, flip=None, orientation=None, pad=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.Tiling`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("flip", None) - _v = flip if flip is not None else _v - if _v is not None: - self["flip"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("flip", arg, flip) + self._init_provided("orientation", arg, orientation) + self._init_provided("pad", arg, pad) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/hoverlabel/__init__.py b/plotly/graph_objs/icicle/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/icicle/hoverlabel/__init__.py +++ b/plotly/graph_objs/icicle/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/icicle/hoverlabel/_font.py b/plotly/graph_objs/icicle/hoverlabel/_font.py index 1a84101217..32165c89d2 100644 --- a/plotly/graph_objs/icicle/hoverlabel/_font.py +++ b/plotly/graph_objs/icicle/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.hoverlabel" _path_str = "icicle.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/legendgrouptitle/__init__.py b/plotly/graph_objs/icicle/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/icicle/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/icicle/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/icicle/legendgrouptitle/_font.py b/plotly/graph_objs/icicle/legendgrouptitle/_font.py index 7c43ff99fa..fab492b9a4 100644 --- a/plotly/graph_objs/icicle/legendgrouptitle/_font.py +++ b/plotly/graph_objs/icicle/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.legendgrouptitle" _path_str = "icicle.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/__init__.py b/plotly/graph_objs/icicle/marker/__init__.py index ce0279c544..700941a53e 100644 --- a/plotly/graph_objs/icicle/marker/__init__.py +++ b/plotly/graph_objs/icicle/marker/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from ._pattern import Pattern - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/icicle/marker/_colorbar.py b/plotly/graph_objs/icicle/marker/_colorbar.py index 5eea701169..6976fa77b0 100644 --- a/plotly/graph_objs/icicle/marker/_colorbar.py +++ b/plotly/graph_objs/icicle/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker" _path_str = "icicle.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.icicle.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.icicle.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.icicle.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.icicle.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/_line.py b/plotly/graph_objs/icicle/marker/_line.py index ddf2495d2d..a5cfb6928b 100644 --- a/plotly/graph_objs/icicle/marker/_line.py +++ b/plotly/graph_objs/icicle/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker" _path_str = "icicle.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -104,7 +64,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -112,8 +72,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -132,8 +90,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -152,7 +108,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -180,14 +142,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -202,34 +161,12 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/_pattern.py b/plotly/graph_objs/icicle/marker/_pattern.py index c98945bff6..8f66da2013 100644 --- a/plotly/graph_objs/icicle/marker/_pattern.py +++ b/plotly/graph_objs/icicle/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker" _path_str = "icicle.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/colorbar/__init__.py b/plotly/graph_objs/icicle/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/__init__.py +++ b/plotly/graph_objs/icicle/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py b/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py index 05ab514abe..51b0492948 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker.colorbar" _path_str = "icicle.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/icicle/marker/colorbar/_tickformatstop.py index 4eb45e7023..83f8ea8573 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/icicle/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker.colorbar" _path_str = "icicle.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/colorbar/_title.py b/plotly/graph_objs/icicle/marker/colorbar/_title.py index eb1a9c1402..312e573692 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/_title.py +++ b/plotly/graph_objs/icicle/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker.colorbar" _path_str = "icicle.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.icicle.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.icicle.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/marker/colorbar/title/__init__.py b/plotly/graph_objs/icicle/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/icicle/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/icicle/marker/colorbar/title/_font.py b/plotly/graph_objs/icicle/marker/colorbar/title/_font.py index a942b5896e..59487c57e6 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/icicle/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.marker.colorbar.title" _path_str = "icicle.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/icicle/pathbar/__init__.py b/plotly/graph_objs/icicle/pathbar/__init__.py index 1640397aa7..2afd605560 100644 --- a/plotly/graph_objs/icicle/pathbar/__init__.py +++ b/plotly/graph_objs/icicle/pathbar/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._textfont.Textfont"]) diff --git a/plotly/graph_objs/icicle/pathbar/_textfont.py b/plotly/graph_objs/icicle/pathbar/_textfont.py index 2f4001cc85..3f50b9c2c4 100644 --- a/plotly/graph_objs/icicle/pathbar/_textfont.py +++ b/plotly/graph_objs/icicle/pathbar/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "icicle.pathbar" _path_str = "icicle.pathbar.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.icicle.pathbar.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/image/__init__.py b/plotly/graph_objs/image/__init__.py index 7e9c849e6e..cc978496d3 100644 --- a/plotly/graph_objs/image/__init__.py +++ b/plotly/graph_objs/image/__init__.py @@ -1,21 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._stream import Stream - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/image/_hoverlabel.py b/plotly/graph_objs/image/_hoverlabel.py index d478acc3c2..15216c7c9b 100644 --- a/plotly/graph_objs/image/_hoverlabel.py +++ b/plotly/graph_objs/image/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "image" _path_str = "image.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.image.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.image.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/image/_legendgrouptitle.py b/plotly/graph_objs/image/_legendgrouptitle.py index 42cc69f2e3..8ecfdc740a 100644 --- a/plotly/graph_objs/image/_legendgrouptitle.py +++ b/plotly/graph_objs/image/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "image" _path_str = "image.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.image.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.image.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/image/_stream.py b/plotly/graph_objs/image/_stream.py index 45ae5f21c9..fbc61e09cd 100644 --- a/plotly/graph_objs/image/_stream.py +++ b/plotly/graph_objs/image/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "image" _path_str = "image.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.image.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/image/hoverlabel/__init__.py b/plotly/graph_objs/image/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/image/hoverlabel/__init__.py +++ b/plotly/graph_objs/image/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/image/hoverlabel/_font.py b/plotly/graph_objs/image/hoverlabel/_font.py index e50d253393..97ee53f1ea 100644 --- a/plotly/graph_objs/image/hoverlabel/_font.py +++ b/plotly/graph_objs/image/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "image.hoverlabel" _path_str = "image.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.image.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/image/legendgrouptitle/__init__.py b/plotly/graph_objs/image/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/image/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/image/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/image/legendgrouptitle/_font.py b/plotly/graph_objs/image/legendgrouptitle/_font.py index cedd56ff73..e60bf62cb8 100644 --- a/plotly/graph_objs/image/legendgrouptitle/_font.py +++ b/plotly/graph_objs/image/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "image.legendgrouptitle" _path_str = "image.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.image.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/__init__.py b/plotly/graph_objs/indicator/__init__.py index a2ca09418f..2326db9555 100644 --- a/plotly/graph_objs/indicator/__init__.py +++ b/plotly/graph_objs/indicator/__init__.py @@ -1,32 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._delta import Delta - from ._domain import Domain - from ._gauge import Gauge - from ._legendgrouptitle import Legendgrouptitle - from ._number import Number - from ._stream import Stream - from ._title import Title - from . import delta - from . import gauge - from . import legendgrouptitle - from . import number - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".delta", ".gauge", ".legendgrouptitle", ".number", ".title"], - [ - "._delta.Delta", - "._domain.Domain", - "._gauge.Gauge", - "._legendgrouptitle.Legendgrouptitle", - "._number.Number", - "._stream.Stream", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".delta", ".gauge", ".legendgrouptitle", ".number", ".title"], + [ + "._delta.Delta", + "._domain.Domain", + "._gauge.Gauge", + "._legendgrouptitle.Legendgrouptitle", + "._number.Number", + "._stream.Stream", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/indicator/_delta.py b/plotly/graph_objs/indicator/_delta.py index ea1172bd31..bd72ebfde7 100644 --- a/plotly/graph_objs/indicator/_delta.py +++ b/plotly/graph_objs/indicator/_delta.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Delta(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.delta" _valid_props = { @@ -20,8 +21,6 @@ class Delta(_BaseTraceHierarchyType): "valueformat", } - # decreasing - # ---------- @property def decreasing(self): """ @@ -31,13 +30,6 @@ def decreasing(self): - A dict of string/value properties that will be passed to the Decreasing constructor - Supported dict properties: - - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - Returns ------- plotly.graph_objs.indicator.delta.Decreasing @@ -48,8 +40,6 @@ def decreasing(self): def decreasing(self, val): self["decreasing"] = val - # font - # ---- @property def font(self): """ @@ -61,52 +51,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.indicator.delta.Font @@ -117,8 +61,6 @@ def font(self): def font(self, val): self["font"] = val - # increasing - # ---------- @property def increasing(self): """ @@ -128,13 +70,6 @@ def increasing(self): - A dict of string/value properties that will be passed to the Increasing constructor - Supported dict properties: - - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value - Returns ------- plotly.graph_objs.indicator.delta.Increasing @@ -145,8 +80,6 @@ def increasing(self): def increasing(self, val): self["increasing"] = val - # position - # -------- @property def position(self): """ @@ -166,8 +99,6 @@ def position(self): def position(self, val): self["position"] = val - # prefix - # ------ @property def prefix(self): """ @@ -187,8 +118,6 @@ def prefix(self): def prefix(self, val): self["prefix"] = val - # reference - # --------- @property def reference(self): """ @@ -208,8 +137,6 @@ def reference(self): def reference(self, val): self["reference"] = val - # relative - # -------- @property def relative(self): """ @@ -228,8 +155,6 @@ def relative(self): def relative(self, val): self["relative"] = val - # suffix - # ------ @property def suffix(self): """ @@ -249,8 +174,6 @@ def suffix(self): def suffix(self, val): self["suffix"] = val - # valueformat - # ----------- @property def valueformat(self): """ @@ -273,8 +196,6 @@ def valueformat(self): def valueformat(self, val): self["valueformat"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -307,15 +228,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - decreasing=None, - font=None, - increasing=None, - position=None, - prefix=None, - reference=None, - relative=None, - suffix=None, - valueformat=None, + decreasing: None | None = None, + font: None | None = None, + increasing: None | None = None, + position: Any | None = None, + prefix: str | None = None, + reference: int | float | None = None, + relative: bool | None = None, + suffix: str | None = None, + valueformat: str | None = None, **kwargs, ): """ @@ -356,14 +277,11 @@ def __init__( ------- Delta """ - super(Delta, self).__init__("delta") - + super().__init__("delta") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -378,54 +296,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.Delta`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("decreasing", None) - _v = decreasing if decreasing is not None else _v - if _v is not None: - self["decreasing"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("increasing", None) - _v = increasing if increasing is not None else _v - if _v is not None: - self["increasing"] = _v - _v = arg.pop("position", None) - _v = position if position is not None else _v - if _v is not None: - self["position"] = _v - _v = arg.pop("prefix", None) - _v = prefix if prefix is not None else _v - if _v is not None: - self["prefix"] = _v - _v = arg.pop("reference", None) - _v = reference if reference is not None else _v - if _v is not None: - self["reference"] = _v - _v = arg.pop("relative", None) - _v = relative if relative is not None else _v - if _v is not None: - self["relative"] = _v - _v = arg.pop("suffix", None) - _v = suffix if suffix is not None else _v - if _v is not None: - self["suffix"] = _v - _v = arg.pop("valueformat", None) - _v = valueformat if valueformat is not None else _v - if _v is not None: - self["valueformat"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("decreasing", arg, decreasing) + self._init_provided("font", arg, font) + self._init_provided("increasing", arg, increasing) + self._init_provided("position", arg, position) + self._init_provided("prefix", arg, prefix) + self._init_provided("reference", arg, reference) + self._init_provided("relative", arg, relative) + self._init_provided("suffix", arg, suffix) + self._init_provided("valueformat", arg, valueformat) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/_domain.py b/plotly/graph_objs/indicator/_domain.py index 1005dea1b0..6188f92290 100644 --- a/plotly/graph_objs/indicator/_domain.py +++ b/plotly/graph_objs/indicator/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): plot fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/_gauge.py b/plotly/graph_objs/indicator/_gauge.py index 0a4ce3b85b..9c5f6503bf 100644 --- a/plotly/graph_objs/indicator/_gauge.py +++ b/plotly/graph_objs/indicator/_gauge.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gauge(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.gauge" _valid_props = { @@ -20,8 +21,6 @@ class Gauge(_BaseTraceHierarchyType): "threshold", } - # axis - # ---- @property def axis(self): """ @@ -31,186 +30,6 @@ def axis(self): - A dict of string/value properties that will be passed to the Axis constructor - Supported dict properties: - - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.axis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.axis.tickformatstopdefaults), - sets the default property values to use for - elements of - indicator.gauge.axis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - Returns ------- plotly.graph_objs.indicator.gauge.Axis @@ -221,8 +40,6 @@ def axis(self): def axis(self, val): self["axis"] = val - # bar - # --- @property def bar(self): """ @@ -234,18 +51,6 @@ def bar(self): - A dict of string/value properties that will be passed to the Bar constructor - Supported dict properties: - - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.ba - r.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. - Returns ------- plotly.graph_objs.indicator.gauge.Bar @@ -256,8 +61,6 @@ def bar(self): def bar(self, val): self["bar"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -268,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -315,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -327,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -374,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -394,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # shape - # ----- @property def shape(self): """ @@ -415,8 +142,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # steps - # ----- @property def steps(self): """ @@ -426,41 +151,6 @@ def steps(self): - A list or tuple of dicts of string/value properties that will be passed to the Step constructor - Supported dict properties: - - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.st - ep.Line` instance or dict with compatible - properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - Sets the range of this axis. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. - Returns ------- tuple[plotly.graph_objs.indicator.gauge.Step] @@ -471,8 +161,6 @@ def steps(self): def steps(self, val): self["steps"] = val - # stepdefaults - # ------------ @property def stepdefaults(self): """ @@ -487,8 +175,6 @@ def stepdefaults(self): - A dict of string/value properties that will be passed to the Step constructor - Supported dict properties: - Returns ------- plotly.graph_objs.indicator.gauge.Step @@ -499,8 +185,6 @@ def stepdefaults(self): def stepdefaults(self, val): self["stepdefaults"] = val - # threshold - # --------- @property def threshold(self): """ @@ -510,18 +194,6 @@ def threshold(self): - A dict of string/value properties that will be passed to the Threshold constructor - Supported dict properties: - - line - :class:`plotly.graph_objects.indicator.gauge.th - reshold.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the threshold line as a - fraction of the thickness of the gauge. - value - Sets a treshold value drawn as a line. - Returns ------- plotly.graph_objs.indicator.gauge.Threshold @@ -532,8 +204,6 @@ def threshold(self): def threshold(self, val): self["threshold"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -568,15 +238,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - axis=None, - bar=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - shape=None, - steps=None, - stepdefaults=None, - threshold=None, + axis: None | None = None, + bar: None | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + shape: Any | None = None, + steps: None | None = None, + stepdefaults: None | None = None, + threshold: None | None = None, **kwargs, ): """ @@ -621,14 +291,11 @@ def __init__( ------- Gauge """ - super(Gauge, self).__init__("gauge") - + super().__init__("gauge") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -643,54 +310,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.Gauge`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("axis", None) - _v = axis if axis is not None else _v - if _v is not None: - self["axis"] = _v - _v = arg.pop("bar", None) - _v = bar if bar is not None else _v - if _v is not None: - self["bar"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("steps", None) - _v = steps if steps is not None else _v - if _v is not None: - self["steps"] = _v - _v = arg.pop("stepdefaults", None) - _v = stepdefaults if stepdefaults is not None else _v - if _v is not None: - self["stepdefaults"] = _v - _v = arg.pop("threshold", None) - _v = threshold if threshold is not None else _v - if _v is not None: - self["threshold"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("axis", arg, axis) + self._init_provided("bar", arg, bar) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("shape", arg, shape) + self._init_provided("steps", arg, steps) + self._init_provided("stepdefaults", arg, stepdefaults) + self._init_provided("threshold", arg, threshold) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/_legendgrouptitle.py b/plotly/graph_objs/indicator/_legendgrouptitle.py index d577919e71..d2d9fe1ce1 100644 --- a/plotly/graph_objs/indicator/_legendgrouptitle.py +++ b/plotly/graph_objs/indicator/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.indicator.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/_number.py b/plotly/graph_objs/indicator/_number.py index bd09a52f1c..0c37246794 100644 --- a/plotly/graph_objs/indicator/_number.py +++ b/plotly/graph_objs/indicator/_number.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Number(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.number" _valid_props = {"font", "prefix", "suffix", "valueformat"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.indicator.number.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # prefix - # ------ @property def prefix(self): """ @@ -100,8 +51,6 @@ def prefix(self): def prefix(self, val): self["prefix"] = val - # suffix - # ------ @property def suffix(self): """ @@ -121,8 +70,6 @@ def suffix(self): def suffix(self, val): self["suffix"] = val - # valueformat - # ----------- @property def valueformat(self): """ @@ -145,8 +92,6 @@ def valueformat(self): def valueformat(self, val): self["valueformat"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -164,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, font=None, prefix=None, suffix=None, valueformat=None, **kwargs + self, + arg=None, + font: None | None = None, + prefix: str | None = None, + suffix: str | None = None, + valueformat: str | None = None, + **kwargs, ): """ Construct a new Number object @@ -191,14 +142,11 @@ def __init__( ------- Number """ - super(Number, self).__init__("number") - + super().__init__("number") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -213,34 +161,12 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.Number`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("prefix", None) - _v = prefix if prefix is not None else _v - if _v is not None: - self["prefix"] = _v - _v = arg.pop("suffix", None) - _v = suffix if suffix is not None else _v - if _v is not None: - self["suffix"] = _v - _v = arg.pop("valueformat", None) - _v = valueformat if valueformat is not None else _v - if _v is not None: - self["valueformat"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("prefix", arg, prefix) + self._init_provided("suffix", arg, suffix) + self._init_provided("valueformat", arg, valueformat) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/_stream.py b/plotly/graph_objs/indicator/_stream.py index 1d962228b6..4e6184cedd 100644 --- a/plotly/graph_objs/indicator/_stream.py +++ b/plotly/graph_objs/indicator/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/_title.py b/plotly/graph_objs/indicator/_title.py index 6f0b54ed75..aaac7ac6d4 100644 --- a/plotly/graph_objs/indicator/_title.py +++ b/plotly/graph_objs/indicator/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator" _path_str = "indicator.title" _valid_props = {"align", "font", "text"} - # align - # ----- @property def align(self): """ @@ -33,8 +32,6 @@ def align(self): def align(self, val): self["align"] = val - # font - # ---- @property def font(self): """ @@ -46,52 +43,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.indicator.title.Font @@ -102,8 +53,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -138,7 +85,14 @@ def _prop_descriptions(self): Sets the title of this indicator. """ - def __init__(self, arg=None, align=None, font=None, text=None, **kwargs): + def __init__( + self, + arg=None, + align: Any | None = None, + font: None | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -161,14 +115,11 @@ def __init__(self, arg=None, align=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -183,30 +134,11 @@ def __init__(self, arg=None, align=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/delta/__init__.py b/plotly/graph_objs/indicator/delta/__init__.py index bb0867bc52..428713734d 100644 --- a/plotly/graph_objs/indicator/delta/__init__.py +++ b/plotly/graph_objs/indicator/delta/__init__.py @@ -1,15 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._decreasing import Decreasing - from ._font import Font - from ._increasing import Increasing -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._decreasing.Decreasing", "._font.Font", "._increasing.Increasing"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._decreasing.Decreasing", "._font.Font", "._increasing.Increasing"] +) diff --git a/plotly/graph_objs/indicator/delta/_decreasing.py b/plotly/graph_objs/indicator/delta/_decreasing.py index 0cef41f0be..75d444dbb9 100644 --- a/plotly/graph_objs/indicator/delta/_decreasing.py +++ b/plotly/graph_objs/indicator/delta/_decreasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Decreasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.delta" _path_str = "indicator.delta.decreasing" _valid_props = {"color", "symbol"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # symbol - # ------ @property def symbol(self): """ @@ -90,8 +52,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -101,7 +61,9 @@ def _prop_descriptions(self): Sets the symbol to display for increasing value """ - def __init__(self, arg=None, color=None, symbol=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, symbol: str | None = None, **kwargs + ): """ Construct a new Decreasing object @@ -120,14 +82,11 @@ def __init__(self, arg=None, color=None, symbol=None, **kwargs): ------- Decreasing """ - super(Decreasing, self).__init__("decreasing") - + super().__init__("decreasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -142,26 +101,10 @@ def __init__(self, arg=None, color=None, symbol=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.delta.Decreasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("symbol", arg, symbol) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/delta/_font.py b/plotly/graph_objs/indicator/delta/_font.py index 41f9eababf..485f3ed198 100644 --- a/plotly/graph_objs/indicator/delta/_font.py +++ b/plotly/graph_objs/indicator/delta/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.delta" _path_str = "indicator.delta.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.delta.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/delta/_increasing.py b/plotly/graph_objs/indicator/delta/_increasing.py index 842122770c..950418dfe5 100644 --- a/plotly/graph_objs/indicator/delta/_increasing.py +++ b/plotly/graph_objs/indicator/delta/_increasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Increasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.delta" _path_str = "indicator.delta.increasing" _valid_props = {"color", "symbol"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # symbol - # ------ @property def symbol(self): """ @@ -90,8 +52,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -101,7 +61,9 @@ def _prop_descriptions(self): Sets the symbol to display for increasing value """ - def __init__(self, arg=None, color=None, symbol=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, symbol: str | None = None, **kwargs + ): """ Construct a new Increasing object @@ -120,14 +82,11 @@ def __init__(self, arg=None, color=None, symbol=None, **kwargs): ------- Increasing """ - super(Increasing, self).__init__("increasing") - + super().__init__("increasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -142,26 +101,10 @@ def __init__(self, arg=None, color=None, symbol=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.delta.Increasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("symbol", arg, symbol) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/__init__.py b/plotly/graph_objs/indicator/gauge/__init__.py index e7ae622591..45f438083f 100644 --- a/plotly/graph_objs/indicator/gauge/__init__.py +++ b/plotly/graph_objs/indicator/gauge/__init__.py @@ -1,20 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._axis import Axis - from ._bar import Bar - from ._step import Step - from ._threshold import Threshold - from . import axis - from . import bar - from . import step - from . import threshold -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".axis", ".bar", ".step", ".threshold"], - ["._axis.Axis", "._bar.Bar", "._step.Step", "._threshold.Threshold"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".axis", ".bar", ".step", ".threshold"], + ["._axis.Axis", "._bar.Bar", "._step.Step", "._threshold.Threshold"], +) diff --git a/plotly/graph_objs/indicator/gauge/_axis.py b/plotly/graph_objs/indicator/gauge/_axis.py index f35563e787..c2d1bc144c 100644 --- a/plotly/graph_objs/indicator/gauge/_axis.py +++ b/plotly/graph_objs/indicator/gauge/_axis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Axis(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge" _path_str = "indicator.gauge.axis" _valid_props = { @@ -41,8 +42,6 @@ class Axis(_BaseTraceHierarchyType): "visible", } - # dtick - # ----- @property def dtick(self): """ @@ -79,8 +78,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -104,8 +101,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -131,8 +126,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -152,8 +145,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -176,8 +167,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -201,8 +190,6 @@ def range(self): def range(self, val): self["range"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -221,8 +208,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -245,8 +230,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -265,8 +248,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -289,8 +270,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -310,8 +289,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -337,8 +314,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -361,8 +336,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -373,42 +346,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -420,8 +358,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -433,52 +369,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.indicator.gauge.axis.Tickfont @@ -489,8 +379,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -519,8 +407,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -530,42 +416,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.indicator.gauge.axis.Tickformatstop] @@ -576,8 +426,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -592,8 +440,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.indicator.gauge.axis.Tickformatstop @@ -604,8 +450,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -630,8 +474,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -650,8 +492,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -677,8 +517,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -698,8 +536,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -721,8 +557,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -742,8 +576,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -756,7 +588,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -764,8 +596,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -784,8 +614,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -797,7 +625,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -805,8 +633,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -825,8 +651,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -845,8 +669,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # visible - # ------- @property def visible(self): """ @@ -867,8 +689,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1033,36 +853,36 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtick=None, - exponentformat=None, - labelalias=None, - minexponent=None, - nticks=None, - range=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - visible=None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + range: list | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -1235,14 +1055,11 @@ def __init__( ------- Axis """ - super(Axis, self).__init__("axis") - + super().__init__("axis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1257,138 +1074,38 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.gauge.Axis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/_bar.py b/plotly/graph_objs/indicator/gauge/_bar.py index 41160d59fa..85acd3981c 100644 --- a/plotly/graph_objs/indicator/gauge/_bar.py +++ b/plotly/graph_objs/indicator/gauge/_bar.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Bar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge" _path_str = "indicator.gauge.bar" _valid_props = {"color", "line", "thickness"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -80,15 +42,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. - Returns ------- plotly.graph_objs.indicator.gauge.bar.Line @@ -99,8 +52,6 @@ def line(self): def line(self, val): self["line"] = val - # thickness - # --------- @property def thickness(self): """ @@ -120,8 +71,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -135,7 +84,14 @@ def _prop_descriptions(self): total thickness of the gauge. """ - def __init__(self, arg=None, color=None, line=None, thickness=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + line: None | None = None, + thickness: int | float | None = None, + **kwargs, + ): """ Construct a new Bar object @@ -160,14 +116,11 @@ def __init__(self, arg=None, color=None, line=None, thickness=None, **kwargs): ------- Bar """ - super(Bar, self).__init__("bar") - + super().__init__("bar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -182,30 +135,11 @@ def __init__(self, arg=None, color=None, line=None, thickness=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.gauge.Bar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) + self._init_provided("thickness", arg, thickness) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/_step.py b/plotly/graph_objs/indicator/gauge/_step.py index 6e69805fab..354f6fb902 100644 --- a/plotly/graph_objs/indicator/gauge/_step.py +++ b/plotly/graph_objs/indicator/gauge/_step.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Step(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge" _path_str = "indicator.gauge.step" _valid_props = {"color", "line", "name", "range", "templateitemname", "thickness"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -80,15 +42,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. - Returns ------- plotly.graph_objs.indicator.gauge.step.Line @@ -99,8 +52,6 @@ def line(self): def line(self, val): self["line"] = val - # name - # ---- @property def name(self): """ @@ -126,8 +77,6 @@ def name(self): def name(self, val): self["name"] = val - # range - # ----- @property def range(self): """ @@ -151,8 +100,6 @@ def range(self): def range(self, val): self["range"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -179,8 +126,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # thickness - # --------- @property def thickness(self): """ @@ -200,8 +145,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -239,12 +182,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - line=None, - name=None, - range=None, - templateitemname=None, - thickness=None, + color: str | None = None, + line: None | None = None, + name: str | None = None, + range: list | None = None, + templateitemname: str | None = None, + thickness: int | float | None = None, **kwargs, ): """ @@ -290,14 +233,11 @@ def __init__( ------- Step """ - super(Step, self).__init__("steps") - + super().__init__("steps") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -312,42 +252,14 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.gauge.Step`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) + self._init_provided("name", arg, name) + self._init_provided("range", arg, range) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("thickness", arg, thickness) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/_threshold.py b/plotly/graph_objs/indicator/gauge/_threshold.py index 288a7fadfe..77d005cd80 100644 --- a/plotly/graph_objs/indicator/gauge/_threshold.py +++ b/plotly/graph_objs/indicator/gauge/_threshold.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Threshold(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge" _path_str = "indicator.gauge.threshold" _valid_props = {"line", "thickness", "value"} - # line - # ---- @property def line(self): """ @@ -21,13 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the threshold line. - width - Sets the width (in px) of the threshold line. - Returns ------- plotly.graph_objs.indicator.gauge.threshold.Line @@ -38,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # thickness - # --------- @property def thickness(self): """ @@ -59,8 +49,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # value - # ----- @property def value(self): """ @@ -79,8 +67,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -94,7 +80,14 @@ def _prop_descriptions(self): Sets a treshold value drawn as a line. """ - def __init__(self, arg=None, line=None, thickness=None, value=None, **kwargs): + def __init__( + self, + arg=None, + line: None | None = None, + thickness: int | float | None = None, + value: int | float | None = None, + **kwargs, + ): """ Construct a new Threshold object @@ -117,14 +110,11 @@ def __init__(self, arg=None, line=None, thickness=None, value=None, **kwargs): ------- Threshold """ - super(Threshold, self).__init__("threshold") - + super().__init__("threshold") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -139,30 +129,11 @@ def __init__(self, arg=None, line=None, thickness=None, value=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.gauge.Threshold`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("thickness", arg, thickness) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/axis/__init__.py b/plotly/graph_objs/indicator/gauge/axis/__init__.py index ae53e8859f..a1ed04a04e 100644 --- a/plotly/graph_objs/indicator/gauge/axis/__init__.py +++ b/plotly/graph_objs/indicator/gauge/axis/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop"] +) diff --git a/plotly/graph_objs/indicator/gauge/axis/_tickfont.py b/plotly/graph_objs/indicator/gauge/axis/_tickfont.py index fcb620a75e..152f7a8321 100644 --- a/plotly/graph_objs/indicator/gauge/axis/_tickfont.py +++ b/plotly/graph_objs/indicator/gauge/axis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge.axis" _path_str = "indicator.gauge.axis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py b/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py index b6f48d2a69..adacc14687 100644 --- a/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py +++ b/plotly/graph_objs/indicator/gauge/axis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge.axis" _path_str = "indicator.gauge.axis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.gauge.axis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/bar/__init__.py b/plotly/graph_objs/indicator/gauge/bar/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/indicator/gauge/bar/__init__.py +++ b/plotly/graph_objs/indicator/gauge/bar/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/indicator/gauge/bar/_line.py b/plotly/graph_objs/indicator/gauge/bar/_line.py index 7e9b0f3d76..3f9ea5b563 100644 --- a/plotly/graph_objs/indicator/gauge/bar/_line.py +++ b/plotly/graph_objs/indicator/gauge/bar/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge.bar" _path_str = "indicator.gauge.bar.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -101,7 +61,13 @@ def _prop_descriptions(self): sector. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -121,14 +87,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -143,26 +106,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.gauge.bar.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/step/__init__.py b/plotly/graph_objs/indicator/gauge/step/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/indicator/gauge/step/__init__.py +++ b/plotly/graph_objs/indicator/gauge/step/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/indicator/gauge/step/_line.py b/plotly/graph_objs/indicator/gauge/step/_line.py index ef6682be3b..7d5e69b022 100644 --- a/plotly/graph_objs/indicator/gauge/step/_line.py +++ b/plotly/graph_objs/indicator/gauge/step/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge.step" _path_str = "indicator.gauge.step.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -101,7 +61,13 @@ def _prop_descriptions(self): sector. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -121,14 +87,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -143,26 +106,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.gauge.step.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/gauge/threshold/__init__.py b/plotly/graph_objs/indicator/gauge/threshold/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/indicator/gauge/threshold/__init__.py +++ b/plotly/graph_objs/indicator/gauge/threshold/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/indicator/gauge/threshold/_line.py b/plotly/graph_objs/indicator/gauge/threshold/_line.py index 6a437a88d5..ebc01b8d6d 100644 --- a/plotly/graph_objs/indicator/gauge/threshold/_line.py +++ b/plotly/graph_objs/indicator/gauge/threshold/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.gauge.threshold" _path_str = "indicator.gauge.threshold.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the width (in px) of the threshold line. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.indicator.gauge.threshold.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/legendgrouptitle/__init__.py b/plotly/graph_objs/indicator/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/indicator/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/indicator/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/indicator/legendgrouptitle/_font.py b/plotly/graph_objs/indicator/legendgrouptitle/_font.py index 63989ccdd7..3b8ebeb227 100644 --- a/plotly/graph_objs/indicator/legendgrouptitle/_font.py +++ b/plotly/graph_objs/indicator/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.legendgrouptitle" _path_str = "indicator.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/number/__init__.py b/plotly/graph_objs/indicator/number/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/indicator/number/__init__.py +++ b/plotly/graph_objs/indicator/number/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/indicator/number/_font.py b/plotly/graph_objs/indicator/number/_font.py index abe1446861..40e8bee888 100644 --- a/plotly/graph_objs/indicator/number/_font.py +++ b/plotly/graph_objs/indicator/number/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.number" _path_str = "indicator.number.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.number.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/indicator/title/__init__.py b/plotly/graph_objs/indicator/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/indicator/title/__init__.py +++ b/plotly/graph_objs/indicator/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/indicator/title/_font.py b/plotly/graph_objs/indicator/title/_font.py index d5ddfe375c..ce06c650a7 100644 --- a/plotly/graph_objs/indicator/title/_font.py +++ b/plotly/graph_objs/indicator/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "indicator.title" _path_str = "indicator.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.indicator.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/__init__.py b/plotly/graph_objs/isosurface/__init__.py index 505fd03f99..0b8a4b7653 100644 --- a/plotly/graph_objs/isosurface/__init__.py +++ b/plotly/graph_objs/isosurface/__init__.py @@ -1,40 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._caps import Caps - from ._colorbar import ColorBar - from ._contour import Contour - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._lighting import Lighting - from ._lightposition import Lightposition - from ._slices import Slices - from ._spaceframe import Spaceframe - from ._stream import Stream - from ._surface import Surface - from . import caps - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle - from . import slices -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".caps", ".colorbar", ".hoverlabel", ".legendgrouptitle", ".slices"], - [ - "._caps.Caps", - "._colorbar.ColorBar", - "._contour.Contour", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._lighting.Lighting", - "._lightposition.Lightposition", - "._slices.Slices", - "._spaceframe.Spaceframe", - "._stream.Stream", - "._surface.Surface", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".caps", ".colorbar", ".hoverlabel", ".legendgrouptitle", ".slices"], + [ + "._caps.Caps", + "._colorbar.ColorBar", + "._contour.Contour", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._slices.Slices", + "._spaceframe.Spaceframe", + "._stream.Stream", + "._surface.Surface", + ], +) diff --git a/plotly/graph_objs/isosurface/_caps.py b/plotly/graph_objs/isosurface/_caps.py index f6dcf8ef17..b6ad6b74b1 100644 --- a/plotly/graph_objs/isosurface/_caps.py +++ b/plotly/graph_objs/isosurface/_caps.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Caps(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.caps" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -21,22 +20,6 @@ def x(self): - A dict of string/value properties that will be passed to the X constructor - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - Returns ------- plotly.graph_objs.isosurface.caps.X @@ -47,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -58,22 +39,6 @@ def y(self): - A dict of string/value properties that will be passed to the Y constructor - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - Returns ------- plotly.graph_objs.isosurface.caps.Y @@ -84,8 +49,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -95,22 +58,6 @@ def z(self): - A dict of string/value properties that will be passed to the Z constructor - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - Returns ------- plotly.graph_objs.isosurface.caps.Z @@ -121,8 +68,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -137,7 +82,14 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: None | None = None, + y: None | None = None, + z: None | None = None, + **kwargs, + ): """ Construct a new Caps object @@ -161,14 +113,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Caps """ - super(Caps, self).__init__("caps") - + super().__init__("caps") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -183,30 +132,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Caps`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_colorbar.py b/plotly/graph_objs/isosurface/_colorbar.py index 3f9bbf779d..0c49afed46 100644 --- a/plotly/graph_objs/isosurface/_colorbar.py +++ b/plotly/graph_objs/isosurface/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.isosurface.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.isosurface.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -912,8 +637,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.isosurface.colorbar.Tickformatstop @@ -924,8 +647,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -948,8 +669,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -973,8 +692,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -999,8 +716,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1019,8 +734,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1046,8 +759,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1067,8 +778,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1090,8 +799,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1111,8 +818,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1125,7 +830,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1133,8 +838,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1153,8 +856,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1166,7 +867,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1174,8 +875,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1194,8 +893,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1214,8 +911,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1225,18 +920,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.isosurface.colorbar.Title @@ -1247,8 +930,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1273,8 +954,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1297,8 +976,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1317,8 +994,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1340,8 +1015,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1366,8 +1039,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1390,8 +1061,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1410,8 +1079,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1433,8 +1100,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1681,55 +1346,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1984,14 +1649,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2006,214 +1668,57 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_contour.py b/plotly/graph_objs/isosurface/_contour.py index 2ad2e6a31b..760bfe8cd4 100644 --- a/plotly/graph_objs/isosurface/_contour.py +++ b/plotly/graph_objs/isosurface/_contour.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contour(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.contour" _valid_props = {"color", "show", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # show - # ---- @property def show(self): """ @@ -89,8 +51,6 @@ def show(self): def show(self, val): self["show"] = val - # width - # ----- @property def width(self): """ @@ -109,8 +69,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the width of the contour lines. """ - def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + show: bool | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Contour object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): ------- Contour """ - super(Contour, self).__init__("contour") - + super().__init__("contour") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Contour`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("show", arg, show) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_hoverlabel.py b/plotly/graph_objs/isosurface/_hoverlabel.py index 6e69404371..f509be0006 100644 --- a/plotly/graph_objs/isosurface/_hoverlabel.py +++ b/plotly/graph_objs/isosurface/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.isosurface.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_legendgrouptitle.py b/plotly/graph_objs/isosurface/_legendgrouptitle.py index fa29490fb7..038026ddad 100644 --- a/plotly/graph_objs/isosurface/_legendgrouptitle.py +++ b/plotly/graph_objs/isosurface/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.isosurface.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_lighting.py b/plotly/graph_objs/isosurface/_lighting.py index 33d5f3cdaa..b0aa5becb1 100644 --- a/plotly/graph_objs/isosurface/_lighting.py +++ b/plotly/graph_objs/isosurface/_lighting.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lighting(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.lighting" _valid_props = { @@ -18,8 +19,6 @@ class Lighting(_BaseTraceHierarchyType): "vertexnormalsepsilon", } - # ambient - # ------- @property def ambient(self): """ @@ -39,8 +38,6 @@ def ambient(self): def ambient(self, val): self["ambient"] = val - # diffuse - # ------- @property def diffuse(self): """ @@ -60,8 +57,6 @@ def diffuse(self): def diffuse(self, val): self["diffuse"] = val - # facenormalsepsilon - # ------------------ @property def facenormalsepsilon(self): """ @@ -81,8 +76,6 @@ def facenormalsepsilon(self): def facenormalsepsilon(self, val): self["facenormalsepsilon"] = val - # fresnel - # ------- @property def fresnel(self): """ @@ -103,8 +96,6 @@ def fresnel(self): def fresnel(self, val): self["fresnel"] = val - # roughness - # --------- @property def roughness(self): """ @@ -124,8 +115,6 @@ def roughness(self): def roughness(self, val): self["roughness"] = val - # specular - # -------- @property def specular(self): """ @@ -145,8 +134,6 @@ def specular(self): def specular(self, val): self["specular"] = val - # vertexnormalsepsilon - # -------------------- @property def vertexnormalsepsilon(self): """ @@ -166,8 +153,6 @@ def vertexnormalsepsilon(self): def vertexnormalsepsilon(self, val): self["vertexnormalsepsilon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -199,13 +184,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, + ambient: int | float | None = None, + diffuse: int | float | None = None, + facenormalsepsilon: int | float | None = None, + fresnel: int | float | None = None, + roughness: int | float | None = None, + specular: int | float | None = None, + vertexnormalsepsilon: int | float | None = None, **kwargs, ): """ @@ -245,14 +230,11 @@ def __init__( ------- Lighting """ - super(Lighting, self).__init__("lighting") - + super().__init__("lighting") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -267,46 +249,15 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.Lighting`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - _v = ambient if ambient is not None else _v - if _v is not None: - self["ambient"] = _v - _v = arg.pop("diffuse", None) - _v = diffuse if diffuse is not None else _v - if _v is not None: - self["diffuse"] = _v - _v = arg.pop("facenormalsepsilon", None) - _v = facenormalsepsilon if facenormalsepsilon is not None else _v - if _v is not None: - self["facenormalsepsilon"] = _v - _v = arg.pop("fresnel", None) - _v = fresnel if fresnel is not None else _v - if _v is not None: - self["fresnel"] = _v - _v = arg.pop("roughness", None) - _v = roughness if roughness is not None else _v - if _v is not None: - self["roughness"] = _v - _v = arg.pop("specular", None) - _v = specular if specular is not None else _v - if _v is not None: - self["specular"] = _v - _v = arg.pop("vertexnormalsepsilon", None) - _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - if _v is not None: - self["vertexnormalsepsilon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("ambient", arg, ambient) + self._init_provided("diffuse", arg, diffuse) + self._init_provided("facenormalsepsilon", arg, facenormalsepsilon) + self._init_provided("fresnel", arg, fresnel) + self._init_provided("roughness", arg, roughness) + self._init_provided("specular", arg, specular) + self._init_provided("vertexnormalsepsilon", arg, vertexnormalsepsilon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_lightposition.py b/plotly/graph_objs/isosurface/_lightposition.py index c7ceea779b..edc9609b0f 100644 --- a/plotly/graph_objs/isosurface/_lightposition.py +++ b/plotly/graph_objs/isosurface/_lightposition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.lightposition" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -30,8 +29,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -50,8 +47,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -70,8 +65,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): vertex. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Lightposition object @@ -110,14 +110,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Lightposition """ - super(Lightposition, self).__init__("lightposition") - + super().__init__("lightposition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Lightposition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_slices.py b/plotly/graph_objs/isosurface/_slices.py index 73e504aaa8..856fe7dbfe 100644 --- a/plotly/graph_objs/isosurface/_slices.py +++ b/plotly/graph_objs/isosurface/_slices.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Slices(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.slices" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -21,27 +20,6 @@ def x(self): - A dict of string/value properties that will be passed to the X constructor - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the x dimension are drawn. - Returns ------- plotly.graph_objs.isosurface.slices.X @@ -52,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -63,27 +39,6 @@ def y(self): - A dict of string/value properties that will be passed to the Y constructor - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the y dimension are drawn. - Returns ------- plotly.graph_objs.isosurface.slices.Y @@ -94,8 +49,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -105,27 +58,6 @@ def z(self): - A dict of string/value properties that will be passed to the Z constructor - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the z dimension are drawn. - Returns ------- plotly.graph_objs.isosurface.slices.Z @@ -136,8 +68,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -152,7 +82,14 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: None | None = None, + y: None | None = None, + z: None | None = None, + **kwargs, + ): """ Construct a new Slices object @@ -176,14 +113,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Slices """ - super(Slices, self).__init__("slices") - + super().__init__("slices") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -198,30 +132,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Slices`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_spaceframe.py b/plotly/graph_objs/isosurface/_spaceframe.py index 867a10eba0..2cbae92041 100644 --- a/plotly/graph_objs/isosurface/_spaceframe.py +++ b/plotly/graph_objs/isosurface/_spaceframe.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Spaceframe(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.spaceframe" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -34,8 +33,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): 1. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Spaceframe object @@ -102,14 +103,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- Spaceframe """ - super(Spaceframe, self).__init__("spaceframe") - + super().__init__("spaceframe") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,26 +122,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Spaceframe`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_stream.py b/plotly/graph_objs/isosurface/_stream.py index 02fac3ff9d..a8f221aeca 100644 --- a/plotly/graph_objs/isosurface/_stream.py +++ b/plotly/graph_objs/isosurface/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/_surface.py b/plotly/graph_objs/isosurface/_surface.py index 7f8de2c6fa..0a49ca36b8 100644 --- a/plotly/graph_objs/isosurface/_surface.py +++ b/plotly/graph_objs/isosurface/_surface.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Surface(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface" _path_str = "isosurface.surface" _valid_props = {"count", "fill", "pattern", "show"} - # count - # ----- @property def count(self): """ @@ -33,8 +32,6 @@ def count(self): def count(self, val): self["count"] = val - # fill - # ---- @property def fill(self): """ @@ -56,8 +53,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # pattern - # ------- @property def pattern(self): """ @@ -85,8 +80,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # show - # ---- @property def show(self): """ @@ -105,8 +98,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -136,7 +127,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, count=None, fill=None, pattern=None, show=None, **kwargs + self, + arg=None, + count: int | None = None, + fill: int | float | None = None, + pattern: Any | None = None, + show: bool | None = None, + **kwargs, ): """ Construct a new Surface object @@ -175,14 +172,11 @@ def __init__( ------- Surface """ - super(Surface, self).__init__("surface") - + super().__init__("surface") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -197,34 +191,12 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.Surface`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("count", None) - _v = count if count is not None else _v - if _v is not None: - self["count"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("count", arg, count) + self._init_provided("fill", arg, fill) + self._init_provided("pattern", arg, pattern) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/caps/__init__.py b/plotly/graph_objs/isosurface/caps/__init__.py index b7c5709451..649c038369 100644 --- a/plotly/graph_objs/isosurface/caps/__init__.py +++ b/plotly/graph_objs/isosurface/caps/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._x import X - from ._y import Y - from ._z import Z -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._x.X", "._y.Y", "._z.Z"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._x.X", "._y.Y", "._z.Z"] +) diff --git a/plotly/graph_objs/isosurface/caps/_x.py b/plotly/graph_objs/isosurface/caps/_x.py index f1d966f380..1f9d9cd154 100644 --- a/plotly/graph_objs/isosurface/caps/_x.py +++ b/plotly/graph_objs/isosurface/caps/_x.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.caps" _path_str = "isosurface.caps.x" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): openings parallel to the edges. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new X object @@ -102,14 +103,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- X """ - super(X, self).__init__("x") - + super().__init__("x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,26 +122,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.caps.X`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/caps/_y.py b/plotly/graph_objs/isosurface/caps/_y.py index 8e4826bbb5..70c7820526 100644 --- a/plotly/graph_objs/isosurface/caps/_y.py +++ b/plotly/graph_objs/isosurface/caps/_y.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.caps" _path_str = "isosurface.caps.y" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): openings parallel to the edges. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Y object @@ -102,14 +103,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- Y """ - super(Y, self).__init__("y") - + super().__init__("y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,26 +122,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.caps.Y`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/caps/_z.py b/plotly/graph_objs/isosurface/caps/_z.py index 832186f522..467492c573 100644 --- a/plotly/graph_objs/isosurface/caps/_z.py +++ b/plotly/graph_objs/isosurface/caps/_z.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Z(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.caps" _path_str = "isosurface.caps.z" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): openings parallel to the edges. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Z object @@ -102,14 +103,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- Z """ - super(Z, self).__init__("z") - + super().__init__("z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,26 +122,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.caps.Z`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/colorbar/__init__.py b/plotly/graph_objs/isosurface/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/isosurface/colorbar/__init__.py +++ b/plotly/graph_objs/isosurface/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/isosurface/colorbar/_tickfont.py b/plotly/graph_objs/isosurface/colorbar/_tickfont.py index 1caa4e05f7..c12f10b96e 100644 --- a/plotly/graph_objs/isosurface/colorbar/_tickfont.py +++ b/plotly/graph_objs/isosurface/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.colorbar" _path_str = "isosurface.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py b/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py index 12c9c0d1a1..00a6c9534b 100644 --- a/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/isosurface/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.colorbar" _path_str = "isosurface.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/colorbar/_title.py b/plotly/graph_objs/isosurface/colorbar/_title.py index d7985da294..93252f2c8d 100644 --- a/plotly/graph_objs/isosurface/colorbar/_title.py +++ b/plotly/graph_objs/isosurface/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.colorbar" _path_str = "isosurface.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.isosurface.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.isosurface.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/colorbar/title/__init__.py b/plotly/graph_objs/isosurface/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/isosurface/colorbar/title/__init__.py +++ b/plotly/graph_objs/isosurface/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/isosurface/colorbar/title/_font.py b/plotly/graph_objs/isosurface/colorbar/title/_font.py index 17b1b32fdd..ca369ff52e 100644 --- a/plotly/graph_objs/isosurface/colorbar/title/_font.py +++ b/plotly/graph_objs/isosurface/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.colorbar.title" _path_str = "isosurface.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/hoverlabel/__init__.py b/plotly/graph_objs/isosurface/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/isosurface/hoverlabel/__init__.py +++ b/plotly/graph_objs/isosurface/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/isosurface/hoverlabel/_font.py b/plotly/graph_objs/isosurface/hoverlabel/_font.py index b1fe9aacd3..5f50dbe6b5 100644 --- a/plotly/graph_objs/isosurface/hoverlabel/_font.py +++ b/plotly/graph_objs/isosurface/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.hoverlabel" _path_str = "isosurface.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/legendgrouptitle/__init__.py b/plotly/graph_objs/isosurface/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/isosurface/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/isosurface/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/isosurface/legendgrouptitle/_font.py b/plotly/graph_objs/isosurface/legendgrouptitle/_font.py index b84607e962..0d06bcdf4b 100644 --- a/plotly/graph_objs/isosurface/legendgrouptitle/_font.py +++ b/plotly/graph_objs/isosurface/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.legendgrouptitle" _path_str = "isosurface.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/slices/__init__.py b/plotly/graph_objs/isosurface/slices/__init__.py index b7c5709451..649c038369 100644 --- a/plotly/graph_objs/isosurface/slices/__init__.py +++ b/plotly/graph_objs/isosurface/slices/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._x import X - from ._y import Y - from ._z import Z -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._x.X", "._y.Y", "._z.Z"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._x.X", "._y.Y", "._z.Z"] +) diff --git a/plotly/graph_objs/isosurface/slices/_x.py b/plotly/graph_objs/isosurface/slices/_x.py index b7efd330fd..71e79206d8 100644 --- a/plotly/graph_objs/isosurface/slices/_x.py +++ b/plotly/graph_objs/isosurface/slices/_x.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.slices" _path_str = "isosurface.slices.x" _valid_props = {"fill", "locations", "locationssrc", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # locations - # --------- @property def locations(self): """ @@ -47,7 +44,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -55,8 +52,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -76,8 +71,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # show - # ---- @property def show(self): """ @@ -97,8 +90,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -123,10 +114,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, + fill: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + show: bool | None = None, **kwargs, ): """ @@ -159,14 +150,11 @@ def __init__( ------- X """ - super(X, self).__init__("x") - + super().__init__("x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -181,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.slices.X`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/slices/_y.py b/plotly/graph_objs/isosurface/slices/_y.py index eb45261166..751e917a11 100644 --- a/plotly/graph_objs/isosurface/slices/_y.py +++ b/plotly/graph_objs/isosurface/slices/_y.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.slices" _path_str = "isosurface.slices.y" _valid_props = {"fill", "locations", "locationssrc", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # locations - # --------- @property def locations(self): """ @@ -47,7 +44,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -55,8 +52,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -76,8 +71,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # show - # ---- @property def show(self): """ @@ -97,8 +90,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -123,10 +114,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, + fill: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + show: bool | None = None, **kwargs, ): """ @@ -159,14 +150,11 @@ def __init__( ------- Y """ - super(Y, self).__init__("y") - + super().__init__("y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -181,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.slices.Y`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/isosurface/slices/_z.py b/plotly/graph_objs/isosurface/slices/_z.py index b0716f8a9e..4c8685c54d 100644 --- a/plotly/graph_objs/isosurface/slices/_z.py +++ b/plotly/graph_objs/isosurface/slices/_z.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Z(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "isosurface.slices" _path_str = "isosurface.slices.z" _valid_props = {"fill", "locations", "locationssrc", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # locations - # --------- @property def locations(self): """ @@ -47,7 +44,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -55,8 +52,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -76,8 +71,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # show - # ---- @property def show(self): """ @@ -97,8 +90,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -123,10 +114,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, + fill: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + show: bool | None = None, **kwargs, ): """ @@ -159,14 +150,11 @@ def __init__( ------- Z """ - super(Z, self).__init__("z") - + super().__init__("z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -181,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.isosurface.slices.Z`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/__init__.py b/plotly/graph_objs/layout/__init__.py index 49f512f8e1..7c2e2a0105 100644 --- a/plotly/graph_objs/layout/__init__.py +++ b/plotly/graph_objs/layout/__init__.py @@ -1,120 +1,63 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._activeselection import Activeselection - from ._activeshape import Activeshape - from ._annotation import Annotation - from ._coloraxis import Coloraxis - from ._colorscale import Colorscale - from ._font import Font - from ._geo import Geo - from ._grid import Grid - from ._hoverlabel import Hoverlabel - from ._image import Image - from ._legend import Legend - from ._map import Map - from ._mapbox import Mapbox - from ._margin import Margin - from ._modebar import Modebar - from ._newselection import Newselection - from ._newshape import Newshape - from ._polar import Polar - from ._scene import Scene - from ._selection import Selection - from ._shape import Shape - from ._slider import Slider - from ._smith import Smith - from ._template import Template - from ._ternary import Ternary - from ._title import Title - from ._transition import Transition - from ._uniformtext import Uniformtext - from ._updatemenu import Updatemenu - from ._xaxis import XAxis - from ._yaxis import YAxis - from . import annotation - from . import coloraxis - from . import geo - from . import grid - from . import hoverlabel - from . import legend - from . import map - from . import mapbox - from . import newselection - from . import newshape - from . import polar - from . import scene - from . import selection - from . import shape - from . import slider - from . import smith - from . import template - from . import ternary - from . import title - from . import updatemenu - from . import xaxis - from . import yaxis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".annotation", - ".coloraxis", - ".geo", - ".grid", - ".hoverlabel", - ".legend", - ".map", - ".mapbox", - ".newselection", - ".newshape", - ".polar", - ".scene", - ".selection", - ".shape", - ".slider", - ".smith", - ".template", - ".ternary", - ".title", - ".updatemenu", - ".xaxis", - ".yaxis", - ], - [ - "._activeselection.Activeselection", - "._activeshape.Activeshape", - "._annotation.Annotation", - "._coloraxis.Coloraxis", - "._colorscale.Colorscale", - "._font.Font", - "._geo.Geo", - "._grid.Grid", - "._hoverlabel.Hoverlabel", - "._image.Image", - "._legend.Legend", - "._map.Map", - "._mapbox.Mapbox", - "._margin.Margin", - "._modebar.Modebar", - "._newselection.Newselection", - "._newshape.Newshape", - "._polar.Polar", - "._scene.Scene", - "._selection.Selection", - "._shape.Shape", - "._slider.Slider", - "._smith.Smith", - "._template.Template", - "._ternary.Ternary", - "._title.Title", - "._transition.Transition", - "._uniformtext.Uniformtext", - "._updatemenu.Updatemenu", - "._xaxis.XAxis", - "._yaxis.YAxis", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".annotation", + ".coloraxis", + ".geo", + ".grid", + ".hoverlabel", + ".legend", + ".map", + ".mapbox", + ".newselection", + ".newshape", + ".polar", + ".scene", + ".selection", + ".shape", + ".slider", + ".smith", + ".template", + ".ternary", + ".title", + ".updatemenu", + ".xaxis", + ".yaxis", + ], + [ + "._activeselection.Activeselection", + "._activeshape.Activeshape", + "._annotation.Annotation", + "._coloraxis.Coloraxis", + "._colorscale.Colorscale", + "._font.Font", + "._geo.Geo", + "._grid.Grid", + "._hoverlabel.Hoverlabel", + "._image.Image", + "._legend.Legend", + "._map.Map", + "._mapbox.Mapbox", + "._margin.Margin", + "._modebar.Modebar", + "._newselection.Newselection", + "._newshape.Newshape", + "._polar.Polar", + "._scene.Scene", + "._selection.Selection", + "._shape.Shape", + "._slider.Slider", + "._smith.Smith", + "._template.Template", + "._ternary.Ternary", + "._title.Title", + "._transition.Transition", + "._uniformtext.Uniformtext", + "._updatemenu.Updatemenu", + "._xaxis.XAxis", + "._yaxis.YAxis", + ], +) diff --git a/plotly/graph_objs/layout/_activeselection.py b/plotly/graph_objs/layout/_activeselection.py index 97b804c061..660c0fc55e 100644 --- a/plotly/graph_objs/layout/_activeselection.py +++ b/plotly/graph_objs/layout/_activeselection.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Activeselection(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.activeselection" _valid_props = {"fillcolor", "opacity"} - # fillcolor - # --------- @property def fillcolor(self): """ @@ -22,42 +21,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the opacity of the active selection. """ - def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + fillcolor: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Activeselection object @@ -119,14 +85,11 @@ def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs): ------- Activeselection """ - super(Activeselection, self).__init__("activeselection") - + super().__init__("activeselection") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.Activeselection`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_activeshape.py b/plotly/graph_objs/layout/_activeshape.py index de5f6c8c5f..30a00e8f2d 100644 --- a/plotly/graph_objs/layout/_activeshape.py +++ b/plotly/graph_objs/layout/_activeshape.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Activeshape(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.activeshape" _valid_props = {"fillcolor", "opacity"} - # fillcolor - # --------- @property def fillcolor(self): """ @@ -22,42 +21,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the opacity of the active shape. """ - def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + fillcolor: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Activeshape object @@ -119,14 +85,11 @@ def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs): ------- Activeshape """ - super(Activeshape, self).__init__("activeshape") - + super().__init__("activeshape") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, fillcolor=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.Activeshape`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_annotation.py b/plotly/graph_objs/layout/_annotation.py index dc021742cc..a21d1d6e51 100644 --- a/plotly/graph_objs/layout/_annotation.py +++ b/plotly/graph_objs/layout/_annotation.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Annotation(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.annotation" _valid_props = { @@ -54,8 +55,6 @@ class Annotation(_BaseLayoutHierarchyType): "yshift", } - # align - # ----- @property def align(self): """ @@ -78,8 +77,6 @@ def align(self): def align(self, val): self["align"] = val - # arrowcolor - # ---------- @property def arrowcolor(self): """ @@ -90,42 +87,7 @@ def arrowcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -137,8 +99,6 @@ def arrowcolor(self): def arrowcolor(self, val): self["arrowcolor"] = val - # arrowhead - # --------- @property def arrowhead(self): """ @@ -158,8 +118,6 @@ def arrowhead(self): def arrowhead(self, val): self["arrowhead"] = val - # arrowside - # --------- @property def arrowside(self): """ @@ -181,8 +139,6 @@ def arrowside(self): def arrowside(self, val): self["arrowside"] = val - # arrowsize - # --------- @property def arrowsize(self): """ @@ -203,8 +159,6 @@ def arrowsize(self): def arrowsize(self, val): self["arrowsize"] = val - # arrowwidth - # ---------- @property def arrowwidth(self): """ @@ -223,8 +177,6 @@ def arrowwidth(self): def arrowwidth(self, val): self["arrowwidth"] = val - # ax - # -- @property def ax(self): """ @@ -247,8 +199,6 @@ def ax(self): def ax(self, val): self["ax"] = val - # axref - # ----- @property def axref(self): """ @@ -289,8 +239,6 @@ def axref(self): def axref(self, val): self["axref"] = val - # ay - # -- @property def ay(self): """ @@ -313,8 +261,6 @@ def ay(self): def ay(self, val): self["ay"] = val - # ayref - # ----- @property def ayref(self): """ @@ -355,8 +301,6 @@ def ayref(self): def ayref(self, val): self["ayref"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -367,42 +311,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -414,8 +323,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -426,42 +333,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -473,8 +345,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderpad - # --------- @property def borderpad(self): """ @@ -494,8 +364,6 @@ def borderpad(self): def borderpad(self, val): self["borderpad"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -515,8 +383,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # captureevents - # ------------- @property def captureevents(self): """ @@ -540,8 +406,6 @@ def captureevents(self): def captureevents(self, val): self["captureevents"] = val - # clicktoshow - # ----------- @property def clicktoshow(self): """ @@ -572,8 +436,6 @@ def clicktoshow(self): def clicktoshow(self, val): self["clicktoshow"] = val - # font - # ---- @property def font(self): """ @@ -585,52 +447,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.annotation.Font @@ -641,8 +457,6 @@ def font(self): def font(self, val): self["font"] = val - # height - # ------ @property def height(self): """ @@ -662,8 +476,6 @@ def height(self): def height(self, val): self["height"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -673,21 +485,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. - Returns ------- plotly.graph_objs.layout.annotation.Hoverlabel @@ -698,8 +495,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -720,8 +515,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # name - # ---- @property def name(self): """ @@ -747,8 +540,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -767,8 +558,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # showarrow - # --------- @property def showarrow(self): """ @@ -789,8 +578,6 @@ def showarrow(self): def showarrow(self, val): self["showarrow"] = val - # standoff - # -------- @property def standoff(self): """ @@ -813,8 +600,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # startarrowhead - # -------------- @property def startarrowhead(self): """ @@ -834,8 +619,6 @@ def startarrowhead(self): def startarrowhead(self, val): self["startarrowhead"] = val - # startarrowsize - # -------------- @property def startarrowsize(self): """ @@ -856,8 +639,6 @@ def startarrowsize(self): def startarrowsize(self, val): self["startarrowsize"] = val - # startstandoff - # ------------- @property def startstandoff(self): """ @@ -880,8 +661,6 @@ def startstandoff(self): def startstandoff(self, val): self["startstandoff"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -908,8 +687,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # text - # ---- @property def text(self): """ @@ -932,8 +709,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -955,8 +730,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # valign - # ------ @property def valign(self): """ @@ -978,8 +751,6 @@ def valign(self): def valign(self, val): self["valign"] = val - # visible - # ------- @property def visible(self): """ @@ -998,8 +769,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -1020,8 +789,6 @@ def width(self): def width(self, val): self["width"] = val - # x - # - @property def x(self): """ @@ -1045,8 +812,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1074,8 +839,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xclick - # ------ @property def xclick(self): """ @@ -1094,8 +857,6 @@ def xclick(self): def xclick(self, val): self["xclick"] = val - # xref - # ---- @property def xref(self): """ @@ -1127,8 +888,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # xshift - # ------ @property def xshift(self): """ @@ -1148,8 +907,6 @@ def xshift(self): def xshift(self, val): self["xshift"] = val - # y - # - @property def y(self): """ @@ -1173,8 +930,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1202,8 +957,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # yclick - # ------ @property def yclick(self): """ @@ -1222,8 +975,6 @@ def yclick(self): def yclick(self, val): self["yclick"] = val - # yref - # ---- @property def yref(self): """ @@ -1255,8 +1006,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # yshift - # ------ @property def yshift(self): """ @@ -1276,8 +1025,6 @@ def yshift(self): def yshift(self, val): self["yshift"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1564,49 +1311,49 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - arrowcolor=None, - arrowhead=None, - arrowside=None, - arrowsize=None, - arrowwidth=None, - ax=None, - axref=None, - ay=None, - ayref=None, - bgcolor=None, - bordercolor=None, - borderpad=None, - borderwidth=None, - captureevents=None, - clicktoshow=None, - font=None, - height=None, - hoverlabel=None, - hovertext=None, - name=None, - opacity=None, - showarrow=None, - standoff=None, - startarrowhead=None, - startarrowsize=None, - startstandoff=None, - templateitemname=None, - text=None, - textangle=None, - valign=None, - visible=None, - width=None, - x=None, - xanchor=None, - xclick=None, - xref=None, - xshift=None, - y=None, - yanchor=None, - yclick=None, - yref=None, - yshift=None, + align: Any | None = None, + arrowcolor: str | None = None, + arrowhead: int | None = None, + arrowside: Any | None = None, + arrowsize: int | float | None = None, + arrowwidth: int | float | None = None, + ax: Any | None = None, + axref: Any | None = None, + ay: Any | None = None, + ayref: Any | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderpad: int | float | None = None, + borderwidth: int | float | None = None, + captureevents: bool | None = None, + clicktoshow: Any | None = None, + font: None | None = None, + height: int | float | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + showarrow: bool | None = None, + standoff: int | float | None = None, + startarrowhead: int | None = None, + startarrowsize: int | float | None = None, + startstandoff: int | float | None = None, + templateitemname: str | None = None, + text: str | None = None, + textangle: int | float | None = None, + valign: Any | None = None, + visible: bool | None = None, + width: int | float | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xclick: Any | None = None, + xref: Any | None = None, + xshift: int | float | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yclick: Any | None = None, + yref: Any | None = None, + yshift: int | float | None = None, **kwargs, ): """ @@ -1901,14 +1648,11 @@ def __init__( ------- Annotation """ - super(Annotation, self).__init__("annotations") - + super().__init__("annotations") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1923,190 +1667,51 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Annotation`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("arrowcolor", None) - _v = arrowcolor if arrowcolor is not None else _v - if _v is not None: - self["arrowcolor"] = _v - _v = arg.pop("arrowhead", None) - _v = arrowhead if arrowhead is not None else _v - if _v is not None: - self["arrowhead"] = _v - _v = arg.pop("arrowside", None) - _v = arrowside if arrowside is not None else _v - if _v is not None: - self["arrowside"] = _v - _v = arg.pop("arrowsize", None) - _v = arrowsize if arrowsize is not None else _v - if _v is not None: - self["arrowsize"] = _v - _v = arg.pop("arrowwidth", None) - _v = arrowwidth if arrowwidth is not None else _v - if _v is not None: - self["arrowwidth"] = _v - _v = arg.pop("ax", None) - _v = ax if ax is not None else _v - if _v is not None: - self["ax"] = _v - _v = arg.pop("axref", None) - _v = axref if axref is not None else _v - if _v is not None: - self["axref"] = _v - _v = arg.pop("ay", None) - _v = ay if ay is not None else _v - if _v is not None: - self["ay"] = _v - _v = arg.pop("ayref", None) - _v = ayref if ayref is not None else _v - if _v is not None: - self["ayref"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderpad", None) - _v = borderpad if borderpad is not None else _v - if _v is not None: - self["borderpad"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("captureevents", None) - _v = captureevents if captureevents is not None else _v - if _v is not None: - self["captureevents"] = _v - _v = arg.pop("clicktoshow", None) - _v = clicktoshow if clicktoshow is not None else _v - if _v is not None: - self["clicktoshow"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("height", None) - _v = height if height is not None else _v - if _v is not None: - self["height"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("showarrow", None) - _v = showarrow if showarrow is not None else _v - if _v is not None: - self["showarrow"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("startarrowhead", None) - _v = startarrowhead if startarrowhead is not None else _v - if _v is not None: - self["startarrowhead"] = _v - _v = arg.pop("startarrowsize", None) - _v = startarrowsize if startarrowsize is not None else _v - if _v is not None: - self["startarrowsize"] = _v - _v = arg.pop("startstandoff", None) - _v = startstandoff if startstandoff is not None else _v - if _v is not None: - self["startstandoff"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("valign", None) - _v = valign if valign is not None else _v - if _v is not None: - self["valign"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xclick", None) - _v = xclick if xclick is not None else _v - if _v is not None: - self["xclick"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("xshift", None) - _v = xshift if xshift is not None else _v - if _v is not None: - self["xshift"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("yclick", None) - _v = yclick if yclick is not None else _v - if _v is not None: - self["yclick"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - _v = arg.pop("yshift", None) - _v = yshift if yshift is not None else _v - if _v is not None: - self["yshift"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("arrowcolor", arg, arrowcolor) + self._init_provided("arrowhead", arg, arrowhead) + self._init_provided("arrowside", arg, arrowside) + self._init_provided("arrowsize", arg, arrowsize) + self._init_provided("arrowwidth", arg, arrowwidth) + self._init_provided("ax", arg, ax) + self._init_provided("axref", arg, axref) + self._init_provided("ay", arg, ay) + self._init_provided("ayref", arg, ayref) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderpad", arg, borderpad) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("captureevents", arg, captureevents) + self._init_provided("clicktoshow", arg, clicktoshow) + self._init_provided("font", arg, font) + self._init_provided("height", arg, height) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("showarrow", arg, showarrow) + self._init_provided("standoff", arg, standoff) + self._init_provided("startarrowhead", arg, startarrowhead) + self._init_provided("startarrowsize", arg, startarrowsize) + self._init_provided("startstandoff", arg, startstandoff) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("valign", arg, valign) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xclick", arg, xclick) + self._init_provided("xref", arg, xref) + self._init_provided("xshift", arg, xshift) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("yclick", arg, yclick) + self._init_provided("yref", arg, yref) + self._init_provided("yshift", arg, yshift) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_coloraxis.py b/plotly/graph_objs/layout/_coloraxis.py index f2f5243b03..6e88731f4d 100644 --- a/plotly/graph_objs/layout/_coloraxis.py +++ b/plotly/graph_objs/layout/_coloraxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Coloraxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.coloraxis" _valid_props = { @@ -20,8 +21,6 @@ class Coloraxis(_BaseLayoutHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -45,8 +44,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -68,8 +65,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -90,8 +85,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -113,8 +106,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -135,8 +126,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -146,273 +135,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - coloraxis.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.coloraxis.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.coloraxis.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.coloraxis.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.layout.coloraxis.ColorBar @@ -423,8 +145,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -476,8 +196,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -498,8 +216,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -519,8 +235,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -577,15 +291,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - colorbar=None, - colorscale=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -650,14 +364,11 @@ def __init__( ------- Coloraxis """ - super(Coloraxis, self).__init__("coloraxis") - + super().__init__("coloraxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -672,54 +383,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Coloraxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_colorscale.py b/plotly/graph_objs/layout/_colorscale.py index d63cafaf8b..ebe60fa424 100644 --- a/plotly/graph_objs/layout/_colorscale.py +++ b/plotly/graph_objs/layout/_colorscale.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Colorscale(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.colorscale" _valid_props = {"diverging", "sequential", "sequentialminus"} - # diverging - # --------- @property def diverging(self): """ @@ -55,8 +54,6 @@ def diverging(self): def diverging(self, val): self["diverging"] = val - # sequential - # ---------- @property def sequential(self): """ @@ -101,8 +98,6 @@ def sequential(self): def sequential(self, val): self["sequential"] = val - # sequentialminus - # --------------- @property def sequentialminus(self): """ @@ -147,8 +142,6 @@ def sequentialminus(self): def sequentialminus(self, val): self["sequentialminus"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -167,7 +160,12 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, diverging=None, sequential=None, sequentialminus=None, **kwargs + self, + arg=None, + diverging: str | None = None, + sequential: str | None = None, + sequentialminus: str | None = None, + **kwargs, ): """ Construct a new Colorscale object @@ -195,14 +193,11 @@ def __init__( ------- Colorscale """ - super(Colorscale, self).__init__("colorscale") - + super().__init__("colorscale") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -217,30 +212,11 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Colorscale`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("diverging", None) - _v = diverging if diverging is not None else _v - if _v is not None: - self["diverging"] = _v - _v = arg.pop("sequential", None) - _v = sequential if sequential is not None else _v - if _v is not None: - self["sequential"] = _v - _v = arg.pop("sequentialminus", None) - _v = sequentialminus if sequentialminus is not None else _v - if _v is not None: - self["sequentialminus"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("diverging", arg, diverging) + self._init_provided("sequential", arg, sequential) + self._init_provided("sequentialminus", arg, sequentialminus) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_font.py b/plotly/graph_objs/layout/_font.py index 2f24c33b38..d8ddf21671 100644 --- a/plotly/graph_objs/layout/_font.py +++ b/plotly/graph_objs/layout/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_geo.py b/plotly/graph_objs/layout/_geo.py index 9274b134d0..7e5ec1370f 100644 --- a/plotly/graph_objs/layout/_geo.py +++ b/plotly/graph_objs/layout/_geo.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Geo(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.geo" _valid_props = { @@ -43,8 +44,6 @@ class Geo(_BaseLayoutHierarchyType): "visible", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -55,42 +54,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -102,8 +66,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # center - # ------ @property def center(self): """ @@ -113,20 +75,6 @@ def center(self): - A dict of string/value properties that will be passed to the Center constructor - Supported dict properties: - - lat - Sets the latitude of the map's center. For all - projection types, the map's latitude center - lies at the middle of the latitude range by - default. - lon - Sets the longitude of the map's center. By - default, the map's longitude center lies at the - middle of the longitude range for scoped - projection and above `projection.rotation.lon` - otherwise. - Returns ------- plotly.graph_objs.layout.geo.Center @@ -137,8 +85,6 @@ def center(self): def center(self, val): self["center"] = val - # coastlinecolor - # -------------- @property def coastlinecolor(self): """ @@ -149,42 +95,7 @@ def coastlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -196,8 +107,6 @@ def coastlinecolor(self): def coastlinecolor(self, val): self["coastlinecolor"] = val - # coastlinewidth - # -------------- @property def coastlinewidth(self): """ @@ -216,8 +125,6 @@ def coastlinewidth(self): def coastlinewidth(self, val): self["coastlinewidth"] = val - # countrycolor - # ------------ @property def countrycolor(self): """ @@ -228,42 +135,7 @@ def countrycolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -275,8 +147,6 @@ def countrycolor(self): def countrycolor(self, val): self["countrycolor"] = val - # countrywidth - # ------------ @property def countrywidth(self): """ @@ -295,8 +165,6 @@ def countrywidth(self): def countrywidth(self, val): self["countrywidth"] = val - # domain - # ------ @property def domain(self): """ @@ -306,35 +174,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - row - If there is a layout grid, use the domain for - this row in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - x - Sets the horizontal domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - y - Sets the vertical domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - Returns ------- plotly.graph_objs.layout.geo.Domain @@ -345,8 +184,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # fitbounds - # --------- @property def fitbounds(self): """ @@ -378,8 +215,6 @@ def fitbounds(self): def fitbounds(self, val): self["fitbounds"] = val - # framecolor - # ---------- @property def framecolor(self): """ @@ -390,42 +225,7 @@ def framecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -437,8 +237,6 @@ def framecolor(self): def framecolor(self, val): self["framecolor"] = val - # framewidth - # ---------- @property def framewidth(self): """ @@ -457,8 +255,6 @@ def framewidth(self): def framewidth(self, val): self["framewidth"] = val - # lakecolor - # --------- @property def lakecolor(self): """ @@ -469,42 +265,7 @@ def lakecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -516,8 +277,6 @@ def lakecolor(self): def lakecolor(self, val): self["lakecolor"] = val - # landcolor - # --------- @property def landcolor(self): """ @@ -528,42 +287,7 @@ def landcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -575,8 +299,6 @@ def landcolor(self): def landcolor(self, val): self["landcolor"] = val - # lataxis - # ------- @property def lataxis(self): """ @@ -586,30 +308,6 @@ def lataxis(self): - A dict of string/value properties that will be passed to the Lataxis constructor - Supported dict properties: - - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. - Returns ------- plotly.graph_objs.layout.geo.Lataxis @@ -620,8 +318,6 @@ def lataxis(self): def lataxis(self, val): self["lataxis"] = val - # lonaxis - # ------- @property def lonaxis(self): """ @@ -631,30 +327,6 @@ def lonaxis(self): - A dict of string/value properties that will be passed to the Lonaxis constructor - Supported dict properties: - - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. - Returns ------- plotly.graph_objs.layout.geo.Lonaxis @@ -665,8 +337,6 @@ def lonaxis(self): def lonaxis(self, val): self["lonaxis"] = val - # oceancolor - # ---------- @property def oceancolor(self): """ @@ -677,42 +347,7 @@ def oceancolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -724,8 +359,6 @@ def oceancolor(self): def oceancolor(self, val): self["oceancolor"] = val - # projection - # ---------- @property def projection(self): """ @@ -735,31 +368,6 @@ def projection(self): - A dict of string/value properties that will be passed to the Projection constructor - Supported dict properties: - - distance - For satellite projection type only. Sets the - distance from the center of the sphere to the - point of view as a proportion of the sphere’s - radius. - parallels - For conic projection types only. Sets the - parallels (tangent, secant) where the cone - intersects the sphere. - rotation - :class:`plotly.graph_objects.layout.geo.project - ion.Rotation` instance or dict with compatible - properties - scale - Zooms in or out on the map view. A scale of 1 - corresponds to the largest zoom level that fits - the map's lon and lat ranges. - tilt - For satellite projection type only. Sets the - tilt angle of perspective projection. - type - Sets the projection type. - Returns ------- plotly.graph_objs.layout.geo.Projection @@ -770,8 +378,6 @@ def projection(self): def projection(self, val): self["projection"] = val - # resolution - # ---------- @property def resolution(self): """ @@ -793,8 +399,6 @@ def resolution(self): def resolution(self, val): self["resolution"] = val - # rivercolor - # ---------- @property def rivercolor(self): """ @@ -805,42 +409,7 @@ def rivercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -852,8 +421,6 @@ def rivercolor(self): def rivercolor(self, val): self["rivercolor"] = val - # riverwidth - # ---------- @property def riverwidth(self): """ @@ -872,8 +439,6 @@ def riverwidth(self): def riverwidth(self, val): self["riverwidth"] = val - # scope - # ----- @property def scope(self): """ @@ -894,8 +459,6 @@ def scope(self): def scope(self, val): self["scope"] = val - # showcoastlines - # -------------- @property def showcoastlines(self): """ @@ -914,8 +477,6 @@ def showcoastlines(self): def showcoastlines(self, val): self["showcoastlines"] = val - # showcountries - # ------------- @property def showcountries(self): """ @@ -934,8 +495,6 @@ def showcountries(self): def showcountries(self, val): self["showcountries"] = val - # showframe - # --------- @property def showframe(self): """ @@ -954,8 +513,6 @@ def showframe(self): def showframe(self, val): self["showframe"] = val - # showlakes - # --------- @property def showlakes(self): """ @@ -974,8 +531,6 @@ def showlakes(self): def showlakes(self, val): self["showlakes"] = val - # showland - # -------- @property def showland(self): """ @@ -994,8 +549,6 @@ def showland(self): def showland(self, val): self["showland"] = val - # showocean - # --------- @property def showocean(self): """ @@ -1014,8 +567,6 @@ def showocean(self): def showocean(self, val): self["showocean"] = val - # showrivers - # ---------- @property def showrivers(self): """ @@ -1034,8 +585,6 @@ def showrivers(self): def showrivers(self, val): self["showrivers"] = val - # showsubunits - # ------------ @property def showsubunits(self): """ @@ -1055,8 +604,6 @@ def showsubunits(self): def showsubunits(self, val): self["showsubunits"] = val - # subunitcolor - # ------------ @property def subunitcolor(self): """ @@ -1067,42 +614,7 @@ def subunitcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1114,8 +626,6 @@ def subunitcolor(self): def subunitcolor(self, val): self["subunitcolor"] = val - # subunitwidth - # ------------ @property def subunitwidth(self): """ @@ -1134,8 +644,6 @@ def subunitwidth(self): def subunitwidth(self, val): self["subunitwidth"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1154,8 +662,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1174,8 +680,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1273,38 +777,38 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - center=None, - coastlinecolor=None, - coastlinewidth=None, - countrycolor=None, - countrywidth=None, - domain=None, - fitbounds=None, - framecolor=None, - framewidth=None, - lakecolor=None, - landcolor=None, - lataxis=None, - lonaxis=None, - oceancolor=None, - projection=None, - resolution=None, - rivercolor=None, - riverwidth=None, - scope=None, - showcoastlines=None, - showcountries=None, - showframe=None, - showlakes=None, - showland=None, - showocean=None, - showrivers=None, - showsubunits=None, - subunitcolor=None, - subunitwidth=None, - uirevision=None, - visible=None, + bgcolor: str | None = None, + center: None | None = None, + coastlinecolor: str | None = None, + coastlinewidth: int | float | None = None, + countrycolor: str | None = None, + countrywidth: int | float | None = None, + domain: None | None = None, + fitbounds: Any | None = None, + framecolor: str | None = None, + framewidth: int | float | None = None, + lakecolor: str | None = None, + landcolor: str | None = None, + lataxis: None | None = None, + lonaxis: None | None = None, + oceancolor: str | None = None, + projection: None | None = None, + resolution: Any | None = None, + rivercolor: str | None = None, + riverwidth: int | float | None = None, + scope: Any | None = None, + showcoastlines: bool | None = None, + showcountries: bool | None = None, + showframe: bool | None = None, + showlakes: bool | None = None, + showland: bool | None = None, + showocean: bool | None = None, + showrivers: bool | None = None, + showsubunits: bool | None = None, + subunitcolor: str | None = None, + subunitwidth: int | float | None = None, + uirevision: Any | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -1409,14 +913,11 @@ def __init__( ------- Geo """ - super(Geo, self).__init__("geo") - + super().__init__("geo") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1431,146 +932,40 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Geo`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("center", None) - _v = center if center is not None else _v - if _v is not None: - self["center"] = _v - _v = arg.pop("coastlinecolor", None) - _v = coastlinecolor if coastlinecolor is not None else _v - if _v is not None: - self["coastlinecolor"] = _v - _v = arg.pop("coastlinewidth", None) - _v = coastlinewidth if coastlinewidth is not None else _v - if _v is not None: - self["coastlinewidth"] = _v - _v = arg.pop("countrycolor", None) - _v = countrycolor if countrycolor is not None else _v - if _v is not None: - self["countrycolor"] = _v - _v = arg.pop("countrywidth", None) - _v = countrywidth if countrywidth is not None else _v - if _v is not None: - self["countrywidth"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("fitbounds", None) - _v = fitbounds if fitbounds is not None else _v - if _v is not None: - self["fitbounds"] = _v - _v = arg.pop("framecolor", None) - _v = framecolor if framecolor is not None else _v - if _v is not None: - self["framecolor"] = _v - _v = arg.pop("framewidth", None) - _v = framewidth if framewidth is not None else _v - if _v is not None: - self["framewidth"] = _v - _v = arg.pop("lakecolor", None) - _v = lakecolor if lakecolor is not None else _v - if _v is not None: - self["lakecolor"] = _v - _v = arg.pop("landcolor", None) - _v = landcolor if landcolor is not None else _v - if _v is not None: - self["landcolor"] = _v - _v = arg.pop("lataxis", None) - _v = lataxis if lataxis is not None else _v - if _v is not None: - self["lataxis"] = _v - _v = arg.pop("lonaxis", None) - _v = lonaxis if lonaxis is not None else _v - if _v is not None: - self["lonaxis"] = _v - _v = arg.pop("oceancolor", None) - _v = oceancolor if oceancolor is not None else _v - if _v is not None: - self["oceancolor"] = _v - _v = arg.pop("projection", None) - _v = projection if projection is not None else _v - if _v is not None: - self["projection"] = _v - _v = arg.pop("resolution", None) - _v = resolution if resolution is not None else _v - if _v is not None: - self["resolution"] = _v - _v = arg.pop("rivercolor", None) - _v = rivercolor if rivercolor is not None else _v - if _v is not None: - self["rivercolor"] = _v - _v = arg.pop("riverwidth", None) - _v = riverwidth if riverwidth is not None else _v - if _v is not None: - self["riverwidth"] = _v - _v = arg.pop("scope", None) - _v = scope if scope is not None else _v - if _v is not None: - self["scope"] = _v - _v = arg.pop("showcoastlines", None) - _v = showcoastlines if showcoastlines is not None else _v - if _v is not None: - self["showcoastlines"] = _v - _v = arg.pop("showcountries", None) - _v = showcountries if showcountries is not None else _v - if _v is not None: - self["showcountries"] = _v - _v = arg.pop("showframe", None) - _v = showframe if showframe is not None else _v - if _v is not None: - self["showframe"] = _v - _v = arg.pop("showlakes", None) - _v = showlakes if showlakes is not None else _v - if _v is not None: - self["showlakes"] = _v - _v = arg.pop("showland", None) - _v = showland if showland is not None else _v - if _v is not None: - self["showland"] = _v - _v = arg.pop("showocean", None) - _v = showocean if showocean is not None else _v - if _v is not None: - self["showocean"] = _v - _v = arg.pop("showrivers", None) - _v = showrivers if showrivers is not None else _v - if _v is not None: - self["showrivers"] = _v - _v = arg.pop("showsubunits", None) - _v = showsubunits if showsubunits is not None else _v - if _v is not None: - self["showsubunits"] = _v - _v = arg.pop("subunitcolor", None) - _v = subunitcolor if subunitcolor is not None else _v - if _v is not None: - self["subunitcolor"] = _v - _v = arg.pop("subunitwidth", None) - _v = subunitwidth if subunitwidth is not None else _v - if _v is not None: - self["subunitwidth"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("center", arg, center) + self._init_provided("coastlinecolor", arg, coastlinecolor) + self._init_provided("coastlinewidth", arg, coastlinewidth) + self._init_provided("countrycolor", arg, countrycolor) + self._init_provided("countrywidth", arg, countrywidth) + self._init_provided("domain", arg, domain) + self._init_provided("fitbounds", arg, fitbounds) + self._init_provided("framecolor", arg, framecolor) + self._init_provided("framewidth", arg, framewidth) + self._init_provided("lakecolor", arg, lakecolor) + self._init_provided("landcolor", arg, landcolor) + self._init_provided("lataxis", arg, lataxis) + self._init_provided("lonaxis", arg, lonaxis) + self._init_provided("oceancolor", arg, oceancolor) + self._init_provided("projection", arg, projection) + self._init_provided("resolution", arg, resolution) + self._init_provided("rivercolor", arg, rivercolor) + self._init_provided("riverwidth", arg, riverwidth) + self._init_provided("scope", arg, scope) + self._init_provided("showcoastlines", arg, showcoastlines) + self._init_provided("showcountries", arg, showcountries) + self._init_provided("showframe", arg, showframe) + self._init_provided("showlakes", arg, showlakes) + self._init_provided("showland", arg, showland) + self._init_provided("showocean", arg, showocean) + self._init_provided("showrivers", arg, showrivers) + self._init_provided("showsubunits", arg, showsubunits) + self._init_provided("subunitcolor", arg, subunitcolor) + self._init_provided("subunitwidth", arg, subunitwidth) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_grid.py b/plotly/graph_objs/layout/_grid.py index cd8ee19f6f..428a0880d1 100644 --- a/plotly/graph_objs/layout/_grid.py +++ b/plotly/graph_objs/layout/_grid.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Grid(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.grid" _valid_props = { @@ -23,8 +24,6 @@ class Grid(_BaseLayoutHierarchyType): "yside", } - # columns - # ------- @property def columns(self): """ @@ -49,8 +48,6 @@ def columns(self): def columns(self, val): self["columns"] = val - # domain - # ------ @property def domain(self): """ @@ -60,19 +57,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - x - Sets the horizontal domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. - y - Sets the vertical domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. - Returns ------- plotly.graph_objs.layout.grid.Domain @@ -83,8 +67,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # pattern - # ------- @property def pattern(self): """ @@ -109,8 +91,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # roworder - # -------- @property def roworder(self): """ @@ -131,8 +111,6 @@ def roworder(self): def roworder(self, val): self["roworder"] = val - # rows - # ---- @property def rows(self): """ @@ -155,8 +133,6 @@ def rows(self): def rows(self, val): self["rows"] = val - # subplots - # -------- @property def subplots(self): """ @@ -186,8 +162,6 @@ def subplots(self): def subplots(self, val): self["subplots"] = val - # xaxes - # ----- @property def xaxes(self): """ @@ -216,8 +190,6 @@ def xaxes(self): def xaxes(self, val): self["xaxes"] = val - # xgap - # ---- @property def xgap(self): """ @@ -238,8 +210,6 @@ def xgap(self): def xgap(self, val): self["xgap"] = val - # xside - # ----- @property def xside(self): """ @@ -261,8 +231,6 @@ def xside(self): def xside(self, val): self["xside"] = val - # yaxes - # ----- @property def yaxes(self): """ @@ -291,8 +259,6 @@ def yaxes(self): def yaxes(self, val): self["yaxes"] = val - # ygap - # ---- @property def ygap(self): """ @@ -313,8 +279,6 @@ def ygap(self): def ygap(self, val): self["ygap"] = val - # yside - # ----- @property def yside(self): """ @@ -337,8 +301,6 @@ def yside(self): def yside(self, val): self["yside"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +379,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - columns=None, - domain=None, - pattern=None, - roworder=None, - rows=None, - subplots=None, - xaxes=None, - xgap=None, - xside=None, - yaxes=None, - ygap=None, - yside=None, + columns: int | None = None, + domain: None | None = None, + pattern: Any | None = None, + roworder: Any | None = None, + rows: int | None = None, + subplots: list | None = None, + xaxes: list | None = None, + xgap: int | float | None = None, + xside: Any | None = None, + yaxes: list | None = None, + ygap: int | float | None = None, + yside: Any | None = None, **kwargs, ): """ @@ -514,14 +476,11 @@ def __init__( ------- Grid """ - super(Grid, self).__init__("grid") - + super().__init__("grid") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -536,66 +495,20 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Grid`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("columns", None) - _v = columns if columns is not None else _v - if _v is not None: - self["columns"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("roworder", None) - _v = roworder if roworder is not None else _v - if _v is not None: - self["roworder"] = _v - _v = arg.pop("rows", None) - _v = rows if rows is not None else _v - if _v is not None: - self["rows"] = _v - _v = arg.pop("subplots", None) - _v = subplots if subplots is not None else _v - if _v is not None: - self["subplots"] = _v - _v = arg.pop("xaxes", None) - _v = xaxes if xaxes is not None else _v - if _v is not None: - self["xaxes"] = _v - _v = arg.pop("xgap", None) - _v = xgap if xgap is not None else _v - if _v is not None: - self["xgap"] = _v - _v = arg.pop("xside", None) - _v = xside if xside is not None else _v - if _v is not None: - self["xside"] = _v - _v = arg.pop("yaxes", None) - _v = yaxes if yaxes is not None else _v - if _v is not None: - self["yaxes"] = _v - _v = arg.pop("ygap", None) - _v = ygap if ygap is not None else _v - if _v is not None: - self["ygap"] = _v - _v = arg.pop("yside", None) - _v = yside if yside is not None else _v - if _v is not None: - self["yside"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("columns", arg, columns) + self._init_provided("domain", arg, domain) + self._init_provided("pattern", arg, pattern) + self._init_provided("roworder", arg, roworder) + self._init_provided("rows", arg, rows) + self._init_provided("subplots", arg, subplots) + self._init_provided("xaxes", arg, xaxes) + self._init_provided("xgap", arg, xgap) + self._init_provided("xside", arg, xside) + self._init_provided("yaxes", arg, yaxes) + self._init_provided("ygap", arg, ygap) + self._init_provided("yside", arg, yside) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_hoverlabel.py b/plotly/graph_objs/layout/_hoverlabel.py index 71b5ecdbdd..7e063be70e 100644 --- a/plotly/graph_objs/layout/_hoverlabel.py +++ b/plotly/graph_objs/layout/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Hoverlabel(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.hoverlabel" _valid_props = { @@ -17,8 +18,6 @@ class Hoverlabel(_BaseLayoutHierarchyType): "namelength", } - # align - # ----- @property def align(self): """ @@ -40,8 +39,6 @@ def align(self): def align(self, val): self["align"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -52,42 +49,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -99,8 +61,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -111,42 +71,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -158,8 +83,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # font - # ---- @property def font(self): """ @@ -172,52 +95,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.hoverlabel.Font @@ -228,8 +105,6 @@ def font(self): def font(self, val): self["font"] = val - # grouptitlefont - # -------------- @property def grouptitlefont(self): """ @@ -242,52 +117,6 @@ def grouptitlefont(self): - A dict of string/value properties that will be passed to the Grouptitlefont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.hoverlabel.Grouptitlefont @@ -298,8 +127,6 @@ def grouptitlefont(self): def grouptitlefont(self, val): self["grouptitlefont"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -324,8 +151,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -356,12 +181,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - bgcolor=None, - bordercolor=None, - font=None, - grouptitlefont=None, - namelength=None, + align: Any | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + font: None | None = None, + grouptitlefont: None | None = None, + namelength: int | None = None, **kwargs, ): """ @@ -400,14 +225,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -422,42 +244,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("grouptitlefont", None) - _v = grouptitlefont if grouptitlefont is not None else _v - if _v is not None: - self["grouptitlefont"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("font", arg, font) + self._init_provided("grouptitlefont", arg, grouptitlefont) + self._init_provided("namelength", arg, namelength) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_image.py b/plotly/graph_objs/layout/_image.py index af2a8257bd..ef317718a4 100644 --- a/plotly/graph_objs/layout/_image.py +++ b/plotly/graph_objs/layout/_image.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Image(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.image" _valid_props = { @@ -26,8 +27,6 @@ class Image(_BaseLayoutHierarchyType): "yref", } - # layer - # ----- @property def layer(self): """ @@ -49,8 +48,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # name - # ---- @property def name(self): """ @@ -76,8 +73,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -96,8 +91,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # sizex - # ----- @property def sizex(self): """ @@ -120,8 +113,6 @@ def sizex(self): def sizex(self, val): self["sizex"] = val - # sizey - # ----- @property def sizey(self): """ @@ -144,8 +135,6 @@ def sizey(self): def sizey(self, val): self["sizey"] = val - # sizing - # ------ @property def sizing(self): """ @@ -165,8 +154,6 @@ def sizing(self): def sizing(self, val): self["sizing"] = val - # source - # ------ @property def source(self): """ @@ -193,8 +180,6 @@ def source(self): def source(self, val): self["source"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -221,8 +206,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # visible - # ------- @property def visible(self): """ @@ -241,8 +224,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -262,8 +243,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -283,8 +262,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xref - # ---- @property def xref(self): """ @@ -316,8 +293,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -337,8 +312,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -358,8 +331,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # yref - # ---- @property def yref(self): """ @@ -391,8 +362,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -486,21 +455,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - layer=None, - name=None, - opacity=None, - sizex=None, - sizey=None, - sizing=None, - source=None, - templateitemname=None, - visible=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, + layer: Any | None = None, + name: str | None = None, + opacity: int | float | None = None, + sizex: int | float | None = None, + sizey: int | float | None = None, + sizing: Any | None = None, + source: str | None = None, + templateitemname: str | None = None, + visible: bool | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -601,14 +570,11 @@ def __init__( ------- Image """ - super(Image, self).__init__("images") - + super().__init__("images") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -623,78 +589,23 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Image`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("sizex", None) - _v = sizex if sizex is not None else _v - if _v is not None: - self["sizex"] = _v - _v = arg.pop("sizey", None) - _v = sizey if sizey is not None else _v - if _v is not None: - self["sizey"] = _v - _v = arg.pop("sizing", None) - _v = sizing if sizing is not None else _v - if _v is not None: - self["sizing"] = _v - _v = arg.pop("source", None) - _v = source if source is not None else _v - if _v is not None: - self["source"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("layer", arg, layer) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("sizex", arg, sizex) + self._init_provided("sizey", arg, sizey) + self._init_provided("sizing", arg, sizing) + self._init_provided("source", arg, source) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_legend.py b/plotly/graph_objs/layout/_legend.py index a585508509..355e96b103 100644 --- a/plotly/graph_objs/layout/_legend.py +++ b/plotly/graph_objs/layout/_legend.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Legend(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.legend" _valid_props = { @@ -37,8 +38,6 @@ class Legend(_BaseLayoutHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -50,42 +49,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -97,8 +61,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -109,42 +71,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -156,8 +83,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -176,8 +101,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # entrywidth - # ---------- @property def entrywidth(self): """ @@ -198,8 +121,6 @@ def entrywidth(self): def entrywidth(self, val): self["entrywidth"] = val - # entrywidthmode - # -------------- @property def entrywidthmode(self): """ @@ -219,8 +140,6 @@ def entrywidthmode(self): def entrywidthmode(self, val): self["entrywidthmode"] = val - # font - # ---- @property def font(self): """ @@ -232,52 +151,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.legend.Font @@ -288,8 +161,6 @@ def font(self): def font(self, val): self["font"] = val - # groupclick - # ---------- @property def groupclick(self): """ @@ -313,8 +184,6 @@ def groupclick(self): def groupclick(self, val): self["groupclick"] = val - # grouptitlefont - # -------------- @property def grouptitlefont(self): """ @@ -327,52 +196,6 @@ def grouptitlefont(self): - A dict of string/value properties that will be passed to the Grouptitlefont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.legend.Grouptitlefont @@ -383,8 +206,6 @@ def grouptitlefont(self): def grouptitlefont(self, val): self["grouptitlefont"] = val - # indentation - # ----------- @property def indentation(self): """ @@ -403,8 +224,6 @@ def indentation(self): def indentation(self, val): self["indentation"] = val - # itemclick - # --------- @property def itemclick(self): """ @@ -427,8 +246,6 @@ def itemclick(self): def itemclick(self, val): self["itemclick"] = val - # itemdoubleclick - # --------------- @property def itemdoubleclick(self): """ @@ -452,8 +269,6 @@ def itemdoubleclick(self): def itemdoubleclick(self, val): self["itemdoubleclick"] = val - # itemsizing - # ---------- @property def itemsizing(self): """ @@ -475,8 +290,6 @@ def itemsizing(self): def itemsizing(self, val): self["itemsizing"] = val - # itemwidth - # --------- @property def itemwidth(self): """ @@ -496,8 +309,6 @@ def itemwidth(self): def itemwidth(self, val): self["itemwidth"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -517,8 +328,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # title - # ----- @property def title(self): """ @@ -528,23 +337,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this legend's title font. Defaults to - `legend.font` with its size increased about - 20%. - side - Determines the location of legend's title with - respect to the legend items. Defaulted to "top" - with `orientation` is "h". Defaulted to "left" - with `orientation` is "v". The *top left* - options could be used to expand top center and - top right are for horizontal alignment legend - area in both x and y sides. - text - Sets the title of the legend. - Returns ------- plotly.graph_objs.layout.legend.Title @@ -555,8 +347,6 @@ def title(self): def title(self, val): self["title"] = val - # tracegroupgap - # ------------- @property def tracegroupgap(self): """ @@ -576,8 +366,6 @@ def tracegroupgap(self): def tracegroupgap(self, val): self["tracegroupgap"] = val - # traceorder - # ---------- @property def traceorder(self): """ @@ -605,8 +393,6 @@ def traceorder(self): def traceorder(self, val): self["traceorder"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -625,8 +411,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # valign - # ------ @property def valign(self): """ @@ -647,8 +431,6 @@ def valign(self): def valign(self, val): self["valign"] = val - # visible - # ------- @property def visible(self): """ @@ -667,8 +449,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -693,8 +473,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -719,8 +497,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xref - # ---- @property def xref(self): """ @@ -742,8 +518,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -769,8 +543,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -795,8 +567,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # yref - # ---- @property def yref(self): """ @@ -818,8 +588,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -943,32 +711,32 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - entrywidth=None, - entrywidthmode=None, - font=None, - groupclick=None, - grouptitlefont=None, - indentation=None, - itemclick=None, - itemdoubleclick=None, - itemsizing=None, - itemwidth=None, - orientation=None, - title=None, - tracegroupgap=None, - traceorder=None, - uirevision=None, - valign=None, - visible=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + entrywidth: int | float | None = None, + entrywidthmode: Any | None = None, + font: None | None = None, + groupclick: Any | None = None, + grouptitlefont: None | None = None, + indentation: int | float | None = None, + itemclick: Any | None = None, + itemdoubleclick: Any | None = None, + itemsizing: Any | None = None, + itemwidth: int | float | None = None, + orientation: Any | None = None, + title: None | None = None, + tracegroupgap: int | float | None = None, + traceorder: Any | None = None, + uirevision: Any | None = None, + valign: Any | None = None, + visible: bool | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1099,14 +867,11 @@ def __init__( ------- Legend """ - super(Legend, self).__init__("legend") - + super().__init__("legend") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1121,122 +886,34 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Legend`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("entrywidth", None) - _v = entrywidth if entrywidth is not None else _v - if _v is not None: - self["entrywidth"] = _v - _v = arg.pop("entrywidthmode", None) - _v = entrywidthmode if entrywidthmode is not None else _v - if _v is not None: - self["entrywidthmode"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("groupclick", None) - _v = groupclick if groupclick is not None else _v - if _v is not None: - self["groupclick"] = _v - _v = arg.pop("grouptitlefont", None) - _v = grouptitlefont if grouptitlefont is not None else _v - if _v is not None: - self["grouptitlefont"] = _v - _v = arg.pop("indentation", None) - _v = indentation if indentation is not None else _v - if _v is not None: - self["indentation"] = _v - _v = arg.pop("itemclick", None) - _v = itemclick if itemclick is not None else _v - if _v is not None: - self["itemclick"] = _v - _v = arg.pop("itemdoubleclick", None) - _v = itemdoubleclick if itemdoubleclick is not None else _v - if _v is not None: - self["itemdoubleclick"] = _v - _v = arg.pop("itemsizing", None) - _v = itemsizing if itemsizing is not None else _v - if _v is not None: - self["itemsizing"] = _v - _v = arg.pop("itemwidth", None) - _v = itemwidth if itemwidth is not None else _v - if _v is not None: - self["itemwidth"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("tracegroupgap", None) - _v = tracegroupgap if tracegroupgap is not None else _v - if _v is not None: - self["tracegroupgap"] = _v - _v = arg.pop("traceorder", None) - _v = traceorder if traceorder is not None else _v - if _v is not None: - self["traceorder"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("valign", None) - _v = valign if valign is not None else _v - if _v is not None: - self["valign"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("entrywidth", arg, entrywidth) + self._init_provided("entrywidthmode", arg, entrywidthmode) + self._init_provided("font", arg, font) + self._init_provided("groupclick", arg, groupclick) + self._init_provided("grouptitlefont", arg, grouptitlefont) + self._init_provided("indentation", arg, indentation) + self._init_provided("itemclick", arg, itemclick) + self._init_provided("itemdoubleclick", arg, itemdoubleclick) + self._init_provided("itemsizing", arg, itemsizing) + self._init_provided("itemwidth", arg, itemwidth) + self._init_provided("orientation", arg, orientation) + self._init_provided("title", arg, title) + self._init_provided("tracegroupgap", arg, tracegroupgap) + self._init_provided("traceorder", arg, traceorder) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("valign", arg, valign) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_map.py b/plotly/graph_objs/layout/_map.py index c6baeb8120..19598f753f 100644 --- a/plotly/graph_objs/layout/_map.py +++ b/plotly/graph_objs/layout/_map.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Map(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.map" _valid_props = { @@ -21,8 +22,6 @@ class Map(_BaseLayoutHierarchyType): "zoom", } - # bearing - # ------- @property def bearing(self): """ @@ -42,8 +41,6 @@ def bearing(self): def bearing(self, val): self["bearing"] = val - # bounds - # ------ @property def bounds(self): """ @@ -53,25 +50,6 @@ def bounds(self): - A dict of string/value properties that will be passed to the Bounds constructor - Supported dict properties: - - east - Sets the maximum longitude of the map (in - degrees East) if `west`, `south` and `north` - are declared. - north - Sets the maximum latitude of the map (in - degrees North) if `east`, `west` and `south` - are declared. - south - Sets the minimum latitude of the map (in - degrees North) if `east`, `west` and `north` - are declared. - west - Sets the minimum longitude of the map (in - degrees East) if `east`, `south` and `north` - are declared. - Returns ------- plotly.graph_objs.layout.map.Bounds @@ -82,8 +60,6 @@ def bounds(self): def bounds(self, val): self["bounds"] = val - # center - # ------ @property def center(self): """ @@ -93,15 +69,6 @@ def center(self): - A dict of string/value properties that will be passed to the Center constructor - Supported dict properties: - - lat - Sets the latitude of the center of the map (in - degrees North). - lon - Sets the longitude of the center of the map (in - degrees East). - Returns ------- plotly.graph_objs.layout.map.Center @@ -112,8 +79,6 @@ def center(self): def center(self, val): self["center"] = val - # domain - # ------ @property def domain(self): """ @@ -123,21 +88,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this map subplot . - row - If there is a layout grid, use the domain for - this row in the grid for this map subplot . - x - Sets the horizontal domain of this map subplot - (in plot fraction). - y - Sets the vertical domain of this map subplot - (in plot fraction). - Returns ------- plotly.graph_objs.layout.map.Domain @@ -148,8 +98,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # layers - # ------ @property def layers(self): """ @@ -159,120 +107,6 @@ def layers(self): - A list or tuple of dicts of string/value properties that will be passed to the Layer constructor - Supported dict properties: - - below - Determines if the layer will be inserted before - the layer with the specified ID. If omitted or - set to '', the layer will be inserted above - every existing layer. - circle - :class:`plotly.graph_objects.layout.map.layer.C - ircle` instance or dict with compatible - properties - color - Sets the primary layer color. If `type` is - "circle", color corresponds to the circle color - (map.layer.paint.circle-color) If `type` is - "line", color corresponds to the line color - (map.layer.paint.line-color) If `type` is - "fill", color corresponds to the fill color - (map.layer.paint.fill-color) If `type` is - "symbol", color corresponds to the icon color - (map.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom - right, bottom left. Only has an effect for - "image" `sourcetype`. - fill - :class:`plotly.graph_objects.layout.map.layer.F - ill` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.layout.map.layer.L - ine` instance or dict with compatible - properties - maxzoom - Sets the maximum zoom level - (map.layer.maxzoom). At zoom levels equal to or - greater than the maxzoom, the layer will be - hidden. - minzoom - Sets the minimum zoom level - (map.layer.minzoom). At zoom levels less than - the minzoom, the layer will be hidden. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the layer. If `type` is - "circle", opacity corresponds to the circle - opacity (map.layer.paint.circle-opacity) If - `type` is "line", opacity corresponds to the - line opacity (map.layer.paint.line-opacity) If - `type` is "fill", opacity corresponds to the - fill opacity (map.layer.paint.fill-opacity) If - `type` is "symbol", opacity corresponds to the - icon/text opacity (map.layer.paint.text- - opacity) - source - Sets the source data for this layer - (map.layer.source). When `sourcetype` is set to - "geojson", `source` can be a URL to a GeoJSON - or a GeoJSON object. When `sourcetype` is set - to "vector" or "raster", `source` can be a URL - or an array of tile URLs. When `sourcetype` is - set to "image", `source` can be a URL to an - image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile - source (map.layer.source-layer). Required for - "vector" source type that supports multiple - layers. - sourcetype - Sets the source type for this layer, that is - the type of the layer data. - symbol - :class:`plotly.graph_objects.layout.map.layer.S - ymbol` instance or dict with compatible - properties - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer - data set in `source` will be rendered With - `sourcetype` set to "geojson", the following - values are allowed: "circle", "line", "fill" - and "symbol". but note that "line" and "fill" - are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", - the following values are allowed: "circle", - "line", "fill" and "symbol". With `sourcetype` - set to "raster" or `*image*`, only the "raster" - value is allowed. - visible - Determines whether this layer is displayed - Returns ------- tuple[plotly.graph_objs.layout.map.Layer] @@ -283,8 +117,6 @@ def layers(self): def layers(self, val): self["layers"] = val - # layerdefaults - # ------------- @property def layerdefaults(self): """ @@ -298,8 +130,6 @@ def layerdefaults(self): - A dict of string/value properties that will be passed to the Layer constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.map.Layer @@ -310,8 +140,6 @@ def layerdefaults(self): def layerdefaults(self, val): self["layerdefaults"] = val - # pitch - # ----- @property def pitch(self): """ @@ -331,8 +159,6 @@ def pitch(self): def pitch(self, val): self["pitch"] = val - # style - # ----- @property def style(self): """ @@ -365,8 +191,6 @@ def style(self): def style(self, val): self["style"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -386,8 +210,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # zoom - # ---- @property def zoom(self): """ @@ -406,8 +228,6 @@ def zoom(self): def zoom(self, val): self["zoom"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,16 +285,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bearing=None, - bounds=None, - center=None, - domain=None, - layers=None, - layerdefaults=None, - pitch=None, - style=None, - uirevision=None, - zoom=None, + bearing: int | float | None = None, + bounds: None | None = None, + center: None | None = None, + domain: None | None = None, + layers: None | None = None, + layerdefaults: None | None = None, + pitch: int | float | None = None, + style: Any | None = None, + uirevision: Any | None = None, + zoom: int | float | None = None, **kwargs, ): """ @@ -539,14 +359,11 @@ def __init__( ------- Map """ - super(Map, self).__init__("map") - + super().__init__("map") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -561,58 +378,18 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Map`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bearing", None) - _v = bearing if bearing is not None else _v - if _v is not None: - self["bearing"] = _v - _v = arg.pop("bounds", None) - _v = bounds if bounds is not None else _v - if _v is not None: - self["bounds"] = _v - _v = arg.pop("center", None) - _v = center if center is not None else _v - if _v is not None: - self["center"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("layers", None) - _v = layers if layers is not None else _v - if _v is not None: - self["layers"] = _v - _v = arg.pop("layerdefaults", None) - _v = layerdefaults if layerdefaults is not None else _v - if _v is not None: - self["layerdefaults"] = _v - _v = arg.pop("pitch", None) - _v = pitch if pitch is not None else _v - if _v is not None: - self["pitch"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("zoom", None) - _v = zoom if zoom is not None else _v - if _v is not None: - self["zoom"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bearing", arg, bearing) + self._init_provided("bounds", arg, bounds) + self._init_provided("center", arg, center) + self._init_provided("domain", arg, domain) + self._init_provided("layers", arg, layers) + self._init_provided("layerdefaults", arg, layerdefaults) + self._init_provided("pitch", arg, pitch) + self._init_provided("style", arg, style) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("zoom", arg, zoom) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_mapbox.py b/plotly/graph_objs/layout/_mapbox.py index 514895bd06..d604dbda4d 100644 --- a/plotly/graph_objs/layout/_mapbox.py +++ b/plotly/graph_objs/layout/_mapbox.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Mapbox(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.mapbox" _valid_props = { @@ -22,8 +23,6 @@ class Mapbox(_BaseLayoutHierarchyType): "zoom", } - # accesstoken - # ----------- @property def accesstoken(self): """ @@ -47,8 +46,6 @@ def accesstoken(self): def accesstoken(self, val): self["accesstoken"] = val - # bearing - # ------- @property def bearing(self): """ @@ -68,8 +65,6 @@ def bearing(self): def bearing(self, val): self["bearing"] = val - # bounds - # ------ @property def bounds(self): """ @@ -79,25 +74,6 @@ def bounds(self): - A dict of string/value properties that will be passed to the Bounds constructor - Supported dict properties: - - east - Sets the maximum longitude of the map (in - degrees East) if `west`, `south` and `north` - are declared. - north - Sets the maximum latitude of the map (in - degrees North) if `east`, `west` and `south` - are declared. - south - Sets the minimum latitude of the map (in - degrees North) if `east`, `west` and `north` - are declared. - west - Sets the minimum longitude of the map (in - degrees East) if `east`, `south` and `north` - are declared. - Returns ------- plotly.graph_objs.layout.mapbox.Bounds @@ -108,8 +84,6 @@ def bounds(self): def bounds(self, val): self["bounds"] = val - # center - # ------ @property def center(self): """ @@ -119,15 +93,6 @@ def center(self): - A dict of string/value properties that will be passed to the Center constructor - Supported dict properties: - - lat - Sets the latitude of the center of the map (in - degrees North). - lon - Sets the longitude of the center of the map (in - degrees East). - Returns ------- plotly.graph_objs.layout.mapbox.Center @@ -138,8 +103,6 @@ def center(self): def center(self, val): self["center"] = val - # domain - # ------ @property def domain(self): """ @@ -149,22 +112,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this mapbox subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this mapbox subplot . - x - Sets the horizontal domain of this mapbox - subplot (in plot fraction). - y - Sets the vertical domain of this mapbox subplot - (in plot fraction). - Returns ------- plotly.graph_objs.layout.mapbox.Domain @@ -175,8 +122,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # layers - # ------ @property def layers(self): """ @@ -186,120 +131,6 @@ def layers(self): - A list or tuple of dicts of string/value properties that will be passed to the Layer constructor - Supported dict properties: - - below - Determines if the layer will be inserted before - the layer with the specified ID. If omitted or - set to '', the layer will be inserted above - every existing layer. - circle - :class:`plotly.graph_objects.layout.mapbox.laye - r.Circle` instance or dict with compatible - properties - color - Sets the primary layer color. If `type` is - "circle", color corresponds to the circle color - (mapbox.layer.paint.circle-color) If `type` is - "line", color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is - "fill", color corresponds to the fill color - (mapbox.layer.paint.fill-color) If `type` is - "symbol", color corresponds to the icon color - (mapbox.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom - right, bottom left. Only has an effect for - "image" `sourcetype`. - fill - :class:`plotly.graph_objects.layout.mapbox.laye - r.Fill` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.layout.mapbox.laye - r.Line` instance or dict with compatible - properties - maxzoom - Sets the maximum zoom level - (mapbox.layer.maxzoom). At zoom levels equal to - or greater than the maxzoom, the layer will be - hidden. - minzoom - Sets the minimum zoom level - (mapbox.layer.minzoom). At zoom levels less - than the minzoom, the layer will be hidden. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the layer. If `type` is - "circle", opacity corresponds to the circle - opacity (mapbox.layer.paint.circle-opacity) If - `type` is "line", opacity corresponds to the - line opacity (mapbox.layer.paint.line-opacity) - If `type` is "fill", opacity corresponds to the - fill opacity (mapbox.layer.paint.fill-opacity) - If `type` is "symbol", opacity corresponds to - the icon/text opacity (mapbox.layer.paint.text- - opacity) - source - Sets the source data for this layer - (mapbox.layer.source). When `sourcetype` is set - to "geojson", `source` can be a URL to a - GeoJSON or a GeoJSON object. When `sourcetype` - is set to "vector" or "raster", `source` can be - a URL or an array of tile URLs. When - `sourcetype` is set to "image", `source` can be - a URL to an image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile - source (mapbox.layer.source-layer). Required - for "vector" source type that supports multiple - layers. - sourcetype - Sets the source type for this layer, that is - the type of the layer data. - symbol - :class:`plotly.graph_objects.layout.mapbox.laye - r.Symbol` instance or dict with compatible - properties - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer - data set in `source` will be rendered With - `sourcetype` set to "geojson", the following - values are allowed: "circle", "line", "fill" - and "symbol". but note that "line" and "fill" - are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", - the following values are allowed: "circle", - "line", "fill" and "symbol". With `sourcetype` - set to "raster" or `*image*`, only the "raster" - value is allowed. - visible - Determines whether this layer is displayed - Returns ------- tuple[plotly.graph_objs.layout.mapbox.Layer] @@ -310,8 +141,6 @@ def layers(self): def layers(self, val): self["layers"] = val - # layerdefaults - # ------------- @property def layerdefaults(self): """ @@ -325,8 +154,6 @@ def layerdefaults(self): - A dict of string/value properties that will be passed to the Layer constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.mapbox.Layer @@ -337,8 +164,6 @@ def layerdefaults(self): def layerdefaults(self, val): self["layerdefaults"] = val - # pitch - # ----- @property def pitch(self): """ @@ -358,8 +183,6 @@ def pitch(self): def pitch(self, val): self["pitch"] = val - # style - # ----- @property def style(self): """ @@ -396,8 +219,6 @@ def style(self): def style(self, val): self["style"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -417,8 +238,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # zoom - # ---- @property def zoom(self): """ @@ -437,8 +256,6 @@ def zoom(self): def zoom(self, val): self["zoom"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -511,17 +328,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - accesstoken=None, - bearing=None, - bounds=None, - center=None, - domain=None, - layers=None, - layerdefaults=None, - pitch=None, - style=None, - uirevision=None, - zoom=None, + accesstoken: str | None = None, + bearing: int | float | None = None, + bounds: None | None = None, + center: None | None = None, + domain: None | None = None, + layers: None | None = None, + layerdefaults: None | None = None, + pitch: int | float | None = None, + style: Any | None = None, + uirevision: Any | None = None, + zoom: int | float | None = None, **kwargs, ): """ @@ -601,14 +418,11 @@ def __init__( ------- Mapbox """ - super(Mapbox, self).__init__("mapbox") - + super().__init__("mapbox") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -623,62 +437,19 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Mapbox`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("accesstoken", None) - _v = accesstoken if accesstoken is not None else _v - if _v is not None: - self["accesstoken"] = _v - _v = arg.pop("bearing", None) - _v = bearing if bearing is not None else _v - if _v is not None: - self["bearing"] = _v - _v = arg.pop("bounds", None) - _v = bounds if bounds is not None else _v - if _v is not None: - self["bounds"] = _v - _v = arg.pop("center", None) - _v = center if center is not None else _v - if _v is not None: - self["center"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("layers", None) - _v = layers if layers is not None else _v - if _v is not None: - self["layers"] = _v - _v = arg.pop("layerdefaults", None) - _v = layerdefaults if layerdefaults is not None else _v - if _v is not None: - self["layerdefaults"] = _v - _v = arg.pop("pitch", None) - _v = pitch if pitch is not None else _v - if _v is not None: - self["pitch"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("zoom", None) - _v = zoom if zoom is not None else _v - if _v is not None: - self["zoom"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("accesstoken", arg, accesstoken) + self._init_provided("bearing", arg, bearing) + self._init_provided("bounds", arg, bounds) + self._init_provided("center", arg, center) + self._init_provided("domain", arg, domain) + self._init_provided("layers", arg, layers) + self._init_provided("layerdefaults", arg, layerdefaults) + self._init_provided("pitch", arg, pitch) + self._init_provided("style", arg, style) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("zoom", arg, zoom) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_margin.py b/plotly/graph_objs/layout/_margin.py index dc8384d02f..5bcb6632e6 100644 --- a/plotly/graph_objs/layout/_margin.py +++ b/plotly/graph_objs/layout/_margin.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Margin(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.margin" _valid_props = {"autoexpand", "b", "l", "pad", "r", "t"} - # autoexpand - # ---------- @property def autoexpand(self): """ @@ -32,8 +31,6 @@ def autoexpand(self): def autoexpand(self, val): self["autoexpand"] = val - # b - # - @property def b(self): """ @@ -52,8 +49,6 @@ def b(self): def b(self, val): self["b"] = val - # l - # - @property def l(self): """ @@ -72,8 +67,6 @@ def l(self): def l(self, val): self["l"] = val - # pad - # --- @property def pad(self): """ @@ -93,8 +86,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # r - # - @property def r(self): """ @@ -113,8 +104,6 @@ def r(self): def r(self, val): self["r"] = val - # t - # - @property def t(self): """ @@ -133,8 +122,6 @@ def t(self): def t(self, val): self["t"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -159,12 +146,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autoexpand=None, - b=None, - l=None, - pad=None, - r=None, - t=None, + autoexpand: bool | None = None, + b: int | float | None = None, + l: int | float | None = None, + pad: int | float | None = None, + r: int | float | None = None, + t: int | float | None = None, **kwargs, ): """ @@ -196,14 +183,11 @@ def __init__( ------- Margin """ - super(Margin, self).__init__("margin") - + super().__init__("margin") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -218,42 +202,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Margin`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autoexpand", None) - _v = autoexpand if autoexpand is not None else _v - if _v is not None: - self["autoexpand"] = _v - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("l", None) - _v = l if l is not None else _v - if _v is not None: - self["l"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("t", None) - _v = t if t is not None else _v - if _v is not None: - self["t"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autoexpand", arg, autoexpand) + self._init_provided("b", arg, b) + self._init_provided("l", arg, l) + self._init_provided("pad", arg, pad) + self._init_provided("r", arg, r) + self._init_provided("t", arg, t) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_modebar.py b/plotly/graph_objs/layout/_modebar.py index 086af979cc..b0a347876e 100644 --- a/plotly/graph_objs/layout/_modebar.py +++ b/plotly/graph_objs/layout/_modebar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Modebar(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.modebar" _valid_props = { @@ -20,8 +21,6 @@ class Modebar(_BaseLayoutHierarchyType): "uirevision", } - # activecolor - # ----------- @property def activecolor(self): """ @@ -33,42 +32,7 @@ def activecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -80,8 +44,6 @@ def activecolor(self): def activecolor(self, val): self["activecolor"] = val - # add - # --- @property def add(self): """ @@ -100,7 +62,7 @@ def add(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["add"] @@ -108,8 +70,6 @@ def add(self): def add(self, val): self["add"] = val - # addsrc - # ------ @property def addsrc(self): """ @@ -128,8 +88,6 @@ def addsrc(self): def addsrc(self, val): self["addsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -140,42 +98,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -187,8 +110,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # color - # ----- @property def color(self): """ @@ -199,42 +120,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -246,8 +132,6 @@ def color(self): def color(self, val): self["color"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -267,8 +151,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # remove - # ------ @property def remove(self): """ @@ -296,7 +178,7 @@ def remove(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["remove"] @@ -304,8 +186,6 @@ def remove(self): def remove(self, val): self["remove"] = val - # removesrc - # --------- @property def removesrc(self): """ @@ -324,8 +204,6 @@ def removesrc(self): def removesrc(self, val): self["removesrc"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -346,8 +224,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -405,15 +281,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - activecolor=None, - add=None, - addsrc=None, - bgcolor=None, - color=None, - orientation=None, - remove=None, - removesrc=None, - uirevision=None, + activecolor: str | None = None, + add: str | None = None, + addsrc: str | None = None, + bgcolor: str | None = None, + color: str | None = None, + orientation: Any | None = None, + remove: str | None = None, + removesrc: str | None = None, + uirevision: Any | None = None, **kwargs, ): """ @@ -479,14 +355,11 @@ def __init__( ------- Modebar """ - super(Modebar, self).__init__("modebar") - + super().__init__("modebar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -501,54 +374,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Modebar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("activecolor", None) - _v = activecolor if activecolor is not None else _v - if _v is not None: - self["activecolor"] = _v - _v = arg.pop("add", None) - _v = add if add is not None else _v - if _v is not None: - self["add"] = _v - _v = arg.pop("addsrc", None) - _v = addsrc if addsrc is not None else _v - if _v is not None: - self["addsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("remove", None) - _v = remove if remove is not None else _v - if _v is not None: - self["remove"] = _v - _v = arg.pop("removesrc", None) - _v = removesrc if removesrc is not None else _v - if _v is not None: - self["removesrc"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("activecolor", arg, activecolor) + self._init_provided("add", arg, add) + self._init_provided("addsrc", arg, addsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("color", arg, color) + self._init_provided("orientation", arg, orientation) + self._init_provided("remove", arg, remove) + self._init_provided("removesrc", arg, removesrc) + self._init_provided("uirevision", arg, uirevision) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_newselection.py b/plotly/graph_objs/layout/_newselection.py index 7b6493418f..a955d7afbc 100644 --- a/plotly/graph_objs/layout/_newselection.py +++ b/plotly/graph_objs/layout/_newselection.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Newselection(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.newselection" _valid_props = {"line", "mode"} - # line - # ---- @property def line(self): """ @@ -21,20 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. By default uses either - dark grey or white to increase contrast with - background color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.layout.newselection.Line @@ -45,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # mode - # ---- @property def mode(self): """ @@ -70,8 +53,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -87,7 +68,9 @@ def _prop_descriptions(self): extra outlines of the selection. """ - def __init__(self, arg=None, line=None, mode=None, **kwargs): + def __init__( + self, arg=None, line: None | None = None, mode: Any | None = None, **kwargs + ): """ Construct a new Newselection object @@ -112,14 +95,11 @@ def __init__(self, arg=None, line=None, mode=None, **kwargs): ------- Newselection """ - super(Newselection, self).__init__("newselection") - + super().__init__("newselection") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -134,26 +114,10 @@ def __init__(self, arg=None, line=None, mode=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.Newselection`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("mode", arg, mode) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_newshape.py b/plotly/graph_objs/layout/_newshape.py index ff282484fd..d61964e82a 100644 --- a/plotly/graph_objs/layout/_newshape.py +++ b/plotly/graph_objs/layout/_newshape.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Newshape(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.newshape" _valid_props = { @@ -26,8 +27,6 @@ class Newshape(_BaseLayoutHierarchyType): "visible", } - # drawdirection - # ------------- @property def drawdirection(self): """ @@ -52,8 +51,6 @@ def drawdirection(self): def drawdirection(self, val): self["drawdirection"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -67,42 +64,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -114,8 +76,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # fillrule - # -------- @property def fillrule(self): """ @@ -137,8 +97,6 @@ def fillrule(self): def fillrule(self, val): self["fillrule"] = val - # label - # ----- @property def label(self): """ @@ -148,76 +106,6 @@ def label(self): - A dict of string/value properties that will be passed to the Label constructor - Supported dict properties: - - font - Sets the new shape label text font. - padding - Sets padding (in px) between edge of label and - edge of new shape. - text - Sets the text to display with the new shape. It - is also used for legend item if `name` is not - provided. - textangle - Sets the angle at which the label text is drawn - with respect to the horizontal. For lines, - angle "auto" is the same angle as the line. For - all other shapes, angle "auto" is horizontal. - textposition - Sets the position of the label text relative to - the new shape. Supported values for rectangles, - circles and paths are *top left*, *top center*, - *top right*, *middle left*, *middle center*, - *middle right*, *bottom left*, *bottom center*, - and *bottom right*. Supported values for lines - are "start", "middle", and "end". Default: - *middle center* for rectangles, circles, and - paths; "middle" for lines. - texttemplate - Template string used for rendering the new - shape's label. Note that this will override - `text`. Variables are inserted using - %{variable}, for example "x0: %{x0}". Numbers - are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{x0:$.2f}". See https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{x0|%m %b %Y}". See - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. A single - multiplication or division operation may be - applied to numeric variables, and combined with - d3 number formatting, for example "Length in - cm: %{x0*2.54}", "%{slope*60:.1f} meters per - second." For log axes, variable values are - given in log units. For date axes, x/y - coordinate variables and center variables use - datetimes, while all other variable values use - values in ms. Finally, the template string has - access to variables `x0`, `x1`, `y0`, `y1`, - `slope`, `dx`, `dy`, `width`, `height`, - `length`, `xcenter` and `ycenter`. - xanchor - Sets the label's horizontal position anchor - This anchor binds the specified `textposition` - to the "left", "center" or "right" of the label - text. For example, if `textposition` is set to - *top right* and `xanchor` to "right" then the - right-most portion of the label text lines up - with the right-most edge of the new shape. - yanchor - Sets the label's vertical position anchor This - anchor binds the specified `textposition` to - the "top", "middle" or "bottom" of the label - text. For example, if `textposition` is set to - *top right* and `yanchor` to "top" then the - top-most portion of the label text lines up - with the top-most edge of the new shape. - Returns ------- plotly.graph_objs.layout.newshape.Label @@ -228,8 +116,6 @@ def label(self): def label(self, val): self["label"] = val - # layer - # ----- @property def layer(self): """ @@ -251,8 +137,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # legend - # ------ @property def legend(self): """ @@ -276,8 +160,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -299,8 +181,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -310,13 +190,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.layout.newshape.Legendgrouptitle @@ -327,8 +200,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -352,8 +223,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -372,8 +241,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -383,20 +250,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. By default uses either - dark grey or white to increase contrast with - background color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.layout.newshape.Line @@ -407,8 +260,6 @@ def line(self): def line(self, val): self["line"] = val - # name - # ---- @property def name(self): """ @@ -428,8 +279,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -448,8 +297,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -468,8 +315,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # visible - # ------- @property def visible(self): """ @@ -491,8 +336,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -566,21 +409,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - drawdirection=None, - fillcolor=None, - fillrule=None, - label=None, - layer=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - name=None, - opacity=None, - showlegend=None, - visible=None, + drawdirection: Any | None = None, + fillcolor: str | None = None, + fillrule: Any | None = None, + label: None | None = None, + layer: Any | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + showlegend: bool | None = None, + visible: Any | None = None, **kwargs, ): """ @@ -662,14 +505,11 @@ def __init__( ------- Newshape """ - super(Newshape, self).__init__("newshape") - + super().__init__("newshape") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -684,78 +524,23 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Newshape`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("drawdirection", None) - _v = drawdirection if drawdirection is not None else _v - if _v is not None: - self["drawdirection"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("fillrule", None) - _v = fillrule if fillrule is not None else _v - if _v is not None: - self["fillrule"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("drawdirection", arg, drawdirection) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("fillrule", arg, fillrule) + self._init_provided("label", arg, label) + self._init_provided("layer", arg, layer) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_polar.py b/plotly/graph_objs/layout/_polar.py index fbf0a20b7f..c8e67f857a 100644 --- a/plotly/graph_objs/layout/_polar.py +++ b/plotly/graph_objs/layout/_polar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Polar(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.polar" _valid_props = { @@ -21,8 +22,6 @@ class Polar(_BaseLayoutHierarchyType): "uirevision", } - # angularaxis - # ----------- @property def angularaxis(self): """ @@ -32,297 +31,6 @@ def angularaxis(self): - A dict of string/value properties that will be passed to the AngularAxis constructor - Supported dict properties: - - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - direction - Sets the direction corresponding to positive - angles. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - period - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - rotation - Sets that start position (in degrees) of the - angular axis By default, polar subplots with - `direction` set to "counterclockwise" get a - `rotation` of 0 which corresponds to due East - (like what mathematicians prefer). In turn, - polar with `direction` set to "clockwise" get a - rotation of 90 which corresponds to due North - (like on a compass), - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thetaunit - Sets the format unit of the formatted "theta" - values. Has an effect only when - `angularaxis.type` is "linear". - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.angularaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.angularaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.angularaxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - type - Sets the angular axis type. If "linear", set - `thetaunit` to determine the unit in which axis - value are shown. If *category, use `period` to - set the number of integer coordinates around - polar axis. - uirevision - Controls persistence of user-driven changes in - axis `rotation`. Defaults to - `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - Returns ------- plotly.graph_objs.layout.polar.AngularAxis @@ -333,8 +41,6 @@ def angularaxis(self): def angularaxis(self, val): self["angularaxis"] = val - # bargap - # ------ @property def bargap(self): """ @@ -355,8 +61,6 @@ def bargap(self): def bargap(self, val): self["bargap"] = val - # barmode - # ------- @property def barmode(self): """ @@ -380,8 +84,6 @@ def barmode(self): def barmode(self, val): self["barmode"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -392,42 +94,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -439,8 +106,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # domain - # ------ @property def domain(self): """ @@ -450,22 +115,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this polar subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this polar subplot . - x - Sets the horizontal domain of this polar - subplot (in plot fraction). - y - Sets the vertical domain of this polar subplot - (in plot fraction). - Returns ------- plotly.graph_objs.layout.polar.Domain @@ -476,8 +125,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # gridshape - # --------- @property def gridshape(self): """ @@ -502,8 +149,6 @@ def gridshape(self): def gridshape(self, val): self["gridshape"] = val - # hole - # ---- @property def hole(self): """ @@ -523,8 +168,6 @@ def hole(self): def hole(self, val): self["hole"] = val - # radialaxis - # ---------- @property def radialaxis(self): """ @@ -534,345 +177,6 @@ def radialaxis(self): - A dict of string/value properties that will be passed to the RadialAxis constructor - Supported dict properties: - - angle - Sets the angle (in degrees) from which the - radial axis is drawn. Note that by default, - radial axis line on the theta=0 line - corresponds to a line pointing right (like what - mathematicians prefer). Defaults to the first - `polar.sector` angle. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.polar.radia - laxis.Autorangeoptions` instance or dict with - compatible properties - autotickangles - When `tickangle` is set to "auto", it will be - set to the first angle in this array that is - large enough to prevent label overlap. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", - the range is non-negative, regardless of the - input data. If "normal", the range is computed - in relation to the extrema of the input data - (same behavior as for cartesian axes). - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of radial axis line - the tick and tick labels appear. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.radialaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.radialaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.radialaxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.polar.radia - laxis.Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, `angle`, and `title` - if in `editable: true` configuration. Defaults - to `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - Returns ------- plotly.graph_objs.layout.polar.RadialAxis @@ -883,8 +187,6 @@ def radialaxis(self): def radialaxis(self, val): self["radialaxis"] = val - # sector - # ------ @property def sector(self): """ @@ -911,8 +213,6 @@ def sector(self): def sector(self, val): self["sector"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -932,8 +232,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -984,16 +282,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angularaxis=None, - bargap=None, - barmode=None, - bgcolor=None, - domain=None, - gridshape=None, - hole=None, - radialaxis=None, - sector=None, - uirevision=None, + angularaxis: None | None = None, + bargap: int | float | None = None, + barmode: Any | None = None, + bgcolor: str | None = None, + domain: None | None = None, + gridshape: Any | None = None, + hole: int | float | None = None, + radialaxis: None | None = None, + sector: list | None = None, + uirevision: Any | None = None, **kwargs, ): """ @@ -1051,14 +349,11 @@ def __init__( ------- Polar """ - super(Polar, self).__init__("polar") - + super().__init__("polar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1073,58 +368,18 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Polar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angularaxis", None) - _v = angularaxis if angularaxis is not None else _v - if _v is not None: - self["angularaxis"] = _v - _v = arg.pop("bargap", None) - _v = bargap if bargap is not None else _v - if _v is not None: - self["bargap"] = _v - _v = arg.pop("barmode", None) - _v = barmode if barmode is not None else _v - if _v is not None: - self["barmode"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("gridshape", None) - _v = gridshape if gridshape is not None else _v - if _v is not None: - self["gridshape"] = _v - _v = arg.pop("hole", None) - _v = hole if hole is not None else _v - if _v is not None: - self["hole"] = _v - _v = arg.pop("radialaxis", None) - _v = radialaxis if radialaxis is not None else _v - if _v is not None: - self["radialaxis"] = _v - _v = arg.pop("sector", None) - _v = sector if sector is not None else _v - if _v is not None: - self["sector"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angularaxis", arg, angularaxis) + self._init_provided("bargap", arg, bargap) + self._init_provided("barmode", arg, barmode) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("domain", arg, domain) + self._init_provided("gridshape", arg, gridshape) + self._init_provided("hole", arg, hole) + self._init_provided("radialaxis", arg, radialaxis) + self._init_provided("sector", arg, sector) + self._init_provided("uirevision", arg, uirevision) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_scene.py b/plotly/graph_objs/layout/_scene.py index 5e50a9c14c..5a60d019c0 100644 --- a/plotly/graph_objs/layout/_scene.py +++ b/plotly/graph_objs/layout/_scene.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Scene(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.scene" _valid_props = { @@ -24,8 +25,6 @@ class Scene(_BaseLayoutHierarchyType): "zaxis", } - # annotations - # ----------- @property def annotations(self): """ @@ -35,185 +34,6 @@ def annotations(self): - A list or tuple of dicts of string/value properties that will be passed to the Annotation constructor - Supported dict properties: - - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head (in pixels). - ay - Sets the y component of the arrow tail about - the arrow head (in pixels). - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.scene.annot - ation.Hoverlabel` instance or dict with - compatible properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , , , are - also supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. - z - Sets the annotation's z position. - Returns ------- tuple[plotly.graph_objs.layout.scene.Annotation] @@ -224,8 +44,6 @@ def annotations(self): def annotations(self, val): self["annotations"] = val - # annotationdefaults - # ------------------ @property def annotationdefaults(self): """ @@ -240,8 +58,6 @@ def annotationdefaults(self): - A dict of string/value properties that will be passed to the Annotation constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.scene.Annotation @@ -252,8 +68,6 @@ def annotationdefaults(self): def annotationdefaults(self, val): self["annotationdefaults"] = val - # aspectmode - # ---------- @property def aspectmode(self): """ @@ -280,8 +94,6 @@ def aspectmode(self): def aspectmode(self, val): self["aspectmode"] = val - # aspectratio - # ----------- @property def aspectratio(self): """ @@ -293,14 +105,6 @@ def aspectratio(self): - A dict of string/value properties that will be passed to the Aspectratio constructor - Supported dict properties: - - x - - y - - z - Returns ------- plotly.graph_objs.layout.scene.Aspectratio @@ -311,8 +115,6 @@ def aspectratio(self): def aspectratio(self, val): self["aspectratio"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -321,42 +123,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -368,8 +135,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # camera - # ------ @property def camera(self): """ @@ -379,29 +144,6 @@ def camera(self): - A dict of string/value properties that will be passed to the Camera constructor - Supported dict properties: - - center - Sets the (x,y,z) components of the 'center' - camera vector This vector determines the - translation (x,y,z) space about the center of - this scene. By default, there is no such - translation. - eye - Sets the (x,y,z) components of the 'eye' camera - vector. This vector determines the view point - about the origin of this scene. - projection - :class:`plotly.graph_objects.layout.scene.camer - a.Projection` instance or dict with compatible - properties - up - Sets the (x,y,z) components of the 'up' camera - vector. This vector determines the up direction - of this scene with respect to the page. The - default is *{x: 0, y: 0, z: 1}* which means - that the z axis points up. - Returns ------- plotly.graph_objs.layout.scene.Camera @@ -412,8 +154,6 @@ def camera(self): def camera(self, val): self["camera"] = val - # domain - # ------ @property def domain(self): """ @@ -423,22 +163,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this scene subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this scene subplot . - x - Sets the horizontal domain of this scene - subplot (in plot fraction). - y - Sets the vertical domain of this scene subplot - (in plot fraction). - Returns ------- plotly.graph_objs.layout.scene.Domain @@ -449,8 +173,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # dragmode - # -------- @property def dragmode(self): """ @@ -470,8 +192,6 @@ def dragmode(self): def dragmode(self, val): self["dragmode"] = val - # hovermode - # --------- @property def hovermode(self): """ @@ -491,8 +211,6 @@ def hovermode(self): def hovermode(self, val): self["hovermode"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -511,8 +229,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # xaxis - # ----- @property def xaxis(self): """ @@ -522,336 +238,6 @@ def xaxis(self): - A dict of string/value properties that will be passed to the XAxis constructor - Supported dict properties: - - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.scene.xaxis - .Autorangeoptions` instance or dict with - compatible properties - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.xaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.xaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.xaxis - .Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - Returns ------- plotly.graph_objs.layout.scene.XAxis @@ -862,8 +248,6 @@ def xaxis(self): def xaxis(self, val): self["xaxis"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -873,336 +257,6 @@ def yaxis(self): - A dict of string/value properties that will be passed to the YAxis constructor - Supported dict properties: - - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.scene.yaxis - .Autorangeoptions` instance or dict with - compatible properties - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.yaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.yaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.yaxis - .Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - Returns ------- plotly.graph_objs.layout.scene.YAxis @@ -1213,8 +267,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # zaxis - # ----- @property def zaxis(self): """ @@ -1224,336 +276,6 @@ def zaxis(self): - A dict of string/value properties that will be passed to the ZAxis constructor - Supported dict properties: - - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.scene.zaxis - .Autorangeoptions` instance or dict with - compatible properties - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.zaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.zaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.zaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.zaxis - .Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. - Returns ------- plotly.graph_objs.layout.scene.ZAxis @@ -1564,8 +286,6 @@ def zaxis(self): def zaxis(self, val): self["zaxis"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1622,19 +342,19 @@ def _prop_descriptions(self): def __init__( self, arg=None, - annotations=None, - annotationdefaults=None, - aspectmode=None, - aspectratio=None, - bgcolor=None, - camera=None, - domain=None, - dragmode=None, - hovermode=None, - uirevision=None, - xaxis=None, - yaxis=None, - zaxis=None, + annotations: None | None = None, + annotationdefaults: None | None = None, + aspectmode: Any | None = None, + aspectratio: None | None = None, + bgcolor: str | None = None, + camera: None | None = None, + domain: None | None = None, + dragmode: Any | None = None, + hovermode: Any | None = None, + uirevision: Any | None = None, + xaxis: None | None = None, + yaxis: None | None = None, + zaxis: None | None = None, **kwargs, ): """ @@ -1698,14 +418,11 @@ def __init__( ------- Scene """ - super(Scene, self).__init__("scene") - + super().__init__("scene") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1720,70 +437,21 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Scene`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("annotations", None) - _v = annotations if annotations is not None else _v - if _v is not None: - self["annotations"] = _v - _v = arg.pop("annotationdefaults", None) - _v = annotationdefaults if annotationdefaults is not None else _v - if _v is not None: - self["annotationdefaults"] = _v - _v = arg.pop("aspectmode", None) - _v = aspectmode if aspectmode is not None else _v - if _v is not None: - self["aspectmode"] = _v - _v = arg.pop("aspectratio", None) - _v = aspectratio if aspectratio is not None else _v - if _v is not None: - self["aspectratio"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("camera", None) - _v = camera if camera is not None else _v - if _v is not None: - self["camera"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("dragmode", None) - _v = dragmode if dragmode is not None else _v - if _v is not None: - self["dragmode"] = _v - _v = arg.pop("hovermode", None) - _v = hovermode if hovermode is not None else _v - if _v is not None: - self["hovermode"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("xaxis", None) - _v = xaxis if xaxis is not None else _v - if _v is not None: - self["xaxis"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - _v = arg.pop("zaxis", None) - _v = zaxis if zaxis is not None else _v - if _v is not None: - self["zaxis"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("annotations", arg, annotations) + self._init_provided("annotationdefaults", arg, annotationdefaults) + self._init_provided("aspectmode", arg, aspectmode) + self._init_provided("aspectratio", arg, aspectratio) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("camera", arg, camera) + self._init_provided("domain", arg, domain) + self._init_provided("dragmode", arg, dragmode) + self._init_provided("hovermode", arg, hovermode) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("xaxis", arg, xaxis) + self._init_provided("yaxis", arg, yaxis) + self._init_provided("zaxis", arg, zaxis) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_selection.py b/plotly/graph_objs/layout/_selection.py index f4b15935f3..5b697a79f2 100644 --- a/plotly/graph_objs/layout/_selection.py +++ b/plotly/graph_objs/layout/_selection.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Selection(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.selection" _valid_props = { @@ -23,8 +24,6 @@ class Selection(_BaseLayoutHierarchyType): "yref", } - # line - # ---- @property def line(self): """ @@ -34,18 +33,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.layout.selection.Line @@ -56,8 +43,6 @@ def line(self): def line(self, val): self["line"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +68,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -103,8 +86,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # path - # ---- @property def path(self): """ @@ -125,8 +106,6 @@ def path(self): def path(self, val): self["path"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -153,8 +132,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # type - # ---- @property def type(self): """ @@ -177,8 +154,6 @@ def type(self): def type(self, val): self["type"] = val - # x0 - # -- @property def x0(self): """ @@ -196,8 +171,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # x1 - # -- @property def x1(self): """ @@ -215,8 +188,6 @@ def x1(self): def x1(self, val): self["x1"] = val - # xref - # ---- @property def xref(self): """ @@ -248,8 +219,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y0 - # -- @property def y0(self): """ @@ -267,8 +236,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # y1 - # -- @property def y1(self): """ @@ -286,8 +253,6 @@ def y1(self): def y1(self, val): self["y1"] = val - # yref - # ---- @property def yref(self): """ @@ -319,8 +284,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -398,18 +361,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - line=None, - name=None, - opacity=None, - path=None, - templateitemname=None, - type=None, - x0=None, - x1=None, - xref=None, - y0=None, - y1=None, - yref=None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + path: str | None = None, + templateitemname: str | None = None, + type: Any | None = None, + x0: Any | None = None, + x1: Any | None = None, + xref: Any | None = None, + y0: Any | None = None, + y1: Any | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -495,14 +458,11 @@ def __init__( ------- Selection """ - super(Selection, self).__init__("selections") - + super().__init__("selections") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -517,66 +477,20 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Selection`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("path", None) - _v = path if path is not None else _v - if _v is not None: - self["path"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("x1", None) - _v = x1 if x1 is not None else _v - if _v is not None: - self["x1"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("y1", None) - _v = y1 if y1 is not None else _v - if _v is not None: - self["y1"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("path", arg, path) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("type", arg, type) + self._init_provided("x0", arg, x0) + self._init_provided("x1", arg, x1) + self._init_provided("xref", arg, xref) + self._init_provided("y0", arg, y0) + self._init_provided("y1", arg, y1) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_shape.py b/plotly/graph_objs/layout/_shape.py index 3ca398a320..4ac574558c 100644 --- a/plotly/graph_objs/layout/_shape.py +++ b/plotly/graph_objs/layout/_shape.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Shape(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.shape" _valid_props = { @@ -43,8 +44,6 @@ class Shape(_BaseLayoutHierarchyType): "ysizemode", } - # editable - # -------- @property def editable(self): """ @@ -65,8 +64,6 @@ def editable(self): def editable(self, val): self["editable"] = val - # fillcolor - # --------- @property def fillcolor(self): """ @@ -78,42 +75,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -125,8 +87,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # fillrule - # -------- @property def fillrule(self): """ @@ -149,8 +109,6 @@ def fillrule(self): def fillrule(self, val): self["fillrule"] = val - # label - # ----- @property def label(self): """ @@ -160,75 +118,6 @@ def label(self): - A dict of string/value properties that will be passed to the Label constructor - Supported dict properties: - - font - Sets the shape label text font. - padding - Sets padding (in px) between edge of label and - edge of shape. - text - Sets the text to display with shape. It is also - used for legend item if `name` is not provided. - textangle - Sets the angle at which the label text is drawn - with respect to the horizontal. For lines, - angle "auto" is the same angle as the line. For - all other shapes, angle "auto" is horizontal. - textposition - Sets the position of the label text relative to - the shape. Supported values for rectangles, - circles and paths are *top left*, *top center*, - *top right*, *middle left*, *middle center*, - *middle right*, *bottom left*, *bottom center*, - and *bottom right*. Supported values for lines - are "start", "middle", and "end". Default: - *middle center* for rectangles, circles, and - paths; "middle" for lines. - texttemplate - Template string used for rendering the shape's - label. Note that this will override `text`. - Variables are inserted using %{variable}, for - example "x0: %{x0}". Numbers are formatted - using d3-format's syntax %{variable:d3-format}, - for example "Price: %{x0:$.2f}". See https://gi - thub.com/d3/d3-format/tree/v1.4.5#d3-format for - details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{x0|%m %b %Y}". See - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. A single - multiplication or division operation may be - applied to numeric variables, and combined with - d3 number formatting, for example "Length in - cm: %{x0*2.54}", "%{slope*60:.1f} meters per - second." For log axes, variable values are - given in log units. For date axes, x/y - coordinate variables and center variables use - datetimes, while all other variable values use - values in ms. Finally, the template string has - access to variables `x0`, `x1`, `y0`, `y1`, - `slope`, `dx`, `dy`, `width`, `height`, - `length`, `xcenter` and `ycenter`. - xanchor - Sets the label's horizontal position anchor - This anchor binds the specified `textposition` - to the "left", "center" or "right" of the label - text. For example, if `textposition` is set to - *top right* and `xanchor` to "right" then the - right-most portion of the label text lines up - with the right-most edge of the shape. - yanchor - Sets the label's vertical position anchor This - anchor binds the specified `textposition` to - the "top", "middle" or "bottom" of the label - text. For example, if `textposition` is set to - *top right* and `yanchor` to "top" then the - top-most portion of the label text lines up - with the top-most edge of the shape. - Returns ------- plotly.graph_objs.layout.shape.Label @@ -239,8 +128,6 @@ def label(self): def label(self, val): self["label"] = val - # layer - # ----- @property def layer(self): """ @@ -262,8 +149,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # legend - # ------ @property def legend(self): """ @@ -287,8 +172,6 @@ def legend(self): def legend(self, val): self["legend"] = val - # legendgroup - # ----------- @property def legendgroup(self): """ @@ -310,8 +193,6 @@ def legendgroup(self): def legendgroup(self, val): self["legendgroup"] = val - # legendgrouptitle - # ---------------- @property def legendgrouptitle(self): """ @@ -321,13 +202,6 @@ def legendgrouptitle(self): - A dict of string/value properties that will be passed to the Legendgrouptitle constructor - Supported dict properties: - - font - Sets this legend group's title font. - text - Sets the title of the legend group. - Returns ------- plotly.graph_objs.layout.shape.Legendgrouptitle @@ -338,8 +212,6 @@ def legendgrouptitle(self): def legendgrouptitle(self, val): self["legendgrouptitle"] = val - # legendrank - # ---------- @property def legendrank(self): """ @@ -365,8 +237,6 @@ def legendrank(self): def legendrank(self, val): self["legendrank"] = val - # legendwidth - # ----------- @property def legendwidth(self): """ @@ -386,8 +256,6 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val - # line - # ---- @property def line(self): """ @@ -397,18 +265,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.layout.shape.Line @@ -419,8 +275,6 @@ def line(self): def line(self, val): self["line"] = val - # name - # ---- @property def name(self): """ @@ -446,8 +300,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -466,8 +318,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # path - # ---- @property def path(self): """ @@ -505,8 +355,6 @@ def path(self): def path(self, val): self["path"] = val - # showlegend - # ---------- @property def showlegend(self): """ @@ -525,8 +373,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -553,8 +399,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # type - # ---- @property def type(self): """ @@ -582,8 +426,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -605,8 +447,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x0 - # -- @property def x0(self): """ @@ -625,8 +465,6 @@ def x0(self): def x0(self, val): self["x0"] = val - # x0shift - # ------- @property def x0shift(self): """ @@ -648,8 +486,6 @@ def x0shift(self): def x0shift(self, val): self["x0shift"] = val - # x1 - # -- @property def x1(self): """ @@ -668,8 +504,6 @@ def x1(self): def x1(self, val): self["x1"] = val - # x1shift - # ------- @property def x1shift(self): """ @@ -691,8 +525,6 @@ def x1shift(self): def x1shift(self, val): self["x1shift"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -714,8 +546,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xref - # ---- @property def xref(self): """ @@ -747,8 +577,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # xsizemode - # --------- @property def xsizemode(self): """ @@ -775,8 +603,6 @@ def xsizemode(self): def xsizemode(self, val): self["xsizemode"] = val - # y0 - # -- @property def y0(self): """ @@ -795,8 +621,6 @@ def y0(self): def y0(self, val): self["y0"] = val - # y0shift - # ------- @property def y0shift(self): """ @@ -818,8 +642,6 @@ def y0shift(self): def y0shift(self, val): self["y0shift"] = val - # y1 - # -- @property def y1(self): """ @@ -838,8 +660,6 @@ def y1(self): def y1(self, val): self["y1"] = val - # y1shift - # ------- @property def y1shift(self): """ @@ -861,8 +681,6 @@ def y1shift(self): def y1shift(self, val): self["y1shift"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -884,8 +702,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # yref - # ---- @property def yref(self): """ @@ -917,8 +733,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # ysizemode - # --------- @property def ysizemode(self): """ @@ -945,8 +759,6 @@ def ysizemode(self): def ysizemode(self, val): self["ysizemode"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1164,38 +976,38 @@ def _prop_descriptions(self): def __init__( self, arg=None, - editable=None, - fillcolor=None, - fillrule=None, - label=None, - layer=None, - legend=None, - legendgroup=None, - legendgrouptitle=None, - legendrank=None, - legendwidth=None, - line=None, - name=None, - opacity=None, - path=None, - showlegend=None, - templateitemname=None, - type=None, - visible=None, - x0=None, - x0shift=None, - x1=None, - x1shift=None, - xanchor=None, - xref=None, - xsizemode=None, - y0=None, - y0shift=None, - y1=None, - y1shift=None, - yanchor=None, - yref=None, - ysizemode=None, + editable: bool | None = None, + fillcolor: str | None = None, + fillrule: Any | None = None, + label: None | None = None, + layer: Any | None = None, + legend: str | None = None, + legendgroup: str | None = None, + legendgrouptitle: None | None = None, + legendrank: int | float | None = None, + legendwidth: int | float | None = None, + line: None | None = None, + name: str | None = None, + opacity: int | float | None = None, + path: str | None = None, + showlegend: bool | None = None, + templateitemname: str | None = None, + type: Any | None = None, + visible: Any | None = None, + x0: Any | None = None, + x0shift: int | float | None = None, + x1: Any | None = None, + x1shift: int | float | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + xsizemode: Any | None = None, + y0: Any | None = None, + y0shift: int | float | None = None, + y1: Any | None = None, + y1shift: int | float | None = None, + yanchor: Any | None = None, + yref: Any | None = None, + ysizemode: Any | None = None, **kwargs, ): """ @@ -1420,14 +1232,11 @@ def __init__( ------- Shape """ - super(Shape, self).__init__("shapes") - + super().__init__("shapes") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1442,146 +1251,40 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Shape`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("editable", None) - _v = editable if editable is not None else _v - if _v is not None: - self["editable"] = _v - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("fillrule", None) - _v = fillrule if fillrule is not None else _v - if _v is not None: - self["fillrule"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("legend", None) - _v = legend if legend is not None else _v - if _v is not None: - self["legend"] = _v - _v = arg.pop("legendgroup", None) - _v = legendgroup if legendgroup is not None else _v - if _v is not None: - self["legendgroup"] = _v - _v = arg.pop("legendgrouptitle", None) - _v = legendgrouptitle if legendgrouptitle is not None else _v - if _v is not None: - self["legendgrouptitle"] = _v - _v = arg.pop("legendrank", None) - _v = legendrank if legendrank is not None else _v - if _v is not None: - self["legendrank"] = _v - _v = arg.pop("legendwidth", None) - _v = legendwidth if legendwidth is not None else _v - if _v is not None: - self["legendwidth"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("path", None) - _v = path if path is not None else _v - if _v is not None: - self["path"] = _v - _v = arg.pop("showlegend", None) - _v = showlegend if showlegend is not None else _v - if _v is not None: - self["showlegend"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x0", None) - _v = x0 if x0 is not None else _v - if _v is not None: - self["x0"] = _v - _v = arg.pop("x0shift", None) - _v = x0shift if x0shift is not None else _v - if _v is not None: - self["x0shift"] = _v - _v = arg.pop("x1", None) - _v = x1 if x1 is not None else _v - if _v is not None: - self["x1"] = _v - _v = arg.pop("x1shift", None) - _v = x1shift if x1shift is not None else _v - if _v is not None: - self["x1shift"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("xsizemode", None) - _v = xsizemode if xsizemode is not None else _v - if _v is not None: - self["xsizemode"] = _v - _v = arg.pop("y0", None) - _v = y0 if y0 is not None else _v - if _v is not None: - self["y0"] = _v - _v = arg.pop("y0shift", None) - _v = y0shift if y0shift is not None else _v - if _v is not None: - self["y0shift"] = _v - _v = arg.pop("y1", None) - _v = y1 if y1 is not None else _v - if _v is not None: - self["y1"] = _v - _v = arg.pop("y1shift", None) - _v = y1shift if y1shift is not None else _v - if _v is not None: - self["y1shift"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - _v = arg.pop("ysizemode", None) - _v = ysizemode if ysizemode is not None else _v - if _v is not None: - self["ysizemode"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("editable", arg, editable) + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("fillrule", arg, fillrule) + self._init_provided("label", arg, label) + self._init_provided("layer", arg, layer) + self._init_provided("legend", arg, legend) + self._init_provided("legendgroup", arg, legendgroup) + self._init_provided("legendgrouptitle", arg, legendgrouptitle) + self._init_provided("legendrank", arg, legendrank) + self._init_provided("legendwidth", arg, legendwidth) + self._init_provided("line", arg, line) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("path", arg, path) + self._init_provided("showlegend", arg, showlegend) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) + self._init_provided("x0", arg, x0) + self._init_provided("x0shift", arg, x0shift) + self._init_provided("x1", arg, x1) + self._init_provided("x1shift", arg, x1shift) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xref", arg, xref) + self._init_provided("xsizemode", arg, xsizemode) + self._init_provided("y0", arg, y0) + self._init_provided("y0shift", arg, y0shift) + self._init_provided("y1", arg, y1) + self._init_provided("y1shift", arg, y1shift) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("yref", arg, yref) + self._init_provided("ysizemode", arg, ysizemode) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_slider.py b/plotly/graph_objs/layout/_slider.py index b341f45efc..e436135926 100644 --- a/plotly/graph_objs/layout/_slider.py +++ b/plotly/graph_objs/layout/_slider.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Slider(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.slider" _valid_props = { @@ -35,8 +36,6 @@ class Slider(_BaseLayoutHierarchyType): "yanchor", } - # active - # ------ @property def active(self): """ @@ -56,8 +55,6 @@ def active(self): def active(self, val): self["active"] = val - # activebgcolor - # ------------- @property def activebgcolor(self): """ @@ -68,42 +65,7 @@ def activebgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -115,8 +77,6 @@ def activebgcolor(self): def activebgcolor(self, val): self["activebgcolor"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -127,42 +87,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -174,8 +99,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -186,42 +109,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -233,8 +121,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -253,8 +139,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # currentvalue - # ------------ @property def currentvalue(self): """ @@ -264,26 +148,6 @@ def currentvalue(self): - A dict of string/value properties that will be passed to the Currentvalue constructor - Supported dict properties: - - font - Sets the font of the current value label text. - offset - The amount of space, in pixels, between the - current value label and the slider. - prefix - When currentvalue.visible is true, this sets - the prefix of the label. - suffix - When currentvalue.visible is true, this sets - the suffix of the label. - visible - Shows the currently-selected value above the - slider. - xanchor - The alignment of the value readout relative to - the length of the slider. - Returns ------- plotly.graph_objs.layout.slider.Currentvalue @@ -294,8 +158,6 @@ def currentvalue(self): def currentvalue(self, val): self["currentvalue"] = val - # font - # ---- @property def font(self): """ @@ -307,52 +169,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.slider.Font @@ -363,8 +179,6 @@ def font(self): def font(self, val): self["font"] = val - # len - # --- @property def len(self): """ @@ -385,8 +199,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -407,8 +219,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minorticklen - # ------------ @property def minorticklen(self): """ @@ -427,8 +237,6 @@ def minorticklen(self): def minorticklen(self, val): self["minorticklen"] = val - # name - # ---- @property def name(self): """ @@ -454,8 +262,6 @@ def name(self): def name(self, val): self["name"] = val - # pad - # --- @property def pad(self): """ @@ -467,21 +273,6 @@ def pad(self): - A dict of string/value properties that will be passed to the Pad constructor - Supported dict properties: - - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. - Returns ------- plotly.graph_objs.layout.slider.Pad @@ -492,8 +283,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # steps - # ----- @property def steps(self): """ @@ -503,60 +292,6 @@ def steps(self): - A list or tuple of dicts of string/value properties that will be passed to the Step constructor - Supported dict properties: - - args - Sets the arguments values to be passed to the - Plotly method set in `method` on slide. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_sliderchange` method and executing the - API command manually without losing the benefit - of the slider automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the slider - method - Sets the Plotly method to be called when the - slider value is changed. If the `skip` method - is used, the API slider will function as normal - but will perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to slider events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - Sets the value of the slider step, used to - refer to the step programatically. Defaults to - the slider label if not provided. - visible - Determines whether or not this step is included - in the slider. - Returns ------- tuple[plotly.graph_objs.layout.slider.Step] @@ -567,8 +302,6 @@ def steps(self): def steps(self, val): self["steps"] = val - # stepdefaults - # ------------ @property def stepdefaults(self): """ @@ -582,8 +315,6 @@ def stepdefaults(self): - A dict of string/value properties that will be passed to the Step constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.slider.Step @@ -594,8 +325,6 @@ def stepdefaults(self): def stepdefaults(self, val): self["stepdefaults"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -622,8 +351,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -634,42 +361,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -681,8 +373,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -701,8 +391,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -721,8 +409,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # transition - # ---------- @property def transition(self): """ @@ -732,14 +418,6 @@ def transition(self): - A dict of string/value properties that will be passed to the Transition constructor - Supported dict properties: - - duration - Sets the duration of the slider transition - easing - Sets the easing function of the slider - transition - Returns ------- plotly.graph_objs.layout.slider.Transition @@ -750,8 +428,6 @@ def transition(self): def transition(self, val): self["transition"] = val - # visible - # ------- @property def visible(self): """ @@ -770,8 +446,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -790,8 +464,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -813,8 +485,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # y - # - @property def y(self): """ @@ -833,8 +503,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -856,8 +524,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -950,30 +616,30 @@ def _prop_descriptions(self): def __init__( self, arg=None, - active=None, - activebgcolor=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - currentvalue=None, - font=None, - len=None, - lenmode=None, - minorticklen=None, - name=None, - pad=None, - steps=None, - stepdefaults=None, - templateitemname=None, - tickcolor=None, - ticklen=None, - tickwidth=None, - transition=None, - visible=None, - x=None, - xanchor=None, - y=None, - yanchor=None, + active: int | float | None = None, + activebgcolor: str | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + currentvalue: None | None = None, + font: None | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minorticklen: int | float | None = None, + name: str | None = None, + pad: None | None = None, + steps: None | None = None, + stepdefaults: None | None = None, + templateitemname: str | None = None, + tickcolor: str | None = None, + ticklen: int | float | None = None, + tickwidth: int | float | None = None, + transition: None | None = None, + visible: bool | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, **kwargs, ): """ @@ -1073,14 +739,11 @@ def __init__( ------- Slider """ - super(Slider, self).__init__("sliders") - + super().__init__("sliders") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1095,114 +758,32 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Slider`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("active", None) - _v = active if active is not None else _v - if _v is not None: - self["active"] = _v - _v = arg.pop("activebgcolor", None) - _v = activebgcolor if activebgcolor is not None else _v - if _v is not None: - self["activebgcolor"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("currentvalue", None) - _v = currentvalue if currentvalue is not None else _v - if _v is not None: - self["currentvalue"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minorticklen", None) - _v = minorticklen if minorticklen is not None else _v - if _v is not None: - self["minorticklen"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("steps", None) - _v = steps if steps is not None else _v - if _v is not None: - self["steps"] = _v - _v = arg.pop("stepdefaults", None) - _v = stepdefaults if stepdefaults is not None else _v - if _v is not None: - self["stepdefaults"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("transition", None) - _v = transition if transition is not None else _v - if _v is not None: - self["transition"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("active", arg, active) + self._init_provided("activebgcolor", arg, activebgcolor) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("currentvalue", arg, currentvalue) + self._init_provided("font", arg, font) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minorticklen", arg, minorticklen) + self._init_provided("name", arg, name) + self._init_provided("pad", arg, pad) + self._init_provided("steps", arg, steps) + self._init_provided("stepdefaults", arg, stepdefaults) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("transition", arg, transition) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_smith.py b/plotly/graph_objs/layout/_smith.py index cca15510a8..32c9fa1255 100644 --- a/plotly/graph_objs/layout/_smith.py +++ b/plotly/graph_objs/layout/_smith.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Smith(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.smith" _valid_props = {"bgcolor", "domain", "imaginaryaxis", "realaxis"} - # bgcolor - # ------- @property def bgcolor(self): """ @@ -22,42 +21,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # domain - # ------ @property def domain(self): """ @@ -80,22 +42,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this smith subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this smith subplot . - x - Sets the horizontal domain of this smith - subplot (in plot fraction). - y - Sets the vertical domain of this smith subplot - (in plot fraction). - Returns ------- plotly.graph_objs.layout.smith.Domain @@ -106,8 +52,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # imaginaryaxis - # ------------- @property def imaginaryaxis(self): """ @@ -117,125 +61,6 @@ def imaginaryaxis(self): - A dict of string/value properties that will be passed to the Imaginaryaxis constructor - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticklen - Sets the tick length (in px). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - tickvals - Sets the values at which ticks on this axis - appear. Defaults to `realaxis.tickvals` plus - the same as negatives and zero. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - Returns ------- plotly.graph_objs.layout.smith.Imaginaryaxis @@ -246,8 +71,6 @@ def imaginaryaxis(self): def imaginaryaxis(self, val): self["imaginaryaxis"] = val - # realaxis - # -------- @property def realaxis(self): """ @@ -257,131 +80,6 @@ def realaxis(self): - A dict of string/value properties that will be passed to the Realaxis constructor - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of real axis line the - tick and tick labels appear. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticklen - Sets the tick length (in px). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If "top" - ("bottom"), this axis' are drawn above (below) - the axis line. - ticksuffix - Sets a tick label suffix. - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - Returns ------- plotly.graph_objs.layout.smith.Realaxis @@ -392,8 +90,6 @@ def realaxis(self): def realaxis(self, val): self["realaxis"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -413,10 +109,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - domain=None, - imaginaryaxis=None, - realaxis=None, + bgcolor: str | None = None, + domain: None | None = None, + imaginaryaxis: None | None = None, + realaxis: None | None = None, **kwargs, ): """ @@ -443,14 +139,11 @@ def __init__( ------- Smith """ - super(Smith, self).__init__("smith") - + super().__init__("smith") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -465,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Smith`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("imaginaryaxis", None) - _v = imaginaryaxis if imaginaryaxis is not None else _v - if _v is not None: - self["imaginaryaxis"] = _v - _v = arg.pop("realaxis", None) - _v = realaxis if realaxis is not None else _v - if _v is not None: - self["realaxis"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("domain", arg, domain) + self._init_provided("imaginaryaxis", arg, imaginaryaxis) + self._init_provided("realaxis", arg, realaxis) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_template.py b/plotly/graph_objs/layout/_template.py index 1f90ba94cb..6b06eb6dbf 100644 --- a/plotly/graph_objs/layout/_template.py +++ b/plotly/graph_objs/layout/_template.py @@ -1,3 +1,6 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy import warnings @@ -5,14 +8,10 @@ class Template(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.template" _valid_props = {"data", "layout"} - # data - # ---- @property def data(self): """ @@ -22,190 +21,6 @@ def data(self): - A dict of string/value properties that will be passed to the Data constructor - Supported dict properties: - - barpolar - A tuple of - :class:`plotly.graph_objects.Barpolar` - instances or dicts with compatible properties - bar - A tuple of :class:`plotly.graph_objects.Bar` - instances or dicts with compatible properties - box - A tuple of :class:`plotly.graph_objects.Box` - instances or dicts with compatible properties - candlestick - A tuple of - :class:`plotly.graph_objects.Candlestick` - instances or dicts with compatible properties - carpet - A tuple of :class:`plotly.graph_objects.Carpet` - instances or dicts with compatible properties - choroplethmapbox - A tuple of - :class:`plotly.graph_objects.Choroplethmapbox` - instances or dicts with compatible properties - choroplethmap - A tuple of - :class:`plotly.graph_objects.Choroplethmap` - instances or dicts with compatible properties - choropleth - A tuple of - :class:`plotly.graph_objects.Choropleth` - instances or dicts with compatible properties - cone - A tuple of :class:`plotly.graph_objects.Cone` - instances or dicts with compatible properties - contourcarpet - A tuple of - :class:`plotly.graph_objects.Contourcarpet` - instances or dicts with compatible properties - contour - A tuple of - :class:`plotly.graph_objects.Contour` instances - or dicts with compatible properties - densitymapbox - A tuple of - :class:`plotly.graph_objects.Densitymapbox` - instances or dicts with compatible properties - densitymap - A tuple of - :class:`plotly.graph_objects.Densitymap` - instances or dicts with compatible properties - funnelarea - A tuple of - :class:`plotly.graph_objects.Funnelarea` - instances or dicts with compatible properties - funnel - A tuple of :class:`plotly.graph_objects.Funnel` - instances or dicts with compatible properties - heatmap - A tuple of - :class:`plotly.graph_objects.Heatmap` instances - or dicts with compatible properties - histogram2dcontour - A tuple of :class:`plotly.graph_objects.Histogr - am2dContour` instances or dicts with compatible - properties - histogram2d - A tuple of - :class:`plotly.graph_objects.Histogram2d` - instances or dicts with compatible properties - histogram - A tuple of - :class:`plotly.graph_objects.Histogram` - instances or dicts with compatible properties - icicle - A tuple of :class:`plotly.graph_objects.Icicle` - instances or dicts with compatible properties - image - A tuple of :class:`plotly.graph_objects.Image` - instances or dicts with compatible properties - indicator - A tuple of - :class:`plotly.graph_objects.Indicator` - instances or dicts with compatible properties - isosurface - A tuple of - :class:`plotly.graph_objects.Isosurface` - instances or dicts with compatible properties - mesh3d - A tuple of :class:`plotly.graph_objects.Mesh3d` - instances or dicts with compatible properties - ohlc - A tuple of :class:`plotly.graph_objects.Ohlc` - instances or dicts with compatible properties - parcats - A tuple of - :class:`plotly.graph_objects.Parcats` instances - or dicts with compatible properties - parcoords - A tuple of - :class:`plotly.graph_objects.Parcoords` - instances or dicts with compatible properties - pie - A tuple of :class:`plotly.graph_objects.Pie` - instances or dicts with compatible properties - sankey - A tuple of :class:`plotly.graph_objects.Sankey` - instances or dicts with compatible properties - scatter3d - A tuple of - :class:`plotly.graph_objects.Scatter3d` - instances or dicts with compatible properties - scattercarpet - A tuple of - :class:`plotly.graph_objects.Scattercarpet` - instances or dicts with compatible properties - scattergeo - A tuple of - :class:`plotly.graph_objects.Scattergeo` - instances or dicts with compatible properties - scattergl - A tuple of - :class:`plotly.graph_objects.Scattergl` - instances or dicts with compatible properties - scattermapbox - A tuple of - :class:`plotly.graph_objects.Scattermapbox` - instances or dicts with compatible properties - scattermap - A tuple of - :class:`plotly.graph_objects.Scattermap` - instances or dicts with compatible properties - scatterpolargl - A tuple of - :class:`plotly.graph_objects.Scatterpolargl` - instances or dicts with compatible properties - scatterpolar - A tuple of - :class:`plotly.graph_objects.Scatterpolar` - instances or dicts with compatible properties - scatter - A tuple of - :class:`plotly.graph_objects.Scatter` instances - or dicts with compatible properties - scattersmith - A tuple of - :class:`plotly.graph_objects.Scattersmith` - instances or dicts with compatible properties - scatterternary - A tuple of - :class:`plotly.graph_objects.Scatterternary` - instances or dicts with compatible properties - splom - A tuple of :class:`plotly.graph_objects.Splom` - instances or dicts with compatible properties - streamtube - A tuple of - :class:`plotly.graph_objects.Streamtube` - instances or dicts with compatible properties - sunburst - A tuple of - :class:`plotly.graph_objects.Sunburst` - instances or dicts with compatible properties - surface - A tuple of - :class:`plotly.graph_objects.Surface` instances - or dicts with compatible properties - table - A tuple of :class:`plotly.graph_objects.Table` - instances or dicts with compatible properties - treemap - A tuple of - :class:`plotly.graph_objects.Treemap` instances - or dicts with compatible properties - violin - A tuple of :class:`plotly.graph_objects.Violin` - instances or dicts with compatible properties - volume - A tuple of :class:`plotly.graph_objects.Volume` - instances or dicts with compatible properties - waterfall - A tuple of - :class:`plotly.graph_objects.Waterfall` - instances or dicts with compatible properties - Returns ------- plotly.graph_objs.layout.template.Data @@ -216,8 +31,6 @@ def data(self): def data(self, val): self["data"] = val - # layout - # ------ @property def layout(self): """ @@ -227,8 +40,6 @@ def layout(self): - A dict of string/value properties that will be passed to the Layout constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.template.Layout @@ -239,8 +50,6 @@ def layout(self): def layout(self, val): self["layout"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -252,7 +61,9 @@ def _prop_descriptions(self): with compatible properties """ - def __init__(self, arg=None, data=None, layout=None, **kwargs): + def __init__( + self, arg=None, data: None | None = None, layout: None | None = None, **kwargs + ): """ Construct a new Template object @@ -293,14 +104,11 @@ def __init__(self, arg=None, data=None, layout=None, **kwargs): ------- Template """ - super(Template, self).__init__("template") - + super().__init__("template") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -315,32 +123,16 @@ def __init__(self, arg=None, data=None, layout=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.Template`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("data", None) - _v = data if data is not None else _v - if _v is not None: - # Template.data contains a 'scattermapbox' key, which causes a - # go.Scattermapbox trace object to be created during validation. - # In order to prevent false deprecation warnings from surfacing, - # we suppress deprecation warnings for this line only. - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", category=DeprecationWarning) - self["data"] = _v - _v = arg.pop("layout", None) - _v = layout if layout is not None else _v - if _v is not None: - self["layout"] = _v - - # Process unknown kwargs - # ---------------------- + # Template.data contains a 'scattermapbox' key, which causes a + # go.Scattermapbox trace object to be created during validation. + # In order to prevent false deprecation warnings from surfacing, + # we suppress deprecation warnings for this line only. + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + self._init_provided("data", arg, data) + self._init_provided("layout", arg, layout) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_ternary.py b/plotly/graph_objs/layout/_ternary.py index 081987aefa..3ded9d8c64 100644 --- a/plotly/graph_objs/layout/_ternary.py +++ b/plotly/graph_objs/layout/_ternary.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Ternary(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.ternary" _valid_props = {"aaxis", "baxis", "bgcolor", "caxis", "domain", "sum", "uirevision"} - # aaxis - # ----- @property def aaxis(self): """ @@ -21,241 +20,6 @@ def aaxis(self): - A dict of string/value properties that will be passed to the Aaxis constructor - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.aaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.aaxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.aax - is.Title` instance or dict with compatible - properties - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. - Returns ------- plotly.graph_objs.layout.ternary.Aaxis @@ -266,8 +30,6 @@ def aaxis(self): def aaxis(self, val): self["aaxis"] = val - # baxis - # ----- @property def baxis(self): """ @@ -277,241 +39,6 @@ def baxis(self): - A dict of string/value properties that will be passed to the Baxis constructor - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.baxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.baxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.bax - is.Title` instance or dict with compatible - properties - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. - Returns ------- plotly.graph_objs.layout.ternary.Baxis @@ -522,8 +49,6 @@ def baxis(self): def baxis(self, val): self["baxis"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -534,42 +59,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -581,8 +71,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # caxis - # ----- @property def caxis(self): """ @@ -592,241 +80,6 @@ def caxis(self): - A dict of string/value properties that will be passed to the Caxis constructor - Supported dict properties: - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.caxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.caxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.caxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.cax - is.Title` instance or dict with compatible - properties - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. - Returns ------- plotly.graph_objs.layout.ternary.Caxis @@ -837,8 +90,6 @@ def caxis(self): def caxis(self, val): self["caxis"] = val - # domain - # ------ @property def domain(self): """ @@ -848,22 +99,6 @@ def domain(self): - A dict of string/value properties that will be passed to the Domain constructor - Supported dict properties: - - column - If there is a layout grid, use the domain for - this column in the grid for this ternary - subplot . - row - If there is a layout grid, use the domain for - this row in the grid for this ternary subplot . - x - Sets the horizontal domain of this ternary - subplot (in plot fraction). - y - Sets the vertical domain of this ternary - subplot (in plot fraction). - Returns ------- plotly.graph_objs.layout.ternary.Domain @@ -874,8 +109,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # sum - # --- @property def sum(self): """ @@ -895,8 +128,6 @@ def sum(self): def sum(self, val): self["sum"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -916,8 +147,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -947,13 +176,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - aaxis=None, - baxis=None, - bgcolor=None, - caxis=None, - domain=None, - sum=None, - uirevision=None, + aaxis: None | None = None, + baxis: None | None = None, + bgcolor: str | None = None, + caxis: None | None = None, + domain: None | None = None, + sum: int | float | None = None, + uirevision: Any | None = None, **kwargs, ): """ @@ -991,14 +220,11 @@ def __init__( ------- Ternary """ - super(Ternary, self).__init__("ternary") - + super().__init__("ternary") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1013,46 +239,15 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Ternary`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("aaxis", None) - _v = aaxis if aaxis is not None else _v - if _v is not None: - self["aaxis"] = _v - _v = arg.pop("baxis", None) - _v = baxis if baxis is not None else _v - if _v is not None: - self["baxis"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("caxis", None) - _v = caxis if caxis is not None else _v - if _v is not None: - self["caxis"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("sum", None) - _v = sum if sum is not None else _v - if _v is not None: - self["sum"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("aaxis", arg, aaxis) + self._init_provided("baxis", arg, baxis) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("caxis", arg, caxis) + self._init_provided("domain", arg, domain) + self._init_provided("sum", arg, sum) + self._init_provided("uirevision", arg, uirevision) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_title.py b/plotly/graph_objs/layout/_title.py index f1500f4c49..2690480e99 100644 --- a/plotly/graph_objs/layout/_title.py +++ b/plotly/graph_objs/layout/_title.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.title" _valid_props = { @@ -22,8 +23,6 @@ class Title(_BaseLayoutHierarchyType): "yref", } - # automargin - # ---------- @property def automargin(self): """ @@ -52,8 +51,6 @@ def automargin(self): def automargin(self, val): self["automargin"] = val - # font - # ---- @property def font(self): """ @@ -65,52 +62,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.title.Font @@ -121,8 +72,6 @@ def font(self): def font(self, val): self["font"] = val - # pad - # --- @property def pad(self): """ @@ -139,21 +88,6 @@ def pad(self): - A dict of string/value properties that will be passed to the Pad constructor - Supported dict properties: - - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. - Returns ------- plotly.graph_objs.layout.title.Pad @@ -164,8 +98,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # subtitle - # -------- @property def subtitle(self): """ @@ -175,13 +107,6 @@ def subtitle(self): - A dict of string/value properties that will be passed to the Subtitle constructor - Supported dict properties: - - font - Sets the subtitle font. - text - Sets the plot's subtitle. - Returns ------- plotly.graph_objs.layout.title.Subtitle @@ -192,8 +117,6 @@ def subtitle(self): def subtitle(self, val): self["subtitle"] = val - # text - # ---- @property def text(self): """ @@ -213,8 +136,6 @@ def text(self): def text(self, val): self["text"] = val - # x - # - @property def x(self): """ @@ -234,8 +155,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -260,8 +179,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xref - # ---- @property def xref(self): """ @@ -283,8 +200,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -306,8 +221,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -332,8 +245,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # yref - # ---- @property def yref(self): """ @@ -355,8 +266,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -423,17 +332,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - automargin=None, - font=None, - pad=None, - subtitle=None, - text=None, - x=None, - xanchor=None, - xref=None, - y=None, - yanchor=None, - yref=None, + automargin: bool | None = None, + font: None | None = None, + pad: None | None = None, + subtitle: None | None = None, + text: str | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -507,14 +416,11 @@ def __init__( ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -529,62 +435,19 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("automargin", None) - _v = automargin if automargin is not None else _v - if _v is not None: - self["automargin"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("subtitle", None) - _v = subtitle if subtitle is not None else _v - if _v is not None: - self["subtitle"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("automargin", arg, automargin) + self._init_provided("font", arg, font) + self._init_provided("pad", arg, pad) + self._init_provided("subtitle", arg, subtitle) + self._init_provided("text", arg, text) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_transition.py b/plotly/graph_objs/layout/_transition.py index 63b3c71b3c..eb7acb8d7e 100644 --- a/plotly/graph_objs/layout/_transition.py +++ b/plotly/graph_objs/layout/_transition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Transition(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.transition" _valid_props = {"duration", "easing", "ordering"} - # duration - # -------- @property def duration(self): """ @@ -31,8 +30,6 @@ def duration(self): def duration(self, val): self["duration"] = val - # easing - # ------ @property def easing(self): """ @@ -60,8 +57,6 @@ def easing(self): def easing(self, val): self["easing"] = val - # ordering - # -------- @property def ordering(self): """ @@ -83,8 +78,6 @@ def ordering(self): def ordering(self, val): self["ordering"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -99,7 +92,14 @@ def _prop_descriptions(self): traces and layout change. """ - def __init__(self, arg=None, duration=None, easing=None, ordering=None, **kwargs): + def __init__( + self, + arg=None, + duration: int | float | None = None, + easing: Any | None = None, + ordering: Any | None = None, + **kwargs, + ): """ Construct a new Transition object @@ -125,14 +125,11 @@ def __init__(self, arg=None, duration=None, easing=None, ordering=None, **kwargs ------- Transition """ - super(Transition, self).__init__("transition") - + super().__init__("transition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -147,30 +144,11 @@ def __init__(self, arg=None, duration=None, easing=None, ordering=None, **kwargs an instance of :class:`plotly.graph_objs.layout.Transition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("duration", None) - _v = duration if duration is not None else _v - if _v is not None: - self["duration"] = _v - _v = arg.pop("easing", None) - _v = easing if easing is not None else _v - if _v is not None: - self["easing"] = _v - _v = arg.pop("ordering", None) - _v = ordering if ordering is not None else _v - if _v is not None: - self["ordering"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("duration", arg, duration) + self._init_provided("easing", arg, easing) + self._init_provided("ordering", arg, ordering) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_uniformtext.py b/plotly/graph_objs/layout/_uniformtext.py index 1292524e0f..0cd292b5ce 100644 --- a/plotly/graph_objs/layout/_uniformtext.py +++ b/plotly/graph_objs/layout/_uniformtext.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Uniformtext(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.uniformtext" _valid_props = {"minsize", "mode"} - # minsize - # ------- @property def minsize(self): """ @@ -30,8 +29,6 @@ def minsize(self): def minsize(self, val): self["minsize"] = val - # mode - # ---- @property def mode(self): """ @@ -58,8 +55,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +72,13 @@ def _prop_descriptions(self): defined by trace, then the `minsize` is used. """ - def __init__(self, arg=None, minsize=None, mode=None, **kwargs): + def __init__( + self, + arg=None, + minsize: int | float | None = None, + mode: Any | None = None, + **kwargs, + ): """ Construct a new Uniformtext object @@ -104,14 +105,11 @@ def __init__(self, arg=None, minsize=None, mode=None, **kwargs): ------- Uniformtext """ - super(Uniformtext, self).__init__("uniformtext") - + super().__init__("uniformtext") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +124,10 @@ def __init__(self, arg=None, minsize=None, mode=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.Uniformtext`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("minsize", None) - _v = minsize if minsize is not None else _v - if _v is not None: - self["minsize"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("minsize", arg, minsize) + self._init_provided("mode", arg, mode) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_updatemenu.py b/plotly/graph_objs/layout/_updatemenu.py index b12c165844..2d362c5b27 100644 --- a/plotly/graph_objs/layout/_updatemenu.py +++ b/plotly/graph_objs/layout/_updatemenu.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Updatemenu(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.updatemenu" _valid_props = { @@ -29,8 +30,6 @@ class Updatemenu(_BaseLayoutHierarchyType): "yanchor", } - # active - # ------ @property def active(self): """ @@ -51,8 +50,6 @@ def active(self): def active(self, val): self["active"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -63,42 +60,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -110,8 +72,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -122,42 +82,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +94,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -189,8 +112,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # buttons - # ------- @property def buttons(self): """ @@ -200,62 +121,6 @@ def buttons(self): - A list or tuple of dicts of string/value properties that will be passed to the Button constructor - Supported dict properties: - - args - Sets the arguments values to be passed to the - Plotly method set in `method` on click. - args2 - Sets a 2nd set of `args`, these arguments - values are passed to the Plotly method set in - `method` when clicking this button while in the - active state. Use this to create toggle - buttons. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_buttonclicked` method and executing the - API command manually without losing the benefit - of the updatemenu automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the button. - method - Sets the Plotly method to be called on click. - If the `skip` method is used, the API - updatemenu will function as normal but will - perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to updatemenu events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. - Returns ------- tuple[plotly.graph_objs.layout.updatemenu.Button] @@ -266,8 +131,6 @@ def buttons(self): def buttons(self, val): self["buttons"] = val - # buttondefaults - # -------------- @property def buttondefaults(self): """ @@ -282,8 +145,6 @@ def buttondefaults(self): - A dict of string/value properties that will be passed to the Button constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.updatemenu.Button @@ -294,8 +155,6 @@ def buttondefaults(self): def buttondefaults(self, val): self["buttondefaults"] = val - # direction - # --------- @property def direction(self): """ @@ -318,8 +177,6 @@ def direction(self): def direction(self, val): self["direction"] = val - # font - # ---- @property def font(self): """ @@ -331,52 +188,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.updatemenu.Font @@ -387,8 +198,6 @@ def font(self): def font(self, val): self["font"] = val - # name - # ---- @property def name(self): """ @@ -414,8 +223,6 @@ def name(self): def name(self, val): self["name"] = val - # pad - # --- @property def pad(self): """ @@ -427,21 +234,6 @@ def pad(self): - A dict of string/value properties that will be passed to the Pad constructor - Supported dict properties: - - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. - Returns ------- plotly.graph_objs.layout.updatemenu.Pad @@ -452,8 +244,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # showactive - # ---------- @property def showactive(self): """ @@ -472,8 +262,6 @@ def showactive(self): def showactive(self, val): self["showactive"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -500,8 +288,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # type - # ---- @property def type(self): """ @@ -523,8 +309,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -543,8 +327,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -564,8 +346,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -587,8 +367,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # y - # - @property def y(self): """ @@ -608,8 +386,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -631,8 +407,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -712,24 +486,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - active=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - buttons=None, - buttondefaults=None, - direction=None, - font=None, - name=None, - pad=None, - showactive=None, - templateitemname=None, - type=None, - visible=None, - x=None, - xanchor=None, - y=None, - yanchor=None, + active: int | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + buttons: None | None = None, + buttondefaults: None | None = None, + direction: Any | None = None, + font: None | None = None, + name: str | None = None, + pad: None | None = None, + showactive: bool | None = None, + templateitemname: str | None = None, + type: Any | None = None, + visible: bool | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, **kwargs, ): """ @@ -817,14 +591,11 @@ def __init__( ------- Updatemenu """ - super(Updatemenu, self).__init__("updatemenus") - + super().__init__("updatemenus") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -839,90 +610,26 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.Updatemenu`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("active", None) - _v = active if active is not None else _v - if _v is not None: - self["active"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("buttons", None) - _v = buttons if buttons is not None else _v - if _v is not None: - self["buttons"] = _v - _v = arg.pop("buttondefaults", None) - _v = buttondefaults if buttondefaults is not None else _v - if _v is not None: - self["buttondefaults"] = _v - _v = arg.pop("direction", None) - _v = direction if direction is not None else _v - if _v is not None: - self["direction"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("showactive", None) - _v = showactive if showactive is not None else _v - if _v is not None: - self["showactive"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("active", arg, active) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("buttons", arg, buttons) + self._init_provided("buttondefaults", arg, buttondefaults) + self._init_provided("direction", arg, direction) + self._init_provided("font", arg, font) + self._init_provided("name", arg, name) + self._init_provided("pad", arg, pad) + self._init_provided("showactive", arg, showactive) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_xaxis.py b/plotly/graph_objs/layout/_xaxis.py index 65d73f38e0..a0edd668e5 100644 --- a/plotly/graph_objs/layout/_xaxis.py +++ b/plotly/graph_objs/layout/_xaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class XAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.xaxis" _valid_props = { @@ -104,8 +105,6 @@ class XAxis(_BaseLayoutHierarchyType): "zerolinewidth", } - # anchor - # ------ @property def anchor(self): """ @@ -130,8 +129,6 @@ def anchor(self): def anchor(self, val): self["anchor"] = val - # automargin - # ---------- @property def automargin(self): """ @@ -154,8 +151,6 @@ def automargin(self): def automargin(self, val): self["automargin"] = val - # autorange - # --------- @property def autorange(self): """ @@ -185,8 +180,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autorangeoptions - # ---------------- @property def autorangeoptions(self): """ @@ -196,26 +189,6 @@ def autorangeoptions(self): - A dict of string/value properties that will be passed to the Autorangeoptions constructor - Supported dict properties: - - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. - Returns ------- plotly.graph_objs.layout.xaxis.Autorangeoptions @@ -226,8 +199,6 @@ def autorangeoptions(self): def autorangeoptions(self, val): self["autorangeoptions"] = val - # autotickangles - # -------------- @property def autotickangles(self): """ @@ -252,8 +223,6 @@ def autotickangles(self): def autotickangles(self, val): self["autotickangles"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -276,8 +245,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # calendar - # -------- @property def calendar(self): """ @@ -303,8 +270,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -317,7 +282,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -325,8 +290,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -346,8 +309,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -387,8 +348,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -402,42 +361,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -449,8 +373,6 @@ def color(self): def color(self, val): self["color"] = val - # constrain - # --------- @property def constrain(self): """ @@ -474,8 +396,6 @@ def constrain(self): def constrain(self, val): self["constrain"] = val - # constraintoward - # --------------- @property def constraintoward(self): """ @@ -500,8 +420,6 @@ def constraintoward(self): def constraintoward(self, val): self["constraintoward"] = val - # dividercolor - # ------------ @property def dividercolor(self): """ @@ -513,42 +431,7 @@ def dividercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -560,8 +443,6 @@ def dividercolor(self): def dividercolor(self, val): self["dividercolor"] = val - # dividerwidth - # ------------ @property def dividerwidth(self): """ @@ -581,8 +462,6 @@ def dividerwidth(self): def dividerwidth(self, val): self["dividerwidth"] = val - # domain - # ------ @property def domain(self): """ @@ -606,8 +485,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # dtick - # ----- @property def dtick(self): """ @@ -644,8 +521,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -669,8 +544,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # fixedrange - # ---------- @property def fixedrange(self): """ @@ -690,8 +563,6 @@ def fixedrange(self): def fixedrange(self, val): self["fixedrange"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -702,42 +573,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -749,8 +585,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -775,8 +609,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -795,8 +627,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -825,8 +655,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # insiderange - # ----------- @property def insiderange(self): """ @@ -851,8 +679,6 @@ def insiderange(self): def insiderange(self, val): self["insiderange"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -878,8 +704,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -904,8 +728,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -916,42 +738,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -963,8 +750,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -983,8 +768,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # matches - # ------- @property def matches(self): """ @@ -1011,8 +794,6 @@ def matches(self): def matches(self, val): self["matches"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -1030,8 +811,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -1049,8 +828,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -1070,8 +847,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # minor - # ----- @property def minor(self): """ @@ -1081,97 +856,6 @@ def minor(self): - A dict of string/value properties that will be passed to the Minor constructor - Supported dict properties: - - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickcolor - Sets the tick color. - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - Returns ------- plotly.graph_objs.layout.xaxis.Minor @@ -1182,8 +866,6 @@ def minor(self): def minor(self, val): self["minor"] = val - # mirror - # ------ @property def mirror(self): """ @@ -1208,8 +890,6 @@ def mirror(self): def mirror(self, val): self["mirror"] = val - # nticks - # ------ @property def nticks(self): """ @@ -1232,8 +912,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # overlaying - # ---------- @property def overlaying(self): """ @@ -1260,8 +938,6 @@ def overlaying(self): def overlaying(self, val): self["overlaying"] = val - # position - # -------- @property def position(self): """ @@ -1282,8 +958,6 @@ def position(self): def position(self, val): self["position"] = val - # range - # ----- @property def range(self): """ @@ -1314,8 +988,6 @@ def range(self): def range(self, val): self["range"] = val - # rangebreaks - # ----------- @property def rangebreaks(self): """ @@ -1325,60 +997,6 @@ def rangebreaks(self): - A list or tuple of dicts of string/value properties that will be passed to the Rangebreak constructor - Supported dict properties: - - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. - Returns ------- tuple[plotly.graph_objs.layout.xaxis.Rangebreak] @@ -1389,8 +1007,6 @@ def rangebreaks(self): def rangebreaks(self, val): self["rangebreaks"] = val - # rangebreakdefaults - # ------------------ @property def rangebreakdefaults(self): """ @@ -1405,8 +1021,6 @@ def rangebreakdefaults(self): - A dict of string/value properties that will be passed to the Rangebreak constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.xaxis.Rangebreak @@ -1417,13 +1031,11 @@ def rangebreakdefaults(self): def rangebreakdefaults(self, val): self["rangebreakdefaults"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -1442,8 +1054,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # rangeselector - # ------------- @property def rangeselector(self): """ @@ -1453,54 +1063,6 @@ def rangeselector(self): - A dict of string/value properties that will be passed to the Rangeselector constructor - Supported dict properties: - - activecolor - Sets the background color of the active range - selector button. - bgcolor - Sets the background color of the range selector - buttons. - bordercolor - Sets the color of the border enclosing the - range selector. - borderwidth - Sets the width (in px) of the border enclosing - the range selector. - buttons - Sets the specifications for each buttons. By - default, a range selector comes with no - buttons. - buttondefaults - When used in a template (as layout.template.lay - out.xaxis.rangeselector.buttondefaults), sets - the default property values to use for elements - of layout.xaxis.rangeselector.buttons - font - Sets the font of the range selector button - text. - visible - Determines whether or not this range selector - is visible. Note that range selectors are only - available for x axes of `type` set to or auto- - typed to "date". - x - Sets the x position (in normalized coordinates) - of the range selector. - xanchor - Sets the range selector's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the range selector. - yanchor - Sets the range selector's vertical position - anchor This anchor binds the `y` position to - the "top", "middle" or "bottom" of the range - selector. - Returns ------- plotly.graph_objs.layout.xaxis.Rangeselector @@ -1511,8 +1073,6 @@ def rangeselector(self): def rangeselector(self, val): self["rangeselector"] = val - # rangeslider - # ----------- @property def rangeslider(self): """ @@ -1522,43 +1082,6 @@ def rangeslider(self): - A dict of string/value properties that will be passed to the Rangeslider constructor - Supported dict properties: - - autorange - Determines whether or not the range slider - range is computed in relation to the input - data. If `range` is provided, then `autorange` - is set to False. - bgcolor - Sets the background color of the range slider. - bordercolor - Sets the border color of the range slider. - borderwidth - Sets the border width of the range slider. - range - Sets the range of the range slider. If not set, - defaults to the full xaxis range. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - thickness - The height of the range slider as a fraction of - the total plot area height. - visible - Determines whether or not the range slider will - be visible. If visible, perpendicular axes will - be set to `fixedrange` - yaxis - :class:`plotly.graph_objects.layout.xaxis.range - slider.YAxis` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.layout.xaxis.Rangeslider @@ -1569,8 +1092,6 @@ def rangeslider(self): def rangeslider(self, val): self["rangeslider"] = val - # scaleanchor - # ----------- @property def scaleanchor(self): """ @@ -1614,8 +1135,6 @@ def scaleanchor(self): def scaleanchor(self, val): self["scaleanchor"] = val - # scaleratio - # ---------- @property def scaleratio(self): """ @@ -1639,8 +1158,6 @@ def scaleratio(self): def scaleratio(self, val): self["scaleratio"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -1659,8 +1176,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showdividers - # ------------ @property def showdividers(self): """ @@ -1681,8 +1196,6 @@ def showdividers(self): def showdividers(self, val): self["showdividers"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -1705,8 +1218,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -1726,8 +1237,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -1746,8 +1255,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showspikes - # ---------- @property def showspikes(self): """ @@ -1768,8 +1275,6 @@ def showspikes(self): def showspikes(self, val): self["showspikes"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1788,8 +1293,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1812,8 +1315,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1833,8 +1334,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # side - # ---- @property def side(self): """ @@ -1855,8 +1354,6 @@ def side(self): def side(self, val): self["side"] = val - # spikecolor - # ---------- @property def spikecolor(self): """ @@ -1867,42 +1364,7 @@ def spikecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1914,8 +1376,6 @@ def spikecolor(self): def spikecolor(self, val): self["spikecolor"] = val - # spikedash - # --------- @property def spikedash(self): """ @@ -1940,8 +1400,6 @@ def spikedash(self): def spikedash(self, val): self["spikedash"] = val - # spikemode - # --------- @property def spikemode(self): """ @@ -1966,8 +1424,6 @@ def spikemode(self): def spikemode(self, val): self["spikemode"] = val - # spikesnap - # --------- @property def spikesnap(self): """ @@ -1988,8 +1444,6 @@ def spikesnap(self): def spikesnap(self, val): self["spikesnap"] = val - # spikethickness - # -------------- @property def spikethickness(self): """ @@ -2008,8 +1462,6 @@ def spikethickness(self): def spikethickness(self, val): self["spikethickness"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -2035,8 +1487,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -2059,8 +1509,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -2071,42 +1519,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -2118,8 +1531,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -2131,52 +1542,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.xaxis.Tickfont @@ -2187,8 +1552,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -2217,8 +1580,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -2228,42 +1589,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.xaxis.Tickformatstop] @@ -2274,8 +1599,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -2290,8 +1613,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.xaxis.Tickformatstop @@ -2302,8 +1623,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelindex - # -------------- @property def ticklabelindex(self): """ @@ -2322,7 +1641,7 @@ def ticklabelindex(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["ticklabelindex"] @@ -2330,8 +1649,6 @@ def ticklabelindex(self): def ticklabelindex(self, val): self["ticklabelindex"] = val - # ticklabelindexsrc - # ----------------- @property def ticklabelindexsrc(self): """ @@ -2351,8 +1668,6 @@ def ticklabelindexsrc(self): def ticklabelindexsrc(self, val): self["ticklabelindexsrc"] = val - # ticklabelmode - # ------------- @property def ticklabelmode(self): """ @@ -2375,8 +1690,6 @@ def ticklabelmode(self): def ticklabelmode(self, val): self["ticklabelmode"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -2400,8 +1713,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -2430,8 +1741,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelshift - # -------------- @property def ticklabelshift(self): """ @@ -2452,8 +1761,6 @@ def ticklabelshift(self): def ticklabelshift(self, val): self["ticklabelshift"] = val - # ticklabelstandoff - # ----------------- @property def ticklabelstandoff(self): """ @@ -2480,8 +1787,6 @@ def ticklabelstandoff(self): def ticklabelstandoff(self, val): self["ticklabelstandoff"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -2506,8 +1811,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -2526,8 +1829,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -2555,8 +1856,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -2576,8 +1875,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -2599,8 +1896,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # tickson - # ------- @property def tickson(self): """ @@ -2624,8 +1919,6 @@ def tickson(self): def tickson(self, val): self["tickson"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -2645,8 +1938,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -2659,7 +1950,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -2667,8 +1958,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -2687,8 +1976,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -2700,7 +1987,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -2708,8 +1995,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -2728,8 +2013,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -2748,8 +2031,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -2759,25 +2040,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.xaxis.Title @@ -2788,8 +2050,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -2812,8 +2072,6 @@ def type(self): def type(self, val): self["type"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -2833,8 +2091,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -2855,8 +2111,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # zeroline - # -------- @property def zeroline(self): """ @@ -2877,8 +2131,6 @@ def zeroline(self): def zeroline(self, val): self["zeroline"] = val - # zerolinecolor - # ------------- @property def zerolinecolor(self): """ @@ -2889,42 +2141,7 @@ def zerolinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -2936,8 +2153,6 @@ def zerolinecolor(self): def zerolinecolor(self, val): self["zerolinecolor"] = val - # zerolinewidth - # ------------- @property def zerolinewidth(self): """ @@ -2956,8 +2171,6 @@ def zerolinewidth(self): def zerolinewidth(self, val): self["zerolinewidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -3202,7 +2415,7 @@ def _prop_descriptions(self): layout.xaxis.rangebreaks rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -3472,99 +2685,99 @@ def _prop_descriptions(self): def __init__( self, arg=None, - anchor=None, - automargin=None, - autorange=None, - autorangeoptions=None, - autotickangles=None, - autotypenumbers=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - constrain=None, - constraintoward=None, - dividercolor=None, - dividerwidth=None, - domain=None, - dtick=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - insiderange=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - matches=None, - maxallowed=None, - minallowed=None, - minexponent=None, - minor=None, - mirror=None, - nticks=None, - overlaying=None, - position=None, - range=None, - rangebreaks=None, - rangebreakdefaults=None, - rangemode=None, - rangeselector=None, - rangeslider=None, - scaleanchor=None, - scaleratio=None, - separatethousands=None, - showdividers=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - spikecolor=None, - spikedash=None, - spikemode=None, - spikesnap=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelindex=None, - ticklabelindexsrc=None, - ticklabelmode=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelshift=None, - ticklabelstandoff=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - tickson=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - type=None, - uirevision=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, + anchor: Any | None = None, + automargin: Any | None = None, + autorange: Any | None = None, + autorangeoptions: None | None = None, + autotickangles: list | None = None, + autotypenumbers: Any | None = None, + calendar: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + constrain: Any | None = None, + constraintoward: Any | None = None, + dividercolor: str | None = None, + dividerwidth: int | float | None = None, + domain: list | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + fixedrange: bool | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + insiderange: list | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + matches: Any | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, + minexponent: int | float | None = None, + minor: None | None = None, + mirror: Any | None = None, + nticks: int | None = None, + overlaying: Any | None = None, + position: int | float | None = None, + range: list | None = None, + rangebreaks: None | None = None, + rangebreakdefaults: None | None = None, + rangemode: Any | None = None, + rangeselector: None | None = None, + rangeslider: None | None = None, + scaleanchor: Any | None = None, + scaleratio: int | float | None = None, + separatethousands: bool | None = None, + showdividers: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showspikes: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + side: Any | None = None, + spikecolor: str | None = None, + spikedash: str | None = None, + spikemode: Any | None = None, + spikesnap: Any | None = None, + spikethickness: int | float | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelindex: int | None = None, + ticklabelindexsrc: str | None = None, + ticklabelmode: Any | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelshift: int | None = None, + ticklabelstandoff: int | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + tickson: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + type: Any | None = None, + uirevision: Any | None = None, + visible: bool | None = None, + zeroline: bool | None = None, + zerolinecolor: str | None = None, + zerolinewidth: int | float | None = None, **kwargs, ): """ @@ -3816,7 +3029,7 @@ def __init__( layout.xaxis.rangebreaks rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -4086,14 +3299,11 @@ def __init__( ------- XAxis """ - super(XAxis, self).__init__("xaxis") - + super().__init__("xaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -4108,390 +3318,101 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.XAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("anchor", None) - _v = anchor if anchor is not None else _v - if _v is not None: - self["anchor"] = _v - _v = arg.pop("automargin", None) - _v = automargin if automargin is not None else _v - if _v is not None: - self["automargin"] = _v - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autorangeoptions", None) - _v = autorangeoptions if autorangeoptions is not None else _v - if _v is not None: - self["autorangeoptions"] = _v - _v = arg.pop("autotickangles", None) - _v = autotickangles if autotickangles is not None else _v - if _v is not None: - self["autotickangles"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("constrain", None) - _v = constrain if constrain is not None else _v - if _v is not None: - self["constrain"] = _v - _v = arg.pop("constraintoward", None) - _v = constraintoward if constraintoward is not None else _v - if _v is not None: - self["constraintoward"] = _v - _v = arg.pop("dividercolor", None) - _v = dividercolor if dividercolor is not None else _v - if _v is not None: - self["dividercolor"] = _v - _v = arg.pop("dividerwidth", None) - _v = dividerwidth if dividerwidth is not None else _v - if _v is not None: - self["dividerwidth"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("fixedrange", None) - _v = fixedrange if fixedrange is not None else _v - if _v is not None: - self["fixedrange"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("insiderange", None) - _v = insiderange if insiderange is not None else _v - if _v is not None: - self["insiderange"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("matches", None) - _v = matches if matches is not None else _v - if _v is not None: - self["matches"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("minor", None) - _v = minor if minor is not None else _v - if _v is not None: - self["minor"] = _v - _v = arg.pop("mirror", None) - _v = mirror if mirror is not None else _v - if _v is not None: - self["mirror"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("overlaying", None) - _v = overlaying if overlaying is not None else _v - if _v is not None: - self["overlaying"] = _v - _v = arg.pop("position", None) - _v = position if position is not None else _v - if _v is not None: - self["position"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangebreaks", None) - _v = rangebreaks if rangebreaks is not None else _v - if _v is not None: - self["rangebreaks"] = _v - _v = arg.pop("rangebreakdefaults", None) - _v = rangebreakdefaults if rangebreakdefaults is not None else _v - if _v is not None: - self["rangebreakdefaults"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("rangeselector", None) - _v = rangeselector if rangeselector is not None else _v - if _v is not None: - self["rangeselector"] = _v - _v = arg.pop("rangeslider", None) - _v = rangeslider if rangeslider is not None else _v - if _v is not None: - self["rangeslider"] = _v - _v = arg.pop("scaleanchor", None) - _v = scaleanchor if scaleanchor is not None else _v - if _v is not None: - self["scaleanchor"] = _v - _v = arg.pop("scaleratio", None) - _v = scaleratio if scaleratio is not None else _v - if _v is not None: - self["scaleratio"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showdividers", None) - _v = showdividers if showdividers is not None else _v - if _v is not None: - self["showdividers"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showspikes", None) - _v = showspikes if showspikes is not None else _v - if _v is not None: - self["showspikes"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("spikecolor", None) - _v = spikecolor if spikecolor is not None else _v - if _v is not None: - self["spikecolor"] = _v - _v = arg.pop("spikedash", None) - _v = spikedash if spikedash is not None else _v - if _v is not None: - self["spikedash"] = _v - _v = arg.pop("spikemode", None) - _v = spikemode if spikemode is not None else _v - if _v is not None: - self["spikemode"] = _v - _v = arg.pop("spikesnap", None) - _v = spikesnap if spikesnap is not None else _v - if _v is not None: - self["spikesnap"] = _v - _v = arg.pop("spikethickness", None) - _v = spikethickness if spikethickness is not None else _v - if _v is not None: - self["spikethickness"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelindex", None) - _v = ticklabelindex if ticklabelindex is not None else _v - if _v is not None: - self["ticklabelindex"] = _v - _v = arg.pop("ticklabelindexsrc", None) - _v = ticklabelindexsrc if ticklabelindexsrc is not None else _v - if _v is not None: - self["ticklabelindexsrc"] = _v - _v = arg.pop("ticklabelmode", None) - _v = ticklabelmode if ticklabelmode is not None else _v - if _v is not None: - self["ticklabelmode"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelshift", None) - _v = ticklabelshift if ticklabelshift is not None else _v - if _v is not None: - self["ticklabelshift"] = _v - _v = arg.pop("ticklabelstandoff", None) - _v = ticklabelstandoff if ticklabelstandoff is not None else _v - if _v is not None: - self["ticklabelstandoff"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("tickson", None) - _v = tickson if tickson is not None else _v - if _v is not None: - self["tickson"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("zeroline", None) - _v = zeroline if zeroline is not None else _v - if _v is not None: - self["zeroline"] = _v - _v = arg.pop("zerolinecolor", None) - _v = zerolinecolor if zerolinecolor is not None else _v - if _v is not None: - self["zerolinecolor"] = _v - _v = arg.pop("zerolinewidth", None) - _v = zerolinewidth if zerolinewidth is not None else _v - if _v is not None: - self["zerolinewidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("anchor", arg, anchor) + self._init_provided("automargin", arg, automargin) + self._init_provided("autorange", arg, autorange) + self._init_provided("autorangeoptions", arg, autorangeoptions) + self._init_provided("autotickangles", arg, autotickangles) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("calendar", arg, calendar) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("constrain", arg, constrain) + self._init_provided("constraintoward", arg, constraintoward) + self._init_provided("dividercolor", arg, dividercolor) + self._init_provided("dividerwidth", arg, dividerwidth) + self._init_provided("domain", arg, domain) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("fixedrange", arg, fixedrange) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("insiderange", arg, insiderange) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("matches", arg, matches) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("minor", arg, minor) + self._init_provided("mirror", arg, mirror) + self._init_provided("nticks", arg, nticks) + self._init_provided("overlaying", arg, overlaying) + self._init_provided("position", arg, position) + self._init_provided("range", arg, range) + self._init_provided("rangebreaks", arg, rangebreaks) + self._init_provided("rangebreakdefaults", arg, rangebreakdefaults) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("rangeselector", arg, rangeselector) + self._init_provided("rangeslider", arg, rangeslider) + self._init_provided("scaleanchor", arg, scaleanchor) + self._init_provided("scaleratio", arg, scaleratio) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showdividers", arg, showdividers) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showspikes", arg, showspikes) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("side", arg, side) + self._init_provided("spikecolor", arg, spikecolor) + self._init_provided("spikedash", arg, spikedash) + self._init_provided("spikemode", arg, spikemode) + self._init_provided("spikesnap", arg, spikesnap) + self._init_provided("spikethickness", arg, spikethickness) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelindex", arg, ticklabelindex) + self._init_provided("ticklabelindexsrc", arg, ticklabelindexsrc) + self._init_provided("ticklabelmode", arg, ticklabelmode) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelshift", arg, ticklabelshift) + self._init_provided("ticklabelstandoff", arg, ticklabelstandoff) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("tickson", arg, tickson) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("zeroline", arg, zeroline) + self._init_provided("zerolinecolor", arg, zerolinecolor) + self._init_provided("zerolinewidth", arg, zerolinewidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/_yaxis.py b/plotly/graph_objs/layout/_yaxis.py index c3deb7fbe0..d8deb16481 100644 --- a/plotly/graph_objs/layout/_yaxis.py +++ b/plotly/graph_objs/layout/_yaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class YAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout" _path_str = "layout.yaxis" _valid_props = { @@ -104,8 +105,6 @@ class YAxis(_BaseLayoutHierarchyType): "zerolinewidth", } - # anchor - # ------ @property def anchor(self): """ @@ -130,8 +129,6 @@ def anchor(self): def anchor(self, val): self["anchor"] = val - # automargin - # ---------- @property def automargin(self): """ @@ -154,8 +151,6 @@ def automargin(self): def automargin(self, val): self["automargin"] = val - # autorange - # --------- @property def autorange(self): """ @@ -185,8 +180,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autorangeoptions - # ---------------- @property def autorangeoptions(self): """ @@ -196,26 +189,6 @@ def autorangeoptions(self): - A dict of string/value properties that will be passed to the Autorangeoptions constructor - Supported dict properties: - - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. - Returns ------- plotly.graph_objs.layout.yaxis.Autorangeoptions @@ -226,8 +199,6 @@ def autorangeoptions(self): def autorangeoptions(self, val): self["autorangeoptions"] = val - # autoshift - # --------- @property def autoshift(self): """ @@ -250,8 +221,6 @@ def autoshift(self): def autoshift(self, val): self["autoshift"] = val - # autotickangles - # -------------- @property def autotickangles(self): """ @@ -276,8 +245,6 @@ def autotickangles(self): def autotickangles(self, val): self["autotickangles"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -300,8 +267,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # calendar - # -------- @property def calendar(self): """ @@ -327,8 +292,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -341,7 +304,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -349,8 +312,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -370,8 +331,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -411,8 +370,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -426,42 +383,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -473,8 +395,6 @@ def color(self): def color(self, val): self["color"] = val - # constrain - # --------- @property def constrain(self): """ @@ -498,8 +418,6 @@ def constrain(self): def constrain(self, val): self["constrain"] = val - # constraintoward - # --------------- @property def constraintoward(self): """ @@ -524,8 +442,6 @@ def constraintoward(self): def constraintoward(self, val): self["constraintoward"] = val - # dividercolor - # ------------ @property def dividercolor(self): """ @@ -537,42 +453,7 @@ def dividercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -584,8 +465,6 @@ def dividercolor(self): def dividercolor(self, val): self["dividercolor"] = val - # dividerwidth - # ------------ @property def dividerwidth(self): """ @@ -605,8 +484,6 @@ def dividerwidth(self): def dividerwidth(self, val): self["dividerwidth"] = val - # domain - # ------ @property def domain(self): """ @@ -630,8 +507,6 @@ def domain(self): def domain(self, val): self["domain"] = val - # dtick - # ----- @property def dtick(self): """ @@ -668,8 +543,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -693,8 +566,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # fixedrange - # ---------- @property def fixedrange(self): """ @@ -714,8 +585,6 @@ def fixedrange(self): def fixedrange(self, val): self["fixedrange"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -726,42 +595,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -773,8 +607,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -799,8 +631,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -819,8 +649,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -849,8 +677,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # insiderange - # ----------- @property def insiderange(self): """ @@ -875,8 +701,6 @@ def insiderange(self): def insiderange(self, val): self["insiderange"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -902,8 +726,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -928,8 +750,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -940,42 +760,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -987,8 +772,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -1007,8 +790,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # matches - # ------- @property def matches(self): """ @@ -1035,8 +816,6 @@ def matches(self): def matches(self, val): self["matches"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -1054,8 +833,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -1073,8 +850,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -1094,8 +869,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # minor - # ----- @property def minor(self): """ @@ -1105,97 +878,6 @@ def minor(self): - A dict of string/value properties that will be passed to the Minor constructor - Supported dict properties: - - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickcolor - Sets the tick color. - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - Returns ------- plotly.graph_objs.layout.yaxis.Minor @@ -1206,8 +888,6 @@ def minor(self): def minor(self, val): self["minor"] = val - # mirror - # ------ @property def mirror(self): """ @@ -1232,8 +912,6 @@ def mirror(self): def mirror(self, val): self["mirror"] = val - # nticks - # ------ @property def nticks(self): """ @@ -1256,8 +934,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # overlaying - # ---------- @property def overlaying(self): """ @@ -1284,8 +960,6 @@ def overlaying(self): def overlaying(self, val): self["overlaying"] = val - # position - # -------- @property def position(self): """ @@ -1306,8 +980,6 @@ def position(self): def position(self, val): self["position"] = val - # range - # ----- @property def range(self): """ @@ -1338,8 +1010,6 @@ def range(self): def range(self, val): self["range"] = val - # rangebreaks - # ----------- @property def rangebreaks(self): """ @@ -1349,60 +1019,6 @@ def rangebreaks(self): - A list or tuple of dicts of string/value properties that will be passed to the Rangebreak constructor - Supported dict properties: - - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. - Returns ------- tuple[plotly.graph_objs.layout.yaxis.Rangebreak] @@ -1413,8 +1029,6 @@ def rangebreaks(self): def rangebreaks(self, val): self["rangebreaks"] = val - # rangebreakdefaults - # ------------------ @property def rangebreakdefaults(self): """ @@ -1429,8 +1043,6 @@ def rangebreakdefaults(self): - A dict of string/value properties that will be passed to the Rangebreak constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.yaxis.Rangebreak @@ -1441,13 +1053,11 @@ def rangebreakdefaults(self): def rangebreakdefaults(self, val): self["rangebreakdefaults"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -1466,8 +1076,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # scaleanchor - # ----------- @property def scaleanchor(self): """ @@ -1511,8 +1119,6 @@ def scaleanchor(self): def scaleanchor(self, val): self["scaleanchor"] = val - # scaleratio - # ---------- @property def scaleratio(self): """ @@ -1536,8 +1142,6 @@ def scaleratio(self): def scaleratio(self, val): self["scaleratio"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -1556,8 +1160,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # shift - # ----- @property def shift(self): """ @@ -1582,8 +1184,6 @@ def shift(self): def shift(self, val): self["shift"] = val - # showdividers - # ------------ @property def showdividers(self): """ @@ -1604,8 +1204,6 @@ def showdividers(self): def showdividers(self, val): self["showdividers"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -1628,8 +1226,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -1649,8 +1245,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -1669,8 +1263,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showspikes - # ---------- @property def showspikes(self): """ @@ -1691,8 +1283,6 @@ def showspikes(self): def showspikes(self, val): self["showspikes"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1711,8 +1301,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1735,8 +1323,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1756,8 +1342,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # side - # ---- @property def side(self): """ @@ -1778,8 +1362,6 @@ def side(self): def side(self, val): self["side"] = val - # spikecolor - # ---------- @property def spikecolor(self): """ @@ -1790,42 +1372,7 @@ def spikecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1837,8 +1384,6 @@ def spikecolor(self): def spikecolor(self, val): self["spikecolor"] = val - # spikedash - # --------- @property def spikedash(self): """ @@ -1863,8 +1408,6 @@ def spikedash(self): def spikedash(self, val): self["spikedash"] = val - # spikemode - # --------- @property def spikemode(self): """ @@ -1889,8 +1432,6 @@ def spikemode(self): def spikemode(self, val): self["spikemode"] = val - # spikesnap - # --------- @property def spikesnap(self): """ @@ -1911,8 +1452,6 @@ def spikesnap(self): def spikesnap(self, val): self["spikesnap"] = val - # spikethickness - # -------------- @property def spikethickness(self): """ @@ -1931,8 +1470,6 @@ def spikethickness(self): def spikethickness(self, val): self["spikethickness"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1958,8 +1495,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1982,8 +1517,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -1994,42 +1527,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -2041,8 +1539,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -2054,52 +1550,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.yaxis.Tickfont @@ -2110,8 +1560,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -2140,8 +1588,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -2151,42 +1597,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.yaxis.Tickformatstop] @@ -2197,8 +1607,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -2213,8 +1621,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.yaxis.Tickformatstop @@ -2225,8 +1631,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelindex - # -------------- @property def ticklabelindex(self): """ @@ -2245,7 +1649,7 @@ def ticklabelindex(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["ticklabelindex"] @@ -2253,8 +1657,6 @@ def ticklabelindex(self): def ticklabelindex(self, val): self["ticklabelindex"] = val - # ticklabelindexsrc - # ----------------- @property def ticklabelindexsrc(self): """ @@ -2274,8 +1676,6 @@ def ticklabelindexsrc(self): def ticklabelindexsrc(self, val): self["ticklabelindexsrc"] = val - # ticklabelmode - # ------------- @property def ticklabelmode(self): """ @@ -2298,8 +1698,6 @@ def ticklabelmode(self): def ticklabelmode(self, val): self["ticklabelmode"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -2323,8 +1721,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -2353,8 +1749,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelshift - # -------------- @property def ticklabelshift(self): """ @@ -2375,8 +1769,6 @@ def ticklabelshift(self): def ticklabelshift(self, val): self["ticklabelshift"] = val - # ticklabelstandoff - # ----------------- @property def ticklabelstandoff(self): """ @@ -2403,8 +1795,6 @@ def ticklabelstandoff(self): def ticklabelstandoff(self, val): self["ticklabelstandoff"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -2429,8 +1819,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -2449,8 +1837,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -2478,8 +1864,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -2499,8 +1883,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -2522,8 +1904,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # tickson - # ------- @property def tickson(self): """ @@ -2547,8 +1927,6 @@ def tickson(self): def tickson(self, val): self["tickson"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -2568,8 +1946,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -2582,7 +1958,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -2590,8 +1966,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -2610,8 +1984,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -2623,7 +1995,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -2631,8 +2003,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -2651,8 +2021,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -2671,8 +2039,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -2682,25 +2048,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.yaxis.Title @@ -2711,8 +2058,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -2735,8 +2080,6 @@ def type(self): def type(self, val): self["type"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -2756,8 +2099,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -2778,8 +2119,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # zeroline - # -------- @property def zeroline(self): """ @@ -2800,8 +2139,6 @@ def zeroline(self): def zeroline(self, val): self["zeroline"] = val - # zerolinecolor - # ------------- @property def zerolinecolor(self): """ @@ -2812,42 +2149,7 @@ def zerolinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -2859,8 +2161,6 @@ def zerolinecolor(self): def zerolinecolor(self, val): self["zerolinecolor"] = val - # zerolinewidth - # ------------- @property def zerolinewidth(self): """ @@ -2879,8 +2179,6 @@ def zerolinewidth(self): def zerolinewidth(self, val): self["zerolinewidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -3132,7 +2430,7 @@ def _prop_descriptions(self): layout.yaxis.rangebreaks rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -3405,99 +2703,99 @@ def _prop_descriptions(self): def __init__( self, arg=None, - anchor=None, - automargin=None, - autorange=None, - autorangeoptions=None, - autoshift=None, - autotickangles=None, - autotypenumbers=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - constrain=None, - constraintoward=None, - dividercolor=None, - dividerwidth=None, - domain=None, - dtick=None, - exponentformat=None, - fixedrange=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - insiderange=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - matches=None, - maxallowed=None, - minallowed=None, - minexponent=None, - minor=None, - mirror=None, - nticks=None, - overlaying=None, - position=None, - range=None, - rangebreaks=None, - rangebreakdefaults=None, - rangemode=None, - scaleanchor=None, - scaleratio=None, - separatethousands=None, - shift=None, - showdividers=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - spikecolor=None, - spikedash=None, - spikemode=None, - spikesnap=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelindex=None, - ticklabelindexsrc=None, - ticklabelmode=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelshift=None, - ticklabelstandoff=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - tickson=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - type=None, - uirevision=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, + anchor: Any | None = None, + automargin: Any | None = None, + autorange: Any | None = None, + autorangeoptions: None | None = None, + autoshift: bool | None = None, + autotickangles: list | None = None, + autotypenumbers: Any | None = None, + calendar: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + constrain: Any | None = None, + constraintoward: Any | None = None, + dividercolor: str | None = None, + dividerwidth: int | float | None = None, + domain: list | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + fixedrange: bool | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + insiderange: list | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + matches: Any | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, + minexponent: int | float | None = None, + minor: None | None = None, + mirror: Any | None = None, + nticks: int | None = None, + overlaying: Any | None = None, + position: int | float | None = None, + range: list | None = None, + rangebreaks: None | None = None, + rangebreakdefaults: None | None = None, + rangemode: Any | None = None, + scaleanchor: Any | None = None, + scaleratio: int | float | None = None, + separatethousands: bool | None = None, + shift: int | float | None = None, + showdividers: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showspikes: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + side: Any | None = None, + spikecolor: str | None = None, + spikedash: str | None = None, + spikemode: Any | None = None, + spikesnap: Any | None = None, + spikethickness: int | float | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelindex: int | None = None, + ticklabelindexsrc: str | None = None, + ticklabelmode: Any | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelshift: int | None = None, + ticklabelstandoff: int | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + tickson: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + type: Any | None = None, + uirevision: Any | None = None, + visible: bool | None = None, + zeroline: bool | None = None, + zerolinecolor: str | None = None, + zerolinewidth: int | float | None = None, **kwargs, ): """ @@ -3756,7 +3054,7 @@ def __init__( layout.yaxis.rangebreaks rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -4029,14 +3327,11 @@ def __init__( ------- YAxis """ - super(YAxis, self).__init__("yaxis") - + super().__init__("yaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -4051,390 +3346,101 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.YAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("anchor", None) - _v = anchor if anchor is not None else _v - if _v is not None: - self["anchor"] = _v - _v = arg.pop("automargin", None) - _v = automargin if automargin is not None else _v - if _v is not None: - self["automargin"] = _v - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autorangeoptions", None) - _v = autorangeoptions if autorangeoptions is not None else _v - if _v is not None: - self["autorangeoptions"] = _v - _v = arg.pop("autoshift", None) - _v = autoshift if autoshift is not None else _v - if _v is not None: - self["autoshift"] = _v - _v = arg.pop("autotickangles", None) - _v = autotickangles if autotickangles is not None else _v - if _v is not None: - self["autotickangles"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("constrain", None) - _v = constrain if constrain is not None else _v - if _v is not None: - self["constrain"] = _v - _v = arg.pop("constraintoward", None) - _v = constraintoward if constraintoward is not None else _v - if _v is not None: - self["constraintoward"] = _v - _v = arg.pop("dividercolor", None) - _v = dividercolor if dividercolor is not None else _v - if _v is not None: - self["dividercolor"] = _v - _v = arg.pop("dividerwidth", None) - _v = dividerwidth if dividerwidth is not None else _v - if _v is not None: - self["dividerwidth"] = _v - _v = arg.pop("domain", None) - _v = domain if domain is not None else _v - if _v is not None: - self["domain"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("fixedrange", None) - _v = fixedrange if fixedrange is not None else _v - if _v is not None: - self["fixedrange"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("insiderange", None) - _v = insiderange if insiderange is not None else _v - if _v is not None: - self["insiderange"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("matches", None) - _v = matches if matches is not None else _v - if _v is not None: - self["matches"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("minor", None) - _v = minor if minor is not None else _v - if _v is not None: - self["minor"] = _v - _v = arg.pop("mirror", None) - _v = mirror if mirror is not None else _v - if _v is not None: - self["mirror"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("overlaying", None) - _v = overlaying if overlaying is not None else _v - if _v is not None: - self["overlaying"] = _v - _v = arg.pop("position", None) - _v = position if position is not None else _v - if _v is not None: - self["position"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangebreaks", None) - _v = rangebreaks if rangebreaks is not None else _v - if _v is not None: - self["rangebreaks"] = _v - _v = arg.pop("rangebreakdefaults", None) - _v = rangebreakdefaults if rangebreakdefaults is not None else _v - if _v is not None: - self["rangebreakdefaults"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("scaleanchor", None) - _v = scaleanchor if scaleanchor is not None else _v - if _v is not None: - self["scaleanchor"] = _v - _v = arg.pop("scaleratio", None) - _v = scaleratio if scaleratio is not None else _v - if _v is not None: - self["scaleratio"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("shift", None) - _v = shift if shift is not None else _v - if _v is not None: - self["shift"] = _v - _v = arg.pop("showdividers", None) - _v = showdividers if showdividers is not None else _v - if _v is not None: - self["showdividers"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showspikes", None) - _v = showspikes if showspikes is not None else _v - if _v is not None: - self["showspikes"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("spikecolor", None) - _v = spikecolor if spikecolor is not None else _v - if _v is not None: - self["spikecolor"] = _v - _v = arg.pop("spikedash", None) - _v = spikedash if spikedash is not None else _v - if _v is not None: - self["spikedash"] = _v - _v = arg.pop("spikemode", None) - _v = spikemode if spikemode is not None else _v - if _v is not None: - self["spikemode"] = _v - _v = arg.pop("spikesnap", None) - _v = spikesnap if spikesnap is not None else _v - if _v is not None: - self["spikesnap"] = _v - _v = arg.pop("spikethickness", None) - _v = spikethickness if spikethickness is not None else _v - if _v is not None: - self["spikethickness"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelindex", None) - _v = ticklabelindex if ticklabelindex is not None else _v - if _v is not None: - self["ticklabelindex"] = _v - _v = arg.pop("ticklabelindexsrc", None) - _v = ticklabelindexsrc if ticklabelindexsrc is not None else _v - if _v is not None: - self["ticklabelindexsrc"] = _v - _v = arg.pop("ticklabelmode", None) - _v = ticklabelmode if ticklabelmode is not None else _v - if _v is not None: - self["ticklabelmode"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelshift", None) - _v = ticklabelshift if ticklabelshift is not None else _v - if _v is not None: - self["ticklabelshift"] = _v - _v = arg.pop("ticklabelstandoff", None) - _v = ticklabelstandoff if ticklabelstandoff is not None else _v - if _v is not None: - self["ticklabelstandoff"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("tickson", None) - _v = tickson if tickson is not None else _v - if _v is not None: - self["tickson"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("zeroline", None) - _v = zeroline if zeroline is not None else _v - if _v is not None: - self["zeroline"] = _v - _v = arg.pop("zerolinecolor", None) - _v = zerolinecolor if zerolinecolor is not None else _v - if _v is not None: - self["zerolinecolor"] = _v - _v = arg.pop("zerolinewidth", None) - _v = zerolinewidth if zerolinewidth is not None else _v - if _v is not None: - self["zerolinewidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("anchor", arg, anchor) + self._init_provided("automargin", arg, automargin) + self._init_provided("autorange", arg, autorange) + self._init_provided("autorangeoptions", arg, autorangeoptions) + self._init_provided("autoshift", arg, autoshift) + self._init_provided("autotickangles", arg, autotickangles) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("calendar", arg, calendar) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("constrain", arg, constrain) + self._init_provided("constraintoward", arg, constraintoward) + self._init_provided("dividercolor", arg, dividercolor) + self._init_provided("dividerwidth", arg, dividerwidth) + self._init_provided("domain", arg, domain) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("fixedrange", arg, fixedrange) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("insiderange", arg, insiderange) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("matches", arg, matches) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("minor", arg, minor) + self._init_provided("mirror", arg, mirror) + self._init_provided("nticks", arg, nticks) + self._init_provided("overlaying", arg, overlaying) + self._init_provided("position", arg, position) + self._init_provided("range", arg, range) + self._init_provided("rangebreaks", arg, rangebreaks) + self._init_provided("rangebreakdefaults", arg, rangebreakdefaults) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("scaleanchor", arg, scaleanchor) + self._init_provided("scaleratio", arg, scaleratio) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("shift", arg, shift) + self._init_provided("showdividers", arg, showdividers) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showspikes", arg, showspikes) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("side", arg, side) + self._init_provided("spikecolor", arg, spikecolor) + self._init_provided("spikedash", arg, spikedash) + self._init_provided("spikemode", arg, spikemode) + self._init_provided("spikesnap", arg, spikesnap) + self._init_provided("spikethickness", arg, spikethickness) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelindex", arg, ticklabelindex) + self._init_provided("ticklabelindexsrc", arg, ticklabelindexsrc) + self._init_provided("ticklabelmode", arg, ticklabelmode) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelshift", arg, ticklabelshift) + self._init_provided("ticklabelstandoff", arg, ticklabelstandoff) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("tickson", arg, tickson) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) + self._init_provided("zeroline", arg, zeroline) + self._init_provided("zerolinecolor", arg, zerolinecolor) + self._init_provided("zerolinewidth", arg, zerolinewidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/annotation/__init__.py b/plotly/graph_objs/layout/annotation/__init__.py index 89cac20f5a..a9cb1938bc 100644 --- a/plotly/graph_objs/layout/annotation/__init__.py +++ b/plotly/graph_objs/layout/annotation/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font - from ._hoverlabel import Hoverlabel - from . import hoverlabel -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".hoverlabel"], ["._font.Font", "._hoverlabel.Hoverlabel"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._font.Font", "._hoverlabel.Hoverlabel"] +) diff --git a/plotly/graph_objs/layout/annotation/_font.py b/plotly/graph_objs/layout/annotation/_font.py index bc21715b61..2718dd7ad6 100644 --- a/plotly/graph_objs/layout/annotation/_font.py +++ b/plotly/graph_objs/layout/annotation/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.annotation" _path_str = "layout.annotation.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.annotation.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/annotation/_hoverlabel.py b/plotly/graph_objs/layout/annotation/_hoverlabel.py index bdc4599445..ced11bd406 100644 --- a/plotly/graph_objs/layout/annotation/_hoverlabel.py +++ b/plotly/graph_objs/layout/annotation/_hoverlabel.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Hoverlabel(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.annotation" _path_str = "layout.annotation.hoverlabel" _valid_props = {"bgcolor", "bordercolor", "font"} - # bgcolor - # ------- @property def bgcolor(self): """ @@ -24,42 +23,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -85,42 +47,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -132,8 +59,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # font - # ---- @property def font(self): """ @@ -146,52 +71,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.annotation.hoverlabel.Font @@ -202,8 +81,6 @@ def font(self): def font(self, val): self["font"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -221,7 +98,14 @@ def _prop_descriptions(self): `hoverlabel.bordercolor`. """ - def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): + def __init__( + self, + arg=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + font: None | None = None, + **kwargs, + ): """ Construct a new Hoverlabel object @@ -248,14 +132,11 @@ def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -270,30 +151,11 @@ def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs an instance of :class:`plotly.graph_objs.layout.annotation.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("font", arg, font) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py b/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py +++ b/plotly/graph_objs/layout/annotation/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/annotation/hoverlabel/_font.py b/plotly/graph_objs/layout/annotation/hoverlabel/_font.py index 81a13e5b65..396c494237 100644 --- a/plotly/graph_objs/layout/annotation/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/annotation/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.annotation.hoverlabel" _path_str = "layout.annotation.hoverlabel.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.annotation.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/coloraxis/__init__.py b/plotly/graph_objs/layout/coloraxis/__init__.py index 27dfc9e52f..5e1805d8fa 100644 --- a/plotly/graph_objs/layout/coloraxis/__init__.py +++ b/plotly/graph_objs/layout/coloraxis/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] +) diff --git a/plotly/graph_objs/layout/coloraxis/_colorbar.py b/plotly/graph_objs/layout/coloraxis/_colorbar.py index 3cb03c6cbc..faba6ccb5d 100644 --- a/plotly/graph_objs/layout/coloraxis/_colorbar.py +++ b/plotly/graph_objs/layout/coloraxis/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class ColorBar(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.coloraxis" _path_str = "layout.coloraxis.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseLayoutHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.coloraxis.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.layout.coloraxis.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.coloraxis.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py b/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py b/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py index b202645444..b1df3c2f82 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.coloraxis.colorbar" _path_str = "layout.coloraxis.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py b/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py index f1ba365185..f894e50be1 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.coloraxis.colorbar" _path_str = "layout.coloraxis.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/_title.py b/plotly/graph_objs/layout/coloraxis/colorbar/_title.py index 382d3ff94f..e7223e2cb1 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/_title.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.coloraxis.colorbar" _path_str = "layout.coloraxis.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.coloraxis.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py b/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py b/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py index 8d4948e3a3..dcbb3bdd67 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.coloraxis.colorbar.title" _path_str = "layout.coloraxis.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.coloraxis.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/geo/__init__.py b/plotly/graph_objs/layout/geo/__init__.py index 3daa84b218..dcabe9a058 100644 --- a/plotly/graph_objs/layout/geo/__init__.py +++ b/plotly/graph_objs/layout/geo/__init__.py @@ -1,24 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._center import Center - from ._domain import Domain - from ._lataxis import Lataxis - from ._lonaxis import Lonaxis - from ._projection import Projection - from . import projection -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".projection"], - [ - "._center.Center", - "._domain.Domain", - "._lataxis.Lataxis", - "._lonaxis.Lonaxis", - "._projection.Projection", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".projection"], + [ + "._center.Center", + "._domain.Domain", + "._lataxis.Lataxis", + "._lonaxis.Lonaxis", + "._projection.Projection", + ], +) diff --git a/plotly/graph_objs/layout/geo/_center.py b/plotly/graph_objs/layout/geo/_center.py index fee53e5dac..d488cfce94 100644 --- a/plotly/graph_objs/layout/geo/_center.py +++ b/plotly/graph_objs/layout/geo/_center.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Center(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.geo" _path_str = "layout.geo.center" _valid_props = {"lat", "lon"} - # lat - # --- @property def lat(self): """ @@ -32,8 +31,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # lon - # --- @property def lon(self): """ @@ -55,8 +52,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -71,7 +66,13 @@ def _prop_descriptions(self): `projection.rotation.lon` otherwise. """ - def __init__(self, arg=None, lat=None, lon=None, **kwargs): + def __init__( + self, + arg=None, + lat: int | float | None = None, + lon: int | float | None = None, + **kwargs, + ): """ Construct a new Center object @@ -95,14 +96,11 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): ------- Center """ - super(Center, self).__init__("center") - + super().__init__("center") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,26 +115,10 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.geo.Center`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("lat", arg, lat) + self._init_provided("lon", arg, lon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/geo/_domain.py b/plotly/graph_objs/layout/geo/_domain.py index f7e7ce3837..55de2a2da4 100644 --- a/plotly/graph_objs/layout/geo/_domain.py +++ b/plotly/graph_objs/layout/geo/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.geo" _path_str = "layout.geo.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -35,8 +34,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -60,8 +57,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -88,8 +83,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -116,8 +109,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -147,7 +138,15 @@ def _prop_descriptions(self): both. """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -186,14 +185,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -208,34 +204,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.geo.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/geo/_lataxis.py b/plotly/graph_objs/layout/geo/_lataxis.py index be44d0c62f..3b8da4099b 100644 --- a/plotly/graph_objs/layout/geo/_lataxis.py +++ b/plotly/graph_objs/layout/geo/_lataxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Lataxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.geo" _path_str = "layout.geo.lataxis" _valid_props = { @@ -18,8 +19,6 @@ class Lataxis(_BaseLayoutHierarchyType): "tick0", } - # dtick - # ----- @property def dtick(self): """ @@ -38,8 +37,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -50,42 +47,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -97,8 +59,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -123,8 +83,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -143,8 +101,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # range - # ----- @property def range(self): """ @@ -169,8 +125,6 @@ def range(self): def range(self, val): self["range"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -189,8 +143,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -209,8 +161,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -237,13 +187,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtick=None, - gridcolor=None, - griddash=None, - gridwidth=None, - range=None, - showgrid=None, - tick0=None, + dtick: int | float | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + range: list | None = None, + showgrid: bool | None = None, + tick0: int | float | None = None, **kwargs, ): """ @@ -278,14 +228,11 @@ def __init__( ------- Lataxis """ - super(Lataxis, self).__init__("lataxis") - + super().__init__("lataxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -300,46 +247,15 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.geo.Lataxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtick", arg, dtick) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("range", arg, range) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("tick0", arg, tick0) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/geo/_lonaxis.py b/plotly/graph_objs/layout/geo/_lonaxis.py index 5d36dd6fbc..2b2123f3dd 100644 --- a/plotly/graph_objs/layout/geo/_lonaxis.py +++ b/plotly/graph_objs/layout/geo/_lonaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Lonaxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.geo" _path_str = "layout.geo.lonaxis" _valid_props = { @@ -18,8 +19,6 @@ class Lonaxis(_BaseLayoutHierarchyType): "tick0", } - # dtick - # ----- @property def dtick(self): """ @@ -38,8 +37,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -50,42 +47,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -97,8 +59,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -123,8 +83,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -143,8 +101,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # range - # ----- @property def range(self): """ @@ -169,8 +125,6 @@ def range(self): def range(self, val): self["range"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -189,8 +143,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -209,8 +161,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -237,13 +187,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtick=None, - gridcolor=None, - griddash=None, - gridwidth=None, - range=None, - showgrid=None, - tick0=None, + dtick: int | float | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + range: list | None = None, + showgrid: bool | None = None, + tick0: int | float | None = None, **kwargs, ): """ @@ -278,14 +228,11 @@ def __init__( ------- Lonaxis """ - super(Lonaxis, self).__init__("lonaxis") - + super().__init__("lonaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -300,46 +247,15 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.geo.Lonaxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtick", arg, dtick) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("range", arg, range) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("tick0", arg, tick0) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/geo/_projection.py b/plotly/graph_objs/layout/geo/_projection.py index 86710bdf21..92dd82d955 100644 --- a/plotly/graph_objs/layout/geo/_projection.py +++ b/plotly/graph_objs/layout/geo/_projection.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Projection(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.geo" _path_str = "layout.geo.projection" _valid_props = {"distance", "parallels", "rotation", "scale", "tilt", "type"} - # distance - # -------- @property def distance(self): """ @@ -32,8 +31,6 @@ def distance(self): def distance(self, val): self["distance"] = val - # parallels - # --------- @property def parallels(self): """ @@ -58,8 +55,6 @@ def parallels(self): def parallels(self, val): self["parallels"] = val - # rotation - # -------- @property def rotation(self): """ @@ -69,19 +64,6 @@ def rotation(self): - A dict of string/value properties that will be passed to the Rotation constructor - Supported dict properties: - - lat - Rotates the map along meridians (in degrees - North). - lon - Rotates the map along parallels (in degrees - East). Defaults to the center of the - `lonaxis.range` values. - roll - Roll the map (in degrees) For example, a roll - of 180 makes the map appear upside down. - Returns ------- plotly.graph_objs.layout.geo.projection.Rotation @@ -92,8 +74,6 @@ def rotation(self): def rotation(self, val): self["rotation"] = val - # scale - # ----- @property def scale(self): """ @@ -113,8 +93,6 @@ def scale(self): def scale(self, val): self["scale"] = val - # tilt - # ---- @property def tilt(self): """ @@ -134,8 +112,6 @@ def tilt(self): def tilt(self, val): self["tilt"] = val - # type - # ---- @property def type(self): """ @@ -178,8 +154,6 @@ def type(self): def type(self, val): self["type"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -207,12 +181,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - distance=None, - parallels=None, - rotation=None, - scale=None, - tilt=None, - type=None, + distance: int | float | None = None, + parallels: list | None = None, + rotation: None | None = None, + scale: int | float | None = None, + tilt: int | float | None = None, + type: Any | None = None, **kwargs, ): """ @@ -248,14 +222,11 @@ def __init__( ------- Projection """ - super(Projection, self).__init__("projection") - + super().__init__("projection") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -270,42 +241,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.geo.Projection`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("distance", None) - _v = distance if distance is not None else _v - if _v is not None: - self["distance"] = _v - _v = arg.pop("parallels", None) - _v = parallels if parallels is not None else _v - if _v is not None: - self["parallels"] = _v - _v = arg.pop("rotation", None) - _v = rotation if rotation is not None else _v - if _v is not None: - self["rotation"] = _v - _v = arg.pop("scale", None) - _v = scale if scale is not None else _v - if _v is not None: - self["scale"] = _v - _v = arg.pop("tilt", None) - _v = tilt if tilt is not None else _v - if _v is not None: - self["tilt"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("distance", arg, distance) + self._init_provided("parallels", arg, parallels) + self._init_provided("rotation", arg, rotation) + self._init_provided("scale", arg, scale) + self._init_provided("tilt", arg, tilt) + self._init_provided("type", arg, type) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/geo/projection/__init__.py b/plotly/graph_objs/layout/geo/projection/__init__.py index 79df932669..0c79216e29 100644 --- a/plotly/graph_objs/layout/geo/projection/__init__.py +++ b/plotly/graph_objs/layout/geo/projection/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._rotation import Rotation -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._rotation.Rotation"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._rotation.Rotation"]) diff --git a/plotly/graph_objs/layout/geo/projection/_rotation.py b/plotly/graph_objs/layout/geo/projection/_rotation.py index cc9047b182..65747cf58a 100644 --- a/plotly/graph_objs/layout/geo/projection/_rotation.py +++ b/plotly/graph_objs/layout/geo/projection/_rotation.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Rotation(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.geo.projection" _path_str = "layout.geo.projection.rotation" _valid_props = {"lat", "lon", "roll"} - # lat - # --- @property def lat(self): """ @@ -30,8 +29,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # lon - # --- @property def lon(self): """ @@ -51,8 +48,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # roll - # ---- @property def roll(self): """ @@ -72,8 +67,6 @@ def roll(self): def roll(self, val): self["roll"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -87,7 +80,14 @@ def _prop_descriptions(self): makes the map appear upside down. """ - def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs): + def __init__( + self, + arg=None, + lat: int | float | None = None, + lon: int | float | None = None, + roll: int | float | None = None, + **kwargs, + ): """ Construct a new Rotation object @@ -110,14 +110,11 @@ def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs): ------- Rotation """ - super(Rotation, self).__init__("rotation") - + super().__init__("rotation") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, lat=None, lon=None, roll=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.geo.projection.Rotation`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - _v = arg.pop("roll", None) - _v = roll if roll is not None else _v - if _v is not None: - self["roll"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("lat", arg, lat) + self._init_provided("lon", arg, lon) + self._init_provided("roll", arg, roll) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/grid/__init__.py b/plotly/graph_objs/layout/grid/__init__.py index 36092994b8..b88f1daf60 100644 --- a/plotly/graph_objs/layout/grid/__init__.py +++ b/plotly/graph_objs/layout/grid/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._domain.Domain"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._domain.Domain"]) diff --git a/plotly/graph_objs/layout/grid/_domain.py b/plotly/graph_objs/layout/grid/_domain.py index 683194b4d3..83ab62b774 100644 --- a/plotly/graph_objs/layout/grid/_domain.py +++ b/plotly/graph_objs/layout/grid/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.grid" _path_str = "layout.grid.domain" _valid_props = {"x", "y"} - # x - # - @property def x(self): """ @@ -37,8 +36,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -64,8 +61,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +74,9 @@ def _prop_descriptions(self): domain edges, with no grout around the edges. """ - def __init__(self, arg=None, x=None, y=None, **kwargs): + def __init__( + self, arg=None, x: list | None = None, y: list | None = None, **kwargs + ): """ Construct a new Domain object @@ -102,14 +99,11 @@ def __init__(self, arg=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,26 +118,10 @@ def __init__(self, arg=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.grid.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/hoverlabel/__init__.py b/plotly/graph_objs/layout/hoverlabel/__init__.py index c6f9226f99..38bd14ede8 100644 --- a/plotly/graph_objs/layout/hoverlabel/__init__.py +++ b/plotly/graph_objs/layout/hoverlabel/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font - from ._grouptitlefont import Grouptitlefont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._font.Font", "._grouptitlefont.Grouptitlefont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._font.Font", "._grouptitlefont.Grouptitlefont"] +) diff --git a/plotly/graph_objs/layout/hoverlabel/_font.py b/plotly/graph_objs/layout/hoverlabel/_font.py index eb67ffe6f7..80e6f89090 100644 --- a/plotly/graph_objs/layout/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.hoverlabel" _path_str = "layout.hoverlabel.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py b/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py index 648b74eeb5..634bee3340 100644 --- a/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py +++ b/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Grouptitlefont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.hoverlabel" _path_str = "layout.hoverlabel.grouptitlefont" _valid_props = { @@ -20,8 +21,6 @@ class Grouptitlefont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Grouptitlefont """ - super(Grouptitlefont, self).__init__("grouptitlefont") - + super().__init__("grouptitlefont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.hoverlabel.Grouptitlefont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/legend/__init__.py b/plotly/graph_objs/layout/legend/__init__.py index 451048fb0f..3193563212 100644 --- a/plotly/graph_objs/layout/legend/__init__.py +++ b/plotly/graph_objs/layout/legend/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font - from ._grouptitlefont import Grouptitlefont - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._font.Font", "._grouptitlefont.Grouptitlefont", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._font.Font", "._grouptitlefont.Grouptitlefont", "._title.Title"], +) diff --git a/plotly/graph_objs/layout/legend/_font.py b/plotly/graph_objs/layout/legend/_font.py index ce4f319cee..70013369aa 100644 --- a/plotly/graph_objs/layout/legend/_font.py +++ b/plotly/graph_objs/layout/legend/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.legend" _path_str = "layout.legend.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.legend.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/legend/_grouptitlefont.py b/plotly/graph_objs/layout/legend/_grouptitlefont.py index 45a5cdf15a..7a8c42235d 100644 --- a/plotly/graph_objs/layout/legend/_grouptitlefont.py +++ b/plotly/graph_objs/layout/legend/_grouptitlefont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Grouptitlefont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.legend" _path_str = "layout.legend.grouptitlefont" _valid_props = { @@ -20,8 +21,6 @@ class Grouptitlefont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Grouptitlefont """ - super(Grouptitlefont, self).__init__("grouptitlefont") - + super().__init__("grouptitlefont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.legend.Grouptitlefont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/legend/_title.py b/plotly/graph_objs/layout/legend/_title.py index 5103c0a7e5..c62c9a5ff0 100644 --- a/plotly/graph_objs/layout/legend/_title.py +++ b/plotly/graph_objs/layout/legend/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.legend" _path_str = "layout.legend.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -24,52 +23,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.legend.title.Font @@ -80,8 +33,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -105,8 +56,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -126,8 +75,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -145,7 +92,14 @@ def _prop_descriptions(self): Sets the title of the legend. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -172,14 +126,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -194,30 +145,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.legend.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/legend/title/__init__.py b/plotly/graph_objs/layout/legend/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/legend/title/__init__.py +++ b/plotly/graph_objs/layout/legend/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/legend/title/_font.py b/plotly/graph_objs/layout/legend/title/_font.py index dffba334e1..8bbc5f9090 100644 --- a/plotly/graph_objs/layout/legend/title/_font.py +++ b/plotly/graph_objs/layout/legend/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.legend.title" _path_str = "layout.legend.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.legend.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/__init__.py b/plotly/graph_objs/layout/map/__init__.py index be0b2eed71..9dfa47aa1d 100644 --- a/plotly/graph_objs/layout/map/__init__.py +++ b/plotly/graph_objs/layout/map/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._bounds import Bounds - from ._center import Center - from ._domain import Domain - from ._layer import Layer - from . import layer -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".layer"], - ["._bounds.Bounds", "._center.Center", "._domain.Domain", "._layer.Layer"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".layer"], + ["._bounds.Bounds", "._center.Center", "._domain.Domain", "._layer.Layer"], +) diff --git a/plotly/graph_objs/layout/map/_bounds.py b/plotly/graph_objs/layout/map/_bounds.py index 9b47548b2d..95be3c0491 100644 --- a/plotly/graph_objs/layout/map/_bounds.py +++ b/plotly/graph_objs/layout/map/_bounds.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Bounds(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map" _path_str = "layout.map.bounds" _valid_props = {"east", "north", "south", "west"} - # east - # ---- @property def east(self): """ @@ -31,8 +30,6 @@ def east(self): def east(self, val): self["east"] = val - # north - # ----- @property def north(self): """ @@ -52,8 +49,6 @@ def north(self): def north(self, val): self["north"] = val - # south - # ----- @property def south(self): """ @@ -73,8 +68,6 @@ def south(self): def south(self, val): self["south"] = val - # west - # ---- @property def west(self): """ @@ -94,8 +87,6 @@ def west(self): def west(self, val): self["west"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -114,7 +105,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, east=None, north=None, south=None, west=None, **kwargs + self, + arg=None, + east: int | float | None = None, + north: int | float | None = None, + south: int | float | None = None, + west: int | float | None = None, + **kwargs, ): """ Construct a new Bounds object @@ -142,14 +139,11 @@ def __init__( ------- Bounds """ - super(Bounds, self).__init__("bounds") - + super().__init__("bounds") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -164,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.map.Bounds`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("east", None) - _v = east if east is not None else _v - if _v is not None: - self["east"] = _v - _v = arg.pop("north", None) - _v = north if north is not None else _v - if _v is not None: - self["north"] = _v - _v = arg.pop("south", None) - _v = south if south is not None else _v - if _v is not None: - self["south"] = _v - _v = arg.pop("west", None) - _v = west if west is not None else _v - if _v is not None: - self["west"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("east", arg, east) + self._init_provided("north", arg, north) + self._init_provided("south", arg, south) + self._init_provided("west", arg, west) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/_center.py b/plotly/graph_objs/layout/map/_center.py index 5781184b1a..ef5ae912ec 100644 --- a/plotly/graph_objs/layout/map/_center.py +++ b/plotly/graph_objs/layout/map/_center.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Center(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map" _path_str = "layout.map.center" _valid_props = {"lat", "lon"} - # lat - # --- @property def lat(self): """ @@ -30,8 +29,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # lon - # --- @property def lon(self): """ @@ -50,8 +47,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -63,7 +58,13 @@ def _prop_descriptions(self): East). """ - def __init__(self, arg=None, lat=None, lon=None, **kwargs): + def __init__( + self, + arg=None, + lat: int | float | None = None, + lon: int | float | None = None, + **kwargs, + ): """ Construct a new Center object @@ -84,14 +85,11 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): ------- Center """ - super(Center, self).__init__("center") - + super().__init__("center") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -106,26 +104,10 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.map.Center`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("lat", arg, lat) + self._init_provided("lon", arg, lon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/_domain.py b/plotly/graph_objs/layout/map/_domain.py index 6215eed6c1..81bca44c9d 100644 --- a/plotly/graph_objs/layout/map/_domain.py +++ b/plotly/graph_objs/layout/map/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map" _path_str = "layout.map.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.map.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/_layer.py b/plotly/graph_objs/layout/map/_layer.py index 96a054caa9..5015b494e5 100644 --- a/plotly/graph_objs/layout/map/_layer.py +++ b/plotly/graph_objs/layout/map/_layer.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Layer(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map" _path_str = "layout.map.layer" _valid_props = { @@ -29,8 +30,6 @@ class Layer(_BaseLayoutHierarchyType): "visible", } - # below - # ----- @property def below(self): """ @@ -52,8 +51,6 @@ def below(self): def below(self, val): self["below"] = val - # circle - # ------ @property def circle(self): """ @@ -63,13 +60,6 @@ def circle(self): - A dict of string/value properties that will be passed to the Circle constructor - Supported dict properties: - - radius - Sets the circle radius (map.layer.paint.circle- - radius). Has an effect only when `type` is set - to "circle". - Returns ------- plotly.graph_objs.layout.map.layer.Circle @@ -80,8 +70,6 @@ def circle(self): def circle(self, val): self["circle"] = val - # color - # ----- @property def color(self): """ @@ -98,42 +86,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -145,8 +98,6 @@ def color(self): def color(self, val): self["color"] = val - # coordinates - # ----------- @property def coordinates(self): """ @@ -167,8 +118,6 @@ def coordinates(self): def coordinates(self, val): self["coordinates"] = val - # fill - # ---- @property def fill(self): """ @@ -178,13 +127,6 @@ def fill(self): - A dict of string/value properties that will be passed to the Fill constructor - Supported dict properties: - - outlinecolor - Sets the fill outline color - (map.layer.paint.fill-outline-color). Has an - effect only when `type` is set to "fill". - Returns ------- plotly.graph_objs.layout.map.layer.Fill @@ -195,8 +137,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # line - # ---- @property def line(self): """ @@ -206,20 +146,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - dash - Sets the length of dashes and gaps - (map.layer.paint.line-dasharray). Has an effect - only when `type` is set to "line". - dashsrc - Sets the source reference on Chart Studio Cloud - for `dash`. - width - Sets the line width (map.layer.paint.line- - width). Has an effect only when `type` is set - to "line". - Returns ------- plotly.graph_objs.layout.map.layer.Line @@ -230,8 +156,6 @@ def line(self): def line(self, val): self["line"] = val - # maxzoom - # ------- @property def maxzoom(self): """ @@ -251,8 +175,6 @@ def maxzoom(self): def maxzoom(self, val): self["maxzoom"] = val - # minzoom - # ------- @property def minzoom(self): """ @@ -272,8 +194,6 @@ def minzoom(self): def minzoom(self, val): self["minzoom"] = val - # name - # ---- @property def name(self): """ @@ -299,8 +219,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -325,8 +243,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # source - # ------ @property def source(self): """ @@ -349,8 +265,6 @@ def source(self): def source(self, val): self["source"] = val - # sourceattribution - # ----------------- @property def sourceattribution(self): """ @@ -370,8 +284,6 @@ def sourceattribution(self): def sourceattribution(self, val): self["sourceattribution"] = val - # sourcelayer - # ----------- @property def sourcelayer(self): """ @@ -393,8 +305,6 @@ def sourcelayer(self): def sourcelayer(self, val): self["sourcelayer"] = val - # sourcetype - # ---------- @property def sourcetype(self): """ @@ -415,8 +325,6 @@ def sourcetype(self): def sourcetype(self, val): self["sourcetype"] = val - # symbol - # ------ @property def symbol(self): """ @@ -426,37 +334,6 @@ def symbol(self): - A dict of string/value properties that will be passed to the Symbol constructor - Supported dict properties: - - icon - Sets the symbol icon image - (map.layer.layout.icon-image). Full list: - https://www.map.com/maki-icons/ - iconsize - Sets the symbol icon size - (map.layer.layout.icon-size). Has an effect - only when `type` is set to "symbol". - placement - Sets the symbol and/or text placement - (map.layer.layout.symbol-placement). If - `placement` is "point", the label is placed - where the geometry is located If `placement` is - "line", the label is placed along the line of - the geometry If `placement` is "line-center", - the label is placed on the center of the - geometry - text - Sets the symbol text (map.layer.layout.text- - field). - textfont - Sets the icon text font - (color=map.layer.paint.text-color, - size=map.layer.layout.text-size). Has an effect - only when `type` is set to "symbol". - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - Returns ------- plotly.graph_objs.layout.map.layer.Symbol @@ -467,8 +344,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -495,8 +370,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # type - # ---- @property def type(self): """ @@ -523,8 +396,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -543,8 +414,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -650,24 +519,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - below=None, - circle=None, - color=None, - coordinates=None, - fill=None, - line=None, - maxzoom=None, - minzoom=None, - name=None, - opacity=None, - source=None, - sourceattribution=None, - sourcelayer=None, - sourcetype=None, - symbol=None, - templateitemname=None, - type=None, - visible=None, + below: str | None = None, + circle: None | None = None, + color: str | None = None, + coordinates: Any | None = None, + fill: None | None = None, + line: None | None = None, + maxzoom: int | float | None = None, + minzoom: int | float | None = None, + name: str | None = None, + opacity: int | float | None = None, + source: Any | None = None, + sourceattribution: str | None = None, + sourcelayer: str | None = None, + sourcetype: Any | None = None, + symbol: None | None = None, + templateitemname: str | None = None, + type: Any | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -781,14 +650,11 @@ def __init__( ------- Layer """ - super(Layer, self).__init__("layers") - + super().__init__("layers") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -803,90 +669,26 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.map.Layer`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("circle", None) - _v = circle if circle is not None else _v - if _v is not None: - self["circle"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coordinates", None) - _v = coordinates if coordinates is not None else _v - if _v is not None: - self["coordinates"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxzoom", None) - _v = maxzoom if maxzoom is not None else _v - if _v is not None: - self["maxzoom"] = _v - _v = arg.pop("minzoom", None) - _v = minzoom if minzoom is not None else _v - if _v is not None: - self["minzoom"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("source", None) - _v = source if source is not None else _v - if _v is not None: - self["source"] = _v - _v = arg.pop("sourceattribution", None) - _v = sourceattribution if sourceattribution is not None else _v - if _v is not None: - self["sourceattribution"] = _v - _v = arg.pop("sourcelayer", None) - _v = sourcelayer if sourcelayer is not None else _v - if _v is not None: - self["sourcelayer"] = _v - _v = arg.pop("sourcetype", None) - _v = sourcetype if sourcetype is not None else _v - if _v is not None: - self["sourcetype"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("below", arg, below) + self._init_provided("circle", arg, circle) + self._init_provided("color", arg, color) + self._init_provided("coordinates", arg, coordinates) + self._init_provided("fill", arg, fill) + self._init_provided("line", arg, line) + self._init_provided("maxzoom", arg, maxzoom) + self._init_provided("minzoom", arg, minzoom) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("source", arg, source) + self._init_provided("sourceattribution", arg, sourceattribution) + self._init_provided("sourcelayer", arg, sourcelayer) + self._init_provided("sourcetype", arg, sourcetype) + self._init_provided("symbol", arg, symbol) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/layer/__init__.py b/plotly/graph_objs/layout/map/layer/__init__.py index 1d0bf3340b..9a15ea37d2 100644 --- a/plotly/graph_objs/layout/map/layer/__init__.py +++ b/plotly/graph_objs/layout/map/layer/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._circle import Circle - from ._fill import Fill - from ._line import Line - from ._symbol import Symbol - from . import symbol -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".symbol"], - ["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".symbol"], + ["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"], +) diff --git a/plotly/graph_objs/layout/map/layer/_circle.py b/plotly/graph_objs/layout/map/layer/_circle.py index e72518e582..746d08e807 100644 --- a/plotly/graph_objs/layout/map/layer/_circle.py +++ b/plotly/graph_objs/layout/map/layer/_circle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Circle(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map.layer" _path_str = "layout.map.layer.circle" _valid_props = {"radius"} - # radius - # ------ @property def radius(self): """ @@ -31,8 +30,6 @@ def radius(self): def radius(self, val): self["radius"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): Has an effect only when `type` is set to "circle". """ - def __init__(self, arg=None, radius=None, **kwargs): + def __init__(self, arg=None, radius: int | float | None = None, **kwargs): """ Construct a new Circle object @@ -59,14 +56,11 @@ def __init__(self, arg=None, radius=None, **kwargs): ------- Circle """ - super(Circle, self).__init__("circle") - + super().__init__("circle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -81,22 +75,9 @@ def __init__(self, arg=None, radius=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.map.layer.Circle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("radius", None) - _v = radius if radius is not None else _v - if _v is not None: - self["radius"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("radius", arg, radius) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/layer/_fill.py b/plotly/graph_objs/layout/map/layer/_fill.py index 722461a344..5721e0b94d 100644 --- a/plotly/graph_objs/layout/map/layer/_fill.py +++ b/plotly/graph_objs/layout/map/layer/_fill.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Fill(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map.layer" _path_str = "layout.map.layer.fill" _valid_props = {"outlinecolor"} - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -23,42 +22,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -81,7 +43,7 @@ def _prop_descriptions(self): to "fill". """ - def __init__(self, arg=None, outlinecolor=None, **kwargs): + def __init__(self, arg=None, outlinecolor: str | None = None, **kwargs): """ Construct a new Fill object @@ -100,14 +62,11 @@ def __init__(self, arg=None, outlinecolor=None, **kwargs): ------- Fill """ - super(Fill, self).__init__("fill") - + super().__init__("fill") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,22 +81,9 @@ def __init__(self, arg=None, outlinecolor=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.map.layer.Fill`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("outlinecolor", arg, outlinecolor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/layer/_line.py b/plotly/graph_objs/layout/map/layer/_line.py index 28ca30e2ce..cc1b8bfbc8 100644 --- a/plotly/graph_objs/layout/map/layer/_line.py +++ b/plotly/graph_objs/layout/map/layer/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Line(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map.layer" _path_str = "layout.map.layer.line" _valid_props = {"dash", "dashsrc", "width"} - # dash - # ---- @property def dash(self): """ @@ -23,7 +22,7 @@ def dash(self): Returns ------- - numpy.ndarray + NDArray """ return self["dash"] @@ -31,8 +30,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # dashsrc - # ------- @property def dashsrc(self): """ @@ -51,8 +48,6 @@ def dashsrc(self): def dashsrc(self, val): self["dashsrc"] = val - # width - # ----- @property def width(self): """ @@ -72,8 +67,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -89,7 +82,14 @@ def _prop_descriptions(self): an effect only when `type` is set to "line". """ - def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): + def __init__( + self, + arg=None, + dash: NDArray | None = None, + dashsrc: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -114,14 +114,11 @@ def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -136,30 +133,11 @@ def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.map.layer.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("dashsrc", None) - _v = dashsrc if dashsrc is not None else _v - if _v is not None: - self["dashsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dash", arg, dash) + self._init_provided("dashsrc", arg, dashsrc) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/layer/_symbol.py b/plotly/graph_objs/layout/map/layer/_symbol.py index 5c94cd7990..6924b8e875 100644 --- a/plotly/graph_objs/layout/map/layer/_symbol.py +++ b/plotly/graph_objs/layout/map/layer/_symbol.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Symbol(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map.layer" _path_str = "layout.map.layer.symbol" _valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"} - # icon - # ---- @property def icon(self): """ @@ -32,8 +31,6 @@ def icon(self): def icon(self, val): self["icon"] = val - # iconsize - # -------- @property def iconsize(self): """ @@ -53,8 +50,6 @@ def iconsize(self): def iconsize(self, val): self["iconsize"] = val - # placement - # --------- @property def placement(self): """ @@ -79,8 +74,6 @@ def placement(self): def placement(self, val): self["placement"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +93,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -115,35 +106,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.map.layer.symbol.Textfont @@ -154,8 +116,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -178,8 +138,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -211,12 +169,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - icon=None, - iconsize=None, - placement=None, - text=None, - textfont=None, - textposition=None, + icon: str | None = None, + iconsize: int | float | None = None, + placement: Any | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, **kwargs, ): """ @@ -256,14 +214,11 @@ def __init__( ------- Symbol """ - super(Symbol, self).__init__("symbol") - + super().__init__("symbol") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -278,42 +233,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.map.layer.Symbol`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("icon", None) - _v = icon if icon is not None else _v - if _v is not None: - self["icon"] = _v - _v = arg.pop("iconsize", None) - _v = iconsize if iconsize is not None else _v - if _v is not None: - self["iconsize"] = _v - _v = arg.pop("placement", None) - _v = placement if placement is not None else _v - if _v is not None: - self["placement"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("icon", arg, icon) + self._init_provided("iconsize", arg, iconsize) + self._init_provided("placement", arg, placement) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/map/layer/symbol/__init__.py b/plotly/graph_objs/layout/map/layer/symbol/__init__.py index 1640397aa7..2afd605560 100644 --- a/plotly/graph_objs/layout/map/layer/symbol/__init__.py +++ b/plotly/graph_objs/layout/map/layer/symbol/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._textfont.Textfont"]) diff --git a/plotly/graph_objs/layout/map/layer/symbol/_textfont.py b/plotly/graph_objs/layout/map/layer/symbol/_textfont.py index 9f7b12ff27..eac10af55a 100644 --- a/plotly/graph_objs/layout/map/layer/symbol/_textfont.py +++ b/plotly/graph_objs/layout/map/layer/symbol/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Textfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.map.layer.symbol" _path_str = "layout.map.layer.symbol.textfont" _valid_props = {"color", "family", "size", "style", "weight"} - # color - # ----- @property def color(self): """ @@ -20,42 +19,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -67,23 +31,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -98,8 +53,6 @@ def family(self): def family(self, val): self["family"] = val - # size - # ---- @property def size(self): """ @@ -116,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -138,8 +89,6 @@ def style(self): def style(self, val): self["style"] = val - # weight - # ------ @property def weight(self): """ @@ -160,8 +109,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -169,18 +116,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -193,11 +133,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - size=None, - style=None, - weight=None, + color: str | None = None, + family: str | None = None, + size: int | float | None = None, + style: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -217,18 +157,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -241,14 +174,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -263,38 +193,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.map.layer.symbol.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/__init__.py b/plotly/graph_objs/layout/mapbox/__init__.py index be0b2eed71..9dfa47aa1d 100644 --- a/plotly/graph_objs/layout/mapbox/__init__.py +++ b/plotly/graph_objs/layout/mapbox/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._bounds import Bounds - from ._center import Center - from ._domain import Domain - from ._layer import Layer - from . import layer -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".layer"], - ["._bounds.Bounds", "._center.Center", "._domain.Domain", "._layer.Layer"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".layer"], + ["._bounds.Bounds", "._center.Center", "._domain.Domain", "._layer.Layer"], +) diff --git a/plotly/graph_objs/layout/mapbox/_bounds.py b/plotly/graph_objs/layout/mapbox/_bounds.py index b4c7d6b76f..1ee9c7edbb 100644 --- a/plotly/graph_objs/layout/mapbox/_bounds.py +++ b/plotly/graph_objs/layout/mapbox/_bounds.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Bounds(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox" _path_str = "layout.mapbox.bounds" _valid_props = {"east", "north", "south", "west"} - # east - # ---- @property def east(self): """ @@ -31,8 +30,6 @@ def east(self): def east(self, val): self["east"] = val - # north - # ----- @property def north(self): """ @@ -52,8 +49,6 @@ def north(self): def north(self, val): self["north"] = val - # south - # ----- @property def south(self): """ @@ -73,8 +68,6 @@ def south(self): def south(self, val): self["south"] = val - # west - # ---- @property def west(self): """ @@ -94,8 +87,6 @@ def west(self): def west(self, val): self["west"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -114,7 +105,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, east=None, north=None, south=None, west=None, **kwargs + self, + arg=None, + east: int | float | None = None, + north: int | float | None = None, + south: int | float | None = None, + west: int | float | None = None, + **kwargs, ): """ Construct a new Bounds object @@ -142,14 +139,11 @@ def __init__( ------- Bounds """ - super(Bounds, self).__init__("bounds") - + super().__init__("bounds") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -164,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.mapbox.Bounds`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("east", None) - _v = east if east is not None else _v - if _v is not None: - self["east"] = _v - _v = arg.pop("north", None) - _v = north if north is not None else _v - if _v is not None: - self["north"] = _v - _v = arg.pop("south", None) - _v = south if south is not None else _v - if _v is not None: - self["south"] = _v - _v = arg.pop("west", None) - _v = west if west is not None else _v - if _v is not None: - self["west"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("east", arg, east) + self._init_provided("north", arg, north) + self._init_provided("south", arg, south) + self._init_provided("west", arg, west) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/_center.py b/plotly/graph_objs/layout/mapbox/_center.py index 4bc1c2b0ee..d99b509874 100644 --- a/plotly/graph_objs/layout/mapbox/_center.py +++ b/plotly/graph_objs/layout/mapbox/_center.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Center(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox" _path_str = "layout.mapbox.center" _valid_props = {"lat", "lon"} - # lat - # --- @property def lat(self): """ @@ -30,8 +29,6 @@ def lat(self): def lat(self, val): self["lat"] = val - # lon - # --- @property def lon(self): """ @@ -50,8 +47,6 @@ def lon(self): def lon(self, val): self["lon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -63,7 +58,13 @@ def _prop_descriptions(self): East). """ - def __init__(self, arg=None, lat=None, lon=None, **kwargs): + def __init__( + self, + arg=None, + lat: int | float | None = None, + lon: int | float | None = None, + **kwargs, + ): """ Construct a new Center object @@ -84,14 +85,11 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): ------- Center """ - super(Center, self).__init__("center") - + super().__init__("center") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -106,26 +104,10 @@ def __init__(self, arg=None, lat=None, lon=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.mapbox.Center`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("lat", None) - _v = lat if lat is not None else _v - if _v is not None: - self["lat"] = _v - _v = arg.pop("lon", None) - _v = lon if lon is not None else _v - if _v is not None: - self["lon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("lat", arg, lat) + self._init_provided("lon", arg, lon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/_domain.py b/plotly/graph_objs/layout/mapbox/_domain.py index b260365c6c..8a3ad4cbab 100644 --- a/plotly/graph_objs/layout/mapbox/_domain.py +++ b/plotly/graph_objs/layout/mapbox/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox" _path_str = "layout.mapbox.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): plot fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.mapbox.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/_layer.py b/plotly/graph_objs/layout/mapbox/_layer.py index 8f66c76a29..2472db5874 100644 --- a/plotly/graph_objs/layout/mapbox/_layer.py +++ b/plotly/graph_objs/layout/mapbox/_layer.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Layer(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox" _path_str = "layout.mapbox.layer" _valid_props = { @@ -29,8 +30,6 @@ class Layer(_BaseLayoutHierarchyType): "visible", } - # below - # ----- @property def below(self): """ @@ -52,8 +51,6 @@ def below(self): def below(self, val): self["below"] = val - # circle - # ------ @property def circle(self): """ @@ -63,13 +60,6 @@ def circle(self): - A dict of string/value properties that will be passed to the Circle constructor - Supported dict properties: - - radius - Sets the circle radius - (mapbox.layer.paint.circle-radius). Has an - effect only when `type` is set to "circle". - Returns ------- plotly.graph_objs.layout.mapbox.layer.Circle @@ -80,8 +70,6 @@ def circle(self): def circle(self, val): self["circle"] = val - # color - # ----- @property def color(self): """ @@ -98,42 +86,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -145,8 +98,6 @@ def color(self): def color(self, val): self["color"] = val - # coordinates - # ----------- @property def coordinates(self): """ @@ -167,8 +118,6 @@ def coordinates(self): def coordinates(self, val): self["coordinates"] = val - # fill - # ---- @property def fill(self): """ @@ -178,13 +127,6 @@ def fill(self): - A dict of string/value properties that will be passed to the Fill constructor - Supported dict properties: - - outlinecolor - Sets the fill outline color - (mapbox.layer.paint.fill-outline-color). Has an - effect only when `type` is set to "fill". - Returns ------- plotly.graph_objs.layout.mapbox.layer.Fill @@ -195,8 +137,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # line - # ---- @property def line(self): """ @@ -206,20 +146,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - dash - Sets the length of dashes and gaps - (mapbox.layer.paint.line-dasharray). Has an - effect only when `type` is set to "line". - dashsrc - Sets the source reference on Chart Studio Cloud - for `dash`. - width - Sets the line width (mapbox.layer.paint.line- - width). Has an effect only when `type` is set - to "line". - Returns ------- plotly.graph_objs.layout.mapbox.layer.Line @@ -230,8 +156,6 @@ def line(self): def line(self, val): self["line"] = val - # maxzoom - # ------- @property def maxzoom(self): """ @@ -252,8 +176,6 @@ def maxzoom(self): def maxzoom(self, val): self["maxzoom"] = val - # minzoom - # ------- @property def minzoom(self): """ @@ -273,8 +195,6 @@ def minzoom(self): def minzoom(self, val): self["minzoom"] = val - # name - # ---- @property def name(self): """ @@ -300,8 +220,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -327,8 +245,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # source - # ------ @property def source(self): """ @@ -351,8 +267,6 @@ def source(self): def source(self, val): self["source"] = val - # sourceattribution - # ----------------- @property def sourceattribution(self): """ @@ -372,8 +286,6 @@ def sourceattribution(self): def sourceattribution(self, val): self["sourceattribution"] = val - # sourcelayer - # ----------- @property def sourcelayer(self): """ @@ -395,8 +307,6 @@ def sourcelayer(self): def sourcelayer(self, val): self["sourcelayer"] = val - # sourcetype - # ---------- @property def sourcetype(self): """ @@ -417,8 +327,6 @@ def sourcetype(self): def sourcetype(self, val): self["sourcetype"] = val - # symbol - # ------ @property def symbol(self): """ @@ -428,37 +336,6 @@ def symbol(self): - A dict of string/value properties that will be passed to the Symbol constructor - Supported dict properties: - - icon - Sets the symbol icon image - (mapbox.layer.layout.icon-image). Full list: - https://www.mapbox.com/maki-icons/ - iconsize - Sets the symbol icon size - (mapbox.layer.layout.icon-size). Has an effect - only when `type` is set to "symbol". - placement - Sets the symbol and/or text placement - (mapbox.layer.layout.symbol-placement). If - `placement` is "point", the label is placed - where the geometry is located If `placement` is - "line", the label is placed along the line of - the geometry If `placement` is "line-center", - the label is placed on the center of the - geometry - text - Sets the symbol text (mapbox.layer.layout.text- - field). - textfont - Sets the icon text font - (color=mapbox.layer.paint.text-color, - size=mapbox.layer.layout.text-size). Has an - effect only when `type` is set to "symbol". - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - Returns ------- plotly.graph_objs.layout.mapbox.layer.Symbol @@ -469,8 +346,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -497,8 +372,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # type - # ---- @property def type(self): """ @@ -525,8 +398,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -545,8 +416,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -653,24 +522,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - below=None, - circle=None, - color=None, - coordinates=None, - fill=None, - line=None, - maxzoom=None, - minzoom=None, - name=None, - opacity=None, - source=None, - sourceattribution=None, - sourcelayer=None, - sourcetype=None, - symbol=None, - templateitemname=None, - type=None, - visible=None, + below: str | None = None, + circle: None | None = None, + color: str | None = None, + coordinates: Any | None = None, + fill: None | None = None, + line: None | None = None, + maxzoom: int | float | None = None, + minzoom: int | float | None = None, + name: str | None = None, + opacity: int | float | None = None, + source: Any | None = None, + sourceattribution: str | None = None, + sourcelayer: str | None = None, + sourcetype: Any | None = None, + symbol: None | None = None, + templateitemname: str | None = None, + type: Any | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -785,14 +654,11 @@ def __init__( ------- Layer """ - super(Layer, self).__init__("layers") - + super().__init__("layers") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -807,90 +673,26 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.mapbox.Layer`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("below", None) - _v = below if below is not None else _v - if _v is not None: - self["below"] = _v - _v = arg.pop("circle", None) - _v = circle if circle is not None else _v - if _v is not None: - self["circle"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coordinates", None) - _v = coordinates if coordinates is not None else _v - if _v is not None: - self["coordinates"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxzoom", None) - _v = maxzoom if maxzoom is not None else _v - if _v is not None: - self["maxzoom"] = _v - _v = arg.pop("minzoom", None) - _v = minzoom if minzoom is not None else _v - if _v is not None: - self["minzoom"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("source", None) - _v = source if source is not None else _v - if _v is not None: - self["source"] = _v - _v = arg.pop("sourceattribution", None) - _v = sourceattribution if sourceattribution is not None else _v - if _v is not None: - self["sourceattribution"] = _v - _v = arg.pop("sourcelayer", None) - _v = sourcelayer if sourcelayer is not None else _v - if _v is not None: - self["sourcelayer"] = _v - _v = arg.pop("sourcetype", None) - _v = sourcetype if sourcetype is not None else _v - if _v is not None: - self["sourcetype"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("below", arg, below) + self._init_provided("circle", arg, circle) + self._init_provided("color", arg, color) + self._init_provided("coordinates", arg, coordinates) + self._init_provided("fill", arg, fill) + self._init_provided("line", arg, line) + self._init_provided("maxzoom", arg, maxzoom) + self._init_provided("minzoom", arg, minzoom) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("source", arg, source) + self._init_provided("sourceattribution", arg, sourceattribution) + self._init_provided("sourcelayer", arg, sourcelayer) + self._init_provided("sourcetype", arg, sourcetype) + self._init_provided("symbol", arg, symbol) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/layer/__init__.py b/plotly/graph_objs/layout/mapbox/layer/__init__.py index 1d0bf3340b..9a15ea37d2 100644 --- a/plotly/graph_objs/layout/mapbox/layer/__init__.py +++ b/plotly/graph_objs/layout/mapbox/layer/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._circle import Circle - from ._fill import Fill - from ._line import Line - from ._symbol import Symbol - from . import symbol -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".symbol"], - ["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".symbol"], + ["._circle.Circle", "._fill.Fill", "._line.Line", "._symbol.Symbol"], +) diff --git a/plotly/graph_objs/layout/mapbox/layer/_circle.py b/plotly/graph_objs/layout/mapbox/layer/_circle.py index ef45838fc9..e0e0c164cb 100644 --- a/plotly/graph_objs/layout/mapbox/layer/_circle.py +++ b/plotly/graph_objs/layout/mapbox/layer/_circle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Circle(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox.layer" _path_str = "layout.mapbox.layer.circle" _valid_props = {"radius"} - # radius - # ------ @property def radius(self): """ @@ -31,8 +30,6 @@ def radius(self): def radius(self, val): self["radius"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -42,7 +39,7 @@ def _prop_descriptions(self): "circle". """ - def __init__(self, arg=None, radius=None, **kwargs): + def __init__(self, arg=None, radius: int | float | None = None, **kwargs): """ Construct a new Circle object @@ -61,14 +58,11 @@ def __init__(self, arg=None, radius=None, **kwargs): ------- Circle """ - super(Circle, self).__init__("circle") - + super().__init__("circle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -83,22 +77,9 @@ def __init__(self, arg=None, radius=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Circle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("radius", None) - _v = radius if radius is not None else _v - if _v is not None: - self["radius"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("radius", arg, radius) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/layer/_fill.py b/plotly/graph_objs/layout/mapbox/layer/_fill.py index 6b9a02f53f..b3cc32021b 100644 --- a/plotly/graph_objs/layout/mapbox/layer/_fill.py +++ b/plotly/graph_objs/layout/mapbox/layer/_fill.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Fill(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox.layer" _path_str = "layout.mapbox.layer.fill" _valid_props = {"outlinecolor"} - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -23,42 +22,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -81,7 +43,7 @@ def _prop_descriptions(self): to "fill". """ - def __init__(self, arg=None, outlinecolor=None, **kwargs): + def __init__(self, arg=None, outlinecolor: str | None = None, **kwargs): """ Construct a new Fill object @@ -100,14 +62,11 @@ def __init__(self, arg=None, outlinecolor=None, **kwargs): ------- Fill """ - super(Fill, self).__init__("fill") - + super().__init__("fill") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,22 +81,9 @@ def __init__(self, arg=None, outlinecolor=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Fill`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("outlinecolor", arg, outlinecolor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/layer/_line.py b/plotly/graph_objs/layout/mapbox/layer/_line.py index 6831a11c6f..896c53c4c3 100644 --- a/plotly/graph_objs/layout/mapbox/layer/_line.py +++ b/plotly/graph_objs/layout/mapbox/layer/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Line(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox.layer" _path_str = "layout.mapbox.layer.line" _valid_props = {"dash", "dashsrc", "width"} - # dash - # ---- @property def dash(self): """ @@ -23,7 +22,7 @@ def dash(self): Returns ------- - numpy.ndarray + NDArray """ return self["dash"] @@ -31,8 +30,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # dashsrc - # ------- @property def dashsrc(self): """ @@ -51,8 +48,6 @@ def dashsrc(self): def dashsrc(self, val): self["dashsrc"] = val - # width - # ----- @property def width(self): """ @@ -72,8 +67,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -89,7 +82,14 @@ def _prop_descriptions(self): Has an effect only when `type` is set to "line". """ - def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): + def __init__( + self, + arg=None, + dash: NDArray | None = None, + dashsrc: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -114,14 +114,11 @@ def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -136,30 +133,11 @@ def __init__(self, arg=None, dash=None, dashsrc=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("dashsrc", None) - _v = dashsrc if dashsrc is not None else _v - if _v is not None: - self["dashsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dash", arg, dash) + self._init_provided("dashsrc", arg, dashsrc) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/layer/_symbol.py b/plotly/graph_objs/layout/mapbox/layer/_symbol.py index 5545054312..9a409af62c 100644 --- a/plotly/graph_objs/layout/mapbox/layer/_symbol.py +++ b/plotly/graph_objs/layout/mapbox/layer/_symbol.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Symbol(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox.layer" _path_str = "layout.mapbox.layer.symbol" _valid_props = {"icon", "iconsize", "placement", "text", "textfont", "textposition"} - # icon - # ---- @property def icon(self): """ @@ -32,8 +31,6 @@ def icon(self): def icon(self, val): self["icon"] = val - # iconsize - # -------- @property def iconsize(self): """ @@ -53,8 +50,6 @@ def iconsize(self): def iconsize(self, val): self["iconsize"] = val - # placement - # --------- @property def placement(self): """ @@ -79,8 +74,6 @@ def placement(self): def placement(self, val): self["placement"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +93,6 @@ def text(self): def text(self, val): self["text"] = val - # textfont - # -------- @property def textfont(self): """ @@ -115,35 +106,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.mapbox.layer.symbol.Textfont @@ -154,8 +116,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -178,8 +138,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -212,12 +170,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - icon=None, - iconsize=None, - placement=None, - text=None, - textfont=None, - textposition=None, + icon: str | None = None, + iconsize: int | float | None = None, + placement: Any | None = None, + text: str | None = None, + textfont: None | None = None, + textposition: Any | None = None, **kwargs, ): """ @@ -258,14 +216,11 @@ def __init__( ------- Symbol """ - super(Symbol, self).__init__("symbol") - + super().__init__("symbol") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -280,42 +235,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.mapbox.layer.Symbol`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("icon", None) - _v = icon if icon is not None else _v - if _v is not None: - self["icon"] = _v - _v = arg.pop("iconsize", None) - _v = iconsize if iconsize is not None else _v - if _v is not None: - self["iconsize"] = _v - _v = arg.pop("placement", None) - _v = placement if placement is not None else _v - if _v is not None: - self["placement"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("icon", arg, icon) + self._init_provided("iconsize", arg, iconsize) + self._init_provided("placement", arg, placement) + self._init_provided("text", arg, text) + self._init_provided("textfont", arg, textfont) + self._init_provided("textposition", arg, textposition) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py b/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py index 1640397aa7..2afd605560 100644 --- a/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py +++ b/plotly/graph_objs/layout/mapbox/layer/symbol/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._textfont.Textfont"]) diff --git a/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py b/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py index 9902f6b822..283347755d 100644 --- a/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py +++ b/plotly/graph_objs/layout/mapbox/layer/symbol/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Textfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.mapbox.layer.symbol" _path_str = "layout.mapbox.layer.symbol.textfont" _valid_props = {"color", "family", "size", "style", "weight"} - # color - # ----- @property def color(self): """ @@ -20,42 +19,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -67,23 +31,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -98,8 +53,6 @@ def family(self): def family(self, val): self["family"] = val - # size - # ---- @property def size(self): """ @@ -116,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -138,8 +89,6 @@ def style(self): def style(self, val): self["style"] = val - # weight - # ------ @property def weight(self): """ @@ -160,8 +109,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -169,18 +116,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -193,11 +133,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - size=None, - style=None, - weight=None, + color: str | None = None, + family: str | None = None, + size: int | float | None = None, + style: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -217,18 +157,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -241,14 +174,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -263,38 +193,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.mapbox.layer.symbol.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/newselection/__init__.py b/plotly/graph_objs/layout/newselection/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/layout/newselection/__init__.py +++ b/plotly/graph_objs/layout/newselection/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/layout/newselection/_line.py b/plotly/graph_objs/layout/newselection/_line.py index b1a6065cc7..3ade6b08ac 100644 --- a/plotly/graph_objs/layout/newselection/_line.py +++ b/plotly/graph_objs/layout/newselection/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Line(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.newselection" _path_str = "layout.newselection.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -96,8 +58,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -116,8 +76,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -133,7 +91,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -158,14 +123,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -180,30 +142,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.newselection.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/newshape/__init__.py b/plotly/graph_objs/layout/newshape/__init__.py index dd5947b049..ac9079347d 100644 --- a/plotly/graph_objs/layout/newshape/__init__.py +++ b/plotly/graph_objs/layout/newshape/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._label import Label - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from . import label - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".label", ".legendgrouptitle"], - ["._label.Label", "._legendgrouptitle.Legendgrouptitle", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".label", ".legendgrouptitle"], + ["._label.Label", "._legendgrouptitle.Legendgrouptitle", "._line.Line"], +) diff --git a/plotly/graph_objs/layout/newshape/_label.py b/plotly/graph_objs/layout/newshape/_label.py index a4af9fcb2a..eb6e81caa4 100644 --- a/plotly/graph_objs/layout/newshape/_label.py +++ b/plotly/graph_objs/layout/newshape/_label.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Label(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.newshape" _path_str = "layout.newshape.label" _valid_props = { @@ -19,8 +20,6 @@ class Label(_BaseLayoutHierarchyType): "yanchor", } - # font - # ---- @property def font(self): """ @@ -32,52 +31,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.newshape.label.Font @@ -88,8 +41,6 @@ def font(self): def font(self, val): self["font"] = val - # padding - # ------- @property def padding(self): """ @@ -109,8 +60,6 @@ def padding(self): def padding(self, val): self["padding"] = val - # text - # ---- @property def text(self): """ @@ -131,8 +80,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -155,8 +102,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -184,8 +129,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -224,8 +167,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -250,8 +191,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -275,8 +214,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -345,14 +282,14 @@ def _prop_descriptions(self): def __init__( self, arg=None, - font=None, - padding=None, - text=None, - textangle=None, - textposition=None, - texttemplate=None, - xanchor=None, - yanchor=None, + font: None | None = None, + padding: int | float | None = None, + text: str | None = None, + textangle: int | float | None = None, + textposition: Any | None = None, + texttemplate: str | None = None, + xanchor: Any | None = None, + yanchor: Any | None = None, **kwargs, ): """ @@ -429,14 +366,11 @@ def __init__( ------- Label """ - super(Label, self).__init__("label") - + super().__init__("label") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -451,50 +385,16 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.newshape.Label`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("padding", None) - _v = padding if padding is not None else _v - if _v is not None: - self["padding"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("padding", arg, padding) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("textposition", arg, textposition) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("yanchor", arg, yanchor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/newshape/_legendgrouptitle.py b/plotly/graph_objs/layout/newshape/_legendgrouptitle.py index d843bc2bae..5a6a1b77a9 100644 --- a/plotly/graph_objs/layout/newshape/_legendgrouptitle.py +++ b/plotly/graph_objs/layout/newshape/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Legendgrouptitle(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.newshape" _path_str = "layout.newshape.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.newshape.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.newshape.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/newshape/_line.py b/plotly/graph_objs/layout/newshape/_line.py index 9c51291268..3420fa0755 100644 --- a/plotly/graph_objs/layout/newshape/_line.py +++ b/plotly/graph_objs/layout/newshape/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Line(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.newshape" _path_str = "layout.newshape.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -96,8 +58,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -116,8 +76,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -133,7 +91,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -158,14 +123,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -180,30 +142,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.newshape.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/newshape/label/__init__.py b/plotly/graph_objs/layout/newshape/label/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/newshape/label/__init__.py +++ b/plotly/graph_objs/layout/newshape/label/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/newshape/label/_font.py b/plotly/graph_objs/layout/newshape/label/_font.py index 91a86ef4cf..715c92d6e0 100644 --- a/plotly/graph_objs/layout/newshape/label/_font.py +++ b/plotly/graph_objs/layout/newshape/label/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.newshape.label" _path_str = "layout.newshape.label.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.newshape.label.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/newshape/legendgrouptitle/__init__.py b/plotly/graph_objs/layout/newshape/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/newshape/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/layout/newshape/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py b/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py index 83acb231a7..c281c62a33 100644 --- a/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py +++ b/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.newshape.legendgrouptitle" _path_str = "layout.newshape.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.newshape.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/__init__.py b/plotly/graph_objs/layout/polar/__init__.py index d40a455510..b21eef0f2f 100644 --- a/plotly/graph_objs/layout/polar/__init__.py +++ b/plotly/graph_objs/layout/polar/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._angularaxis import AngularAxis - from ._domain import Domain - from ._radialaxis import RadialAxis - from . import angularaxis - from . import radialaxis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".angularaxis", ".radialaxis"], - ["._angularaxis.AngularAxis", "._domain.Domain", "._radialaxis.RadialAxis"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".angularaxis", ".radialaxis"], + ["._angularaxis.AngularAxis", "._domain.Domain", "._radialaxis.RadialAxis"], +) diff --git a/plotly/graph_objs/layout/polar/_angularaxis.py b/plotly/graph_objs/layout/polar/_angularaxis.py index 25ce58b1a5..273b1c5dd4 100644 --- a/plotly/graph_objs/layout/polar/_angularaxis.py +++ b/plotly/graph_objs/layout/polar/_angularaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class AngularAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar" _path_str = "layout.polar.angularaxis" _valid_props = { @@ -60,8 +61,6 @@ class AngularAxis(_BaseLayoutHierarchyType): "visible", } - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -84,8 +83,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -98,7 +95,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -106,8 +103,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -127,8 +122,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -168,8 +161,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -183,42 +174,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -230,8 +186,6 @@ def color(self): def color(self, val): self["color"] = val - # direction - # --------- @property def direction(self): """ @@ -251,8 +205,6 @@ def direction(self): def direction(self, val): self["direction"] = val - # dtick - # ----- @property def dtick(self): """ @@ -289,8 +241,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -314,8 +264,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -326,42 +274,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -373,8 +286,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -399,8 +310,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -419,8 +328,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -449,8 +356,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -476,8 +381,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -502,8 +405,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -514,42 +415,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -561,8 +427,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -581,8 +445,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -602,8 +464,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -626,8 +486,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # period - # ------ @property def period(self): """ @@ -647,8 +505,6 @@ def period(self): def period(self, val): self["period"] = val - # rotation - # -------- @property def rotation(self): """ @@ -674,8 +530,6 @@ def rotation(self): def rotation(self, val): self["rotation"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -694,8 +548,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -718,8 +570,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -739,8 +589,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -759,8 +607,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -779,8 +625,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -803,8 +647,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -824,8 +666,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thetaunit - # --------- @property def thetaunit(self): """ @@ -846,8 +686,6 @@ def thetaunit(self): def thetaunit(self, val): self["thetaunit"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -873,8 +711,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -897,8 +733,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -909,42 +743,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -956,8 +755,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -969,52 +766,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.polar.angularaxis.Tickfont @@ -1025,8 +776,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1055,8 +804,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1066,42 +813,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.polar.angularaxis.Tickformatstop] @@ -1112,8 +823,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1127,8 +836,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.polar.angularaxis.Tickformatstop @@ -1139,8 +846,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1165,8 +870,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1185,8 +888,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1212,8 +913,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1233,8 +932,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1256,8 +953,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1277,8 +972,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1291,7 +984,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1299,8 +992,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1319,8 +1010,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1332,7 +1021,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1340,8 +1029,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1360,8 +1047,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1380,8 +1065,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # type - # ---- @property def type(self): """ @@ -1404,8 +1087,6 @@ def type(self): def type(self, val): self["type"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1424,8 +1105,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1446,8 +1125,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1709,55 +1386,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autotypenumbers=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - direction=None, - dtick=None, - exponentformat=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - minexponent=None, - nticks=None, - period=None, - rotation=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thetaunit=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - type=None, - uirevision=None, - visible=None, + autotypenumbers: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + direction: Any | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + period: int | float | None = None, + rotation: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thetaunit: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + type: Any | None = None, + uirevision: Any | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -2027,14 +1704,11 @@ def __init__( ------- AngularAxis """ - super(AngularAxis, self).__init__("angularaxis") - + super().__init__("angularaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2049,214 +1723,57 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.AngularAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("direction", None) - _v = direction if direction is not None else _v - if _v is not None: - self["direction"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("period", None) - _v = period if period is not None else _v - if _v is not None: - self["period"] = _v - _v = arg.pop("rotation", None) - _v = rotation if rotation is not None else _v - if _v is not None: - self["rotation"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thetaunit", None) - _v = thetaunit if thetaunit is not None else _v - if _v is not None: - self["thetaunit"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("direction", arg, direction) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("period", arg, period) + self._init_provided("rotation", arg, rotation) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thetaunit", arg, thetaunit) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("type", arg, type) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/_domain.py b/plotly/graph_objs/layout/polar/_domain.py index 9850010fd9..26a16c6be8 100644 --- a/plotly/graph_objs/layout/polar/_domain.py +++ b/plotly/graph_objs/layout/polar/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar" _path_str = "layout.polar.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.polar.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/_radialaxis.py b/plotly/graph_objs/layout/polar/_radialaxis.py index 53c916777b..da7cce0c12 100644 --- a/plotly/graph_objs/layout/polar/_radialaxis.py +++ b/plotly/graph_objs/layout/polar/_radialaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class RadialAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar" _path_str = "layout.polar.radialaxis" _valid_props = { @@ -67,8 +68,6 @@ class RadialAxis(_BaseLayoutHierarchyType): "visible", } - # angle - # ----- @property def angle(self): """ @@ -93,8 +92,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # autorange - # --------- @property def autorange(self): """ @@ -124,8 +121,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autorangeoptions - # ---------------- @property def autorangeoptions(self): """ @@ -135,26 +130,6 @@ def autorangeoptions(self): - A dict of string/value properties that will be passed to the Autorangeoptions constructor - Supported dict properties: - - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. - Returns ------- plotly.graph_objs.layout.polar.radialaxis.Autorangeoptions @@ -165,8 +140,6 @@ def autorangeoptions(self): def autorangeoptions(self, val): self["autorangeoptions"] = val - # autotickangles - # -------------- @property def autotickangles(self): """ @@ -191,8 +164,6 @@ def autotickangles(self): def autotickangles(self, val): self["autotickangles"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -215,8 +186,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # calendar - # -------- @property def calendar(self): """ @@ -242,8 +211,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -256,7 +223,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -264,8 +231,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -285,8 +250,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -326,8 +289,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -341,42 +302,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -388,8 +314,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -426,8 +350,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -451,8 +373,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -463,42 +383,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -510,8 +395,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -536,8 +419,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -556,8 +437,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -586,8 +465,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -613,8 +490,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -639,8 +514,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -651,42 +524,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -698,8 +536,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -718,8 +554,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -737,8 +571,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -756,8 +588,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -777,8 +607,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -801,8 +629,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -833,12 +659,10 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ - If *tozero*`, the range extends to 0, regardless of the input + If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. If "normal", the range is computed in relation to the extrema of the input data (same behavior as for @@ -858,8 +682,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -878,8 +700,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -902,8 +722,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -923,8 +741,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -943,8 +759,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -963,8 +777,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -987,8 +799,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1008,8 +818,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # side - # ---- @property def side(self): """ @@ -1030,8 +838,6 @@ def side(self): def side(self, val): self["side"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1057,8 +863,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1081,8 +885,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -1093,42 +895,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1140,8 +907,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -1153,52 +918,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.polar.radialaxis.Tickfont @@ -1209,8 +928,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1239,8 +956,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1250,42 +965,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.polar.radialaxis.Tickformatstop] @@ -1296,8 +975,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1311,8 +988,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.polar.radialaxis.Tickformatstop @@ -1323,8 +998,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1349,8 +1022,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1369,8 +1040,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1396,8 +1065,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1417,8 +1084,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1440,8 +1105,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1461,8 +1124,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1475,7 +1136,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1483,8 +1144,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1503,8 +1162,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1516,7 +1173,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1524,8 +1181,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1544,8 +1199,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1564,8 +1217,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1575,13 +1226,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.polar.radialaxis.Title @@ -1592,8 +1236,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -1615,8 +1257,6 @@ def type(self): def type(self, val): self["type"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1636,8 +1276,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # visible - # ------- @property def visible(self): """ @@ -1658,8 +1296,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1831,7 +1467,7 @@ def _prop_descriptions(self): appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode - If *tozero*`, the range extends to 0, regardless of the + If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. If "normal", the range is computed in relation to the extrema of the input data @@ -1965,62 +1601,62 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - autorange=None, - autorangeoptions=None, - autotickangles=None, - autotypenumbers=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - maxallowed=None, - minallowed=None, - minexponent=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - type=None, - uirevision=None, - visible=None, + angle: int | float | None = None, + autorange: Any | None = None, + autorangeoptions: None | None = None, + autotickangles: list | None = None, + autotypenumbers: Any | None = None, + calendar: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + range: list | None = None, + rangemode: Any | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + side: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + type: Any | None = None, + uirevision: Any | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -2200,7 +1836,7 @@ def __init__( appears. Leaving either or both elements `null` impacts the default `autorange`. rangemode - If *tozero*`, the range extends to 0, regardless of the + If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. If "normal", the range is computed in relation to the extrema of the input data @@ -2334,14 +1970,11 @@ def __init__( ------- RadialAxis """ - super(RadialAxis, self).__init__("radialaxis") - + super().__init__("radialaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2356,242 +1989,64 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.RadialAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autorangeoptions", None) - _v = autorangeoptions if autorangeoptions is not None else _v - if _v is not None: - self["autorangeoptions"] = _v - _v = arg.pop("autotickangles", None) - _v = autotickangles if autotickangles is not None else _v - if _v is not None: - self["autotickangles"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("autorange", arg, autorange) + self._init_provided("autorangeoptions", arg, autorangeoptions) + self._init_provided("autotickangles", arg, autotickangles) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("calendar", arg, calendar) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("side", arg, side) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) + self._init_provided("uirevision", arg, uirevision) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/angularaxis/__init__.py b/plotly/graph_objs/layout/polar/angularaxis/__init__.py index ae53e8859f..a1ed04a04e 100644 --- a/plotly/graph_objs/layout/polar/angularaxis/__init__.py +++ b/plotly/graph_objs/layout/polar/angularaxis/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop"] +) diff --git a/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py b/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py index 8254cd3aed..6c06f18027 100644 --- a/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py +++ b/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.angularaxis" _path_str = "layout.polar.angularaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py b/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py index 5755c26e99..f4310d89ba 100644 --- a/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/polar/angularaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.angularaxis" _path_str = "layout.polar.angularaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.angularaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/radialaxis/__init__.py b/plotly/graph_objs/layout/polar/radialaxis/__init__.py index 7004d6695b..72774d8afa 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/__init__.py +++ b/plotly/graph_objs/layout/polar/radialaxis/__init__.py @@ -1,22 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._autorangeoptions import Autorangeoptions - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - [ - "._autorangeoptions.Autorangeoptions", - "._tickfont.Tickfont", - "._tickformatstop.Tickformatstop", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + [ + "._autorangeoptions.Autorangeoptions", + "._tickfont.Tickfont", + "._tickformatstop.Tickformatstop", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/layout/polar/radialaxis/_autorangeoptions.py b/plotly/graph_objs/layout/polar/radialaxis/_autorangeoptions.py index 15276a0d8b..d68c7868ca 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/_autorangeoptions.py +++ b/plotly/graph_objs/layout/polar/radialaxis/_autorangeoptions.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Autorangeoptions(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.radialaxis" _path_str = "layout.polar.radialaxis.autorangeoptions" _valid_props = { @@ -17,8 +18,6 @@ class Autorangeoptions(_BaseLayoutHierarchyType): "minallowed", } - # clipmax - # ------- @property def clipmax(self): """ @@ -37,8 +36,6 @@ def clipmax(self): def clipmax(self, val): self["clipmax"] = val - # clipmin - # ------- @property def clipmin(self): """ @@ -57,8 +54,6 @@ def clipmin(self): def clipmin(self, val): self["clipmin"] = val - # include - # ------- @property def include(self): """ @@ -68,7 +63,7 @@ def include(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["include"] @@ -76,8 +71,6 @@ def include(self): def include(self, val): self["include"] = val - # includesrc - # ---------- @property def includesrc(self): """ @@ -96,8 +89,6 @@ def includesrc(self): def includesrc(self, val): self["includesrc"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -115,8 +106,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -134,8 +123,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - clipmax=None, - clipmin=None, - include=None, - includesrc=None, - maxallowed=None, - minallowed=None, + clipmax: Any | None = None, + clipmin: Any | None = None, + include: Any | None = None, + includesrc: str | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, **kwargs, ): """ @@ -200,14 +187,11 @@ def __init__( ------- Autorangeoptions """ - super(Autorangeoptions, self).__init__("autorangeoptions") - + super().__init__("autorangeoptions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -222,42 +206,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Autorangeoptions`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("clipmax", None) - _v = clipmax if clipmax is not None else _v - if _v is not None: - self["clipmax"] = _v - _v = arg.pop("clipmin", None) - _v = clipmin if clipmin is not None else _v - if _v is not None: - self["clipmin"] = _v - _v = arg.pop("include", None) - _v = include if include is not None else _v - if _v is not None: - self["include"] = _v - _v = arg.pop("includesrc", None) - _v = includesrc if includesrc is not None else _v - if _v is not None: - self["includesrc"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("clipmax", arg, clipmax) + self._init_provided("clipmin", arg, clipmin) + self._init_provided("include", arg, include) + self._init_provided("includesrc", arg, includesrc) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py b/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py index c5b5f6fa4e..b81206df50 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py +++ b/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.radialaxis" _path_str = "layout.polar.radialaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py b/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py index 720199cfb2..65419836b2 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/polar/radialaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.radialaxis" _path_str = "layout.polar.radialaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/radialaxis/_title.py b/plotly/graph_objs/layout/polar/radialaxis/_title.py index 07a9decdba..f5beb3ac7a 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/_title.py +++ b/plotly/graph_objs/layout/polar/radialaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.radialaxis" _path_str = "layout.polar.radialaxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.polar.radialaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py b/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py +++ b/plotly/graph_objs/layout/polar/radialaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/polar/radialaxis/title/_font.py b/plotly/graph_objs/layout/polar/radialaxis/title/_font.py index c3a6f3d8a3..354393ba7c 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/title/_font.py +++ b/plotly/graph_objs/layout/polar/radialaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.polar.radialaxis.title" _path_str = "layout.polar.radialaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.polar.radialaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/__init__.py b/plotly/graph_objs/layout/scene/__init__.py index 3e5e2f1ee4..c6a1c5c3e2 100644 --- a/plotly/graph_objs/layout/scene/__init__.py +++ b/plotly/graph_objs/layout/scene/__init__.py @@ -1,32 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._annotation import Annotation - from ._aspectratio import Aspectratio - from ._camera import Camera - from ._domain import Domain - from ._xaxis import XAxis - from ._yaxis import YAxis - from ._zaxis import ZAxis - from . import annotation - from . import camera - from . import xaxis - from . import yaxis - from . import zaxis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".annotation", ".camera", ".xaxis", ".yaxis", ".zaxis"], - [ - "._annotation.Annotation", - "._aspectratio.Aspectratio", - "._camera.Camera", - "._domain.Domain", - "._xaxis.XAxis", - "._yaxis.YAxis", - "._zaxis.ZAxis", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".annotation", ".camera", ".xaxis", ".yaxis", ".zaxis"], + [ + "._annotation.Annotation", + "._aspectratio.Aspectratio", + "._camera.Camera", + "._domain.Domain", + "._xaxis.XAxis", + "._yaxis.YAxis", + "._zaxis.ZAxis", + ], +) diff --git a/plotly/graph_objs/layout/scene/_annotation.py b/plotly/graph_objs/layout/scene/_annotation.py index be9baaf5a1..52d7ca887f 100644 --- a/plotly/graph_objs/layout/scene/_annotation.py +++ b/plotly/graph_objs/layout/scene/_annotation.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Annotation(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.annotation" _valid_props = { @@ -48,8 +49,6 @@ class Annotation(_BaseLayoutHierarchyType): "z", } - # align - # ----- @property def align(self): """ @@ -72,8 +71,6 @@ def align(self): def align(self, val): self["align"] = val - # arrowcolor - # ---------- @property def arrowcolor(self): """ @@ -84,42 +81,7 @@ def arrowcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -131,8 +93,6 @@ def arrowcolor(self): def arrowcolor(self, val): self["arrowcolor"] = val - # arrowhead - # --------- @property def arrowhead(self): """ @@ -152,8 +112,6 @@ def arrowhead(self): def arrowhead(self, val): self["arrowhead"] = val - # arrowside - # --------- @property def arrowside(self): """ @@ -175,8 +133,6 @@ def arrowside(self): def arrowside(self, val): self["arrowside"] = val - # arrowsize - # --------- @property def arrowsize(self): """ @@ -197,8 +153,6 @@ def arrowsize(self): def arrowsize(self, val): self["arrowsize"] = val - # arrowwidth - # ---------- @property def arrowwidth(self): """ @@ -217,8 +171,6 @@ def arrowwidth(self): def arrowwidth(self, val): self["arrowwidth"] = val - # ax - # -- @property def ax(self): """ @@ -238,8 +190,6 @@ def ax(self): def ax(self, val): self["ax"] = val - # ay - # -- @property def ay(self): """ @@ -259,8 +209,6 @@ def ay(self): def ay(self, val): self["ay"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -271,42 +219,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -318,8 +231,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -330,42 +241,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -377,8 +253,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderpad - # --------- @property def borderpad(self): """ @@ -398,8 +272,6 @@ def borderpad(self): def borderpad(self, val): self["borderpad"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -419,8 +291,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # captureevents - # ------------- @property def captureevents(self): """ @@ -444,8 +314,6 @@ def captureevents(self): def captureevents(self, val): self["captureevents"] = val - # font - # ---- @property def font(self): """ @@ -457,52 +325,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.annotation.Font @@ -513,8 +335,6 @@ def font(self): def font(self, val): self["font"] = val - # height - # ------ @property def height(self): """ @@ -534,8 +354,6 @@ def height(self): def height(self, val): self["height"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -545,21 +363,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. - Returns ------- plotly.graph_objs.layout.scene.annotation.Hoverlabel @@ -570,8 +373,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertext - # --------- @property def hovertext(self): """ @@ -592,8 +393,6 @@ def hovertext(self): def hovertext(self, val): self["hovertext"] = val - # name - # ---- @property def name(self): """ @@ -619,8 +418,6 @@ def name(self): def name(self, val): self["name"] = val - # opacity - # ------- @property def opacity(self): """ @@ -639,8 +436,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # showarrow - # --------- @property def showarrow(self): """ @@ -661,8 +456,6 @@ def showarrow(self): def showarrow(self, val): self["showarrow"] = val - # standoff - # -------- @property def standoff(self): """ @@ -685,8 +478,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # startarrowhead - # -------------- @property def startarrowhead(self): """ @@ -706,8 +497,6 @@ def startarrowhead(self): def startarrowhead(self, val): self["startarrowhead"] = val - # startarrowsize - # -------------- @property def startarrowsize(self): """ @@ -728,8 +517,6 @@ def startarrowsize(self): def startarrowsize(self, val): self["startarrowsize"] = val - # startstandoff - # ------------- @property def startstandoff(self): """ @@ -752,8 +539,6 @@ def startstandoff(self): def startstandoff(self, val): self["startstandoff"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -780,8 +565,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # text - # ---- @property def text(self): """ @@ -804,8 +587,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -827,8 +608,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # valign - # ------ @property def valign(self): """ @@ -850,8 +629,6 @@ def valign(self): def valign(self, val): self["valign"] = val - # visible - # ------- @property def visible(self): """ @@ -870,8 +647,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -892,8 +667,6 @@ def width(self): def width(self, val): self["width"] = val - # x - # - @property def x(self): """ @@ -911,8 +684,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -940,8 +711,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xshift - # ------ @property def xshift(self): """ @@ -961,8 +730,6 @@ def xshift(self): def xshift(self, val): self["xshift"] = val - # y - # - @property def y(self): """ @@ -980,8 +747,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1009,8 +774,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # yshift - # ------ @property def yshift(self): """ @@ -1030,8 +793,6 @@ def yshift(self): def yshift(self, val): self["yshift"] = val - # z - # - @property def z(self): """ @@ -1049,8 +810,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1215,43 +974,43 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - arrowcolor=None, - arrowhead=None, - arrowside=None, - arrowsize=None, - arrowwidth=None, - ax=None, - ay=None, - bgcolor=None, - bordercolor=None, - borderpad=None, - borderwidth=None, - captureevents=None, - font=None, - height=None, - hoverlabel=None, - hovertext=None, - name=None, - opacity=None, - showarrow=None, - standoff=None, - startarrowhead=None, - startarrowsize=None, - startstandoff=None, - templateitemname=None, - text=None, - textangle=None, - valign=None, - visible=None, - width=None, - x=None, - xanchor=None, - xshift=None, - y=None, - yanchor=None, - yshift=None, - z=None, + align: Any | None = None, + arrowcolor: str | None = None, + arrowhead: int | None = None, + arrowside: Any | None = None, + arrowsize: int | float | None = None, + arrowwidth: int | float | None = None, + ax: int | float | None = None, + ay: int | float | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderpad: int | float | None = None, + borderwidth: int | float | None = None, + captureevents: bool | None = None, + font: None | None = None, + height: int | float | None = None, + hoverlabel: None | None = None, + hovertext: str | None = None, + name: str | None = None, + opacity: int | float | None = None, + showarrow: bool | None = None, + standoff: int | float | None = None, + startarrowhead: int | None = None, + startarrowsize: int | float | None = None, + startstandoff: int | float | None = None, + templateitemname: str | None = None, + text: str | None = None, + textangle: int | float | None = None, + valign: Any | None = None, + visible: bool | None = None, + width: int | float | None = None, + x: Any | None = None, + xanchor: Any | None = None, + xshift: int | float | None = None, + y: Any | None = None, + yanchor: Any | None = None, + yshift: int | float | None = None, + z: Any | None = None, **kwargs, ): """ @@ -1424,14 +1183,11 @@ def __init__( ------- Annotation """ - super(Annotation, self).__init__("annotations") - + super().__init__("annotations") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1446,166 +1202,45 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.Annotation`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("arrowcolor", None) - _v = arrowcolor if arrowcolor is not None else _v - if _v is not None: - self["arrowcolor"] = _v - _v = arg.pop("arrowhead", None) - _v = arrowhead if arrowhead is not None else _v - if _v is not None: - self["arrowhead"] = _v - _v = arg.pop("arrowside", None) - _v = arrowside if arrowside is not None else _v - if _v is not None: - self["arrowside"] = _v - _v = arg.pop("arrowsize", None) - _v = arrowsize if arrowsize is not None else _v - if _v is not None: - self["arrowsize"] = _v - _v = arg.pop("arrowwidth", None) - _v = arrowwidth if arrowwidth is not None else _v - if _v is not None: - self["arrowwidth"] = _v - _v = arg.pop("ax", None) - _v = ax if ax is not None else _v - if _v is not None: - self["ax"] = _v - _v = arg.pop("ay", None) - _v = ay if ay is not None else _v - if _v is not None: - self["ay"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderpad", None) - _v = borderpad if borderpad is not None else _v - if _v is not None: - self["borderpad"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("captureevents", None) - _v = captureevents if captureevents is not None else _v - if _v is not None: - self["captureevents"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("height", None) - _v = height if height is not None else _v - if _v is not None: - self["height"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertext", None) - _v = hovertext if hovertext is not None else _v - if _v is not None: - self["hovertext"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("showarrow", None) - _v = showarrow if showarrow is not None else _v - if _v is not None: - self["showarrow"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("startarrowhead", None) - _v = startarrowhead if startarrowhead is not None else _v - if _v is not None: - self["startarrowhead"] = _v - _v = arg.pop("startarrowsize", None) - _v = startarrowsize if startarrowsize is not None else _v - if _v is not None: - self["startarrowsize"] = _v - _v = arg.pop("startstandoff", None) - _v = startstandoff if startstandoff is not None else _v - if _v is not None: - self["startstandoff"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("valign", None) - _v = valign if valign is not None else _v - if _v is not None: - self["valign"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xshift", None) - _v = xshift if xshift is not None else _v - if _v is not None: - self["xshift"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("yshift", None) - _v = yshift if yshift is not None else _v - if _v is not None: - self["yshift"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("arrowcolor", arg, arrowcolor) + self._init_provided("arrowhead", arg, arrowhead) + self._init_provided("arrowside", arg, arrowside) + self._init_provided("arrowsize", arg, arrowsize) + self._init_provided("arrowwidth", arg, arrowwidth) + self._init_provided("ax", arg, ax) + self._init_provided("ay", arg, ay) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderpad", arg, borderpad) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("captureevents", arg, captureevents) + self._init_provided("font", arg, font) + self._init_provided("height", arg, height) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertext", arg, hovertext) + self._init_provided("name", arg, name) + self._init_provided("opacity", arg, opacity) + self._init_provided("showarrow", arg, showarrow) + self._init_provided("standoff", arg, standoff) + self._init_provided("startarrowhead", arg, startarrowhead) + self._init_provided("startarrowsize", arg, startarrowsize) + self._init_provided("startstandoff", arg, startstandoff) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("valign", arg, valign) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xshift", arg, xshift) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("yshift", arg, yshift) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/_aspectratio.py b/plotly/graph_objs/layout/scene/_aspectratio.py index 2425505256..d1b89bb91e 100644 --- a/plotly/graph_objs/layout/scene/_aspectratio.py +++ b/plotly/graph_objs/layout/scene/_aspectratio.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Aspectratio(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.aspectratio" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -28,8 +27,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -46,8 +43,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -64,8 +59,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +70,14 @@ def _prop_descriptions(self): """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Aspectratio object @@ -100,14 +100,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Aspectratio """ - super(Aspectratio, self).__init__("aspectratio") - + super().__init__("aspectratio") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,30 +119,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.Aspectratio`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/_camera.py b/plotly/graph_objs/layout/scene/_camera.py index e824e0ba54..49841b8e8f 100644 --- a/plotly/graph_objs/layout/scene/_camera.py +++ b/plotly/graph_objs/layout/scene/_camera.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Camera(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.camera" _valid_props = {"center", "eye", "projection", "up"} - # center - # ------ @property def center(self): """ @@ -25,14 +24,6 @@ def center(self): - A dict of string/value properties that will be passed to the Center constructor - Supported dict properties: - - x - - y - - z - Returns ------- plotly.graph_objs.layout.scene.camera.Center @@ -43,8 +34,6 @@ def center(self): def center(self, val): self["center"] = val - # eye - # --- @property def eye(self): """ @@ -58,14 +47,6 @@ def eye(self): - A dict of string/value properties that will be passed to the Eye constructor - Supported dict properties: - - x - - y - - z - Returns ------- plotly.graph_objs.layout.scene.camera.Eye @@ -76,8 +57,6 @@ def eye(self): def eye(self, val): self["eye"] = val - # projection - # ---------- @property def projection(self): """ @@ -87,13 +66,6 @@ def projection(self): - A dict of string/value properties that will be passed to the Projection constructor - Supported dict properties: - - type - Sets the projection type. The projection type - could be either "perspective" or - "orthographic". The default is "perspective". - Returns ------- plotly.graph_objs.layout.scene.camera.Projection @@ -104,8 +76,6 @@ def projection(self): def projection(self, val): self["projection"] = val - # up - # -- @property def up(self): """ @@ -120,14 +90,6 @@ def up(self): - A dict of string/value properties that will be passed to the Up constructor - Supported dict properties: - - x - - y - - z - Returns ------- plotly.graph_objs.layout.scene.camera.Up @@ -138,8 +100,6 @@ def up(self): def up(self, val): self["up"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -163,7 +123,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, center=None, eye=None, projection=None, up=None, **kwargs + self, + arg=None, + center: None | None = None, + eye: None | None = None, + projection: None | None = None, + up: None | None = None, + **kwargs, ): """ Construct a new Camera object @@ -196,14 +162,11 @@ def __init__( ------- Camera """ - super(Camera, self).__init__("camera") - + super().__init__("camera") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -218,34 +181,12 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.Camera`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("center", None) - _v = center if center is not None else _v - if _v is not None: - self["center"] = _v - _v = arg.pop("eye", None) - _v = eye if eye is not None else _v - if _v is not None: - self["eye"] = _v - _v = arg.pop("projection", None) - _v = projection if projection is not None else _v - if _v is not None: - self["projection"] = _v - _v = arg.pop("up", None) - _v = up if up is not None else _v - if _v is not None: - self["up"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("center", arg, center) + self._init_provided("eye", arg, eye) + self._init_provided("projection", arg, projection) + self._init_provided("up", arg, up) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/_domain.py b/plotly/graph_objs/layout/scene/_domain.py index 15bb284ced..e62780237a 100644 --- a/plotly/graph_objs/layout/scene/_domain.py +++ b/plotly/graph_objs/layout/scene/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/_xaxis.py b/plotly/graph_objs/layout/scene/_xaxis.py index 8946252620..b35e567904 100644 --- a/plotly/graph_objs/layout/scene/_xaxis.py +++ b/plotly/graph_objs/layout/scene/_xaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class XAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.xaxis" _valid_props = { @@ -71,8 +72,6 @@ class XAxis(_BaseLayoutHierarchyType): "zerolinewidth", } - # autorange - # --------- @property def autorange(self): """ @@ -102,8 +101,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autorangeoptions - # ---------------- @property def autorangeoptions(self): """ @@ -113,26 +110,6 @@ def autorangeoptions(self): - A dict of string/value properties that will be passed to the Autorangeoptions constructor - Supported dict properties: - - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. - Returns ------- plotly.graph_objs.layout.scene.xaxis.Autorangeoptions @@ -143,8 +120,6 @@ def autorangeoptions(self): def autorangeoptions(self, val): self["autorangeoptions"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -167,8 +142,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # backgroundcolor - # --------------- @property def backgroundcolor(self): """ @@ -179,42 +152,7 @@ def backgroundcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -226,8 +164,6 @@ def backgroundcolor(self): def backgroundcolor(self, val): self["backgroundcolor"] = val - # calendar - # -------- @property def calendar(self): """ @@ -253,8 +189,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -267,7 +201,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -275,8 +209,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -296,8 +228,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -337,8 +267,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -352,42 +280,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -399,8 +292,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -437,8 +328,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -462,8 +351,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -474,42 +361,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -521,8 +373,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -541,8 +391,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -571,8 +419,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -598,8 +444,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -610,42 +454,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -657,8 +466,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -677,8 +484,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -696,8 +501,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -715,8 +518,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -736,8 +537,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # mirror - # ------ @property def mirror(self): """ @@ -762,8 +561,6 @@ def mirror(self): def mirror(self, val): self["mirror"] = val - # nticks - # ------ @property def nticks(self): """ @@ -786,8 +583,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -818,13 +613,11 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -843,8 +636,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -863,8 +654,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showaxeslabels - # -------------- @property def showaxeslabels(self): """ @@ -883,8 +672,6 @@ def showaxeslabels(self): def showaxeslabels(self, val): self["showaxeslabels"] = val - # showbackground - # -------------- @property def showbackground(self): """ @@ -903,8 +690,6 @@ def showbackground(self): def showbackground(self, val): self["showbackground"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -927,8 +712,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -948,8 +731,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -968,8 +749,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showspikes - # ---------- @property def showspikes(self): """ @@ -989,8 +768,6 @@ def showspikes(self): def showspikes(self, val): self["showspikes"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1009,8 +786,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1033,8 +808,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1054,8 +827,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # spikecolor - # ---------- @property def spikecolor(self): """ @@ -1066,42 +837,7 @@ def spikecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1113,8 +849,6 @@ def spikecolor(self): def spikecolor(self, val): self["spikecolor"] = val - # spikesides - # ---------- @property def spikesides(self): """ @@ -1134,8 +868,6 @@ def spikesides(self): def spikesides(self, val): self["spikesides"] = val - # spikethickness - # -------------- @property def spikethickness(self): """ @@ -1154,8 +886,6 @@ def spikethickness(self): def spikethickness(self, val): self["spikethickness"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1181,8 +911,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1205,8 +933,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -1217,42 +943,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1264,8 +955,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -1277,52 +966,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.xaxis.Tickfont @@ -1333,8 +976,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1363,8 +1004,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1374,42 +1013,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.scene.xaxis.Tickformatstop] @@ -1420,8 +1023,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1436,8 +1037,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.scene.xaxis.Tickformatstop @@ -1448,8 +1047,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1468,8 +1065,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1495,8 +1090,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1516,8 +1109,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1539,8 +1130,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1560,8 +1149,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1574,7 +1161,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1582,8 +1169,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1602,8 +1187,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1615,7 +1198,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1623,8 +1206,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1643,8 +1224,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1663,8 +1242,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1674,13 +1251,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.scene.xaxis.Title @@ -1691,8 +1261,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -1714,8 +1282,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -1736,8 +1302,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # zeroline - # -------- @property def zeroline(self): """ @@ -1758,8 +1322,6 @@ def zeroline(self): def zeroline(self, val): self["zeroline"] = val - # zerolinecolor - # ------------- @property def zerolinecolor(self): """ @@ -1770,42 +1332,7 @@ def zerolinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1817,8 +1344,6 @@ def zerolinecolor(self): def zerolinecolor(self, val): self["zerolinecolor"] = val - # zerolinewidth - # ------------- @property def zerolinewidth(self): """ @@ -1837,8 +1362,6 @@ def zerolinewidth(self): def zerolinewidth(self, val): self["zerolinewidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1997,7 +1520,7 @@ def _prop_descriptions(self): the default `autorange`. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -2138,66 +1661,66 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autorange=None, - autorangeoptions=None, - autotypenumbers=None, - backgroundcolor=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - linecolor=None, - linewidth=None, - maxallowed=None, - minallowed=None, - minexponent=None, - mirror=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showaxeslabels=None, - showbackground=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - spikecolor=None, - spikesides=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - type=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, + autorange: Any | None = None, + autorangeoptions: None | None = None, + autotypenumbers: Any | None = None, + backgroundcolor: str | None = None, + calendar: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, + minexponent: int | float | None = None, + mirror: Any | None = None, + nticks: int | None = None, + range: list | None = None, + rangemode: Any | None = None, + separatethousands: bool | None = None, + showaxeslabels: bool | None = None, + showbackground: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showspikes: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + spikecolor: str | None = None, + spikesides: bool | None = None, + spikethickness: int | float | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + type: Any | None = None, + visible: bool | None = None, + zeroline: bool | None = None, + zerolinecolor: str | None = None, + zerolinewidth: int | float | None = None, **kwargs, ): """ @@ -2364,7 +1887,7 @@ def __init__( the default `autorange`. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -2505,14 +2028,11 @@ def __init__( ------- XAxis """ - super(XAxis, self).__init__("xaxis") - + super().__init__("xaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2527,258 +2047,68 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.XAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autorangeoptions", None) - _v = autorangeoptions if autorangeoptions is not None else _v - if _v is not None: - self["autorangeoptions"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("backgroundcolor", None) - _v = backgroundcolor if backgroundcolor is not None else _v - if _v is not None: - self["backgroundcolor"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("mirror", None) - _v = mirror if mirror is not None else _v - if _v is not None: - self["mirror"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showaxeslabels", None) - _v = showaxeslabels if showaxeslabels is not None else _v - if _v is not None: - self["showaxeslabels"] = _v - _v = arg.pop("showbackground", None) - _v = showbackground if showbackground is not None else _v - if _v is not None: - self["showbackground"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showspikes", None) - _v = showspikes if showspikes is not None else _v - if _v is not None: - self["showspikes"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("spikecolor", None) - _v = spikecolor if spikecolor is not None else _v - if _v is not None: - self["spikecolor"] = _v - _v = arg.pop("spikesides", None) - _v = spikesides if spikesides is not None else _v - if _v is not None: - self["spikesides"] = _v - _v = arg.pop("spikethickness", None) - _v = spikethickness if spikethickness is not None else _v - if _v is not None: - self["spikethickness"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("zeroline", None) - _v = zeroline if zeroline is not None else _v - if _v is not None: - self["zeroline"] = _v - _v = arg.pop("zerolinecolor", None) - _v = zerolinecolor if zerolinecolor is not None else _v - if _v is not None: - self["zerolinecolor"] = _v - _v = arg.pop("zerolinewidth", None) - _v = zerolinewidth if zerolinewidth is not None else _v - if _v is not None: - self["zerolinewidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autorange", arg, autorange) + self._init_provided("autorangeoptions", arg, autorangeoptions) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("backgroundcolor", arg, backgroundcolor) + self._init_provided("calendar", arg, calendar) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("mirror", arg, mirror) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showaxeslabels", arg, showaxeslabels) + self._init_provided("showbackground", arg, showbackground) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showspikes", arg, showspikes) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("spikecolor", arg, spikecolor) + self._init_provided("spikesides", arg, spikesides) + self._init_provided("spikethickness", arg, spikethickness) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) + self._init_provided("zeroline", arg, zeroline) + self._init_provided("zerolinecolor", arg, zerolinecolor) + self._init_provided("zerolinewidth", arg, zerolinewidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/_yaxis.py b/plotly/graph_objs/layout/scene/_yaxis.py index 75c65cfb7a..199d7d92d7 100644 --- a/plotly/graph_objs/layout/scene/_yaxis.py +++ b/plotly/graph_objs/layout/scene/_yaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class YAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.yaxis" _valid_props = { @@ -71,8 +72,6 @@ class YAxis(_BaseLayoutHierarchyType): "zerolinewidth", } - # autorange - # --------- @property def autorange(self): """ @@ -102,8 +101,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autorangeoptions - # ---------------- @property def autorangeoptions(self): """ @@ -113,26 +110,6 @@ def autorangeoptions(self): - A dict of string/value properties that will be passed to the Autorangeoptions constructor - Supported dict properties: - - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. - Returns ------- plotly.graph_objs.layout.scene.yaxis.Autorangeoptions @@ -143,8 +120,6 @@ def autorangeoptions(self): def autorangeoptions(self, val): self["autorangeoptions"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -167,8 +142,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # backgroundcolor - # --------------- @property def backgroundcolor(self): """ @@ -179,42 +152,7 @@ def backgroundcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -226,8 +164,6 @@ def backgroundcolor(self): def backgroundcolor(self, val): self["backgroundcolor"] = val - # calendar - # -------- @property def calendar(self): """ @@ -253,8 +189,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -267,7 +201,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -275,8 +209,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -296,8 +228,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -337,8 +267,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -352,42 +280,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -399,8 +292,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -437,8 +328,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -462,8 +351,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -474,42 +361,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -521,8 +373,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -541,8 +391,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -571,8 +419,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -598,8 +444,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -610,42 +454,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -657,8 +466,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -677,8 +484,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -696,8 +501,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -715,8 +518,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -736,8 +537,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # mirror - # ------ @property def mirror(self): """ @@ -762,8 +561,6 @@ def mirror(self): def mirror(self, val): self["mirror"] = val - # nticks - # ------ @property def nticks(self): """ @@ -786,8 +583,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -818,13 +613,11 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -843,8 +636,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -863,8 +654,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showaxeslabels - # -------------- @property def showaxeslabels(self): """ @@ -883,8 +672,6 @@ def showaxeslabels(self): def showaxeslabels(self, val): self["showaxeslabels"] = val - # showbackground - # -------------- @property def showbackground(self): """ @@ -903,8 +690,6 @@ def showbackground(self): def showbackground(self, val): self["showbackground"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -927,8 +712,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -948,8 +731,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -968,8 +749,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showspikes - # ---------- @property def showspikes(self): """ @@ -989,8 +768,6 @@ def showspikes(self): def showspikes(self, val): self["showspikes"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1009,8 +786,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1033,8 +808,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1054,8 +827,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # spikecolor - # ---------- @property def spikecolor(self): """ @@ -1066,42 +837,7 @@ def spikecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1113,8 +849,6 @@ def spikecolor(self): def spikecolor(self, val): self["spikecolor"] = val - # spikesides - # ---------- @property def spikesides(self): """ @@ -1134,8 +868,6 @@ def spikesides(self): def spikesides(self, val): self["spikesides"] = val - # spikethickness - # -------------- @property def spikethickness(self): """ @@ -1154,8 +886,6 @@ def spikethickness(self): def spikethickness(self, val): self["spikethickness"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1181,8 +911,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1205,8 +933,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -1217,42 +943,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1264,8 +955,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -1277,52 +966,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.yaxis.Tickfont @@ -1333,8 +976,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1363,8 +1004,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1374,42 +1013,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.scene.yaxis.Tickformatstop] @@ -1420,8 +1023,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1436,8 +1037,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.scene.yaxis.Tickformatstop @@ -1448,8 +1047,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1468,8 +1065,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1495,8 +1090,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1516,8 +1109,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1539,8 +1130,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1560,8 +1149,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1574,7 +1161,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1582,8 +1169,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1602,8 +1187,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1615,7 +1198,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1623,8 +1206,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1643,8 +1224,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1663,8 +1242,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1674,13 +1251,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.scene.yaxis.Title @@ -1691,8 +1261,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -1714,8 +1282,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -1736,8 +1302,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # zeroline - # -------- @property def zeroline(self): """ @@ -1758,8 +1322,6 @@ def zeroline(self): def zeroline(self, val): self["zeroline"] = val - # zerolinecolor - # ------------- @property def zerolinecolor(self): """ @@ -1770,42 +1332,7 @@ def zerolinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1817,8 +1344,6 @@ def zerolinecolor(self): def zerolinecolor(self, val): self["zerolinecolor"] = val - # zerolinewidth - # ------------- @property def zerolinewidth(self): """ @@ -1837,8 +1362,6 @@ def zerolinewidth(self): def zerolinewidth(self, val): self["zerolinewidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1997,7 +1520,7 @@ def _prop_descriptions(self): the default `autorange`. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -2138,66 +1661,66 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autorange=None, - autorangeoptions=None, - autotypenumbers=None, - backgroundcolor=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - linecolor=None, - linewidth=None, - maxallowed=None, - minallowed=None, - minexponent=None, - mirror=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showaxeslabels=None, - showbackground=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - spikecolor=None, - spikesides=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - type=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, + autorange: Any | None = None, + autorangeoptions: None | None = None, + autotypenumbers: Any | None = None, + backgroundcolor: str | None = None, + calendar: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, + minexponent: int | float | None = None, + mirror: Any | None = None, + nticks: int | None = None, + range: list | None = None, + rangemode: Any | None = None, + separatethousands: bool | None = None, + showaxeslabels: bool | None = None, + showbackground: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showspikes: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + spikecolor: str | None = None, + spikesides: bool | None = None, + spikethickness: int | float | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + type: Any | None = None, + visible: bool | None = None, + zeroline: bool | None = None, + zerolinecolor: str | None = None, + zerolinewidth: int | float | None = None, **kwargs, ): """ @@ -2364,7 +1887,7 @@ def __init__( the default `autorange`. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -2505,14 +2028,11 @@ def __init__( ------- YAxis """ - super(YAxis, self).__init__("yaxis") - + super().__init__("yaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2527,258 +2047,68 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.YAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autorangeoptions", None) - _v = autorangeoptions if autorangeoptions is not None else _v - if _v is not None: - self["autorangeoptions"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("backgroundcolor", None) - _v = backgroundcolor if backgroundcolor is not None else _v - if _v is not None: - self["backgroundcolor"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("mirror", None) - _v = mirror if mirror is not None else _v - if _v is not None: - self["mirror"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showaxeslabels", None) - _v = showaxeslabels if showaxeslabels is not None else _v - if _v is not None: - self["showaxeslabels"] = _v - _v = arg.pop("showbackground", None) - _v = showbackground if showbackground is not None else _v - if _v is not None: - self["showbackground"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showspikes", None) - _v = showspikes if showspikes is not None else _v - if _v is not None: - self["showspikes"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("spikecolor", None) - _v = spikecolor if spikecolor is not None else _v - if _v is not None: - self["spikecolor"] = _v - _v = arg.pop("spikesides", None) - _v = spikesides if spikesides is not None else _v - if _v is not None: - self["spikesides"] = _v - _v = arg.pop("spikethickness", None) - _v = spikethickness if spikethickness is not None else _v - if _v is not None: - self["spikethickness"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("zeroline", None) - _v = zeroline if zeroline is not None else _v - if _v is not None: - self["zeroline"] = _v - _v = arg.pop("zerolinecolor", None) - _v = zerolinecolor if zerolinecolor is not None else _v - if _v is not None: - self["zerolinecolor"] = _v - _v = arg.pop("zerolinewidth", None) - _v = zerolinewidth if zerolinewidth is not None else _v - if _v is not None: - self["zerolinewidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autorange", arg, autorange) + self._init_provided("autorangeoptions", arg, autorangeoptions) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("backgroundcolor", arg, backgroundcolor) + self._init_provided("calendar", arg, calendar) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("mirror", arg, mirror) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showaxeslabels", arg, showaxeslabels) + self._init_provided("showbackground", arg, showbackground) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showspikes", arg, showspikes) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("spikecolor", arg, spikecolor) + self._init_provided("spikesides", arg, spikesides) + self._init_provided("spikethickness", arg, spikethickness) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) + self._init_provided("zeroline", arg, zeroline) + self._init_provided("zerolinecolor", arg, zerolinecolor) + self._init_provided("zerolinewidth", arg, zerolinewidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/_zaxis.py b/plotly/graph_objs/layout/scene/_zaxis.py index 7bf8c78d8b..90e323ec1a 100644 --- a/plotly/graph_objs/layout/scene/_zaxis.py +++ b/plotly/graph_objs/layout/scene/_zaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class ZAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene" _path_str = "layout.scene.zaxis" _valid_props = { @@ -71,8 +72,6 @@ class ZAxis(_BaseLayoutHierarchyType): "zerolinewidth", } - # autorange - # --------- @property def autorange(self): """ @@ -102,8 +101,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # autorangeoptions - # ---------------- @property def autorangeoptions(self): """ @@ -113,26 +110,6 @@ def autorangeoptions(self): - A dict of string/value properties that will be passed to the Autorangeoptions constructor - Supported dict properties: - - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. - Returns ------- plotly.graph_objs.layout.scene.zaxis.Autorangeoptions @@ -143,8 +120,6 @@ def autorangeoptions(self): def autorangeoptions(self, val): self["autorangeoptions"] = val - # autotypenumbers - # --------------- @property def autotypenumbers(self): """ @@ -167,8 +142,6 @@ def autotypenumbers(self): def autotypenumbers(self, val): self["autotypenumbers"] = val - # backgroundcolor - # --------------- @property def backgroundcolor(self): """ @@ -179,42 +152,7 @@ def backgroundcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -226,8 +164,6 @@ def backgroundcolor(self): def backgroundcolor(self, val): self["backgroundcolor"] = val - # calendar - # -------- @property def calendar(self): """ @@ -253,8 +189,6 @@ def calendar(self): def calendar(self, val): self["calendar"] = val - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -267,7 +201,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -275,8 +209,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -296,8 +228,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -337,8 +267,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # color - # ----- @property def color(self): """ @@ -352,42 +280,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -399,8 +292,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -437,8 +328,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -462,8 +351,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -474,42 +361,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -521,8 +373,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -541,8 +391,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -571,8 +419,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -598,8 +444,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -610,42 +454,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -657,8 +466,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -677,8 +484,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -696,8 +501,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -715,8 +518,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -736,8 +537,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # mirror - # ------ @property def mirror(self): """ @@ -762,8 +561,6 @@ def mirror(self): def mirror(self, val): self["mirror"] = val - # nticks - # ------ @property def nticks(self): """ @@ -786,8 +583,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # range - # ----- @property def range(self): """ @@ -818,13 +613,11 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ If "normal", the range is computed in relation to the extrema - of the input data. If *tozero*`, the range extends to 0, + of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -843,8 +636,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -863,8 +654,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showaxeslabels - # -------------- @property def showaxeslabels(self): """ @@ -883,8 +672,6 @@ def showaxeslabels(self): def showaxeslabels(self, val): self["showaxeslabels"] = val - # showbackground - # -------------- @property def showbackground(self): """ @@ -903,8 +690,6 @@ def showbackground(self): def showbackground(self, val): self["showbackground"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -927,8 +712,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -948,8 +731,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -968,8 +749,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showspikes - # ---------- @property def showspikes(self): """ @@ -989,8 +768,6 @@ def showspikes(self): def showspikes(self, val): self["showspikes"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -1009,8 +786,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -1033,8 +808,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -1054,8 +827,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # spikecolor - # ---------- @property def spikecolor(self): """ @@ -1066,42 +837,7 @@ def spikecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1113,8 +849,6 @@ def spikecolor(self): def spikecolor(self, val): self["spikecolor"] = val - # spikesides - # ---------- @property def spikesides(self): """ @@ -1134,8 +868,6 @@ def spikesides(self): def spikesides(self, val): self["spikesides"] = val - # spikethickness - # -------------- @property def spikethickness(self): """ @@ -1154,8 +886,6 @@ def spikethickness(self): def spikethickness(self, val): self["spikethickness"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -1181,8 +911,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -1205,8 +933,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -1217,42 +943,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1264,8 +955,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -1277,52 +966,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.zaxis.Tickfont @@ -1333,8 +976,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -1363,8 +1004,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -1374,42 +1013,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.scene.zaxis.Tickformatstop] @@ -1420,8 +1023,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -1436,8 +1037,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.scene.zaxis.Tickformatstop @@ -1448,8 +1047,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1468,8 +1065,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1495,8 +1090,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1516,8 +1109,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1539,8 +1130,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1560,8 +1149,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1574,7 +1161,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1582,8 +1169,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1602,8 +1187,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1615,7 +1198,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1623,8 +1206,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1643,8 +1224,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1663,8 +1242,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1674,13 +1251,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.scene.zaxis.Title @@ -1691,8 +1261,6 @@ def title(self): def title(self, val): self["title"] = val - # type - # ---- @property def type(self): """ @@ -1714,8 +1282,6 @@ def type(self): def type(self, val): self["type"] = val - # visible - # ------- @property def visible(self): """ @@ -1736,8 +1302,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # zeroline - # -------- @property def zeroline(self): """ @@ -1758,8 +1322,6 @@ def zeroline(self): def zeroline(self, val): self["zeroline"] = val - # zerolinecolor - # ------------- @property def zerolinecolor(self): """ @@ -1770,42 +1332,7 @@ def zerolinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -1817,8 +1344,6 @@ def zerolinecolor(self): def zerolinecolor(self, val): self["zerolinecolor"] = val - # zerolinewidth - # ------------- @property def zerolinewidth(self): """ @@ -1837,8 +1362,6 @@ def zerolinewidth(self): def zerolinewidth(self, val): self["zerolinewidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1997,7 +1520,7 @@ def _prop_descriptions(self): the default `autorange`. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -2138,66 +1661,66 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autorange=None, - autorangeoptions=None, - autotypenumbers=None, - backgroundcolor=None, - calendar=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - linecolor=None, - linewidth=None, - maxallowed=None, - minallowed=None, - minexponent=None, - mirror=None, - nticks=None, - range=None, - rangemode=None, - separatethousands=None, - showaxeslabels=None, - showbackground=None, - showexponent=None, - showgrid=None, - showline=None, - showspikes=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - spikecolor=None, - spikesides=None, - spikethickness=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - type=None, - visible=None, - zeroline=None, - zerolinecolor=None, - zerolinewidth=None, + autorange: Any | None = None, + autorangeoptions: None | None = None, + autotypenumbers: Any | None = None, + backgroundcolor: str | None = None, + calendar: Any | None = None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, + minexponent: int | float | None = None, + mirror: Any | None = None, + nticks: int | None = None, + range: list | None = None, + rangemode: Any | None = None, + separatethousands: bool | None = None, + showaxeslabels: bool | None = None, + showbackground: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showspikes: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + spikecolor: str | None = None, + spikesides: bool | None = None, + spikethickness: int | float | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + type: Any | None = None, + visible: bool | None = None, + zeroline: bool | None = None, + zerolinecolor: str | None = None, + zerolinewidth: int | float | None = None, **kwargs, ): """ @@ -2364,7 +1887,7 @@ def __init__( the default `autorange`. rangemode If "normal", the range is computed in relation to the - extrema of the input data. If *tozero*`, the range + extrema of the input data. If "tozero", the range extends to 0, regardless of the input data If "nonnegative", the range is non-negative, regardless of the input data. Applies only to linear axes. @@ -2505,14 +2028,11 @@ def __init__( ------- ZAxis """ - super(ZAxis, self).__init__("zaxis") - + super().__init__("zaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2527,258 +2047,68 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.ZAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("autorangeoptions", None) - _v = autorangeoptions if autorangeoptions is not None else _v - if _v is not None: - self["autorangeoptions"] = _v - _v = arg.pop("autotypenumbers", None) - _v = autotypenumbers if autotypenumbers is not None else _v - if _v is not None: - self["autotypenumbers"] = _v - _v = arg.pop("backgroundcolor", None) - _v = backgroundcolor if backgroundcolor is not None else _v - if _v is not None: - self["backgroundcolor"] = _v - _v = arg.pop("calendar", None) - _v = calendar if calendar is not None else _v - if _v is not None: - self["calendar"] = _v - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("mirror", None) - _v = mirror if mirror is not None else _v - if _v is not None: - self["mirror"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showaxeslabels", None) - _v = showaxeslabels if showaxeslabels is not None else _v - if _v is not None: - self["showaxeslabels"] = _v - _v = arg.pop("showbackground", None) - _v = showbackground if showbackground is not None else _v - if _v is not None: - self["showbackground"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showspikes", None) - _v = showspikes if showspikes is not None else _v - if _v is not None: - self["showspikes"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("spikecolor", None) - _v = spikecolor if spikecolor is not None else _v - if _v is not None: - self["spikecolor"] = _v - _v = arg.pop("spikesides", None) - _v = spikesides if spikesides is not None else _v - if _v is not None: - self["spikesides"] = _v - _v = arg.pop("spikethickness", None) - _v = spikethickness if spikethickness is not None else _v - if _v is not None: - self["spikethickness"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("zeroline", None) - _v = zeroline if zeroline is not None else _v - if _v is not None: - self["zeroline"] = _v - _v = arg.pop("zerolinecolor", None) - _v = zerolinecolor if zerolinecolor is not None else _v - if _v is not None: - self["zerolinecolor"] = _v - _v = arg.pop("zerolinewidth", None) - _v = zerolinewidth if zerolinewidth is not None else _v - if _v is not None: - self["zerolinewidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autorange", arg, autorange) + self._init_provided("autorangeoptions", arg, autorangeoptions) + self._init_provided("autotypenumbers", arg, autotypenumbers) + self._init_provided("backgroundcolor", arg, backgroundcolor) + self._init_provided("calendar", arg, calendar) + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("mirror", arg, mirror) + self._init_provided("nticks", arg, nticks) + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showaxeslabels", arg, showaxeslabels) + self._init_provided("showbackground", arg, showbackground) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showspikes", arg, showspikes) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("spikecolor", arg, spikecolor) + self._init_provided("spikesides", arg, spikesides) + self._init_provided("spikethickness", arg, spikethickness) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("type", arg, type) + self._init_provided("visible", arg, visible) + self._init_provided("zeroline", arg, zeroline) + self._init_provided("zerolinecolor", arg, zerolinecolor) + self._init_provided("zerolinewidth", arg, zerolinewidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/annotation/__init__.py b/plotly/graph_objs/layout/scene/annotation/__init__.py index 89cac20f5a..a9cb1938bc 100644 --- a/plotly/graph_objs/layout/scene/annotation/__init__.py +++ b/plotly/graph_objs/layout/scene/annotation/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font - from ._hoverlabel import Hoverlabel - from . import hoverlabel -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".hoverlabel"], ["._font.Font", "._hoverlabel.Hoverlabel"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._font.Font", "._hoverlabel.Hoverlabel"] +) diff --git a/plotly/graph_objs/layout/scene/annotation/_font.py b/plotly/graph_objs/layout/scene/annotation/_font.py index b7708d1c41..ef9af81fc8 100644 --- a/plotly/graph_objs/layout/scene/annotation/_font.py +++ b/plotly/graph_objs/layout/scene/annotation/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.annotation" _path_str = "layout.scene.annotation.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.annotation.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py b/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py index 38a130745a..7e91904817 100644 --- a/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py +++ b/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Hoverlabel(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.annotation" _path_str = "layout.scene.annotation.hoverlabel" _valid_props = {"bgcolor", "bordercolor", "font"} - # bgcolor - # ------- @property def bgcolor(self): """ @@ -24,42 +23,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -85,42 +47,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -132,8 +59,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # font - # ---- @property def font(self): """ @@ -146,52 +71,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.annotation.hoverlabel.Font @@ -202,8 +81,6 @@ def font(self): def font(self, val): self["font"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -221,7 +98,14 @@ def _prop_descriptions(self): `hoverlabel.bordercolor`. """ - def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs): + def __init__( + self, + arg=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + font: None | None = None, + **kwargs, + ): """ Construct a new Hoverlabel object @@ -248,14 +132,11 @@ def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -270,30 +151,11 @@ def __init__(self, arg=None, bgcolor=None, bordercolor=None, font=None, **kwargs an instance of :class:`plotly.graph_objs.layout.scene.annotation.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("font", arg, font) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py b/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py +++ b/plotly/graph_objs/layout/scene/annotation/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py b/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py index e90d539336..13c8336318 100644 --- a/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.annotation.hoverlabel" _path_str = "layout.scene.annotation.hoverlabel.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -339,18 +271,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -378,14 +303,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -400,54 +322,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.annotation.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/camera/__init__.py b/plotly/graph_objs/layout/scene/camera/__init__.py index 9478fa29e0..ddffeb54e4 100644 --- a/plotly/graph_objs/layout/scene/camera/__init__.py +++ b/plotly/graph_objs/layout/scene/camera/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._center import Center - from ._eye import Eye - from ._projection import Projection - from ._up import Up -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._center.Center", "._eye.Eye", "._projection.Projection", "._up.Up"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._center.Center", "._eye.Eye", "._projection.Projection", "._up.Up"] +) diff --git a/plotly/graph_objs/layout/scene/camera/_center.py b/plotly/graph_objs/layout/scene/camera/_center.py index 1d2e3dfb04..a21a12f18a 100644 --- a/plotly/graph_objs/layout/scene/camera/_center.py +++ b/plotly/graph_objs/layout/scene/camera/_center.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Center(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.camera" _path_str = "layout.scene.camera.center" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -28,8 +27,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -46,8 +43,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -64,8 +59,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +70,14 @@ def _prop_descriptions(self): """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Center object @@ -102,14 +102,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Center """ - super(Center, self).__init__("center") - + super().__init__("center") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,30 +121,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.camera.Center`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/camera/_eye.py b/plotly/graph_objs/layout/scene/camera/_eye.py index 3c43284f61..11e42c7650 100644 --- a/plotly/graph_objs/layout/scene/camera/_eye.py +++ b/plotly/graph_objs/layout/scene/camera/_eye.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Eye(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.camera" _path_str = "layout.scene.camera.eye" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -28,8 +27,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -46,8 +43,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -64,8 +59,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +70,14 @@ def _prop_descriptions(self): """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Eye object @@ -102,14 +102,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Eye """ - super(Eye, self).__init__("eye") - + super().__init__("eye") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -124,30 +121,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.camera.Eye`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/camera/_projection.py b/plotly/graph_objs/layout/scene/camera/_projection.py index b0b87ba794..958d127311 100644 --- a/plotly/graph_objs/layout/scene/camera/_projection.py +++ b/plotly/graph_objs/layout/scene/camera/_projection.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Projection(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.camera" _path_str = "layout.scene.camera.projection" _valid_props = {"type"} - # type - # ---- @property def type(self): """ @@ -32,8 +31,6 @@ def type(self): def type(self, val): self["type"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -43,7 +40,7 @@ def _prop_descriptions(self): "perspective". """ - def __init__(self, arg=None, type=None, **kwargs): + def __init__(self, arg=None, type: Any | None = None, **kwargs): """ Construct a new Projection object @@ -62,14 +59,11 @@ def __init__(self, arg=None, type=None, **kwargs): ------- Projection """ - super(Projection, self).__init__("projection") - + super().__init__("projection") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -84,22 +78,9 @@ def __init__(self, arg=None, type=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.camera.Projection`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("type", arg, type) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/camera/_up.py b/plotly/graph_objs/layout/scene/camera/_up.py index 503519c0e2..04b08f8374 100644 --- a/plotly/graph_objs/layout/scene/camera/_up.py +++ b/plotly/graph_objs/layout/scene/camera/_up.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Up(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.camera" _path_str = "layout.scene.camera.up" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -28,8 +27,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -46,8 +43,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -64,8 +59,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -77,7 +70,14 @@ def _prop_descriptions(self): """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Up object @@ -103,14 +103,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Up """ - super(Up, self).__init__("up") - + super().__init__("up") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -125,30 +122,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.camera.Up`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/xaxis/__init__.py b/plotly/graph_objs/layout/scene/xaxis/__init__.py index 7004d6695b..72774d8afa 100644 --- a/plotly/graph_objs/layout/scene/xaxis/__init__.py +++ b/plotly/graph_objs/layout/scene/xaxis/__init__.py @@ -1,22 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._autorangeoptions import Autorangeoptions - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - [ - "._autorangeoptions.Autorangeoptions", - "._tickfont.Tickfont", - "._tickformatstop.Tickformatstop", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + [ + "._autorangeoptions.Autorangeoptions", + "._tickfont.Tickfont", + "._tickformatstop.Tickformatstop", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/layout/scene/xaxis/_autorangeoptions.py b/plotly/graph_objs/layout/scene/xaxis/_autorangeoptions.py index 5513d91908..4c3d4cc3eb 100644 --- a/plotly/graph_objs/layout/scene/xaxis/_autorangeoptions.py +++ b/plotly/graph_objs/layout/scene/xaxis/_autorangeoptions.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Autorangeoptions(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.xaxis" _path_str = "layout.scene.xaxis.autorangeoptions" _valid_props = { @@ -17,8 +18,6 @@ class Autorangeoptions(_BaseLayoutHierarchyType): "minallowed", } - # clipmax - # ------- @property def clipmax(self): """ @@ -37,8 +36,6 @@ def clipmax(self): def clipmax(self, val): self["clipmax"] = val - # clipmin - # ------- @property def clipmin(self): """ @@ -57,8 +54,6 @@ def clipmin(self): def clipmin(self, val): self["clipmin"] = val - # include - # ------- @property def include(self): """ @@ -68,7 +63,7 @@ def include(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["include"] @@ -76,8 +71,6 @@ def include(self): def include(self, val): self["include"] = val - # includesrc - # ---------- @property def includesrc(self): """ @@ -96,8 +89,6 @@ def includesrc(self): def includesrc(self, val): self["includesrc"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -115,8 +106,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -134,8 +123,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - clipmax=None, - clipmin=None, - include=None, - includesrc=None, - maxallowed=None, - minallowed=None, + clipmax: Any | None = None, + clipmin: Any | None = None, + include: Any | None = None, + includesrc: str | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, **kwargs, ): """ @@ -200,14 +187,11 @@ def __init__( ------- Autorangeoptions """ - super(Autorangeoptions, self).__init__("autorangeoptions") - + super().__init__("autorangeoptions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -222,42 +206,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Autorangeoptions`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("clipmax", None) - _v = clipmax if clipmax is not None else _v - if _v is not None: - self["clipmax"] = _v - _v = arg.pop("clipmin", None) - _v = clipmin if clipmin is not None else _v - if _v is not None: - self["clipmin"] = _v - _v = arg.pop("include", None) - _v = include if include is not None else _v - if _v is not None: - self["include"] = _v - _v = arg.pop("includesrc", None) - _v = includesrc if includesrc is not None else _v - if _v is not None: - self["includesrc"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("clipmax", arg, clipmax) + self._init_provided("clipmin", arg, clipmin) + self._init_provided("include", arg, include) + self._init_provided("includesrc", arg, includesrc) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/xaxis/_tickfont.py b/plotly/graph_objs/layout/scene/xaxis/_tickfont.py index 3dd73b17ab..c53eb82680 100644 --- a/plotly/graph_objs/layout/scene/xaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/xaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.xaxis" _path_str = "layout.scene.xaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py b/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py index d7d3fc22d7..32e73a78fa 100644 --- a/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/scene/xaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.xaxis" _path_str = "layout.scene.xaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/xaxis/_title.py b/plotly/graph_objs/layout/scene/xaxis/_title.py index b2f98fbb60..9d34a7f937 100644 --- a/plotly/graph_objs/layout/scene/xaxis/_title.py +++ b/plotly/graph_objs/layout/scene/xaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.xaxis" _path_str = "layout.scene.xaxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.xaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.xaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/xaxis/title/__init__.py b/plotly/graph_objs/layout/scene/xaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/scene/xaxis/title/__init__.py +++ b/plotly/graph_objs/layout/scene/xaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/scene/xaxis/title/_font.py b/plotly/graph_objs/layout/scene/xaxis/title/_font.py index 4beada0bab..c1a2f5f489 100644 --- a/plotly/graph_objs/layout/scene/xaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/xaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.xaxis.title" _path_str = "layout.scene.xaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.xaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/yaxis/__init__.py b/plotly/graph_objs/layout/scene/yaxis/__init__.py index 7004d6695b..72774d8afa 100644 --- a/plotly/graph_objs/layout/scene/yaxis/__init__.py +++ b/plotly/graph_objs/layout/scene/yaxis/__init__.py @@ -1,22 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._autorangeoptions import Autorangeoptions - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - [ - "._autorangeoptions.Autorangeoptions", - "._tickfont.Tickfont", - "._tickformatstop.Tickformatstop", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + [ + "._autorangeoptions.Autorangeoptions", + "._tickfont.Tickfont", + "._tickformatstop.Tickformatstop", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/layout/scene/yaxis/_autorangeoptions.py b/plotly/graph_objs/layout/scene/yaxis/_autorangeoptions.py index 51f99b2c27..03ae15a820 100644 --- a/plotly/graph_objs/layout/scene/yaxis/_autorangeoptions.py +++ b/plotly/graph_objs/layout/scene/yaxis/_autorangeoptions.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Autorangeoptions(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.yaxis" _path_str = "layout.scene.yaxis.autorangeoptions" _valid_props = { @@ -17,8 +18,6 @@ class Autorangeoptions(_BaseLayoutHierarchyType): "minallowed", } - # clipmax - # ------- @property def clipmax(self): """ @@ -37,8 +36,6 @@ def clipmax(self): def clipmax(self, val): self["clipmax"] = val - # clipmin - # ------- @property def clipmin(self): """ @@ -57,8 +54,6 @@ def clipmin(self): def clipmin(self, val): self["clipmin"] = val - # include - # ------- @property def include(self): """ @@ -68,7 +63,7 @@ def include(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["include"] @@ -76,8 +71,6 @@ def include(self): def include(self, val): self["include"] = val - # includesrc - # ---------- @property def includesrc(self): """ @@ -96,8 +89,6 @@ def includesrc(self): def includesrc(self, val): self["includesrc"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -115,8 +106,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -134,8 +123,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - clipmax=None, - clipmin=None, - include=None, - includesrc=None, - maxallowed=None, - minallowed=None, + clipmax: Any | None = None, + clipmin: Any | None = None, + include: Any | None = None, + includesrc: str | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, **kwargs, ): """ @@ -200,14 +187,11 @@ def __init__( ------- Autorangeoptions """ - super(Autorangeoptions, self).__init__("autorangeoptions") - + super().__init__("autorangeoptions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -222,42 +206,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Autorangeoptions`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("clipmax", None) - _v = clipmax if clipmax is not None else _v - if _v is not None: - self["clipmax"] = _v - _v = arg.pop("clipmin", None) - _v = clipmin if clipmin is not None else _v - if _v is not None: - self["clipmin"] = _v - _v = arg.pop("include", None) - _v = include if include is not None else _v - if _v is not None: - self["include"] = _v - _v = arg.pop("includesrc", None) - _v = includesrc if includesrc is not None else _v - if _v is not None: - self["includesrc"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("clipmax", arg, clipmax) + self._init_provided("clipmin", arg, clipmin) + self._init_provided("include", arg, include) + self._init_provided("includesrc", arg, includesrc) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/yaxis/_tickfont.py b/plotly/graph_objs/layout/scene/yaxis/_tickfont.py index 268c0432ab..fc74b36ee2 100644 --- a/plotly/graph_objs/layout/scene/yaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/yaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.yaxis" _path_str = "layout.scene.yaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py b/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py index 6f4c72426e..37e1cd4bd7 100644 --- a/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/scene/yaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.yaxis" _path_str = "layout.scene.yaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/yaxis/_title.py b/plotly/graph_objs/layout/scene/yaxis/_title.py index c0ddf835d5..eecd7f9d08 100644 --- a/plotly/graph_objs/layout/scene/yaxis/_title.py +++ b/plotly/graph_objs/layout/scene/yaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.yaxis" _path_str = "layout.scene.yaxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.yaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.yaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/yaxis/title/__init__.py b/plotly/graph_objs/layout/scene/yaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/scene/yaxis/title/__init__.py +++ b/plotly/graph_objs/layout/scene/yaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/scene/yaxis/title/_font.py b/plotly/graph_objs/layout/scene/yaxis/title/_font.py index 4cda20e0a5..a7ff3f9f92 100644 --- a/plotly/graph_objs/layout/scene/yaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/yaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.yaxis.title" _path_str = "layout.scene.yaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.yaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/zaxis/__init__.py b/plotly/graph_objs/layout/scene/zaxis/__init__.py index 7004d6695b..72774d8afa 100644 --- a/plotly/graph_objs/layout/scene/zaxis/__init__.py +++ b/plotly/graph_objs/layout/scene/zaxis/__init__.py @@ -1,22 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._autorangeoptions import Autorangeoptions - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - [ - "._autorangeoptions.Autorangeoptions", - "._tickfont.Tickfont", - "._tickformatstop.Tickformatstop", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + [ + "._autorangeoptions.Autorangeoptions", + "._tickfont.Tickfont", + "._tickformatstop.Tickformatstop", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/layout/scene/zaxis/_autorangeoptions.py b/plotly/graph_objs/layout/scene/zaxis/_autorangeoptions.py index 64a49fbb7e..b4f3b13307 100644 --- a/plotly/graph_objs/layout/scene/zaxis/_autorangeoptions.py +++ b/plotly/graph_objs/layout/scene/zaxis/_autorangeoptions.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Autorangeoptions(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.zaxis" _path_str = "layout.scene.zaxis.autorangeoptions" _valid_props = { @@ -17,8 +18,6 @@ class Autorangeoptions(_BaseLayoutHierarchyType): "minallowed", } - # clipmax - # ------- @property def clipmax(self): """ @@ -37,8 +36,6 @@ def clipmax(self): def clipmax(self, val): self["clipmax"] = val - # clipmin - # ------- @property def clipmin(self): """ @@ -57,8 +54,6 @@ def clipmin(self): def clipmin(self, val): self["clipmin"] = val - # include - # ------- @property def include(self): """ @@ -68,7 +63,7 @@ def include(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["include"] @@ -76,8 +71,6 @@ def include(self): def include(self, val): self["include"] = val - # includesrc - # ---------- @property def includesrc(self): """ @@ -96,8 +89,6 @@ def includesrc(self): def includesrc(self, val): self["includesrc"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -115,8 +106,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -134,8 +123,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - clipmax=None, - clipmin=None, - include=None, - includesrc=None, - maxallowed=None, - minallowed=None, + clipmax: Any | None = None, + clipmin: Any | None = None, + include: Any | None = None, + includesrc: str | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, **kwargs, ): """ @@ -200,14 +187,11 @@ def __init__( ------- Autorangeoptions """ - super(Autorangeoptions, self).__init__("autorangeoptions") - + super().__init__("autorangeoptions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -222,42 +206,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Autorangeoptions`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("clipmax", None) - _v = clipmax if clipmax is not None else _v - if _v is not None: - self["clipmax"] = _v - _v = arg.pop("clipmin", None) - _v = clipmin if clipmin is not None else _v - if _v is not None: - self["clipmin"] = _v - _v = arg.pop("include", None) - _v = include if include is not None else _v - if _v is not None: - self["include"] = _v - _v = arg.pop("includesrc", None) - _v = includesrc if includesrc is not None else _v - if _v is not None: - self["includesrc"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("clipmax", arg, clipmax) + self._init_provided("clipmin", arg, clipmin) + self._init_provided("include", arg, include) + self._init_provided("includesrc", arg, includesrc) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/zaxis/_tickfont.py b/plotly/graph_objs/layout/scene/zaxis/_tickfont.py index 532537a387..b99a82c248 100644 --- a/plotly/graph_objs/layout/scene/zaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/zaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.zaxis" _path_str = "layout.scene.zaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py b/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py index c5ebcd3184..fe8be8066e 100644 --- a/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/scene/zaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.zaxis" _path_str = "layout.scene.zaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/zaxis/_title.py b/plotly/graph_objs/layout/scene/zaxis/_title.py index 4e0739754a..974faa798c 100644 --- a/plotly/graph_objs/layout/scene/zaxis/_title.py +++ b/plotly/graph_objs/layout/scene/zaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.zaxis" _path_str = "layout.scene.zaxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.scene.zaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.scene.zaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/scene/zaxis/title/__init__.py b/plotly/graph_objs/layout/scene/zaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/scene/zaxis/title/__init__.py +++ b/plotly/graph_objs/layout/scene/zaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/scene/zaxis/title/_font.py b/plotly/graph_objs/layout/scene/zaxis/title/_font.py index cb23aedeed..81a87f5eff 100644 --- a/plotly/graph_objs/layout/scene/zaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/zaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.scene.zaxis.title" _path_str = "layout.scene.zaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.scene.zaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/selection/__init__.py b/plotly/graph_objs/layout/selection/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/layout/selection/__init__.py +++ b/plotly/graph_objs/layout/selection/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/layout/selection/_line.py b/plotly/graph_objs/layout/selection/_line.py index 7a8ea63177..fc4b75d3ff 100644 --- a/plotly/graph_objs/layout/selection/_line.py +++ b/plotly/graph_objs/layout/selection/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Line(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.selection" _path_str = "layout.selection.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.selection.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/shape/__init__.py b/plotly/graph_objs/layout/shape/__init__.py index dd5947b049..ac9079347d 100644 --- a/plotly/graph_objs/layout/shape/__init__.py +++ b/plotly/graph_objs/layout/shape/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._label import Label - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from . import label - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".label", ".legendgrouptitle"], - ["._label.Label", "._legendgrouptitle.Legendgrouptitle", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".label", ".legendgrouptitle"], + ["._label.Label", "._legendgrouptitle.Legendgrouptitle", "._line.Line"], +) diff --git a/plotly/graph_objs/layout/shape/_label.py b/plotly/graph_objs/layout/shape/_label.py index 580b0eb627..118df6c6af 100644 --- a/plotly/graph_objs/layout/shape/_label.py +++ b/plotly/graph_objs/layout/shape/_label.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Label(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.shape" _path_str = "layout.shape.label" _valid_props = { @@ -19,8 +20,6 @@ class Label(_BaseLayoutHierarchyType): "yanchor", } - # font - # ---- @property def font(self): """ @@ -32,52 +31,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.shape.label.Font @@ -88,8 +41,6 @@ def font(self): def font(self, val): self["font"] = val - # padding - # ------- @property def padding(self): """ @@ -108,8 +59,6 @@ def padding(self): def padding(self, val): self["padding"] = val - # text - # ---- @property def text(self): """ @@ -130,8 +79,6 @@ def text(self): def text(self, val): self["text"] = val - # textangle - # --------- @property def textangle(self): """ @@ -154,8 +101,6 @@ def textangle(self): def textangle(self, val): self["textangle"] = val - # textposition - # ------------ @property def textposition(self): """ @@ -183,8 +128,6 @@ def textposition(self): def textposition(self, val): self["textposition"] = val - # texttemplate - # ------------ @property def texttemplate(self): """ @@ -223,8 +166,6 @@ def texttemplate(self): def texttemplate(self, val): self["texttemplate"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -249,8 +190,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -274,8 +213,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -344,14 +281,14 @@ def _prop_descriptions(self): def __init__( self, arg=None, - font=None, - padding=None, - text=None, - textangle=None, - textposition=None, - texttemplate=None, - xanchor=None, - yanchor=None, + font: None | None = None, + padding: int | float | None = None, + text: str | None = None, + textangle: int | float | None = None, + textposition: Any | None = None, + texttemplate: str | None = None, + xanchor: Any | None = None, + yanchor: Any | None = None, **kwargs, ): """ @@ -428,14 +365,11 @@ def __init__( ------- Label """ - super(Label, self).__init__("label") - + super().__init__("label") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -450,50 +384,16 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.shape.Label`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("padding", None) - _v = padding if padding is not None else _v - if _v is not None: - self["padding"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - _v = arg.pop("textangle", None) - _v = textangle if textangle is not None else _v - if _v is not None: - self["textangle"] = _v - _v = arg.pop("textposition", None) - _v = textposition if textposition is not None else _v - if _v is not None: - self["textposition"] = _v - _v = arg.pop("texttemplate", None) - _v = texttemplate if texttemplate is not None else _v - if _v is not None: - self["texttemplate"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("padding", arg, padding) + self._init_provided("text", arg, text) + self._init_provided("textangle", arg, textangle) + self._init_provided("textposition", arg, textposition) + self._init_provided("texttemplate", arg, texttemplate) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("yanchor", arg, yanchor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/shape/_legendgrouptitle.py b/plotly/graph_objs/layout/shape/_legendgrouptitle.py index d9be087437..c566c66eb5 100644 --- a/plotly/graph_objs/layout/shape/_legendgrouptitle.py +++ b/plotly/graph_objs/layout/shape/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Legendgrouptitle(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.shape" _path_str = "layout.shape.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.shape.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.shape.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/shape/_line.py b/plotly/graph_objs/layout/shape/_line.py index cdddbeee78..53f68598f1 100644 --- a/plotly/graph_objs/layout/shape/_line.py +++ b/plotly/graph_objs/layout/shape/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Line(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.shape" _path_str = "layout.shape.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.shape.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/shape/label/__init__.py b/plotly/graph_objs/layout/shape/label/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/shape/label/__init__.py +++ b/plotly/graph_objs/layout/shape/label/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/shape/label/_font.py b/plotly/graph_objs/layout/shape/label/_font.py index 19d7cd5103..414c6ac39b 100644 --- a/plotly/graph_objs/layout/shape/label/_font.py +++ b/plotly/graph_objs/layout/shape/label/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.shape.label" _path_str = "layout.shape.label.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.shape.label.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/shape/legendgrouptitle/__init__.py b/plotly/graph_objs/layout/shape/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/shape/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/layout/shape/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py b/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py index 0e35784692..8ba4119aee 100644 --- a/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py +++ b/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.shape.legendgrouptitle" _path_str = "layout.shape.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.shape.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/slider/__init__.py b/plotly/graph_objs/layout/slider/__init__.py index 7d9334c150..8def8c550e 100644 --- a/plotly/graph_objs/layout/slider/__init__.py +++ b/plotly/graph_objs/layout/slider/__init__.py @@ -1,24 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._currentvalue import Currentvalue - from ._font import Font - from ._pad import Pad - from ._step import Step - from ._transition import Transition - from . import currentvalue -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".currentvalue"], - [ - "._currentvalue.Currentvalue", - "._font.Font", - "._pad.Pad", - "._step.Step", - "._transition.Transition", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".currentvalue"], + [ + "._currentvalue.Currentvalue", + "._font.Font", + "._pad.Pad", + "._step.Step", + "._transition.Transition", + ], +) diff --git a/plotly/graph_objs/layout/slider/_currentvalue.py b/plotly/graph_objs/layout/slider/_currentvalue.py index 61cdc95aba..9e589cf26b 100644 --- a/plotly/graph_objs/layout/slider/_currentvalue.py +++ b/plotly/graph_objs/layout/slider/_currentvalue.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Currentvalue(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.currentvalue" _valid_props = {"font", "offset", "prefix", "suffix", "visible", "xanchor"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.slider.currentvalue.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # offset - # ------ @property def offset(self): """ @@ -100,8 +51,6 @@ def offset(self): def offset(self, val): self["offset"] = val - # prefix - # ------ @property def prefix(self): """ @@ -122,8 +71,6 @@ def prefix(self): def prefix(self, val): self["prefix"] = val - # suffix - # ------ @property def suffix(self): """ @@ -144,8 +91,6 @@ def suffix(self): def suffix(self, val): self["suffix"] = val - # visible - # ------- @property def visible(self): """ @@ -164,8 +109,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -186,8 +129,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -212,12 +153,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - font=None, - offset=None, - prefix=None, - suffix=None, - visible=None, - xanchor=None, + font: None | None = None, + offset: int | float | None = None, + prefix: str | None = None, + suffix: str | None = None, + visible: bool | None = None, + xanchor: Any | None = None, **kwargs, ): """ @@ -250,14 +191,11 @@ def __init__( ------- Currentvalue """ - super(Currentvalue, self).__init__("currentvalue") - + super().__init__("currentvalue") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -272,42 +210,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.slider.Currentvalue`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("offset", None) - _v = offset if offset is not None else _v - if _v is not None: - self["offset"] = _v - _v = arg.pop("prefix", None) - _v = prefix if prefix is not None else _v - if _v is not None: - self["prefix"] = _v - _v = arg.pop("suffix", None) - _v = suffix if suffix is not None else _v - if _v is not None: - self["suffix"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("offset", arg, offset) + self._init_provided("prefix", arg, prefix) + self._init_provided("suffix", arg, suffix) + self._init_provided("visible", arg, visible) + self._init_provided("xanchor", arg, xanchor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/slider/_font.py b/plotly/graph_objs/layout/slider/_font.py index f727d35bf6..c0105b2a66 100644 --- a/plotly/graph_objs/layout/slider/_font.py +++ b/plotly/graph_objs/layout/slider/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.slider.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/slider/_pad.py b/plotly/graph_objs/layout/slider/_pad.py index 89b85a83d8..22bb55c4b9 100644 --- a/plotly/graph_objs/layout/slider/_pad.py +++ b/plotly/graph_objs/layout/slider/_pad.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Pad(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.pad" _valid_props = {"b", "l", "r", "t"} - # b - # - @property def b(self): """ @@ -31,8 +30,6 @@ def b(self): def b(self, val): self["b"] = val - # l - # - @property def l(self): """ @@ -52,8 +49,6 @@ def l(self): def l(self, val): self["l"] = val - # r - # - @property def r(self): """ @@ -73,8 +68,6 @@ def r(self): def r(self, val): self["r"] = val - # t - # - @property def t(self): """ @@ -93,8 +86,6 @@ def t(self): def t(self, val): self["t"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -112,7 +103,15 @@ def _prop_descriptions(self): component. """ - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + def __init__( + self, + arg=None, + b: int | float | None = None, + l: int | float | None = None, + r: int | float | None = None, + t: int | float | None = None, + **kwargs, + ): """ Construct a new Pad object @@ -141,14 +140,11 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): ------- Pad """ - super(Pad, self).__init__("pad") - + super().__init__("pad") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -163,34 +159,12 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.slider.Pad`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("l", None) - _v = l if l is not None else _v - if _v is not None: - self["l"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("t", None) - _v = t if t is not None else _v - if _v is not None: - self["t"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("b", arg, b) + self._init_provided("l", arg, l) + self._init_provided("r", arg, r) + self._init_provided("t", arg, t) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/slider/_step.py b/plotly/graph_objs/layout/slider/_step.py index 67a6efa0c0..67ca9ad12b 100644 --- a/plotly/graph_objs/layout/slider/_step.py +++ b/plotly/graph_objs/layout/slider/_step.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Step(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.step" _valid_props = { @@ -19,8 +20,6 @@ class Step(_BaseLayoutHierarchyType): "visible", } - # args - # ---- @property def args(self): """ @@ -44,8 +43,6 @@ def args(self): def args(self, val): self["args"] = val - # execute - # ------- @property def execute(self): """ @@ -70,8 +67,6 @@ def execute(self): def execute(self, val): self["execute"] = val - # label - # ----- @property def label(self): """ @@ -91,8 +86,6 @@ def label(self): def label(self, val): self["label"] = val - # method - # ------ @property def method(self): """ @@ -117,8 +110,6 @@ def method(self): def method(self, val): self["method"] = val - # name - # ---- @property def name(self): """ @@ -144,8 +135,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -172,8 +161,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -194,8 +181,6 @@ def value(self): def value(self, val): self["value"] = val - # visible - # ------- @property def visible(self): """ @@ -214,8 +199,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -270,14 +253,14 @@ def _prop_descriptions(self): def __init__( self, arg=None, - args=None, - execute=None, - label=None, - method=None, - name=None, - templateitemname=None, - value=None, - visible=None, + args: list | None = None, + execute: bool | None = None, + label: str | None = None, + method: Any | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -340,14 +323,11 @@ def __init__( ------- Step """ - super(Step, self).__init__("steps") - + super().__init__("steps") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -362,50 +342,16 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.slider.Step`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("args", None) - _v = args if args is not None else _v - if _v is not None: - self["args"] = _v - _v = arg.pop("execute", None) - _v = execute if execute is not None else _v - if _v is not None: - self["execute"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("method", None) - _v = method if method is not None else _v - if _v is not None: - self["method"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("args", arg, args) + self._init_provided("execute", arg, execute) + self._init_provided("label", arg, label) + self._init_provided("method", arg, method) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/slider/_transition.py b/plotly/graph_objs/layout/slider/_transition.py index 9565cfb6bf..62e8a9937b 100644 --- a/plotly/graph_objs/layout/slider/_transition.py +++ b/plotly/graph_objs/layout/slider/_transition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Transition(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.slider" _path_str = "layout.slider.transition" _valid_props = {"duration", "easing"} - # duration - # -------- @property def duration(self): """ @@ -30,8 +29,6 @@ def duration(self): def duration(self, val): self["duration"] = val - # easing - # ------ @property def easing(self): """ @@ -59,8 +56,6 @@ def easing(self): def easing(self, val): self["easing"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): Sets the easing function of the slider transition """ - def __init__(self, arg=None, duration=None, easing=None, **kwargs): + def __init__( + self, + arg=None, + duration: int | float | None = None, + easing: Any | None = None, + **kwargs, + ): """ Construct a new Transition object @@ -89,14 +90,11 @@ def __init__(self, arg=None, duration=None, easing=None, **kwargs): ------- Transition """ - super(Transition, self).__init__("transition") - + super().__init__("transition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -111,26 +109,10 @@ def __init__(self, arg=None, duration=None, easing=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.slider.Transition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("duration", None) - _v = duration if duration is not None else _v - if _v is not None: - self["duration"] = _v - _v = arg.pop("easing", None) - _v = easing if easing is not None else _v - if _v is not None: - self["easing"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("duration", arg, duration) + self._init_provided("easing", arg, easing) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/slider/currentvalue/__init__.py b/plotly/graph_objs/layout/slider/currentvalue/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/slider/currentvalue/__init__.py +++ b/plotly/graph_objs/layout/slider/currentvalue/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/slider/currentvalue/_font.py b/plotly/graph_objs/layout/slider/currentvalue/_font.py index 761196a2b3..120a4240e2 100644 --- a/plotly/graph_objs/layout/slider/currentvalue/_font.py +++ b/plotly/graph_objs/layout/slider/currentvalue/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.slider.currentvalue" _path_str = "layout.slider.currentvalue.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.slider.currentvalue.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/smith/__init__.py b/plotly/graph_objs/layout/smith/__init__.py index 0ebc73bd0a..183925b564 100644 --- a/plotly/graph_objs/layout/smith/__init__.py +++ b/plotly/graph_objs/layout/smith/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._imaginaryaxis import Imaginaryaxis - from ._realaxis import Realaxis - from . import imaginaryaxis - from . import realaxis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".imaginaryaxis", ".realaxis"], - ["._domain.Domain", "._imaginaryaxis.Imaginaryaxis", "._realaxis.Realaxis"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".imaginaryaxis", ".realaxis"], + ["._domain.Domain", "._imaginaryaxis.Imaginaryaxis", "._realaxis.Realaxis"], +) diff --git a/plotly/graph_objs/layout/smith/_domain.py b/plotly/graph_objs/layout/smith/_domain.py index 09870f3693..a47753ceb1 100644 --- a/plotly/graph_objs/layout/smith/_domain.py +++ b/plotly/graph_objs/layout/smith/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.smith" _path_str = "layout.smith.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.smith.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/smith/_imaginaryaxis.py b/plotly/graph_objs/layout/smith/_imaginaryaxis.py index 7a666c1e53..2bf8ab2669 100644 --- a/plotly/graph_objs/layout/smith/_imaginaryaxis.py +++ b/plotly/graph_objs/layout/smith/_imaginaryaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Imaginaryaxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.smith" _path_str = "layout.smith.imaginaryaxis" _valid_props = { @@ -36,8 +37,6 @@ class Imaginaryaxis(_BaseLayoutHierarchyType): "visible", } - # color - # ----- @property def color(self): """ @@ -51,42 +50,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -98,8 +62,6 @@ def color(self): def color(self, val): self["color"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -110,42 +72,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -157,8 +84,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -183,8 +108,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -203,8 +126,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -233,8 +154,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -260,8 +179,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -286,8 +203,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -298,42 +213,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -345,8 +225,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -365,8 +243,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -386,8 +262,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -406,8 +280,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -426,8 +298,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -450,8 +320,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -471,8 +339,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -483,42 +349,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -530,8 +361,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -543,52 +372,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.smith.imaginaryaxis.Tickfont @@ -599,8 +382,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -629,8 +410,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -649,8 +428,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -670,8 +447,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -693,8 +468,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -714,8 +487,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -727,7 +498,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -735,8 +506,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -755,8 +524,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -775,8 +542,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # visible - # ------- @property def visible(self): """ @@ -797,8 +562,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -910,31 +673,31 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tickcolor=None, - tickfont=None, - tickformat=None, - ticklen=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - visible=None, + color: str | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + ticklen: int | float | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -1054,14 +817,11 @@ def __init__( ------- Imaginaryaxis """ - super(Imaginaryaxis, self).__init__("imaginaryaxis") - + super().__init__("imaginaryaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1076,118 +836,33 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.smith.Imaginaryaxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/smith/_realaxis.py b/plotly/graph_objs/layout/smith/_realaxis.py index 3aa26e70a5..556b98166c 100644 --- a/plotly/graph_objs/layout/smith/_realaxis.py +++ b/plotly/graph_objs/layout/smith/_realaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Realaxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.smith" _path_str = "layout.smith.realaxis" _valid_props = { @@ -38,8 +39,6 @@ class Realaxis(_BaseLayoutHierarchyType): "visible", } - # color - # ----- @property def color(self): """ @@ -53,42 +52,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -100,8 +64,6 @@ def color(self): def color(self, val): self["color"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -112,42 +74,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -159,8 +86,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -185,8 +110,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -205,8 +128,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -235,8 +156,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -262,8 +181,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -288,8 +205,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -300,42 +215,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -347,8 +227,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -367,8 +245,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -388,8 +264,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -408,8 +282,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -428,8 +300,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -452,8 +322,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -473,8 +341,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # side - # ---- @property def side(self): """ @@ -495,8 +361,6 @@ def side(self): def side(self, val): self["side"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -519,8 +383,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -531,42 +393,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -578,8 +405,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -591,52 +416,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.smith.realaxis.Tickfont @@ -647,8 +426,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -677,8 +454,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -697,8 +472,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -718,8 +491,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -741,8 +512,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -762,8 +531,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -774,7 +541,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -782,8 +549,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -802,8 +567,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -822,8 +585,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # visible - # ------- @property def visible(self): """ @@ -844,8 +605,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -962,33 +721,33 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - side=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - ticklen=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - visible=None, + color: str | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + side: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + ticklen: int | float | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -1113,14 +872,11 @@ def __init__( ------- Realaxis """ - super(Realaxis, self).__init__("realaxis") - + super().__init__("realaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1135,126 +891,35 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.smith.Realaxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("side", arg, side) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/smith/imaginaryaxis/__init__.py b/plotly/graph_objs/layout/smith/imaginaryaxis/__init__.py index 0224c78e2f..95d4572a8d 100644 --- a/plotly/graph_objs/layout/smith/imaginaryaxis/__init__.py +++ b/plotly/graph_objs/layout/smith/imaginaryaxis/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._tickfont.Tickfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._tickfont.Tickfont"]) diff --git a/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py b/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py index 95278b10cf..d88eae8e5a 100644 --- a/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py +++ b/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.smith.imaginaryaxis" _path_str = "layout.smith.imaginaryaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.smith.imaginaryaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/smith/realaxis/__init__.py b/plotly/graph_objs/layout/smith/realaxis/__init__.py index 0224c78e2f..95d4572a8d 100644 --- a/plotly/graph_objs/layout/smith/realaxis/__init__.py +++ b/plotly/graph_objs/layout/smith/realaxis/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._tickfont.Tickfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._tickfont.Tickfont"]) diff --git a/plotly/graph_objs/layout/smith/realaxis/_tickfont.py b/plotly/graph_objs/layout/smith/realaxis/_tickfont.py index c3e38dfbcb..a49fb54677 100644 --- a/plotly/graph_objs/layout/smith/realaxis/_tickfont.py +++ b/plotly/graph_objs/layout/smith/realaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.smith.realaxis" _path_str = "layout.smith.realaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.smith.realaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/template/__init__.py b/plotly/graph_objs/layout/template/__init__.py index 6b4972a461..cee6e64720 100644 --- a/plotly/graph_objs/layout/template/__init__.py +++ b/plotly/graph_objs/layout/template/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._data import Data - from ._layout import Layout - from . import data -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".data"], ["._data.Data", "._layout.Layout"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".data"], ["._data.Data", "._layout.Layout"] +) diff --git a/plotly/graph_objs/layout/template/_data.py b/plotly/graph_objs/layout/template/_data.py index a27b067975..37b9d9e7bf 100644 --- a/plotly/graph_objs/layout/template/_data.py +++ b/plotly/graph_objs/layout/template/_data.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Data(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.template" _path_str = "layout.template.data" _valid_props = { @@ -60,8 +61,6 @@ class Data(_BaseLayoutHierarchyType): "waterfall", } - # barpolar - # -------- @property def barpolar(self): """ @@ -71,8 +70,6 @@ def barpolar(self): - A list or tuple of dicts of string/value properties that will be passed to the Barpolar constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Barpolar] @@ -83,8 +80,6 @@ def barpolar(self): def barpolar(self, val): self["barpolar"] = val - # bar - # --- @property def bar(self): """ @@ -94,8 +89,6 @@ def bar(self): - A list or tuple of dicts of string/value properties that will be passed to the Bar constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Bar] @@ -106,8 +99,6 @@ def bar(self): def bar(self, val): self["bar"] = val - # box - # --- @property def box(self): """ @@ -117,8 +108,6 @@ def box(self): - A list or tuple of dicts of string/value properties that will be passed to the Box constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Box] @@ -129,8 +118,6 @@ def box(self): def box(self, val): self["box"] = val - # candlestick - # ----------- @property def candlestick(self): """ @@ -140,8 +127,6 @@ def candlestick(self): - A list or tuple of dicts of string/value properties that will be passed to the Candlestick constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Candlestick] @@ -152,8 +137,6 @@ def candlestick(self): def candlestick(self, val): self["candlestick"] = val - # carpet - # ------ @property def carpet(self): """ @@ -163,8 +146,6 @@ def carpet(self): - A list or tuple of dicts of string/value properties that will be passed to the Carpet constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Carpet] @@ -175,8 +156,6 @@ def carpet(self): def carpet(self, val): self["carpet"] = val - # choroplethmapbox - # ---------------- @property def choroplethmapbox(self): """ @@ -186,8 +165,6 @@ def choroplethmapbox(self): - A list or tuple of dicts of string/value properties that will be passed to the Choroplethmapbox constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Choroplethmapbox] @@ -198,8 +175,6 @@ def choroplethmapbox(self): def choroplethmapbox(self, val): self["choroplethmapbox"] = val - # choroplethmap - # ------------- @property def choroplethmap(self): """ @@ -209,8 +184,6 @@ def choroplethmap(self): - A list or tuple of dicts of string/value properties that will be passed to the Choroplethmap constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Choroplethmap] @@ -221,8 +194,6 @@ def choroplethmap(self): def choroplethmap(self, val): self["choroplethmap"] = val - # choropleth - # ---------- @property def choropleth(self): """ @@ -232,8 +203,6 @@ def choropleth(self): - A list or tuple of dicts of string/value properties that will be passed to the Choropleth constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Choropleth] @@ -244,8 +213,6 @@ def choropleth(self): def choropleth(self, val): self["choropleth"] = val - # cone - # ---- @property def cone(self): """ @@ -255,8 +222,6 @@ def cone(self): - A list or tuple of dicts of string/value properties that will be passed to the Cone constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Cone] @@ -267,8 +232,6 @@ def cone(self): def cone(self, val): self["cone"] = val - # contourcarpet - # ------------- @property def contourcarpet(self): """ @@ -278,8 +241,6 @@ def contourcarpet(self): - A list or tuple of dicts of string/value properties that will be passed to the Contourcarpet constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Contourcarpet] @@ -290,8 +251,6 @@ def contourcarpet(self): def contourcarpet(self, val): self["contourcarpet"] = val - # contour - # ------- @property def contour(self): """ @@ -301,8 +260,6 @@ def contour(self): - A list or tuple of dicts of string/value properties that will be passed to the Contour constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Contour] @@ -313,8 +270,6 @@ def contour(self): def contour(self, val): self["contour"] = val - # densitymapbox - # ------------- @property def densitymapbox(self): """ @@ -324,8 +279,6 @@ def densitymapbox(self): - A list or tuple of dicts of string/value properties that will be passed to the Densitymapbox constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Densitymapbox] @@ -336,8 +289,6 @@ def densitymapbox(self): def densitymapbox(self, val): self["densitymapbox"] = val - # densitymap - # ---------- @property def densitymap(self): """ @@ -347,8 +298,6 @@ def densitymap(self): - A list or tuple of dicts of string/value properties that will be passed to the Densitymap constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Densitymap] @@ -359,8 +308,6 @@ def densitymap(self): def densitymap(self, val): self["densitymap"] = val - # funnelarea - # ---------- @property def funnelarea(self): """ @@ -370,8 +317,6 @@ def funnelarea(self): - A list or tuple of dicts of string/value properties that will be passed to the Funnelarea constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Funnelarea] @@ -382,8 +327,6 @@ def funnelarea(self): def funnelarea(self, val): self["funnelarea"] = val - # funnel - # ------ @property def funnel(self): """ @@ -393,8 +336,6 @@ def funnel(self): - A list or tuple of dicts of string/value properties that will be passed to the Funnel constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Funnel] @@ -405,8 +346,6 @@ def funnel(self): def funnel(self, val): self["funnel"] = val - # heatmap - # ------- @property def heatmap(self): """ @@ -416,8 +355,6 @@ def heatmap(self): - A list or tuple of dicts of string/value properties that will be passed to the Heatmap constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Heatmap] @@ -428,8 +365,6 @@ def heatmap(self): def heatmap(self, val): self["heatmap"] = val - # histogram2dcontour - # ------------------ @property def histogram2dcontour(self): """ @@ -439,8 +374,6 @@ def histogram2dcontour(self): - A list or tuple of dicts of string/value properties that will be passed to the Histogram2dContour constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Histogram2dContour] @@ -451,8 +384,6 @@ def histogram2dcontour(self): def histogram2dcontour(self, val): self["histogram2dcontour"] = val - # histogram2d - # ----------- @property def histogram2d(self): """ @@ -462,8 +393,6 @@ def histogram2d(self): - A list or tuple of dicts of string/value properties that will be passed to the Histogram2d constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Histogram2d] @@ -474,8 +403,6 @@ def histogram2d(self): def histogram2d(self, val): self["histogram2d"] = val - # histogram - # --------- @property def histogram(self): """ @@ -485,8 +412,6 @@ def histogram(self): - A list or tuple of dicts of string/value properties that will be passed to the Histogram constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Histogram] @@ -497,8 +422,6 @@ def histogram(self): def histogram(self, val): self["histogram"] = val - # icicle - # ------ @property def icicle(self): """ @@ -508,8 +431,6 @@ def icicle(self): - A list or tuple of dicts of string/value properties that will be passed to the Icicle constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Icicle] @@ -520,8 +441,6 @@ def icicle(self): def icicle(self, val): self["icicle"] = val - # image - # ----- @property def image(self): """ @@ -531,8 +450,6 @@ def image(self): - A list or tuple of dicts of string/value properties that will be passed to the Image constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Image] @@ -543,8 +460,6 @@ def image(self): def image(self, val): self["image"] = val - # indicator - # --------- @property def indicator(self): """ @@ -554,8 +469,6 @@ def indicator(self): - A list or tuple of dicts of string/value properties that will be passed to the Indicator constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Indicator] @@ -566,8 +479,6 @@ def indicator(self): def indicator(self, val): self["indicator"] = val - # isosurface - # ---------- @property def isosurface(self): """ @@ -577,8 +488,6 @@ def isosurface(self): - A list or tuple of dicts of string/value properties that will be passed to the Isosurface constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Isosurface] @@ -589,8 +498,6 @@ def isosurface(self): def isosurface(self, val): self["isosurface"] = val - # mesh3d - # ------ @property def mesh3d(self): """ @@ -600,8 +507,6 @@ def mesh3d(self): - A list or tuple of dicts of string/value properties that will be passed to the Mesh3d constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Mesh3d] @@ -612,8 +517,6 @@ def mesh3d(self): def mesh3d(self, val): self["mesh3d"] = val - # ohlc - # ---- @property def ohlc(self): """ @@ -623,8 +526,6 @@ def ohlc(self): - A list or tuple of dicts of string/value properties that will be passed to the Ohlc constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Ohlc] @@ -635,8 +536,6 @@ def ohlc(self): def ohlc(self, val): self["ohlc"] = val - # parcats - # ------- @property def parcats(self): """ @@ -646,8 +545,6 @@ def parcats(self): - A list or tuple of dicts of string/value properties that will be passed to the Parcats constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Parcats] @@ -658,8 +555,6 @@ def parcats(self): def parcats(self, val): self["parcats"] = val - # parcoords - # --------- @property def parcoords(self): """ @@ -669,8 +564,6 @@ def parcoords(self): - A list or tuple of dicts of string/value properties that will be passed to the Parcoords constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Parcoords] @@ -681,8 +574,6 @@ def parcoords(self): def parcoords(self, val): self["parcoords"] = val - # pie - # --- @property def pie(self): """ @@ -692,8 +583,6 @@ def pie(self): - A list or tuple of dicts of string/value properties that will be passed to the Pie constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Pie] @@ -704,8 +593,6 @@ def pie(self): def pie(self, val): self["pie"] = val - # sankey - # ------ @property def sankey(self): """ @@ -715,8 +602,6 @@ def sankey(self): - A list or tuple of dicts of string/value properties that will be passed to the Sankey constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Sankey] @@ -727,8 +612,6 @@ def sankey(self): def sankey(self, val): self["sankey"] = val - # scatter3d - # --------- @property def scatter3d(self): """ @@ -738,8 +621,6 @@ def scatter3d(self): - A list or tuple of dicts of string/value properties that will be passed to the Scatter3d constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scatter3d] @@ -750,8 +631,6 @@ def scatter3d(self): def scatter3d(self, val): self["scatter3d"] = val - # scattercarpet - # ------------- @property def scattercarpet(self): """ @@ -761,8 +640,6 @@ def scattercarpet(self): - A list or tuple of dicts of string/value properties that will be passed to the Scattercarpet constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scattercarpet] @@ -773,8 +650,6 @@ def scattercarpet(self): def scattercarpet(self, val): self["scattercarpet"] = val - # scattergeo - # ---------- @property def scattergeo(self): """ @@ -784,8 +659,6 @@ def scattergeo(self): - A list or tuple of dicts of string/value properties that will be passed to the Scattergeo constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scattergeo] @@ -796,8 +669,6 @@ def scattergeo(self): def scattergeo(self, val): self["scattergeo"] = val - # scattergl - # --------- @property def scattergl(self): """ @@ -807,8 +678,6 @@ def scattergl(self): - A list or tuple of dicts of string/value properties that will be passed to the Scattergl constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scattergl] @@ -819,8 +688,6 @@ def scattergl(self): def scattergl(self, val): self["scattergl"] = val - # scattermapbox - # ------------- @property def scattermapbox(self): """ @@ -830,8 +697,6 @@ def scattermapbox(self): - A list or tuple of dicts of string/value properties that will be passed to the Scattermapbox constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scattermapbox] @@ -842,8 +707,6 @@ def scattermapbox(self): def scattermapbox(self, val): self["scattermapbox"] = val - # scattermap - # ---------- @property def scattermap(self): """ @@ -853,8 +716,6 @@ def scattermap(self): - A list or tuple of dicts of string/value properties that will be passed to the Scattermap constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scattermap] @@ -865,8 +726,6 @@ def scattermap(self): def scattermap(self, val): self["scattermap"] = val - # scatterpolargl - # -------------- @property def scatterpolargl(self): """ @@ -876,8 +735,6 @@ def scatterpolargl(self): - A list or tuple of dicts of string/value properties that will be passed to the Scatterpolargl constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scatterpolargl] @@ -888,8 +745,6 @@ def scatterpolargl(self): def scatterpolargl(self, val): self["scatterpolargl"] = val - # scatterpolar - # ------------ @property def scatterpolar(self): """ @@ -899,8 +754,6 @@ def scatterpolar(self): - A list or tuple of dicts of string/value properties that will be passed to the Scatterpolar constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scatterpolar] @@ -911,8 +764,6 @@ def scatterpolar(self): def scatterpolar(self, val): self["scatterpolar"] = val - # scatter - # ------- @property def scatter(self): """ @@ -922,8 +773,6 @@ def scatter(self): - A list or tuple of dicts of string/value properties that will be passed to the Scatter constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scatter] @@ -934,8 +783,6 @@ def scatter(self): def scatter(self, val): self["scatter"] = val - # scattersmith - # ------------ @property def scattersmith(self): """ @@ -945,8 +792,6 @@ def scattersmith(self): - A list or tuple of dicts of string/value properties that will be passed to the Scattersmith constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scattersmith] @@ -957,8 +802,6 @@ def scattersmith(self): def scattersmith(self, val): self["scattersmith"] = val - # scatterternary - # -------------- @property def scatterternary(self): """ @@ -968,8 +811,6 @@ def scatterternary(self): - A list or tuple of dicts of string/value properties that will be passed to the Scatterternary constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Scatterternary] @@ -980,8 +821,6 @@ def scatterternary(self): def scatterternary(self, val): self["scatterternary"] = val - # splom - # ----- @property def splom(self): """ @@ -991,8 +830,6 @@ def splom(self): - A list or tuple of dicts of string/value properties that will be passed to the Splom constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Splom] @@ -1003,8 +840,6 @@ def splom(self): def splom(self, val): self["splom"] = val - # streamtube - # ---------- @property def streamtube(self): """ @@ -1014,8 +849,6 @@ def streamtube(self): - A list or tuple of dicts of string/value properties that will be passed to the Streamtube constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Streamtube] @@ -1026,8 +859,6 @@ def streamtube(self): def streamtube(self, val): self["streamtube"] = val - # sunburst - # -------- @property def sunburst(self): """ @@ -1037,8 +868,6 @@ def sunburst(self): - A list or tuple of dicts of string/value properties that will be passed to the Sunburst constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Sunburst] @@ -1049,8 +878,6 @@ def sunburst(self): def sunburst(self, val): self["sunburst"] = val - # surface - # ------- @property def surface(self): """ @@ -1060,8 +887,6 @@ def surface(self): - A list or tuple of dicts of string/value properties that will be passed to the Surface constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Surface] @@ -1072,8 +897,6 @@ def surface(self): def surface(self, val): self["surface"] = val - # table - # ----- @property def table(self): """ @@ -1083,8 +906,6 @@ def table(self): - A list or tuple of dicts of string/value properties that will be passed to the Table constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Table] @@ -1095,8 +916,6 @@ def table(self): def table(self, val): self["table"] = val - # treemap - # ------- @property def treemap(self): """ @@ -1106,8 +925,6 @@ def treemap(self): - A list or tuple of dicts of string/value properties that will be passed to the Treemap constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Treemap] @@ -1118,8 +935,6 @@ def treemap(self): def treemap(self, val): self["treemap"] = val - # violin - # ------ @property def violin(self): """ @@ -1129,8 +944,6 @@ def violin(self): - A list or tuple of dicts of string/value properties that will be passed to the Violin constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Violin] @@ -1141,8 +954,6 @@ def violin(self): def violin(self, val): self["violin"] = val - # volume - # ------ @property def volume(self): """ @@ -1152,8 +963,6 @@ def volume(self): - A list or tuple of dicts of string/value properties that will be passed to the Volume constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Volume] @@ -1164,8 +973,6 @@ def volume(self): def volume(self, val): self["volume"] = val - # waterfall - # --------- @property def waterfall(self): """ @@ -1175,8 +982,6 @@ def waterfall(self): - A list or tuple of dicts of string/value properties that will be passed to the Waterfall constructor - Supported dict properties: - Returns ------- tuple[plotly.graph_objs.layout.template.data.Waterfall] @@ -1187,8 +992,6 @@ def waterfall(self): def waterfall(self, val): self["waterfall"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1346,55 +1149,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - barpolar=None, - bar=None, - box=None, - candlestick=None, - carpet=None, - choroplethmapbox=None, - choroplethmap=None, - choropleth=None, - cone=None, - contourcarpet=None, - contour=None, - densitymapbox=None, - densitymap=None, - funnelarea=None, - funnel=None, - heatmap=None, - histogram2dcontour=None, - histogram2d=None, - histogram=None, - icicle=None, - image=None, - indicator=None, - isosurface=None, - mesh3d=None, - ohlc=None, - parcats=None, - parcoords=None, - pie=None, - sankey=None, - scatter3d=None, - scattercarpet=None, - scattergeo=None, - scattergl=None, - scattermapbox=None, - scattermap=None, - scatterpolargl=None, - scatterpolar=None, - scatter=None, - scattersmith=None, - scatterternary=None, - splom=None, - streamtube=None, - sunburst=None, - surface=None, - table=None, - treemap=None, - violin=None, - volume=None, - waterfall=None, + barpolar: None | None = None, + bar: None | None = None, + box: None | None = None, + candlestick: None | None = None, + carpet: None | None = None, + choroplethmapbox: None | None = None, + choroplethmap: None | None = None, + choropleth: None | None = None, + cone: None | None = None, + contourcarpet: None | None = None, + contour: None | None = None, + densitymapbox: None | None = None, + densitymap: None | None = None, + funnelarea: None | None = None, + funnel: None | None = None, + heatmap: None | None = None, + histogram2dcontour: None | None = None, + histogram2d: None | None = None, + histogram: None | None = None, + icicle: None | None = None, + image: None | None = None, + indicator: None | None = None, + isosurface: None | None = None, + mesh3d: None | None = None, + ohlc: None | None = None, + parcats: None | None = None, + parcoords: None | None = None, + pie: None | None = None, + sankey: None | None = None, + scatter3d: None | None = None, + scattercarpet: None | None = None, + scattergeo: None | None = None, + scattergl: None | None = None, + scattermapbox: None | None = None, + scattermap: None | None = None, + scatterpolargl: None | None = None, + scatterpolar: None | None = None, + scatter: None | None = None, + scattersmith: None | None = None, + scatterternary: None | None = None, + splom: None | None = None, + streamtube: None | None = None, + sunburst: None | None = None, + surface: None | None = None, + table: None | None = None, + treemap: None | None = None, + violin: None | None = None, + volume: None | None = None, + waterfall: None | None = None, **kwargs, ): """ @@ -1560,14 +1363,11 @@ def __init__( ------- Data """ - super(Data, self).__init__("data") - + super().__init__("data") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1582,214 +1382,57 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.template.Data`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("barpolar", None) - _v = barpolar if barpolar is not None else _v - if _v is not None: - self["barpolar"] = _v - _v = arg.pop("bar", None) - _v = bar if bar is not None else _v - if _v is not None: - self["bar"] = _v - _v = arg.pop("box", None) - _v = box if box is not None else _v - if _v is not None: - self["box"] = _v - _v = arg.pop("candlestick", None) - _v = candlestick if candlestick is not None else _v - if _v is not None: - self["candlestick"] = _v - _v = arg.pop("carpet", None) - _v = carpet if carpet is not None else _v - if _v is not None: - self["carpet"] = _v - _v = arg.pop("choroplethmapbox", None) - _v = choroplethmapbox if choroplethmapbox is not None else _v - if _v is not None: - self["choroplethmapbox"] = _v - _v = arg.pop("choroplethmap", None) - _v = choroplethmap if choroplethmap is not None else _v - if _v is not None: - self["choroplethmap"] = _v - _v = arg.pop("choropleth", None) - _v = choropleth if choropleth is not None else _v - if _v is not None: - self["choropleth"] = _v - _v = arg.pop("cone", None) - _v = cone if cone is not None else _v - if _v is not None: - self["cone"] = _v - _v = arg.pop("contourcarpet", None) - _v = contourcarpet if contourcarpet is not None else _v - if _v is not None: - self["contourcarpet"] = _v - _v = arg.pop("contour", None) - _v = contour if contour is not None else _v - if _v is not None: - self["contour"] = _v - _v = arg.pop("densitymapbox", None) - _v = densitymapbox if densitymapbox is not None else _v - if _v is not None: - self["densitymapbox"] = _v - _v = arg.pop("densitymap", None) - _v = densitymap if densitymap is not None else _v - if _v is not None: - self["densitymap"] = _v - _v = arg.pop("funnelarea", None) - _v = funnelarea if funnelarea is not None else _v - if _v is not None: - self["funnelarea"] = _v - _v = arg.pop("funnel", None) - _v = funnel if funnel is not None else _v - if _v is not None: - self["funnel"] = _v - _v = arg.pop("heatmap", None) - _v = heatmap if heatmap is not None else _v - if _v is not None: - self["heatmap"] = _v - _v = arg.pop("histogram2dcontour", None) - _v = histogram2dcontour if histogram2dcontour is not None else _v - if _v is not None: - self["histogram2dcontour"] = _v - _v = arg.pop("histogram2d", None) - _v = histogram2d if histogram2d is not None else _v - if _v is not None: - self["histogram2d"] = _v - _v = arg.pop("histogram", None) - _v = histogram if histogram is not None else _v - if _v is not None: - self["histogram"] = _v - _v = arg.pop("icicle", None) - _v = icicle if icicle is not None else _v - if _v is not None: - self["icicle"] = _v - _v = arg.pop("image", None) - _v = image if image is not None else _v - if _v is not None: - self["image"] = _v - _v = arg.pop("indicator", None) - _v = indicator if indicator is not None else _v - if _v is not None: - self["indicator"] = _v - _v = arg.pop("isosurface", None) - _v = isosurface if isosurface is not None else _v - if _v is not None: - self["isosurface"] = _v - _v = arg.pop("mesh3d", None) - _v = mesh3d if mesh3d is not None else _v - if _v is not None: - self["mesh3d"] = _v - _v = arg.pop("ohlc", None) - _v = ohlc if ohlc is not None else _v - if _v is not None: - self["ohlc"] = _v - _v = arg.pop("parcats", None) - _v = parcats if parcats is not None else _v - if _v is not None: - self["parcats"] = _v - _v = arg.pop("parcoords", None) - _v = parcoords if parcoords is not None else _v - if _v is not None: - self["parcoords"] = _v - _v = arg.pop("pie", None) - _v = pie if pie is not None else _v - if _v is not None: - self["pie"] = _v - _v = arg.pop("sankey", None) - _v = sankey if sankey is not None else _v - if _v is not None: - self["sankey"] = _v - _v = arg.pop("scatter3d", None) - _v = scatter3d if scatter3d is not None else _v - if _v is not None: - self["scatter3d"] = _v - _v = arg.pop("scattercarpet", None) - _v = scattercarpet if scattercarpet is not None else _v - if _v is not None: - self["scattercarpet"] = _v - _v = arg.pop("scattergeo", None) - _v = scattergeo if scattergeo is not None else _v - if _v is not None: - self["scattergeo"] = _v - _v = arg.pop("scattergl", None) - _v = scattergl if scattergl is not None else _v - if _v is not None: - self["scattergl"] = _v - _v = arg.pop("scattermapbox", None) - _v = scattermapbox if scattermapbox is not None else _v - if _v is not None: - self["scattermapbox"] = _v - _v = arg.pop("scattermap", None) - _v = scattermap if scattermap is not None else _v - if _v is not None: - self["scattermap"] = _v - _v = arg.pop("scatterpolargl", None) - _v = scatterpolargl if scatterpolargl is not None else _v - if _v is not None: - self["scatterpolargl"] = _v - _v = arg.pop("scatterpolar", None) - _v = scatterpolar if scatterpolar is not None else _v - if _v is not None: - self["scatterpolar"] = _v - _v = arg.pop("scatter", None) - _v = scatter if scatter is not None else _v - if _v is not None: - self["scatter"] = _v - _v = arg.pop("scattersmith", None) - _v = scattersmith if scattersmith is not None else _v - if _v is not None: - self["scattersmith"] = _v - _v = arg.pop("scatterternary", None) - _v = scatterternary if scatterternary is not None else _v - if _v is not None: - self["scatterternary"] = _v - _v = arg.pop("splom", None) - _v = splom if splom is not None else _v - if _v is not None: - self["splom"] = _v - _v = arg.pop("streamtube", None) - _v = streamtube if streamtube is not None else _v - if _v is not None: - self["streamtube"] = _v - _v = arg.pop("sunburst", None) - _v = sunburst if sunburst is not None else _v - if _v is not None: - self["sunburst"] = _v - _v = arg.pop("surface", None) - _v = surface if surface is not None else _v - if _v is not None: - self["surface"] = _v - _v = arg.pop("table", None) - _v = table if table is not None else _v - if _v is not None: - self["table"] = _v - _v = arg.pop("treemap", None) - _v = treemap if treemap is not None else _v - if _v is not None: - self["treemap"] = _v - _v = arg.pop("violin", None) - _v = violin if violin is not None else _v - if _v is not None: - self["violin"] = _v - _v = arg.pop("volume", None) - _v = volume if volume is not None else _v - if _v is not None: - self["volume"] = _v - _v = arg.pop("waterfall", None) - _v = waterfall if waterfall is not None else _v - if _v is not None: - self["waterfall"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("barpolar", arg, barpolar) + self._init_provided("bar", arg, bar) + self._init_provided("box", arg, box) + self._init_provided("candlestick", arg, candlestick) + self._init_provided("carpet", arg, carpet) + self._init_provided("choroplethmapbox", arg, choroplethmapbox) + self._init_provided("choroplethmap", arg, choroplethmap) + self._init_provided("choropleth", arg, choropleth) + self._init_provided("cone", arg, cone) + self._init_provided("contourcarpet", arg, contourcarpet) + self._init_provided("contour", arg, contour) + self._init_provided("densitymapbox", arg, densitymapbox) + self._init_provided("densitymap", arg, densitymap) + self._init_provided("funnelarea", arg, funnelarea) + self._init_provided("funnel", arg, funnel) + self._init_provided("heatmap", arg, heatmap) + self._init_provided("histogram2dcontour", arg, histogram2dcontour) + self._init_provided("histogram2d", arg, histogram2d) + self._init_provided("histogram", arg, histogram) + self._init_provided("icicle", arg, icicle) + self._init_provided("image", arg, image) + self._init_provided("indicator", arg, indicator) + self._init_provided("isosurface", arg, isosurface) + self._init_provided("mesh3d", arg, mesh3d) + self._init_provided("ohlc", arg, ohlc) + self._init_provided("parcats", arg, parcats) + self._init_provided("parcoords", arg, parcoords) + self._init_provided("pie", arg, pie) + self._init_provided("sankey", arg, sankey) + self._init_provided("scatter3d", arg, scatter3d) + self._init_provided("scattercarpet", arg, scattercarpet) + self._init_provided("scattergeo", arg, scattergeo) + self._init_provided("scattergl", arg, scattergl) + self._init_provided("scattermapbox", arg, scattermapbox) + self._init_provided("scattermap", arg, scattermap) + self._init_provided("scatterpolargl", arg, scatterpolargl) + self._init_provided("scatterpolar", arg, scatterpolar) + self._init_provided("scatter", arg, scatter) + self._init_provided("scattersmith", arg, scattersmith) + self._init_provided("scatterternary", arg, scatterternary) + self._init_provided("splom", arg, splom) + self._init_provided("streamtube", arg, streamtube) + self._init_provided("sunburst", arg, sunburst) + self._init_provided("surface", arg, surface) + self._init_provided("table", arg, table) + self._init_provided("treemap", arg, treemap) + self._init_provided("violin", arg, violin) + self._init_provided("volume", arg, volume) + self._init_provided("waterfall", arg, waterfall) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/template/data/__init__.py b/plotly/graph_objs/layout/template/data/__init__.py index 3a11f83049..ef2921907e 100644 --- a/plotly/graph_objs/layout/template/data/__init__.py +++ b/plotly/graph_objs/layout/template/data/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._bar import Bar - from ._barpolar import Barpolar - from ._box import Box - from ._candlestick import Candlestick - from ._carpet import Carpet - from ._choropleth import Choropleth - from ._choroplethmap import Choroplethmap - from ._choroplethmapbox import Choroplethmapbox - from ._cone import Cone - from ._contour import Contour - from ._contourcarpet import Contourcarpet - from ._densitymap import Densitymap - from ._densitymapbox import Densitymapbox - from ._funnel import Funnel - from ._funnelarea import Funnelarea - from ._heatmap import Heatmap - from ._histogram import Histogram - from ._histogram2d import Histogram2d - from ._histogram2dcontour import Histogram2dContour - from ._icicle import Icicle - from ._image import Image - from ._indicator import Indicator - from ._isosurface import Isosurface - from ._mesh3d import Mesh3d - from ._ohlc import Ohlc - from ._parcats import Parcats - from ._parcoords import Parcoords - from ._pie import Pie - from ._sankey import Sankey - from ._scatter import Scatter - from ._scatter3d import Scatter3d - from ._scattercarpet import Scattercarpet - from ._scattergeo import Scattergeo - from ._scattergl import Scattergl - from ._scattermap import Scattermap - from ._scattermapbox import Scattermapbox - from ._scatterpolar import Scatterpolar - from ._scatterpolargl import Scatterpolargl - from ._scattersmith import Scattersmith - from ._scatterternary import Scatterternary - from ._splom import Splom - from ._streamtube import Streamtube - from ._sunburst import Sunburst - from ._surface import Surface - from ._table import Table - from ._treemap import Treemap - from ._violin import Violin - from ._volume import Volume - from ._waterfall import Waterfall -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._bar.Bar", - "._barpolar.Barpolar", - "._box.Box", - "._candlestick.Candlestick", - "._carpet.Carpet", - "._choropleth.Choropleth", - "._choroplethmap.Choroplethmap", - "._choroplethmapbox.Choroplethmapbox", - "._cone.Cone", - "._contour.Contour", - "._contourcarpet.Contourcarpet", - "._densitymap.Densitymap", - "._densitymapbox.Densitymapbox", - "._funnel.Funnel", - "._funnelarea.Funnelarea", - "._heatmap.Heatmap", - "._histogram.Histogram", - "._histogram2d.Histogram2d", - "._histogram2dcontour.Histogram2dContour", - "._icicle.Icicle", - "._image.Image", - "._indicator.Indicator", - "._isosurface.Isosurface", - "._mesh3d.Mesh3d", - "._ohlc.Ohlc", - "._parcats.Parcats", - "._parcoords.Parcoords", - "._pie.Pie", - "._sankey.Sankey", - "._scatter.Scatter", - "._scatter3d.Scatter3d", - "._scattercarpet.Scattercarpet", - "._scattergeo.Scattergeo", - "._scattergl.Scattergl", - "._scattermap.Scattermap", - "._scattermapbox.Scattermapbox", - "._scatterpolar.Scatterpolar", - "._scatterpolargl.Scatterpolargl", - "._scattersmith.Scattersmith", - "._scatterternary.Scatterternary", - "._splom.Splom", - "._streamtube.Streamtube", - "._sunburst.Sunburst", - "._surface.Surface", - "._table.Table", - "._treemap.Treemap", - "._violin.Violin", - "._volume.Volume", - "._waterfall.Waterfall", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._bar.Bar", + "._barpolar.Barpolar", + "._box.Box", + "._candlestick.Candlestick", + "._carpet.Carpet", + "._choropleth.Choropleth", + "._choroplethmap.Choroplethmap", + "._choroplethmapbox.Choroplethmapbox", + "._cone.Cone", + "._contour.Contour", + "._contourcarpet.Contourcarpet", + "._densitymap.Densitymap", + "._densitymapbox.Densitymapbox", + "._funnel.Funnel", + "._funnelarea.Funnelarea", + "._heatmap.Heatmap", + "._histogram.Histogram", + "._histogram2d.Histogram2d", + "._histogram2dcontour.Histogram2dContour", + "._icicle.Icicle", + "._image.Image", + "._indicator.Indicator", + "._isosurface.Isosurface", + "._mesh3d.Mesh3d", + "._ohlc.Ohlc", + "._parcats.Parcats", + "._parcoords.Parcoords", + "._pie.Pie", + "._sankey.Sankey", + "._scatter.Scatter", + "._scatter3d.Scatter3d", + "._scattercarpet.Scattercarpet", + "._scattergeo.Scattergeo", + "._scattergl.Scattergl", + "._scattermap.Scattermap", + "._scattermapbox.Scattermapbox", + "._scatterpolar.Scatterpolar", + "._scatterpolargl.Scatterpolargl", + "._scattersmith.Scattersmith", + "._scatterternary.Scatterternary", + "._splom.Splom", + "._streamtube.Streamtube", + "._sunburst.Sunburst", + "._surface.Surface", + "._table.Table", + "._treemap.Treemap", + "._violin.Violin", + "._volume.Volume", + "._waterfall.Waterfall", + ], +) diff --git a/plotly/graph_objs/layout/ternary/__init__.py b/plotly/graph_objs/layout/ternary/__init__.py index 5bd479382d..d64a0f9f5d 100644 --- a/plotly/graph_objs/layout/ternary/__init__.py +++ b/plotly/graph_objs/layout/ternary/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._aaxis import Aaxis - from ._baxis import Baxis - from ._caxis import Caxis - from ._domain import Domain - from . import aaxis - from . import baxis - from . import caxis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".aaxis", ".baxis", ".caxis"], - ["._aaxis.Aaxis", "._baxis.Baxis", "._caxis.Caxis", "._domain.Domain"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".aaxis", ".baxis", ".caxis"], + ["._aaxis.Aaxis", "._baxis.Baxis", "._caxis.Caxis", "._domain.Domain"], +) diff --git a/plotly/graph_objs/layout/ternary/_aaxis.py b/plotly/graph_objs/layout/ternary/_aaxis.py index 8b003c58c3..d0858cc249 100644 --- a/plotly/graph_objs/layout/ternary/_aaxis.py +++ b/plotly/graph_objs/layout/ternary/_aaxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Aaxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary" _path_str = "layout.ternary.aaxis" _valid_props = { @@ -52,8 +53,6 @@ class Aaxis(_BaseLayoutHierarchyType): "uirevision", } - # color - # ----- @property def color(self): """ @@ -67,42 +66,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -114,8 +78,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -152,8 +114,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -177,8 +137,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -189,42 +147,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -236,8 +159,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -262,8 +183,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -282,8 +201,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -312,8 +229,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -339,8 +254,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -365,8 +278,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -377,42 +288,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -424,8 +300,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -444,8 +318,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # min - # --- @property def min(self): """ @@ -466,8 +338,6 @@ def min(self): def min(self, val): self["min"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -487,8 +357,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -511,8 +379,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -531,8 +397,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -555,8 +419,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -576,8 +438,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -596,8 +456,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -616,8 +474,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -640,8 +496,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -661,8 +515,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -688,8 +540,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -712,8 +562,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -724,42 +572,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -771,8 +584,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -784,52 +595,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.ternary.aaxis.Tickfont @@ -840,8 +605,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -870,8 +633,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -881,42 +642,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.ternary.aaxis.Tickformatstop] @@ -927,8 +652,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -943,8 +666,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.ternary.aaxis.Tickformatstop @@ -955,8 +676,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -981,8 +700,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1001,8 +718,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1028,8 +743,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1049,8 +762,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1072,8 +783,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1093,8 +802,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1107,7 +814,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1115,8 +822,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1135,8 +840,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1148,7 +851,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1156,8 +859,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1176,8 +877,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1196,8 +895,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1207,13 +904,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.ternary.aaxis.Title @@ -1224,8 +914,6 @@ def title(self): def title(self, val): self["title"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1245,8 +933,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1461,47 +1147,47 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - min=None, - minexponent=None, - nticks=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - uirevision=None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + min: int | float | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + uirevision: Any | None = None, **kwargs, ): """ @@ -1724,14 +1410,11 @@ def __init__( ------- Aaxis """ - super(Aaxis, self).__init__("aaxis") - + super().__init__("aaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1746,182 +1429,49 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.Aaxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("min", None) - _v = min if min is not None else _v - if _v is not None: - self["min"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("min", arg, min) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("uirevision", arg, uirevision) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/_baxis.py b/plotly/graph_objs/layout/ternary/_baxis.py index 3c5060624b..034e5ff96c 100644 --- a/plotly/graph_objs/layout/ternary/_baxis.py +++ b/plotly/graph_objs/layout/ternary/_baxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Baxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary" _path_str = "layout.ternary.baxis" _valid_props = { @@ -52,8 +53,6 @@ class Baxis(_BaseLayoutHierarchyType): "uirevision", } - # color - # ----- @property def color(self): """ @@ -67,42 +66,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -114,8 +78,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -152,8 +114,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -177,8 +137,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -189,42 +147,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -236,8 +159,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -262,8 +183,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -282,8 +201,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -312,8 +229,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -339,8 +254,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -365,8 +278,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -377,42 +288,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -424,8 +300,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -444,8 +318,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # min - # --- @property def min(self): """ @@ -466,8 +338,6 @@ def min(self): def min(self, val): self["min"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -487,8 +357,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -511,8 +379,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -531,8 +397,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -555,8 +419,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -576,8 +438,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -596,8 +456,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -616,8 +474,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -640,8 +496,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -661,8 +515,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -688,8 +540,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -712,8 +562,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -724,42 +572,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -771,8 +584,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -784,52 +595,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.ternary.baxis.Tickfont @@ -840,8 +605,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -870,8 +633,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -881,42 +642,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.ternary.baxis.Tickformatstop] @@ -927,8 +652,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -943,8 +666,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.ternary.baxis.Tickformatstop @@ -955,8 +676,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -981,8 +700,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1001,8 +718,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1028,8 +743,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1049,8 +762,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1072,8 +783,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1093,8 +802,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1107,7 +814,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1115,8 +822,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1135,8 +840,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1148,7 +851,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1156,8 +859,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1176,8 +877,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1196,8 +895,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1207,13 +904,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.ternary.baxis.Title @@ -1224,8 +914,6 @@ def title(self): def title(self, val): self["title"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1245,8 +933,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1461,47 +1147,47 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - min=None, - minexponent=None, - nticks=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - uirevision=None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + min: int | float | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + uirevision: Any | None = None, **kwargs, ): """ @@ -1724,14 +1410,11 @@ def __init__( ------- Baxis """ - super(Baxis, self).__init__("baxis") - + super().__init__("baxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1746,182 +1429,49 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.Baxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("min", None) - _v = min if min is not None else _v - if _v is not None: - self["min"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("min", arg, min) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("uirevision", arg, uirevision) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/_caxis.py b/plotly/graph_objs/layout/ternary/_caxis.py index 336b50f7c8..1e8ac0ad99 100644 --- a/plotly/graph_objs/layout/ternary/_caxis.py +++ b/plotly/graph_objs/layout/ternary/_caxis.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Caxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary" _path_str = "layout.ternary.caxis" _valid_props = { @@ -52,8 +53,6 @@ class Caxis(_BaseLayoutHierarchyType): "uirevision", } - # color - # ----- @property def color(self): """ @@ -67,42 +66,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -114,8 +78,6 @@ def color(self): def color(self, val): self["color"] = val - # dtick - # ----- @property def dtick(self): """ @@ -152,8 +114,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -177,8 +137,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -189,42 +147,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -236,8 +159,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -262,8 +183,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -282,8 +201,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # hoverformat - # ----------- @property def hoverformat(self): """ @@ -312,8 +229,6 @@ def hoverformat(self): def hoverformat(self, val): self["hoverformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -339,8 +254,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # layer - # ----- @property def layer(self): """ @@ -365,8 +278,6 @@ def layer(self): def layer(self, val): self["layer"] = val - # linecolor - # --------- @property def linecolor(self): """ @@ -377,42 +288,7 @@ def linecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -424,8 +300,6 @@ def linecolor(self): def linecolor(self, val): self["linecolor"] = val - # linewidth - # --------- @property def linewidth(self): """ @@ -444,8 +318,6 @@ def linewidth(self): def linewidth(self, val): self["linewidth"] = val - # min - # --- @property def min(self): """ @@ -466,8 +338,6 @@ def min(self): def min(self, val): self["min"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -487,8 +357,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -511,8 +379,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -531,8 +397,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -555,8 +419,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -576,8 +438,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # showline - # -------- @property def showline(self): """ @@ -596,8 +456,6 @@ def showline(self): def showline(self, val): self["showline"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -616,8 +474,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -640,8 +496,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -661,8 +515,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -688,8 +540,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -712,8 +562,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -724,42 +572,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -771,8 +584,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -784,52 +595,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.ternary.caxis.Tickfont @@ -840,8 +605,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -870,8 +633,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -881,42 +642,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.layout.ternary.caxis.Tickformatstop] @@ -927,8 +652,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -943,8 +666,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.ternary.caxis.Tickformatstop @@ -955,8 +676,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -981,8 +700,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1001,8 +718,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1028,8 +743,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1049,8 +762,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1072,8 +783,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1093,8 +802,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1107,7 +814,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1115,8 +822,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1135,8 +840,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1148,7 +851,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1156,8 +859,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1176,8 +877,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1196,8 +895,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1207,13 +904,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this axis' title font. - text - Sets the title of this axis. - Returns ------- plotly.graph_objs.layout.ternary.caxis.Title @@ -1224,8 +914,6 @@ def title(self): def title(self, val): self["title"] = val - # uirevision - # ---------- @property def uirevision(self): """ @@ -1245,8 +933,6 @@ def uirevision(self): def uirevision(self, val): self["uirevision"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1461,47 +1147,47 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - dtick=None, - exponentformat=None, - gridcolor=None, - griddash=None, - gridwidth=None, - hoverformat=None, - labelalias=None, - layer=None, - linecolor=None, - linewidth=None, - min=None, - minexponent=None, - nticks=None, - separatethousands=None, - showexponent=None, - showgrid=None, - showline=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - uirevision=None, + color: str | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + hoverformat: str | None = None, + labelalias: Any | None = None, + layer: Any | None = None, + linecolor: str | None = None, + linewidth: int | float | None = None, + min: int | float | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showgrid: bool | None = None, + showline: bool | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + uirevision: Any | None = None, **kwargs, ): """ @@ -1724,14 +1410,11 @@ def __init__( ------- Caxis """ - super(Caxis, self).__init__("caxis") - + super().__init__("caxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1746,182 +1429,49 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.Caxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("hoverformat", None) - _v = hoverformat if hoverformat is not None else _v - if _v is not None: - self["hoverformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("layer", None) - _v = layer if layer is not None else _v - if _v is not None: - self["layer"] = _v - _v = arg.pop("linecolor", None) - _v = linecolor if linecolor is not None else _v - if _v is not None: - self["linecolor"] = _v - _v = arg.pop("linewidth", None) - _v = linewidth if linewidth is not None else _v - if _v is not None: - self["linewidth"] = _v - _v = arg.pop("min", None) - _v = min if min is not None else _v - if _v is not None: - self["min"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("showline", None) - _v = showline if showline is not None else _v - if _v is not None: - self["showline"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("uirevision", None) - _v = uirevision if uirevision is not None else _v - if _v is not None: - self["uirevision"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("hoverformat", arg, hoverformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("layer", arg, layer) + self._init_provided("linecolor", arg, linecolor) + self._init_provided("linewidth", arg, linewidth) + self._init_provided("min", arg, min) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("showline", arg, showline) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("uirevision", arg, uirevision) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/_domain.py b/plotly/graph_objs/layout/ternary/_domain.py index 91212c905f..55afefdd89 100644 --- a/plotly/graph_objs/layout/ternary/_domain.py +++ b/plotly/graph_objs/layout/ternary/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Domain(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary" _path_str = "layout.ternary.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): plot fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.ternary.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/aaxis/__init__.py b/plotly/graph_objs/layout/ternary/aaxis/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/__init__.py +++ b/plotly/graph_objs/layout/ternary/aaxis/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py b/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py index d8a8c8459d..f5e2a1ad90 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.aaxis" _path_str = "layout.ternary.aaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py b/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py index 6ee8859eef..c02e8cd391 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/ternary/aaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.aaxis" _path_str = "layout.ternary.aaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/aaxis/_title.py b/plotly/graph_objs/layout/ternary/aaxis/_title.py index be6f0f1325..b55c597a5a 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/_title.py +++ b/plotly/graph_objs/layout/ternary/aaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.aaxis" _path_str = "layout.ternary.aaxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.ternary.aaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py b/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py +++ b/plotly/graph_objs/layout/ternary/aaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/ternary/aaxis/title/_font.py b/plotly/graph_objs/layout/ternary/aaxis/title/_font.py index 8103e3d578..5ef9587f8b 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/aaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.aaxis.title" _path_str = "layout.ternary.aaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.aaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/baxis/__init__.py b/plotly/graph_objs/layout/ternary/baxis/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/layout/ternary/baxis/__init__.py +++ b/plotly/graph_objs/layout/ternary/baxis/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/layout/ternary/baxis/_tickfont.py b/plotly/graph_objs/layout/ternary/baxis/_tickfont.py index c958d1f66c..7fb50d0854 100644 --- a/plotly/graph_objs/layout/ternary/baxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/baxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.baxis" _path_str = "layout.ternary.baxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py b/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py index 0463b4a018..a4316ef620 100644 --- a/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/ternary/baxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.baxis" _path_str = "layout.ternary.baxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/baxis/_title.py b/plotly/graph_objs/layout/ternary/baxis/_title.py index b6e9612703..8e0feccadb 100644 --- a/plotly/graph_objs/layout/ternary/baxis/_title.py +++ b/plotly/graph_objs/layout/ternary/baxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.baxis" _path_str = "layout.ternary.baxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.ternary.baxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.ternary.baxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/baxis/title/__init__.py b/plotly/graph_objs/layout/ternary/baxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/ternary/baxis/title/__init__.py +++ b/plotly/graph_objs/layout/ternary/baxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/ternary/baxis/title/_font.py b/plotly/graph_objs/layout/ternary/baxis/title/_font.py index 2f020fe77b..3c3a314804 100644 --- a/plotly/graph_objs/layout/ternary/baxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/baxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.baxis.title" _path_str = "layout.ternary.baxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.baxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/caxis/__init__.py b/plotly/graph_objs/layout/ternary/caxis/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/layout/ternary/caxis/__init__.py +++ b/plotly/graph_objs/layout/ternary/caxis/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/layout/ternary/caxis/_tickfont.py b/plotly/graph_objs/layout/ternary/caxis/_tickfont.py index ec1c27272b..dfb74a1439 100644 --- a/plotly/graph_objs/layout/ternary/caxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/caxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.caxis" _path_str = "layout.ternary.caxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py b/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py index 10dc85cd7c..71d7a19ee3 100644 --- a/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/ternary/caxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.caxis" _path_str = "layout.ternary.caxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/caxis/_title.py b/plotly/graph_objs/layout/ternary/caxis/_title.py index f12aca460c..50288bf445 100644 --- a/plotly/graph_objs/layout/ternary/caxis/_title.py +++ b/plotly/graph_objs/layout/ternary/caxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.caxis" _path_str = "layout.ternary.caxis.title" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.ternary.caxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Title object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.ternary.caxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/ternary/caxis/title/__init__.py b/plotly/graph_objs/layout/ternary/caxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/ternary/caxis/title/__init__.py +++ b/plotly/graph_objs/layout/ternary/caxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/ternary/caxis/title/_font.py b/plotly/graph_objs/layout/ternary/caxis/title/_font.py index 1549ec2097..f45c6c1cfc 100644 --- a/plotly/graph_objs/layout/ternary/caxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/caxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.ternary.caxis.title" _path_str = "layout.ternary.caxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.ternary.caxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/title/__init__.py b/plotly/graph_objs/layout/title/__init__.py index d37379b99d..795705c62e 100644 --- a/plotly/graph_objs/layout/title/__init__.py +++ b/plotly/graph_objs/layout/title/__init__.py @@ -1,14 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font - from ._pad import Pad - from ._subtitle import Subtitle - from . import subtitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".subtitle"], ["._font.Font", "._pad.Pad", "._subtitle.Subtitle"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".subtitle"], ["._font.Font", "._pad.Pad", "._subtitle.Subtitle"] +) diff --git a/plotly/graph_objs/layout/title/_font.py b/plotly/graph_objs/layout/title/_font.py index ff9ad16858..38e199d06f 100644 --- a/plotly/graph_objs/layout/title/_font.py +++ b/plotly/graph_objs/layout/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.title" _path_str = "layout.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/title/_pad.py b/plotly/graph_objs/layout/title/_pad.py index 6653b1896d..d1f200a9f7 100644 --- a/plotly/graph_objs/layout/title/_pad.py +++ b/plotly/graph_objs/layout/title/_pad.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Pad(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.title" _path_str = "layout.title.pad" _valid_props = {"b", "l", "r", "t"} - # b - # - @property def b(self): """ @@ -31,8 +30,6 @@ def b(self): def b(self, val): self["b"] = val - # l - # - @property def l(self): """ @@ -52,8 +49,6 @@ def l(self): def l(self, val): self["l"] = val - # r - # - @property def r(self): """ @@ -73,8 +68,6 @@ def r(self): def r(self, val): self["r"] = val - # t - # - @property def t(self): """ @@ -93,8 +86,6 @@ def t(self): def t(self, val): self["t"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -112,7 +103,15 @@ def _prop_descriptions(self): component. """ - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + def __init__( + self, + arg=None, + b: int | float | None = None, + l: int | float | None = None, + r: int | float | None = None, + t: int | float | None = None, + **kwargs, + ): """ Construct a new Pad object @@ -146,14 +145,11 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): ------- Pad """ - super(Pad, self).__init__("pad") - + super().__init__("pad") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -168,34 +164,12 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.title.Pad`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("l", None) - _v = l if l is not None else _v - if _v is not None: - self["l"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("t", None) - _v = t if t is not None else _v - if _v is not None: - self["t"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("b", arg, b) + self._init_provided("l", arg, l) + self._init_provided("r", arg, r) + self._init_provided("t", arg, t) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/title/_subtitle.py b/plotly/graph_objs/layout/title/_subtitle.py index 24f0428798..fe071e2bf1 100644 --- a/plotly/graph_objs/layout/title/_subtitle.py +++ b/plotly/graph_objs/layout/title/_subtitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Subtitle(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.title" _path_str = "layout.title.subtitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.title.subtitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the plot's subtitle. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Subtitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Subtitle """ - super(Subtitle, self).__init__("subtitle") - + super().__init__("subtitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.title.Subtitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/title/subtitle/__init__.py b/plotly/graph_objs/layout/title/subtitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/title/subtitle/__init__.py +++ b/plotly/graph_objs/layout/title/subtitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/title/subtitle/_font.py b/plotly/graph_objs/layout/title/subtitle/_font.py index 711b816a06..325dc1d3f8 100644 --- a/plotly/graph_objs/layout/title/subtitle/_font.py +++ b/plotly/graph_objs/layout/title/subtitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.title.subtitle" _path_str = "layout.title.subtitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.title.subtitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/updatemenu/__init__.py b/plotly/graph_objs/layout/updatemenu/__init__.py index 2a9ee9dca6..e9cbc65129 100644 --- a/plotly/graph_objs/layout/updatemenu/__init__.py +++ b/plotly/graph_objs/layout/updatemenu/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._button import Button - from ._font import Font - from ._pad import Pad -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._button.Button", "._font.Font", "._pad.Pad"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._button.Button", "._font.Font", "._pad.Pad"] +) diff --git a/plotly/graph_objs/layout/updatemenu/_button.py b/plotly/graph_objs/layout/updatemenu/_button.py index e3bfcfb77f..6915155a7f 100644 --- a/plotly/graph_objs/layout/updatemenu/_button.py +++ b/plotly/graph_objs/layout/updatemenu/_button.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Button(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.updatemenu" _path_str = "layout.updatemenu.button" _valid_props = { @@ -19,8 +20,6 @@ class Button(_BaseLayoutHierarchyType): "visible", } - # args - # ---- @property def args(self): """ @@ -44,8 +43,6 @@ def args(self): def args(self, val): self["args"] = val - # args2 - # ----- @property def args2(self): """ @@ -70,8 +67,6 @@ def args2(self): def args2(self, val): self["args2"] = val - # execute - # ------- @property def execute(self): """ @@ -96,8 +91,6 @@ def execute(self): def execute(self, val): self["execute"] = val - # label - # ----- @property def label(self): """ @@ -117,8 +110,6 @@ def label(self): def label(self, val): self["label"] = val - # method - # ------ @property def method(self): """ @@ -142,8 +133,6 @@ def method(self): def method(self, val): self["method"] = val - # name - # ---- @property def name(self): """ @@ -169,8 +158,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -197,8 +184,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # visible - # ------- @property def visible(self): """ @@ -217,8 +202,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -274,14 +257,14 @@ def _prop_descriptions(self): def __init__( self, arg=None, - args=None, - args2=None, - execute=None, - label=None, - method=None, - name=None, - templateitemname=None, - visible=None, + args: list | None = None, + args2: list | None = None, + execute: bool | None = None, + label: str | None = None, + method: Any | None = None, + name: str | None = None, + templateitemname: str | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -345,14 +328,11 @@ def __init__( ------- Button """ - super(Button, self).__init__("buttons") - + super().__init__("buttons") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -367,50 +347,16 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.updatemenu.Button`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("args", None) - _v = args if args is not None else _v - if _v is not None: - self["args"] = _v - _v = arg.pop("args2", None) - _v = args2 if args2 is not None else _v - if _v is not None: - self["args2"] = _v - _v = arg.pop("execute", None) - _v = execute if execute is not None else _v - if _v is not None: - self["execute"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("method", None) - _v = method if method is not None else _v - if _v is not None: - self["method"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("args", arg, args) + self._init_provided("args2", arg, args2) + self._init_provided("execute", arg, execute) + self._init_provided("label", arg, label) + self._init_provided("method", arg, method) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/updatemenu/_font.py b/plotly/graph_objs/layout/updatemenu/_font.py index 862e5738b9..8c139f25b1 100644 --- a/plotly/graph_objs/layout/updatemenu/_font.py +++ b/plotly/graph_objs/layout/updatemenu/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.updatemenu" _path_str = "layout.updatemenu.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.updatemenu.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/updatemenu/_pad.py b/plotly/graph_objs/layout/updatemenu/_pad.py index 3cadc5a794..167306aa50 100644 --- a/plotly/graph_objs/layout/updatemenu/_pad.py +++ b/plotly/graph_objs/layout/updatemenu/_pad.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Pad(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.updatemenu" _path_str = "layout.updatemenu.pad" _valid_props = {"b", "l", "r", "t"} - # b - # - @property def b(self): """ @@ -31,8 +30,6 @@ def b(self): def b(self, val): self["b"] = val - # l - # - @property def l(self): """ @@ -52,8 +49,6 @@ def l(self): def l(self, val): self["l"] = val - # r - # - @property def r(self): """ @@ -73,8 +68,6 @@ def r(self): def r(self, val): self["r"] = val - # t - # - @property def t(self): """ @@ -93,8 +86,6 @@ def t(self): def t(self, val): self["t"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -112,7 +103,15 @@ def _prop_descriptions(self): component. """ - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + def __init__( + self, + arg=None, + b: int | float | None = None, + l: int | float | None = None, + r: int | float | None = None, + t: int | float | None = None, + **kwargs, + ): """ Construct a new Pad object @@ -141,14 +140,11 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): ------- Pad """ - super(Pad, self).__init__("pad") - + super().__init__("pad") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -163,34 +159,12 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.updatemenu.Pad`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("l", None) - _v = l if l is not None else _v - if _v is not None: - self["l"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("t", None) - _v = t if t is not None else _v - if _v is not None: - self["t"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("b", arg, b) + self._init_provided("l", arg, l) + self._init_provided("r", arg, r) + self._init_provided("t", arg, t) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/__init__.py b/plotly/graph_objs/layout/xaxis/__init__.py index ebf011b8b6..d8ee189d9f 100644 --- a/plotly/graph_objs/layout/xaxis/__init__.py +++ b/plotly/graph_objs/layout/xaxis/__init__.py @@ -1,32 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._autorangeoptions import Autorangeoptions - from ._minor import Minor - from ._rangebreak import Rangebreak - from ._rangeselector import Rangeselector - from ._rangeslider import Rangeslider - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import rangeselector - from . import rangeslider - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".rangeselector", ".rangeslider", ".title"], - [ - "._autorangeoptions.Autorangeoptions", - "._minor.Minor", - "._rangebreak.Rangebreak", - "._rangeselector.Rangeselector", - "._rangeslider.Rangeslider", - "._tickfont.Tickfont", - "._tickformatstop.Tickformatstop", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".rangeselector", ".rangeslider", ".title"], + [ + "._autorangeoptions.Autorangeoptions", + "._minor.Minor", + "._rangebreak.Rangebreak", + "._rangeselector.Rangeselector", + "._rangeslider.Rangeslider", + "._tickfont.Tickfont", + "._tickformatstop.Tickformatstop", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/layout/xaxis/_autorangeoptions.py b/plotly/graph_objs/layout/xaxis/_autorangeoptions.py index 81df0b01e4..bcc5d019ff 100644 --- a/plotly/graph_objs/layout/xaxis/_autorangeoptions.py +++ b/plotly/graph_objs/layout/xaxis/_autorangeoptions.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Autorangeoptions(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.autorangeoptions" _valid_props = { @@ -17,8 +18,6 @@ class Autorangeoptions(_BaseLayoutHierarchyType): "minallowed", } - # clipmax - # ------- @property def clipmax(self): """ @@ -37,8 +36,6 @@ def clipmax(self): def clipmax(self, val): self["clipmax"] = val - # clipmin - # ------- @property def clipmin(self): """ @@ -57,8 +54,6 @@ def clipmin(self): def clipmin(self, val): self["clipmin"] = val - # include - # ------- @property def include(self): """ @@ -68,7 +63,7 @@ def include(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["include"] @@ -76,8 +71,6 @@ def include(self): def include(self, val): self["include"] = val - # includesrc - # ---------- @property def includesrc(self): """ @@ -96,8 +89,6 @@ def includesrc(self): def includesrc(self, val): self["includesrc"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -115,8 +106,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -134,8 +123,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - clipmax=None, - clipmin=None, - include=None, - includesrc=None, - maxallowed=None, - minallowed=None, + clipmax: Any | None = None, + clipmin: Any | None = None, + include: Any | None = None, + includesrc: str | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, **kwargs, ): """ @@ -200,14 +187,11 @@ def __init__( ------- Autorangeoptions """ - super(Autorangeoptions, self).__init__("autorangeoptions") - + super().__init__("autorangeoptions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -222,42 +206,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Autorangeoptions`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("clipmax", None) - _v = clipmax if clipmax is not None else _v - if _v is not None: - self["clipmax"] = _v - _v = arg.pop("clipmin", None) - _v = clipmin if clipmin is not None else _v - if _v is not None: - self["clipmin"] = _v - _v = arg.pop("include", None) - _v = include if include is not None else _v - if _v is not None: - self["include"] = _v - _v = arg.pop("includesrc", None) - _v = includesrc if includesrc is not None else _v - if _v is not None: - self["includesrc"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("clipmax", arg, clipmax) + self._init_provided("clipmin", arg, clipmin) + self._init_provided("include", arg, include) + self._init_provided("includesrc", arg, includesrc) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_minor.py b/plotly/graph_objs/layout/xaxis/_minor.py index 08ccaacfc7..df53252cac 100644 --- a/plotly/graph_objs/layout/xaxis/_minor.py +++ b/plotly/graph_objs/layout/xaxis/_minor.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Minor(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.minor" _valid_props = { @@ -25,8 +26,6 @@ class Minor(_BaseLayoutHierarchyType): "tickwidth", } - # dtick - # ----- @property def dtick(self): """ @@ -63,8 +62,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -75,42 +72,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -122,8 +84,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -148,8 +108,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -168,8 +126,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # nticks - # ------ @property def nticks(self): """ @@ -192,8 +148,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -213,8 +167,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -240,8 +192,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -252,42 +202,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -299,8 +214,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -319,8 +232,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -346,8 +257,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # ticks - # ----- @property def ticks(self): """ @@ -369,8 +278,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -382,7 +289,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -390,8 +297,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -410,8 +315,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -430,8 +333,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -519,20 +420,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtick=None, - gridcolor=None, - griddash=None, - gridwidth=None, - nticks=None, - showgrid=None, - tick0=None, - tickcolor=None, - ticklen=None, - tickmode=None, - ticks=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, + dtick: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + nticks: int | None = None, + showgrid: bool | None = None, + tick0: Any | None = None, + tickcolor: str | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + ticks: Any | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, **kwargs, ): """ @@ -628,14 +529,11 @@ def __init__( ------- Minor """ - super(Minor, self).__init__("minor") - + super().__init__("minor") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -650,74 +548,22 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Minor`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtick", arg, dtick) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("nticks", arg, nticks) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("ticks", arg, ticks) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_rangebreak.py b/plotly/graph_objs/layout/xaxis/_rangebreak.py index aad40eb59a..83fec363b4 100644 --- a/plotly/graph_objs/layout/xaxis/_rangebreak.py +++ b/plotly/graph_objs/layout/xaxis/_rangebreak.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Rangebreak(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.rangebreak" _valid_props = { @@ -18,8 +19,6 @@ class Rangebreak(_BaseLayoutHierarchyType): "values", } - # bounds - # ------ @property def bounds(self): """ @@ -42,8 +41,6 @@ def bounds(self): def bounds(self, val): self["bounds"] = val - # dvalue - # ------ @property def dvalue(self): """ @@ -63,8 +60,6 @@ def dvalue(self): def dvalue(self, val): self["dvalue"] = val - # enabled - # ------- @property def enabled(self): """ @@ -84,8 +79,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -111,8 +104,6 @@ def name(self): def name(self, val): self["name"] = val - # pattern - # ------- @property def pattern(self): """ @@ -141,8 +132,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -169,8 +158,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # values - # ------ @property def values(self): """ @@ -192,8 +179,6 @@ def values(self): def values(self, val): self["values"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -247,13 +232,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bounds=None, - dvalue=None, - enabled=None, - name=None, - pattern=None, - templateitemname=None, - values=None, + bounds: list | None = None, + dvalue: int | float | None = None, + enabled: bool | None = None, + name: str | None = None, + pattern: Any | None = None, + templateitemname: str | None = None, + values: list | None = None, **kwargs, ): """ @@ -315,14 +300,11 @@ def __init__( ------- Rangebreak """ - super(Rangebreak, self).__init__("rangebreaks") - + super().__init__("rangebreaks") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -337,46 +319,15 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Rangebreak`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bounds", None) - _v = bounds if bounds is not None else _v - if _v is not None: - self["bounds"] = _v - _v = arg.pop("dvalue", None) - _v = dvalue if dvalue is not None else _v - if _v is not None: - self["dvalue"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bounds", arg, bounds) + self._init_provided("dvalue", arg, dvalue) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("pattern", arg, pattern) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("values", arg, values) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_rangeselector.py b/plotly/graph_objs/layout/xaxis/_rangeselector.py index 472fd80915..92c5e97b2e 100644 --- a/plotly/graph_objs/layout/xaxis/_rangeselector.py +++ b/plotly/graph_objs/layout/xaxis/_rangeselector.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Rangeselector(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.rangeselector" _valid_props = { @@ -23,8 +24,6 @@ class Rangeselector(_BaseLayoutHierarchyType): "yanchor", } - # activecolor - # ----------- @property def activecolor(self): """ @@ -35,42 +34,7 @@ def activecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -82,8 +46,6 @@ def activecolor(self): def activecolor(self, val): self["activecolor"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -94,42 +56,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -141,8 +68,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -153,42 +78,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -200,8 +90,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -221,8 +109,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # buttons - # ------- @property def buttons(self): """ @@ -235,54 +121,6 @@ def buttons(self): - A list or tuple of dicts of string/value properties that will be passed to the Button constructor - Supported dict properties: - - count - Sets the number of steps to take to update the - range. Use with `step` to specify the update - interval. - label - Sets the text label to appear on the button. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - step - The unit of measurement that the `count` value - will set the range by. - stepmode - Sets the range update mode. If "backward", the - range update shifts the start of range back - "count" times "step" milliseconds. If "todate", - the range update shifts the start of range back - to the first timestamp from "count" times - "step" milliseconds back. For example, with - `step` set to "year" and `count` set to 1 the - range update shifts the start of the range back - to January 01 of the current year. Month and - year "todate" are currently available only for - the built-in (Gregorian) calendar. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. - Returns ------- tuple[plotly.graph_objs.layout.xaxis.rangeselector.Button] @@ -293,8 +131,6 @@ def buttons(self): def buttons(self, val): self["buttons"] = val - # buttondefaults - # -------------- @property def buttondefaults(self): """ @@ -309,8 +145,6 @@ def buttondefaults(self): - A dict of string/value properties that will be passed to the Button constructor - Supported dict properties: - Returns ------- plotly.graph_objs.layout.xaxis.rangeselector.Button @@ -321,8 +155,6 @@ def buttondefaults(self): def buttondefaults(self, val): self["buttondefaults"] = val - # font - # ---- @property def font(self): """ @@ -334,52 +166,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.xaxis.rangeselector.Font @@ -390,8 +176,6 @@ def font(self): def font(self, val): self["font"] = val - # visible - # ------- @property def visible(self): """ @@ -412,8 +196,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # x - # - @property def x(self): """ @@ -433,8 +215,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -456,8 +236,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # y - # - @property def y(self): """ @@ -477,8 +255,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -500,8 +276,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -550,18 +324,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - activecolor=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - buttons=None, - buttondefaults=None, - font=None, - visible=None, - x=None, - xanchor=None, - y=None, - yanchor=None, + activecolor: str | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + buttons: None | None = None, + buttondefaults: None | None = None, + font: None | None = None, + visible: bool | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, **kwargs, ): """ @@ -618,14 +392,11 @@ def __init__( ------- Rangeselector """ - super(Rangeselector, self).__init__("rangeselector") - + super().__init__("rangeselector") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -640,66 +411,20 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeselector`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("activecolor", None) - _v = activecolor if activecolor is not None else _v - if _v is not None: - self["activecolor"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("buttons", None) - _v = buttons if buttons is not None else _v - if _v is not None: - self["buttons"] = _v - _v = arg.pop("buttondefaults", None) - _v = buttondefaults if buttondefaults is not None else _v - if _v is not None: - self["buttondefaults"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("activecolor", arg, activecolor) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("buttons", arg, buttons) + self._init_provided("buttondefaults", arg, buttondefaults) + self._init_provided("font", arg, font) + self._init_provided("visible", arg, visible) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_rangeslider.py b/plotly/graph_objs/layout/xaxis/_rangeslider.py index 4d0a987bcb..d39854d6ca 100644 --- a/plotly/graph_objs/layout/xaxis/_rangeslider.py +++ b/plotly/graph_objs/layout/xaxis/_rangeslider.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Rangeslider(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.rangeslider" _valid_props = { @@ -19,8 +20,6 @@ class Rangeslider(_BaseLayoutHierarchyType): "yaxis", } - # autorange - # --------- @property def autorange(self): """ @@ -41,8 +40,6 @@ def autorange(self): def autorange(self, val): self["autorange"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -53,42 +50,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -100,8 +62,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -112,42 +72,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -159,8 +84,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -180,8 +103,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # range - # ----- @property def range(self): """ @@ -210,8 +131,6 @@ def range(self): def range(self, val): self["range"] = val - # thickness - # --------- @property def thickness(self): """ @@ -231,8 +150,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # visible - # ------- @property def visible(self): """ @@ -252,8 +169,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # yaxis - # ----- @property def yaxis(self): """ @@ -263,20 +178,6 @@ def yaxis(self): - A dict of string/value properties that will be passed to the YAxis constructor - Supported dict properties: - - range - Sets the range of this axis for the - rangeslider. - rangemode - Determines whether or not the range of this - axis in the rangeslider use the same value than - in the main plot when zooming in/out. If - "auto", the autorange will be used. If "fixed", - the `range` is used. If "match", the current - range of the corresponding y-axis on the main - subplot is used. - Returns ------- plotly.graph_objs.layout.xaxis.rangeslider.YAxis @@ -287,8 +188,6 @@ def yaxis(self): def yaxis(self, val): self["yaxis"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -327,14 +226,14 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autorange=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - range=None, - thickness=None, - visible=None, - yaxis=None, + autorange: bool | None = None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | None = None, + range: list | None = None, + thickness: int | float | None = None, + visible: bool | None = None, + yaxis: None | None = None, **kwargs, ): """ @@ -381,14 +280,11 @@ def __init__( ------- Rangeslider """ - super(Rangeslider, self).__init__("rangeslider") - + super().__init__("rangeslider") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -403,50 +299,16 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Rangeslider`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autorange", None) - _v = autorange if autorange is not None else _v - if _v is not None: - self["autorange"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("yaxis", None) - _v = yaxis if yaxis is not None else _v - if _v is not None: - self["yaxis"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autorange", arg, autorange) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("range", arg, range) + self._init_provided("thickness", arg, thickness) + self._init_provided("visible", arg, visible) + self._init_provided("yaxis", arg, yaxis) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_tickfont.py b/plotly/graph_objs/layout/xaxis/_tickfont.py index 77944969fe..b368cfb083 100644 --- a/plotly/graph_objs/layout/xaxis/_tickfont.py +++ b/plotly/graph_objs/layout/xaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_tickformatstop.py b/plotly/graph_objs/layout/xaxis/_tickformatstop.py index 75674f2ee2..83525972e7 100644 --- a/plotly/graph_objs/layout/xaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/xaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/_title.py b/plotly/graph_objs/layout/xaxis/_title.py index a2a53e4d98..e2d75b73b4 100644 --- a/plotly/graph_objs/layout/xaxis/_title.py +++ b/plotly/graph_objs/layout/xaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.title" _valid_props = {"font", "standoff", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.xaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # standoff - # -------- @property def standoff(self): """ @@ -106,8 +57,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # text - # ---- @property def text(self): """ @@ -127,8 +76,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -148,7 +95,14 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + standoff: int | float | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -177,14 +131,11 @@ def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -199,30 +150,11 @@ def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.xaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("standoff", arg, standoff) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py b/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py index 5f2046f921..6c9372f176 100644 --- a/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py +++ b/plotly/graph_objs/layout/xaxis/rangeselector/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._button import Button - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._button.Button", "._font.Font"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._button.Button", "._font.Font"] +) diff --git a/plotly/graph_objs/layout/xaxis/rangeselector/_button.py b/plotly/graph_objs/layout/xaxis/rangeselector/_button.py index 80344305e2..5ed1c910a8 100644 --- a/plotly/graph_objs/layout/xaxis/rangeselector/_button.py +++ b/plotly/graph_objs/layout/xaxis/rangeselector/_button.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Button(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis.rangeselector" _path_str = "layout.xaxis.rangeselector.button" _valid_props = { @@ -18,8 +19,6 @@ class Button(_BaseLayoutHierarchyType): "visible", } - # count - # ----- @property def count(self): """ @@ -39,8 +38,6 @@ def count(self): def count(self, val): self["count"] = val - # label - # ----- @property def label(self): """ @@ -60,8 +57,6 @@ def label(self): def label(self, val): self["label"] = val - # name - # ---- @property def name(self): """ @@ -87,8 +82,6 @@ def name(self): def name(self, val): self["name"] = val - # step - # ---- @property def step(self): """ @@ -110,8 +103,6 @@ def step(self): def step(self, val): self["step"] = val - # stepmode - # -------- @property def stepmode(self): """ @@ -139,8 +130,6 @@ def stepmode(self): def stepmode(self, val): self["stepmode"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -167,8 +156,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # visible - # ------- @property def visible(self): """ @@ -187,8 +174,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -237,13 +222,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - count=None, - label=None, - name=None, - step=None, - stepmode=None, - templateitemname=None, - visible=None, + count: int | float | None = None, + label: str | None = None, + name: str | None = None, + step: Any | None = None, + stepmode: Any | None = None, + templateitemname: str | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -303,14 +288,11 @@ def __init__( ------- Button """ - super(Button, self).__init__("buttons") - + super().__init__("buttons") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -325,46 +307,15 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Button`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("count", None) - _v = count if count is not None else _v - if _v is not None: - self["count"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("step", None) - _v = step if step is not None else _v - if _v is not None: - self["step"] = _v - _v = arg.pop("stepmode", None) - _v = stepmode if stepmode is not None else _v - if _v is not None: - self["stepmode"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("count", arg, count) + self._init_provided("label", arg, label) + self._init_provided("name", arg, name) + self._init_provided("step", arg, step) + self._init_provided("stepmode", arg, stepmode) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/rangeselector/_font.py b/plotly/graph_objs/layout/xaxis/rangeselector/_font.py index 60fe186eea..98624dc90c 100644 --- a/plotly/graph_objs/layout/xaxis/rangeselector/_font.py +++ b/plotly/graph_objs/layout/xaxis/rangeselector/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis.rangeselector" _path_str = "layout.xaxis.rangeselector.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.rangeselector.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py b/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py index 0eaf7ecc59..6218b2b7b5 100644 --- a/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py +++ b/plotly/graph_objs/layout/xaxis/rangeslider/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yaxis import YAxis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._yaxis.YAxis"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._yaxis.YAxis"]) diff --git a/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py b/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py index f6d65c62d3..8a4e26f808 100644 --- a/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py +++ b/plotly/graph_objs/layout/xaxis/rangeslider/_yaxis.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class YAxis(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis.rangeslider" _path_str = "layout.xaxis.rangeslider.yaxis" _valid_props = {"range", "rangemode"} - # range - # ----- @property def range(self): """ @@ -33,8 +32,6 @@ def range(self): def range(self, val): self["range"] = val - # rangemode - # --------- @property def rangemode(self): """ @@ -58,8 +55,6 @@ def rangemode(self): def rangemode(self, val): self["rangemode"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -74,7 +69,13 @@ def _prop_descriptions(self): subplot is used. """ - def __init__(self, arg=None, range=None, rangemode=None, **kwargs): + def __init__( + self, + arg=None, + range: list | None = None, + rangemode: Any | None = None, + **kwargs, + ): """ Construct a new YAxis object @@ -98,14 +99,11 @@ def __init__(self, arg=None, range=None, rangemode=None, **kwargs): ------- YAxis """ - super(YAxis, self).__init__("yaxis") - + super().__init__("yaxis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,26 +118,10 @@ def __init__(self, arg=None, range=None, rangemode=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.xaxis.rangeslider.YAxis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("rangemode", None) - _v = rangemode if rangemode is not None else _v - if _v is not None: - self["rangemode"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("range", arg, range) + self._init_provided("rangemode", arg, rangemode) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/xaxis/title/__init__.py b/plotly/graph_objs/layout/xaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/xaxis/title/__init__.py +++ b/plotly/graph_objs/layout/xaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/xaxis/title/_font.py b/plotly/graph_objs/layout/xaxis/title/_font.py index c03035018b..fac7388a99 100644 --- a/plotly/graph_objs/layout/xaxis/title/_font.py +++ b/plotly/graph_objs/layout/xaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.xaxis.title" _path_str = "layout.xaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.xaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/__init__.py b/plotly/graph_objs/layout/yaxis/__init__.py index 0772a2b9bc..91bf9f612b 100644 --- a/plotly/graph_objs/layout/yaxis/__init__.py +++ b/plotly/graph_objs/layout/yaxis/__init__.py @@ -1,26 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._autorangeoptions import Autorangeoptions - from ._minor import Minor - from ._rangebreak import Rangebreak - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - [ - "._autorangeoptions.Autorangeoptions", - "._minor.Minor", - "._rangebreak.Rangebreak", - "._tickfont.Tickfont", - "._tickformatstop.Tickformatstop", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + [ + "._autorangeoptions.Autorangeoptions", + "._minor.Minor", + "._rangebreak.Rangebreak", + "._tickfont.Tickfont", + "._tickformatstop.Tickformatstop", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/layout/yaxis/_autorangeoptions.py b/plotly/graph_objs/layout/yaxis/_autorangeoptions.py index 9824e15d8e..ef40f96d0d 100644 --- a/plotly/graph_objs/layout/yaxis/_autorangeoptions.py +++ b/plotly/graph_objs/layout/yaxis/_autorangeoptions.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Autorangeoptions(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.autorangeoptions" _valid_props = { @@ -17,8 +18,6 @@ class Autorangeoptions(_BaseLayoutHierarchyType): "minallowed", } - # clipmax - # ------- @property def clipmax(self): """ @@ -37,8 +36,6 @@ def clipmax(self): def clipmax(self, val): self["clipmax"] = val - # clipmin - # ------- @property def clipmin(self): """ @@ -57,8 +54,6 @@ def clipmin(self): def clipmin(self, val): self["clipmin"] = val - # include - # ------- @property def include(self): """ @@ -68,7 +63,7 @@ def include(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["include"] @@ -76,8 +71,6 @@ def include(self): def include(self, val): self["include"] = val - # includesrc - # ---------- @property def includesrc(self): """ @@ -96,8 +89,6 @@ def includesrc(self): def includesrc(self, val): self["includesrc"] = val - # maxallowed - # ---------- @property def maxallowed(self): """ @@ -115,8 +106,6 @@ def maxallowed(self): def maxallowed(self, val): self["maxallowed"] = val - # minallowed - # ---------- @property def minallowed(self): """ @@ -134,8 +123,6 @@ def minallowed(self): def minallowed(self, val): self["minallowed"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - clipmax=None, - clipmin=None, - include=None, - includesrc=None, - maxallowed=None, - minallowed=None, + clipmax: Any | None = None, + clipmin: Any | None = None, + include: Any | None = None, + includesrc: str | None = None, + maxallowed: Any | None = None, + minallowed: Any | None = None, **kwargs, ): """ @@ -200,14 +187,11 @@ def __init__( ------- Autorangeoptions """ - super(Autorangeoptions, self).__init__("autorangeoptions") - + super().__init__("autorangeoptions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -222,42 +206,14 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.yaxis.Autorangeoptions`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("clipmax", None) - _v = clipmax if clipmax is not None else _v - if _v is not None: - self["clipmax"] = _v - _v = arg.pop("clipmin", None) - _v = clipmin if clipmin is not None else _v - if _v is not None: - self["clipmin"] = _v - _v = arg.pop("include", None) - _v = include if include is not None else _v - if _v is not None: - self["include"] = _v - _v = arg.pop("includesrc", None) - _v = includesrc if includesrc is not None else _v - if _v is not None: - self["includesrc"] = _v - _v = arg.pop("maxallowed", None) - _v = maxallowed if maxallowed is not None else _v - if _v is not None: - self["maxallowed"] = _v - _v = arg.pop("minallowed", None) - _v = minallowed if minallowed is not None else _v - if _v is not None: - self["minallowed"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("clipmax", arg, clipmax) + self._init_provided("clipmin", arg, clipmin) + self._init_provided("include", arg, include) + self._init_provided("includesrc", arg, includesrc) + self._init_provided("maxallowed", arg, maxallowed) + self._init_provided("minallowed", arg, minallowed) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/_minor.py b/plotly/graph_objs/layout/yaxis/_minor.py index c48c590f84..5d92a5b666 100644 --- a/plotly/graph_objs/layout/yaxis/_minor.py +++ b/plotly/graph_objs/layout/yaxis/_minor.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Minor(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.minor" _valid_props = { @@ -25,8 +26,6 @@ class Minor(_BaseLayoutHierarchyType): "tickwidth", } - # dtick - # ----- @property def dtick(self): """ @@ -63,8 +62,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # gridcolor - # --------- @property def gridcolor(self): """ @@ -75,42 +72,7 @@ def gridcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -122,8 +84,6 @@ def gridcolor(self): def gridcolor(self, val): self["gridcolor"] = val - # griddash - # -------- @property def griddash(self): """ @@ -148,8 +108,6 @@ def griddash(self): def griddash(self, val): self["griddash"] = val - # gridwidth - # --------- @property def gridwidth(self): """ @@ -168,8 +126,6 @@ def gridwidth(self): def gridwidth(self, val): self["gridwidth"] = val - # nticks - # ------ @property def nticks(self): """ @@ -192,8 +148,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # showgrid - # -------- @property def showgrid(self): """ @@ -213,8 +167,6 @@ def showgrid(self): def showgrid(self, val): self["showgrid"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -240,8 +192,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -252,42 +202,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -299,8 +214,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -319,8 +232,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -346,8 +257,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # ticks - # ----- @property def ticks(self): """ @@ -369,8 +278,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -382,7 +289,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -390,8 +297,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -410,8 +315,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -430,8 +333,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -519,20 +420,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtick=None, - gridcolor=None, - griddash=None, - gridwidth=None, - nticks=None, - showgrid=None, - tick0=None, - tickcolor=None, - ticklen=None, - tickmode=None, - ticks=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, + dtick: Any | None = None, + gridcolor: str | None = None, + griddash: str | None = None, + gridwidth: int | float | None = None, + nticks: int | None = None, + showgrid: bool | None = None, + tick0: Any | None = None, + tickcolor: str | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + ticks: Any | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, **kwargs, ): """ @@ -628,14 +529,11 @@ def __init__( ------- Minor """ - super(Minor, self).__init__("minor") - + super().__init__("minor") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -650,74 +548,22 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.yaxis.Minor`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("gridcolor", None) - _v = gridcolor if gridcolor is not None else _v - if _v is not None: - self["gridcolor"] = _v - _v = arg.pop("griddash", None) - _v = griddash if griddash is not None else _v - if _v is not None: - self["griddash"] = _v - _v = arg.pop("gridwidth", None) - _v = gridwidth if gridwidth is not None else _v - if _v is not None: - self["gridwidth"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("showgrid", None) - _v = showgrid if showgrid is not None else _v - if _v is not None: - self["showgrid"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtick", arg, dtick) + self._init_provided("gridcolor", arg, gridcolor) + self._init_provided("griddash", arg, griddash) + self._init_provided("gridwidth", arg, gridwidth) + self._init_provided("nticks", arg, nticks) + self._init_provided("showgrid", arg, showgrid) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("ticks", arg, ticks) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/_rangebreak.py b/plotly/graph_objs/layout/yaxis/_rangebreak.py index fc61da1c7e..4b26409538 100644 --- a/plotly/graph_objs/layout/yaxis/_rangebreak.py +++ b/plotly/graph_objs/layout/yaxis/_rangebreak.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Rangebreak(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.rangebreak" _valid_props = { @@ -18,8 +19,6 @@ class Rangebreak(_BaseLayoutHierarchyType): "values", } - # bounds - # ------ @property def bounds(self): """ @@ -42,8 +41,6 @@ def bounds(self): def bounds(self, val): self["bounds"] = val - # dvalue - # ------ @property def dvalue(self): """ @@ -63,8 +60,6 @@ def dvalue(self): def dvalue(self, val): self["dvalue"] = val - # enabled - # ------- @property def enabled(self): """ @@ -84,8 +79,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -111,8 +104,6 @@ def name(self): def name(self, val): self["name"] = val - # pattern - # ------- @property def pattern(self): """ @@ -141,8 +132,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -169,8 +158,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # values - # ------ @property def values(self): """ @@ -192,8 +179,6 @@ def values(self): def values(self, val): self["values"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -247,13 +232,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bounds=None, - dvalue=None, - enabled=None, - name=None, - pattern=None, - templateitemname=None, - values=None, + bounds: list | None = None, + dvalue: int | float | None = None, + enabled: bool | None = None, + name: str | None = None, + pattern: Any | None = None, + templateitemname: str | None = None, + values: list | None = None, **kwargs, ): """ @@ -315,14 +300,11 @@ def __init__( ------- Rangebreak """ - super(Rangebreak, self).__init__("rangebreaks") - + super().__init__("rangebreaks") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -337,46 +319,15 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.yaxis.Rangebreak`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bounds", None) - _v = bounds if bounds is not None else _v - if _v is not None: - self["bounds"] = _v - _v = arg.pop("dvalue", None) - _v = dvalue if dvalue is not None else _v - if _v is not None: - self["dvalue"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bounds", arg, bounds) + self._init_provided("dvalue", arg, dvalue) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("pattern", arg, pattern) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("values", arg, values) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/_tickfont.py b/plotly/graph_objs/layout/yaxis/_tickfont.py index 9b851ae09e..9728eff0c0 100644 --- a/plotly/graph_objs/layout/yaxis/_tickfont.py +++ b/plotly/graph_objs/layout/yaxis/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickfont(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.yaxis.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/_tickformatstop.py b/plotly/graph_objs/layout/yaxis/_tickformatstop.py index d765ca2052..42c3cab94f 100644 --- a/plotly/graph_objs/layout/yaxis/_tickformatstop.py +++ b/plotly/graph_objs/layout/yaxis/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.yaxis.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/_title.py b/plotly/graph_objs/layout/yaxis/_title.py index 550928ce2b..c4d655591b 100644 --- a/plotly/graph_objs/layout/yaxis/_title.py +++ b/plotly/graph_objs/layout/yaxis/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis" _path_str = "layout.yaxis.title" _valid_props = {"font", "standoff", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.layout.yaxis.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # standoff - # -------- @property def standoff(self): """ @@ -106,8 +57,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # text - # ---- @property def text(self): """ @@ -127,8 +76,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -148,7 +95,14 @@ def _prop_descriptions(self): Sets the title of this axis. """ - def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + standoff: int | float | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -177,14 +131,11 @@ def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -199,30 +150,11 @@ def __init__(self, arg=None, font=None, standoff=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.layout.yaxis.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("standoff", arg, standoff) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/layout/yaxis/title/__init__.py b/plotly/graph_objs/layout/yaxis/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/layout/yaxis/title/__init__.py +++ b/plotly/graph_objs/layout/yaxis/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/layout/yaxis/title/_font.py b/plotly/graph_objs/layout/yaxis/title/_font.py index 678a3a2706..0c368fdbd3 100644 --- a/plotly/graph_objs/layout/yaxis/title/_font.py +++ b/plotly/graph_objs/layout/yaxis/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Font(_BaseLayoutHierarchyType): - # class properties - # -------------------- _parent_path_str = "layout.yaxis.title" _path_str = "layout.yaxis.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseLayoutHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.layout.yaxis.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/__init__.py b/plotly/graph_objs/mesh3d/__init__.py index f3d446f51f..60c4863378 100644 --- a/plotly/graph_objs/mesh3d/__init__.py +++ b/plotly/graph_objs/mesh3d/__init__.py @@ -1,30 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._contour import Contour - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._lighting import Lighting - from ._lightposition import Lightposition - from ._stream import Stream - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._contour.Contour", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._lighting.Lighting", - "._lightposition.Lightposition", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contour.Contour", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/mesh3d/_colorbar.py b/plotly/graph_objs/mesh3d/_colorbar.py index e10aa7db5c..ec505e53fb 100644 --- a/plotly/graph_objs/mesh3d/_colorbar.py +++ b/plotly/graph_objs/mesh3d/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.mesh3d.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.mesh3d.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.mesh3d.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.mesh3d.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/_contour.py b/plotly/graph_objs/mesh3d/_contour.py index fdf0646c02..5b03ab6313 100644 --- a/plotly/graph_objs/mesh3d/_contour.py +++ b/plotly/graph_objs/mesh3d/_contour.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contour(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.contour" _valid_props = {"color", "show", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # show - # ---- @property def show(self): """ @@ -89,8 +51,6 @@ def show(self): def show(self, val): self["show"] = val - # width - # ----- @property def width(self): """ @@ -109,8 +69,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the width of the contour lines. """ - def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + show: bool | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Contour object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): ------- Contour """ - super(Contour, self).__init__("contour") - + super().__init__("contour") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.mesh3d.Contour`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("show", arg, show) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/_hoverlabel.py b/plotly/graph_objs/mesh3d/_hoverlabel.py index dfeab519dd..c44141596f 100644 --- a/plotly/graph_objs/mesh3d/_hoverlabel.py +++ b/plotly/graph_objs/mesh3d/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.mesh3d.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/_legendgrouptitle.py b/plotly/graph_objs/mesh3d/_legendgrouptitle.py index d4bf7d207e..3976893c6a 100644 --- a/plotly/graph_objs/mesh3d/_legendgrouptitle.py +++ b/plotly/graph_objs/mesh3d/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.mesh3d.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.mesh3d.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/_lighting.py b/plotly/graph_objs/mesh3d/_lighting.py index 6659b4f7d9..bb03962b16 100644 --- a/plotly/graph_objs/mesh3d/_lighting.py +++ b/plotly/graph_objs/mesh3d/_lighting.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lighting(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.lighting" _valid_props = { @@ -18,8 +19,6 @@ class Lighting(_BaseTraceHierarchyType): "vertexnormalsepsilon", } - # ambient - # ------- @property def ambient(self): """ @@ -39,8 +38,6 @@ def ambient(self): def ambient(self, val): self["ambient"] = val - # diffuse - # ------- @property def diffuse(self): """ @@ -60,8 +57,6 @@ def diffuse(self): def diffuse(self, val): self["diffuse"] = val - # facenormalsepsilon - # ------------------ @property def facenormalsepsilon(self): """ @@ -81,8 +76,6 @@ def facenormalsepsilon(self): def facenormalsepsilon(self, val): self["facenormalsepsilon"] = val - # fresnel - # ------- @property def fresnel(self): """ @@ -103,8 +96,6 @@ def fresnel(self): def fresnel(self, val): self["fresnel"] = val - # roughness - # --------- @property def roughness(self): """ @@ -124,8 +115,6 @@ def roughness(self): def roughness(self, val): self["roughness"] = val - # specular - # -------- @property def specular(self): """ @@ -145,8 +134,6 @@ def specular(self): def specular(self, val): self["specular"] = val - # vertexnormalsepsilon - # -------------------- @property def vertexnormalsepsilon(self): """ @@ -166,8 +153,6 @@ def vertexnormalsepsilon(self): def vertexnormalsepsilon(self, val): self["vertexnormalsepsilon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -199,13 +184,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, + ambient: int | float | None = None, + diffuse: int | float | None = None, + facenormalsepsilon: int | float | None = None, + fresnel: int | float | None = None, + roughness: int | float | None = None, + specular: int | float | None = None, + vertexnormalsepsilon: int | float | None = None, **kwargs, ): """ @@ -245,14 +230,11 @@ def __init__( ------- Lighting """ - super(Lighting, self).__init__("lighting") - + super().__init__("lighting") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -267,46 +249,15 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.Lighting`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - _v = ambient if ambient is not None else _v - if _v is not None: - self["ambient"] = _v - _v = arg.pop("diffuse", None) - _v = diffuse if diffuse is not None else _v - if _v is not None: - self["diffuse"] = _v - _v = arg.pop("facenormalsepsilon", None) - _v = facenormalsepsilon if facenormalsepsilon is not None else _v - if _v is not None: - self["facenormalsepsilon"] = _v - _v = arg.pop("fresnel", None) - _v = fresnel if fresnel is not None else _v - if _v is not None: - self["fresnel"] = _v - _v = arg.pop("roughness", None) - _v = roughness if roughness is not None else _v - if _v is not None: - self["roughness"] = _v - _v = arg.pop("specular", None) - _v = specular if specular is not None else _v - if _v is not None: - self["specular"] = _v - _v = arg.pop("vertexnormalsepsilon", None) - _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - if _v is not None: - self["vertexnormalsepsilon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("ambient", arg, ambient) + self._init_provided("diffuse", arg, diffuse) + self._init_provided("facenormalsepsilon", arg, facenormalsepsilon) + self._init_provided("fresnel", arg, fresnel) + self._init_provided("roughness", arg, roughness) + self._init_provided("specular", arg, specular) + self._init_provided("vertexnormalsepsilon", arg, vertexnormalsepsilon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/_lightposition.py b/plotly/graph_objs/mesh3d/_lightposition.py index 13b7153308..812acbd8df 100644 --- a/plotly/graph_objs/mesh3d/_lightposition.py +++ b/plotly/graph_objs/mesh3d/_lightposition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.lightposition" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -30,8 +29,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -50,8 +47,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -70,8 +65,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): vertex. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Lightposition object @@ -110,14 +110,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Lightposition """ - super(Lightposition, self).__init__("lightposition") - + super().__init__("lightposition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.mesh3d.Lightposition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/_stream.py b/plotly/graph_objs/mesh3d/_stream.py index f7d4198cbe..5f252b5c42 100644 --- a/plotly/graph_objs/mesh3d/_stream.py +++ b/plotly/graph_objs/mesh3d/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d" _path_str = "mesh3d.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.mesh3d.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/colorbar/__init__.py b/plotly/graph_objs/mesh3d/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/mesh3d/colorbar/__init__.py +++ b/plotly/graph_objs/mesh3d/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/mesh3d/colorbar/_tickfont.py b/plotly/graph_objs/mesh3d/colorbar/_tickfont.py index aba97dec3d..f31dc1f76c 100644 --- a/plotly/graph_objs/mesh3d/colorbar/_tickfont.py +++ b/plotly/graph_objs/mesh3d/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d.colorbar" _path_str = "mesh3d.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py b/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py index fb0a98cabe..952fd27d52 100644 --- a/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/mesh3d/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d.colorbar" _path_str = "mesh3d.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/colorbar/_title.py b/plotly/graph_objs/mesh3d/colorbar/_title.py index 223a84cafb..f988d9b6a1 100644 --- a/plotly/graph_objs/mesh3d/colorbar/_title.py +++ b/plotly/graph_objs/mesh3d/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d.colorbar" _path_str = "mesh3d.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.mesh3d.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.mesh3d.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/colorbar/title/__init__.py b/plotly/graph_objs/mesh3d/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/mesh3d/colorbar/title/__init__.py +++ b/plotly/graph_objs/mesh3d/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/mesh3d/colorbar/title/_font.py b/plotly/graph_objs/mesh3d/colorbar/title/_font.py index c2b0ed72b7..d4b85aeecb 100644 --- a/plotly/graph_objs/mesh3d/colorbar/title/_font.py +++ b/plotly/graph_objs/mesh3d/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d.colorbar.title" _path_str = "mesh3d.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/hoverlabel/__init__.py b/plotly/graph_objs/mesh3d/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/mesh3d/hoverlabel/__init__.py +++ b/plotly/graph_objs/mesh3d/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/mesh3d/hoverlabel/_font.py b/plotly/graph_objs/mesh3d/hoverlabel/_font.py index 42d07b7c57..db9c942ca4 100644 --- a/plotly/graph_objs/mesh3d/hoverlabel/_font.py +++ b/plotly/graph_objs/mesh3d/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d.hoverlabel" _path_str = "mesh3d.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/mesh3d/legendgrouptitle/__init__.py b/plotly/graph_objs/mesh3d/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/mesh3d/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/mesh3d/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py b/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py index 8c6d3e267a..dd334aa5dd 100644 --- a/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "mesh3d.legendgrouptitle" _path_str = "mesh3d.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.mesh3d.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/__init__.py b/plotly/graph_objs/ohlc/__init__.py index eef010c140..4b308ef8c3 100644 --- a/plotly/graph_objs/ohlc/__init__.py +++ b/plotly/graph_objs/ohlc/__init__.py @@ -1,29 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._decreasing import Decreasing - from ._hoverlabel import Hoverlabel - from ._increasing import Increasing - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._stream import Stream - from . import decreasing - from . import hoverlabel - from . import increasing - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".decreasing", ".hoverlabel", ".increasing", ".legendgrouptitle"], - [ - "._decreasing.Decreasing", - "._hoverlabel.Hoverlabel", - "._increasing.Increasing", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".decreasing", ".hoverlabel", ".increasing", ".legendgrouptitle"], + [ + "._decreasing.Decreasing", + "._hoverlabel.Hoverlabel", + "._increasing.Increasing", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/ohlc/_decreasing.py b/plotly/graph_objs/ohlc/_decreasing.py index 77bb5be5d6..7eb02fa29e 100644 --- a/plotly/graph_objs/ohlc/_decreasing.py +++ b/plotly/graph_objs/ohlc/_decreasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Decreasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.decreasing" _valid_props = {"line"} - # line - # ---- @property def line(self): """ @@ -21,18 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.ohlc.decreasing.Line @@ -43,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, line=None, **kwargs): + def __init__(self, arg=None, line: None | None = None, **kwargs): """ Construct a new Decreasing object @@ -71,14 +56,11 @@ def __init__(self, arg=None, line=None, **kwargs): ------- Decreasing """ - super(Decreasing, self).__init__("decreasing") - + super().__init__("decreasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.Decreasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/_hoverlabel.py b/plotly/graph_objs/ohlc/_hoverlabel.py index c28c687109..2db0232665 100644 --- a/plotly/graph_objs/ohlc/_hoverlabel.py +++ b/plotly/graph_objs/ohlc/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.hoverlabel" _valid_props = { @@ -21,8 +22,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "split", } - # align - # ----- @property def align(self): """ @@ -37,7 +36,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -45,8 +44,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -65,8 +62,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -77,47 +72,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -125,8 +85,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -145,8 +103,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -157,47 +113,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -205,8 +126,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -226,8 +145,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -239,79 +156,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.ohlc.hoverlabel.Font @@ -322,8 +166,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -341,7 +183,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -349,8 +191,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -370,8 +210,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # split - # ----- @property def split(self): """ @@ -391,8 +229,6 @@ def split(self): def split(self, val): self["split"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -436,16 +272,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, - split=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, + split: bool | None = None, **kwargs, ): """ @@ -497,14 +333,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -519,58 +352,18 @@ def __init__( an instance of :class:`plotly.graph_objs.ohlc.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - _v = arg.pop("split", None) - _v = split if split is not None else _v - if _v is not None: - self["split"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) + self._init_provided("split", arg, split) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/_increasing.py b/plotly/graph_objs/ohlc/_increasing.py index 41f7cb8666..c0225938ba 100644 --- a/plotly/graph_objs/ohlc/_increasing.py +++ b/plotly/graph_objs/ohlc/_increasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Increasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.increasing" _valid_props = {"line"} - # line - # ---- @property def line(self): """ @@ -21,18 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.ohlc.increasing.Line @@ -43,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, line=None, **kwargs): + def __init__(self, arg=None, line: None | None = None, **kwargs): """ Construct a new Increasing object @@ -71,14 +56,11 @@ def __init__(self, arg=None, line=None, **kwargs): ------- Increasing """ - super(Increasing, self).__init__("increasing") - + super().__init__("increasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.Increasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/_legendgrouptitle.py b/plotly/graph_objs/ohlc/_legendgrouptitle.py index 9d81684613..fa3087a564 100644 --- a/plotly/graph_objs/ohlc/_legendgrouptitle.py +++ b/plotly/graph_objs/ohlc/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.ohlc.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/_line.py b/plotly/graph_objs/ohlc/_line.py index 84916db5c8..9ec9aef811 100644 --- a/plotly/graph_objs/ohlc/_line.py +++ b/plotly/graph_objs/ohlc/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.line" _valid_props = {"dash", "width"} - # dash - # ---- @property def dash(self): """ @@ -38,8 +37,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -60,8 +57,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +73,13 @@ def _prop_descriptions(self): `decreasing.line.width`. """ - def __init__(self, arg=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -103,14 +104,11 @@ def __init__(self, arg=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -125,26 +123,10 @@ def __init__(self, arg=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/_stream.py b/plotly/graph_objs/ohlc/_stream.py index 9267a3c3ef..83e04f84eb 100644 --- a/plotly/graph_objs/ohlc/_stream.py +++ b/plotly/graph_objs/ohlc/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc" _path_str = "ohlc.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/decreasing/__init__.py b/plotly/graph_objs/ohlc/decreasing/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/ohlc/decreasing/__init__.py +++ b/plotly/graph_objs/ohlc/decreasing/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/ohlc/decreasing/_line.py b/plotly/graph_objs/ohlc/decreasing/_line.py index 099e75438a..384c856ebe 100644 --- a/plotly/graph_objs/ohlc/decreasing/_line.py +++ b/plotly/graph_objs/ohlc/decreasing/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc.decreasing" _path_str = "ohlc.decreasing.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.decreasing.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/hoverlabel/__init__.py b/plotly/graph_objs/ohlc/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/ohlc/hoverlabel/__init__.py +++ b/plotly/graph_objs/ohlc/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/ohlc/hoverlabel/_font.py b/plotly/graph_objs/ohlc/hoverlabel/_font.py index da3d4b93a8..09ce39012a 100644 --- a/plotly/graph_objs/ohlc/hoverlabel/_font.py +++ b/plotly/graph_objs/ohlc/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc.hoverlabel" _path_str = "ohlc.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.ohlc.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/increasing/__init__.py b/plotly/graph_objs/ohlc/increasing/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/ohlc/increasing/__init__.py +++ b/plotly/graph_objs/ohlc/increasing/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/ohlc/increasing/_line.py b/plotly/graph_objs/ohlc/increasing/_line.py index ff05abf073..09c4e53738 100644 --- a/plotly/graph_objs/ohlc/increasing/_line.py +++ b/plotly/graph_objs/ohlc/increasing/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc.increasing" _path_str = "ohlc.increasing.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.ohlc.increasing.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/ohlc/legendgrouptitle/__init__.py b/plotly/graph_objs/ohlc/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/ohlc/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/ohlc/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/ohlc/legendgrouptitle/_font.py b/plotly/graph_objs/ohlc/legendgrouptitle/_font.py index 2e02263e14..da9511a4e6 100644 --- a/plotly/graph_objs/ohlc/legendgrouptitle/_font.py +++ b/plotly/graph_objs/ohlc/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "ohlc.legendgrouptitle" _path_str = "ohlc.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.ohlc.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/__init__.py b/plotly/graph_objs/parcats/__init__.py index 97248e8a01..5760d95146 100644 --- a/plotly/graph_objs/parcats/__init__.py +++ b/plotly/graph_objs/parcats/__init__.py @@ -1,29 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._dimension import Dimension - from ._domain import Domain - from ._labelfont import Labelfont - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._stream import Stream - from ._tickfont import Tickfont - from . import legendgrouptitle - from . import line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".legendgrouptitle", ".line"], - [ - "._dimension.Dimension", - "._domain.Domain", - "._labelfont.Labelfont", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._stream.Stream", - "._tickfont.Tickfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".legendgrouptitle", ".line"], + [ + "._dimension.Dimension", + "._domain.Domain", + "._labelfont.Labelfont", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._stream.Stream", + "._tickfont.Tickfont", + ], +) diff --git a/plotly/graph_objs/parcats/_dimension.py b/plotly/graph_objs/parcats/_dimension.py index 7b1e105823..0b6f521b3d 100644 --- a/plotly/graph_objs/parcats/_dimension.py +++ b/plotly/graph_objs/parcats/_dimension.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Dimension(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.dimension" _valid_props = { @@ -21,8 +22,6 @@ class Dimension(_BaseTraceHierarchyType): "visible", } - # categoryarray - # ------------- @property def categoryarray(self): """ @@ -35,7 +34,7 @@ def categoryarray(self): Returns ------- - numpy.ndarray + NDArray """ return self["categoryarray"] @@ -43,8 +42,6 @@ def categoryarray(self): def categoryarray(self, val): self["categoryarray"] = val - # categoryarraysrc - # ---------------- @property def categoryarraysrc(self): """ @@ -64,8 +61,6 @@ def categoryarraysrc(self): def categoryarraysrc(self, val): self["categoryarraysrc"] = val - # categoryorder - # ------------- @property def categoryorder(self): """ @@ -96,8 +91,6 @@ def categoryorder(self): def categoryorder(self, val): self["categoryorder"] = val - # displayindex - # ------------ @property def displayindex(self): """ @@ -117,8 +110,6 @@ def displayindex(self): def displayindex(self, val): self["displayindex"] = val - # label - # ----- @property def label(self): """ @@ -138,8 +129,6 @@ def label(self): def label(self, val): self["label"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -153,7 +142,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -161,8 +150,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -181,8 +168,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # values - # ------ @property def values(self): """ @@ -196,7 +181,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -204,8 +189,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -224,8 +207,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -245,8 +226,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -299,16 +278,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - categoryarray=None, - categoryarraysrc=None, - categoryorder=None, - displayindex=None, - label=None, - ticktext=None, - ticktextsrc=None, - values=None, - valuessrc=None, - visible=None, + categoryarray: NDArray | None = None, + categoryarraysrc: str | None = None, + categoryorder: Any | None = None, + displayindex: int | None = None, + label: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -371,14 +350,11 @@ def __init__( ------- Dimension """ - super(Dimension, self).__init__("dimensions") - + super().__init__("dimensions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -393,58 +369,18 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.Dimension`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("categoryarray", None) - _v = categoryarray if categoryarray is not None else _v - if _v is not None: - self["categoryarray"] = _v - _v = arg.pop("categoryarraysrc", None) - _v = categoryarraysrc if categoryarraysrc is not None else _v - if _v is not None: - self["categoryarraysrc"] = _v - _v = arg.pop("categoryorder", None) - _v = categoryorder if categoryorder is not None else _v - if _v is not None: - self["categoryorder"] = _v - _v = arg.pop("displayindex", None) - _v = displayindex if displayindex is not None else _v - if _v is not None: - self["displayindex"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("categoryarray", arg, categoryarray) + self._init_provided("categoryarraysrc", arg, categoryarraysrc) + self._init_provided("categoryorder", arg, categoryorder) + self._init_provided("displayindex", arg, displayindex) + self._init_provided("label", arg, label) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/_domain.py b/plotly/graph_objs/parcats/_domain.py index 7d55c70b7a..e300cfafe3 100644 --- a/plotly/graph_objs/parcats/_domain.py +++ b/plotly/graph_objs/parcats/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.parcats.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/_labelfont.py b/plotly/graph_objs/parcats/_labelfont.py index a701d114d2..3bb24ad362 100644 --- a/plotly/graph_objs/parcats/_labelfont.py +++ b/plotly/graph_objs/parcats/_labelfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Labelfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.labelfont" _valid_props = { @@ -20,8 +21,6 @@ class Labelfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Labelfont """ - super(Labelfont, self).__init__("labelfont") - + super().__init__("labelfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.Labelfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/_legendgrouptitle.py b/plotly/graph_objs/parcats/_legendgrouptitle.py index bd0472960e..d6814bad75 100644 --- a/plotly/graph_objs/parcats/_legendgrouptitle.py +++ b/plotly/graph_objs/parcats/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcats.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.parcats.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/_line.py b/plotly/graph_objs/parcats/_line.py index 63058ebe06..a87e23a251 100644 --- a/plotly/graph_objs/parcats/_line.py +++ b/plotly/graph_objs/parcats/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.line" _valid_props = { @@ -25,8 +26,6 @@ class Line(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -51,8 +50,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -75,8 +72,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -98,8 +93,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to parcats.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -248,273 +198,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcats - .line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcats.line.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - parcats.line.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcats.line.color - bar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.parcats.line.ColorBar @@ -525,8 +208,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -579,8 +260,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -599,8 +278,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -645,8 +322,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -668,8 +343,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # shape - # ----- @property def shape(self): """ @@ -691,8 +364,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # showscale - # --------- @property def showscale(self): """ @@ -713,8 +384,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -834,20 +503,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - hovertemplate=None, - reversescale=None, - shape=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + hovertemplate: str | None = None, + reversescale: bool | None = None, + shape: Any | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -974,14 +643,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -996,74 +662,22 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("shape", arg, shape) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/_stream.py b/plotly/graph_objs/parcats/_stream.py index b6e389c866..fc39eceeb4 100644 --- a/plotly/graph_objs/parcats/_stream.py +++ b/plotly/graph_objs/parcats/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.parcats.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/_tickfont.py b/plotly/graph_objs/parcats/_tickfont.py index b017ce51e6..79971a9d16 100644 --- a/plotly/graph_objs/parcats/_tickfont.py +++ b/plotly/graph_objs/parcats/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats" _path_str = "parcats.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/legendgrouptitle/__init__.py b/plotly/graph_objs/parcats/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/parcats/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/parcats/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/parcats/legendgrouptitle/_font.py b/plotly/graph_objs/parcats/legendgrouptitle/_font.py index 99d15aa1ad..983c3b4ac0 100644 --- a/plotly/graph_objs/parcats/legendgrouptitle/_font.py +++ b/plotly/graph_objs/parcats/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats.legendgrouptitle" _path_str = "parcats.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/line/__init__.py b/plotly/graph_objs/parcats/line/__init__.py index 27dfc9e52f..5e1805d8fa 100644 --- a/plotly/graph_objs/parcats/line/__init__.py +++ b/plotly/graph_objs/parcats/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] +) diff --git a/plotly/graph_objs/parcats/line/_colorbar.py b/plotly/graph_objs/parcats/line/_colorbar.py index 82337cb2db..cc52e9ad1b 100644 --- a/plotly/graph_objs/parcats/line/_colorbar.py +++ b/plotly/graph_objs/parcats/line/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats.line" _path_str = "parcats.line.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcats.line.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.parcats.line.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.parcats.line.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.parcats.line.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.line.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/line/colorbar/__init__.py b/plotly/graph_objs/parcats/line/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/parcats/line/colorbar/__init__.py +++ b/plotly/graph_objs/parcats/line/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/parcats/line/colorbar/_tickfont.py b/plotly/graph_objs/parcats/line/colorbar/_tickfont.py index e4bbb61a59..c6b961f70d 100644 --- a/plotly/graph_objs/parcats/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/parcats/line/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats.line.colorbar" _path_str = "parcats.line.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py b/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py index 792d45da52..4d3b4a3862 100644 --- a/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/parcats/line/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats.line.colorbar" _path_str = "parcats.line.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/line/colorbar/_title.py b/plotly/graph_objs/parcats/line/colorbar/_title.py index 0e202a829f..60b6d705c5 100644 --- a/plotly/graph_objs/parcats/line/colorbar/_title.py +++ b/plotly/graph_objs/parcats/line/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats.line.colorbar" _path_str = "parcats.line.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcats.line.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.parcats.line.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcats/line/colorbar/title/__init__.py b/plotly/graph_objs/parcats/line/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/parcats/line/colorbar/title/__init__.py +++ b/plotly/graph_objs/parcats/line/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/parcats/line/colorbar/title/_font.py b/plotly/graph_objs/parcats/line/colorbar/title/_font.py index 8758ccea9f..d694b40cb8 100644 --- a/plotly/graph_objs/parcats/line/colorbar/title/_font.py +++ b/plotly/graph_objs/parcats/line/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcats.line.colorbar.title" _path_str = "parcats.line.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcats.line.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/__init__.py b/plotly/graph_objs/parcoords/__init__.py index 61ee5f1d40..174389e645 100644 --- a/plotly/graph_objs/parcoords/__init__.py +++ b/plotly/graph_objs/parcoords/__init__.py @@ -1,34 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._dimension import Dimension - from ._domain import Domain - from ._labelfont import Labelfont - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._rangefont import Rangefont - from ._stream import Stream - from ._tickfont import Tickfont - from ._unselected import Unselected - from . import legendgrouptitle - from . import line - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".legendgrouptitle", ".line", ".unselected"], - [ - "._dimension.Dimension", - "._domain.Domain", - "._labelfont.Labelfont", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._rangefont.Rangefont", - "._stream.Stream", - "._tickfont.Tickfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".legendgrouptitle", ".line", ".unselected"], + [ + "._dimension.Dimension", + "._domain.Domain", + "._labelfont.Labelfont", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._rangefont.Rangefont", + "._stream.Stream", + "._tickfont.Tickfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/parcoords/_dimension.py b/plotly/graph_objs/parcoords/_dimension.py index 61e6334eef..8457f173a1 100644 --- a/plotly/graph_objs/parcoords/_dimension.py +++ b/plotly/graph_objs/parcoords/_dimension.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Dimension(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.dimension" _valid_props = { @@ -25,8 +26,6 @@ class Dimension(_BaseTraceHierarchyType): "visible", } - # constraintrange - # --------------- @property def constraintrange(self): """ @@ -56,8 +55,6 @@ def constraintrange(self): def constraintrange(self, val): self["constraintrange"] = val - # label - # ----- @property def label(self): """ @@ -77,8 +74,6 @@ def label(self): def label(self, val): self["label"] = val - # multiselect - # ----------- @property def multiselect(self): """ @@ -97,8 +92,6 @@ def multiselect(self): def multiselect(self, val): self["multiselect"] = val - # name - # ---- @property def name(self): """ @@ -124,8 +117,6 @@ def name(self): def name(self, val): self["name"] = val - # range - # ----- @property def range(self): """ @@ -151,8 +142,6 @@ def range(self): def range(self, val): self["range"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -179,8 +168,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -209,8 +196,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -221,7 +206,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -229,8 +214,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -249,8 +232,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -261,7 +242,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -269,8 +250,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -289,8 +268,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # values - # ------ @property def values(self): """ @@ -304,7 +281,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -312,8 +289,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -332,8 +307,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -353,8 +326,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -434,20 +405,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - constraintrange=None, - label=None, - multiselect=None, - name=None, - range=None, - templateitemname=None, - tickformat=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - values=None, - valuessrc=None, - visible=None, + constraintrange: list | None = None, + label: str | None = None, + multiselect: bool | None = None, + name: str | None = None, + range: list | None = None, + templateitemname: str | None = None, + tickformat: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -538,14 +509,11 @@ def __init__( ------- Dimension """ - super(Dimension, self).__init__("dimensions") - + super().__init__("dimensions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -560,74 +528,22 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.Dimension`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("constraintrange", None) - _v = constraintrange if constraintrange is not None else _v - if _v is not None: - self["constraintrange"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("multiselect", None) - _v = multiselect if multiselect is not None else _v - if _v is not None: - self["multiselect"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("range", None) - _v = range if range is not None else _v - if _v is not None: - self["range"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("constraintrange", arg, constraintrange) + self._init_provided("label", arg, label) + self._init_provided("multiselect", arg, multiselect) + self._init_provided("name", arg, name) + self._init_provided("range", arg, range) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_domain.py b/plotly/graph_objs/parcoords/_domain.py index cec9642abe..a35b3a0044 100644 --- a/plotly/graph_objs/parcoords/_domain.py +++ b/plotly/graph_objs/parcoords/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): plot fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.parcoords.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_labelfont.py b/plotly/graph_objs/parcoords/_labelfont.py index a8304d126c..40a1c45f40 100644 --- a/plotly/graph_objs/parcoords/_labelfont.py +++ b/plotly/graph_objs/parcoords/_labelfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Labelfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.labelfont" _valid_props = { @@ -20,8 +21,6 @@ class Labelfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Labelfont """ - super(Labelfont, self).__init__("labelfont") - + super().__init__("labelfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.Labelfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_legendgrouptitle.py b/plotly/graph_objs/parcoords/_legendgrouptitle.py index f667d43b06..bbb91c4b23 100644 --- a/plotly/graph_objs/parcoords/_legendgrouptitle.py +++ b/plotly/graph_objs/parcoords/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcoords.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.parcoords.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_line.py b/plotly/graph_objs/parcoords/_line.py index ea91782124..f2d662e1ec 100644 --- a/plotly/graph_objs/parcoords/_line.py +++ b/plotly/graph_objs/parcoords/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -73,8 +70,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -96,8 +91,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -120,8 +113,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -143,8 +134,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -158,49 +147,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to parcoords.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -208,8 +162,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -235,8 +187,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -246,273 +196,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcoor - ds.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcoords.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - parcoords.line.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcoords.line.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.parcoords.line.ColorBar @@ -523,8 +206,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -577,8 +258,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -597,8 +276,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -620,8 +297,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -642,8 +317,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -728,18 +401,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -832,14 +505,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -854,66 +524,20 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_rangefont.py b/plotly/graph_objs/parcoords/_rangefont.py index d0dcb16b33..34b7a5731f 100644 --- a/plotly/graph_objs/parcoords/_rangefont.py +++ b/plotly/graph_objs/parcoords/_rangefont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Rangefont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.rangefont" _valid_props = { @@ -20,8 +21,6 @@ class Rangefont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Rangefont """ - super(Rangefont, self).__init__("rangefont") - + super().__init__("rangefont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.Rangefont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_stream.py b/plotly/graph_objs/parcoords/_stream.py index a9b1a52f27..4b30cb7656 100644 --- a/plotly/graph_objs/parcoords/_stream.py +++ b/plotly/graph_objs/parcoords/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.parcoords.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_tickfont.py b/plotly/graph_objs/parcoords/_tickfont.py index 122825fb05..72d7a59214 100644 --- a/plotly/graph_objs/parcoords/_tickfont.py +++ b/plotly/graph_objs/parcoords/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/_unselected.py b/plotly/graph_objs/parcoords/_unselected.py index b6afc15d1c..6c0fc639b9 100644 --- a/plotly/graph_objs/parcoords/_unselected.py +++ b/plotly/graph_objs/parcoords/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords" _path_str = "parcoords.unselected" _valid_props = {"line"} - # line - # ---- @property def line(self): """ @@ -21,17 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the base color of unselected lines. in - connection with `unselected.line.opacity`. - opacity - Sets the opacity of unselected lines. The - default "auto" decreases the opacity smoothly - as the number of lines increases. Use 1 to - achieve exact `unselected.line.color`. - Returns ------- plotly.graph_objs.parcoords.unselected.Line @@ -42,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -52,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, line=None, **kwargs): + def __init__(self, arg=None, line: None | None = None, **kwargs): """ Construct a new Unselected object @@ -70,14 +56,11 @@ def __init__(self, arg=None, line=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -92,22 +75,9 @@ def __init__(self, arg=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.parcoords.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/legendgrouptitle/__init__.py b/plotly/graph_objs/parcoords/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/parcoords/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/parcoords/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/parcoords/legendgrouptitle/_font.py b/plotly/graph_objs/parcoords/legendgrouptitle/_font.py index 43406e96f3..8fa8535e5a 100644 --- a/plotly/graph_objs/parcoords/legendgrouptitle/_font.py +++ b/plotly/graph_objs/parcoords/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.legendgrouptitle" _path_str = "parcoords.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/line/__init__.py b/plotly/graph_objs/parcoords/line/__init__.py index 27dfc9e52f..5e1805d8fa 100644 --- a/plotly/graph_objs/parcoords/line/__init__.py +++ b/plotly/graph_objs/parcoords/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] +) diff --git a/plotly/graph_objs/parcoords/line/_colorbar.py b/plotly/graph_objs/parcoords/line/_colorbar.py index 0b2e3b6a18..729b03d929 100644 --- a/plotly/graph_objs/parcoords/line/_colorbar.py +++ b/plotly/graph_objs/parcoords/line/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.line" _path_str = "parcoords.line.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcoords.line.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.parcoords.line.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.parcoords.line.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.parcoords.line.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.line.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/line/colorbar/__init__.py b/plotly/graph_objs/parcoords/line/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/__init__.py +++ b/plotly/graph_objs/parcoords/line/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py b/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py index 9214f96fc0..2cdc5f2636 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.line.colorbar" _path_str = "parcoords.line.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py b/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py index 91e8d618f6..b0f16ab7cb 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/parcoords/line/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.line.colorbar" _path_str = "parcoords.line.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/line/colorbar/_title.py b/plotly/graph_objs/parcoords/line/colorbar/_title.py index 61d3ae5400..f998156f9d 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/_title.py +++ b/plotly/graph_objs/parcoords/line/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.line.colorbar" _path_str = "parcoords.line.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.parcoords.line.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py b/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py +++ b/plotly/graph_objs/parcoords/line/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/parcoords/line/colorbar/title/_font.py b/plotly/graph_objs/parcoords/line/colorbar/title/_font.py index abd968c6ce..0770d04f90 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/title/_font.py +++ b/plotly/graph_objs/parcoords/line/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.line.colorbar.title" _path_str = "parcoords.line.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.parcoords.line.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/parcoords/unselected/__init__.py b/plotly/graph_objs/parcoords/unselected/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/parcoords/unselected/__init__.py +++ b/plotly/graph_objs/parcoords/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/parcoords/unselected/_line.py b/plotly/graph_objs/parcoords/unselected/_line.py index a71fe07e08..6e21c256cc 100644 --- a/plotly/graph_objs/parcoords/unselected/_line.py +++ b/plotly/graph_objs/parcoords/unselected/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "parcoords.unselected" _path_str = "parcoords.unselected.line" _valid_props = {"color", "opacity"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -92,8 +54,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -107,7 +67,13 @@ def _prop_descriptions(self): `unselected.line.color`. """ - def __init__(self, arg=None, color=None, opacity=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -130,14 +96,11 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +115,10 @@ def __init__(self, arg=None, color=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.parcoords.unselected.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/__init__.py b/plotly/graph_objs/pie/__init__.py index 7f472afeb9..dd82665ec5 100644 --- a/plotly/graph_objs/pie/__init__.py +++ b/plotly/graph_objs/pie/__init__.py @@ -1,35 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._stream import Stream - from ._textfont import Textfont - from ._title import Title - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".title"], - [ - "._domain.Domain", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._stream.Stream", - "._textfont.Textfont", - "._title.Title", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".title"], + [ + "._domain.Domain", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._stream.Stream", + "._textfont.Textfont", + "._title.Title", + ], +) diff --git a/plotly/graph_objs/pie/_domain.py b/plotly/graph_objs/pie/_domain.py index 66bbaa0e23..91df8ca73a 100644 --- a/plotly/graph_objs/pie/_domain.py +++ b/plotly/graph_objs/pie/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -105,8 +98,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -124,7 +115,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -150,14 +149,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -172,34 +168,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.pie.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_hoverlabel.py b/plotly/graph_objs/pie/_hoverlabel.py index 6eea4b083d..75c6048ac9 100644 --- a/plotly/graph_objs/pie/_hoverlabel.py +++ b/plotly/graph_objs/pie/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.pie.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_insidetextfont.py b/plotly/graph_objs/pie/_insidetextfont.py index 405e49af4a..9302fa59aa 100644 --- a/plotly/graph_objs/pie/_insidetextfont.py +++ b/plotly/graph_objs/pie/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_legendgrouptitle.py b/plotly/graph_objs/pie/_legendgrouptitle.py index 6e519996c6..e0a246c627 100644 --- a/plotly/graph_objs/pie/_legendgrouptitle.py +++ b/plotly/graph_objs/pie/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.pie.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.pie.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_marker.py b/plotly/graph_objs/pie/_marker.py index 5dc68dd8e2..2c3dea1798 100644 --- a/plotly/graph_objs/pie/_marker.py +++ b/plotly/graph_objs/pie/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.marker" _valid_props = {"colors", "colorssrc", "line", "pattern"} - # colors - # ------ @property def colors(self): """ @@ -23,7 +22,7 @@ def colors(self): Returns ------- - numpy.ndarray + NDArray """ return self["colors"] @@ -31,8 +30,6 @@ def colors(self): def colors(self, val): self["colors"] = val - # colorssrc - # --------- @property def colorssrc(self): """ @@ -51,8 +48,6 @@ def colorssrc(self): def colorssrc(self, val): self["colorssrc"] = val - # line - # ---- @property def line(self): """ @@ -62,21 +57,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.pie.marker.Line @@ -87,8 +67,6 @@ def line(self): def line(self, val): self["line"] = val - # pattern - # ------- @property def pattern(self): """ @@ -100,57 +78,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.pie.marker.Pattern @@ -161,8 +88,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -181,7 +106,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, colors=None, colorssrc=None, line=None, pattern=None, **kwargs + self, + arg=None, + colors: NDArray | None = None, + colorssrc: str | None = None, + line: None | None = None, + pattern: None | None = None, + **kwargs, ): """ Construct a new Marker object @@ -208,14 +139,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -230,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colors", None) - _v = colors if colors is not None else _v - if _v is not None: - self["colors"] = _v - _v = arg.pop("colorssrc", None) - _v = colorssrc if colorssrc is not None else _v - if _v is not None: - self["colorssrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("colors", arg, colors) + self._init_provided("colorssrc", arg, colorssrc) + self._init_provided("line", arg, line) + self._init_provided("pattern", arg, pattern) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_outsidetextfont.py b/plotly/graph_objs/pie/_outsidetextfont.py index 2b989c8eee..dec630cd5d 100644 --- a/plotly/graph_objs/pie/_outsidetextfont.py +++ b/plotly/graph_objs/pie/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_stream.py b/plotly/graph_objs/pie/_stream.py index 258d1201fb..b0cb397a1e 100644 --- a/plotly/graph_objs/pie/_stream.py +++ b/plotly/graph_objs/pie/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.pie.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_textfont.py b/plotly/graph_objs/pie/_textfont.py index dd100565b6..23208c9a4e 100644 --- a/plotly/graph_objs/pie/_textfont.py +++ b/plotly/graph_objs/pie/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -575,18 +489,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -638,14 +545,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -660,90 +564,26 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/_title.py b/plotly/graph_objs/pie/_title.py index a353059e41..986eebb530 100644 --- a/plotly/graph_objs/pie/_title.py +++ b/plotly/graph_objs/pie/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie" _path_str = "pie.title" _valid_props = {"font", "position", "text"} - # font - # ---- @property def font(self): """ @@ -23,79 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.pie.title.Font @@ -106,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # position - # -------- @property def position(self): """ @@ -128,8 +52,6 @@ def position(self): def position(self, val): self["position"] = val - # text - # ---- @property def text(self): """ @@ -150,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -164,7 +84,14 @@ def _prop_descriptions(self): is displayed. """ - def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + position: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -185,14 +112,11 @@ def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -207,30 +131,11 @@ def __init__(self, arg=None, font=None, position=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.pie.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("position", None) - _v = position if position is not None else _v - if _v is not None: - self["position"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("position", arg, position) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/hoverlabel/__init__.py b/plotly/graph_objs/pie/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/pie/hoverlabel/__init__.py +++ b/plotly/graph_objs/pie/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/pie/hoverlabel/_font.py b/plotly/graph_objs/pie/hoverlabel/_font.py index 4dbd06c8e3..09a228ffa5 100644 --- a/plotly/graph_objs/pie/hoverlabel/_font.py +++ b/plotly/graph_objs/pie/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie.hoverlabel" _path_str = "pie.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/legendgrouptitle/__init__.py b/plotly/graph_objs/pie/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/pie/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/pie/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/pie/legendgrouptitle/_font.py b/plotly/graph_objs/pie/legendgrouptitle/_font.py index f06c6ce659..9eff501188 100644 --- a/plotly/graph_objs/pie/legendgrouptitle/_font.py +++ b/plotly/graph_objs/pie/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie.legendgrouptitle" _path_str = "pie.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/marker/__init__.py b/plotly/graph_objs/pie/marker/__init__.py index 9f8ac2640c..4e5d01c99b 100644 --- a/plotly/graph_objs/pie/marker/__init__.py +++ b/plotly/graph_objs/pie/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line - from ._pattern import Pattern -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.Line", "._pattern.Pattern"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/pie/marker/_line.py b/plotly/graph_objs/pie/marker/_line.py index 01e91301af..c3e02f97cf 100644 --- a/plotly/graph_objs/pie/marker/_line.py +++ b/plotly/graph_objs/pie/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie.marker" _path_str = "pie.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -22,47 +21,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -90,8 +52,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -103,7 +63,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -111,8 +71,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -131,8 +89,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -150,7 +106,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -177,14 +139,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -199,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/marker/_pattern.py b/plotly/graph_objs/pie/marker/_pattern.py index 9f9e0d31db..066af3ae39 100644 --- a/plotly/graph_objs/pie/marker/_pattern.py +++ b/plotly/graph_objs/pie/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie.marker" _path_str = "pie.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/pie/title/__init__.py b/plotly/graph_objs/pie/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/pie/title/__init__.py +++ b/plotly/graph_objs/pie/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/pie/title/_font.py b/plotly/graph_objs/pie/title/_font.py index 94abdc6fad..0360582b22 100644 --- a/plotly/graph_objs/pie/title/_font.py +++ b/plotly/graph_objs/pie/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "pie.title" _path_str = "pie.title.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.pie.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/__init__.py b/plotly/graph_objs/sankey/__init__.py index 546ebd48cf..e3a9223111 100644 --- a/plotly/graph_objs/sankey/__init__.py +++ b/plotly/graph_objs/sankey/__init__.py @@ -1,31 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._link import Link - from ._node import Node - from ._stream import Stream - from ._textfont import Textfont - from . import hoverlabel - from . import legendgrouptitle - from . import link - from . import node -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".link", ".node"], - [ - "._domain.Domain", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._link.Link", - "._node.Node", - "._stream.Stream", - "._textfont.Textfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".link", ".node"], + [ + "._domain.Domain", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._link.Link", + "._node.Node", + "._stream.Stream", + "._textfont.Textfont", + ], +) diff --git a/plotly/graph_objs/sankey/_domain.py b/plotly/graph_objs/sankey/_domain.py index a4d04fd60b..4429412155 100644 --- a/plotly/graph_objs/sankey/_domain.py +++ b/plotly/graph_objs/sankey/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -151,14 +150,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -173,34 +169,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.sankey.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/_hoverlabel.py b/plotly/graph_objs/sankey/_hoverlabel.py index d83a32f20a..41b60bdd23 100644 --- a/plotly/graph_objs/sankey/_hoverlabel.py +++ b/plotly/graph_objs/sankey/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sankey.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/_legendgrouptitle.py b/plotly/graph_objs/sankey/_legendgrouptitle.py index 244ff4aece..21f924a71f 100644 --- a/plotly/graph_objs/sankey/_legendgrouptitle.py +++ b/plotly/graph_objs/sankey/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.sankey.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.sankey.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/_link.py b/plotly/graph_objs/sankey/_link.py index 0dfcced219..3c0719e4a7 100644 --- a/plotly/graph_objs/sankey/_link.py +++ b/plotly/graph_objs/sankey/_link.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Link(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.link" _valid_props = { @@ -33,8 +34,6 @@ class Link(_BaseTraceHierarchyType): "valuesrc", } - # arrowlen - # -------- @property def arrowlen(self): """ @@ -54,8 +53,6 @@ def arrowlen(self): def arrowlen(self, val): self["arrowlen"] = val - # color - # ----- @property def color(self): """ @@ -68,47 +65,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -116,8 +78,6 @@ def color(self): def color(self, val): self["color"] = val - # colorscales - # ----------- @property def colorscales(self): """ @@ -127,51 +87,6 @@ def colorscales(self): - A list or tuple of dicts of string/value properties that will be passed to the Colorscale constructor - Supported dict properties: - - cmax - Sets the upper bound of the color domain. - cmin - Sets the lower bound of the color domain. - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - label - The label of the links to color based on their - concentration within a flow. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - Returns ------- tuple[plotly.graph_objs.sankey.link.Colorscale] @@ -182,8 +97,6 @@ def colorscales(self): def colorscales(self, val): self["colorscales"] = val - # colorscaledefaults - # ------------------ @property def colorscaledefaults(self): """ @@ -198,8 +111,6 @@ def colorscaledefaults(self): - A dict of string/value properties that will be passed to the Colorscale constructor - Supported dict properties: - Returns ------- plotly.graph_objs.sankey.link.Colorscale @@ -210,8 +121,6 @@ def colorscaledefaults(self): def colorscaledefaults(self, val): self["colorscaledefaults"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -230,8 +139,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -242,7 +149,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -250,8 +157,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -271,8 +176,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # hovercolor - # ---------- @property def hovercolor(self): """ @@ -286,47 +189,12 @@ def hovercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovercolor"] @@ -334,8 +202,6 @@ def hovercolor(self): def hovercolor(self, val): self["hovercolor"] = val - # hovercolorsrc - # ------------- @property def hovercolorsrc(self): """ @@ -355,8 +221,6 @@ def hovercolorsrc(self): def hovercolorsrc(self, val): self["hovercolorsrc"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -379,8 +243,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -390,44 +252,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.sankey.link.Hoverlabel @@ -438,8 +262,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -476,7 +298,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -484,8 +306,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -505,8 +325,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # label - # ----- @property def label(self): """ @@ -517,7 +335,7 @@ def label(self): Returns ------- - numpy.ndarray + NDArray """ return self["label"] @@ -525,8 +343,6 @@ def label(self): def label(self, val): self["label"] = val - # labelsrc - # -------- @property def labelsrc(self): """ @@ -545,8 +361,6 @@ def labelsrc(self): def labelsrc(self, val): self["labelsrc"] = val - # line - # ---- @property def line(self): """ @@ -556,21 +370,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the `line` around each - `link`. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the `line` around - each `link`. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.sankey.link.Line @@ -581,8 +380,6 @@ def line(self): def line(self, val): self["line"] = val - # source - # ------ @property def source(self): """ @@ -594,7 +391,7 @@ def source(self): Returns ------- - numpy.ndarray + NDArray """ return self["source"] @@ -602,8 +399,6 @@ def source(self): def source(self, val): self["source"] = val - # sourcesrc - # --------- @property def sourcesrc(self): """ @@ -622,8 +417,6 @@ def sourcesrc(self): def sourcesrc(self, val): self["sourcesrc"] = val - # target - # ------ @property def target(self): """ @@ -635,7 +428,7 @@ def target(self): Returns ------- - numpy.ndarray + NDArray """ return self["target"] @@ -643,8 +436,6 @@ def target(self): def target(self, val): self["target"] = val - # targetsrc - # --------- @property def targetsrc(self): """ @@ -663,8 +454,6 @@ def targetsrc(self): def targetsrc(self, val): self["targetsrc"] = val - # value - # ----- @property def value(self): """ @@ -675,7 +464,7 @@ def value(self): Returns ------- - numpy.ndarray + NDArray """ return self["value"] @@ -683,8 +472,6 @@ def value(self): def value(self, val): self["value"] = val - # valuesrc - # -------- @property def valuesrc(self): """ @@ -703,8 +490,6 @@ def valuesrc(self): def valuesrc(self, val): self["valuesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -814,28 +599,28 @@ def _prop_descriptions(self): def __init__( self, arg=None, - arrowlen=None, - color=None, - colorscales=None, - colorscaledefaults=None, - colorsrc=None, - customdata=None, - customdatasrc=None, - hovercolor=None, - hovercolorsrc=None, - hoverinfo=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - label=None, - labelsrc=None, - line=None, - source=None, - sourcesrc=None, - target=None, - targetsrc=None, - value=None, - valuesrc=None, + arrowlen: int | float | None = None, + color: str | None = None, + colorscales: None | None = None, + colorscaledefaults: None | None = None, + colorsrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + hovercolor: str | None = None, + hovercolorsrc: str | None = None, + hoverinfo: Any | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + label: NDArray | None = None, + labelsrc: str | None = None, + line: None | None = None, + source: NDArray | None = None, + sourcesrc: str | None = None, + target: NDArray | None = None, + targetsrc: str | None = None, + value: NDArray | None = None, + valuesrc: str | None = None, **kwargs, ): """ @@ -954,14 +739,11 @@ def __init__( ------- Link """ - super(Link, self).__init__("link") - + super().__init__("link") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -976,106 +758,30 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.Link`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("arrowlen", None) - _v = arrowlen if arrowlen is not None else _v - if _v is not None: - self["arrowlen"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorscales", None) - _v = colorscales if colorscales is not None else _v - if _v is not None: - self["colorscales"] = _v - _v = arg.pop("colorscaledefaults", None) - _v = colorscaledefaults if colorscaledefaults is not None else _v - if _v is not None: - self["colorscaledefaults"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("hovercolor", None) - _v = hovercolor if hovercolor is not None else _v - if _v is not None: - self["hovercolor"] = _v - _v = arg.pop("hovercolorsrc", None) - _v = hovercolorsrc if hovercolorsrc is not None else _v - if _v is not None: - self["hovercolorsrc"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("labelsrc", None) - _v = labelsrc if labelsrc is not None else _v - if _v is not None: - self["labelsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("source", None) - _v = source if source is not None else _v - if _v is not None: - self["source"] = _v - _v = arg.pop("sourcesrc", None) - _v = sourcesrc if sourcesrc is not None else _v - if _v is not None: - self["sourcesrc"] = _v - _v = arg.pop("target", None) - _v = target if target is not None else _v - if _v is not None: - self["target"] = _v - _v = arg.pop("targetsrc", None) - _v = targetsrc if targetsrc is not None else _v - if _v is not None: - self["targetsrc"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valuesrc", None) - _v = valuesrc if valuesrc is not None else _v - if _v is not None: - self["valuesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("arrowlen", arg, arrowlen) + self._init_provided("color", arg, color) + self._init_provided("colorscales", arg, colorscales) + self._init_provided("colorscaledefaults", arg, colorscaledefaults) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("hovercolor", arg, hovercolor) + self._init_provided("hovercolorsrc", arg, hovercolorsrc) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("label", arg, label) + self._init_provided("labelsrc", arg, labelsrc) + self._init_provided("line", arg, line) + self._init_provided("source", arg, source) + self._init_provided("sourcesrc", arg, sourcesrc) + self._init_provided("target", arg, target) + self._init_provided("targetsrc", arg, targetsrc) + self._init_provided("value", arg, value) + self._init_provided("valuesrc", arg, valuesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/_node.py b/plotly/graph_objs/sankey/_node.py index 61d7d275fb..64ecdb0812 100644 --- a/plotly/graph_objs/sankey/_node.py +++ b/plotly/graph_objs/sankey/_node.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Node(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.node" _valid_props = { @@ -30,8 +31,6 @@ class Node(_BaseTraceHierarchyType): "ysrc", } - # align - # ----- @property def align(self): """ @@ -52,8 +51,6 @@ def align(self): def align(self, val): self["align"] = val - # color - # ----- @property def color(self): """ @@ -69,47 +66,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -117,8 +79,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -137,8 +97,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # customdata - # ---------- @property def customdata(self): """ @@ -149,7 +107,7 @@ def customdata(self): Returns ------- - numpy.ndarray + NDArray """ return self["customdata"] @@ -157,8 +115,6 @@ def customdata(self): def customdata(self, val): self["customdata"] = val - # customdatasrc - # ------------- @property def customdatasrc(self): """ @@ -178,8 +134,6 @@ def customdatasrc(self): def customdatasrc(self, val): self["customdatasrc"] = val - # groups - # ------ @property def groups(self): """ @@ -202,8 +156,6 @@ def groups(self): def groups(self, val): self["groups"] = val - # hoverinfo - # --------- @property def hoverinfo(self): """ @@ -226,8 +178,6 @@ def hoverinfo(self): def hoverinfo(self, val): self["hoverinfo"] = val - # hoverlabel - # ---------- @property def hoverlabel(self): """ @@ -237,44 +187,6 @@ def hoverlabel(self): - A dict of string/value properties that will be passed to the Hoverlabel constructor - Supported dict properties: - - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - Returns ------- plotly.graph_objs.sankey.node.Hoverlabel @@ -285,8 +197,6 @@ def hoverlabel(self): def hoverlabel(self, val): self["hoverlabel"] = val - # hovertemplate - # ------------- @property def hovertemplate(self): """ @@ -324,7 +234,7 @@ def hovertemplate(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["hovertemplate"] @@ -332,8 +242,6 @@ def hovertemplate(self): def hovertemplate(self, val): self["hovertemplate"] = val - # hovertemplatesrc - # ---------------- @property def hovertemplatesrc(self): """ @@ -353,8 +261,6 @@ def hovertemplatesrc(self): def hovertemplatesrc(self, val): self["hovertemplatesrc"] = val - # label - # ----- @property def label(self): """ @@ -365,7 +271,7 @@ def label(self): Returns ------- - numpy.ndarray + NDArray """ return self["label"] @@ -373,8 +279,6 @@ def label(self): def label(self, val): self["label"] = val - # labelsrc - # -------- @property def labelsrc(self): """ @@ -393,8 +297,6 @@ def labelsrc(self): def labelsrc(self, val): self["labelsrc"] = val - # line - # ---- @property def line(self): """ @@ -404,21 +306,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the `line` around each - `node`. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the `line` around - each `node`. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.sankey.node.Line @@ -429,8 +316,6 @@ def line(self): def line(self, val): self["line"] = val - # pad - # --- @property def pad(self): """ @@ -449,8 +334,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # thickness - # --------- @property def thickness(self): """ @@ -469,8 +352,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # x - # - @property def x(self): """ @@ -481,7 +362,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -489,8 +370,6 @@ def x(self): def x(self, val): self["x"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -509,8 +388,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -521,7 +398,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -529,8 +406,6 @@ def y(self): def y(self, val): self["y"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -549,8 +424,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -645,25 +518,25 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - color=None, - colorsrc=None, - customdata=None, - customdatasrc=None, - groups=None, - hoverinfo=None, - hoverlabel=None, - hovertemplate=None, - hovertemplatesrc=None, - label=None, - labelsrc=None, - line=None, - pad=None, - thickness=None, - x=None, - xsrc=None, - y=None, - ysrc=None, + align: Any | None = None, + color: str | None = None, + colorsrc: str | None = None, + customdata: NDArray | None = None, + customdatasrc: str | None = None, + groups: list | None = None, + hoverinfo: Any | None = None, + hoverlabel: None | None = None, + hovertemplate: str | None = None, + hovertemplatesrc: str | None = None, + label: NDArray | None = None, + labelsrc: str | None = None, + line: None | None = None, + pad: int | float | None = None, + thickness: int | float | None = None, + x: NDArray | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ysrc: str | None = None, **kwargs, ): """ @@ -767,14 +640,11 @@ def __init__( ------- Node """ - super(Node, self).__init__("node") - + super().__init__("node") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -789,94 +659,27 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.Node`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("customdata", None) - _v = customdata if customdata is not None else _v - if _v is not None: - self["customdata"] = _v - _v = arg.pop("customdatasrc", None) - _v = customdatasrc if customdatasrc is not None else _v - if _v is not None: - self["customdatasrc"] = _v - _v = arg.pop("groups", None) - _v = groups if groups is not None else _v - if _v is not None: - self["groups"] = _v - _v = arg.pop("hoverinfo", None) - _v = hoverinfo if hoverinfo is not None else _v - if _v is not None: - self["hoverinfo"] = _v - _v = arg.pop("hoverlabel", None) - _v = hoverlabel if hoverlabel is not None else _v - if _v is not None: - self["hoverlabel"] = _v - _v = arg.pop("hovertemplate", None) - _v = hovertemplate if hovertemplate is not None else _v - if _v is not None: - self["hovertemplate"] = _v - _v = arg.pop("hovertemplatesrc", None) - _v = hovertemplatesrc if hovertemplatesrc is not None else _v - if _v is not None: - self["hovertemplatesrc"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("labelsrc", None) - _v = labelsrc if labelsrc is not None else _v - if _v is not None: - self["labelsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("customdata", arg, customdata) + self._init_provided("customdatasrc", arg, customdatasrc) + self._init_provided("groups", arg, groups) + self._init_provided("hoverinfo", arg, hoverinfo) + self._init_provided("hoverlabel", arg, hoverlabel) + self._init_provided("hovertemplate", arg, hovertemplate) + self._init_provided("hovertemplatesrc", arg, hovertemplatesrc) + self._init_provided("label", arg, label) + self._init_provided("labelsrc", arg, labelsrc) + self._init_provided("line", arg, line) + self._init_provided("pad", arg, pad) + self._init_provided("thickness", arg, thickness) + self._init_provided("x", arg, x) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("ysrc", arg, ysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/_stream.py b/plotly/graph_objs/sankey/_stream.py index 72583c9471..2c84acd970 100644 --- a/plotly/graph_objs/sankey/_stream.py +++ b/plotly/graph_objs/sankey/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.sankey.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/_textfont.py b/plotly/graph_objs/sankey/_textfont.py index 1bb9d7fd84..c428701493 100644 --- a/plotly/graph_objs/sankey/_textfont.py +++ b/plotly/graph_objs/sankey/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey" _path_str = "sankey.textfont" _valid_props = { @@ -20,8 +21,6 @@ class Textfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/hoverlabel/__init__.py b/plotly/graph_objs/sankey/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sankey/hoverlabel/__init__.py +++ b/plotly/graph_objs/sankey/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sankey/hoverlabel/_font.py b/plotly/graph_objs/sankey/hoverlabel/_font.py index 502fe432bc..9a51ee0468 100644 --- a/plotly/graph_objs/sankey/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.hoverlabel" _path_str = "sankey.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/legendgrouptitle/__init__.py b/plotly/graph_objs/sankey/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sankey/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/sankey/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sankey/legendgrouptitle/_font.py b/plotly/graph_objs/sankey/legendgrouptitle/_font.py index 34d067b55f..beddf6feb9 100644 --- a/plotly/graph_objs/sankey/legendgrouptitle/_font.py +++ b/plotly/graph_objs/sankey/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.legendgrouptitle" _path_str = "sankey.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/link/__init__.py b/plotly/graph_objs/sankey/link/__init__.py index be51e67f10..fe898fb7d7 100644 --- a/plotly/graph_objs/sankey/link/__init__.py +++ b/plotly/graph_objs/sankey/link/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorscale import Colorscale - from ._hoverlabel import Hoverlabel - from ._line import Line - from . import hoverlabel -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel"], - ["._colorscale.Colorscale", "._hoverlabel.Hoverlabel", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel"], + ["._colorscale.Colorscale", "._hoverlabel.Hoverlabel", "._line.Line"], +) diff --git a/plotly/graph_objs/sankey/link/_colorscale.py b/plotly/graph_objs/sankey/link/_colorscale.py index a7734e691f..c4b05b2f2f 100644 --- a/plotly/graph_objs/sankey/link/_colorscale.py +++ b/plotly/graph_objs/sankey/link/_colorscale.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Colorscale(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.link" _path_str = "sankey.link.colorscale" _valid_props = {"cmax", "cmin", "colorscale", "label", "name", "templateitemname"} - # cmax - # ---- @property def cmax(self): """ @@ -30,8 +29,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmin - # ---- @property def cmin(self): """ @@ -50,8 +47,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -103,8 +98,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # label - # ----- @property def label(self): """ @@ -125,8 +118,6 @@ def label(self): def label(self, val): self["label"] = val - # name - # ---- @property def name(self): """ @@ -152,8 +143,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -180,8 +169,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -228,12 +215,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - cmax=None, - cmin=None, - colorscale=None, - label=None, - name=None, - templateitemname=None, + cmax: int | float | None = None, + cmin: int | float | None = None, + colorscale: str | None = None, + label: str | None = None, + name: str | None = None, + templateitemname: str | None = None, **kwargs, ): """ @@ -288,14 +275,11 @@ def __init__( ------- Colorscale """ - super(Colorscale, self).__init__("colorscales") - + super().__init__("colorscales") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -310,42 +294,14 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.link.Colorscale`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("cmax", arg, cmax) + self._init_provided("cmin", arg, cmin) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("label", arg, label) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/link/_hoverlabel.py b/plotly/graph_objs/sankey/link/_hoverlabel.py index 8a63e71700..5dc8332cf0 100644 --- a/plotly/graph_objs/sankey/link/_hoverlabel.py +++ b/plotly/graph_objs/sankey/link/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.link" _path_str = "sankey.link.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sankey.link.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.link.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/link/_line.py b/plotly/graph_objs/sankey/link/_line.py index d1c1d9b4af..d5357a23cb 100644 --- a/plotly/graph_objs/sankey/link/_line.py +++ b/plotly/graph_objs/sankey/link/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.link" _path_str = "sankey.link.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -22,47 +21,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -90,8 +52,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -103,7 +63,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -111,8 +71,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -131,8 +89,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -150,7 +106,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -177,14 +139,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -199,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.link.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/link/hoverlabel/__init__.py b/plotly/graph_objs/sankey/link/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sankey/link/hoverlabel/__init__.py +++ b/plotly/graph_objs/sankey/link/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sankey/link/hoverlabel/_font.py b/plotly/graph_objs/sankey/link/hoverlabel/_font.py index b9fb526bee..bc31271d8a 100644 --- a/plotly/graph_objs/sankey/link/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/link/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.link.hoverlabel" _path_str = "sankey.link.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.link.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/node/__init__.py b/plotly/graph_objs/sankey/node/__init__.py index de720a3b81..f920380373 100644 --- a/plotly/graph_objs/sankey/node/__init__.py +++ b/plotly/graph_objs/sankey/node/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._line import Line - from . import hoverlabel -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".hoverlabel"], ["._hoverlabel.Hoverlabel", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".hoverlabel"], ["._hoverlabel.Hoverlabel", "._line.Line"] +) diff --git a/plotly/graph_objs/sankey/node/_hoverlabel.py b/plotly/graph_objs/sankey/node/_hoverlabel.py index bc10f646bd..e4e010f8b5 100644 --- a/plotly/graph_objs/sankey/node/_hoverlabel.py +++ b/plotly/graph_objs/sankey/node/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.node" _path_str = "sankey.node.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sankey.node.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.node.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/node/_line.py b/plotly/graph_objs/sankey/node/_line.py index 26b939ac11..9ccf3597cb 100644 --- a/plotly/graph_objs/sankey/node/_line.py +++ b/plotly/graph_objs/sankey/node/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.node" _path_str = "sankey.node.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -22,47 +21,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -90,8 +52,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -103,7 +63,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -111,8 +71,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -131,8 +89,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -150,7 +106,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -177,14 +139,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -199,34 +158,12 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.node.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sankey/node/hoverlabel/__init__.py b/plotly/graph_objs/sankey/node/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sankey/node/hoverlabel/__init__.py +++ b/plotly/graph_objs/sankey/node/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sankey/node/hoverlabel/_font.py b/plotly/graph_objs/sankey/node/hoverlabel/_font.py index 25c367c4d3..395937f23c 100644 --- a/plotly/graph_objs/sankey/node/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/node/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sankey.node.hoverlabel" _path_str = "sankey.node.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sankey.node.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/__init__.py b/plotly/graph_objs/scatter/__init__.py index 8f8eb55b57..b0327a6d1b 100644 --- a/plotly/graph_objs/scatter/__init__.py +++ b/plotly/graph_objs/scatter/__init__.py @@ -1,42 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._error_x import ErrorX - from ._error_y import ErrorY - from ._fillgradient import Fillgradient - from ._fillpattern import Fillpattern - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._error_x.ErrorX", - "._error_y.ErrorY", - "._fillgradient.Fillgradient", - "._fillpattern.Fillpattern", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._error_x.ErrorX", + "._error_y.ErrorY", + "._fillgradient.Fillgradient", + "._fillpattern.Fillpattern", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scatter/_error_x.py b/plotly/graph_objs/scatter/_error_x.py index 60a4663ad0..32a0847cc2 100644 --- a/plotly/graph_objs/scatter/_error_x.py +++ b/plotly/graph_objs/scatter/_error_x.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorX(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.error_x" _valid_props = { @@ -26,8 +27,6 @@ class ErrorX(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -39,7 +38,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -47,8 +46,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -61,7 +58,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -69,8 +66,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -90,8 +85,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -110,8 +103,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -122,42 +113,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +125,6 @@ def color(self): def color(self, val): self["color"] = val - # copy_ystyle - # ----------- @property def copy_ystyle(self): """ @@ -187,8 +141,6 @@ def copy_ystyle(self): def copy_ystyle(self, val): self["copy_ystyle"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -209,8 +161,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -229,8 +179,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -248,8 +196,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -267,13 +213,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -294,8 +238,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -316,8 +258,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -339,8 +279,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -359,8 +297,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -380,8 +316,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -416,7 +350,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -445,21 +379,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + copy_ystyle: bool | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -502,7 +436,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -531,14 +465,11 @@ def __init__( ------- ErrorX """ - super(ErrorX, self).__init__("error_x") - + super().__init__("error_x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -553,78 +484,23 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.ErrorX`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("copy_ystyle", None) - _v = copy_ystyle if copy_ystyle is not None else _v - if _v is not None: - self["copy_ystyle"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("copy_ystyle", arg, copy_ystyle) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_error_y.py b/plotly/graph_objs/scatter/_error_y.py index 6c40ce1c2f..9ae5413a13 100644 --- a/plotly/graph_objs/scatter/_error_y.py +++ b/plotly/graph_objs/scatter/_error_y.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorY(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.error_y" _valid_props = { @@ -25,8 +26,6 @@ class ErrorY(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -38,7 +37,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -46,8 +45,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -60,7 +57,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -68,8 +65,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -89,8 +84,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -109,8 +102,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -121,42 +112,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -168,8 +124,6 @@ def color(self): def color(self, val): self["color"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -190,8 +144,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -210,8 +162,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -229,8 +179,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -248,13 +196,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -275,8 +221,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -297,8 +241,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -320,8 +262,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -340,8 +280,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -361,8 +299,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -395,7 +331,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -424,20 +360,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -478,7 +414,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -507,14 +443,11 @@ def __init__( ------- ErrorY """ - super(ErrorY, self).__init__("error_y") - + super().__init__("error_y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -529,74 +462,22 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.ErrorY`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_fillgradient.py b/plotly/graph_objs/scatter/_fillgradient.py index be66434984..93d2768ab5 100644 --- a/plotly/graph_objs/scatter/_fillgradient.py +++ b/plotly/graph_objs/scatter/_fillgradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Fillgradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.fillgradient" _valid_props = {"colorscale", "start", "stop", "type"} - # colorscale - # ---------- @property def colorscale(self): """ @@ -58,8 +57,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # start - # ----- @property def start(self): """ @@ -83,8 +80,6 @@ def start(self): def start(self, val): self["start"] = val - # stop - # ---- @property def stop(self): """ @@ -108,8 +103,6 @@ def stop(self): def stop(self, val): self["stop"] = val - # type - # ---- @property def type(self): """ @@ -130,8 +123,6 @@ def type(self): def type(self, val): self["type"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -164,7 +155,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, colorscale=None, start=None, stop=None, type=None, **kwargs + self, + arg=None, + colorscale: str | None = None, + start: int | float | None = None, + stop: int | float | None = None, + type: Any | None = None, + **kwargs, ): """ Construct a new Fillgradient object @@ -209,14 +206,11 @@ def __init__( ------- Fillgradient """ - super(Fillgradient, self).__init__("fillgradient") - + super().__init__("fillgradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -231,34 +225,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.Fillgradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("stop", None) - _v = stop if stop is not None else _v - if _v is not None: - self["stop"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("colorscale", arg, colorscale) + self._init_provided("start", arg, start) + self._init_provided("stop", arg, stop) + self._init_provided("type", arg, type) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_fillpattern.py b/plotly/graph_objs/scatter/_fillpattern.py index 4c164136fa..3491e7b9ee 100644 --- a/plotly/graph_objs/scatter/_fillpattern.py +++ b/plotly/graph_objs/scatter/_fillpattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Fillpattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.fillpattern" _valid_props = { @@ -23,8 +24,6 @@ class Fillpattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Fillpattern """ - super(Fillpattern, self).__init__("fillpattern") - + super().__init__("fillpattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.Fillpattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_hoverlabel.py b/plotly/graph_objs/scatter/_hoverlabel.py index 226227c4fa..1bf2feec65 100644 --- a/plotly/graph_objs/scatter/_hoverlabel.py +++ b/plotly/graph_objs/scatter/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatter.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_legendgrouptitle.py b/plotly/graph_objs/scatter/_legendgrouptitle.py index 3616b9bf6f..e9bb02bdb3 100644 --- a/plotly/graph_objs/scatter/_legendgrouptitle.py +++ b/plotly/graph_objs/scatter/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_line.py b/plotly/graph_objs/scatter/_line.py index 3044fc2fcc..616449dddf 100644 --- a/plotly/graph_objs/scatter/_line.py +++ b/plotly/graph_objs/scatter/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.line" _valid_props = { @@ -19,8 +20,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # backoff - # ------- @property def backoff(self): """ @@ -35,7 +34,7 @@ def backoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["backoff"] @@ -43,8 +42,6 @@ def backoff(self): def backoff(self, val): self["backoff"] = val - # backoffsrc - # ---------- @property def backoffsrc(self): """ @@ -63,8 +60,6 @@ def backoffsrc(self): def backoffsrc(self, val): self["backoffsrc"] = val - # color - # ----- @property def color(self): """ @@ -75,42 +70,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -122,8 +82,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -148,8 +106,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # shape - # ----- @property def shape(self): """ @@ -171,8 +127,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # simplify - # -------- @property def simplify(self): """ @@ -194,8 +148,6 @@ def simplify(self): def simplify(self, val): self["simplify"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -216,8 +168,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -236,8 +186,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -277,14 +225,14 @@ def _prop_descriptions(self): def __init__( self, arg=None, - backoff=None, - backoffsrc=None, - color=None, - dash=None, - shape=None, - simplify=None, - smoothing=None, - width=None, + backoff: int | float | None = None, + backoffsrc: str | None = None, + color: str | None = None, + dash: str | None = None, + shape: Any | None = None, + simplify: bool | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -331,14 +279,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -353,50 +298,16 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("backoff", None) - _v = backoff if backoff is not None else _v - if _v is not None: - self["backoff"] = _v - _v = arg.pop("backoffsrc", None) - _v = backoffsrc if backoffsrc is not None else _v - if _v is not None: - self["backoffsrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("simplify", None) - _v = simplify if simplify is not None else _v - if _v is not None: - self["simplify"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("backoff", arg, backoff) + self._init_provided("backoffsrc", arg, backoffsrc) + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("shape", arg, shape) + self._init_provided("simplify", arg, simplify) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_marker.py b/plotly/graph_objs/scatter/_marker.py index f3dd1eb297..72b9d51b83 100644 --- a/plotly/graph_objs/scatter/_marker.py +++ b/plotly/graph_objs/scatter/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.marker" _valid_props = { @@ -40,8 +41,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -54,7 +53,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -62,8 +61,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # angleref - # -------- @property def angleref(self): """ @@ -85,8 +82,6 @@ def angleref(self): def angleref(self, val): self["angleref"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -105,8 +100,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -131,8 +124,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -156,8 +147,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -179,8 +168,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -203,8 +190,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -226,8 +211,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -241,49 +224,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatter.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -291,8 +239,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -318,8 +264,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -329,273 +273,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter.marker.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scatter.marker.ColorBar @@ -606,8 +283,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -660,8 +335,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -680,8 +353,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # gradient - # -------- @property def gradient(self): """ @@ -691,22 +362,6 @@ def gradient(self): - A dict of string/value properties that will be passed to the Gradient constructor - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. - Returns ------- plotly.graph_objs.scatter.marker.Gradient @@ -717,8 +372,6 @@ def gradient(self): def gradient(self, val): self["gradient"] = val - # line - # ---- @property def line(self): """ @@ -728,98 +381,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scatter.marker.Line @@ -830,8 +391,6 @@ def line(self): def line(self, val): self["line"] = val - # maxdisplayed - # ------------ @property def maxdisplayed(self): """ @@ -851,8 +410,6 @@ def maxdisplayed(self): def maxdisplayed(self, val): self["maxdisplayed"] = val - # opacity - # ------- @property def opacity(self): """ @@ -864,7 +421,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -872,8 +429,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -892,8 +447,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -915,8 +468,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -937,8 +488,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -950,7 +499,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -958,8 +507,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -980,8 +527,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1003,8 +548,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1025,8 +568,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -1045,8 +586,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # standoff - # -------- @property def standoff(self): """ @@ -1061,7 +600,7 @@ def standoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["standoff"] @@ -1069,8 +608,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # standoffsrc - # ----------- @property def standoffsrc(self): """ @@ -1089,8 +626,6 @@ def standoffsrc(self): def standoffsrc(self, val): self["standoffsrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1194,7 +729,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1202,8 +737,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1222,8 +755,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1367,35 +898,35 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - angleref=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - standoff=None, - standoffsrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + angleref: Any | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + gradient: None | None = None, + line: None | None = None, + maxdisplayed: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + standoff: int | float | None = None, + standoffsrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1547,14 +1078,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1569,134 +1097,37 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("angleref", None) - _v = angleref if angleref is not None else _v - if _v is not None: - self["angleref"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("gradient", None) - _v = gradient if gradient is not None else _v - if _v is not None: - self["gradient"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxdisplayed", None) - _v = maxdisplayed if maxdisplayed is not None else _v - if _v is not None: - self["maxdisplayed"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("standoffsrc", None) - _v = standoffsrc if standoffsrc is not None else _v - if _v is not None: - self["standoffsrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("angleref", arg, angleref) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("gradient", arg, gradient) + self._init_provided("line", arg, line) + self._init_provided("maxdisplayed", arg, maxdisplayed) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("standoff", arg, standoff) + self._init_provided("standoffsrc", arg, standoffsrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_selected.py b/plotly/graph_objs/scatter/_selected.py index 3d44a1a65a..8e444eabf7 100644 --- a/plotly/graph_objs/scatter/_selected.py +++ b/plotly/graph_objs/scatter/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scatter.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scatter.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_stream.py b/plotly/graph_objs/scatter/_stream.py index 9308720d14..455c1b025d 100644 --- a/plotly/graph_objs/scatter/_stream.py +++ b/plotly/graph_objs/scatter/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_textfont.py b/plotly/graph_objs/scatter/_textfont.py index 543761a304..af856a0b7a 100644 --- a/plotly/graph_objs/scatter/_textfont.py +++ b/plotly/graph_objs/scatter/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/_unselected.py b/plotly/graph_objs/scatter/_unselected.py index b2f8099aa1..e9ffac23a3 100644 --- a/plotly/graph_objs/scatter/_unselected.py +++ b/plotly/graph_objs/scatter/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter" _path_str = "scatter.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatter.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatter.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): t` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/hoverlabel/__init__.py b/plotly/graph_objs/scatter/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter/hoverlabel/__init__.py +++ b/plotly/graph_objs/scatter/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter/hoverlabel/_font.py b/plotly/graph_objs/scatter/hoverlabel/_font.py index 4550c310d9..55b8cce5da 100644 --- a/plotly/graph_objs/scatter/hoverlabel/_font.py +++ b/plotly/graph_objs/scatter/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.hoverlabel" _path_str = "scatter.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/legendgrouptitle/__init__.py b/plotly/graph_objs/scatter/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scatter/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter/legendgrouptitle/_font.py b/plotly/graph_objs/scatter/legendgrouptitle/_font.py index a7c0904326..f34f160321 100644 --- a/plotly/graph_objs/scatter/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatter/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.legendgrouptitle" _path_str = "scatter.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/__init__.py b/plotly/graph_objs/scatter/marker/__init__.py index f1897fb0aa..f9d889ecb9 100644 --- a/plotly/graph_objs/scatter/marker/__init__.py +++ b/plotly/graph_objs/scatter/marker/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._gradient import Gradient - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], +) diff --git a/plotly/graph_objs/scatter/marker/_colorbar.py b/plotly/graph_objs/scatter/marker/_colorbar.py index dc0ff92db9..125717938d 100644 --- a/plotly/graph_objs/scatter/marker/_colorbar.py +++ b/plotly/graph_objs/scatter/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker" _path_str = "scatter.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scatter.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scatter.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scatter.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/_gradient.py b/plotly/graph_objs/scatter/marker/_gradient.py index b20e34c67a..b4b99ff306 100644 --- a/plotly/graph_objs/scatter/marker/_gradient.py +++ b/plotly/graph_objs/scatter/marker/_gradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker" _path_str = "scatter.marker.gradient" _valid_props = {"color", "colorsrc", "type", "typesrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # type - # ---- @property def type(self): """ @@ -105,7 +65,7 @@ def type(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["type"] @@ -113,8 +73,6 @@ def type(self): def type(self, val): self["type"] = val - # typesrc - # ------- @property def typesrc(self): """ @@ -133,8 +91,6 @@ def typesrc(self): def typesrc(self, val): self["typesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -153,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + type: Any | None = None, + typesrc: str | None = None, + **kwargs, ): """ Construct a new Gradient object @@ -181,14 +143,11 @@ def __init__( ------- Gradient """ - super(Gradient, self).__init__("gradient") - + super().__init__("gradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,34 +162,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.marker.Gradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("typesrc", None) - _v = typesrc if typesrc is not None else _v - if _v is not None: - self["typesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("type", arg, type) + self._init_provided("typesrc", arg, typesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/_line.py b/plotly/graph_objs/scatter/marker/_line.py index d845e06789..04ec99800e 100644 --- a/plotly/graph_objs/scatter/marker/_line.py +++ b/plotly/graph_objs/scatter/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker" _path_str = "scatter.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatter.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/colorbar/__init__.py b/plotly/graph_objs/scatter/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scatter/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py index 34e6f9d5e3..eaef301773 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker.colorbar" _path_str = "scatter.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py index 1d1fb7c597..f0e3b0d64a 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scatter/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker.colorbar" _path_str = "scatter.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/colorbar/_title.py b/plotly/graph_objs/scatter/marker/colorbar/_title.py index d4f420caf9..9b0a50d975 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/_title.py +++ b/plotly/graph_objs/scatter/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker.colorbar" _path_str = "scatter.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py b/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scatter/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter/marker/colorbar/title/_font.py b/plotly/graph_objs/scatter/marker/colorbar/title/_font.py index a15f2dfb70..7bf2c4f641 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.marker.colorbar.title" _path_str = "scatter.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/selected/__init__.py b/plotly/graph_objs/scatter/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatter/selected/__init__.py +++ b/plotly/graph_objs/scatter/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatter/selected/_marker.py b/plotly/graph_objs/scatter/selected/_marker.py index bc65de46a8..f578a4591b 100644 --- a/plotly/graph_objs/scatter/selected/_marker.py +++ b/plotly/graph_objs/scatter/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.selected" _path_str = "scatter.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/selected/_textfont.py b/plotly/graph_objs/scatter/selected/_textfont.py index a1ee91470a..ce883aa12f 100644 --- a/plotly/graph_objs/scatter/selected/_textfont.py +++ b/plotly/graph_objs/scatter/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.selected" _path_str = "scatter.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/unselected/__init__.py b/plotly/graph_objs/scatter/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatter/unselected/__init__.py +++ b/plotly/graph_objs/scatter/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatter/unselected/_marker.py b/plotly/graph_objs/scatter/unselected/_marker.py index 3de2a9e417..72144b4f86 100644 --- a/plotly/graph_objs/scatter/unselected/_marker.py +++ b/plotly/graph_objs/scatter/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.unselected" _path_str = "scatter.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter/unselected/_textfont.py b/plotly/graph_objs/scatter/unselected/_textfont.py index 486e02e29c..c7f48d3db9 100644 --- a/plotly/graph_objs/scatter/unselected/_textfont.py +++ b/plotly/graph_objs/scatter/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter.unselected" _path_str = "scatter.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/__init__.py b/plotly/graph_objs/scatter3d/__init__.py index 47dbd27a85..4782838bc4 100644 --- a/plotly/graph_objs/scatter3d/__init__.py +++ b/plotly/graph_objs/scatter3d/__init__.py @@ -1,38 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._error_x import ErrorX - from ._error_y import ErrorY - from ._error_z import ErrorZ - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._projection import Projection - from ._stream import Stream - from ._textfont import Textfont - from . import hoverlabel - from . import legendgrouptitle - from . import line - from . import marker - from . import projection -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".line", ".marker", ".projection"], - [ - "._error_x.ErrorX", - "._error_y.ErrorY", - "._error_z.ErrorZ", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._projection.Projection", - "._stream.Stream", - "._textfont.Textfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".line", ".marker", ".projection"], + [ + "._error_x.ErrorX", + "._error_y.ErrorY", + "._error_z.ErrorZ", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._projection.Projection", + "._stream.Stream", + "._textfont.Textfont", + ], +) diff --git a/plotly/graph_objs/scatter3d/_error_x.py b/plotly/graph_objs/scatter3d/_error_x.py index 7a2abacc6c..12b13280c9 100644 --- a/plotly/graph_objs/scatter3d/_error_x.py +++ b/plotly/graph_objs/scatter3d/_error_x.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorX(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.error_x" _valid_props = { @@ -26,8 +27,6 @@ class ErrorX(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -39,7 +38,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -47,8 +46,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -61,7 +58,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -69,8 +66,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -90,8 +85,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -110,8 +103,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -122,42 +113,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +125,6 @@ def color(self): def color(self, val): self["color"] = val - # copy_zstyle - # ----------- @property def copy_zstyle(self): """ @@ -187,8 +141,6 @@ def copy_zstyle(self): def copy_zstyle(self, val): self["copy_zstyle"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -209,8 +161,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -229,8 +179,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -248,8 +196,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -267,13 +213,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -294,8 +238,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -316,8 +258,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -339,8 +279,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -359,8 +297,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -380,8 +316,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -416,7 +350,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -445,21 +379,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_zstyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + copy_zstyle: bool | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -502,7 +436,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -531,14 +465,11 @@ def __init__( ------- ErrorX """ - super(ErrorX, self).__init__("error_x") - + super().__init__("error_x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -553,78 +484,23 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.ErrorX`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("copy_zstyle", None) - _v = copy_zstyle if copy_zstyle is not None else _v - if _v is not None: - self["copy_zstyle"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("copy_zstyle", arg, copy_zstyle) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_error_y.py b/plotly/graph_objs/scatter3d/_error_y.py index 6e011a401d..09fe9c0338 100644 --- a/plotly/graph_objs/scatter3d/_error_y.py +++ b/plotly/graph_objs/scatter3d/_error_y.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorY(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.error_y" _valid_props = { @@ -26,8 +27,6 @@ class ErrorY(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -39,7 +38,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -47,8 +46,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -61,7 +58,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -69,8 +66,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -90,8 +85,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -110,8 +103,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -122,42 +113,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +125,6 @@ def color(self): def color(self, val): self["color"] = val - # copy_zstyle - # ----------- @property def copy_zstyle(self): """ @@ -187,8 +141,6 @@ def copy_zstyle(self): def copy_zstyle(self, val): self["copy_zstyle"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -209,8 +161,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -229,8 +179,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -248,8 +196,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -267,13 +213,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -294,8 +238,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -316,8 +258,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -339,8 +279,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -359,8 +297,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -380,8 +316,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -416,7 +350,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -445,21 +379,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_zstyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + copy_zstyle: bool | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -502,7 +436,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -531,14 +465,11 @@ def __init__( ------- ErrorY """ - super(ErrorY, self).__init__("error_y") - + super().__init__("error_y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -553,78 +484,23 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.ErrorY`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("copy_zstyle", None) - _v = copy_zstyle if copy_zstyle is not None else _v - if _v is not None: - self["copy_zstyle"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("copy_zstyle", arg, copy_zstyle) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_error_z.py b/plotly/graph_objs/scatter3d/_error_z.py index 961f07cac0..e48c75f43a 100644 --- a/plotly/graph_objs/scatter3d/_error_z.py +++ b/plotly/graph_objs/scatter3d/_error_z.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorZ(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.error_z" _valid_props = { @@ -25,8 +26,6 @@ class ErrorZ(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -38,7 +37,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -46,8 +45,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -60,7 +57,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -68,8 +65,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -89,8 +84,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -109,8 +102,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -121,42 +112,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -168,8 +124,6 @@ def color(self): def color(self, val): self["color"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -190,8 +144,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -210,8 +162,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -229,8 +179,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -248,13 +196,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -275,8 +221,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -297,8 +241,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -320,8 +262,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -340,8 +280,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -361,8 +299,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -395,7 +331,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -424,20 +360,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -478,7 +414,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -507,14 +443,11 @@ def __init__( ------- ErrorZ """ - super(ErrorZ, self).__init__("error_z") - + super().__init__("error_z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -529,74 +462,22 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.ErrorZ`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_hoverlabel.py b/plotly/graph_objs/scatter3d/_hoverlabel.py index db24a5c766..882d802c43 100644 --- a/plotly/graph_objs/scatter3d/_hoverlabel.py +++ b/plotly/graph_objs/scatter3d/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatter3d.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_legendgrouptitle.py b/plotly/graph_objs/scatter3d/_legendgrouptitle.py index 48507d5d80..832bda9b28 100644 --- a/plotly/graph_objs/scatter3d/_legendgrouptitle.py +++ b/plotly/graph_objs/scatter3d/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter3d.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_line.py b/plotly/graph_objs/scatter3d/_line.py index 3005090f81..8924aba832 100644 --- a/plotly/graph_objs/scatter3d/_line.py +++ b/plotly/graph_objs/scatter3d/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.line" _valid_props = { @@ -25,8 +26,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -51,8 +50,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -75,8 +72,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -98,8 +93,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatter3d.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -248,273 +198,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter3d.line.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.line.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scatter3d.line.ColorBar @@ -525,8 +208,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -579,8 +260,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -599,8 +278,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # dash - # ---- @property def dash(self): """ @@ -621,8 +298,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -644,8 +319,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -666,8 +339,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # width - # ----- @property def width(self): """ @@ -686,8 +357,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -776,20 +445,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - dash=None, - reversescale=None, - showscale=None, - width=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + dash: Any | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -886,14 +555,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -908,74 +574,22 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("dash", arg, dash) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_marker.py b/plotly/graph_objs/scatter3d/_marker.py index 36d86b9fda..51243b9c88 100644 --- a/plotly/graph_objs/scatter3d/_marker.py +++ b/plotly/graph_objs/scatter3d/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.marker" _valid_props = { @@ -32,8 +33,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -58,8 +57,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -83,8 +80,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -106,8 +101,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -130,8 +123,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -153,8 +144,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -168,49 +157,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatter3d.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -218,8 +172,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -245,8 +197,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -256,273 +206,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scatter3d.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.marker.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scatter3d.marker.ColorBar @@ -533,8 +216,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -587,8 +268,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -607,8 +286,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # line - # ---- @property def line(self): """ @@ -618,95 +295,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - Returns ------- plotly.graph_objs.scatter3d.marker.Line @@ -717,8 +305,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -741,8 +327,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -764,8 +348,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -786,8 +368,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -799,7 +379,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -807,8 +387,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -829,8 +407,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -852,8 +428,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -874,8 +448,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -894,8 +466,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -909,7 +479,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -917,8 +487,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -937,8 +505,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1055,27 +621,27 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1200,14 +766,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1222,102 +785,29 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_projection.py b/plotly/graph_objs/scatter3d/_projection.py index 3b34ae5f6d..462fbd164d 100644 --- a/plotly/graph_objs/scatter3d/_projection.py +++ b/plotly/graph_objs/scatter3d/_projection.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Projection(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.projection" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -21,17 +20,6 @@ def x(self): - A dict of string/value properties that will be passed to the X constructor - Supported dict properties: - - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the x axis. - Returns ------- plotly.graph_objs.scatter3d.projection.X @@ -42,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -53,17 +39,6 @@ def y(self): - A dict of string/value properties that will be passed to the Y constructor - Supported dict properties: - - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the y axis. - Returns ------- plotly.graph_objs.scatter3d.projection.Y @@ -74,8 +49,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -85,17 +58,6 @@ def z(self): - A dict of string/value properties that will be passed to the Z constructor - Supported dict properties: - - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the z axis. - Returns ------- plotly.graph_objs.scatter3d.projection.Z @@ -106,8 +68,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +82,14 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: None | None = None, + y: None | None = None, + z: None | None = None, + **kwargs, + ): """ Construct a new Projection object @@ -146,14 +113,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Projection """ - super(Projection, self).__init__("projection") - + super().__init__("projection") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -168,30 +132,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.Projection`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_stream.py b/plotly/graph_objs/scatter3d/_stream.py index f1f3adf613..c75f78f15b 100644 --- a/plotly/graph_objs/scatter3d/_stream.py +++ b/plotly/graph_objs/scatter3d/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/_textfont.py b/plotly/graph_objs/scatter3d/_textfont.py index 6e931a0181..05af73f8e4 100644 --- a/plotly/graph_objs/scatter3d/_textfont.py +++ b/plotly/graph_objs/scatter3d/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d" _path_str = "scatter3d.textfont" _valid_props = { @@ -23,8 +24,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -33,47 +32,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -101,23 +63,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -125,7 +78,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -133,8 +86,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -153,8 +104,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # size - # ---- @property def size(self): """ @@ -164,7 +113,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -172,8 +121,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -192,8 +139,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -207,7 +152,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -215,8 +160,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -235,8 +178,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -249,7 +190,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -257,8 +198,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -277,8 +216,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -292,7 +229,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -300,8 +237,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -320,8 +255,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -332,18 +265,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -373,18 +299,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -405,18 +331,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -446,14 +365,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -468,66 +384,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/hoverlabel/__init__.py b/plotly/graph_objs/scatter3d/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter3d/hoverlabel/__init__.py +++ b/plotly/graph_objs/scatter3d/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter3d/hoverlabel/_font.py b/plotly/graph_objs/scatter3d/hoverlabel/_font.py index a3dd6d32e3..f984efcc44 100644 --- a/plotly/graph_objs/scatter3d/hoverlabel/_font.py +++ b/plotly/graph_objs/scatter3d/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.hoverlabel" _path_str = "scatter3d.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/legendgrouptitle/__init__.py b/plotly/graph_objs/scatter3d/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter3d/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scatter3d/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py b/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py index dc518d92cb..c2344637a1 100644 --- a/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.legendgrouptitle" _path_str = "scatter3d.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/line/__init__.py b/plotly/graph_objs/scatter3d/line/__init__.py index 27dfc9e52f..5e1805d8fa 100644 --- a/plotly/graph_objs/scatter3d/line/__init__.py +++ b/plotly/graph_objs/scatter3d/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] +) diff --git a/plotly/graph_objs/scatter3d/line/_colorbar.py b/plotly/graph_objs/scatter3d/line/_colorbar.py index d987d717ba..065ff41311 100644 --- a/plotly/graph_objs/scatter3d/line/_colorbar.py +++ b/plotly/graph_objs/scatter3d/line/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.line" _path_str = "scatter3d.line.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter3d.line.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scatter3d.line.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.line.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/line/colorbar/__init__.py b/plotly/graph_objs/scatter3d/line/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/__init__.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py b/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py index 8515f8dbef..4d0fbae0fb 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.line.colorbar" _path_str = "scatter3d.line.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py b/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py index 04e9d2fa7b..9de78cf6d6 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.line.colorbar" _path_str = "scatter3d.line.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/line/colorbar/_title.py b/plotly/graph_objs/scatter3d/line/colorbar/_title.py index 3483e9e4a6..a50332b667 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/_title.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.line.colorbar" _path_str = "scatter3d.line.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter3d.line.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py b/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py b/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py index a98fdfd8b2..25ca6b36c9 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.line.colorbar.title" _path_str = "scatter3d.line.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.line.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/marker/__init__.py b/plotly/graph_objs/scatter3d/marker/__init__.py index 8481520e3c..ff536ec8b2 100644 --- a/plotly/graph_objs/scatter3d/marker/__init__.py +++ b/plotly/graph_objs/scatter3d/marker/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] +) diff --git a/plotly/graph_objs/scatter3d/marker/_colorbar.py b/plotly/graph_objs/scatter3d/marker/_colorbar.py index 19904e5845..22995f51f9 100644 --- a/plotly/graph_objs/scatter3d/marker/_colorbar.py +++ b/plotly/graph_objs/scatter3d/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.marker" _path_str = "scatter3d.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter3d.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scatter3d.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/marker/_line.py b/plotly/graph_objs/scatter3d/marker/_line.py index bf7ebcf385..2eeaa7d795 100644 --- a/plotly/graph_objs/scatter3d/marker/_line.py +++ b/plotly/graph_objs/scatter3d/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.marker" _path_str = "scatter3d.marker.line" _valid_props = { @@ -22,8 +23,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -48,8 +47,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -73,8 +70,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -96,8 +91,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -121,8 +114,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -144,8 +135,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -159,49 +148,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatter3d.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -209,8 +163,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -236,8 +188,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -291,8 +241,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -311,8 +259,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -335,8 +281,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -355,8 +299,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -440,17 +382,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -542,14 +484,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -564,62 +503,19 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py b/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py index 725d247cb5..b1fff9657c 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.marker.colorbar" _path_str = "scatter3d.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py index f953773650..1077bffb71 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.marker.colorbar" _path_str = "scatter3d.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/_title.py b/plotly/graph_objs/scatter3d/marker/colorbar/_title.py index c048363a0c..59c85838c3 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/_title.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.marker.colorbar" _path_str = "scatter3d.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatter3d.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py b/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py b/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py index 1da6442303..50cf5e0c31 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.marker.colorbar.title" _path_str = "scatter3d.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatter3d.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/projection/__init__.py b/plotly/graph_objs/scatter3d/projection/__init__.py index b7c5709451..649c038369 100644 --- a/plotly/graph_objs/scatter3d/projection/__init__.py +++ b/plotly/graph_objs/scatter3d/projection/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._x import X - from ._y import Y - from ._z import Z -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._x.X", "._y.Y", "._z.Z"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._x.X", "._y.Y", "._z.Z"] +) diff --git a/plotly/graph_objs/scatter3d/projection/_x.py b/plotly/graph_objs/scatter3d/projection/_x.py index 28728a3c8d..4fce667315 100644 --- a/plotly/graph_objs/scatter3d/projection/_x.py +++ b/plotly/graph_objs/scatter3d/projection/_x.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.projection" _path_str = "scatter3d.projection.x" _valid_props = {"opacity", "scale", "show"} - # opacity - # ------- @property def opacity(self): """ @@ -30,8 +29,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # scale - # ----- @property def scale(self): """ @@ -51,8 +48,6 @@ def scale(self): def scale(self, val): self["scale"] = val - # show - # ---- @property def show(self): """ @@ -71,8 +66,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): axis. """ - def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): + def __init__( + self, + arg=None, + opacity: int | float | None = None, + scale: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new X object @@ -109,14 +109,11 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): ------- X """ - super(X, self).__init__("x") - + super().__init__("x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -131,30 +128,11 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.projection.X`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("scale", None) - _v = scale if scale is not None else _v - if _v is not None: - self["scale"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) + self._init_provided("scale", arg, scale) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/projection/_y.py b/plotly/graph_objs/scatter3d/projection/_y.py index b36d3902c3..7bdd765bd8 100644 --- a/plotly/graph_objs/scatter3d/projection/_y.py +++ b/plotly/graph_objs/scatter3d/projection/_y.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.projection" _path_str = "scatter3d.projection.y" _valid_props = {"opacity", "scale", "show"} - # opacity - # ------- @property def opacity(self): """ @@ -30,8 +29,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # scale - # ----- @property def scale(self): """ @@ -51,8 +48,6 @@ def scale(self): def scale(self, val): self["scale"] = val - # show - # ---- @property def show(self): """ @@ -71,8 +66,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): axis. """ - def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): + def __init__( + self, + arg=None, + opacity: int | float | None = None, + scale: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Y object @@ -109,14 +109,11 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): ------- Y """ - super(Y, self).__init__("y") - + super().__init__("y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -131,30 +128,11 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.projection.Y`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("scale", None) - _v = scale if scale is not None else _v - if _v is not None: - self["scale"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) + self._init_provided("scale", arg, scale) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatter3d/projection/_z.py b/plotly/graph_objs/scatter3d/projection/_z.py index 5ca5e519e8..1dbedc9dd1 100644 --- a/plotly/graph_objs/scatter3d/projection/_z.py +++ b/plotly/graph_objs/scatter3d/projection/_z.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Z(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatter3d.projection" _path_str = "scatter3d.projection.z" _valid_props = {"opacity", "scale", "show"} - # opacity - # ------- @property def opacity(self): """ @@ -30,8 +29,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # scale - # ----- @property def scale(self): """ @@ -51,8 +48,6 @@ def scale(self): def scale(self, val): self["scale"] = val - # show - # ---- @property def show(self): """ @@ -71,8 +66,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): axis. """ - def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): + def __init__( + self, + arg=None, + opacity: int | float | None = None, + scale: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Z object @@ -109,14 +109,11 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): ------- Z """ - super(Z, self).__init__("z") - + super().__init__("z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -131,30 +128,11 @@ def __init__(self, arg=None, opacity=None, scale=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.scatter3d.projection.Z`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("scale", None) - _v = scale if scale is not None else _v - if _v is not None: - self["scale"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) + self._init_provided("scale", arg, scale) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/__init__.py b/plotly/graph_objs/scattercarpet/__init__.py index 382e87019f..7cc31d4831 100644 --- a/plotly/graph_objs/scattercarpet/__init__.py +++ b/plotly/graph_objs/scattercarpet/__init__.py @@ -1,34 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scattercarpet/_hoverlabel.py b/plotly/graph_objs/scattercarpet/_hoverlabel.py index d8a228b5bf..bc6db96e45 100644 --- a/plotly/graph_objs/scattercarpet/_hoverlabel.py +++ b/plotly/graph_objs/scattercarpet/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattercarpet.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_legendgrouptitle.py b/plotly/graph_objs/scattercarpet/_legendgrouptitle.py index 0ef210fb5c..d0a182d68c 100644 --- a/plotly/graph_objs/scattercarpet/_legendgrouptitle.py +++ b/plotly/graph_objs/scattercarpet/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattercarpet.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_line.py b/plotly/graph_objs/scattercarpet/_line.py index e90e05f8f8..401fc17dc5 100644 --- a/plotly/graph_objs/scattercarpet/_line.py +++ b/plotly/graph_objs/scattercarpet/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.line" _valid_props = { @@ -18,8 +19,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # backoff - # ------- @property def backoff(self): """ @@ -34,7 +33,7 @@ def backoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["backoff"] @@ -42,8 +41,6 @@ def backoff(self): def backoff(self, val): self["backoff"] = val - # backoffsrc - # ---------- @property def backoffsrc(self): """ @@ -62,8 +59,6 @@ def backoffsrc(self): def backoffsrc(self, val): self["backoffsrc"] = val - # color - # ----- @property def color(self): """ @@ -74,42 +69,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -121,8 +81,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -147,8 +105,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # shape - # ----- @property def shape(self): """ @@ -170,8 +126,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -192,8 +146,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -212,8 +164,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -248,13 +198,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - backoff=None, - backoffsrc=None, - color=None, - dash=None, - shape=None, - smoothing=None, - width=None, + backoff: int | float | None = None, + backoffsrc: str | None = None, + color: str | None = None, + dash: str | None = None, + shape: Any | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -297,14 +247,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -319,46 +266,15 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("backoff", None) - _v = backoff if backoff is not None else _v - if _v is not None: - self["backoff"] = _v - _v = arg.pop("backoffsrc", None) - _v = backoffsrc if backoffsrc is not None else _v - if _v is not None: - self["backoffsrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("backoff", arg, backoff) + self._init_provided("backoffsrc", arg, backoffsrc) + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("shape", arg, shape) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_marker.py b/plotly/graph_objs/scattercarpet/_marker.py index 1d1e05bd35..7c0850f6d7 100644 --- a/plotly/graph_objs/scattercarpet/_marker.py +++ b/plotly/graph_objs/scattercarpet/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.marker" _valid_props = { @@ -40,8 +41,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -54,7 +53,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -62,8 +61,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # angleref - # -------- @property def angleref(self): """ @@ -85,8 +82,6 @@ def angleref(self): def angleref(self, val): self["angleref"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -105,8 +100,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -131,8 +124,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -156,8 +147,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -179,8 +168,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -203,8 +190,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -226,8 +211,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -241,49 +224,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattercarpet.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -291,8 +239,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -318,8 +264,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -329,273 +273,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - carpet.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattercarpet.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattercarpet.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattercarpet.mark - er.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scattercarpet.marker.ColorBar @@ -606,8 +283,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -660,8 +335,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -680,8 +353,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # gradient - # -------- @property def gradient(self): """ @@ -691,22 +362,6 @@ def gradient(self): - A dict of string/value properties that will be passed to the Gradient constructor - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. - Returns ------- plotly.graph_objs.scattercarpet.marker.Gradient @@ -717,8 +372,6 @@ def gradient(self): def gradient(self, val): self["gradient"] = val - # line - # ---- @property def line(self): """ @@ -728,98 +381,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scattercarpet.marker.Line @@ -830,8 +391,6 @@ def line(self): def line(self, val): self["line"] = val - # maxdisplayed - # ------------ @property def maxdisplayed(self): """ @@ -851,8 +410,6 @@ def maxdisplayed(self): def maxdisplayed(self, val): self["maxdisplayed"] = val - # opacity - # ------- @property def opacity(self): """ @@ -864,7 +421,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -872,8 +429,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -892,8 +447,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -915,8 +468,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -937,8 +488,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -950,7 +499,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -958,8 +507,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -980,8 +527,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1003,8 +548,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1025,8 +568,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -1045,8 +586,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # standoff - # -------- @property def standoff(self): """ @@ -1061,7 +600,7 @@ def standoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["standoff"] @@ -1069,8 +608,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # standoffsrc - # ----------- @property def standoffsrc(self): """ @@ -1089,8 +626,6 @@ def standoffsrc(self): def standoffsrc(self, val): self["standoffsrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1194,7 +729,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1202,8 +737,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1222,8 +755,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1367,35 +898,35 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - angleref=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - standoff=None, - standoffsrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + angleref: Any | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + gradient: None | None = None, + line: None | None = None, + maxdisplayed: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + standoff: int | float | None = None, + standoffsrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1547,14 +1078,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1569,134 +1097,37 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("angleref", None) - _v = angleref if angleref is not None else _v - if _v is not None: - self["angleref"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("gradient", None) - _v = gradient if gradient is not None else _v - if _v is not None: - self["gradient"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxdisplayed", None) - _v = maxdisplayed if maxdisplayed is not None else _v - if _v is not None: - self["maxdisplayed"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("standoffsrc", None) - _v = standoffsrc if standoffsrc is not None else _v - if _v is not None: - self["standoffsrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("angleref", arg, angleref) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("gradient", arg, gradient) + self._init_provided("line", arg, line) + self._init_provided("maxdisplayed", arg, maxdisplayed) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("standoff", arg, standoff) + self._init_provided("standoffsrc", arg, standoffsrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_selected.py b/plotly/graph_objs/scattercarpet/_selected.py index f304c520ea..e7ea525ba0 100644 --- a/plotly/graph_objs/scattercarpet/_selected.py +++ b/plotly/graph_objs/scattercarpet/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scattercarpet.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scattercarpet.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): tfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_stream.py b/plotly/graph_objs/scattercarpet/_stream.py index bc4d38873d..cbbd9da417 100644 --- a/plotly/graph_objs/scattercarpet/_stream.py +++ b/plotly/graph_objs/scattercarpet/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_textfont.py b/plotly/graph_objs/scattercarpet/_textfont.py index 480d5806bb..02eb3f3f99 100644 --- a/plotly/graph_objs/scattercarpet/_textfont.py +++ b/plotly/graph_objs/scattercarpet/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/_unselected.py b/plotly/graph_objs/scattercarpet/_unselected.py index 1542019237..143adba79c 100644 --- a/plotly/graph_objs/scattercarpet/_unselected.py +++ b/plotly/graph_objs/scattercarpet/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet" _path_str = "scattercarpet.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattercarpet.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattercarpet.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): extfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py b/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py +++ b/plotly/graph_objs/scattercarpet/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattercarpet/hoverlabel/_font.py b/plotly/graph_objs/scattercarpet/hoverlabel/_font.py index 1f5f52ddba..97f57c75b7 100644 --- a/plotly/graph_objs/scattercarpet/hoverlabel/_font.py +++ b/plotly/graph_objs/scattercarpet/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.hoverlabel" _path_str = "scattercarpet.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/legendgrouptitle/__init__.py b/plotly/graph_objs/scattercarpet/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattercarpet/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scattercarpet/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py b/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py index 0f72cb4373..82b5a12817 100644 --- a/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.legendgrouptitle" _path_str = "scattercarpet.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/__init__.py b/plotly/graph_objs/scattercarpet/marker/__init__.py index f1897fb0aa..f9d889ecb9 100644 --- a/plotly/graph_objs/scattercarpet/marker/__init__.py +++ b/plotly/graph_objs/scattercarpet/marker/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._gradient import Gradient - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], +) diff --git a/plotly/graph_objs/scattercarpet/marker/_colorbar.py b/plotly/graph_objs/scattercarpet/marker/_colorbar.py index 6b7cd89da4..757e816d3b 100644 --- a/plotly/graph_objs/scattercarpet/marker/_colorbar.py +++ b/plotly/graph_objs/scattercarpet/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker" _path_str = "scattercarpet.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scattercarpet.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/_gradient.py b/plotly/graph_objs/scattercarpet/marker/_gradient.py index e1d631261b..eaaa4c8eb9 100644 --- a/plotly/graph_objs/scattercarpet/marker/_gradient.py +++ b/plotly/graph_objs/scattercarpet/marker/_gradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker" _path_str = "scattercarpet.marker.gradient" _valid_props = {"color", "colorsrc", "type", "typesrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # type - # ---- @property def type(self): """ @@ -105,7 +65,7 @@ def type(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["type"] @@ -113,8 +73,6 @@ def type(self): def type(self, val): self["type"] = val - # typesrc - # ------- @property def typesrc(self): """ @@ -133,8 +91,6 @@ def typesrc(self): def typesrc(self, val): self["typesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -153,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + type: Any | None = None, + typesrc: str | None = None, + **kwargs, ): """ Construct a new Gradient object @@ -181,14 +143,11 @@ def __init__( ------- Gradient """ - super(Gradient, self).__init__("gradient") - + super().__init__("gradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,34 +162,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.marker.Gradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("typesrc", None) - _v = typesrc if typesrc is not None else _v - if _v is not None: - self["typesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("type", arg, type) + self._init_provided("typesrc", arg, typesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/_line.py b/plotly/graph_objs/scattercarpet/marker/_line.py index 55baf406f2..240f09c647 100644 --- a/plotly/graph_objs/scattercarpet/marker/_line.py +++ b/plotly/graph_objs/scattercarpet/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker" _path_str = "scattercarpet.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattercarpet.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py b/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py index e21f9eba0d..a43ab2d3ff 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker.colorbar" _path_str = "scattercarpet.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py index 1d6a29ee8f..3d0625a783 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker.colorbar" _path_str = "scattercarpet.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py b/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py index 537a7994e5..e18c8d89ce 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker.colorbar" _path_str = "scattercarpet.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattercarpet.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py b/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py b/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py index 7df5a819af..9a650b8475 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.marker.colorbar.title" _path_str = "scattercarpet.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattercarpet.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/selected/__init__.py b/plotly/graph_objs/scattercarpet/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattercarpet/selected/__init__.py +++ b/plotly/graph_objs/scattercarpet/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattercarpet/selected/_marker.py b/plotly/graph_objs/scattercarpet/selected/_marker.py index 1b24f8856f..6ec98bd9d4 100644 --- a/plotly/graph_objs/scattercarpet/selected/_marker.py +++ b/plotly/graph_objs/scattercarpet/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.selected" _path_str = "scattercarpet.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/selected/_textfont.py b/plotly/graph_objs/scattercarpet/selected/_textfont.py index 0b33101065..dc5e22c104 100644 --- a/plotly/graph_objs/scattercarpet/selected/_textfont.py +++ b/plotly/graph_objs/scattercarpet/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.selected" _path_str = "scattercarpet.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/unselected/__init__.py b/plotly/graph_objs/scattercarpet/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattercarpet/unselected/__init__.py +++ b/plotly/graph_objs/scattercarpet/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattercarpet/unselected/_marker.py b/plotly/graph_objs/scattercarpet/unselected/_marker.py index 5d0b8a5d0d..75d3b8580a 100644 --- a/plotly/graph_objs/scattercarpet/unselected/_marker.py +++ b/plotly/graph_objs/scattercarpet/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.unselected" _path_str = "scattercarpet.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattercarpet/unselected/_textfont.py b/plotly/graph_objs/scattercarpet/unselected/_textfont.py index 95209e1791..731dcd33d2 100644 --- a/plotly/graph_objs/scattercarpet/unselected/_textfont.py +++ b/plotly/graph_objs/scattercarpet/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattercarpet.unselected" _path_str = "scattercarpet.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattercarpet.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/__init__.py b/plotly/graph_objs/scattergeo/__init__.py index 382e87019f..7cc31d4831 100644 --- a/plotly/graph_objs/scattergeo/__init__.py +++ b/plotly/graph_objs/scattergeo/__init__.py @@ -1,34 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scattergeo/_hoverlabel.py b/plotly/graph_objs/scattergeo/_hoverlabel.py index 50bc99f007..b2c84740ec 100644 --- a/plotly/graph_objs/scattergeo/_hoverlabel.py +++ b/plotly/graph_objs/scattergeo/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattergeo.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_legendgrouptitle.py b/plotly/graph_objs/scattergeo/_legendgrouptitle.py index 128be95b35..2b40b75d91 100644 --- a/plotly/graph_objs/scattergeo/_legendgrouptitle.py +++ b/plotly/graph_objs/scattergeo/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattergeo.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_line.py b/plotly/graph_objs/scattergeo/_line.py index 7567b73249..583c8cb941 100644 --- a/plotly/graph_objs/scattergeo/_line.py +++ b/plotly/graph_objs/scattergeo/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_marker.py b/plotly/graph_objs/scattergeo/_marker.py index ac1ea83374..e49cf06849 100644 --- a/plotly/graph_objs/scattergeo/_marker.py +++ b/plotly/graph_objs/scattergeo/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.marker" _valid_props = { @@ -39,8 +40,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -53,7 +52,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -61,8 +60,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # angleref - # -------- @property def angleref(self): """ @@ -86,8 +83,6 @@ def angleref(self): def angleref(self, val): self["angleref"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -106,8 +101,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -132,8 +125,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -157,8 +148,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -180,8 +169,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -204,8 +191,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -227,8 +212,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -242,49 +225,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattergeo.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -292,8 +240,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -319,8 +265,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -330,273 +274,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - geo.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergeo.marker.colorbar.tickformatstopdefa - ults), sets the default property values to use - for elements of - scattergeo.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergeo.marker. - colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scattergeo.marker.ColorBar @@ -607,8 +284,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -661,8 +336,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -681,8 +354,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # gradient - # -------- @property def gradient(self): """ @@ -692,22 +363,6 @@ def gradient(self): - A dict of string/value properties that will be passed to the Gradient constructor - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. - Returns ------- plotly.graph_objs.scattergeo.marker.Gradient @@ -718,8 +373,6 @@ def gradient(self): def gradient(self, val): self["gradient"] = val - # line - # ---- @property def line(self): """ @@ -729,98 +382,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scattergeo.marker.Line @@ -831,8 +392,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -844,7 +403,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -852,8 +411,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -872,8 +429,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -895,8 +450,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -917,8 +470,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -930,7 +481,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -938,8 +489,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -960,8 +509,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -983,8 +530,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1005,8 +550,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -1025,8 +568,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # standoff - # -------- @property def standoff(self): """ @@ -1041,7 +582,7 @@ def standoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["standoff"] @@ -1049,8 +590,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # standoffsrc - # ----------- @property def standoffsrc(self): """ @@ -1069,8 +608,6 @@ def standoffsrc(self): def standoffsrc(self, val): self["standoffsrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1174,7 +711,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1182,8 +719,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1202,8 +737,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1345,34 +878,34 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - angleref=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - standoff=None, - standoffsrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + angleref: Any | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + gradient: None | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + standoff: int | float | None = None, + standoffsrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1522,14 +1055,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1544,130 +1074,36 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("angleref", None) - _v = angleref if angleref is not None else _v - if _v is not None: - self["angleref"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("gradient", None) - _v = gradient if gradient is not None else _v - if _v is not None: - self["gradient"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("standoffsrc", None) - _v = standoffsrc if standoffsrc is not None else _v - if _v is not None: - self["standoffsrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("angleref", arg, angleref) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("gradient", arg, gradient) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("standoff", arg, standoff) + self._init_provided("standoffsrc", arg, standoffsrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_selected.py b/plotly/graph_objs/scattergeo/_selected.py index c1277c1ae2..7645e0975e 100644 --- a/plotly/graph_objs/scattergeo/_selected.py +++ b/plotly/graph_objs/scattergeo/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scattergeo.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scattergeo.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): nt` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_stream.py b/plotly/graph_objs/scattergeo/_stream.py index fafa62d627..4c13f1357c 100644 --- a/plotly/graph_objs/scattergeo/_stream.py +++ b/plotly/graph_objs/scattergeo/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_textfont.py b/plotly/graph_objs/scattergeo/_textfont.py index 4c35690599..b8f947c249 100644 --- a/plotly/graph_objs/scattergeo/_textfont.py +++ b/plotly/graph_objs/scattergeo/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/_unselected.py b/plotly/graph_objs/scattergeo/_unselected.py index 5925e30352..1bcabb498e 100644 --- a/plotly/graph_objs/scattergeo/_unselected.py +++ b/plotly/graph_objs/scattergeo/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo" _path_str = "scattergeo.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattergeo.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattergeo.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): font` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/hoverlabel/__init__.py b/plotly/graph_objs/scattergeo/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattergeo/hoverlabel/__init__.py +++ b/plotly/graph_objs/scattergeo/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattergeo/hoverlabel/_font.py b/plotly/graph_objs/scattergeo/hoverlabel/_font.py index c3e1ef39d0..a176ba9a70 100644 --- a/plotly/graph_objs/scattergeo/hoverlabel/_font.py +++ b/plotly/graph_objs/scattergeo/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.hoverlabel" _path_str = "scattergeo.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/legendgrouptitle/__init__.py b/plotly/graph_objs/scattergeo/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattergeo/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scattergeo/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py b/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py index 0de9e4179c..00b7baa58a 100644 --- a/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.legendgrouptitle" _path_str = "scattergeo.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/__init__.py b/plotly/graph_objs/scattergeo/marker/__init__.py index f1897fb0aa..f9d889ecb9 100644 --- a/plotly/graph_objs/scattergeo/marker/__init__.py +++ b/plotly/graph_objs/scattergeo/marker/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._gradient import Gradient - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], +) diff --git a/plotly/graph_objs/scattergeo/marker/_colorbar.py b/plotly/graph_objs/scattergeo/marker/_colorbar.py index 7751a1ac29..cc61ce60ff 100644 --- a/plotly/graph_objs/scattergeo/marker/_colorbar.py +++ b/plotly/graph_objs/scattergeo/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker" _path_str = "scattergeo.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattergeo.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scattergeo.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/_gradient.py b/plotly/graph_objs/scattergeo/marker/_gradient.py index 9da07fb17f..51125c7462 100644 --- a/plotly/graph_objs/scattergeo/marker/_gradient.py +++ b/plotly/graph_objs/scattergeo/marker/_gradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker" _path_str = "scattergeo.marker.gradient" _valid_props = {"color", "colorsrc", "type", "typesrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # type - # ---- @property def type(self): """ @@ -105,7 +65,7 @@ def type(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["type"] @@ -113,8 +73,6 @@ def type(self): def type(self, val): self["type"] = val - # typesrc - # ------- @property def typesrc(self): """ @@ -133,8 +91,6 @@ def typesrc(self): def typesrc(self, val): self["typesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -153,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + type: Any | None = None, + typesrc: str | None = None, + **kwargs, ): """ Construct a new Gradient object @@ -181,14 +143,11 @@ def __init__( ------- Gradient """ - super(Gradient, self).__init__("gradient") - + super().__init__("gradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,34 +162,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.marker.Gradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("typesrc", None) - _v = typesrc if typesrc is not None else _v - if _v is not None: - self["typesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("type", arg, type) + self._init_provided("typesrc", arg, typesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/_line.py b/plotly/graph_objs/scattergeo/marker/_line.py index 59ba236da4..a92a744949 100644 --- a/plotly/graph_objs/scattergeo/marker/_line.py +++ b/plotly/graph_objs/scattergeo/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker" _path_str = "scattergeo.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattergeo.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py b/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py index ab7398f6c3..faec3f3997 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker.colorbar" _path_str = "scattergeo.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py index 8f39cd0d14..0964219b3f 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker.colorbar" _path_str = "scattergeo.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/_title.py b/plotly/graph_objs/scattergeo/marker/colorbar/_title.py index 6194cbbed4..88c9a13392 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/_title.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker.colorbar" _path_str = "scattergeo.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattergeo.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py b/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py b/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py index 600b1baf02..bc7b891e74 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.marker.colorbar.title" _path_str = "scattergeo.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergeo.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/selected/__init__.py b/plotly/graph_objs/scattergeo/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattergeo/selected/__init__.py +++ b/plotly/graph_objs/scattergeo/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattergeo/selected/_marker.py b/plotly/graph_objs/scattergeo/selected/_marker.py index 3d1b18e39b..90432971bc 100644 --- a/plotly/graph_objs/scattergeo/selected/_marker.py +++ b/plotly/graph_objs/scattergeo/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.selected" _path_str = "scattergeo.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/selected/_textfont.py b/plotly/graph_objs/scattergeo/selected/_textfont.py index dc54217841..e40700f824 100644 --- a/plotly/graph_objs/scattergeo/selected/_textfont.py +++ b/plotly/graph_objs/scattergeo/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.selected" _path_str = "scattergeo.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/unselected/__init__.py b/plotly/graph_objs/scattergeo/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattergeo/unselected/__init__.py +++ b/plotly/graph_objs/scattergeo/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattergeo/unselected/_marker.py b/plotly/graph_objs/scattergeo/unselected/_marker.py index 12476e64cf..a1bc28b027 100644 --- a/plotly/graph_objs/scattergeo/unselected/_marker.py +++ b/plotly/graph_objs/scattergeo/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.unselected" _path_str = "scattergeo.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergeo/unselected/_textfont.py b/plotly/graph_objs/scattergeo/unselected/_textfont.py index 3202d39ac8..c182661a91 100644 --- a/plotly/graph_objs/scattergeo/unselected/_textfont.py +++ b/plotly/graph_objs/scattergeo/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergeo.unselected" _path_str = "scattergeo.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergeo.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/__init__.py b/plotly/graph_objs/scattergl/__init__.py index 151ee1c144..70041375de 100644 --- a/plotly/graph_objs/scattergl/__init__.py +++ b/plotly/graph_objs/scattergl/__init__.py @@ -1,38 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._error_x import ErrorX - from ._error_y import ErrorY - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._error_x.ErrorX", - "._error_y.ErrorY", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._error_x.ErrorX", + "._error_y.ErrorY", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scattergl/_error_x.py b/plotly/graph_objs/scattergl/_error_x.py index 3daa2b17ed..82a6dcb829 100644 --- a/plotly/graph_objs/scattergl/_error_x.py +++ b/plotly/graph_objs/scattergl/_error_x.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorX(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.error_x" _valid_props = { @@ -26,8 +27,6 @@ class ErrorX(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -39,7 +38,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -47,8 +46,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -61,7 +58,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -69,8 +66,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -90,8 +85,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -110,8 +103,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -122,42 +113,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -169,8 +125,6 @@ def color(self): def color(self, val): self["color"] = val - # copy_ystyle - # ----------- @property def copy_ystyle(self): """ @@ -187,8 +141,6 @@ def copy_ystyle(self): def copy_ystyle(self, val): self["copy_ystyle"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -209,8 +161,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -229,8 +179,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -248,8 +196,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -267,13 +213,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -294,8 +238,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -316,8 +258,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -339,8 +279,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -359,8 +297,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -380,8 +316,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -416,7 +350,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -445,21 +379,21 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - copy_ystyle=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + copy_ystyle: bool | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -502,7 +436,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -531,14 +465,11 @@ def __init__( ------- ErrorX """ - super(ErrorX, self).__init__("error_x") - + super().__init__("error_x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -553,78 +484,23 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.ErrorX`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("copy_ystyle", None) - _v = copy_ystyle if copy_ystyle is not None else _v - if _v is not None: - self["copy_ystyle"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("copy_ystyle", arg, copy_ystyle) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_error_y.py b/plotly/graph_objs/scattergl/_error_y.py index 9b261c703f..991cad4d3f 100644 --- a/plotly/graph_objs/scattergl/_error_y.py +++ b/plotly/graph_objs/scattergl/_error_y.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ErrorY(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.error_y" _valid_props = { @@ -25,8 +26,6 @@ class ErrorY(_BaseTraceHierarchyType): "width", } - # array - # ----- @property def array(self): """ @@ -38,7 +37,7 @@ def array(self): Returns ------- - numpy.ndarray + NDArray """ return self["array"] @@ -46,8 +45,6 @@ def array(self): def array(self, val): self["array"] = val - # arrayminus - # ---------- @property def arrayminus(self): """ @@ -60,7 +57,7 @@ def arrayminus(self): Returns ------- - numpy.ndarray + NDArray """ return self["arrayminus"] @@ -68,8 +65,6 @@ def arrayminus(self): def arrayminus(self, val): self["arrayminus"] = val - # arrayminussrc - # ------------- @property def arrayminussrc(self): """ @@ -89,8 +84,6 @@ def arrayminussrc(self): def arrayminussrc(self, val): self["arrayminussrc"] = val - # arraysrc - # -------- @property def arraysrc(self): """ @@ -109,8 +102,6 @@ def arraysrc(self): def arraysrc(self, val): self["arraysrc"] = val - # color - # ----- @property def color(self): """ @@ -121,42 +112,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -168,8 +124,6 @@ def color(self): def color(self, val): self["color"] = val - # symmetric - # --------- @property def symmetric(self): """ @@ -190,8 +144,6 @@ def symmetric(self): def symmetric(self, val): self["symmetric"] = val - # thickness - # --------- @property def thickness(self): """ @@ -210,8 +162,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # traceref - # -------- @property def traceref(self): """ @@ -229,8 +179,6 @@ def traceref(self): def traceref(self, val): self["traceref"] = val - # tracerefminus - # ------------- @property def tracerefminus(self): """ @@ -248,13 +196,11 @@ def tracerefminus(self): def tracerefminus(self, val): self["tracerefminus"] = val - # type - # ---- @property def type(self): """ Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. Set this + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar lengths correspond to the square of @@ -275,8 +221,6 @@ def type(self): def type(self, val): self["type"] = val - # value - # ----- @property def value(self): """ @@ -297,8 +241,6 @@ def value(self): def value(self, val): self["value"] = val - # valueminus - # ---------- @property def valueminus(self): """ @@ -320,8 +262,6 @@ def valueminus(self): def valueminus(self, val): self["valueminus"] = val - # visible - # ------- @property def visible(self): """ @@ -340,8 +280,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -361,8 +299,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -395,7 +331,7 @@ def _prop_descriptions(self): type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -424,20 +360,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - array=None, - arrayminus=None, - arrayminussrc=None, - arraysrc=None, - color=None, - symmetric=None, - thickness=None, - traceref=None, - tracerefminus=None, - type=None, - value=None, - valueminus=None, - visible=None, - width=None, + array: NDArray | None = None, + arrayminus: NDArray | None = None, + arrayminussrc: str | None = None, + arraysrc: str | None = None, + color: str | None = None, + symmetric: bool | None = None, + thickness: int | float | None = None, + traceref: int | None = None, + tracerefminus: int | None = None, + type: Any | None = None, + value: int | float | None = None, + valueminus: int | float | None = None, + visible: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -478,7 +414,7 @@ def __init__( type Determines the rule used to generate the error bars. If - *constant`, the bar lengths are of a constant value. + "constant", the bar lengths are of a constant value. Set this constant in `value`. If "percent", the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If "sqrt", the bar @@ -507,14 +443,11 @@ def __init__( ------- ErrorY """ - super(ErrorY, self).__init__("error_y") - + super().__init__("error_y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -529,74 +462,22 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.ErrorY`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("array", None) - _v = array if array is not None else _v - if _v is not None: - self["array"] = _v - _v = arg.pop("arrayminus", None) - _v = arrayminus if arrayminus is not None else _v - if _v is not None: - self["arrayminus"] = _v - _v = arg.pop("arrayminussrc", None) - _v = arrayminussrc if arrayminussrc is not None else _v - if _v is not None: - self["arrayminussrc"] = _v - _v = arg.pop("arraysrc", None) - _v = arraysrc if arraysrc is not None else _v - if _v is not None: - self["arraysrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("symmetric", None) - _v = symmetric if symmetric is not None else _v - if _v is not None: - self["symmetric"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("traceref", None) - _v = traceref if traceref is not None else _v - if _v is not None: - self["traceref"] = _v - _v = arg.pop("tracerefminus", None) - _v = tracerefminus if tracerefminus is not None else _v - if _v is not None: - self["tracerefminus"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - _v = arg.pop("valueminus", None) - _v = valueminus if valueminus is not None else _v - if _v is not None: - self["valueminus"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("array", arg, array) + self._init_provided("arrayminus", arg, arrayminus) + self._init_provided("arrayminussrc", arg, arrayminussrc) + self._init_provided("arraysrc", arg, arraysrc) + self._init_provided("color", arg, color) + self._init_provided("symmetric", arg, symmetric) + self._init_provided("thickness", arg, thickness) + self._init_provided("traceref", arg, traceref) + self._init_provided("tracerefminus", arg, tracerefminus) + self._init_provided("type", arg, type) + self._init_provided("value", arg, value) + self._init_provided("valueminus", arg, valueminus) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_hoverlabel.py b/plotly/graph_objs/scattergl/_hoverlabel.py index 84dd7fdc41..f0675a16d6 100644 --- a/plotly/graph_objs/scattergl/_hoverlabel.py +++ b/plotly/graph_objs/scattergl/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattergl.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_legendgrouptitle.py b/plotly/graph_objs/scattergl/_legendgrouptitle.py index 345973ad4c..f65e5de59b 100644 --- a/plotly/graph_objs/scattergl/_legendgrouptitle.py +++ b/plotly/graph_objs/scattergl/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattergl.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_line.py b/plotly/graph_objs/scattergl/_line.py index 9659fbba19..34390e9102 100644 --- a/plotly/graph_objs/scattergl/_line.py +++ b/plotly/graph_objs/scattergl/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.line" _valid_props = {"color", "dash", "shape", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -91,8 +53,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # shape - # ----- @property def shape(self): """ @@ -113,8 +73,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # width - # ----- @property def width(self): """ @@ -133,8 +91,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -150,7 +106,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, dash=None, shape=None, width=None, **kwargs + self, + arg=None, + color: str | None = None, + dash: Any | None = None, + shape: Any | None = None, + width: int | float | None = None, + **kwargs, ): """ Construct a new Line object @@ -175,14 +137,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -197,34 +156,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("shape", arg, shape) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_marker.py b/plotly/graph_objs/scattergl/_marker.py index b7f020b894..5b6158161f 100644 --- a/plotly/graph_objs/scattergl/_marker.py +++ b/plotly/graph_objs/scattergl/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.marker" _valid_props = { @@ -35,8 +36,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -49,7 +48,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -57,8 +56,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -77,8 +74,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -103,8 +98,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -128,8 +121,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -151,8 +142,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -175,8 +164,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -198,8 +185,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -213,49 +198,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattergl.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -263,8 +213,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -290,8 +238,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -301,273 +247,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - gl.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergl.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scattergl.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergl.marker.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scattergl.marker.ColorBar @@ -578,8 +257,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -632,8 +309,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -652,8 +327,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # line - # ---- @property def line(self): """ @@ -663,98 +336,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scattergl.marker.Line @@ -765,8 +346,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -778,7 +357,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -786,8 +365,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -806,8 +383,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -829,8 +404,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -851,8 +424,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -864,7 +435,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -872,8 +443,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -894,8 +463,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -917,8 +484,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -939,8 +504,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -959,8 +522,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1064,7 +625,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1072,8 +633,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1092,8 +651,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1218,30 +775,30 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1374,14 +931,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1396,114 +950,32 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_selected.py b/plotly/graph_objs/scattergl/_selected.py index a7fabdd410..be07820c83 100644 --- a/plotly/graph_objs/scattergl/_selected.py +++ b/plotly/graph_objs/scattergl/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scattergl.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scattergl.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): t` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_stream.py b/plotly/graph_objs/scattergl/_stream.py index 9377ded88d..4eb40e5ecc 100644 --- a/plotly/graph_objs/scattergl/_stream.py +++ b/plotly/graph_objs/scattergl/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_textfont.py b/plotly/graph_objs/scattergl/_textfont.py index 243984489e..131acf8908 100644 --- a/plotly/graph_objs/scattergl/_textfont.py +++ b/plotly/graph_objs/scattergl/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.textfont" _valid_props = { @@ -23,8 +24,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -33,47 +32,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -101,23 +63,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -125,7 +78,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -133,8 +86,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -153,8 +104,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # size - # ---- @property def size(self): """ @@ -164,7 +113,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -172,8 +121,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -192,8 +139,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -207,7 +152,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -215,8 +160,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -235,8 +178,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -249,7 +190,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -257,8 +198,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -277,8 +216,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -291,7 +228,7 @@ def weight(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["weight"] @@ -299,8 +236,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -319,8 +254,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -331,18 +264,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -372,18 +298,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: Any | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -404,18 +330,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -445,14 +364,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -467,66 +383,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/_unselected.py b/plotly/graph_objs/scattergl/_unselected.py index b7c165da06..87117f1fc6 100644 --- a/plotly/graph_objs/scattergl/_unselected.py +++ b/plotly/graph_objs/scattergl/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl" _path_str = "scattergl.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattergl.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattergl.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): ont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/hoverlabel/__init__.py b/plotly/graph_objs/scattergl/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattergl/hoverlabel/__init__.py +++ b/plotly/graph_objs/scattergl/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattergl/hoverlabel/_font.py b/plotly/graph_objs/scattergl/hoverlabel/_font.py index 49fddb0c4c..cba81b5339 100644 --- a/plotly/graph_objs/scattergl/hoverlabel/_font.py +++ b/plotly/graph_objs/scattergl/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.hoverlabel" _path_str = "scattergl.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/legendgrouptitle/__init__.py b/plotly/graph_objs/scattergl/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattergl/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scattergl/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattergl/legendgrouptitle/_font.py b/plotly/graph_objs/scattergl/legendgrouptitle/_font.py index c491f7f013..d1ccc1dc57 100644 --- a/plotly/graph_objs/scattergl/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattergl/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.legendgrouptitle" _path_str = "scattergl.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/marker/__init__.py b/plotly/graph_objs/scattergl/marker/__init__.py index 8481520e3c..ff536ec8b2 100644 --- a/plotly/graph_objs/scattergl/marker/__init__.py +++ b/plotly/graph_objs/scattergl/marker/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] +) diff --git a/plotly/graph_objs/scattergl/marker/_colorbar.py b/plotly/graph_objs/scattergl/marker/_colorbar.py index 06c915818d..9e24f2af70 100644 --- a/plotly/graph_objs/scattergl/marker/_colorbar.py +++ b/plotly/graph_objs/scattergl/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.marker" _path_str = "scattergl.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattergl.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scattergl.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/marker/_line.py b/plotly/graph_objs/scattergl/marker/_line.py index 2e04595e35..a75a97a14d 100644 --- a/plotly/graph_objs/scattergl/marker/_line.py +++ b/plotly/graph_objs/scattergl/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.marker" _path_str = "scattergl.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattergl.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/marker/colorbar/__init__.py b/plotly/graph_objs/scattergl/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py index aeca1b6fce..562455b234 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.marker.colorbar" _path_str = "scattergl.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py index d6a4a14943..14b2cd5ce4 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.marker.colorbar" _path_str = "scattergl.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/marker/colorbar/_title.py b/plotly/graph_objs/scattergl/marker/colorbar/_title.py index 2f432c735b..6633f0b698 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/_title.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.marker.colorbar" _path_str = "scattergl.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattergl.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py b/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py b/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py index 6ecbf0502c..94fbdd88f7 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.marker.colorbar.title" _path_str = "scattergl.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattergl.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/selected/__init__.py b/plotly/graph_objs/scattergl/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattergl/selected/__init__.py +++ b/plotly/graph_objs/scattergl/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattergl/selected/_marker.py b/plotly/graph_objs/scattergl/selected/_marker.py index 7c75bf66ca..c451d92041 100644 --- a/plotly/graph_objs/scattergl/selected/_marker.py +++ b/plotly/graph_objs/scattergl/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.selected" _path_str = "scattergl.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/selected/_textfont.py b/plotly/graph_objs/scattergl/selected/_textfont.py index d72808f27e..be99b3578e 100644 --- a/plotly/graph_objs/scattergl/selected/_textfont.py +++ b/plotly/graph_objs/scattergl/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.selected" _path_str = "scattergl.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/unselected/__init__.py b/plotly/graph_objs/scattergl/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattergl/unselected/__init__.py +++ b/plotly/graph_objs/scattergl/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattergl/unselected/_marker.py b/plotly/graph_objs/scattergl/unselected/_marker.py index 188144c355..49d7717b37 100644 --- a/plotly/graph_objs/scattergl/unselected/_marker.py +++ b/plotly/graph_objs/scattergl/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.unselected" _path_str = "scattergl.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattergl/unselected/_textfont.py b/plotly/graph_objs/scattergl/unselected/_textfont.py index 03f459b9dc..e05833c417 100644 --- a/plotly/graph_objs/scattergl/unselected/_textfont.py +++ b/plotly/graph_objs/scattergl/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattergl.unselected" _path_str = "scattergl.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattergl.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/__init__.py b/plotly/graph_objs/scattermap/__init__.py index a32d23f438..b1056d2ce4 100644 --- a/plotly/graph_objs/scattermap/__init__.py +++ b/plotly/graph_objs/scattermap/__init__.py @@ -1,36 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._cluster import Cluster - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._cluster.Cluster", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._cluster.Cluster", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scattermap/_cluster.py b/plotly/graph_objs/scattermap/_cluster.py index ebfd9bfa66..e9b2e0e231 100644 --- a/plotly/graph_objs/scattermap/_cluster.py +++ b/plotly/graph_objs/scattermap/_cluster.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Cluster(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.cluster" _valid_props = { @@ -21,8 +22,6 @@ class Cluster(_BaseTraceHierarchyType): "stepsrc", } - # color - # ----- @property def color(self): """ @@ -33,47 +32,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -101,8 +63,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # enabled - # ------- @property def enabled(self): """ @@ -121,8 +81,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # maxzoom - # ------- @property def maxzoom(self): """ @@ -142,8 +100,6 @@ def maxzoom(self): def maxzoom(self, val): self["maxzoom"] = val - # opacity - # ------- @property def opacity(self): """ @@ -155,7 +111,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -163,8 +119,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -183,8 +137,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # size - # ---- @property def size(self): """ @@ -196,7 +148,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -204,8 +156,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -224,8 +174,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # step - # ---- @property def step(self): """ @@ -241,7 +189,7 @@ def step(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["step"] @@ -249,8 +197,6 @@ def step(self): def step(self, val): self["step"] = val - # stepsrc - # ------- @property def stepsrc(self): """ @@ -269,8 +215,6 @@ def stepsrc(self): def stepsrc(self, val): self["stepsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -309,16 +253,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - enabled=None, - maxzoom=None, - opacity=None, - opacitysrc=None, - size=None, - sizesrc=None, - step=None, - stepsrc=None, + color: str | None = None, + colorsrc: str | None = None, + enabled: bool | None = None, + maxzoom: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + step: int | float | None = None, + stepsrc: str | None = None, **kwargs, ): """ @@ -365,14 +309,11 @@ def __init__( ------- Cluster """ - super(Cluster, self).__init__("cluster") - + super().__init__("cluster") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -387,58 +328,18 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.Cluster`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("maxzoom", None) - _v = maxzoom if maxzoom is not None else _v - if _v is not None: - self["maxzoom"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("step", None) - _v = step if step is not None else _v - if _v is not None: - self["step"] = _v - _v = arg.pop("stepsrc", None) - _v = stepsrc if stepsrc is not None else _v - if _v is not None: - self["stepsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("enabled", arg, enabled) + self._init_provided("maxzoom", arg, maxzoom) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("step", arg, step) + self._init_provided("stepsrc", arg, stepsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_hoverlabel.py b/plotly/graph_objs/scattermap/_hoverlabel.py index 3918b3de3c..b4bb7c5f00 100644 --- a/plotly/graph_objs/scattermap/_hoverlabel.py +++ b/plotly/graph_objs/scattermap/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattermap.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_legendgrouptitle.py b/plotly/graph_objs/scattermap/_legendgrouptitle.py index 7c149aebb3..96e6acfb20 100644 --- a/plotly/graph_objs/scattermap/_legendgrouptitle.py +++ b/plotly/graph_objs/scattermap/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermap.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_line.py b/plotly/graph_objs/scattermap/_line.py index 1ea2f18c47..b1fedf3890 100644 --- a/plotly/graph_objs/scattermap/_line.py +++ b/plotly/graph_objs/scattermap/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_marker.py b/plotly/graph_objs/scattermap/_marker.py index df69d1b826..be3f53ca72 100644 --- a/plotly/graph_objs/scattermap/_marker.py +++ b/plotly/graph_objs/scattermap/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.marker" _valid_props = { @@ -35,8 +36,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # allowoverlap - # ------------ @property def allowoverlap(self): """ @@ -55,8 +54,6 @@ def allowoverlap(self): def allowoverlap(self, val): self["allowoverlap"] = val - # angle - # ----- @property def angle(self): """ @@ -71,7 +68,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -79,8 +76,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -99,8 +94,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -125,8 +118,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -150,8 +141,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -173,8 +162,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -197,8 +184,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -220,8 +205,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -235,49 +218,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattermap.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -285,8 +233,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -312,8 +258,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -323,273 +267,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - map.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattermap.marker.colorbar.tickformatstopdefa - ults), sets the default property values to use - for elements of - scattermap.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermap.marker. - colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scattermap.marker.ColorBar @@ -600,8 +277,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -654,8 +329,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -674,8 +347,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # opacity - # ------- @property def opacity(self): """ @@ -687,7 +358,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -695,8 +366,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -715,8 +384,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -738,8 +405,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -760,8 +425,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -773,7 +436,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -781,8 +444,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -803,8 +464,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -826,8 +485,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -848,8 +505,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -868,8 +523,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -884,7 +537,7 @@ def symbol(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["symbol"] @@ -892,8 +545,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -912,8 +563,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1039,30 +688,30 @@ def _prop_descriptions(self): def __init__( self, arg=None, - allowoverlap=None, - angle=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, + allowoverlap: bool | None = None, + angle: int | float | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + symbol: str | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1196,14 +845,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1218,114 +864,32 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("allowoverlap", None) - _v = allowoverlap if allowoverlap is not None else _v - if _v is not None: - self["allowoverlap"] = _v - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("allowoverlap", arg, allowoverlap) + self._init_provided("angle", arg, angle) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_selected.py b/plotly/graph_objs/scattermap/_selected.py index bdfc7067fd..b7b3e4a3e6 100644 --- a/plotly/graph_objs/scattermap/_selected.py +++ b/plotly/graph_objs/scattermap/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scattermap.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): ` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -68,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -90,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_stream.py b/plotly/graph_objs/scattermap/_stream.py index 0147e4aeff..e5338b6d19 100644 --- a/plotly/graph_objs/scattermap/_stream.py +++ b/plotly/graph_objs/scattermap/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_textfont.py b/plotly/graph_objs/scattermap/_textfont.py index 411bc39f1e..3bc114cd33 100644 --- a/plotly/graph_objs/scattermap/_textfont.py +++ b/plotly/graph_objs/scattermap/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.textfont" _valid_props = {"color", "family", "size", "style", "weight"} - # color - # ----- @property def color(self): """ @@ -20,42 +19,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -67,23 +31,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -98,8 +53,6 @@ def family(self): def family(self, val): self["family"] = val - # size - # ---- @property def size(self): """ @@ -116,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -138,8 +89,6 @@ def style(self): def style(self, val): self["style"] = val - # weight - # ------ @property def weight(self): """ @@ -160,8 +109,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -169,18 +116,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -193,11 +133,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - size=None, - style=None, - weight=None, + color: str | None = None, + family: str | None = None, + size: int | float | None = None, + style: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -217,18 +157,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -241,14 +174,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -263,38 +193,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/_unselected.py b/plotly/graph_objs/scattermap/_unselected.py index adc562b607..66e6cb49bc 100644 --- a/plotly/graph_objs/scattermap/_unselected.py +++ b/plotly/graph_objs/scattermap/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap" _path_str = "scattermap.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattermap.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): er` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -71,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/hoverlabel/__init__.py b/plotly/graph_objs/scattermap/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattermap/hoverlabel/__init__.py +++ b/plotly/graph_objs/scattermap/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattermap/hoverlabel/_font.py b/plotly/graph_objs/scattermap/hoverlabel/_font.py index a64e1f6a3c..c7626229e3 100644 --- a/plotly/graph_objs/scattermap/hoverlabel/_font.py +++ b/plotly/graph_objs/scattermap/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.hoverlabel" _path_str = "scattermap.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/legendgrouptitle/__init__.py b/plotly/graph_objs/scattermap/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattermap/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scattermap/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattermap/legendgrouptitle/_font.py b/plotly/graph_objs/scattermap/legendgrouptitle/_font.py index 36f64875e8..27bf8ee764 100644 --- a/plotly/graph_objs/scattermap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattermap/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.legendgrouptitle" _path_str = "scattermap.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/marker/__init__.py b/plotly/graph_objs/scattermap/marker/__init__.py index 27dfc9e52f..5e1805d8fa 100644 --- a/plotly/graph_objs/scattermap/marker/__init__.py +++ b/plotly/graph_objs/scattermap/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] +) diff --git a/plotly/graph_objs/scattermap/marker/_colorbar.py b/plotly/graph_objs/scattermap/marker/_colorbar.py index cbacaa4732..1dc0222a40 100644 --- a/plotly/graph_objs/scattermap/marker/_colorbar.py +++ b/plotly/graph_objs/scattermap/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.marker" _path_str = "scattermap.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermap.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scattermap.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scattermap.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scattermap.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/marker/colorbar/__init__.py b/plotly/graph_objs/scattermap/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py index b5237c2f9e..c96f93f5f3 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.marker.colorbar" _path_str = "scattermap.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scattermap/marker/colorbar/_tickformatstop.py index aac9f8bafb..a057634097 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.marker.colorbar" _path_str = "scattermap.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/marker/colorbar/_title.py b/plotly/graph_objs/scattermap/marker/colorbar/_title.py index ee796ffbb0..2ab7c0e8ea 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/_title.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.marker.colorbar" _path_str = "scattermap.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermap.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/marker/colorbar/title/__init__.py b/plotly/graph_objs/scattermap/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py b/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py index 0914990dcb..e99ca34649 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.marker.colorbar.title" _path_str = "scattermap.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermap.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/selected/__init__.py b/plotly/graph_objs/scattermap/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/scattermap/selected/__init__.py +++ b/plotly/graph_objs/scattermap/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/scattermap/selected/_marker.py b/plotly/graph_objs/scattermap/selected/_marker.py index 7d820a8fcd..da809e5257 100644 --- a/plotly/graph_objs/scattermap/selected/_marker.py +++ b/plotly/graph_objs/scattermap/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.selected" _path_str = "scattermap.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermap/unselected/__init__.py b/plotly/graph_objs/scattermap/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/scattermap/unselected/__init__.py +++ b/plotly/graph_objs/scattermap/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/scattermap/unselected/_marker.py b/plotly/graph_objs/scattermap/unselected/_marker.py index 0722a0f7b1..c1ab56efee 100644 --- a/plotly/graph_objs/scattermap/unselected/_marker.py +++ b/plotly/graph_objs/scattermap/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermap.unselected" _path_str = "scattermap.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermap.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/__init__.py b/plotly/graph_objs/scattermapbox/__init__.py index a32d23f438..b1056d2ce4 100644 --- a/plotly/graph_objs/scattermapbox/__init__.py +++ b/plotly/graph_objs/scattermapbox/__init__.py @@ -1,36 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._cluster import Cluster - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._cluster.Cluster", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._cluster.Cluster", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scattermapbox/_cluster.py b/plotly/graph_objs/scattermapbox/_cluster.py index 2d34eb4c16..9ce5682661 100644 --- a/plotly/graph_objs/scattermapbox/_cluster.py +++ b/plotly/graph_objs/scattermapbox/_cluster.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Cluster(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.cluster" _valid_props = { @@ -21,8 +22,6 @@ class Cluster(_BaseTraceHierarchyType): "stepsrc", } - # color - # ----- @property def color(self): """ @@ -33,47 +32,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -101,8 +63,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # enabled - # ------- @property def enabled(self): """ @@ -121,8 +81,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # maxzoom - # ------- @property def maxzoom(self): """ @@ -142,8 +100,6 @@ def maxzoom(self): def maxzoom(self, val): self["maxzoom"] = val - # opacity - # ------- @property def opacity(self): """ @@ -155,7 +111,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -163,8 +119,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -183,8 +137,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # size - # ---- @property def size(self): """ @@ -196,7 +148,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -204,8 +156,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -224,8 +174,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # step - # ---- @property def step(self): """ @@ -241,7 +189,7 @@ def step(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["step"] @@ -249,8 +197,6 @@ def step(self): def step(self, val): self["step"] = val - # stepsrc - # ------- @property def stepsrc(self): """ @@ -269,8 +215,6 @@ def stepsrc(self): def stepsrc(self, val): self["stepsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -309,16 +253,16 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - enabled=None, - maxzoom=None, - opacity=None, - opacitysrc=None, - size=None, - sizesrc=None, - step=None, - stepsrc=None, + color: str | None = None, + colorsrc: str | None = None, + enabled: bool | None = None, + maxzoom: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + step: int | float | None = None, + stepsrc: str | None = None, **kwargs, ): """ @@ -365,14 +309,11 @@ def __init__( ------- Cluster """ - super(Cluster, self).__init__("cluster") - + super().__init__("cluster") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -387,58 +328,18 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.Cluster`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("maxzoom", None) - _v = maxzoom if maxzoom is not None else _v - if _v is not None: - self["maxzoom"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("step", None) - _v = step if step is not None else _v - if _v is not None: - self["step"] = _v - _v = arg.pop("stepsrc", None) - _v = stepsrc if stepsrc is not None else _v - if _v is not None: - self["stepsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("enabled", arg, enabled) + self._init_provided("maxzoom", arg, maxzoom) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("step", arg, step) + self._init_provided("stepsrc", arg, stepsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_hoverlabel.py b/plotly/graph_objs/scattermapbox/_hoverlabel.py index 56376844a0..94ac63ee81 100644 --- a/plotly/graph_objs/scattermapbox/_hoverlabel.py +++ b/plotly/graph_objs/scattermapbox/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattermapbox.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_legendgrouptitle.py b/plotly/graph_objs/scattermapbox/_legendgrouptitle.py index 9468d3e87d..d4376ad3c5 100644 --- a/plotly/graph_objs/scattermapbox/_legendgrouptitle.py +++ b/plotly/graph_objs/scattermapbox/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermapbox.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_line.py b/plotly/graph_objs/scattermapbox/_line.py index 53702c2816..7351080882 100644 --- a/plotly/graph_objs/scattermapbox/_line.py +++ b/plotly/graph_objs/scattermapbox/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_marker.py b/plotly/graph_objs/scattermapbox/_marker.py index 089412374d..5a024e693b 100644 --- a/plotly/graph_objs/scattermapbox/_marker.py +++ b/plotly/graph_objs/scattermapbox/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.marker" _valid_props = { @@ -35,8 +36,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # allowoverlap - # ------------ @property def allowoverlap(self): """ @@ -55,8 +54,6 @@ def allowoverlap(self): def allowoverlap(self, val): self["allowoverlap"] = val - # angle - # ----- @property def angle(self): """ @@ -71,7 +68,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -79,8 +76,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -99,8 +94,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -125,8 +118,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -150,8 +141,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -173,8 +162,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -197,8 +184,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -220,8 +205,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -235,49 +218,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattermapbox.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -285,8 +233,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -312,8 +258,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -323,273 +267,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - mapbox.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattermapbox.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattermapbox.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermapbox.mark - er.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scattermapbox.marker.ColorBar @@ -600,8 +277,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -654,8 +329,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -674,8 +347,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # opacity - # ------- @property def opacity(self): """ @@ -687,7 +358,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -695,8 +366,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -715,8 +384,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -738,8 +405,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -760,8 +425,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -773,7 +436,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -781,8 +444,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -803,8 +464,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -826,8 +485,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -848,8 +505,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -868,8 +523,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -884,7 +537,7 @@ def symbol(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["symbol"] @@ -892,8 +545,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -912,8 +563,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1039,30 +688,30 @@ def _prop_descriptions(self): def __init__( self, arg=None, - allowoverlap=None, - angle=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, + allowoverlap: bool | None = None, + angle: int | float | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + symbol: str | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1196,14 +845,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1218,114 +864,32 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("allowoverlap", None) - _v = allowoverlap if allowoverlap is not None else _v - if _v is not None: - self["allowoverlap"] = _v - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("allowoverlap", arg, allowoverlap) + self._init_provided("angle", arg, angle) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_selected.py b/plotly/graph_objs/scattermapbox/_selected.py index 21df8b5b8c..04d4224c82 100644 --- a/plotly/graph_objs/scattermapbox/_selected.py +++ b/plotly/graph_objs/scattermapbox/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scattermapbox.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): ker` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -68,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -90,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_stream.py b/plotly/graph_objs/scattermapbox/_stream.py index 2042494256..d09da87759 100644 --- a/plotly/graph_objs/scattermapbox/_stream.py +++ b/plotly/graph_objs/scattermapbox/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_textfont.py b/plotly/graph_objs/scattermapbox/_textfont.py index 76e9548644..b0bc2f27bf 100644 --- a/plotly/graph_objs/scattermapbox/_textfont.py +++ b/plotly/graph_objs/scattermapbox/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.textfont" _valid_props = {"color", "family", "size", "style", "weight"} - # color - # ----- @property def color(self): """ @@ -20,42 +19,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -67,23 +31,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -98,8 +53,6 @@ def family(self): def family(self, val): self["family"] = val - # size - # ---- @property def size(self): """ @@ -116,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -138,8 +89,6 @@ def style(self): def style(self, val): self["style"] = val - # weight - # ------ @property def weight(self): """ @@ -160,8 +109,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -169,18 +116,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -193,11 +133,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - size=None, - style=None, - weight=None, + color: str | None = None, + family: str | None = None, + size: int | float | None = None, + style: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -217,18 +157,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. size style @@ -241,14 +174,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -263,38 +193,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/_unselected.py b/plotly/graph_objs/scattermapbox/_unselected.py index 789952d317..8e6a4d2491 100644 --- a/plotly/graph_objs/scattermapbox/_unselected.py +++ b/plotly/graph_objs/scattermapbox/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox" _path_str = "scattermapbox.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattermapbox.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): arker` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -71,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py b/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py +++ b/plotly/graph_objs/scattermapbox/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattermapbox/hoverlabel/_font.py b/plotly/graph_objs/scattermapbox/hoverlabel/_font.py index 8fda3dd0c0..71e93585ce 100644 --- a/plotly/graph_objs/scattermapbox/hoverlabel/_font.py +++ b/plotly/graph_objs/scattermapbox/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.hoverlabel" _path_str = "scattermapbox.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/legendgrouptitle/__init__.py b/plotly/graph_objs/scattermapbox/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattermapbox/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scattermapbox/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py b/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py index bc6e44c4da..d9418a0cab 100644 --- a/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattermapbox/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.legendgrouptitle" _path_str = "scattermapbox.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/marker/__init__.py b/plotly/graph_objs/scattermapbox/marker/__init__.py index 27dfc9e52f..5e1805d8fa 100644 --- a/plotly/graph_objs/scattermapbox/marker/__init__.py +++ b/plotly/graph_objs/scattermapbox/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar"] +) diff --git a/plotly/graph_objs/scattermapbox/marker/_colorbar.py b/plotly/graph_objs/scattermapbox/marker/_colorbar.py index 684ef30a36..6e898613dd 100644 --- a/plotly/graph_objs/scattermapbox/marker/_colorbar.py +++ b/plotly/graph_objs/scattermapbox/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.marker" _path_str = "scattermapbox.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scattermapbox.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py b/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py index 903e0b3c9b..fd9f0f59ee 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.marker.colorbar" _path_str = "scattermapbox.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py index 1c215a3bf2..4cde5303c2 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.marker.colorbar" _path_str = "scattermapbox.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py b/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py index 812ba8dfe0..ac2d250f4f 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.marker.colorbar" _path_str = "scattermapbox.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattermapbox.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py b/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py b/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py index 0e046a0e6d..4f3da8c64a 100644 --- a/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattermapbox/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.marker.colorbar.title" _path_str = "scattermapbox.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattermapbox.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/selected/__init__.py b/plotly/graph_objs/scattermapbox/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/scattermapbox/selected/__init__.py +++ b/plotly/graph_objs/scattermapbox/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/scattermapbox/selected/_marker.py b/plotly/graph_objs/scattermapbox/selected/_marker.py index 14f82d5fa0..e3b0220126 100644 --- a/plotly/graph_objs/scattermapbox/selected/_marker.py +++ b/plotly/graph_objs/scattermapbox/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.selected" _path_str = "scattermapbox.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattermapbox/unselected/__init__.py b/plotly/graph_objs/scattermapbox/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/scattermapbox/unselected/__init__.py +++ b/plotly/graph_objs/scattermapbox/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/scattermapbox/unselected/_marker.py b/plotly/graph_objs/scattermapbox/unselected/_marker.py index 4712c12b0d..64432c2e0a 100644 --- a/plotly/graph_objs/scattermapbox/unselected/_marker.py +++ b/plotly/graph_objs/scattermapbox/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattermapbox.unselected" _path_str = "scattermapbox.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattermapbox.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/__init__.py b/plotly/graph_objs/scatterpolar/__init__.py index 382e87019f..7cc31d4831 100644 --- a/plotly/graph_objs/scatterpolar/__init__.py +++ b/plotly/graph_objs/scatterpolar/__init__.py @@ -1,34 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scatterpolar/_hoverlabel.py b/plotly/graph_objs/scatterpolar/_hoverlabel.py index 9298560b41..27e536aaa1 100644 --- a/plotly/graph_objs/scatterpolar/_hoverlabel.py +++ b/plotly/graph_objs/scatterpolar/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatterpolar.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_legendgrouptitle.py b/plotly/graph_objs/scatterpolar/_legendgrouptitle.py index 2383375ac0..d8a20dc6f7 100644 --- a/plotly/graph_objs/scatterpolar/_legendgrouptitle.py +++ b/plotly/graph_objs/scatterpolar/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterpolar.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_line.py b/plotly/graph_objs/scatterpolar/_line.py index d62c4ea2d5..046d73af3b 100644 --- a/plotly/graph_objs/scatterpolar/_line.py +++ b/plotly/graph_objs/scatterpolar/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.line" _valid_props = { @@ -18,8 +19,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # backoff - # ------- @property def backoff(self): """ @@ -34,7 +33,7 @@ def backoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["backoff"] @@ -42,8 +41,6 @@ def backoff(self): def backoff(self, val): self["backoff"] = val - # backoffsrc - # ---------- @property def backoffsrc(self): """ @@ -62,8 +59,6 @@ def backoffsrc(self): def backoffsrc(self, val): self["backoffsrc"] = val - # color - # ----- @property def color(self): """ @@ -74,42 +69,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -121,8 +81,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -147,8 +105,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # shape - # ----- @property def shape(self): """ @@ -170,8 +126,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -192,8 +146,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -212,8 +164,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -248,13 +198,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - backoff=None, - backoffsrc=None, - color=None, - dash=None, - shape=None, - smoothing=None, - width=None, + backoff: int | float | None = None, + backoffsrc: str | None = None, + color: str | None = None, + dash: str | None = None, + shape: Any | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -297,14 +247,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -319,46 +266,15 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("backoff", None) - _v = backoff if backoff is not None else _v - if _v is not None: - self["backoff"] = _v - _v = arg.pop("backoffsrc", None) - _v = backoffsrc if backoffsrc is not None else _v - if _v is not None: - self["backoffsrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("backoff", arg, backoff) + self._init_provided("backoffsrc", arg, backoffsrc) + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("shape", arg, shape) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_marker.py b/plotly/graph_objs/scatterpolar/_marker.py index 048167b890..4675ec9e70 100644 --- a/plotly/graph_objs/scatterpolar/_marker.py +++ b/plotly/graph_objs/scatterpolar/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.marker" _valid_props = { @@ -40,8 +41,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -54,7 +53,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -62,8 +61,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # angleref - # -------- @property def angleref(self): """ @@ -85,8 +82,6 @@ def angleref(self): def angleref(self, val): self["angleref"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -105,8 +100,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -131,8 +124,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -156,8 +147,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -179,8 +168,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -203,8 +190,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -226,8 +211,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -241,49 +224,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatterpolar.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -291,8 +239,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -318,8 +264,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -329,273 +273,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polar.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolar.marker.colorbar.tickformatstopde - faults), sets the default property values to - use for elements of - scatterpolar.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolar.marke - r.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scatterpolar.marker.ColorBar @@ -606,8 +283,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -660,8 +335,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -680,8 +353,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # gradient - # -------- @property def gradient(self): """ @@ -691,22 +362,6 @@ def gradient(self): - A dict of string/value properties that will be passed to the Gradient constructor - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. - Returns ------- plotly.graph_objs.scatterpolar.marker.Gradient @@ -717,8 +372,6 @@ def gradient(self): def gradient(self, val): self["gradient"] = val - # line - # ---- @property def line(self): """ @@ -728,98 +381,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scatterpolar.marker.Line @@ -830,8 +391,6 @@ def line(self): def line(self, val): self["line"] = val - # maxdisplayed - # ------------ @property def maxdisplayed(self): """ @@ -851,8 +410,6 @@ def maxdisplayed(self): def maxdisplayed(self, val): self["maxdisplayed"] = val - # opacity - # ------- @property def opacity(self): """ @@ -864,7 +421,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -872,8 +429,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -892,8 +447,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -915,8 +468,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -937,8 +488,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -950,7 +499,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -958,8 +507,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -980,8 +527,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1003,8 +548,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1025,8 +568,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -1045,8 +586,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # standoff - # -------- @property def standoff(self): """ @@ -1061,7 +600,7 @@ def standoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["standoff"] @@ -1069,8 +608,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # standoffsrc - # ----------- @property def standoffsrc(self): """ @@ -1089,8 +626,6 @@ def standoffsrc(self): def standoffsrc(self, val): self["standoffsrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1194,7 +729,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1202,8 +737,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1222,8 +755,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1367,35 +898,35 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - angleref=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - standoff=None, - standoffsrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + angleref: Any | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + gradient: None | None = None, + line: None | None = None, + maxdisplayed: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + standoff: int | float | None = None, + standoffsrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1547,14 +1078,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1569,134 +1097,37 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("angleref", None) - _v = angleref if angleref is not None else _v - if _v is not None: - self["angleref"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("gradient", None) - _v = gradient if gradient is not None else _v - if _v is not None: - self["gradient"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxdisplayed", None) - _v = maxdisplayed if maxdisplayed is not None else _v - if _v is not None: - self["maxdisplayed"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("standoffsrc", None) - _v = standoffsrc if standoffsrc is not None else _v - if _v is not None: - self["standoffsrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("angleref", arg, angleref) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("gradient", arg, gradient) + self._init_provided("line", arg, line) + self._init_provided("maxdisplayed", arg, maxdisplayed) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("standoff", arg, standoff) + self._init_provided("standoffsrc", arg, standoffsrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_selected.py b/plotly/graph_objs/scatterpolar/_selected.py index df8415c49e..f1d3e6ef0c 100644 --- a/plotly/graph_objs/scatterpolar/_selected.py +++ b/plotly/graph_objs/scatterpolar/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scatterpolar.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scatterpolar.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): font` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_stream.py b/plotly/graph_objs/scatterpolar/_stream.py index 444327ede9..45d7bf59a6 100644 --- a/plotly/graph_objs/scatterpolar/_stream.py +++ b/plotly/graph_objs/scatterpolar/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_textfont.py b/plotly/graph_objs/scatterpolar/_textfont.py index d120f4de43..a13166be15 100644 --- a/plotly/graph_objs/scatterpolar/_textfont.py +++ b/plotly/graph_objs/scatterpolar/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/_unselected.py b/plotly/graph_objs/scatterpolar/_unselected.py index 2cbe5169a3..c888758e95 100644 --- a/plotly/graph_objs/scatterpolar/_unselected.py +++ b/plotly/graph_objs/scatterpolar/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar" _path_str = "scatterpolar.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatterpolar.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatterpolar.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): xtfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py b/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py +++ b/plotly/graph_objs/scatterpolar/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterpolar/hoverlabel/_font.py b/plotly/graph_objs/scatterpolar/hoverlabel/_font.py index 2e9f6fdbdf..5769372619 100644 --- a/plotly/graph_objs/scatterpolar/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterpolar/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.hoverlabel" _path_str = "scatterpolar.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/legendgrouptitle/__init__.py b/plotly/graph_objs/scatterpolar/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterpolar/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scatterpolar/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py b/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py index 94a44b838f..87ea5a40d5 100644 --- a/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.legendgrouptitle" _path_str = "scatterpolar.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/__init__.py b/plotly/graph_objs/scatterpolar/marker/__init__.py index f1897fb0aa..f9d889ecb9 100644 --- a/plotly/graph_objs/scatterpolar/marker/__init__.py +++ b/plotly/graph_objs/scatterpolar/marker/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._gradient import Gradient - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], +) diff --git a/plotly/graph_objs/scatterpolar/marker/_colorbar.py b/plotly/graph_objs/scatterpolar/marker/_colorbar.py index 1dea820c83..7fbd829708 100644 --- a/plotly/graph_objs/scatterpolar/marker/_colorbar.py +++ b/plotly/graph_objs/scatterpolar/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker" _path_str = "scatterpolar.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scatterpolar.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/_gradient.py b/plotly/graph_objs/scatterpolar/marker/_gradient.py index 9c29c769c9..f682db93c7 100644 --- a/plotly/graph_objs/scatterpolar/marker/_gradient.py +++ b/plotly/graph_objs/scatterpolar/marker/_gradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker" _path_str = "scatterpolar.marker.gradient" _valid_props = {"color", "colorsrc", "type", "typesrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # type - # ---- @property def type(self): """ @@ -105,7 +65,7 @@ def type(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["type"] @@ -113,8 +73,6 @@ def type(self): def type(self, val): self["type"] = val - # typesrc - # ------- @property def typesrc(self): """ @@ -133,8 +91,6 @@ def typesrc(self): def typesrc(self, val): self["typesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -153,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + type: Any | None = None, + typesrc: str | None = None, + **kwargs, ): """ Construct a new Gradient object @@ -181,14 +143,11 @@ def __init__( ------- Gradient """ - super(Gradient, self).__init__("gradient") - + super().__init__("gradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,34 +162,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.marker.Gradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("typesrc", None) - _v = typesrc if typesrc is not None else _v - if _v is not None: - self["typesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("type", arg, type) + self._init_provided("typesrc", arg, typesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/_line.py b/plotly/graph_objs/scatterpolar/marker/_line.py index 2484f5e5a5..99b1e4b6c0 100644 --- a/plotly/graph_objs/scatterpolar/marker/_line.py +++ b/plotly/graph_objs/scatterpolar/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker" _path_str = "scatterpolar.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatterpolar.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py b/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py index 759310f638..e502a66b50 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker.colorbar" _path_str = "scatterpolar.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py index 61eeba8255..1a45f6ec3a 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker.colorbar" _path_str = "scatterpolar.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py b/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py index e62ca01ff1..c14802c138 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker.colorbar" _path_str = "scatterpolar.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterpolar.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py b/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py index 41fce0c702..dff6099eb7 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.marker.colorbar.title" _path_str = "scatterpolar.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolar.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/selected/__init__.py b/plotly/graph_objs/scatterpolar/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatterpolar/selected/__init__.py +++ b/plotly/graph_objs/scatterpolar/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatterpolar/selected/_marker.py b/plotly/graph_objs/scatterpolar/selected/_marker.py index 65c47bd19c..47625d35fc 100644 --- a/plotly/graph_objs/scatterpolar/selected/_marker.py +++ b/plotly/graph_objs/scatterpolar/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.selected" _path_str = "scatterpolar.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/selected/_textfont.py b/plotly/graph_objs/scatterpolar/selected/_textfont.py index 33b7ae9a0b..3fa4051256 100644 --- a/plotly/graph_objs/scatterpolar/selected/_textfont.py +++ b/plotly/graph_objs/scatterpolar/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.selected" _path_str = "scatterpolar.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/unselected/__init__.py b/plotly/graph_objs/scatterpolar/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatterpolar/unselected/__init__.py +++ b/plotly/graph_objs/scatterpolar/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatterpolar/unselected/_marker.py b/plotly/graph_objs/scatterpolar/unselected/_marker.py index c92b750344..d8bebcfd6e 100644 --- a/plotly/graph_objs/scatterpolar/unselected/_marker.py +++ b/plotly/graph_objs/scatterpolar/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.unselected" _path_str = "scatterpolar.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolar/unselected/_textfont.py b/plotly/graph_objs/scatterpolar/unselected/_textfont.py index 8330c2f1d8..54166ca9b1 100644 --- a/plotly/graph_objs/scatterpolar/unselected/_textfont.py +++ b/plotly/graph_objs/scatterpolar/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolar.unselected" _path_str = "scatterpolar.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolar.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/__init__.py b/plotly/graph_objs/scatterpolargl/__init__.py index 382e87019f..7cc31d4831 100644 --- a/plotly/graph_objs/scatterpolargl/__init__.py +++ b/plotly/graph_objs/scatterpolargl/__init__.py @@ -1,34 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scatterpolargl/_hoverlabel.py b/plotly/graph_objs/scatterpolargl/_hoverlabel.py index 8785f555d4..41101456dc 100644 --- a/plotly/graph_objs/scatterpolargl/_hoverlabel.py +++ b/plotly/graph_objs/scatterpolargl/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatterpolargl.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_legendgrouptitle.py b/plotly/graph_objs/scatterpolargl/_legendgrouptitle.py index a2519c9a45..af0a4ba3db 100644 --- a/plotly/graph_objs/scatterpolargl/_legendgrouptitle.py +++ b/plotly/graph_objs/scatterpolargl/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterpolargl.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_line.py b/plotly/graph_objs/scatterpolargl/_line.py index 35a581a8e4..5c6fb68f3f 100644 --- a/plotly/graph_objs/scatterpolargl/_line.py +++ b/plotly/graph_objs/scatterpolargl/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -91,8 +53,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -111,8 +71,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -124,7 +82,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: Any | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -145,14 +110,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -167,30 +129,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_marker.py b/plotly/graph_objs/scatterpolargl/_marker.py index 8fa0d4b2c6..4690a6e0dc 100644 --- a/plotly/graph_objs/scatterpolargl/_marker.py +++ b/plotly/graph_objs/scatterpolargl/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.marker" _valid_props = { @@ -35,8 +36,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -49,7 +48,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -57,8 +56,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -77,8 +74,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -103,8 +98,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -128,8 +121,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -151,8 +142,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -175,8 +164,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -198,8 +185,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -213,49 +198,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatterpolargl.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -263,8 +213,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -290,8 +238,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -301,273 +247,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polargl.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolargl.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterpolargl.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolargl.mar - ker.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scatterpolargl.marker.ColorBar @@ -578,8 +257,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -632,8 +309,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -652,8 +327,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # line - # ---- @property def line(self): """ @@ -663,98 +336,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scatterpolargl.marker.Line @@ -765,8 +346,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -778,7 +357,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -786,8 +365,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -806,8 +383,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -829,8 +404,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -851,8 +424,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -864,7 +435,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -872,8 +443,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -894,8 +463,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -917,8 +484,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -939,8 +504,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -959,8 +522,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1064,7 +625,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1072,8 +633,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1092,8 +651,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1218,30 +775,30 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1374,14 +931,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1396,114 +950,32 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_selected.py b/plotly/graph_objs/scatterpolargl/_selected.py index 3633cbd509..247bf2c9c4 100644 --- a/plotly/graph_objs/scatterpolargl/_selected.py +++ b/plotly/graph_objs/scatterpolargl/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scatterpolargl.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scatterpolargl.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): xtfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_stream.py b/plotly/graph_objs/scatterpolargl/_stream.py index 1446c90098..792f8f52dd 100644 --- a/plotly/graph_objs/scatterpolargl/_stream.py +++ b/plotly/graph_objs/scatterpolargl/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_textfont.py b/plotly/graph_objs/scatterpolargl/_textfont.py index 94dabaa4a2..48a2b7f553 100644 --- a/plotly/graph_objs/scatterpolargl/_textfont.py +++ b/plotly/graph_objs/scatterpolargl/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.textfont" _valid_props = { @@ -23,8 +24,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -33,47 +32,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -101,23 +63,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -125,7 +78,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -133,8 +86,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -153,8 +104,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # size - # ---- @property def size(self): """ @@ -164,7 +113,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -172,8 +121,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -192,8 +139,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -207,7 +152,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -215,8 +160,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -235,8 +178,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -249,7 +190,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -257,8 +198,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -277,8 +216,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -291,7 +228,7 @@ def weight(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["weight"] @@ -299,8 +236,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -319,8 +254,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -331,18 +264,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -372,18 +298,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: Any | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -404,18 +330,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -445,14 +364,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -467,66 +383,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/_unselected.py b/plotly/graph_objs/scatterpolargl/_unselected.py index 41ad0befff..d7f0f8ea1d 100644 --- a/plotly/graph_objs/scatterpolargl/_unselected.py +++ b/plotly/graph_objs/scatterpolargl/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl" _path_str = "scatterpolargl.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatterpolargl.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatterpolargl.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): Textfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py b/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py +++ b/plotly/graph_objs/scatterpolargl/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py b/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py index 2bb67d5d53..ab1f6d9001 100644 --- a/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.hoverlabel" _path_str = "scatterpolargl.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/legendgrouptitle/__init__.py b/plotly/graph_objs/scatterpolargl/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterpolargl/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scatterpolargl/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py b/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py index c8ef040bdc..1fcfd694dd 100644 --- a/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.legendgrouptitle" _path_str = "scatterpolargl.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/marker/__init__.py b/plotly/graph_objs/scatterpolargl/marker/__init__.py index 8481520e3c..ff536ec8b2 100644 --- a/plotly/graph_objs/scatterpolargl/marker/__init__.py +++ b/plotly/graph_objs/scatterpolargl/marker/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] +) diff --git a/plotly/graph_objs/scatterpolargl/marker/_colorbar.py b/plotly/graph_objs/scatterpolargl/marker/_colorbar.py index 0d80f886c7..1eafb5e5f3 100644 --- a/plotly/graph_objs/scatterpolargl/marker/_colorbar.py +++ b/plotly/graph_objs/scatterpolargl/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.marker" _path_str = "scatterpolargl.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scatterpolargl.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/marker/_line.py b/plotly/graph_objs/scatterpolargl/marker/_line.py index 7d11a59689..af3f77e3be 100644 --- a/plotly/graph_objs/scatterpolargl/marker/_line.py +++ b/plotly/graph_objs/scatterpolargl/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.marker" _path_str = "scatterpolargl.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatterpolargl.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py index cac486d95d..71707fc6ad 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.marker.colorbar" _path_str = "scatterpolargl.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py index 4cf6020fc0..a648c61fb5 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.marker.colorbar" _path_str = "scatterpolargl.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py index 313c0a1fa8..a2408022ca 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.marker.colorbar" _path_str = "scatterpolargl.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py index 2334e829c0..23d6009f47 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.marker.colorbar.title" _path_str = "scatterpolargl.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterpolargl.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/selected/__init__.py b/plotly/graph_objs/scatterpolargl/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatterpolargl/selected/__init__.py +++ b/plotly/graph_objs/scatterpolargl/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatterpolargl/selected/_marker.py b/plotly/graph_objs/scatterpolargl/selected/_marker.py index f8b22058a9..ccf11e78dd 100644 --- a/plotly/graph_objs/scatterpolargl/selected/_marker.py +++ b/plotly/graph_objs/scatterpolargl/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.selected" _path_str = "scatterpolargl.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/selected/_textfont.py b/plotly/graph_objs/scatterpolargl/selected/_textfont.py index b37d165bd0..dfb2aff48e 100644 --- a/plotly/graph_objs/scatterpolargl/selected/_textfont.py +++ b/plotly/graph_objs/scatterpolargl/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.selected" _path_str = "scatterpolargl.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/unselected/__init__.py b/plotly/graph_objs/scatterpolargl/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatterpolargl/unselected/__init__.py +++ b/plotly/graph_objs/scatterpolargl/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatterpolargl/unselected/_marker.py b/plotly/graph_objs/scatterpolargl/unselected/_marker.py index 005c8a9e07..e85bac6d1d 100644 --- a/plotly/graph_objs/scatterpolargl/unselected/_marker.py +++ b/plotly/graph_objs/scatterpolargl/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.unselected" _path_str = "scatterpolargl.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterpolargl/unselected/_textfont.py b/plotly/graph_objs/scatterpolargl/unselected/_textfont.py index b05e65f33d..cbaf6dabf7 100644 --- a/plotly/graph_objs/scatterpolargl/unselected/_textfont.py +++ b/plotly/graph_objs/scatterpolargl/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterpolargl.unselected" _path_str = "scatterpolargl.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterpolargl.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/__init__.py b/plotly/graph_objs/scattersmith/__init__.py index 382e87019f..7cc31d4831 100644 --- a/plotly/graph_objs/scattersmith/__init__.py +++ b/plotly/graph_objs/scattersmith/__init__.py @@ -1,34 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scattersmith/_hoverlabel.py b/plotly/graph_objs/scattersmith/_hoverlabel.py index 28e0674fdb..be9142b1ae 100644 --- a/plotly/graph_objs/scattersmith/_hoverlabel.py +++ b/plotly/graph_objs/scattersmith/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scattersmith.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_legendgrouptitle.py b/plotly/graph_objs/scattersmith/_legendgrouptitle.py index fcb0392a7c..9cb2a5ef92 100644 --- a/plotly/graph_objs/scattersmith/_legendgrouptitle.py +++ b/plotly/graph_objs/scattersmith/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattersmith.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_line.py b/plotly/graph_objs/scattersmith/_line.py index 2ec059f0f0..cb8b4e3a05 100644 --- a/plotly/graph_objs/scattersmith/_line.py +++ b/plotly/graph_objs/scattersmith/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.line" _valid_props = { @@ -18,8 +19,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # backoff - # ------- @property def backoff(self): """ @@ -34,7 +33,7 @@ def backoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["backoff"] @@ -42,8 +41,6 @@ def backoff(self): def backoff(self, val): self["backoff"] = val - # backoffsrc - # ---------- @property def backoffsrc(self): """ @@ -62,8 +59,6 @@ def backoffsrc(self): def backoffsrc(self, val): self["backoffsrc"] = val - # color - # ----- @property def color(self): """ @@ -74,42 +69,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -121,8 +81,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -147,8 +105,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # shape - # ----- @property def shape(self): """ @@ -170,8 +126,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -192,8 +146,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -212,8 +164,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -248,13 +198,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - backoff=None, - backoffsrc=None, - color=None, - dash=None, - shape=None, - smoothing=None, - width=None, + backoff: int | float | None = None, + backoffsrc: str | None = None, + color: str | None = None, + dash: str | None = None, + shape: Any | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -297,14 +247,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -319,46 +266,15 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("backoff", None) - _v = backoff if backoff is not None else _v - if _v is not None: - self["backoff"] = _v - _v = arg.pop("backoffsrc", None) - _v = backoffsrc if backoffsrc is not None else _v - if _v is not None: - self["backoffsrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("backoff", arg, backoff) + self._init_provided("backoffsrc", arg, backoffsrc) + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("shape", arg, shape) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_marker.py b/plotly/graph_objs/scattersmith/_marker.py index 5b78c98321..838f270266 100644 --- a/plotly/graph_objs/scattersmith/_marker.py +++ b/plotly/graph_objs/scattersmith/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.marker" _valid_props = { @@ -40,8 +41,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -54,7 +53,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -62,8 +61,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # angleref - # -------- @property def angleref(self): """ @@ -85,8 +82,6 @@ def angleref(self): def angleref(self, val): self["angleref"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -105,8 +100,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -131,8 +124,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -156,8 +147,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -179,8 +168,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -203,8 +190,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -226,8 +211,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -241,49 +224,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattersmith.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -291,8 +239,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -318,8 +264,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -329,273 +273,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - smith.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattersmith.marker.colorbar.tickformatstopde - faults), sets the default property values to - use for elements of - scattersmith.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattersmith.marke - r.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scattersmith.marker.ColorBar @@ -606,8 +283,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -660,8 +335,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -680,8 +353,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # gradient - # -------- @property def gradient(self): """ @@ -691,22 +362,6 @@ def gradient(self): - A dict of string/value properties that will be passed to the Gradient constructor - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. - Returns ------- plotly.graph_objs.scattersmith.marker.Gradient @@ -717,8 +372,6 @@ def gradient(self): def gradient(self, val): self["gradient"] = val - # line - # ---- @property def line(self): """ @@ -728,98 +381,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scattersmith.marker.Line @@ -830,8 +391,6 @@ def line(self): def line(self, val): self["line"] = val - # maxdisplayed - # ------------ @property def maxdisplayed(self): """ @@ -851,8 +410,6 @@ def maxdisplayed(self): def maxdisplayed(self, val): self["maxdisplayed"] = val - # opacity - # ------- @property def opacity(self): """ @@ -864,7 +421,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -872,8 +429,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -892,8 +447,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -915,8 +468,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -937,8 +488,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -950,7 +499,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -958,8 +507,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -980,8 +527,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1003,8 +548,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1025,8 +568,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -1045,8 +586,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # standoff - # -------- @property def standoff(self): """ @@ -1061,7 +600,7 @@ def standoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["standoff"] @@ -1069,8 +608,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # standoffsrc - # ----------- @property def standoffsrc(self): """ @@ -1089,8 +626,6 @@ def standoffsrc(self): def standoffsrc(self, val): self["standoffsrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1194,7 +729,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1202,8 +737,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1222,8 +755,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1367,35 +898,35 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - angleref=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - standoff=None, - standoffsrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + angleref: Any | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + gradient: None | None = None, + line: None | None = None, + maxdisplayed: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + standoff: int | float | None = None, + standoffsrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1547,14 +1078,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1569,134 +1097,37 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("angleref", None) - _v = angleref if angleref is not None else _v - if _v is not None: - self["angleref"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("gradient", None) - _v = gradient if gradient is not None else _v - if _v is not None: - self["gradient"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxdisplayed", None) - _v = maxdisplayed if maxdisplayed is not None else _v - if _v is not None: - self["maxdisplayed"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("standoffsrc", None) - _v = standoffsrc if standoffsrc is not None else _v - if _v is not None: - self["standoffsrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("angleref", arg, angleref) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("gradient", arg, gradient) + self._init_provided("line", arg, line) + self._init_provided("maxdisplayed", arg, maxdisplayed) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("standoff", arg, standoff) + self._init_provided("standoffsrc", arg, standoffsrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_selected.py b/plotly/graph_objs/scattersmith/_selected.py index f556045466..84277aaf91 100644 --- a/plotly/graph_objs/scattersmith/_selected.py +++ b/plotly/graph_objs/scattersmith/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scattersmith.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scattersmith.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): font` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_stream.py b/plotly/graph_objs/scattersmith/_stream.py index bbc9dd202c..3b3cc42dd8 100644 --- a/plotly/graph_objs/scattersmith/_stream.py +++ b/plotly/graph_objs/scattersmith/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_textfont.py b/plotly/graph_objs/scattersmith/_textfont.py index 585ec66e3d..165171dcdf 100644 --- a/plotly/graph_objs/scattersmith/_textfont.py +++ b/plotly/graph_objs/scattersmith/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/_unselected.py b/plotly/graph_objs/scattersmith/_unselected.py index df78faca87..4337b84db8 100644 --- a/plotly/graph_objs/scattersmith/_unselected.py +++ b/plotly/graph_objs/scattersmith/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith" _path_str = "scattersmith.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattersmith.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scattersmith.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): xtfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/hoverlabel/__init__.py b/plotly/graph_objs/scattersmith/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattersmith/hoverlabel/__init__.py +++ b/plotly/graph_objs/scattersmith/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattersmith/hoverlabel/_font.py b/plotly/graph_objs/scattersmith/hoverlabel/_font.py index 2a71999436..c826ecf913 100644 --- a/plotly/graph_objs/scattersmith/hoverlabel/_font.py +++ b/plotly/graph_objs/scattersmith/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.hoverlabel" _path_str = "scattersmith.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/legendgrouptitle/__init__.py b/plotly/graph_objs/scattersmith/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattersmith/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scattersmith/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py b/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py index 29bc39f98b..7c755dfc3d 100644 --- a/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.legendgrouptitle" _path_str = "scattersmith.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/__init__.py b/plotly/graph_objs/scattersmith/marker/__init__.py index f1897fb0aa..f9d889ecb9 100644 --- a/plotly/graph_objs/scattersmith/marker/__init__.py +++ b/plotly/graph_objs/scattersmith/marker/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._gradient import Gradient - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], +) diff --git a/plotly/graph_objs/scattersmith/marker/_colorbar.py b/plotly/graph_objs/scattersmith/marker/_colorbar.py index 67c324202e..ccfa6b305a 100644 --- a/plotly/graph_objs/scattersmith/marker/_colorbar.py +++ b/plotly/graph_objs/scattersmith/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker" _path_str = "scattersmith.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattersmith.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scattersmith.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scattersmith.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scattersmith.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/_gradient.py b/plotly/graph_objs/scattersmith/marker/_gradient.py index e1e91ba222..8d5366019b 100644 --- a/plotly/graph_objs/scattersmith/marker/_gradient.py +++ b/plotly/graph_objs/scattersmith/marker/_gradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker" _path_str = "scattersmith.marker.gradient" _valid_props = {"color", "colorsrc", "type", "typesrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # type - # ---- @property def type(self): """ @@ -105,7 +65,7 @@ def type(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["type"] @@ -113,8 +73,6 @@ def type(self): def type(self, val): self["type"] = val - # typesrc - # ------- @property def typesrc(self): """ @@ -133,8 +91,6 @@ def typesrc(self): def typesrc(self, val): self["typesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -153,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + type: Any | None = None, + typesrc: str | None = None, + **kwargs, ): """ Construct a new Gradient object @@ -181,14 +143,11 @@ def __init__( ------- Gradient """ - super(Gradient, self).__init__("gradient") - + super().__init__("gradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,34 +162,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.marker.Gradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("typesrc", None) - _v = typesrc if typesrc is not None else _v - if _v is not None: - self["typesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("type", arg, type) + self._init_provided("typesrc", arg, typesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/_line.py b/plotly/graph_objs/scattersmith/marker/_line.py index 9ff74b103a..805d87a63e 100644 --- a/plotly/graph_objs/scattersmith/marker/_line.py +++ b/plotly/graph_objs/scattersmith/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker" _path_str = "scattersmith.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scattersmith.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/__init__.py b/plotly/graph_objs/scattersmith/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py index 9d22fc1a4e..9c8e4ac3da 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker.colorbar" _path_str = "scattersmith.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scattersmith/marker/colorbar/_tickformatstop.py index 48b94ce5fd..9cb80bbf74 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker.colorbar" _path_str = "scattersmith.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/_title.py b/plotly/graph_objs/scattersmith/marker/colorbar/_title.py index b6233e1f9f..785de4deb0 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/_title.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker.colorbar" _path_str = "scattersmith.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scattersmith.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/title/__init__.py b/plotly/graph_objs/scattersmith/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py b/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py index ae836aa723..42e874f1a7 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.marker.colorbar.title" _path_str = "scattersmith.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scattersmith.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/selected/__init__.py b/plotly/graph_objs/scattersmith/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattersmith/selected/__init__.py +++ b/plotly/graph_objs/scattersmith/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattersmith/selected/_marker.py b/plotly/graph_objs/scattersmith/selected/_marker.py index 17f622a091..de0de9fd03 100644 --- a/plotly/graph_objs/scattersmith/selected/_marker.py +++ b/plotly/graph_objs/scattersmith/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.selected" _path_str = "scattersmith.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/selected/_textfont.py b/plotly/graph_objs/scattersmith/selected/_textfont.py index d6207f10d5..77a97c58c2 100644 --- a/plotly/graph_objs/scattersmith/selected/_textfont.py +++ b/plotly/graph_objs/scattersmith/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.selected" _path_str = "scattersmith.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/unselected/__init__.py b/plotly/graph_objs/scattersmith/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scattersmith/unselected/__init__.py +++ b/plotly/graph_objs/scattersmith/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scattersmith/unselected/_marker.py b/plotly/graph_objs/scattersmith/unselected/_marker.py index 3e20eea5db..6ac1164f49 100644 --- a/plotly/graph_objs/scattersmith/unselected/_marker.py +++ b/plotly/graph_objs/scattersmith/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.unselected" _path_str = "scattersmith.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scattersmith/unselected/_textfont.py b/plotly/graph_objs/scattersmith/unselected/_textfont.py index f2fdfda870..65ac1aa408 100644 --- a/plotly/graph_objs/scattersmith/unselected/_textfont.py +++ b/plotly/graph_objs/scattersmith/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scattersmith.unselected" _path_str = "scattersmith.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scattersmith.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/__init__.py b/plotly/graph_objs/scatterternary/__init__.py index 382e87019f..7cc31d4831 100644 --- a/plotly/graph_objs/scatterternary/__init__.py +++ b/plotly/graph_objs/scatterternary/__init__.py @@ -1,34 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._textfont import Textfont - from ._unselected import Unselected - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], - [ - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._textfont.Textfont", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._textfont.Textfont", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/scatterternary/_hoverlabel.py b/plotly/graph_objs/scatterternary/_hoverlabel.py index 00ac960324..5358e7185c 100644 --- a/plotly/graph_objs/scatterternary/_hoverlabel.py +++ b/plotly/graph_objs/scatterternary/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.scatterternary.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_legendgrouptitle.py b/plotly/graph_objs/scatterternary/_legendgrouptitle.py index 71ceaf3c50..a067200785 100644 --- a/plotly/graph_objs/scatterternary/_legendgrouptitle.py +++ b/plotly/graph_objs/scatterternary/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterternary.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_line.py b/plotly/graph_objs/scatterternary/_line.py index c64fe4eee6..70dfe67fdf 100644 --- a/plotly/graph_objs/scatterternary/_line.py +++ b/plotly/graph_objs/scatterternary/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.line" _valid_props = { @@ -18,8 +19,6 @@ class Line(_BaseTraceHierarchyType): "width", } - # backoff - # ------- @property def backoff(self): """ @@ -34,7 +33,7 @@ def backoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["backoff"] @@ -42,8 +41,6 @@ def backoff(self): def backoff(self, val): self["backoff"] = val - # backoffsrc - # ---------- @property def backoffsrc(self): """ @@ -62,8 +59,6 @@ def backoffsrc(self): def backoffsrc(self, val): self["backoffsrc"] = val - # color - # ----- @property def color(self): """ @@ -74,42 +69,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -121,8 +81,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -147,8 +105,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # shape - # ----- @property def shape(self): """ @@ -170,8 +126,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # smoothing - # --------- @property def smoothing(self): """ @@ -192,8 +146,6 @@ def smoothing(self): def smoothing(self, val): self["smoothing"] = val - # width - # ----- @property def width(self): """ @@ -212,8 +164,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -248,13 +198,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - backoff=None, - backoffsrc=None, - color=None, - dash=None, - shape=None, - smoothing=None, - width=None, + backoff: int | float | None = None, + backoffsrc: str | None = None, + color: str | None = None, + dash: str | None = None, + shape: Any | None = None, + smoothing: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -297,14 +247,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -319,46 +266,15 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("backoff", None) - _v = backoff if backoff is not None else _v - if _v is not None: - self["backoff"] = _v - _v = arg.pop("backoffsrc", None) - _v = backoffsrc if backoffsrc is not None else _v - if _v is not None: - self["backoffsrc"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("smoothing", None) - _v = smoothing if smoothing is not None else _v - if _v is not None: - self["smoothing"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("backoff", arg, backoff) + self._init_provided("backoffsrc", arg, backoffsrc) + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("shape", arg, shape) + self._init_provided("smoothing", arg, smoothing) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_marker.py b/plotly/graph_objs/scatterternary/_marker.py index a8f50cb512..5261cb7e97 100644 --- a/plotly/graph_objs/scatterternary/_marker.py +++ b/plotly/graph_objs/scatterternary/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.marker" _valid_props = { @@ -40,8 +41,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -54,7 +53,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -62,8 +61,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # angleref - # -------- @property def angleref(self): """ @@ -85,8 +82,6 @@ def angleref(self): def angleref(self, val): self["angleref"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -105,8 +100,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -131,8 +124,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -156,8 +147,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -179,8 +168,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -203,8 +190,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -226,8 +211,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -241,49 +224,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatterternary.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -291,8 +239,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -318,8 +264,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -329,273 +273,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - ternary.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterternary.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterternary.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterternary.mar - ker.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.scatterternary.marker.ColorBar @@ -606,8 +283,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -660,8 +335,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -680,8 +353,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # gradient - # -------- @property def gradient(self): """ @@ -691,22 +362,6 @@ def gradient(self): - A dict of string/value properties that will be passed to the Gradient constructor - Supported dict properties: - - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. - Returns ------- plotly.graph_objs.scatterternary.marker.Gradient @@ -717,8 +372,6 @@ def gradient(self): def gradient(self, val): self["gradient"] = val - # line - # ---- @property def line(self): """ @@ -728,98 +381,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.scatterternary.marker.Line @@ -830,8 +391,6 @@ def line(self): def line(self, val): self["line"] = val - # maxdisplayed - # ------------ @property def maxdisplayed(self): """ @@ -851,8 +410,6 @@ def maxdisplayed(self): def maxdisplayed(self, val): self["maxdisplayed"] = val - # opacity - # ------- @property def opacity(self): """ @@ -864,7 +421,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -872,8 +429,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -892,8 +447,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -915,8 +468,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -937,8 +488,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -950,7 +499,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -958,8 +507,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -980,8 +527,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -1003,8 +548,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -1025,8 +568,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -1045,8 +586,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # standoff - # -------- @property def standoff(self): """ @@ -1061,7 +600,7 @@ def standoff(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["standoff"] @@ -1069,8 +608,6 @@ def standoff(self): def standoff(self, val): self["standoff"] = val - # standoffsrc - # ----------- @property def standoffsrc(self): """ @@ -1089,8 +626,6 @@ def standoffsrc(self): def standoffsrc(self, val): self["standoffsrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1194,7 +729,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1202,8 +737,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1222,8 +755,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1367,35 +898,35 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - angleref=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - gradient=None, - line=None, - maxdisplayed=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - standoff=None, - standoffsrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + angleref: Any | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + gradient: None | None = None, + line: None | None = None, + maxdisplayed: int | float | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + standoff: int | float | None = None, + standoffsrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1547,14 +1078,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1569,134 +1097,37 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("angleref", None) - _v = angleref if angleref is not None else _v - if _v is not None: - self["angleref"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("gradient", None) - _v = gradient if gradient is not None else _v - if _v is not None: - self["gradient"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("maxdisplayed", None) - _v = maxdisplayed if maxdisplayed is not None else _v - if _v is not None: - self["maxdisplayed"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("standoff", None) - _v = standoff if standoff is not None else _v - if _v is not None: - self["standoff"] = _v - _v = arg.pop("standoffsrc", None) - _v = standoffsrc if standoffsrc is not None else _v - if _v is not None: - self["standoffsrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("angleref", arg, angleref) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("gradient", arg, gradient) + self._init_provided("line", arg, line) + self._init_provided("maxdisplayed", arg, maxdisplayed) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("standoff", arg, standoff) + self._init_provided("standoffsrc", arg, standoffsrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_selected.py b/plotly/graph_objs/scatterternary/_selected.py index ea416db8aa..bb41f6ccad 100644 --- a/plotly/graph_objs/scatterternary/_selected.py +++ b/plotly/graph_objs/scatterternary/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.selected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.scatterternary.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -51,11 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of selected points. - Returns ------- plotly.graph_objs.scatterternary.selected.Textfont @@ -66,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -79,7 +60,13 @@ def _prop_descriptions(self): xtfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Selected object @@ -100,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_stream.py b/plotly/graph_objs/scatterternary/_stream.py index 6f12b626be..f59263fd69 100644 --- a/plotly/graph_objs/scatterternary/_stream.py +++ b/plotly/graph_objs/scatterternary/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_textfont.py b/plotly/graph_objs/scatterternary/_textfont.py index b4c9e896d5..c259959f6b 100644 --- a/plotly/graph_objs/scatterternary/_textfont.py +++ b/plotly/graph_objs/scatterternary/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/_unselected.py b/plotly/graph_objs/scatterternary/_unselected.py index 5546e8c40b..390721561a 100644 --- a/plotly/graph_objs/scatterternary/_unselected.py +++ b/plotly/graph_objs/scatterternary/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary" _path_str = "scatterternary.unselected" _valid_props = {"marker", "textfont"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatterternary.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # textfont - # -------- @property def textfont(self): """ @@ -54,12 +39,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - Sets the text font color of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.scatterternary.unselected.Textfont @@ -70,8 +49,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -83,7 +60,13 @@ def _prop_descriptions(self): Textfont` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, textfont=None, **kwargs): + def __init__( + self, + arg=None, + marker: None | None = None, + textfont: None | None = None, + **kwargs, + ): """ Construct a new Unselected object @@ -104,14 +87,11 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -126,26 +106,10 @@ def __init__(self, arg=None, marker=None, textfont=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) + self._init_provided("textfont", arg, textfont) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/hoverlabel/__init__.py b/plotly/graph_objs/scatterternary/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterternary/hoverlabel/__init__.py +++ b/plotly/graph_objs/scatterternary/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterternary/hoverlabel/_font.py b/plotly/graph_objs/scatterternary/hoverlabel/_font.py index 30b26aa4ba..a319ebaa22 100644 --- a/plotly/graph_objs/scatterternary/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterternary/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.hoverlabel" _path_str = "scatterternary.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/legendgrouptitle/__init__.py b/plotly/graph_objs/scatterternary/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterternary/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/scatterternary/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py b/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py index 6880a3857b..add3807d7d 100644 --- a/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.legendgrouptitle" _path_str = "scatterternary.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/__init__.py b/plotly/graph_objs/scatterternary/marker/__init__.py index f1897fb0aa..f9d889ecb9 100644 --- a/plotly/graph_objs/scatterternary/marker/__init__.py +++ b/plotly/graph_objs/scatterternary/marker/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._gradient import Gradient - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._gradient.Gradient", "._line.Line"], +) diff --git a/plotly/graph_objs/scatterternary/marker/_colorbar.py b/plotly/graph_objs/scatterternary/marker/_colorbar.py index f0a2344cf5..2034fa9d4c 100644 --- a/plotly/graph_objs/scatterternary/marker/_colorbar.py +++ b/plotly/graph_objs/scatterternary/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker" _path_str = "scatterternary.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterternary.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.scatterternary.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/_gradient.py b/plotly/graph_objs/scatterternary/marker/_gradient.py index b5face9cc4..04313f7453 100644 --- a/plotly/graph_objs/scatterternary/marker/_gradient.py +++ b/plotly/graph_objs/scatterternary/marker/_gradient.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Gradient(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker" _path_str = "scatterternary.marker.gradient" _valid_props = {"color", "colorsrc", "type", "typesrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # type - # ---- @property def type(self): """ @@ -105,7 +65,7 @@ def type(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["type"] @@ -113,8 +73,6 @@ def type(self): def type(self, val): self["type"] = val - # typesrc - # ------- @property def typesrc(self): """ @@ -133,8 +91,6 @@ def typesrc(self): def typesrc(self, val): self["typesrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -153,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, type=None, typesrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + type: Any | None = None, + typesrc: str | None = None, + **kwargs, ): """ Construct a new Gradient object @@ -181,14 +143,11 @@ def __init__( ------- Gradient """ - super(Gradient, self).__init__("gradient") - + super().__init__("gradient") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,34 +162,12 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.marker.Gradient`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - _v = arg.pop("typesrc", None) - _v = typesrc if typesrc is not None else _v - if _v is not None: - self["typesrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("type", arg, type) + self._init_provided("typesrc", arg, typesrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/_line.py b/plotly/graph_objs/scatterternary/marker/_line.py index 28c73d58e8..8df580401f 100644 --- a/plotly/graph_objs/scatterternary/marker/_line.py +++ b/plotly/graph_objs/scatterternary/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker" _path_str = "scatterternary.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to scatterternary.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py b/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py index 5a07c4f172..e699522d1a 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker.colorbar" _path_str = "scatterternary.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py index 20545634ca..b145692008 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker.colorbar" _path_str = "scatterternary.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/_title.py b/plotly/graph_objs/scatterternary/marker/colorbar/_title.py index 1dfe75b424..cead484389 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/_title.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker.colorbar" _path_str = "scatterternary.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.scatterternary.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py b/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py index 3771ba64a7..ba138606cc 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.marker.colorbar.title" _path_str = "scatterternary.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.scatterternary.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/selected/__init__.py b/plotly/graph_objs/scatterternary/selected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatterternary/selected/__init__.py +++ b/plotly/graph_objs/scatterternary/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatterternary/selected/_marker.py b/plotly/graph_objs/scatterternary/selected/_marker.py index 26bb1a9435..17d39b5697 100644 --- a/plotly/graph_objs/scatterternary/selected/_marker.py +++ b/plotly/graph_objs/scatterternary/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.selected" _path_str = "scatterternary.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/selected/_textfont.py b/plotly/graph_objs/scatterternary/selected/_textfont.py index afb97493eb..a00973f6d6 100644 --- a/plotly/graph_objs/scatterternary/selected/_textfont.py +++ b/plotly/graph_objs/scatterternary/selected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.selected" _path_str = "scatterternary.selected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -78,7 +40,7 @@ def _prop_descriptions(self): Sets the text font color of selected points. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -95,14 +57,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,22 +76,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.selected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/unselected/__init__.py b/plotly/graph_objs/scatterternary/unselected/__init__.py index ae964f0b65..473168fdb5 100644 --- a/plotly/graph_objs/scatterternary/unselected/__init__.py +++ b/plotly/graph_objs/scatterternary/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.Marker", "._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.Marker", "._textfont.Textfont"] +) diff --git a/plotly/graph_objs/scatterternary/unselected/_marker.py b/plotly/graph_objs/scatterternary/unselected/_marker.py index bef9394b20..d9fefd7822 100644 --- a/plotly/graph_objs/scatterternary/unselected/_marker.py +++ b/plotly/graph_objs/scatterternary/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.unselected" _path_str = "scatterternary.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/scatterternary/unselected/_textfont.py b/plotly/graph_objs/scatterternary/unselected/_textfont.py index 1c452ced1d..ff51700998 100644 --- a/plotly/graph_objs/scatterternary/unselected/_textfont.py +++ b/plotly/graph_objs/scatterternary/unselected/_textfont.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "scatterternary.unselected" _path_str = "scatterternary.unselected.textfont" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -80,7 +42,7 @@ def _prop_descriptions(self): only when a selection exists. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Textfont object @@ -98,14 +60,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -120,22 +79,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.scatterternary.unselected.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/__init__.py b/plotly/graph_objs/splom/__init__.py index fc09843582..a047d25012 100644 --- a/plotly/graph_objs/splom/__init__.py +++ b/plotly/graph_objs/splom/__init__.py @@ -1,42 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._diagonal import Diagonal - from ._dimension import Dimension - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import dimension - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".dimension", - ".hoverlabel", - ".legendgrouptitle", - ".marker", - ".selected", - ".unselected", - ], - [ - "._diagonal.Diagonal", - "._dimension.Dimension", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".dimension", + ".hoverlabel", + ".legendgrouptitle", + ".marker", + ".selected", + ".unselected", + ], + [ + "._diagonal.Diagonal", + "._dimension.Dimension", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/splom/_diagonal.py b/plotly/graph_objs/splom/_diagonal.py index fbfdc261a5..84d1b1e4d5 100644 --- a/plotly/graph_objs/splom/_diagonal.py +++ b/plotly/graph_objs/splom/_diagonal.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Diagonal(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.diagonal" _valid_props = {"visible"} - # visible - # ------- @property def visible(self): """ @@ -31,8 +30,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): displayed. """ - def __init__(self, arg=None, visible=None, **kwargs): + def __init__(self, arg=None, visible: bool | None = None, **kwargs): """ Construct a new Diagonal object @@ -59,14 +56,11 @@ def __init__(self, arg=None, visible=None, **kwargs): ------- Diagonal """ - super(Diagonal, self).__init__("diagonal") - + super().__init__("diagonal") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -81,22 +75,9 @@ def __init__(self, arg=None, visible=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.Diagonal`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_dimension.py b/plotly/graph_objs/splom/_dimension.py index c9a7ffe266..552384e7ed 100644 --- a/plotly/graph_objs/splom/_dimension.py +++ b/plotly/graph_objs/splom/_dimension.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Dimension(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.dimension" _valid_props = { @@ -18,8 +19,6 @@ class Dimension(_BaseTraceHierarchyType): "visible", } - # axis - # ---- @property def axis(self): """ @@ -29,19 +28,6 @@ def axis(self): - A dict of string/value properties that will be passed to the Axis constructor - Supported dict properties: - - matches - Determines whether or not the x & y axes - generated by this dimension match. Equivalent - to setting the `matches` axis attribute in the - layout with the correct axis id. - type - Sets the axis type for this dimension's - generated x and y axes. Note that the axis - `type` values set in layout take precedence - over this attribute. - Returns ------- plotly.graph_objs.splom.dimension.Axis @@ -52,8 +38,6 @@ def axis(self): def axis(self, val): self["axis"] = val - # label - # ----- @property def label(self): """ @@ -73,8 +57,6 @@ def label(self): def label(self, val): self["label"] = val - # name - # ---- @property def name(self): """ @@ -100,8 +82,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -128,8 +108,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # values - # ------ @property def values(self): """ @@ -140,7 +118,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -148,8 +126,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -168,8 +144,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # visible - # ------- @property def visible(self): """ @@ -190,8 +164,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -234,13 +206,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - axis=None, - label=None, - name=None, - templateitemname=None, - values=None, - valuessrc=None, - visible=None, + axis: None | None = None, + label: str | None = None, + name: str | None = None, + templateitemname: str | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -291,14 +263,11 @@ def __init__( ------- Dimension """ - super(Dimension, self).__init__("dimensions") - + super().__init__("dimensions") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -313,46 +282,15 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.Dimension`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("axis", None) - _v = axis if axis is not None else _v - if _v is not None: - self["axis"] = _v - _v = arg.pop("label", None) - _v = label if label is not None else _v - if _v is not None: - self["label"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("axis", arg, axis) + self._init_provided("label", arg, label) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_hoverlabel.py b/plotly/graph_objs/splom/_hoverlabel.py index 6730d8e3b2..878607c2e5 100644 --- a/plotly/graph_objs/splom/_hoverlabel.py +++ b/plotly/graph_objs/splom/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.splom.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_legendgrouptitle.py b/plotly/graph_objs/splom/_legendgrouptitle.py index ba249acc8c..de8daa4fe4 100644 --- a/plotly/graph_objs/splom/_legendgrouptitle.py +++ b/plotly/graph_objs/splom/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.splom.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_marker.py b/plotly/graph_objs/splom/_marker.py index 741c7de383..319bf96b87 100644 --- a/plotly/graph_objs/splom/_marker.py +++ b/plotly/graph_objs/splom/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.marker" _valid_props = { @@ -35,8 +36,6 @@ class Marker(_BaseTraceHierarchyType): "symbolsrc", } - # angle - # ----- @property def angle(self): """ @@ -49,7 +48,7 @@ def angle(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["angle"] @@ -57,8 +56,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # anglesrc - # -------- @property def anglesrc(self): """ @@ -77,8 +74,6 @@ def anglesrc(self): def anglesrc(self, val): self["anglesrc"] = val - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -103,8 +98,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -128,8 +121,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -151,8 +142,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -175,8 +164,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -198,8 +185,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -213,49 +198,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to splom.marker.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -263,8 +213,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -290,8 +238,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -301,273 +247,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.splom.m - arker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.splom.marker.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - splom.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.splom.marker.color - bar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.splom.marker.ColorBar @@ -578,8 +257,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -632,8 +309,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -652,8 +327,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # line - # ---- @property def line(self): """ @@ -663,98 +336,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.splom.marker.Line @@ -765,8 +346,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -778,7 +357,7 @@ def opacity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["opacity"] @@ -786,8 +365,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # opacitysrc - # ---------- @property def opacitysrc(self): """ @@ -806,8 +383,6 @@ def opacitysrc(self): def opacitysrc(self, val): self["opacitysrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -829,8 +404,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -851,8 +424,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # size - # ---- @property def size(self): """ @@ -864,7 +435,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -872,8 +443,6 @@ def size(self): def size(self, val): self["size"] = val - # sizemin - # ------- @property def sizemin(self): """ @@ -894,8 +463,6 @@ def sizemin(self): def sizemin(self, val): self["sizemin"] = val - # sizemode - # -------- @property def sizemode(self): """ @@ -917,8 +484,6 @@ def sizemode(self): def sizemode(self, val): self["sizemode"] = val - # sizeref - # ------- @property def sizeref(self): """ @@ -939,8 +504,6 @@ def sizeref(self): def sizeref(self, val): self["sizeref"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -959,8 +522,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # symbol - # ------ @property def symbol(self): """ @@ -1064,7 +625,7 @@ def symbol(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["symbol"] @@ -1072,8 +633,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # symbolsrc - # --------- @property def symbolsrc(self): """ @@ -1092,8 +651,6 @@ def symbolsrc(self): def symbolsrc(self, val): self["symbolsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1218,30 +775,30 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - anglesrc=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorbar=None, - colorscale=None, - colorsrc=None, - line=None, - opacity=None, - opacitysrc=None, - reversescale=None, - showscale=None, - size=None, - sizemin=None, - sizemode=None, - sizeref=None, - sizesrc=None, - symbol=None, - symbolsrc=None, + angle: int | float | None = None, + anglesrc: str | None = None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + opacitysrc: str | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, + size: int | float | None = None, + sizemin: int | float | None = None, + sizemode: Any | None = None, + sizeref: int | float | None = None, + sizesrc: str | None = None, + symbol: Any | None = None, + symbolsrc: str | None = None, **kwargs, ): """ @@ -1373,14 +930,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1395,114 +949,32 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("anglesrc", None) - _v = anglesrc if anglesrc is not None else _v - if _v is not None: - self["anglesrc"] = _v - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("opacitysrc", None) - _v = opacitysrc if opacitysrc is not None else _v - if _v is not None: - self["opacitysrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizemin", None) - _v = sizemin if sizemin is not None else _v - if _v is not None: - self["sizemin"] = _v - _v = arg.pop("sizemode", None) - _v = sizemode if sizemode is not None else _v - if _v is not None: - self["sizemode"] = _v - _v = arg.pop("sizeref", None) - _v = sizeref if sizeref is not None else _v - if _v is not None: - self["sizeref"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - _v = arg.pop("symbolsrc", None) - _v = symbolsrc if symbolsrc is not None else _v - if _v is not None: - self["symbolsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("anglesrc", arg, anglesrc) + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("opacitysrc", arg, opacitysrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) + self._init_provided("size", arg, size) + self._init_provided("sizemin", arg, sizemin) + self._init_provided("sizemode", arg, sizemode) + self._init_provided("sizeref", arg, sizeref) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("symbol", arg, symbol) + self._init_provided("symbolsrc", arg, symbolsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_selected.py b/plotly/graph_objs/splom/_selected.py index 391699e3e3..4d80d30361 100644 --- a/plotly/graph_objs/splom/_selected.py +++ b/plotly/graph_objs/splom/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.splom.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -68,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -90,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_stream.py b/plotly/graph_objs/splom/_stream.py index c97ab999fe..697fe82e3d 100644 --- a/plotly/graph_objs/splom/_stream.py +++ b/plotly/graph_objs/splom/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/_unselected.py b/plotly/graph_objs/splom/_unselected.py index 70ba03e6c2..fb47258d54 100644 --- a/plotly/graph_objs/splom/_unselected.py +++ b/plotly/graph_objs/splom/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom" _path_str = "splom.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.splom.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -71,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/dimension/__init__.py b/plotly/graph_objs/splom/dimension/__init__.py index fa2cdec08b..3f149bf98a 100644 --- a/plotly/graph_objs/splom/dimension/__init__.py +++ b/plotly/graph_objs/splom/dimension/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._axis import Axis -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._axis.Axis"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._axis.Axis"]) diff --git a/plotly/graph_objs/splom/dimension/_axis.py b/plotly/graph_objs/splom/dimension/_axis.py index 9d82b980af..d2dd753a05 100644 --- a/plotly/graph_objs/splom/dimension/_axis.py +++ b/plotly/graph_objs/splom/dimension/_axis.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Axis(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.dimension" _path_str = "splom.dimension.axis" _valid_props = {"matches", "type"} - # matches - # ------- @property def matches(self): """ @@ -32,8 +31,6 @@ def matches(self): def matches(self, val): self["matches"] = val - # type - # ---- @property def type(self): """ @@ -55,8 +52,6 @@ def type(self): def type(self, val): self["type"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -71,7 +66,9 @@ def _prop_descriptions(self): take precedence over this attribute. """ - def __init__(self, arg=None, matches=None, type=None, **kwargs): + def __init__( + self, arg=None, matches: bool | None = None, type: Any | None = None, **kwargs + ): """ Construct a new Axis object @@ -95,14 +92,11 @@ def __init__(self, arg=None, matches=None, type=None, **kwargs): ------- Axis """ - super(Axis, self).__init__("axis") - + super().__init__("axis") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -117,26 +111,10 @@ def __init__(self, arg=None, matches=None, type=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.dimension.Axis`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("matches", None) - _v = matches if matches is not None else _v - if _v is not None: - self["matches"] = _v - _v = arg.pop("type", None) - _v = type if type is not None else _v - if _v is not None: - self["type"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("matches", arg, matches) + self._init_provided("type", arg, type) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/hoverlabel/__init__.py b/plotly/graph_objs/splom/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/splom/hoverlabel/__init__.py +++ b/plotly/graph_objs/splom/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/splom/hoverlabel/_font.py b/plotly/graph_objs/splom/hoverlabel/_font.py index 32c53ae9b3..326e204698 100644 --- a/plotly/graph_objs/splom/hoverlabel/_font.py +++ b/plotly/graph_objs/splom/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.hoverlabel" _path_str = "splom.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/legendgrouptitle/__init__.py b/plotly/graph_objs/splom/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/splom/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/splom/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/splom/legendgrouptitle/_font.py b/plotly/graph_objs/splom/legendgrouptitle/_font.py index 42cdd4ebc5..2241fc8db0 100644 --- a/plotly/graph_objs/splom/legendgrouptitle/_font.py +++ b/plotly/graph_objs/splom/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.legendgrouptitle" _path_str = "splom.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/marker/__init__.py b/plotly/graph_objs/splom/marker/__init__.py index 8481520e3c..ff536ec8b2 100644 --- a/plotly/graph_objs/splom/marker/__init__.py +++ b/plotly/graph_objs/splom/marker/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line"] +) diff --git a/plotly/graph_objs/splom/marker/_colorbar.py b/plotly/graph_objs/splom/marker/_colorbar.py index ecef7af8e6..d936dff705 100644 --- a/plotly/graph_objs/splom/marker/_colorbar.py +++ b/plotly/graph_objs/splom/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.marker" _path_str = "splom.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.splom.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.splom.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.splom.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.splom.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/marker/_line.py b/plotly/graph_objs/splom/marker/_line.py index a6263ebb07..4d06ada09e 100644 --- a/plotly/graph_objs/splom/marker/_line.py +++ b/plotly/graph_objs/splom/marker/_line.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.marker" _path_str = "splom.marker.line" _valid_props = { @@ -23,8 +24,6 @@ class Line(_BaseTraceHierarchyType): "widthsrc", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -49,8 +48,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -74,8 +71,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -122,8 +115,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -145,8 +136,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # color - # ----- @property def color(self): """ @@ -160,49 +149,14 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A number that will be interpreted as a color according to splom.marker.line.colorscale - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -210,8 +164,6 @@ def color(self): def color(self, val): self["color"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -237,8 +189,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -292,8 +242,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -312,8 +260,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -336,8 +282,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # width - # ----- @property def width(self): """ @@ -349,7 +293,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -357,8 +301,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -377,8 +319,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -465,18 +405,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - color=None, - coloraxis=None, - colorscale=None, - colorsrc=None, - reversescale=None, - width=None, - widthsrc=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + color: str | None = None, + coloraxis: str | None = None, + colorscale: str | None = None, + colorsrc: str | None = None, + reversescale: bool | None = None, + width: int | float | None = None, + widthsrc: str | None = None, **kwargs, ): """ @@ -571,14 +511,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -593,66 +530,20 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("color", arg, color) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/marker/colorbar/__init__.py b/plotly/graph_objs/splom/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/splom/marker/colorbar/__init__.py +++ b/plotly/graph_objs/splom/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/splom/marker/colorbar/_tickfont.py b/plotly/graph_objs/splom/marker/colorbar/_tickfont.py index f2de99543b..80ab432f4d 100644 --- a/plotly/graph_objs/splom/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/splom/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.marker.colorbar" _path_str = "splom.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py index 7cd0145ad2..b3d85a24b9 100644 --- a/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/splom/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.marker.colorbar" _path_str = "splom.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/marker/colorbar/_title.py b/plotly/graph_objs/splom/marker/colorbar/_title.py index 4d797f7876..fa7121171d 100644 --- a/plotly/graph_objs/splom/marker/colorbar/_title.py +++ b/plotly/graph_objs/splom/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.marker.colorbar" _path_str = "splom.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.splom.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/marker/colorbar/title/__init__.py b/plotly/graph_objs/splom/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/splom/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/splom/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/splom/marker/colorbar/title/_font.py b/plotly/graph_objs/splom/marker/colorbar/title/_font.py index c1c9028036..4f18155531 100644 --- a/plotly/graph_objs/splom/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/splom/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.marker.colorbar.title" _path_str = "splom.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.splom.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/selected/__init__.py b/plotly/graph_objs/splom/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/splom/selected/__init__.py +++ b/plotly/graph_objs/splom/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/splom/selected/_marker.py b/plotly/graph_objs/splom/selected/_marker.py index 0d8d5e39b4..40aa001a26 100644 --- a/plotly/graph_objs/splom/selected/_marker.py +++ b/plotly/graph_objs/splom/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.selected" _path_str = "splom.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/splom/unselected/__init__.py b/plotly/graph_objs/splom/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/splom/unselected/__init__.py +++ b/plotly/graph_objs/splom/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/splom/unselected/_marker.py b/plotly/graph_objs/splom/unselected/_marker.py index b86833b9c0..45e037937b 100644 --- a/plotly/graph_objs/splom/unselected/_marker.py +++ b/plotly/graph_objs/splom/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "splom.unselected" _path_str = "splom.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.splom.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/__init__.py b/plotly/graph_objs/streamtube/__init__.py index 09773e9fa9..76d3753932 100644 --- a/plotly/graph_objs/streamtube/__init__.py +++ b/plotly/graph_objs/streamtube/__init__.py @@ -1,30 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._lighting import Lighting - from ._lightposition import Lightposition - from ._starts import Starts - from ._stream import Stream - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._lighting.Lighting", - "._lightposition.Lightposition", - "._starts.Starts", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._starts.Starts", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/streamtube/_colorbar.py b/plotly/graph_objs/streamtube/_colorbar.py index 86e15098f2..6c74fce480 100644 --- a/plotly/graph_objs/streamtube/_colorbar.py +++ b/plotly/graph_objs/streamtube/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.streamtube.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.streamtube.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -912,8 +637,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.streamtube.colorbar.Tickformatstop @@ -924,8 +647,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -948,8 +669,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -973,8 +692,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -999,8 +716,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1019,8 +734,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1046,8 +759,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1067,8 +778,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1090,8 +799,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1111,8 +818,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1125,7 +830,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1133,8 +838,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1153,8 +856,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1166,7 +867,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1174,8 +875,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1194,8 +893,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1214,8 +911,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1225,18 +920,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.streamtube.colorbar.Title @@ -1247,8 +930,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1273,8 +954,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1297,8 +976,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1317,8 +994,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1340,8 +1015,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1366,8 +1039,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1390,8 +1061,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1410,8 +1079,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1433,8 +1100,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1681,55 +1346,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1984,14 +1649,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2006,214 +1668,57 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/_hoverlabel.py b/plotly/graph_objs/streamtube/_hoverlabel.py index 8b643599ea..b1460d4fe9 100644 --- a/plotly/graph_objs/streamtube/_hoverlabel.py +++ b/plotly/graph_objs/streamtube/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.streamtube.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/_legendgrouptitle.py b/plotly/graph_objs/streamtube/_legendgrouptitle.py index f8e894a8ae..74f6e83510 100644 --- a/plotly/graph_objs/streamtube/_legendgrouptitle.py +++ b/plotly/graph_objs/streamtube/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.streamtube.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.streamtube.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/_lighting.py b/plotly/graph_objs/streamtube/_lighting.py index c109365928..5cd8ff2585 100644 --- a/plotly/graph_objs/streamtube/_lighting.py +++ b/plotly/graph_objs/streamtube/_lighting.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lighting(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.lighting" _valid_props = { @@ -18,8 +19,6 @@ class Lighting(_BaseTraceHierarchyType): "vertexnormalsepsilon", } - # ambient - # ------- @property def ambient(self): """ @@ -39,8 +38,6 @@ def ambient(self): def ambient(self, val): self["ambient"] = val - # diffuse - # ------- @property def diffuse(self): """ @@ -60,8 +57,6 @@ def diffuse(self): def diffuse(self, val): self["diffuse"] = val - # facenormalsepsilon - # ------------------ @property def facenormalsepsilon(self): """ @@ -81,8 +76,6 @@ def facenormalsepsilon(self): def facenormalsepsilon(self, val): self["facenormalsepsilon"] = val - # fresnel - # ------- @property def fresnel(self): """ @@ -103,8 +96,6 @@ def fresnel(self): def fresnel(self, val): self["fresnel"] = val - # roughness - # --------- @property def roughness(self): """ @@ -124,8 +115,6 @@ def roughness(self): def roughness(self, val): self["roughness"] = val - # specular - # -------- @property def specular(self): """ @@ -145,8 +134,6 @@ def specular(self): def specular(self, val): self["specular"] = val - # vertexnormalsepsilon - # -------------------- @property def vertexnormalsepsilon(self): """ @@ -166,8 +153,6 @@ def vertexnormalsepsilon(self): def vertexnormalsepsilon(self, val): self["vertexnormalsepsilon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -199,13 +184,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, + ambient: int | float | None = None, + diffuse: int | float | None = None, + facenormalsepsilon: int | float | None = None, + fresnel: int | float | None = None, + roughness: int | float | None = None, + specular: int | float | None = None, + vertexnormalsepsilon: int | float | None = None, **kwargs, ): """ @@ -245,14 +230,11 @@ def __init__( ------- Lighting """ - super(Lighting, self).__init__("lighting") - + super().__init__("lighting") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -267,46 +249,15 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.Lighting`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - _v = ambient if ambient is not None else _v - if _v is not None: - self["ambient"] = _v - _v = arg.pop("diffuse", None) - _v = diffuse if diffuse is not None else _v - if _v is not None: - self["diffuse"] = _v - _v = arg.pop("facenormalsepsilon", None) - _v = facenormalsepsilon if facenormalsepsilon is not None else _v - if _v is not None: - self["facenormalsepsilon"] = _v - _v = arg.pop("fresnel", None) - _v = fresnel if fresnel is not None else _v - if _v is not None: - self["fresnel"] = _v - _v = arg.pop("roughness", None) - _v = roughness if roughness is not None else _v - if _v is not None: - self["roughness"] = _v - _v = arg.pop("specular", None) - _v = specular if specular is not None else _v - if _v is not None: - self["specular"] = _v - _v = arg.pop("vertexnormalsepsilon", None) - _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - if _v is not None: - self["vertexnormalsepsilon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("ambient", arg, ambient) + self._init_provided("diffuse", arg, diffuse) + self._init_provided("facenormalsepsilon", arg, facenormalsepsilon) + self._init_provided("fresnel", arg, fresnel) + self._init_provided("roughness", arg, roughness) + self._init_provided("specular", arg, specular) + self._init_provided("vertexnormalsepsilon", arg, vertexnormalsepsilon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/_lightposition.py b/plotly/graph_objs/streamtube/_lightposition.py index d42b300a24..27c5f879f7 100644 --- a/plotly/graph_objs/streamtube/_lightposition.py +++ b/plotly/graph_objs/streamtube/_lightposition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.lightposition" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -30,8 +29,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -50,8 +47,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -70,8 +65,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): vertex. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Lightposition object @@ -110,14 +110,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Lightposition """ - super(Lightposition, self).__init__("lightposition") - + super().__init__("lightposition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.streamtube.Lightposition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/_starts.py b/plotly/graph_objs/streamtube/_starts.py index 8eaeb8062c..a8324bb076 100644 --- a/plotly/graph_objs/streamtube/_starts.py +++ b/plotly/graph_objs/streamtube/_starts.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Starts(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.starts" _valid_props = {"x", "xsrc", "y", "ysrc", "z", "zsrc"} - # x - # - @property def x(self): """ @@ -23,7 +22,7 @@ def x(self): Returns ------- - numpy.ndarray + NDArray """ return self["x"] @@ -31,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # xsrc - # ---- @property def xsrc(self): """ @@ -51,8 +48,6 @@ def xsrc(self): def xsrc(self, val): self["xsrc"] = val - # y - # - @property def y(self): """ @@ -64,7 +59,7 @@ def y(self): Returns ------- - numpy.ndarray + NDArray """ return self["y"] @@ -72,8 +67,6 @@ def y(self): def y(self, val): self["y"] = val - # ysrc - # ---- @property def ysrc(self): """ @@ -92,8 +85,6 @@ def ysrc(self): def ysrc(self, val): self["ysrc"] = val - # z - # - @property def z(self): """ @@ -105,7 +96,7 @@ def z(self): Returns ------- - numpy.ndarray + NDArray """ return self["z"] @@ -113,8 +104,6 @@ def z(self): def z(self, val): self["z"] = val - # zsrc - # ---- @property def zsrc(self): """ @@ -133,8 +122,6 @@ def zsrc(self): def zsrc(self, val): self["zsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -161,12 +148,12 @@ def _prop_descriptions(self): def __init__( self, arg=None, - x=None, - xsrc=None, - y=None, - ysrc=None, - z=None, - zsrc=None, + x: NDArray | None = None, + xsrc: str | None = None, + y: NDArray | None = None, + ysrc: str | None = None, + z: NDArray | None = None, + zsrc: str | None = None, **kwargs, ): """ @@ -201,14 +188,11 @@ def __init__( ------- Starts """ - super(Starts, self).__init__("starts") - + super().__init__("starts") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -223,42 +207,14 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.Starts`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xsrc", None) - _v = xsrc if xsrc is not None else _v - if _v is not None: - self["xsrc"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("ysrc", None) - _v = ysrc if ysrc is not None else _v - if _v is not None: - self["ysrc"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - _v = arg.pop("zsrc", None) - _v = zsrc if zsrc is not None else _v - if _v is not None: - self["zsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("xsrc", arg, xsrc) + self._init_provided("y", arg, y) + self._init_provided("ysrc", arg, ysrc) + self._init_provided("z", arg, z) + self._init_provided("zsrc", arg, zsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/_stream.py b/plotly/graph_objs/streamtube/_stream.py index c9eaaf8e93..47798f3c9f 100644 --- a/plotly/graph_objs/streamtube/_stream.py +++ b/plotly/graph_objs/streamtube/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.streamtube.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/colorbar/__init__.py b/plotly/graph_objs/streamtube/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/streamtube/colorbar/__init__.py +++ b/plotly/graph_objs/streamtube/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/streamtube/colorbar/_tickfont.py b/plotly/graph_objs/streamtube/colorbar/_tickfont.py index 0f597fb9c9..0de6bfe313 100644 --- a/plotly/graph_objs/streamtube/colorbar/_tickfont.py +++ b/plotly/graph_objs/streamtube/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube.colorbar" _path_str = "streamtube.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py b/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py index 25a8b253f1..e67dccb19b 100644 --- a/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/streamtube/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube.colorbar" _path_str = "streamtube.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/colorbar/_title.py b/plotly/graph_objs/streamtube/colorbar/_title.py index 6c24e5e24d..bfecb9cf62 100644 --- a/plotly/graph_objs/streamtube/colorbar/_title.py +++ b/plotly/graph_objs/streamtube/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube.colorbar" _path_str = "streamtube.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.streamtube.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.streamtube.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/colorbar/title/__init__.py b/plotly/graph_objs/streamtube/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/streamtube/colorbar/title/__init__.py +++ b/plotly/graph_objs/streamtube/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/streamtube/colorbar/title/_font.py b/plotly/graph_objs/streamtube/colorbar/title/_font.py index 8c95f54bac..eda20383b3 100644 --- a/plotly/graph_objs/streamtube/colorbar/title/_font.py +++ b/plotly/graph_objs/streamtube/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube.colorbar.title" _path_str = "streamtube.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/hoverlabel/__init__.py b/plotly/graph_objs/streamtube/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/streamtube/hoverlabel/__init__.py +++ b/plotly/graph_objs/streamtube/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/streamtube/hoverlabel/_font.py b/plotly/graph_objs/streamtube/hoverlabel/_font.py index 3d4540b1d1..d7c5e8c662 100644 --- a/plotly/graph_objs/streamtube/hoverlabel/_font.py +++ b/plotly/graph_objs/streamtube/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube.hoverlabel" _path_str = "streamtube.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/streamtube/legendgrouptitle/__init__.py b/plotly/graph_objs/streamtube/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/streamtube/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/streamtube/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/streamtube/legendgrouptitle/_font.py b/plotly/graph_objs/streamtube/legendgrouptitle/_font.py index fd884b5556..574fd6ddde 100644 --- a/plotly/graph_objs/streamtube/legendgrouptitle/_font.py +++ b/plotly/graph_objs/streamtube/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "streamtube.legendgrouptitle" _path_str = "streamtube.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.streamtube.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/__init__.py b/plotly/graph_objs/sunburst/__init__.py index 07004d8c8a..d32b10600f 100644 --- a/plotly/graph_objs/sunburst/__init__.py +++ b/plotly/graph_objs/sunburst/__init__.py @@ -1,36 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._leaf import Leaf - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._root import Root - from ._stream import Stream - from ._textfont import Textfont - from . import hoverlabel - from . import legendgrouptitle - from . import marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker"], - [ - "._domain.Domain", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._leaf.Leaf", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._root.Root", - "._stream.Stream", - "._textfont.Textfont", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker"], + [ + "._domain.Domain", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._leaf.Leaf", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._root.Root", + "._stream.Stream", + "._textfont.Textfont", + ], +) diff --git a/plotly/graph_objs/sunburst/_domain.py b/plotly/graph_objs/sunburst/_domain.py index 31cf6f6bad..292908ce58 100644 --- a/plotly/graph_objs/sunburst/_domain.py +++ b/plotly/graph_objs/sunburst/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): plot fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.sunburst.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_hoverlabel.py b/plotly/graph_objs/sunburst/_hoverlabel.py index 1cd3581b97..9f4c86abfb 100644 --- a/plotly/graph_objs/sunburst/_hoverlabel.py +++ b/plotly/graph_objs/sunburst/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.sunburst.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_insidetextfont.py b/plotly/graph_objs/sunburst/_insidetextfont.py index 4a80322592..f77c946265 100644 --- a/plotly/graph_objs/sunburst/_insidetextfont.py +++ b/plotly/graph_objs/sunburst/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_leaf.py b/plotly/graph_objs/sunburst/_leaf.py index 7c343bbba9..2c26992be9 100644 --- a/plotly/graph_objs/sunburst/_leaf.py +++ b/plotly/graph_objs/sunburst/_leaf.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Leaf(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.leaf" _valid_props = {"opacity"} - # opacity - # ------- @property def opacity(self): """ @@ -31,8 +30,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -41,7 +38,7 @@ def _prop_descriptions(self): defaulted to 1; otherwise it is defaulted to 0.7 """ - def __init__(self, arg=None, opacity=None, **kwargs): + def __init__(self, arg=None, opacity: int | float | None = None, **kwargs): """ Construct a new Leaf object @@ -58,14 +55,11 @@ def __init__(self, arg=None, opacity=None, **kwargs): ------- Leaf """ - super(Leaf, self).__init__("leaf") - + super().__init__("leaf") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -80,22 +74,9 @@ def __init__(self, arg=None, opacity=None, **kwargs): an instance of :class:`plotly.graph_objs.sunburst.Leaf`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("opacity", arg, opacity) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_legendgrouptitle.py b/plotly/graph_objs/sunburst/_legendgrouptitle.py index 9baa8cd8da..2df13f024a 100644 --- a/plotly/graph_objs/sunburst/_legendgrouptitle.py +++ b/plotly/graph_objs/sunburst/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.sunburst.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.sunburst.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_marker.py b/plotly/graph_objs/sunburst/_marker.py index 8c49c93c22..cd54b8e32e 100644 --- a/plotly/graph_objs/sunburst/_marker.py +++ b/plotly/graph_objs/sunburst/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.marker" _valid_props = { @@ -25,8 +26,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -51,8 +50,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -75,8 +72,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -97,8 +92,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -121,8 +114,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -143,8 +134,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -170,8 +159,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -181,273 +168,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.sunburs - t.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.sunburst.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - sunburst.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.sunburst.marker.co - lorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.sunburst.marker.ColorBar @@ -458,8 +178,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colors - # ------ @property def colors(self): """ @@ -471,7 +189,7 @@ def colors(self): Returns ------- - numpy.ndarray + NDArray """ return self["colors"] @@ -479,8 +197,6 @@ def colors(self): def colors(self, val): self["colors"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -533,8 +249,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorssrc - # --------- @property def colorssrc(self): """ @@ -553,8 +267,6 @@ def colorssrc(self): def colorssrc(self, val): self["colorssrc"] = val - # line - # ---- @property def line(self): """ @@ -564,21 +276,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.sunburst.marker.Line @@ -589,8 +286,6 @@ def line(self): def line(self, val): self["line"] = val - # pattern - # ------- @property def pattern(self): """ @@ -602,57 +297,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.sunburst.marker.Pattern @@ -663,8 +307,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -686,8 +328,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -708,8 +348,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -796,20 +434,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colors=None, - colorscale=None, - colorssrc=None, - line=None, - pattern=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colors: NDArray | None = None, + colorscale: str | None = None, + colorssrc: str | None = None, + line: None | None = None, + pattern: None | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -904,14 +542,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -926,74 +561,22 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colors", None) - _v = colors if colors is not None else _v - if _v is not None: - self["colors"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorssrc", None) - _v = colorssrc if colorssrc is not None else _v - if _v is not None: - self["colorssrc"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colors", arg, colors) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorssrc", arg, colorssrc) + self._init_provided("line", arg, line) + self._init_provided("pattern", arg, pattern) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_outsidetextfont.py b/plotly/graph_objs/sunburst/_outsidetextfont.py index dfb0670a2f..aa9791b96e 100644 --- a/plotly/graph_objs/sunburst/_outsidetextfont.py +++ b/plotly/graph_objs/sunburst/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -580,18 +494,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -643,14 +550,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -665,90 +569,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_root.py b/plotly/graph_objs/sunburst/_root.py index cd4a949f20..97c894f239 100644 --- a/plotly/graph_objs/sunburst/_root.py +++ b/plotly/graph_objs/sunburst/_root.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Root(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.root" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -24,42 +23,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -82,7 +44,7 @@ def _prop_descriptions(self): a colorscale is used to set the markers. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Root object @@ -100,14 +62,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Root """ - super(Root, self).__init__("root") - + super().__init__("root") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,22 +81,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.sunburst.Root`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_stream.py b/plotly/graph_objs/sunburst/_stream.py index ee2526e662..f52d76f6c0 100644 --- a/plotly/graph_objs/sunburst/_stream.py +++ b/plotly/graph_objs/sunburst/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.sunburst.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/_textfont.py b/plotly/graph_objs/sunburst/_textfont.py index 1321419a24..cc16515ca5 100644 --- a/plotly/graph_objs/sunburst/_textfont.py +++ b/plotly/graph_objs/sunburst/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst" _path_str = "sunburst.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/hoverlabel/__init__.py b/plotly/graph_objs/sunburst/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sunburst/hoverlabel/__init__.py +++ b/plotly/graph_objs/sunburst/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sunburst/hoverlabel/_font.py b/plotly/graph_objs/sunburst/hoverlabel/_font.py index a28575d99d..1abc3c2ef5 100644 --- a/plotly/graph_objs/sunburst/hoverlabel/_font.py +++ b/plotly/graph_objs/sunburst/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.hoverlabel" _path_str = "sunburst.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/legendgrouptitle/__init__.py b/plotly/graph_objs/sunburst/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sunburst/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/sunburst/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sunburst/legendgrouptitle/_font.py b/plotly/graph_objs/sunburst/legendgrouptitle/_font.py index af15a8c9fe..5a26c5c5c7 100644 --- a/plotly/graph_objs/sunburst/legendgrouptitle/_font.py +++ b/plotly/graph_objs/sunburst/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.legendgrouptitle" _path_str = "sunburst.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/__init__.py b/plotly/graph_objs/sunburst/marker/__init__.py index ce0279c544..700941a53e 100644 --- a/plotly/graph_objs/sunburst/marker/__init__.py +++ b/plotly/graph_objs/sunburst/marker/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from ._pattern import Pattern - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".colorbar"], ["._colorbar.ColorBar", "._line.Line", "._pattern.Pattern"] +) diff --git a/plotly/graph_objs/sunburst/marker/_colorbar.py b/plotly/graph_objs/sunburst/marker/_colorbar.py index f267810f51..d6924eac3d 100644 --- a/plotly/graph_objs/sunburst/marker/_colorbar.py +++ b/plotly/graph_objs/sunburst/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker" _path_str = "sunburst.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.sunburst.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.sunburst.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/_line.py b/plotly/graph_objs/sunburst/marker/_line.py index c116e5d961..275656f99a 100644 --- a/plotly/graph_objs/sunburst/marker/_line.py +++ b/plotly/graph_objs/sunburst/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker" _path_str = "sunburst.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -104,7 +64,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -112,8 +72,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -132,8 +90,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -152,7 +108,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -180,14 +142,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -202,34 +161,12 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/_pattern.py b/plotly/graph_objs/sunburst/marker/_pattern.py index 802761107d..20b5328f75 100644 --- a/plotly/graph_objs/sunburst/marker/_pattern.py +++ b/plotly/graph_objs/sunburst/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker" _path_str = "sunburst.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/colorbar/__init__.py b/plotly/graph_objs/sunburst/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/__init__.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py b/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py index 5bcfe54bb7..d8c5fcaacb 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker.colorbar" _path_str = "sunburst.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py index 28d48b5b73..ecf9fab6c9 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker.colorbar" _path_str = "sunburst.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/colorbar/_title.py b/plotly/graph_objs/sunburst/marker/colorbar/_title.py index 98b6c074b9..7788580f3e 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/_title.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker.colorbar" _path_str = "sunburst.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.sunburst.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py b/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py b/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py index d03f4499dc..3efc48c81f 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "sunburst.marker.colorbar.title" _path_str = "sunburst.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.sunburst.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/__init__.py b/plotly/graph_objs/surface/__init__.py index 934476fba3..b6f108258f 100644 --- a/plotly/graph_objs/surface/__init__.py +++ b/plotly/graph_objs/surface/__init__.py @@ -1,31 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._contours import Contours - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._lighting import Lighting - from ._lightposition import Lightposition - from ._stream import Stream - from . import colorbar - from . import contours - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], - [ - "._colorbar.ColorBar", - "._contours.Contours", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._lighting.Lighting", - "._lightposition.Lightposition", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar", ".contours", ".hoverlabel", ".legendgrouptitle"], + [ + "._colorbar.ColorBar", + "._contours.Contours", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/surface/_colorbar.py b/plotly/graph_objs/surface/_colorbar.py index 435be9c932..53b4b0bace 100644 --- a/plotly/graph_objs/surface/_colorbar.py +++ b/plotly/graph_objs/surface/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.surface.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.surface.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.surface.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.surface.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/_contours.py b/plotly/graph_objs/surface/_contours.py index f07540cf59..7cdbece390 100644 --- a/plotly/graph_objs/surface/_contours.py +++ b/plotly/graph_objs/surface/_contours.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contours(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.contours" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -21,42 +20,6 @@ def x(self): - A dict of string/value properties that will be passed to the X constructor - Supported dict properties: - - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the x dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.x - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the x dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. - Returns ------- plotly.graph_objs.surface.contours.X @@ -67,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -78,42 +39,6 @@ def y(self): - A dict of string/value properties that will be passed to the Y constructor - Supported dict properties: - - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the y dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.y - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the y dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. - Returns ------- plotly.graph_objs.surface.contours.Y @@ -124,8 +49,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -135,42 +58,6 @@ def z(self): - A dict of string/value properties that will be passed to the Z constructor - Supported dict properties: - - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the z dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.z - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the z dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. - Returns ------- plotly.graph_objs.surface.contours.Z @@ -181,8 +68,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -197,7 +82,14 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: None | None = None, + y: None | None = None, + z: None | None = None, + **kwargs, + ): """ Construct a new Contours object @@ -221,14 +113,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Contours """ - super(Contours, self).__init__("contours") - + super().__init__("contours") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -243,30 +132,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.Contours`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/_hoverlabel.py b/plotly/graph_objs/surface/_hoverlabel.py index c245fe36b9..1f2265e372 100644 --- a/plotly/graph_objs/surface/_hoverlabel.py +++ b/plotly/graph_objs/surface/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.surface.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/_legendgrouptitle.py b/plotly/graph_objs/surface/_legendgrouptitle.py index d8fb5dcc8a..b01f16737e 100644 --- a/plotly/graph_objs/surface/_legendgrouptitle.py +++ b/plotly/graph_objs/surface/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.surface.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/_lighting.py b/plotly/graph_objs/surface/_lighting.py index 91e7ff62ee..4018eebce1 100644 --- a/plotly/graph_objs/surface/_lighting.py +++ b/plotly/graph_objs/surface/_lighting.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lighting(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.lighting" _valid_props = {"ambient", "diffuse", "fresnel", "roughness", "specular"} - # ambient - # ------- @property def ambient(self): """ @@ -31,8 +30,6 @@ def ambient(self): def ambient(self, val): self["ambient"] = val - # diffuse - # ------- @property def diffuse(self): """ @@ -52,8 +49,6 @@ def diffuse(self): def diffuse(self, val): self["diffuse"] = val - # fresnel - # ------- @property def fresnel(self): """ @@ -74,8 +69,6 @@ def fresnel(self): def fresnel(self, val): self["fresnel"] = val - # roughness - # --------- @property def roughness(self): """ @@ -95,8 +88,6 @@ def roughness(self): def roughness(self, val): self["roughness"] = val - # specular - # -------- @property def specular(self): """ @@ -116,8 +107,6 @@ def specular(self): def specular(self, val): self["specular"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -143,11 +132,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - ambient=None, - diffuse=None, - fresnel=None, - roughness=None, - specular=None, + ambient: int | float | None = None, + diffuse: int | float | None = None, + fresnel: int | float | None = None, + roughness: int | float | None = None, + specular: int | float | None = None, **kwargs, ): """ @@ -181,14 +170,11 @@ def __init__( ------- Lighting """ - super(Lighting, self).__init__("lighting") - + super().__init__("lighting") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -203,38 +189,13 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.Lighting`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - _v = ambient if ambient is not None else _v - if _v is not None: - self["ambient"] = _v - _v = arg.pop("diffuse", None) - _v = diffuse if diffuse is not None else _v - if _v is not None: - self["diffuse"] = _v - _v = arg.pop("fresnel", None) - _v = fresnel if fresnel is not None else _v - if _v is not None: - self["fresnel"] = _v - _v = arg.pop("roughness", None) - _v = roughness if roughness is not None else _v - if _v is not None: - self["roughness"] = _v - _v = arg.pop("specular", None) - _v = specular if specular is not None else _v - if _v is not None: - self["specular"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("ambient", arg, ambient) + self._init_provided("diffuse", arg, diffuse) + self._init_provided("fresnel", arg, fresnel) + self._init_provided("roughness", arg, roughness) + self._init_provided("specular", arg, specular) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/_lightposition.py b/plotly/graph_objs/surface/_lightposition.py index 29e5ac30ae..d5349e7ba7 100644 --- a/plotly/graph_objs/surface/_lightposition.py +++ b/plotly/graph_objs/surface/_lightposition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.lightposition" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -30,8 +29,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -50,8 +47,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -70,8 +65,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): vertex. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Lightposition object @@ -110,14 +110,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Lightposition """ - super(Lightposition, self).__init__("lightposition") - + super().__init__("lightposition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.Lightposition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/_stream.py b/plotly/graph_objs/surface/_stream.py index 38f7bcbdc5..4c428dc7a6 100644 --- a/plotly/graph_objs/surface/_stream.py +++ b/plotly/graph_objs/surface/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface" _path_str = "surface.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/colorbar/__init__.py b/plotly/graph_objs/surface/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/surface/colorbar/__init__.py +++ b/plotly/graph_objs/surface/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/surface/colorbar/_tickfont.py b/plotly/graph_objs/surface/colorbar/_tickfont.py index be029b14e8..67e497802a 100644 --- a/plotly/graph_objs/surface/colorbar/_tickfont.py +++ b/plotly/graph_objs/surface/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.colorbar" _path_str = "surface.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/colorbar/_tickformatstop.py b/plotly/graph_objs/surface/colorbar/_tickformatstop.py index 89bdc997b5..2ed57b5e50 100644 --- a/plotly/graph_objs/surface/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/surface/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.colorbar" _path_str = "surface.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/colorbar/_title.py b/plotly/graph_objs/surface/colorbar/_title.py index 5d7455b4bc..8000733802 100644 --- a/plotly/graph_objs/surface/colorbar/_title.py +++ b/plotly/graph_objs/surface/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.colorbar" _path_str = "surface.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.surface.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/colorbar/title/__init__.py b/plotly/graph_objs/surface/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/surface/colorbar/title/__init__.py +++ b/plotly/graph_objs/surface/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/surface/colorbar/title/_font.py b/plotly/graph_objs/surface/colorbar/title/_font.py index 45fc210c2d..0e7870f636 100644 --- a/plotly/graph_objs/surface/colorbar/title/_font.py +++ b/plotly/graph_objs/surface/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.colorbar.title" _path_str = "surface.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/contours/__init__.py b/plotly/graph_objs/surface/contours/__init__.py index 40e571c2c8..3b1133f0ee 100644 --- a/plotly/graph_objs/surface/contours/__init__.py +++ b/plotly/graph_objs/surface/contours/__init__.py @@ -1,16 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._x import X - from ._y import Y - from ._z import Z - from . import x - from . import y - from . import z -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".x", ".y", ".z"], ["._x.X", "._y.Y", "._z.Z"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".x", ".y", ".z"], ["._x.X", "._y.Y", "._z.Z"] +) diff --git a/plotly/graph_objs/surface/contours/_x.py b/plotly/graph_objs/surface/contours/_x.py index 3a0122ad5d..0e8bfebf51 100644 --- a/plotly/graph_objs/surface/contours/_x.py +++ b/plotly/graph_objs/surface/contours/_x.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.contours" _path_str = "surface.contours.x" _valid_props = { @@ -22,8 +23,6 @@ class X(_BaseTraceHierarchyType): "width", } - # color - # ----- @property def color(self): """ @@ -34,42 +33,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # end - # --- @property def end(self): """ @@ -102,8 +64,6 @@ def end(self): def end(self, val): self["end"] = val - # highlight - # --------- @property def highlight(self): """ @@ -123,8 +83,6 @@ def highlight(self): def highlight(self, val): self["highlight"] = val - # highlightcolor - # -------------- @property def highlightcolor(self): """ @@ -135,42 +93,7 @@ def highlightcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -182,8 +105,6 @@ def highlightcolor(self): def highlightcolor(self, val): self["highlightcolor"] = val - # highlightwidth - # -------------- @property def highlightwidth(self): """ @@ -202,8 +123,6 @@ def highlightwidth(self): def highlightwidth(self, val): self["highlightwidth"] = val - # project - # ------- @property def project(self): """ @@ -213,27 +132,6 @@ def project(self): - A dict of string/value properties that will be passed to the Project constructor - Supported dict properties: - - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - Returns ------- plotly.graph_objs.surface.contours.x.Project @@ -244,8 +142,6 @@ def project(self): def project(self, val): self["project"] = val - # show - # ---- @property def show(self): """ @@ -265,8 +161,6 @@ def show(self): def show(self, val): self["show"] = val - # size - # ---- @property def size(self): """ @@ -285,8 +179,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -306,8 +198,6 @@ def start(self): def start(self, val): self["start"] = val - # usecolormap - # ----------- @property def usecolormap(self): """ @@ -327,8 +217,6 @@ def usecolormap(self): def usecolormap(self, val): self["usecolormap"] = val - # width - # ----- @property def width(self): """ @@ -347,8 +235,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -386,17 +272,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - end=None, - highlight=None, - highlightcolor=None, - highlightwidth=None, - project=None, - show=None, - size=None, - start=None, - usecolormap=None, - width=None, + color: str | None = None, + end: int | float | None = None, + highlight: bool | None = None, + highlightcolor: str | None = None, + highlightwidth: int | float | None = None, + project: None | None = None, + show: bool | None = None, + size: int | float | None = None, + start: int | float | None = None, + usecolormap: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -442,14 +328,11 @@ def __init__( ------- X """ - super(X, self).__init__("x") - + super().__init__("x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -464,62 +347,19 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.contours.X`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("highlight", None) - _v = highlight if highlight is not None else _v - if _v is not None: - self["highlight"] = _v - _v = arg.pop("highlightcolor", None) - _v = highlightcolor if highlightcolor is not None else _v - if _v is not None: - self["highlightcolor"] = _v - _v = arg.pop("highlightwidth", None) - _v = highlightwidth if highlightwidth is not None else _v - if _v is not None: - self["highlightwidth"] = _v - _v = arg.pop("project", None) - _v = project if project is not None else _v - if _v is not None: - self["project"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("usecolormap", None) - _v = usecolormap if usecolormap is not None else _v - if _v is not None: - self["usecolormap"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("end", arg, end) + self._init_provided("highlight", arg, highlight) + self._init_provided("highlightcolor", arg, highlightcolor) + self._init_provided("highlightwidth", arg, highlightwidth) + self._init_provided("project", arg, project) + self._init_provided("show", arg, show) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) + self._init_provided("usecolormap", arg, usecolormap) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/contours/_y.py b/plotly/graph_objs/surface/contours/_y.py index faf7eccca3..34a4baa5b0 100644 --- a/plotly/graph_objs/surface/contours/_y.py +++ b/plotly/graph_objs/surface/contours/_y.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.contours" _path_str = "surface.contours.y" _valid_props = { @@ -22,8 +23,6 @@ class Y(_BaseTraceHierarchyType): "width", } - # color - # ----- @property def color(self): """ @@ -34,42 +33,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # end - # --- @property def end(self): """ @@ -102,8 +64,6 @@ def end(self): def end(self, val): self["end"] = val - # highlight - # --------- @property def highlight(self): """ @@ -123,8 +83,6 @@ def highlight(self): def highlight(self, val): self["highlight"] = val - # highlightcolor - # -------------- @property def highlightcolor(self): """ @@ -135,42 +93,7 @@ def highlightcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -182,8 +105,6 @@ def highlightcolor(self): def highlightcolor(self, val): self["highlightcolor"] = val - # highlightwidth - # -------------- @property def highlightwidth(self): """ @@ -202,8 +123,6 @@ def highlightwidth(self): def highlightwidth(self, val): self["highlightwidth"] = val - # project - # ------- @property def project(self): """ @@ -213,27 +132,6 @@ def project(self): - A dict of string/value properties that will be passed to the Project constructor - Supported dict properties: - - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - Returns ------- plotly.graph_objs.surface.contours.y.Project @@ -244,8 +142,6 @@ def project(self): def project(self, val): self["project"] = val - # show - # ---- @property def show(self): """ @@ -265,8 +161,6 @@ def show(self): def show(self, val): self["show"] = val - # size - # ---- @property def size(self): """ @@ -285,8 +179,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -306,8 +198,6 @@ def start(self): def start(self, val): self["start"] = val - # usecolormap - # ----------- @property def usecolormap(self): """ @@ -327,8 +217,6 @@ def usecolormap(self): def usecolormap(self, val): self["usecolormap"] = val - # width - # ----- @property def width(self): """ @@ -347,8 +235,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -386,17 +272,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - end=None, - highlight=None, - highlightcolor=None, - highlightwidth=None, - project=None, - show=None, - size=None, - start=None, - usecolormap=None, - width=None, + color: str | None = None, + end: int | float | None = None, + highlight: bool | None = None, + highlightcolor: str | None = None, + highlightwidth: int | float | None = None, + project: None | None = None, + show: bool | None = None, + size: int | float | None = None, + start: int | float | None = None, + usecolormap: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -442,14 +328,11 @@ def __init__( ------- Y """ - super(Y, self).__init__("y") - + super().__init__("y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -464,62 +347,19 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.contours.Y`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("highlight", None) - _v = highlight if highlight is not None else _v - if _v is not None: - self["highlight"] = _v - _v = arg.pop("highlightcolor", None) - _v = highlightcolor if highlightcolor is not None else _v - if _v is not None: - self["highlightcolor"] = _v - _v = arg.pop("highlightwidth", None) - _v = highlightwidth if highlightwidth is not None else _v - if _v is not None: - self["highlightwidth"] = _v - _v = arg.pop("project", None) - _v = project if project is not None else _v - if _v is not None: - self["project"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("usecolormap", None) - _v = usecolormap if usecolormap is not None else _v - if _v is not None: - self["usecolormap"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("end", arg, end) + self._init_provided("highlight", arg, highlight) + self._init_provided("highlightcolor", arg, highlightcolor) + self._init_provided("highlightwidth", arg, highlightwidth) + self._init_provided("project", arg, project) + self._init_provided("show", arg, show) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) + self._init_provided("usecolormap", arg, usecolormap) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/contours/_z.py b/plotly/graph_objs/surface/contours/_z.py index 21a4dc7262..8b51f14140 100644 --- a/plotly/graph_objs/surface/contours/_z.py +++ b/plotly/graph_objs/surface/contours/_z.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Z(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.contours" _path_str = "surface.contours.z" _valid_props = { @@ -22,8 +23,6 @@ class Z(_BaseTraceHierarchyType): "width", } - # color - # ----- @property def color(self): """ @@ -34,42 +33,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -81,8 +45,6 @@ def color(self): def color(self, val): self["color"] = val - # end - # --- @property def end(self): """ @@ -102,8 +64,6 @@ def end(self): def end(self, val): self["end"] = val - # highlight - # --------- @property def highlight(self): """ @@ -123,8 +83,6 @@ def highlight(self): def highlight(self, val): self["highlight"] = val - # highlightcolor - # -------------- @property def highlightcolor(self): """ @@ -135,42 +93,7 @@ def highlightcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -182,8 +105,6 @@ def highlightcolor(self): def highlightcolor(self, val): self["highlightcolor"] = val - # highlightwidth - # -------------- @property def highlightwidth(self): """ @@ -202,8 +123,6 @@ def highlightwidth(self): def highlightwidth(self, val): self["highlightwidth"] = val - # project - # ------- @property def project(self): """ @@ -213,27 +132,6 @@ def project(self): - A dict of string/value properties that will be passed to the Project constructor - Supported dict properties: - - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - Returns ------- plotly.graph_objs.surface.contours.z.Project @@ -244,8 +142,6 @@ def project(self): def project(self, val): self["project"] = val - # show - # ---- @property def show(self): """ @@ -265,8 +161,6 @@ def show(self): def show(self, val): self["show"] = val - # size - # ---- @property def size(self): """ @@ -285,8 +179,6 @@ def size(self): def size(self, val): self["size"] = val - # start - # ----- @property def start(self): """ @@ -306,8 +198,6 @@ def start(self): def start(self, val): self["start"] = val - # usecolormap - # ----------- @property def usecolormap(self): """ @@ -327,8 +217,6 @@ def usecolormap(self): def usecolormap(self, val): self["usecolormap"] = val - # width - # ----- @property def width(self): """ @@ -347,8 +235,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -386,17 +272,17 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - end=None, - highlight=None, - highlightcolor=None, - highlightwidth=None, - project=None, - show=None, - size=None, - start=None, - usecolormap=None, - width=None, + color: str | None = None, + end: int | float | None = None, + highlight: bool | None = None, + highlightcolor: str | None = None, + highlightwidth: int | float | None = None, + project: None | None = None, + show: bool | None = None, + size: int | float | None = None, + start: int | float | None = None, + usecolormap: bool | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -442,14 +328,11 @@ def __init__( ------- Z """ - super(Z, self).__init__("z") - + super().__init__("z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -464,62 +347,19 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.contours.Z`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("end", None) - _v = end if end is not None else _v - if _v is not None: - self["end"] = _v - _v = arg.pop("highlight", None) - _v = highlight if highlight is not None else _v - if _v is not None: - self["highlight"] = _v - _v = arg.pop("highlightcolor", None) - _v = highlightcolor if highlightcolor is not None else _v - if _v is not None: - self["highlightcolor"] = _v - _v = arg.pop("highlightwidth", None) - _v = highlightwidth if highlightwidth is not None else _v - if _v is not None: - self["highlightwidth"] = _v - _v = arg.pop("project", None) - _v = project if project is not None else _v - if _v is not None: - self["project"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("start", None) - _v = start if start is not None else _v - if _v is not None: - self["start"] = _v - _v = arg.pop("usecolormap", None) - _v = usecolormap if usecolormap is not None else _v - if _v is not None: - self["usecolormap"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("end", arg, end) + self._init_provided("highlight", arg, highlight) + self._init_provided("highlightcolor", arg, highlightcolor) + self._init_provided("highlightwidth", arg, highlightwidth) + self._init_provided("project", arg, project) + self._init_provided("show", arg, show) + self._init_provided("size", arg, size) + self._init_provided("start", arg, start) + self._init_provided("usecolormap", arg, usecolormap) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/contours/x/__init__.py b/plotly/graph_objs/surface/contours/x/__init__.py index c01cb58525..a27203b57f 100644 --- a/plotly/graph_objs/surface/contours/x/__init__.py +++ b/plotly/graph_objs/surface/contours/x/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._project import Project -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) diff --git a/plotly/graph_objs/surface/contours/x/_project.py b/plotly/graph_objs/surface/contours/x/_project.py index 158db85158..e21038e01c 100644 --- a/plotly/graph_objs/surface/contours/x/_project.py +++ b/plotly/graph_objs/surface/contours/x/_project.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Project(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.contours.x" _path_str = "surface.contours.x.project" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -33,8 +32,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -56,8 +53,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -79,8 +74,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +97,14 @@ def _prop_descriptions(self): in permanence. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: bool | None = None, + y: bool | None = None, + z: bool | None = None, + **kwargs, + ): """ Construct a new Project object @@ -137,14 +137,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Project """ - super(Project, self).__init__("project") - + super().__init__("project") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -159,30 +156,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.contours.x.Project`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/contours/y/__init__.py b/plotly/graph_objs/surface/contours/y/__init__.py index c01cb58525..a27203b57f 100644 --- a/plotly/graph_objs/surface/contours/y/__init__.py +++ b/plotly/graph_objs/surface/contours/y/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._project import Project -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) diff --git a/plotly/graph_objs/surface/contours/y/_project.py b/plotly/graph_objs/surface/contours/y/_project.py index 68ff9fd518..95ef8d712b 100644 --- a/plotly/graph_objs/surface/contours/y/_project.py +++ b/plotly/graph_objs/surface/contours/y/_project.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Project(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.contours.y" _path_str = "surface.contours.y.project" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -33,8 +32,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -56,8 +53,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -79,8 +74,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +97,14 @@ def _prop_descriptions(self): in permanence. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: bool | None = None, + y: bool | None = None, + z: bool | None = None, + **kwargs, + ): """ Construct a new Project object @@ -137,14 +137,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Project """ - super(Project, self).__init__("project") - + super().__init__("project") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -159,30 +156,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.contours.y.Project`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/contours/z/__init__.py b/plotly/graph_objs/surface/contours/z/__init__.py index c01cb58525..a27203b57f 100644 --- a/plotly/graph_objs/surface/contours/z/__init__.py +++ b/plotly/graph_objs/surface/contours/z/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._project import Project -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._project.Project"]) diff --git a/plotly/graph_objs/surface/contours/z/_project.py b/plotly/graph_objs/surface/contours/z/_project.py index 17efc1ae04..caaa9148a3 100644 --- a/plotly/graph_objs/surface/contours/z/_project.py +++ b/plotly/graph_objs/surface/contours/z/_project.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Project(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.contours.z" _path_str = "surface.contours.z.project" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -33,8 +32,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -56,8 +53,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -79,8 +74,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +97,14 @@ def _prop_descriptions(self): in permanence. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: bool | None = None, + y: bool | None = None, + z: bool | None = None, + **kwargs, + ): """ Construct a new Project object @@ -137,14 +137,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Project """ - super(Project, self).__init__("project") - + super().__init__("project") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -159,30 +156,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.surface.contours.z.Project`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/hoverlabel/__init__.py b/plotly/graph_objs/surface/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/surface/hoverlabel/__init__.py +++ b/plotly/graph_objs/surface/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/surface/hoverlabel/_font.py b/plotly/graph_objs/surface/hoverlabel/_font.py index 59a9809f1a..cd489793c0 100644 --- a/plotly/graph_objs/surface/hoverlabel/_font.py +++ b/plotly/graph_objs/surface/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.hoverlabel" _path_str = "surface.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/surface/legendgrouptitle/__init__.py b/plotly/graph_objs/surface/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/surface/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/surface/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/surface/legendgrouptitle/_font.py b/plotly/graph_objs/surface/legendgrouptitle/_font.py index b79a937969..6227502b58 100644 --- a/plotly/graph_objs/surface/legendgrouptitle/_font.py +++ b/plotly/graph_objs/surface/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "surface.legendgrouptitle" _path_str = "surface.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.surface.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/__init__.py b/plotly/graph_objs/table/__init__.py index 21b4bd6230..cc43fc1ce9 100644 --- a/plotly/graph_objs/table/__init__.py +++ b/plotly/graph_objs/table/__init__.py @@ -1,29 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._cells import Cells - from ._domain import Domain - from ._header import Header - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._stream import Stream - from . import cells - from . import header - from . import hoverlabel - from . import legendgrouptitle -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".cells", ".header", ".hoverlabel", ".legendgrouptitle"], - [ - "._cells.Cells", - "._domain.Domain", - "._header.Header", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._stream.Stream", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".cells", ".header", ".hoverlabel", ".legendgrouptitle"], + [ + "._cells.Cells", + "._domain.Domain", + "._header.Header", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._stream.Stream", + ], +) diff --git a/plotly/graph_objs/table/_cells.py b/plotly/graph_objs/table/_cells.py index 812f9dda45..89b7ee095a 100644 --- a/plotly/graph_objs/table/_cells.py +++ b/plotly/graph_objs/table/_cells.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Cells(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table" _path_str = "table.cells" _valid_props = { @@ -25,8 +26,6 @@ class Cells(_BaseTraceHierarchyType): "valuessrc", } - # align - # ----- @property def align(self): """ @@ -42,7 +41,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -50,8 +49,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -70,8 +67,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # fill - # ---- @property def fill(self): """ @@ -81,16 +76,6 @@ def fill(self): - A dict of string/value properties that will be passed to the Fill constructor - Supported dict properties: - - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - Returns ------- plotly.graph_objs.table.cells.Fill @@ -101,8 +86,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # font - # ---- @property def font(self): """ @@ -112,79 +95,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.table.cells.Font @@ -195,8 +105,6 @@ def font(self): def font(self, val): self["font"] = val - # format - # ------ @property def format(self): """ @@ -210,7 +118,7 @@ def format(self): Returns ------- - numpy.ndarray + NDArray """ return self["format"] @@ -218,8 +126,6 @@ def format(self): def format(self, val): self["format"] = val - # formatsrc - # --------- @property def formatsrc(self): """ @@ -238,8 +144,6 @@ def formatsrc(self): def formatsrc(self, val): self["formatsrc"] = val - # height - # ------ @property def height(self): """ @@ -258,8 +162,6 @@ def height(self): def height(self, val): self["height"] = val - # line - # ---- @property def line(self): """ @@ -269,19 +171,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.table.cells.Line @@ -292,8 +181,6 @@ def line(self): def line(self, val): self["line"] = val - # prefix - # ------ @property def prefix(self): """ @@ -306,7 +193,7 @@ def prefix(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["prefix"] @@ -314,8 +201,6 @@ def prefix(self): def prefix(self, val): self["prefix"] = val - # prefixsrc - # --------- @property def prefixsrc(self): """ @@ -334,8 +219,6 @@ def prefixsrc(self): def prefixsrc(self, val): self["prefixsrc"] = val - # suffix - # ------ @property def suffix(self): """ @@ -348,7 +231,7 @@ def suffix(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["suffix"] @@ -356,8 +239,6 @@ def suffix(self): def suffix(self, val): self["suffix"] = val - # suffixsrc - # --------- @property def suffixsrc(self): """ @@ -376,8 +257,6 @@ def suffixsrc(self): def suffixsrc(self, val): self["suffixsrc"] = val - # values - # ------ @property def values(self): """ @@ -391,7 +270,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -399,8 +278,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -419,8 +296,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -476,20 +351,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - fill=None, - font=None, - format=None, - formatsrc=None, - height=None, - line=None, - prefix=None, - prefixsrc=None, - suffix=None, - suffixsrc=None, - values=None, - valuessrc=None, + align: Any | None = None, + alignsrc: str | None = None, + fill: None | None = None, + font: None | None = None, + format: NDArray | None = None, + formatsrc: str | None = None, + height: int | float | None = None, + line: None | None = None, + prefix: str | None = None, + prefixsrc: str | None = None, + suffix: str | None = None, + suffixsrc: str | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, **kwargs, ): """ @@ -552,14 +427,11 @@ def __init__( ------- Cells """ - super(Cells, self).__init__("cells") - + super().__init__("cells") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -574,74 +446,22 @@ def __init__( an instance of :class:`plotly.graph_objs.table.Cells`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("format", None) - _v = format if format is not None else _v - if _v is not None: - self["format"] = _v - _v = arg.pop("formatsrc", None) - _v = formatsrc if formatsrc is not None else _v - if _v is not None: - self["formatsrc"] = _v - _v = arg.pop("height", None) - _v = height if height is not None else _v - if _v is not None: - self["height"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("prefix", None) - _v = prefix if prefix is not None else _v - if _v is not None: - self["prefix"] = _v - _v = arg.pop("prefixsrc", None) - _v = prefixsrc if prefixsrc is not None else _v - if _v is not None: - self["prefixsrc"] = _v - _v = arg.pop("suffix", None) - _v = suffix if suffix is not None else _v - if _v is not None: - self["suffix"] = _v - _v = arg.pop("suffixsrc", None) - _v = suffixsrc if suffixsrc is not None else _v - if _v is not None: - self["suffixsrc"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("fill", arg, fill) + self._init_provided("font", arg, font) + self._init_provided("format", arg, format) + self._init_provided("formatsrc", arg, formatsrc) + self._init_provided("height", arg, height) + self._init_provided("line", arg, line) + self._init_provided("prefix", arg, prefix) + self._init_provided("prefixsrc", arg, prefixsrc) + self._init_provided("suffix", arg, suffix) + self._init_provided("suffixsrc", arg, suffixsrc) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/_domain.py b/plotly/graph_objs/table/_domain.py index 7b3274e955..48569689b0 100644 --- a/plotly/graph_objs/table/_domain.py +++ b/plotly/graph_objs/table/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table" _path_str = "table.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -151,14 +150,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -173,34 +169,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.table.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/_header.py b/plotly/graph_objs/table/_header.py index 6ba73d3b9f..ad9954c655 100644 --- a/plotly/graph_objs/table/_header.py +++ b/plotly/graph_objs/table/_header.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Header(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table" _path_str = "table.header" _valid_props = { @@ -25,8 +26,6 @@ class Header(_BaseTraceHierarchyType): "valuessrc", } - # align - # ----- @property def align(self): """ @@ -42,7 +41,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -50,8 +49,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -70,8 +67,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # fill - # ---- @property def fill(self): """ @@ -81,16 +76,6 @@ def fill(self): - A dict of string/value properties that will be passed to the Fill constructor - Supported dict properties: - - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - Returns ------- plotly.graph_objs.table.header.Fill @@ -101,8 +86,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # font - # ---- @property def font(self): """ @@ -112,79 +95,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.table.header.Font @@ -195,8 +105,6 @@ def font(self): def font(self, val): self["font"] = val - # format - # ------ @property def format(self): """ @@ -210,7 +118,7 @@ def format(self): Returns ------- - numpy.ndarray + NDArray """ return self["format"] @@ -218,8 +126,6 @@ def format(self): def format(self, val): self["format"] = val - # formatsrc - # --------- @property def formatsrc(self): """ @@ -238,8 +144,6 @@ def formatsrc(self): def formatsrc(self, val): self["formatsrc"] = val - # height - # ------ @property def height(self): """ @@ -258,8 +162,6 @@ def height(self): def height(self, val): self["height"] = val - # line - # ---- @property def line(self): """ @@ -269,19 +171,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.table.header.Line @@ -292,8 +181,6 @@ def line(self): def line(self, val): self["line"] = val - # prefix - # ------ @property def prefix(self): """ @@ -306,7 +193,7 @@ def prefix(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["prefix"] @@ -314,8 +201,6 @@ def prefix(self): def prefix(self, val): self["prefix"] = val - # prefixsrc - # --------- @property def prefixsrc(self): """ @@ -334,8 +219,6 @@ def prefixsrc(self): def prefixsrc(self, val): self["prefixsrc"] = val - # suffix - # ------ @property def suffix(self): """ @@ -348,7 +231,7 @@ def suffix(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["suffix"] @@ -356,8 +239,6 @@ def suffix(self): def suffix(self, val): self["suffix"] = val - # suffixsrc - # --------- @property def suffixsrc(self): """ @@ -376,8 +257,6 @@ def suffixsrc(self): def suffixsrc(self, val): self["suffixsrc"] = val - # values - # ------ @property def values(self): """ @@ -391,7 +270,7 @@ def values(self): Returns ------- - numpy.ndarray + NDArray """ return self["values"] @@ -399,8 +278,6 @@ def values(self): def values(self, val): self["values"] = val - # valuessrc - # --------- @property def valuessrc(self): """ @@ -419,8 +296,6 @@ def valuessrc(self): def valuessrc(self, val): self["valuessrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -476,20 +351,20 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - fill=None, - font=None, - format=None, - formatsrc=None, - height=None, - line=None, - prefix=None, - prefixsrc=None, - suffix=None, - suffixsrc=None, - values=None, - valuessrc=None, + align: Any | None = None, + alignsrc: str | None = None, + fill: None | None = None, + font: None | None = None, + format: NDArray | None = None, + formatsrc: str | None = None, + height: int | float | None = None, + line: None | None = None, + prefix: str | None = None, + prefixsrc: str | None = None, + suffix: str | None = None, + suffixsrc: str | None = None, + values: NDArray | None = None, + valuessrc: str | None = None, **kwargs, ): """ @@ -552,14 +427,11 @@ def __init__( ------- Header """ - super(Header, self).__init__("header") - + super().__init__("header") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -574,74 +446,22 @@ def __init__( an instance of :class:`plotly.graph_objs.table.Header`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("format", None) - _v = format if format is not None else _v - if _v is not None: - self["format"] = _v - _v = arg.pop("formatsrc", None) - _v = formatsrc if formatsrc is not None else _v - if _v is not None: - self["formatsrc"] = _v - _v = arg.pop("height", None) - _v = height if height is not None else _v - if _v is not None: - self["height"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("prefix", None) - _v = prefix if prefix is not None else _v - if _v is not None: - self["prefix"] = _v - _v = arg.pop("prefixsrc", None) - _v = prefixsrc if prefixsrc is not None else _v - if _v is not None: - self["prefixsrc"] = _v - _v = arg.pop("suffix", None) - _v = suffix if suffix is not None else _v - if _v is not None: - self["suffix"] = _v - _v = arg.pop("suffixsrc", None) - _v = suffixsrc if suffixsrc is not None else _v - if _v is not None: - self["suffixsrc"] = _v - _v = arg.pop("values", None) - _v = values if values is not None else _v - if _v is not None: - self["values"] = _v - _v = arg.pop("valuessrc", None) - _v = valuessrc if valuessrc is not None else _v - if _v is not None: - self["valuessrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("fill", arg, fill) + self._init_provided("font", arg, font) + self._init_provided("format", arg, format) + self._init_provided("formatsrc", arg, formatsrc) + self._init_provided("height", arg, height) + self._init_provided("line", arg, line) + self._init_provided("prefix", arg, prefix) + self._init_provided("prefixsrc", arg, prefixsrc) + self._init_provided("suffix", arg, suffix) + self._init_provided("suffixsrc", arg, suffixsrc) + self._init_provided("values", arg, values) + self._init_provided("valuessrc", arg, valuessrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/_hoverlabel.py b/plotly/graph_objs/table/_hoverlabel.py index 5ef832aa68..566eadc6c5 100644 --- a/plotly/graph_objs/table/_hoverlabel.py +++ b/plotly/graph_objs/table/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table" _path_str = "table.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.table.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.table.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/_legendgrouptitle.py b/plotly/graph_objs/table/_legendgrouptitle.py index 150d30abb7..f131b201ae 100644 --- a/plotly/graph_objs/table/_legendgrouptitle.py +++ b/plotly/graph_objs/table/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table" _path_str = "table.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.table.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.table.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/_stream.py b/plotly/graph_objs/table/_stream.py index f42337b2e0..a740f96fe7 100644 --- a/plotly/graph_objs/table/_stream.py +++ b/plotly/graph_objs/table/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table" _path_str = "table.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.table.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/cells/__init__.py b/plotly/graph_objs/table/cells/__init__.py index bc3fbf02cd..7679bc70a1 100644 --- a/plotly/graph_objs/table/cells/__init__.py +++ b/plotly/graph_objs/table/cells/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._fill import Fill - from ._font import Font - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._fill.Fill", "._font.Font", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._fill.Fill", "._font.Font", "._line.Line"] +) diff --git a/plotly/graph_objs/table/cells/_fill.py b/plotly/graph_objs/table/cells/_fill.py index c081a9b2dd..1c6ff75a5e 100644 --- a/plotly/graph_objs/table/cells/_fill.py +++ b/plotly/graph_objs/table/cells/_fill.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Fill(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.cells" _path_str = "table.cells.fill" _valid_props = {"color", "colorsrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +64,9 @@ def _prop_descriptions(self): `color`. """ - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, colorsrc: str | None = None, **kwargs + ): """ Construct a new Fill object @@ -125,14 +87,11 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): ------- Fill """ - super(Fill, self).__init__("fill") - + super().__init__("fill") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -147,26 +106,10 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): an instance of :class:`plotly.graph_objs.table.cells.Fill`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/cells/_font.py b/plotly/graph_objs/table/cells/_font.py index cc5c3ce58d..9ed00c74ab 100644 --- a/plotly/graph_objs/table/cells/_font.py +++ b/plotly/graph_objs/table/cells/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.cells" _path_str = "table.cells.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -574,18 +488,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -637,14 +544,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -659,90 +563,26 @@ def __init__( an instance of :class:`plotly.graph_objs.table.cells.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/cells/_line.py b/plotly/graph_objs/table/cells/_line.py index 6483287201..082b05ac24 100644 --- a/plotly/graph_objs/table/cells/_line.py +++ b/plotly/graph_objs/table/cells/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.cells" _path_str = "table.cells.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -20,47 +19,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -68,8 +32,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -88,8 +50,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -99,7 +59,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -107,8 +67,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -127,8 +85,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -145,7 +101,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -171,14 +133,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -193,34 +152,12 @@ def __init__( an instance of :class:`plotly.graph_objs.table.cells.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/header/__init__.py b/plotly/graph_objs/table/header/__init__.py index bc3fbf02cd..7679bc70a1 100644 --- a/plotly/graph_objs/table/header/__init__.py +++ b/plotly/graph_objs/table/header/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._fill import Fill - from ._font import Font - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._fill.Fill", "._font.Font", "._line.Line"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._fill.Fill", "._font.Font", "._line.Line"] +) diff --git a/plotly/graph_objs/table/header/_fill.py b/plotly/graph_objs/table/header/_fill.py index 9235360933..5d5cac6c14 100644 --- a/plotly/graph_objs/table/header/_fill.py +++ b/plotly/graph_objs/table/header/_fill.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Fill(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.header" _path_str = "table.header.fill" _valid_props = {"color", "colorsrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -104,7 +64,9 @@ def _prop_descriptions(self): `color`. """ - def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, colorsrc: str | None = None, **kwargs + ): """ Construct a new Fill object @@ -125,14 +87,11 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): ------- Fill """ - super(Fill, self).__init__("fill") - + super().__init__("fill") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -147,26 +106,10 @@ def __init__(self, arg=None, color=None, colorsrc=None, **kwargs): an instance of :class:`plotly.graph_objs.table.header.Fill`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/header/_font.py b/plotly/graph_objs/table/header/_font.py index 3ea8afe3f0..eb0c5a7d98 100644 --- a/plotly/graph_objs/table/header/_font.py +++ b/plotly/graph_objs/table/header/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.header" _path_str = "table.header.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -574,18 +488,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -637,14 +544,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -659,90 +563,26 @@ def __init__( an instance of :class:`plotly.graph_objs.table.header.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/header/_line.py b/plotly/graph_objs/table/header/_line.py index 8f0e41c939..eda674aa05 100644 --- a/plotly/graph_objs/table/header/_line.py +++ b/plotly/graph_objs/table/header/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.header" _path_str = "table.header.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -20,47 +19,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -68,8 +32,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -88,8 +50,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -99,7 +59,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -107,8 +67,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -127,8 +85,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -145,7 +101,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -171,14 +133,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -193,34 +152,12 @@ def __init__( an instance of :class:`plotly.graph_objs.table.header.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/hoverlabel/__init__.py b/plotly/graph_objs/table/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/table/hoverlabel/__init__.py +++ b/plotly/graph_objs/table/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/table/hoverlabel/_font.py b/plotly/graph_objs/table/hoverlabel/_font.py index 5a72bf219d..64952e00fe 100644 --- a/plotly/graph_objs/table/hoverlabel/_font.py +++ b/plotly/graph_objs/table/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.hoverlabel" _path_str = "table.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.table.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/table/legendgrouptitle/__init__.py b/plotly/graph_objs/table/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/table/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/table/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/table/legendgrouptitle/_font.py b/plotly/graph_objs/table/legendgrouptitle/_font.py index c458e0e5a4..760e6ecbcb 100644 --- a/plotly/graph_objs/table/legendgrouptitle/_font.py +++ b/plotly/graph_objs/table/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "table.legendgrouptitle" _path_str = "table.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.table.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/__init__.py b/plotly/graph_objs/treemap/__init__.py index 3e1752e4e6..8d5d944295 100644 --- a/plotly/graph_objs/treemap/__init__.py +++ b/plotly/graph_objs/treemap/__init__.py @@ -1,39 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._domain import Domain - from ._hoverlabel import Hoverlabel - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._marker import Marker - from ._outsidetextfont import Outsidetextfont - from ._pathbar import Pathbar - from ._root import Root - from ._stream import Stream - from ._textfont import Textfont - from ._tiling import Tiling - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import pathbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".hoverlabel", ".legendgrouptitle", ".marker", ".pathbar"], - [ - "._domain.Domain", - "._hoverlabel.Hoverlabel", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._marker.Marker", - "._outsidetextfont.Outsidetextfont", - "._pathbar.Pathbar", - "._root.Root", - "._stream.Stream", - "._textfont.Textfont", - "._tiling.Tiling", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".hoverlabel", ".legendgrouptitle", ".marker", ".pathbar"], + [ + "._domain.Domain", + "._hoverlabel.Hoverlabel", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._marker.Marker", + "._outsidetextfont.Outsidetextfont", + "._pathbar.Pathbar", + "._root.Root", + "._stream.Stream", + "._textfont.Textfont", + "._tiling.Tiling", + ], +) diff --git a/plotly/graph_objs/treemap/_domain.py b/plotly/graph_objs/treemap/_domain.py index 25cbbdb69c..2d05c56fd6 100644 --- a/plotly/graph_objs/treemap/_domain.py +++ b/plotly/graph_objs/treemap/_domain.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Domain(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.domain" _valid_props = {"column", "row", "x", "y"} - # column - # ------ @property def column(self): """ @@ -32,8 +31,6 @@ def column(self): def column(self, val): self["column"] = val - # row - # --- @property def row(self): """ @@ -54,8 +51,6 @@ def row(self): def row(self, val): self["row"] = val - # x - # - @property def x(self): """ @@ -80,8 +75,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -106,8 +99,6 @@ def y(self): def y(self, val): self["y"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -125,7 +116,15 @@ def _prop_descriptions(self): fraction). """ - def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): + def __init__( + self, + arg=None, + column: int | None = None, + row: int | None = None, + x: list | None = None, + y: list | None = None, + **kwargs, + ): """ Construct a new Domain object @@ -152,14 +151,11 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): ------- Domain """ - super(Domain, self).__init__("domain") - + super().__init__("domain") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,34 +170,12 @@ def __init__(self, arg=None, column=None, row=None, x=None, y=None, **kwargs): an instance of :class:`plotly.graph_objs.treemap.Domain`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("column", None) - _v = column if column is not None else _v - if _v is not None: - self["column"] = _v - _v = arg.pop("row", None) - _v = row if row is not None else _v - if _v is not None: - self["row"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("column", arg, column) + self._init_provided("row", arg, row) + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_hoverlabel.py b/plotly/graph_objs/treemap/_hoverlabel.py index 302184f1d3..69a2959a6e 100644 --- a/plotly/graph_objs/treemap/_hoverlabel.py +++ b/plotly/graph_objs/treemap/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.treemap.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_insidetextfont.py b/plotly/graph_objs/treemap/_insidetextfont.py index 2d6af94a57..0f7c35daf3 100644 --- a/plotly/graph_objs/treemap/_insidetextfont.py +++ b/plotly/graph_objs/treemap/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_legendgrouptitle.py b/plotly/graph_objs/treemap/_legendgrouptitle.py index 064f6b74b9..001fa8a779 100644 --- a/plotly/graph_objs/treemap/_legendgrouptitle.py +++ b/plotly/graph_objs/treemap/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.treemap.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.treemap.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_marker.py b/plotly/graph_objs/treemap/_marker.py index cf89025eb1..b4a6380258 100644 --- a/plotly/graph_objs/treemap/_marker.py +++ b/plotly/graph_objs/treemap/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.marker" _valid_props = { @@ -28,8 +29,6 @@ class Marker(_BaseTraceHierarchyType): "showscale", } - # autocolorscale - # -------------- @property def autocolorscale(self): """ @@ -54,8 +53,6 @@ def autocolorscale(self): def autocolorscale(self, val): self["autocolorscale"] = val - # cauto - # ----- @property def cauto(self): """ @@ -78,8 +75,6 @@ def cauto(self): def cauto(self, val): self["cauto"] = val - # cmax - # ---- @property def cmax(self): """ @@ -100,8 +95,6 @@ def cmax(self): def cmax(self, val): self["cmax"] = val - # cmid - # ---- @property def cmid(self): """ @@ -124,8 +117,6 @@ def cmid(self): def cmid(self, val): self["cmid"] = val - # cmin - # ---- @property def cmin(self): """ @@ -146,8 +137,6 @@ def cmin(self): def cmin(self, val): self["cmin"] = val - # coloraxis - # --------- @property def coloraxis(self): """ @@ -173,8 +162,6 @@ def coloraxis(self): def coloraxis(self, val): self["coloraxis"] = val - # colorbar - # -------- @property def colorbar(self): """ @@ -184,273 +171,6 @@ def colorbar(self): - A dict of string/value properties that will be passed to the ColorBar constructor - Supported dict properties: - - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.treemap - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.treemap.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - treemap.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.treemap.marker.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. - Returns ------- plotly.graph_objs.treemap.marker.ColorBar @@ -461,8 +181,6 @@ def colorbar(self): def colorbar(self, val): self["colorbar"] = val - # colors - # ------ @property def colors(self): """ @@ -474,7 +192,7 @@ def colors(self): Returns ------- - numpy.ndarray + NDArray """ return self["colors"] @@ -482,8 +200,6 @@ def colors(self): def colors(self, val): self["colors"] = val - # colorscale - # ---------- @property def colorscale(self): """ @@ -536,8 +252,6 @@ def colorscale(self): def colorscale(self, val): self["colorscale"] = val - # colorssrc - # --------- @property def colorssrc(self): """ @@ -556,8 +270,6 @@ def colorssrc(self): def colorssrc(self, val): self["colorssrc"] = val - # cornerradius - # ------------ @property def cornerradius(self): """ @@ -576,8 +288,6 @@ def cornerradius(self): def cornerradius(self, val): self["cornerradius"] = val - # depthfade - # --------- @property def depthfade(self): """ @@ -604,8 +314,6 @@ def depthfade(self): def depthfade(self, val): self["depthfade"] = val - # line - # ---- @property def line(self): """ @@ -615,21 +323,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - Returns ------- plotly.graph_objs.treemap.marker.Line @@ -640,8 +333,6 @@ def line(self): def line(self, val): self["line"] = val - # pad - # --- @property def pad(self): """ @@ -651,17 +342,6 @@ def pad(self): - A dict of string/value properties that will be passed to the Pad constructor - Supported dict properties: - - b - Sets the padding form the bottom (in px). - l - Sets the padding form the left (in px). - r - Sets the padding form the right (in px). - t - Sets the padding form the top (in px). - Returns ------- plotly.graph_objs.treemap.marker.Pad @@ -672,8 +352,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # pattern - # ------- @property def pattern(self): """ @@ -685,57 +363,6 @@ def pattern(self): - A dict of string/value properties that will be passed to the Pattern constructor - Supported dict properties: - - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. - Returns ------- plotly.graph_objs.treemap.marker.Pattern @@ -746,8 +373,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # reversescale - # ------------ @property def reversescale(self): """ @@ -769,8 +394,6 @@ def reversescale(self): def reversescale(self, val): self["reversescale"] = val - # showscale - # --------- @property def showscale(self): """ @@ -791,8 +414,6 @@ def showscale(self): def showscale(self, val): self["showscale"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -894,23 +515,23 @@ def _prop_descriptions(self): def __init__( self, arg=None, - autocolorscale=None, - cauto=None, - cmax=None, - cmid=None, - cmin=None, - coloraxis=None, - colorbar=None, - colors=None, - colorscale=None, - colorssrc=None, - cornerradius=None, - depthfade=None, - line=None, - pad=None, - pattern=None, - reversescale=None, - showscale=None, + autocolorscale: bool | None = None, + cauto: bool | None = None, + cmax: int | float | None = None, + cmid: int | float | None = None, + cmin: int | float | None = None, + coloraxis: str | None = None, + colorbar: None | None = None, + colors: NDArray | None = None, + colorscale: str | None = None, + colorssrc: str | None = None, + cornerradius: int | float | None = None, + depthfade: Any | None = None, + line: None | None = None, + pad: None | None = None, + pattern: None | None = None, + reversescale: bool | None = None, + showscale: bool | None = None, **kwargs, ): """ @@ -1020,14 +641,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -1042,86 +660,25 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("autocolorscale", None) - _v = autocolorscale if autocolorscale is not None else _v - if _v is not None: - self["autocolorscale"] = _v - _v = arg.pop("cauto", None) - _v = cauto if cauto is not None else _v - if _v is not None: - self["cauto"] = _v - _v = arg.pop("cmax", None) - _v = cmax if cmax is not None else _v - if _v is not None: - self["cmax"] = _v - _v = arg.pop("cmid", None) - _v = cmid if cmid is not None else _v - if _v is not None: - self["cmid"] = _v - _v = arg.pop("cmin", None) - _v = cmin if cmin is not None else _v - if _v is not None: - self["cmin"] = _v - _v = arg.pop("coloraxis", None) - _v = coloraxis if coloraxis is not None else _v - if _v is not None: - self["coloraxis"] = _v - _v = arg.pop("colorbar", None) - _v = colorbar if colorbar is not None else _v - if _v is not None: - self["colorbar"] = _v - _v = arg.pop("colors", None) - _v = colors if colors is not None else _v - if _v is not None: - self["colors"] = _v - _v = arg.pop("colorscale", None) - _v = colorscale if colorscale is not None else _v - if _v is not None: - self["colorscale"] = _v - _v = arg.pop("colorssrc", None) - _v = colorssrc if colorssrc is not None else _v - if _v is not None: - self["colorssrc"] = _v - _v = arg.pop("cornerradius", None) - _v = cornerradius if cornerradius is not None else _v - if _v is not None: - self["cornerradius"] = _v - _v = arg.pop("depthfade", None) - _v = depthfade if depthfade is not None else _v - if _v is not None: - self["depthfade"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("reversescale", None) - _v = reversescale if reversescale is not None else _v - if _v is not None: - self["reversescale"] = _v - _v = arg.pop("showscale", None) - _v = showscale if showscale is not None else _v - if _v is not None: - self["showscale"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("autocolorscale", arg, autocolorscale) + self._init_provided("cauto", arg, cauto) + self._init_provided("cmax", arg, cmax) + self._init_provided("cmid", arg, cmid) + self._init_provided("cmin", arg, cmin) + self._init_provided("coloraxis", arg, coloraxis) + self._init_provided("colorbar", arg, colorbar) + self._init_provided("colors", arg, colors) + self._init_provided("colorscale", arg, colorscale) + self._init_provided("colorssrc", arg, colorssrc) + self._init_provided("cornerradius", arg, cornerradius) + self._init_provided("depthfade", arg, depthfade) + self._init_provided("line", arg, line) + self._init_provided("pad", arg, pad) + self._init_provided("pattern", arg, pattern) + self._init_provided("reversescale", arg, reversescale) + self._init_provided("showscale", arg, showscale) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_outsidetextfont.py b/plotly/graph_objs/treemap/_outsidetextfont.py index 835637951d..6f6247aedf 100644 --- a/plotly/graph_objs/treemap/_outsidetextfont.py +++ b/plotly/graph_objs/treemap/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -580,18 +494,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -643,14 +550,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -665,90 +569,26 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_pathbar.py b/plotly/graph_objs/treemap/_pathbar.py index 8cdf60c0be..3875de30c0 100644 --- a/plotly/graph_objs/treemap/_pathbar.py +++ b/plotly/graph_objs/treemap/_pathbar.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pathbar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.pathbar" _valid_props = {"edgeshape", "side", "textfont", "thickness", "visible"} - # edgeshape - # --------- @property def edgeshape(self): """ @@ -32,8 +31,6 @@ def edgeshape(self): def edgeshape(self, val): self["edgeshape"] = val - # side - # ---- @property def side(self): """ @@ -54,8 +51,6 @@ def side(self): def side(self, val): self["side"] = val - # textfont - # -------- @property def textfont(self): """ @@ -67,79 +62,6 @@ def textfont(self): - A dict of string/value properties that will be passed to the Textfont constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.treemap.pathbar.Textfont @@ -150,8 +72,6 @@ def textfont(self): def textfont(self, val): self["textfont"] = val - # thickness - # --------- @property def thickness(self): """ @@ -172,8 +92,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # visible - # ------- @property def visible(self): """ @@ -193,8 +111,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -218,11 +134,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - edgeshape=None, - side=None, - textfont=None, - thickness=None, - visible=None, + edgeshape: Any | None = None, + side: Any | None = None, + textfont: None | None = None, + thickness: int | float | None = None, + visible: bool | None = None, **kwargs, ): """ @@ -254,14 +170,11 @@ def __init__( ------- Pathbar """ - super(Pathbar, self).__init__("pathbar") - + super().__init__("pathbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -276,38 +189,13 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Pathbar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("edgeshape", None) - _v = edgeshape if edgeshape is not None else _v - if _v is not None: - self["edgeshape"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("textfont", None) - _v = textfont if textfont is not None else _v - if _v is not None: - self["textfont"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("edgeshape", arg, edgeshape) + self._init_provided("side", arg, side) + self._init_provided("textfont", arg, textfont) + self._init_provided("thickness", arg, thickness) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_root.py b/plotly/graph_objs/treemap/_root.py index 19fb073608..b978ce365f 100644 --- a/plotly/graph_objs/treemap/_root.py +++ b/plotly/graph_objs/treemap/_root.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Root(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.root" _valid_props = {"color"} - # color - # ----- @property def color(self): """ @@ -24,42 +23,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -82,7 +44,7 @@ def _prop_descriptions(self): a colorscale is used to set the markers. """ - def __init__(self, arg=None, color=None, **kwargs): + def __init__(self, arg=None, color: str | None = None, **kwargs): """ Construct a new Root object @@ -100,14 +62,11 @@ def __init__(self, arg=None, color=None, **kwargs): ------- Root """ - super(Root, self).__init__("root") - + super().__init__("root") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -122,22 +81,9 @@ def __init__(self, arg=None, color=None, **kwargs): an instance of :class:`plotly.graph_objs.treemap.Root`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_stream.py b/plotly/graph_objs/treemap/_stream.py index 8f1c320912..d4f4dbe2af 100644 --- a/plotly/graph_objs/treemap/_stream.py +++ b/plotly/graph_objs/treemap/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.treemap.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_textfont.py b/plotly/graph_objs/treemap/_textfont.py index 9e1aabaa35..eb12a8fd02 100644 --- a/plotly/graph_objs/treemap/_textfont.py +++ b/plotly/graph_objs/treemap/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/_tiling.py b/plotly/graph_objs/treemap/_tiling.py index b892e7bdec..89f3712f06 100644 --- a/plotly/graph_objs/treemap/_tiling.py +++ b/plotly/graph_objs/treemap/_tiling.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tiling(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap" _path_str = "treemap.tiling" _valid_props = {"flip", "packing", "pad", "squarifyratio"} - # flip - # ---- @property def flip(self): """ @@ -33,8 +32,6 @@ def flip(self): def flip(self, val): self["flip"] = val - # packing - # ------- @property def packing(self): """ @@ -56,8 +53,6 @@ def packing(self): def packing(self, val): self["packing"] = val - # pad - # --- @property def pad(self): """ @@ -76,8 +71,6 @@ def pad(self): def pad(self, val): self["pad"] = val - # squarifyratio - # ------------- @property def squarifyratio(self): """ @@ -107,8 +100,6 @@ def squarifyratio(self): def squarifyratio(self, val): self["squarifyratio"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -138,7 +129,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, flip=None, packing=None, pad=None, squarifyratio=None, **kwargs + self, + arg=None, + flip: Any | None = None, + packing: Any | None = None, + pad: int | float | None = None, + squarifyratio: int | float | None = None, + **kwargs, ): """ Construct a new Tiling object @@ -177,14 +174,11 @@ def __init__( ------- Tiling """ - super(Tiling, self).__init__("tiling") - + super().__init__("tiling") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -199,34 +193,12 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.Tiling`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("flip", None) - _v = flip if flip is not None else _v - if _v is not None: - self["flip"] = _v - _v = arg.pop("packing", None) - _v = packing if packing is not None else _v - if _v is not None: - self["packing"] = _v - _v = arg.pop("pad", None) - _v = pad if pad is not None else _v - if _v is not None: - self["pad"] = _v - _v = arg.pop("squarifyratio", None) - _v = squarifyratio if squarifyratio is not None else _v - if _v is not None: - self["squarifyratio"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("flip", arg, flip) + self._init_provided("packing", arg, packing) + self._init_provided("pad", arg, pad) + self._init_provided("squarifyratio", arg, squarifyratio) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/hoverlabel/__init__.py b/plotly/graph_objs/treemap/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/treemap/hoverlabel/__init__.py +++ b/plotly/graph_objs/treemap/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/treemap/hoverlabel/_font.py b/plotly/graph_objs/treemap/hoverlabel/_font.py index ca452284ed..ebc500bc3c 100644 --- a/plotly/graph_objs/treemap/hoverlabel/_font.py +++ b/plotly/graph_objs/treemap/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.hoverlabel" _path_str = "treemap.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/legendgrouptitle/__init__.py b/plotly/graph_objs/treemap/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/treemap/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/treemap/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/treemap/legendgrouptitle/_font.py b/plotly/graph_objs/treemap/legendgrouptitle/_font.py index ff4b1beca0..9ccb0d2d3e 100644 --- a/plotly/graph_objs/treemap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/treemap/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.legendgrouptitle" _path_str = "treemap.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/__init__.py b/plotly/graph_objs/treemap/marker/__init__.py index a8a98bb5ff..b175232abe 100644 --- a/plotly/graph_objs/treemap/marker/__init__.py +++ b/plotly/graph_objs/treemap/marker/__init__.py @@ -1,17 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorbar import ColorBar - from ._line import Line - from ._pad import Pad - from ._pattern import Pattern - from . import colorbar -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".colorbar"], - ["._colorbar.ColorBar", "._line.Line", "._pad.Pad", "._pattern.Pattern"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".colorbar"], + ["._colorbar.ColorBar", "._line.Line", "._pad.Pad", "._pattern.Pattern"], +) diff --git a/plotly/graph_objs/treemap/marker/_colorbar.py b/plotly/graph_objs/treemap/marker/_colorbar.py index 14184370a3..ef487678b4 100644 --- a/plotly/graph_objs/treemap/marker/_colorbar.py +++ b/plotly/graph_objs/treemap/marker/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker" _path_str = "treemap.marker.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.treemap.marker.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.treemap.marker.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.treemap.marker.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.treemap.marker.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.marker.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/_line.py b/plotly/graph_objs/treemap/marker/_line.py index 10d261ee15..1e4a857d57 100644 --- a/plotly/graph_objs/treemap/marker/_line.py +++ b/plotly/graph_objs/treemap/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker" _path_str = "treemap.marker.line" _valid_props = {"color", "colorsrc", "width", "widthsrc"} - # color - # ----- @property def color(self): """ @@ -23,47 +22,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -71,8 +35,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -91,8 +53,6 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # width - # ----- @property def width(self): """ @@ -104,7 +64,7 @@ def width(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["width"] @@ -112,8 +72,6 @@ def width(self): def width(self, val): self["width"] = val - # widthsrc - # -------- @property def widthsrc(self): """ @@ -132,8 +90,6 @@ def widthsrc(self): def widthsrc(self, val): self["widthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -152,7 +108,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, color=None, colorsrc=None, width=None, widthsrc=None, **kwargs + self, + arg=None, + color: str | None = None, + colorsrc: str | None = None, + width: int | float | None = None, + widthsrc: str | None = None, + **kwargs, ): """ Construct a new Line object @@ -180,14 +142,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -202,34 +161,12 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - _v = arg.pop("widthsrc", None) - _v = widthsrc if widthsrc is not None else _v - if _v is not None: - self["widthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("width", arg, width) + self._init_provided("widthsrc", arg, widthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/_pad.py b/plotly/graph_objs/treemap/marker/_pad.py index 33e35a2cb6..a42b6090ad 100644 --- a/plotly/graph_objs/treemap/marker/_pad.py +++ b/plotly/graph_objs/treemap/marker/_pad.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pad(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker" _path_str = "treemap.marker.pad" _valid_props = {"b", "l", "r", "t"} - # b - # - @property def b(self): """ @@ -30,8 +29,6 @@ def b(self): def b(self, val): self["b"] = val - # l - # - @property def l(self): """ @@ -50,8 +47,6 @@ def l(self): def l(self, val): self["l"] = val - # r - # - @property def r(self): """ @@ -70,8 +65,6 @@ def r(self): def r(self, val): self["r"] = val - # t - # - @property def t(self): """ @@ -90,8 +83,6 @@ def t(self): def t(self, val): self["t"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -105,7 +96,15 @@ def _prop_descriptions(self): Sets the padding form the top (in px). """ - def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): + def __init__( + self, + arg=None, + b: int | float | None = None, + l: int | float | None = None, + r: int | float | None = None, + t: int | float | None = None, + **kwargs, + ): """ Construct a new Pad object @@ -128,14 +127,11 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): ------- Pad """ - super(Pad, self).__init__("pad") - + super().__init__("pad") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -150,34 +146,12 @@ def __init__(self, arg=None, b=None, l=None, r=None, t=None, **kwargs): an instance of :class:`plotly.graph_objs.treemap.marker.Pad`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("b", None) - _v = b if b is not None else _v - if _v is not None: - self["b"] = _v - _v = arg.pop("l", None) - _v = l if l is not None else _v - if _v is not None: - self["l"] = _v - _v = arg.pop("r", None) - _v = r if r is not None else _v - if _v is not None: - self["r"] = _v - _v = arg.pop("t", None) - _v = t if t is not None else _v - if _v is not None: - self["t"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("b", arg, b) + self._init_provided("l", arg, l) + self._init_provided("r", arg, r) + self._init_provided("t", arg, t) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/_pattern.py b/plotly/graph_objs/treemap/marker/_pattern.py index a5f40d5387..dd36039ea6 100644 --- a/plotly/graph_objs/treemap/marker/_pattern.py +++ b/plotly/graph_objs/treemap/marker/_pattern.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Pattern(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker" _path_str = "treemap.marker.pattern" _valid_props = { @@ -23,8 +24,6 @@ class Pattern(_BaseTraceHierarchyType): "soliditysrc", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -38,47 +37,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -86,8 +50,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -106,8 +68,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # fgcolor - # ------- @property def fgcolor(self): """ @@ -121,47 +81,12 @@ def fgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["fgcolor"] @@ -169,8 +94,6 @@ def fgcolor(self): def fgcolor(self, val): self["fgcolor"] = val - # fgcolorsrc - # ---------- @property def fgcolorsrc(self): """ @@ -189,8 +112,6 @@ def fgcolorsrc(self): def fgcolorsrc(self, val): self["fgcolorsrc"] = val - # fgopacity - # --------- @property def fgopacity(self): """ @@ -210,8 +131,6 @@ def fgopacity(self): def fgopacity(self, val): self["fgopacity"] = val - # fillmode - # -------- @property def fillmode(self): """ @@ -232,8 +151,6 @@ def fillmode(self): def fillmode(self, val): self["fillmode"] = val - # shape - # ----- @property def shape(self): """ @@ -247,7 +164,7 @@ def shape(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["shape"] @@ -255,8 +172,6 @@ def shape(self): def shape(self, val): self["shape"] = val - # shapesrc - # -------- @property def shapesrc(self): """ @@ -275,8 +190,6 @@ def shapesrc(self): def shapesrc(self, val): self["shapesrc"] = val - # size - # ---- @property def size(self): """ @@ -289,7 +202,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -297,8 +210,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -317,8 +228,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # solidity - # -------- @property def solidity(self): """ @@ -333,7 +242,7 @@ def solidity(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["solidity"] @@ -341,8 +250,6 @@ def solidity(self): def solidity(self, val): self["solidity"] = val - # soliditysrc - # ----------- @property def soliditysrc(self): """ @@ -361,8 +268,6 @@ def soliditysrc(self): def soliditysrc(self, val): self["soliditysrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -417,18 +322,18 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bgcolorsrc=None, - fgcolor=None, - fgcolorsrc=None, - fgopacity=None, - fillmode=None, - shape=None, - shapesrc=None, - size=None, - sizesrc=None, - solidity=None, - soliditysrc=None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + fgcolor: str | None = None, + fgcolorsrc: str | None = None, + fgopacity: int | float | None = None, + fillmode: Any | None = None, + shape: Any | None = None, + shapesrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + solidity: int | float | None = None, + soliditysrc: str | None = None, **kwargs, ): """ @@ -493,14 +398,11 @@ def __init__( ------- Pattern """ - super(Pattern, self).__init__("pattern") - + super().__init__("pattern") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -515,66 +417,20 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.marker.Pattern`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("fgcolor", None) - _v = fgcolor if fgcolor is not None else _v - if _v is not None: - self["fgcolor"] = _v - _v = arg.pop("fgcolorsrc", None) - _v = fgcolorsrc if fgcolorsrc is not None else _v - if _v is not None: - self["fgcolorsrc"] = _v - _v = arg.pop("fgopacity", None) - _v = fgopacity if fgopacity is not None else _v - if _v is not None: - self["fgopacity"] = _v - _v = arg.pop("fillmode", None) - _v = fillmode if fillmode is not None else _v - if _v is not None: - self["fillmode"] = _v - _v = arg.pop("shape", None) - _v = shape if shape is not None else _v - if _v is not None: - self["shape"] = _v - _v = arg.pop("shapesrc", None) - _v = shapesrc if shapesrc is not None else _v - if _v is not None: - self["shapesrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("solidity", None) - _v = solidity if solidity is not None else _v - if _v is not None: - self["solidity"] = _v - _v = arg.pop("soliditysrc", None) - _v = soliditysrc if soliditysrc is not None else _v - if _v is not None: - self["soliditysrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("fgcolor", arg, fgcolor) + self._init_provided("fgcolorsrc", arg, fgcolorsrc) + self._init_provided("fgopacity", arg, fgopacity) + self._init_provided("fillmode", arg, fillmode) + self._init_provided("shape", arg, shape) + self._init_provided("shapesrc", arg, shapesrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("solidity", arg, solidity) + self._init_provided("soliditysrc", arg, soliditysrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/colorbar/__init__.py b/plotly/graph_objs/treemap/marker/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/__init__.py +++ b/plotly/graph_objs/treemap/marker/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py b/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py index 6c79bda5d4..e9e5d743b5 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker.colorbar" _path_str = "treemap.marker.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py b/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py index fa3754e45d..05155a046e 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/treemap/marker/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker.colorbar" _path_str = "treemap.marker.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/colorbar/_title.py b/plotly/graph_objs/treemap/marker/colorbar/_title.py index 98cc61b005..1668e03842 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/_title.py +++ b/plotly/graph_objs/treemap/marker/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker.colorbar" _path_str = "treemap.marker.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.treemap.marker.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py b/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py +++ b/plotly/graph_objs/treemap/marker/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/treemap/marker/colorbar/title/_font.py b/plotly/graph_objs/treemap/marker/colorbar/title/_font.py index 77ed3544d4..12ed8a0ac6 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/treemap/marker/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.marker.colorbar.title" _path_str = "treemap.marker.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.marker.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/treemap/pathbar/__init__.py b/plotly/graph_objs/treemap/pathbar/__init__.py index 1640397aa7..2afd605560 100644 --- a/plotly/graph_objs/treemap/pathbar/__init__.py +++ b/plotly/graph_objs/treemap/pathbar/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import Textfont -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.Textfont"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._textfont.Textfont"]) diff --git a/plotly/graph_objs/treemap/pathbar/_textfont.py b/plotly/graph_objs/treemap/pathbar/_textfont.py index 9695927e46..701c3bb321 100644 --- a/plotly/graph_objs/treemap/pathbar/_textfont.py +++ b/plotly/graph_objs/treemap/pathbar/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "treemap.pathbar" _path_str = "treemap.pathbar.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.treemap.pathbar.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/__init__.py b/plotly/graph_objs/violin/__init__.py index e172bcbf7d..9e0217028f 100644 --- a/plotly/graph_objs/violin/__init__.py +++ b/plotly/graph_objs/violin/__init__.py @@ -1,44 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._box import Box - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._line import Line - from ._marker import Marker - from ._meanline import Meanline - from ._selected import Selected - from ._stream import Stream - from ._unselected import Unselected - from . import box - from . import hoverlabel - from . import legendgrouptitle - from . import marker - from . import selected - from . import unselected -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".box", - ".hoverlabel", - ".legendgrouptitle", - ".marker", - ".selected", - ".unselected", - ], - [ - "._box.Box", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._line.Line", - "._marker.Marker", - "._meanline.Meanline", - "._selected.Selected", - "._stream.Stream", - "._unselected.Unselected", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".box", ".hoverlabel", ".legendgrouptitle", ".marker", ".selected", ".unselected"], + [ + "._box.Box", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._line.Line", + "._marker.Marker", + "._meanline.Meanline", + "._selected.Selected", + "._stream.Stream", + "._unselected.Unselected", + ], +) diff --git a/plotly/graph_objs/violin/_box.py b/plotly/graph_objs/violin/_box.py index 5b343e830e..967c66003d 100644 --- a/plotly/graph_objs/violin/_box.py +++ b/plotly/graph_objs/violin/_box.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Box(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.box" _valid_props = {"fillcolor", "line", "visible", "width"} - # fillcolor - # --------- @property def fillcolor(self): """ @@ -22,42 +21,7 @@ def fillcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def fillcolor(self): def fillcolor(self, val): self["fillcolor"] = val - # line - # ---- @property def line(self): """ @@ -80,13 +42,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the inner box plot bounding line color. - width - Sets the inner box plot bounding line width. - Returns ------- plotly.graph_objs.violin.box.Line @@ -97,8 +52,6 @@ def line(self): def line(self, val): self["line"] = val - # visible - # ------- @property def visible(self): """ @@ -118,8 +71,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -140,8 +91,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -160,7 +109,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, fillcolor=None, line=None, visible=None, width=None, **kwargs + self, + arg=None, + fillcolor: str | None = None, + line: None | None = None, + visible: bool | None = None, + width: int | float | None = None, + **kwargs, ): """ Construct a new Box object @@ -187,14 +142,11 @@ def __init__( ------- Box """ - super(Box, self).__init__("box") - + super().__init__("box") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -209,34 +161,12 @@ def __init__( an instance of :class:`plotly.graph_objs.violin.Box`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fillcolor", None) - _v = fillcolor if fillcolor is not None else _v - if _v is not None: - self["fillcolor"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fillcolor", arg, fillcolor) + self._init_provided("line", arg, line) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_hoverlabel.py b/plotly/graph_objs/violin/_hoverlabel.py index 9577b2e519..6d3919a7e9 100644 --- a/plotly/graph_objs/violin/_hoverlabel.py +++ b/plotly/graph_objs/violin/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.violin.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.violin.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_legendgrouptitle.py b/plotly/graph_objs/violin/_legendgrouptitle.py index 422d55b606..69e345070d 100644 --- a/plotly/graph_objs/violin/_legendgrouptitle.py +++ b/plotly/graph_objs/violin/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.violin.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_line.py b/plotly/graph_objs/violin/_line.py index b345e21426..f966732762 100644 --- a/plotly/graph_objs/violin/_line.py +++ b/plotly/graph_objs/violin/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the width (in px) of line bounding the violin(s). """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -118,14 +84,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -140,26 +103,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_marker.py b/plotly/graph_objs/violin/_marker.py index 6cc91d1784..680cce6826 100644 --- a/plotly/graph_objs/violin/_marker.py +++ b/plotly/graph_objs/violin/_marker.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.marker" _valid_props = { @@ -18,8 +19,6 @@ class Marker(_BaseTraceHierarchyType): "symbol", } - # angle - # ----- @property def angle(self): """ @@ -40,8 +39,6 @@ def angle(self): def angle(self, val): self["angle"] = val - # color - # ----- @property def color(self): """ @@ -55,42 +52,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -102,8 +64,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -113,25 +73,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. - Returns ------- plotly.graph_objs.violin.marker.Line @@ -142,8 +83,6 @@ def line(self): def line(self, val): self["line"] = val - # opacity - # ------- @property def opacity(self): """ @@ -162,8 +101,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # outliercolor - # ------------ @property def outliercolor(self): """ @@ -174,42 +111,7 @@ def outliercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -221,8 +123,6 @@ def outliercolor(self): def outliercolor(self, val): self["outliercolor"] = val - # size - # ---- @property def size(self): """ @@ -241,8 +141,6 @@ def size(self): def size(self, val): self["size"] = val - # symbol - # ------ @property def symbol(self): """ @@ -353,8 +251,6 @@ def symbol(self): def symbol(self, val): self["symbol"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -386,13 +282,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - angle=None, - color=None, - line=None, - opacity=None, - outliercolor=None, - size=None, - symbol=None, + angle: int | float | None = None, + color: str | None = None, + line: None | None = None, + opacity: int | float | None = None, + outliercolor: str | None = None, + size: int | float | None = None, + symbol: Any | None = None, **kwargs, ): """ @@ -431,14 +327,11 @@ def __init__( ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -453,46 +346,15 @@ def __init__( an instance of :class:`plotly.graph_objs.violin.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("angle", None) - _v = angle if angle is not None else _v - if _v is not None: - self["angle"] = _v - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("outliercolor", None) - _v = outliercolor if outliercolor is not None else _v - if _v is not None: - self["outliercolor"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("symbol", None) - _v = symbol if symbol is not None else _v - if _v is not None: - self["symbol"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("angle", arg, angle) + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) + self._init_provided("opacity", arg, opacity) + self._init_provided("outliercolor", arg, outliercolor) + self._init_provided("size", arg, size) + self._init_provided("symbol", arg, symbol) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_meanline.py b/plotly/graph_objs/violin/_meanline.py index a01a203c03..8c2130415b 100644 --- a/plotly/graph_objs/violin/_meanline.py +++ b/plotly/graph_objs/violin/_meanline.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Meanline(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.meanline" _valid_props = {"color", "visible", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # visible - # ------- @property def visible(self): """ @@ -92,8 +54,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # width - # ----- @property def width(self): """ @@ -112,8 +72,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -129,7 +87,14 @@ def _prop_descriptions(self): Sets the mean line width. """ - def __init__(self, arg=None, color=None, visible=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + visible: bool | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Meanline object @@ -154,14 +119,11 @@ def __init__(self, arg=None, color=None, visible=None, width=None, **kwargs): ------- Meanline """ - super(Meanline, self).__init__("meanline") - + super().__init__("meanline") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -176,30 +138,11 @@ def __init__(self, arg=None, color=None, visible=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.Meanline`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("visible", arg, visible) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_selected.py b/plotly/graph_objs/violin/_selected.py index 5af0f9da16..037ecbd559 100644 --- a/plotly/graph_objs/violin/_selected.py +++ b/plotly/graph_objs/violin/_selected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Selected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.selected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. - Returns ------- plotly.graph_objs.violin.selected.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Selected object @@ -68,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Selected """ - super(Selected, self).__init__("selected") - + super().__init__("selected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -90,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.Selected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_stream.py b/plotly/graph_objs/violin/_stream.py index 1650d9e04a..b782283f68 100644 --- a/plotly/graph_objs/violin/_stream.py +++ b/plotly/graph_objs/violin/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/_unselected.py b/plotly/graph_objs/violin/_unselected.py index b2bbee1581..0b2922278a 100644 --- a/plotly/graph_objs/violin/_unselected.py +++ b/plotly/graph_objs/violin/_unselected.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Unselected(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin" _path_str = "violin.unselected" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,18 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. - Returns ------- plotly.graph_objs.violin.unselected.Marker @@ -43,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -53,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Unselected object @@ -71,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Unselected """ - super(Unselected, self).__init__("unselected") - + super().__init__("unselected") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -93,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.Unselected`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/box/__init__.py b/plotly/graph_objs/violin/box/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/violin/box/__init__.py +++ b/plotly/graph_objs/violin/box/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/violin/box/_line.py b/plotly/graph_objs/violin/box/_line.py index 82009a329e..ce4395a760 100644 --- a/plotly/graph_objs/violin/box/_line.py +++ b/plotly/graph_objs/violin/box/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin.box" _path_str = "violin.box.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the inner box plot bounding line width. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.box.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/hoverlabel/__init__.py b/plotly/graph_objs/violin/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/violin/hoverlabel/__init__.py +++ b/plotly/graph_objs/violin/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/violin/hoverlabel/_font.py b/plotly/graph_objs/violin/hoverlabel/_font.py index 57c2ce2323..86322f1eec 100644 --- a/plotly/graph_objs/violin/hoverlabel/_font.py +++ b/plotly/graph_objs/violin/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin.hoverlabel" _path_str = "violin.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.violin.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/legendgrouptitle/__init__.py b/plotly/graph_objs/violin/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/violin/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/violin/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/violin/legendgrouptitle/_font.py b/plotly/graph_objs/violin/legendgrouptitle/_font.py index a29afec501..7c96c1496a 100644 --- a/plotly/graph_objs/violin/legendgrouptitle/_font.py +++ b/plotly/graph_objs/violin/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin.legendgrouptitle" _path_str = "violin.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.violin.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/marker/__init__.py b/plotly/graph_objs/violin/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/violin/marker/__init__.py +++ b/plotly/graph_objs/violin/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/violin/marker/_line.py b/plotly/graph_objs/violin/marker/_line.py index 1b5ca38df2..026f57d9bc 100644 --- a/plotly/graph_objs/violin/marker/_line.py +++ b/plotly/graph_objs/violin/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin.marker" _path_str = "violin.marker.line" _valid_props = {"color", "outliercolor", "outlierwidth", "width"} - # color - # ----- @property def color(self): """ @@ -25,42 +24,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -72,8 +36,6 @@ def color(self): def color(self, val): self["color"] = val - # outliercolor - # ------------ @property def outliercolor(self): """ @@ -85,42 +47,7 @@ def outliercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -132,8 +59,6 @@ def outliercolor(self): def outliercolor(self, val): self["outliercolor"] = val - # outlierwidth - # ------------ @property def outlierwidth(self): """ @@ -153,8 +78,6 @@ def outlierwidth(self): def outlierwidth(self, val): self["outlierwidth"] = val - # width - # ----- @property def width(self): """ @@ -173,8 +96,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -198,10 +119,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - outliercolor=None, - outlierwidth=None, - width=None, + color: str | None = None, + outliercolor: str | None = None, + outlierwidth: int | float | None = None, + width: int | float | None = None, **kwargs, ): """ @@ -233,14 +154,11 @@ def __init__( ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -255,34 +173,12 @@ def __init__( an instance of :class:`plotly.graph_objs.violin.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("outliercolor", None) - _v = outliercolor if outliercolor is not None else _v - if _v is not None: - self["outliercolor"] = _v - _v = arg.pop("outlierwidth", None) - _v = outlierwidth if outlierwidth is not None else _v - if _v is not None: - self["outlierwidth"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("outliercolor", arg, outliercolor) + self._init_provided("outlierwidth", arg, outlierwidth) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/selected/__init__.py b/plotly/graph_objs/violin/selected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/violin/selected/__init__.py +++ b/plotly/graph_objs/violin/selected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/violin/selected/_marker.py b/plotly/graph_objs/violin/selected/_marker.py index ab927292f8..0e91b1bd5b 100644 --- a/plotly/graph_objs/violin/selected/_marker.py +++ b/plotly/graph_objs/violin/selected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin.selected" _path_str = "violin.selected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -89,8 +51,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -109,8 +69,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the marker size of selected points. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.selected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/violin/unselected/__init__.py b/plotly/graph_objs/violin/unselected/__init__.py index dfd3406713..17b6d670bc 100644 --- a/plotly/graph_objs/violin/unselected/__init__.py +++ b/plotly/graph_objs/violin/unselected/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._marker.Marker"]) diff --git a/plotly/graph_objs/violin/unselected/_marker.py b/plotly/graph_objs/violin/unselected/_marker.py index 76449d2b9b..6ce86abf12 100644 --- a/plotly/graph_objs/violin/unselected/_marker.py +++ b/plotly/graph_objs/violin/unselected/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "violin.unselected" _path_str = "violin.unselected.marker" _valid_props = {"color", "opacity", "size"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # opacity - # ------- @property def opacity(self): """ @@ -91,8 +53,6 @@ def opacity(self): def opacity(self, val): self["opacity"] = val - # size - # ---- @property def size(self): """ @@ -112,8 +72,6 @@ def size(self): def size(self, val): self["size"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -128,7 +86,14 @@ def _prop_descriptions(self): when a selection exists. """ - def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + opacity: int | float | None = None, + size: int | float | None = None, + **kwargs, + ): """ Construct a new Marker object @@ -152,14 +117,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -174,30 +136,11 @@ def __init__(self, arg=None, color=None, opacity=None, size=None, **kwargs): an instance of :class:`plotly.graph_objs.violin.unselected.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("opacity", None) - _v = opacity if opacity is not None else _v - if _v is not None: - self["opacity"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("opacity", arg, opacity) + self._init_provided("size", arg, size) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/__init__.py b/plotly/graph_objs/volume/__init__.py index 505fd03f99..0b8a4b7653 100644 --- a/plotly/graph_objs/volume/__init__.py +++ b/plotly/graph_objs/volume/__init__.py @@ -1,40 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._caps import Caps - from ._colorbar import ColorBar - from ._contour import Contour - from ._hoverlabel import Hoverlabel - from ._legendgrouptitle import Legendgrouptitle - from ._lighting import Lighting - from ._lightposition import Lightposition - from ._slices import Slices - from ._spaceframe import Spaceframe - from ._stream import Stream - from ._surface import Surface - from . import caps - from . import colorbar - from . import hoverlabel - from . import legendgrouptitle - from . import slices -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".caps", ".colorbar", ".hoverlabel", ".legendgrouptitle", ".slices"], - [ - "._caps.Caps", - "._colorbar.ColorBar", - "._contour.Contour", - "._hoverlabel.Hoverlabel", - "._legendgrouptitle.Legendgrouptitle", - "._lighting.Lighting", - "._lightposition.Lightposition", - "._slices.Slices", - "._spaceframe.Spaceframe", - "._stream.Stream", - "._surface.Surface", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".caps", ".colorbar", ".hoverlabel", ".legendgrouptitle", ".slices"], + [ + "._caps.Caps", + "._colorbar.ColorBar", + "._contour.Contour", + "._hoverlabel.Hoverlabel", + "._legendgrouptitle.Legendgrouptitle", + "._lighting.Lighting", + "._lightposition.Lightposition", + "._slices.Slices", + "._spaceframe.Spaceframe", + "._stream.Stream", + "._surface.Surface", + ], +) diff --git a/plotly/graph_objs/volume/_caps.py b/plotly/graph_objs/volume/_caps.py index 9d6462ccc8..27ec158555 100644 --- a/plotly/graph_objs/volume/_caps.py +++ b/plotly/graph_objs/volume/_caps.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Caps(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.caps" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -21,22 +20,6 @@ def x(self): - A dict of string/value properties that will be passed to the X constructor - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - Returns ------- plotly.graph_objs.volume.caps.X @@ -47,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -58,22 +39,6 @@ def y(self): - A dict of string/value properties that will be passed to the Y constructor - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - Returns ------- plotly.graph_objs.volume.caps.Y @@ -84,8 +49,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -95,22 +58,6 @@ def z(self): - A dict of string/value properties that will be passed to the Z constructor - Supported dict properties: - - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. - Returns ------- plotly.graph_objs.volume.caps.Z @@ -121,8 +68,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -137,7 +82,14 @@ def _prop_descriptions(self): dict with compatible properties """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: None | None = None, + y: None | None = None, + z: None | None = None, + **kwargs, + ): """ Construct a new Caps object @@ -160,14 +112,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Caps """ - super(Caps, self).__init__("caps") - + super().__init__("caps") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -182,30 +131,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Caps`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_colorbar.py b/plotly/graph_objs/volume/_colorbar.py index a71748a52c..5143cf56b4 100644 --- a/plotly/graph_objs/volume/_colorbar.py +++ b/plotly/graph_objs/volume/_colorbar.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.colorbar" _valid_props = { @@ -60,8 +61,6 @@ class ColorBar(_BaseTraceHierarchyType): "yref", } - # bgcolor - # ------- @property def bgcolor(self): """ @@ -72,42 +71,7 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -119,8 +83,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -131,42 +93,7 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -178,8 +105,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # borderwidth - # ----------- @property def borderwidth(self): """ @@ -198,8 +123,6 @@ def borderwidth(self): def borderwidth(self, val): self["borderwidth"] = val - # dtick - # ----- @property def dtick(self): """ @@ -236,8 +159,6 @@ def dtick(self): def dtick(self, val): self["dtick"] = val - # exponentformat - # -------------- @property def exponentformat(self): """ @@ -261,8 +182,6 @@ def exponentformat(self): def exponentformat(self, val): self["exponentformat"] = val - # labelalias - # ---------- @property def labelalias(self): """ @@ -288,8 +207,6 @@ def labelalias(self): def labelalias(self, val): self["labelalias"] = val - # len - # --- @property def len(self): """ @@ -310,8 +227,6 @@ def len(self): def len(self, val): self["len"] = val - # lenmode - # ------- @property def lenmode(self): """ @@ -333,8 +248,6 @@ def lenmode(self): def lenmode(self, val): self["lenmode"] = val - # minexponent - # ----------- @property def minexponent(self): """ @@ -354,8 +267,6 @@ def minexponent(self): def minexponent(self, val): self["minexponent"] = val - # nticks - # ------ @property def nticks(self): """ @@ -378,8 +289,6 @@ def nticks(self): def nticks(self, val): self["nticks"] = val - # orientation - # ----------- @property def orientation(self): """ @@ -399,8 +308,6 @@ def orientation(self): def orientation(self, val): self["orientation"] = val - # outlinecolor - # ------------ @property def outlinecolor(self): """ @@ -411,42 +318,7 @@ def outlinecolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -458,8 +330,6 @@ def outlinecolor(self): def outlinecolor(self, val): self["outlinecolor"] = val - # outlinewidth - # ------------ @property def outlinewidth(self): """ @@ -478,8 +348,6 @@ def outlinewidth(self): def outlinewidth(self, val): self["outlinewidth"] = val - # separatethousands - # ----------------- @property def separatethousands(self): """ @@ -498,8 +366,6 @@ def separatethousands(self): def separatethousands(self, val): self["separatethousands"] = val - # showexponent - # ------------ @property def showexponent(self): """ @@ -522,8 +388,6 @@ def showexponent(self): def showexponent(self, val): self["showexponent"] = val - # showticklabels - # -------------- @property def showticklabels(self): """ @@ -542,8 +406,6 @@ def showticklabels(self): def showticklabels(self, val): self["showticklabels"] = val - # showtickprefix - # -------------- @property def showtickprefix(self): """ @@ -566,8 +428,6 @@ def showtickprefix(self): def showtickprefix(self, val): self["showtickprefix"] = val - # showticksuffix - # -------------- @property def showticksuffix(self): """ @@ -587,8 +447,6 @@ def showticksuffix(self): def showticksuffix(self, val): self["showticksuffix"] = val - # thickness - # --------- @property def thickness(self): """ @@ -608,8 +466,6 @@ def thickness(self): def thickness(self, val): self["thickness"] = val - # thicknessmode - # ------------- @property def thicknessmode(self): """ @@ -631,8 +487,6 @@ def thicknessmode(self): def thicknessmode(self, val): self["thicknessmode"] = val - # tick0 - # ----- @property def tick0(self): """ @@ -658,8 +512,6 @@ def tick0(self): def tick0(self, val): self["tick0"] = val - # tickangle - # --------- @property def tickangle(self): """ @@ -682,8 +534,6 @@ def tickangle(self): def tickangle(self, val): self["tickangle"] = val - # tickcolor - # --------- @property def tickcolor(self): """ @@ -694,42 +544,7 @@ def tickcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -741,8 +556,6 @@ def tickcolor(self): def tickcolor(self, val): self["tickcolor"] = val - # tickfont - # -------- @property def tickfont(self): """ @@ -754,52 +567,6 @@ def tickfont(self): - A dict of string/value properties that will be passed to the Tickfont constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.volume.colorbar.Tickfont @@ -810,8 +577,6 @@ def tickfont(self): def tickfont(self, val): self["tickfont"] = val - # tickformat - # ---------- @property def tickformat(self): """ @@ -840,8 +605,6 @@ def tickformat(self): def tickformat(self, val): self["tickformat"] = val - # tickformatstops - # --------------- @property def tickformatstops(self): """ @@ -851,42 +614,6 @@ def tickformatstops(self): - A list or tuple of dicts of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" - Returns ------- tuple[plotly.graph_objs.volume.colorbar.Tickformatstop] @@ -897,8 +624,6 @@ def tickformatstops(self): def tickformatstops(self, val): self["tickformatstops"] = val - # tickformatstopdefaults - # ---------------------- @property def tickformatstopdefaults(self): """ @@ -913,8 +638,6 @@ def tickformatstopdefaults(self): - A dict of string/value properties that will be passed to the Tickformatstop constructor - Supported dict properties: - Returns ------- plotly.graph_objs.volume.colorbar.Tickformatstop @@ -925,8 +648,6 @@ def tickformatstopdefaults(self): def tickformatstopdefaults(self, val): self["tickformatstopdefaults"] = val - # ticklabeloverflow - # ----------------- @property def ticklabeloverflow(self): """ @@ -949,8 +670,6 @@ def ticklabeloverflow(self): def ticklabeloverflow(self, val): self["ticklabeloverflow"] = val - # ticklabelposition - # ----------------- @property def ticklabelposition(self): """ @@ -974,8 +693,6 @@ def ticklabelposition(self): def ticklabelposition(self, val): self["ticklabelposition"] = val - # ticklabelstep - # ------------- @property def ticklabelstep(self): """ @@ -1000,8 +717,6 @@ def ticklabelstep(self): def ticklabelstep(self, val): self["ticklabelstep"] = val - # ticklen - # ------- @property def ticklen(self): """ @@ -1020,8 +735,6 @@ def ticklen(self): def ticklen(self, val): self["ticklen"] = val - # tickmode - # -------- @property def tickmode(self): """ @@ -1047,8 +760,6 @@ def tickmode(self): def tickmode(self, val): self["tickmode"] = val - # tickprefix - # ---------- @property def tickprefix(self): """ @@ -1068,8 +779,6 @@ def tickprefix(self): def tickprefix(self, val): self["tickprefix"] = val - # ticks - # ----- @property def ticks(self): """ @@ -1091,8 +800,6 @@ def ticks(self): def ticks(self, val): self["ticks"] = val - # ticksuffix - # ---------- @property def ticksuffix(self): """ @@ -1112,8 +819,6 @@ def ticksuffix(self): def ticksuffix(self, val): self["ticksuffix"] = val - # ticktext - # -------- @property def ticktext(self): """ @@ -1126,7 +831,7 @@ def ticktext(self): Returns ------- - numpy.ndarray + NDArray """ return self["ticktext"] @@ -1134,8 +839,6 @@ def ticktext(self): def ticktext(self, val): self["ticktext"] = val - # ticktextsrc - # ----------- @property def ticktextsrc(self): """ @@ -1154,8 +857,6 @@ def ticktextsrc(self): def ticktextsrc(self, val): self["ticktextsrc"] = val - # tickvals - # -------- @property def tickvals(self): """ @@ -1167,7 +868,7 @@ def tickvals(self): Returns ------- - numpy.ndarray + NDArray """ return self["tickvals"] @@ -1175,8 +876,6 @@ def tickvals(self): def tickvals(self, val): self["tickvals"] = val - # tickvalssrc - # ----------- @property def tickvalssrc(self): """ @@ -1195,8 +894,6 @@ def tickvalssrc(self): def tickvalssrc(self, val): self["tickvalssrc"] = val - # tickwidth - # --------- @property def tickwidth(self): """ @@ -1215,8 +912,6 @@ def tickwidth(self): def tickwidth(self, val): self["tickwidth"] = val - # title - # ----- @property def title(self): """ @@ -1226,18 +921,6 @@ def title(self): - A dict of string/value properties that will be passed to the Title constructor - Supported dict properties: - - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. - Returns ------- plotly.graph_objs.volume.colorbar.Title @@ -1248,8 +931,6 @@ def title(self): def title(self, val): self["title"] = val - # x - # - @property def x(self): """ @@ -1274,8 +955,6 @@ def x(self): def x(self, val): self["x"] = val - # xanchor - # ------- @property def xanchor(self): """ @@ -1298,8 +977,6 @@ def xanchor(self): def xanchor(self, val): self["xanchor"] = val - # xpad - # ---- @property def xpad(self): """ @@ -1318,8 +995,6 @@ def xpad(self): def xpad(self, val): self["xpad"] = val - # xref - # ---- @property def xref(self): """ @@ -1341,8 +1016,6 @@ def xref(self): def xref(self, val): self["xref"] = val - # y - # - @property def y(self): """ @@ -1367,8 +1040,6 @@ def y(self): def y(self, val): self["y"] = val - # yanchor - # ------- @property def yanchor(self): """ @@ -1391,8 +1062,6 @@ def yanchor(self): def yanchor(self, val): self["yanchor"] = val - # ypad - # ---- @property def ypad(self): """ @@ -1411,8 +1080,6 @@ def ypad(self): def ypad(self, val): self["ypad"] = val - # yref - # ---- @property def yref(self): """ @@ -1434,8 +1101,6 @@ def yref(self): def yref(self, val): self["yref"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -1682,55 +1347,55 @@ def _prop_descriptions(self): def __init__( self, arg=None, - bgcolor=None, - bordercolor=None, - borderwidth=None, - dtick=None, - exponentformat=None, - labelalias=None, - len=None, - lenmode=None, - minexponent=None, - nticks=None, - orientation=None, - outlinecolor=None, - outlinewidth=None, - separatethousands=None, - showexponent=None, - showticklabels=None, - showtickprefix=None, - showticksuffix=None, - thickness=None, - thicknessmode=None, - tick0=None, - tickangle=None, - tickcolor=None, - tickfont=None, - tickformat=None, - tickformatstops=None, - tickformatstopdefaults=None, - ticklabeloverflow=None, - ticklabelposition=None, - ticklabelstep=None, - ticklen=None, - tickmode=None, - tickprefix=None, - ticks=None, - ticksuffix=None, - ticktext=None, - ticktextsrc=None, - tickvals=None, - tickvalssrc=None, - tickwidth=None, - title=None, - x=None, - xanchor=None, - xpad=None, - xref=None, - y=None, - yanchor=None, - ypad=None, - yref=None, + bgcolor: str | None = None, + bordercolor: str | None = None, + borderwidth: int | float | None = None, + dtick: Any | None = None, + exponentformat: Any | None = None, + labelalias: Any | None = None, + len: int | float | None = None, + lenmode: Any | None = None, + minexponent: int | float | None = None, + nticks: int | None = None, + orientation: Any | None = None, + outlinecolor: str | None = None, + outlinewidth: int | float | None = None, + separatethousands: bool | None = None, + showexponent: Any | None = None, + showticklabels: bool | None = None, + showtickprefix: Any | None = None, + showticksuffix: Any | None = None, + thickness: int | float | None = None, + thicknessmode: Any | None = None, + tick0: Any | None = None, + tickangle: int | float | None = None, + tickcolor: str | None = None, + tickfont: None | None = None, + tickformat: str | None = None, + tickformatstops: None | None = None, + tickformatstopdefaults: None | None = None, + ticklabeloverflow: Any | None = None, + ticklabelposition: Any | None = None, + ticklabelstep: int | None = None, + ticklen: int | float | None = None, + tickmode: Any | None = None, + tickprefix: str | None = None, + ticks: Any | None = None, + ticksuffix: str | None = None, + ticktext: NDArray | None = None, + ticktextsrc: str | None = None, + tickvals: NDArray | None = None, + tickvalssrc: str | None = None, + tickwidth: int | float | None = None, + title: None | None = None, + x: int | float | None = None, + xanchor: Any | None = None, + xpad: int | float | None = None, + xref: Any | None = None, + y: int | float | None = None, + yanchor: Any | None = None, + ypad: int | float | None = None, + yref: Any | None = None, **kwargs, ): """ @@ -1985,14 +1650,11 @@ def __init__( ------- ColorBar """ - super(ColorBar, self).__init__("colorbar") - + super().__init__("colorbar") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -2007,214 +1669,57 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.ColorBar`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("borderwidth", None) - _v = borderwidth if borderwidth is not None else _v - if _v is not None: - self["borderwidth"] = _v - _v = arg.pop("dtick", None) - _v = dtick if dtick is not None else _v - if _v is not None: - self["dtick"] = _v - _v = arg.pop("exponentformat", None) - _v = exponentformat if exponentformat is not None else _v - if _v is not None: - self["exponentformat"] = _v - _v = arg.pop("labelalias", None) - _v = labelalias if labelalias is not None else _v - if _v is not None: - self["labelalias"] = _v - _v = arg.pop("len", None) - _v = len if len is not None else _v - if _v is not None: - self["len"] = _v - _v = arg.pop("lenmode", None) - _v = lenmode if lenmode is not None else _v - if _v is not None: - self["lenmode"] = _v - _v = arg.pop("minexponent", None) - _v = minexponent if minexponent is not None else _v - if _v is not None: - self["minexponent"] = _v - _v = arg.pop("nticks", None) - _v = nticks if nticks is not None else _v - if _v is not None: - self["nticks"] = _v - _v = arg.pop("orientation", None) - _v = orientation if orientation is not None else _v - if _v is not None: - self["orientation"] = _v - _v = arg.pop("outlinecolor", None) - _v = outlinecolor if outlinecolor is not None else _v - if _v is not None: - self["outlinecolor"] = _v - _v = arg.pop("outlinewidth", None) - _v = outlinewidth if outlinewidth is not None else _v - if _v is not None: - self["outlinewidth"] = _v - _v = arg.pop("separatethousands", None) - _v = separatethousands if separatethousands is not None else _v - if _v is not None: - self["separatethousands"] = _v - _v = arg.pop("showexponent", None) - _v = showexponent if showexponent is not None else _v - if _v is not None: - self["showexponent"] = _v - _v = arg.pop("showticklabels", None) - _v = showticklabels if showticklabels is not None else _v - if _v is not None: - self["showticklabels"] = _v - _v = arg.pop("showtickprefix", None) - _v = showtickprefix if showtickprefix is not None else _v - if _v is not None: - self["showtickprefix"] = _v - _v = arg.pop("showticksuffix", None) - _v = showticksuffix if showticksuffix is not None else _v - if _v is not None: - self["showticksuffix"] = _v - _v = arg.pop("thickness", None) - _v = thickness if thickness is not None else _v - if _v is not None: - self["thickness"] = _v - _v = arg.pop("thicknessmode", None) - _v = thicknessmode if thicknessmode is not None else _v - if _v is not None: - self["thicknessmode"] = _v - _v = arg.pop("tick0", None) - _v = tick0 if tick0 is not None else _v - if _v is not None: - self["tick0"] = _v - _v = arg.pop("tickangle", None) - _v = tickangle if tickangle is not None else _v - if _v is not None: - self["tickangle"] = _v - _v = arg.pop("tickcolor", None) - _v = tickcolor if tickcolor is not None else _v - if _v is not None: - self["tickcolor"] = _v - _v = arg.pop("tickfont", None) - _v = tickfont if tickfont is not None else _v - if _v is not None: - self["tickfont"] = _v - _v = arg.pop("tickformat", None) - _v = tickformat if tickformat is not None else _v - if _v is not None: - self["tickformat"] = _v - _v = arg.pop("tickformatstops", None) - _v = tickformatstops if tickformatstops is not None else _v - if _v is not None: - self["tickformatstops"] = _v - _v = arg.pop("tickformatstopdefaults", None) - _v = tickformatstopdefaults if tickformatstopdefaults is not None else _v - if _v is not None: - self["tickformatstopdefaults"] = _v - _v = arg.pop("ticklabeloverflow", None) - _v = ticklabeloverflow if ticklabeloverflow is not None else _v - if _v is not None: - self["ticklabeloverflow"] = _v - _v = arg.pop("ticklabelposition", None) - _v = ticklabelposition if ticklabelposition is not None else _v - if _v is not None: - self["ticklabelposition"] = _v - _v = arg.pop("ticklabelstep", None) - _v = ticklabelstep if ticklabelstep is not None else _v - if _v is not None: - self["ticklabelstep"] = _v - _v = arg.pop("ticklen", None) - _v = ticklen if ticklen is not None else _v - if _v is not None: - self["ticklen"] = _v - _v = arg.pop("tickmode", None) - _v = tickmode if tickmode is not None else _v - if _v is not None: - self["tickmode"] = _v - _v = arg.pop("tickprefix", None) - _v = tickprefix if tickprefix is not None else _v - if _v is not None: - self["tickprefix"] = _v - _v = arg.pop("ticks", None) - _v = ticks if ticks is not None else _v - if _v is not None: - self["ticks"] = _v - _v = arg.pop("ticksuffix", None) - _v = ticksuffix if ticksuffix is not None else _v - if _v is not None: - self["ticksuffix"] = _v - _v = arg.pop("ticktext", None) - _v = ticktext if ticktext is not None else _v - if _v is not None: - self["ticktext"] = _v - _v = arg.pop("ticktextsrc", None) - _v = ticktextsrc if ticktextsrc is not None else _v - if _v is not None: - self["ticktextsrc"] = _v - _v = arg.pop("tickvals", None) - _v = tickvals if tickvals is not None else _v - if _v is not None: - self["tickvals"] = _v - _v = arg.pop("tickvalssrc", None) - _v = tickvalssrc if tickvalssrc is not None else _v - if _v is not None: - self["tickvalssrc"] = _v - _v = arg.pop("tickwidth", None) - _v = tickwidth if tickwidth is not None else _v - if _v is not None: - self["tickwidth"] = _v - _v = arg.pop("title", None) - _v = title if title is not None else _v - if _v is not None: - self["title"] = _v - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("xanchor", None) - _v = xanchor if xanchor is not None else _v - if _v is not None: - self["xanchor"] = _v - _v = arg.pop("xpad", None) - _v = xpad if xpad is not None else _v - if _v is not None: - self["xpad"] = _v - _v = arg.pop("xref", None) - _v = xref if xref is not None else _v - if _v is not None: - self["xref"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("yanchor", None) - _v = yanchor if yanchor is not None else _v - if _v is not None: - self["yanchor"] = _v - _v = arg.pop("ypad", None) - _v = ypad if ypad is not None else _v - if _v is not None: - self["ypad"] = _v - _v = arg.pop("yref", None) - _v = yref if yref is not None else _v - if _v is not None: - self["yref"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("borderwidth", arg, borderwidth) + self._init_provided("dtick", arg, dtick) + self._init_provided("exponentformat", arg, exponentformat) + self._init_provided("labelalias", arg, labelalias) + self._init_provided("len", arg, len) + self._init_provided("lenmode", arg, lenmode) + self._init_provided("minexponent", arg, minexponent) + self._init_provided("nticks", arg, nticks) + self._init_provided("orientation", arg, orientation) + self._init_provided("outlinecolor", arg, outlinecolor) + self._init_provided("outlinewidth", arg, outlinewidth) + self._init_provided("separatethousands", arg, separatethousands) + self._init_provided("showexponent", arg, showexponent) + self._init_provided("showticklabels", arg, showticklabels) + self._init_provided("showtickprefix", arg, showtickprefix) + self._init_provided("showticksuffix", arg, showticksuffix) + self._init_provided("thickness", arg, thickness) + self._init_provided("thicknessmode", arg, thicknessmode) + self._init_provided("tick0", arg, tick0) + self._init_provided("tickangle", arg, tickangle) + self._init_provided("tickcolor", arg, tickcolor) + self._init_provided("tickfont", arg, tickfont) + self._init_provided("tickformat", arg, tickformat) + self._init_provided("tickformatstops", arg, tickformatstops) + self._init_provided("tickformatstopdefaults", arg, tickformatstopdefaults) + self._init_provided("ticklabeloverflow", arg, ticklabeloverflow) + self._init_provided("ticklabelposition", arg, ticklabelposition) + self._init_provided("ticklabelstep", arg, ticklabelstep) + self._init_provided("ticklen", arg, ticklen) + self._init_provided("tickmode", arg, tickmode) + self._init_provided("tickprefix", arg, tickprefix) + self._init_provided("ticks", arg, ticks) + self._init_provided("ticksuffix", arg, ticksuffix) + self._init_provided("ticktext", arg, ticktext) + self._init_provided("ticktextsrc", arg, ticktextsrc) + self._init_provided("tickvals", arg, tickvals) + self._init_provided("tickvalssrc", arg, tickvalssrc) + self._init_provided("tickwidth", arg, tickwidth) + self._init_provided("title", arg, title) + self._init_provided("x", arg, x) + self._init_provided("xanchor", arg, xanchor) + self._init_provided("xpad", arg, xpad) + self._init_provided("xref", arg, xref) + self._init_provided("y", arg, y) + self._init_provided("yanchor", arg, yanchor) + self._init_provided("ypad", arg, ypad) + self._init_provided("yref", arg, yref) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_contour.py b/plotly/graph_objs/volume/_contour.py index 4faf0876af..53908e7936 100644 --- a/plotly/graph_objs/volume/_contour.py +++ b/plotly/graph_objs/volume/_contour.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Contour(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.contour" _valid_props = {"color", "show", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # show - # ---- @property def show(self): """ @@ -89,8 +51,6 @@ def show(self): def show(self, val): self["show"] = val - # width - # ----- @property def width(self): """ @@ -109,8 +69,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -122,7 +80,14 @@ def _prop_descriptions(self): Sets the width of the contour lines. """ - def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + show: bool | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Contour object @@ -143,14 +108,11 @@ def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): ------- Contour """ - super(Contour, self).__init__("contour") - + super().__init__("contour") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -165,30 +127,11 @@ def __init__(self, arg=None, color=None, show=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Contour`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("show", arg, show) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_hoverlabel.py b/plotly/graph_objs/volume/_hoverlabel.py index 77b9091841..95ca0e370e 100644 --- a/plotly/graph_objs/volume/_hoverlabel.py +++ b/plotly/graph_objs/volume/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.volume.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_legendgrouptitle.py b/plotly/graph_objs/volume/_legendgrouptitle.py index 5a47d42759..bd32c8e3e6 100644 --- a/plotly/graph_objs/volume/_legendgrouptitle.py +++ b/plotly/graph_objs/volume/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.volume.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_lighting.py b/plotly/graph_objs/volume/_lighting.py index d27f9d1e9c..85bffdea42 100644 --- a/plotly/graph_objs/volume/_lighting.py +++ b/plotly/graph_objs/volume/_lighting.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lighting(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.lighting" _valid_props = { @@ -18,8 +19,6 @@ class Lighting(_BaseTraceHierarchyType): "vertexnormalsepsilon", } - # ambient - # ------- @property def ambient(self): """ @@ -39,8 +38,6 @@ def ambient(self): def ambient(self, val): self["ambient"] = val - # diffuse - # ------- @property def diffuse(self): """ @@ -60,8 +57,6 @@ def diffuse(self): def diffuse(self, val): self["diffuse"] = val - # facenormalsepsilon - # ------------------ @property def facenormalsepsilon(self): """ @@ -81,8 +76,6 @@ def facenormalsepsilon(self): def facenormalsepsilon(self, val): self["facenormalsepsilon"] = val - # fresnel - # ------- @property def fresnel(self): """ @@ -103,8 +96,6 @@ def fresnel(self): def fresnel(self, val): self["fresnel"] = val - # roughness - # --------- @property def roughness(self): """ @@ -124,8 +115,6 @@ def roughness(self): def roughness(self, val): self["roughness"] = val - # specular - # -------- @property def specular(self): """ @@ -145,8 +134,6 @@ def specular(self): def specular(self, val): self["specular"] = val - # vertexnormalsepsilon - # -------------------- @property def vertexnormalsepsilon(self): """ @@ -166,8 +153,6 @@ def vertexnormalsepsilon(self): def vertexnormalsepsilon(self, val): self["vertexnormalsepsilon"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -199,13 +184,13 @@ def _prop_descriptions(self): def __init__( self, arg=None, - ambient=None, - diffuse=None, - facenormalsepsilon=None, - fresnel=None, - roughness=None, - specular=None, - vertexnormalsepsilon=None, + ambient: int | float | None = None, + diffuse: int | float | None = None, + facenormalsepsilon: int | float | None = None, + fresnel: int | float | None = None, + roughness: int | float | None = None, + specular: int | float | None = None, + vertexnormalsepsilon: int | float | None = None, **kwargs, ): """ @@ -245,14 +230,11 @@ def __init__( ------- Lighting """ - super(Lighting, self).__init__("lighting") - + super().__init__("lighting") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -267,46 +249,15 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.Lighting`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("ambient", None) - _v = ambient if ambient is not None else _v - if _v is not None: - self["ambient"] = _v - _v = arg.pop("diffuse", None) - _v = diffuse if diffuse is not None else _v - if _v is not None: - self["diffuse"] = _v - _v = arg.pop("facenormalsepsilon", None) - _v = facenormalsepsilon if facenormalsepsilon is not None else _v - if _v is not None: - self["facenormalsepsilon"] = _v - _v = arg.pop("fresnel", None) - _v = fresnel if fresnel is not None else _v - if _v is not None: - self["fresnel"] = _v - _v = arg.pop("roughness", None) - _v = roughness if roughness is not None else _v - if _v is not None: - self["roughness"] = _v - _v = arg.pop("specular", None) - _v = specular if specular is not None else _v - if _v is not None: - self["specular"] = _v - _v = arg.pop("vertexnormalsepsilon", None) - _v = vertexnormalsepsilon if vertexnormalsepsilon is not None else _v - if _v is not None: - self["vertexnormalsepsilon"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("ambient", arg, ambient) + self._init_provided("diffuse", arg, diffuse) + self._init_provided("facenormalsepsilon", arg, facenormalsepsilon) + self._init_provided("fresnel", arg, fresnel) + self._init_provided("roughness", arg, roughness) + self._init_provided("specular", arg, specular) + self._init_provided("vertexnormalsepsilon", arg, vertexnormalsepsilon) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_lightposition.py b/plotly/graph_objs/volume/_lightposition.py index a0e0eb1f86..b445e51d66 100644 --- a/plotly/graph_objs/volume/_lightposition.py +++ b/plotly/graph_objs/volume/_lightposition.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Lightposition(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.lightposition" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -30,8 +29,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -50,8 +47,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -70,8 +65,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -86,7 +79,14 @@ def _prop_descriptions(self): vertex. """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: int | float | None = None, + y: int | float | None = None, + z: int | float | None = None, + **kwargs, + ): """ Construct a new Lightposition object @@ -110,14 +110,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Lightposition """ - super(Lightposition, self).__init__("lightposition") - + super().__init__("lightposition") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -132,30 +129,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Lightposition`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_slices.py b/plotly/graph_objs/volume/_slices.py index e5b47a34ee..21fad804ac 100644 --- a/plotly/graph_objs/volume/_slices.py +++ b/plotly/graph_objs/volume/_slices.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Slices(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.slices" _valid_props = {"x", "y", "z"} - # x - # - @property def x(self): """ @@ -21,27 +20,6 @@ def x(self): - A dict of string/value properties that will be passed to the X constructor - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the x dimension are drawn. - Returns ------- plotly.graph_objs.volume.slices.X @@ -52,8 +30,6 @@ def x(self): def x(self, val): self["x"] = val - # y - # - @property def y(self): """ @@ -63,27 +39,6 @@ def y(self): - A dict of string/value properties that will be passed to the Y constructor - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the y dimension are drawn. - Returns ------- plotly.graph_objs.volume.slices.Y @@ -94,8 +49,6 @@ def y(self): def y(self, val): self["y"] = val - # z - # - @property def z(self): """ @@ -105,27 +58,6 @@ def z(self): - A dict of string/value properties that will be passed to the Z constructor - Supported dict properties: - - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the z dimension are drawn. - Returns ------- plotly.graph_objs.volume.slices.Z @@ -136,8 +68,6 @@ def z(self): def z(self, val): self["z"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -152,7 +82,14 @@ def _prop_descriptions(self): or dict with compatible properties """ - def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): + def __init__( + self, + arg=None, + x: None | None = None, + y: None | None = None, + z: None | None = None, + **kwargs, + ): """ Construct a new Slices object @@ -175,14 +112,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): ------- Slices """ - super(Slices, self).__init__("slices") - + super().__init__("slices") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -197,30 +131,11 @@ def __init__(self, arg=None, x=None, y=None, z=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Slices`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("x", None) - _v = x if x is not None else _v - if _v is not None: - self["x"] = _v - _v = arg.pop("y", None) - _v = y if y is not None else _v - if _v is not None: - self["y"] = _v - _v = arg.pop("z", None) - _v = z if z is not None else _v - if _v is not None: - self["z"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("x", arg, x) + self._init_provided("y", arg, y) + self._init_provided("z", arg, z) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_spaceframe.py b/plotly/graph_objs/volume/_spaceframe.py index 8912ff3c28..db714351d3 100644 --- a/plotly/graph_objs/volume/_spaceframe.py +++ b/plotly/graph_objs/volume/_spaceframe.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Spaceframe(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.spaceframe" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -55,8 +52,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -72,7 +67,13 @@ def _prop_descriptions(self): 1. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Spaceframe object @@ -97,14 +98,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- Spaceframe """ - super(Spaceframe, self).__init__("spaceframe") - + super().__init__("spaceframe") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -119,26 +117,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Spaceframe`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_stream.py b/plotly/graph_objs/volume/_stream.py index 3c5778090a..db5022f2ce 100644 --- a/plotly/graph_objs/volume/_stream.py +++ b/plotly/graph_objs/volume/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -93,14 +94,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -115,26 +113,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/_surface.py b/plotly/graph_objs/volume/_surface.py index b4547f344d..6f45bb9a04 100644 --- a/plotly/graph_objs/volume/_surface.py +++ b/plotly/graph_objs/volume/_surface.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Surface(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume" _path_str = "volume.surface" _valid_props = {"count", "fill", "pattern", "show"} - # count - # ----- @property def count(self): """ @@ -33,8 +32,6 @@ def count(self): def count(self, val): self["count"] = val - # fill - # ---- @property def fill(self): """ @@ -56,8 +53,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # pattern - # ------- @property def pattern(self): """ @@ -85,8 +80,6 @@ def pattern(self): def pattern(self, val): self["pattern"] = val - # show - # ---- @property def show(self): """ @@ -105,8 +98,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -136,7 +127,13 @@ def _prop_descriptions(self): """ def __init__( - self, arg=None, count=None, fill=None, pattern=None, show=None, **kwargs + self, + arg=None, + count: int | None = None, + fill: int | float | None = None, + pattern: Any | None = None, + show: bool | None = None, + **kwargs, ): """ Construct a new Surface object @@ -175,14 +172,11 @@ def __init__( ------- Surface """ - super(Surface, self).__init__("surface") - + super().__init__("surface") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -197,34 +191,12 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.Surface`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("count", None) - _v = count if count is not None else _v - if _v is not None: - self["count"] = _v - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("pattern", None) - _v = pattern if pattern is not None else _v - if _v is not None: - self["pattern"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("count", arg, count) + self._init_provided("fill", arg, fill) + self._init_provided("pattern", arg, pattern) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/caps/__init__.py b/plotly/graph_objs/volume/caps/__init__.py index b7c5709451..649c038369 100644 --- a/plotly/graph_objs/volume/caps/__init__.py +++ b/plotly/graph_objs/volume/caps/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._x import X - from ._y import Y - from ._z import Z -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._x.X", "._y.Y", "._z.Z"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._x.X", "._y.Y", "._z.Z"] +) diff --git a/plotly/graph_objs/volume/caps/_x.py b/plotly/graph_objs/volume/caps/_x.py index 93661103d0..967e724e07 100644 --- a/plotly/graph_objs/volume/caps/_x.py +++ b/plotly/graph_objs/volume/caps/_x.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.caps" _path_str = "volume.caps.x" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): openings parallel to the edges. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new X object @@ -101,14 +102,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- X """ - super(X, self).__init__("x") - + super().__init__("x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -123,26 +121,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.caps.X`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/caps/_y.py b/plotly/graph_objs/volume/caps/_y.py index 956a5b4936..e0d2f09ec9 100644 --- a/plotly/graph_objs/volume/caps/_y.py +++ b/plotly/graph_objs/volume/caps/_y.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.caps" _path_str = "volume.caps.y" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): openings parallel to the edges. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Y object @@ -101,14 +102,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- Y """ - super(Y, self).__init__("y") - + super().__init__("y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -123,26 +121,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.caps.Y`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/caps/_z.py b/plotly/graph_objs/volume/caps/_z.py index a42a47589f..407d1e9225 100644 --- a/plotly/graph_objs/volume/caps/_z.py +++ b/plotly/graph_objs/volume/caps/_z.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Z(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.caps" _path_str = "volume.caps.z" _valid_props = {"fill", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # show - # ---- @property def show(self): """ @@ -56,8 +53,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -75,7 +70,13 @@ def _prop_descriptions(self): openings parallel to the edges. """ - def __init__(self, arg=None, fill=None, show=None, **kwargs): + def __init__( + self, + arg=None, + fill: int | float | None = None, + show: bool | None = None, + **kwargs, + ): """ Construct a new Z object @@ -101,14 +102,11 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): ------- Z """ - super(Z, self).__init__("z") - + super().__init__("z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -123,26 +121,10 @@ def __init__(self, arg=None, fill=None, show=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.caps.Z`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/colorbar/__init__.py b/plotly/graph_objs/volume/colorbar/__init__.py index e20590b714..cc97be8661 100644 --- a/plotly/graph_objs/volume/colorbar/__init__.py +++ b/plotly/graph_objs/volume/colorbar/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickfont import Tickfont - from ._tickformatstop import Tickformatstop - from ._title import Title - from . import title -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [".title"], - ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [".title"], + ["._tickfont.Tickfont", "._tickformatstop.Tickformatstop", "._title.Title"], +) diff --git a/plotly/graph_objs/volume/colorbar/_tickfont.py b/plotly/graph_objs/volume/colorbar/_tickfont.py index f07cfd2ff4..6d56e5c9f5 100644 --- a/plotly/graph_objs/volume/colorbar/_tickfont.py +++ b/plotly/graph_objs/volume/colorbar/_tickfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.colorbar" _path_str = "volume.colorbar.tickfont" _valid_props = { @@ -20,8 +21,6 @@ class Tickfont(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Tickfont """ - super(Tickfont, self).__init__("tickfont") - + super().__init__("tickfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.colorbar.Tickfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/colorbar/_tickformatstop.py b/plotly/graph_objs/volume/colorbar/_tickformatstop.py index 103def0361..6e5856f186 100644 --- a/plotly/graph_objs/volume/colorbar/_tickformatstop.py +++ b/plotly/graph_objs/volume/colorbar/_tickformatstop.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.colorbar" _path_str = "volume.colorbar.tickformatstop" _valid_props = {"dtickrange", "enabled", "name", "templateitemname", "value"} - # dtickrange - # ---------- @property def dtickrange(self): """ @@ -35,8 +34,6 @@ def dtickrange(self): def dtickrange(self, val): self["dtickrange"] = val - # enabled - # ------- @property def enabled(self): """ @@ -56,8 +53,6 @@ def enabled(self): def enabled(self, val): self["enabled"] = val - # name - # ---- @property def name(self): """ @@ -83,8 +78,6 @@ def name(self): def name(self, val): self["name"] = val - # templateitemname - # ---------------- @property def templateitemname(self): """ @@ -111,8 +104,6 @@ def templateitemname(self): def templateitemname(self, val): self["templateitemname"] = val - # value - # ----- @property def value(self): """ @@ -133,8 +124,6 @@ def value(self): def value(self, val): self["value"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -173,11 +162,11 @@ def _prop_descriptions(self): def __init__( self, arg=None, - dtickrange=None, - enabled=None, - name=None, - templateitemname=None, - value=None, + dtickrange: list | None = None, + enabled: bool | None = None, + name: str | None = None, + templateitemname: str | None = None, + value: str | None = None, **kwargs, ): """ @@ -224,14 +213,11 @@ def __init__( ------- Tickformatstop """ - super(Tickformatstop, self).__init__("tickformatstops") - + super().__init__("tickformatstops") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -246,38 +232,13 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.colorbar.Tickformatstop`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("dtickrange", None) - _v = dtickrange if dtickrange is not None else _v - if _v is not None: - self["dtickrange"] = _v - _v = arg.pop("enabled", None) - _v = enabled if enabled is not None else _v - if _v is not None: - self["enabled"] = _v - _v = arg.pop("name", None) - _v = name if name is not None else _v - if _v is not None: - self["name"] = _v - _v = arg.pop("templateitemname", None) - _v = templateitemname if templateitemname is not None else _v - if _v is not None: - self["templateitemname"] = _v - _v = arg.pop("value", None) - _v = value if value is not None else _v - if _v is not None: - self["value"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("dtickrange", arg, dtickrange) + self._init_provided("enabled", arg, enabled) + self._init_provided("name", arg, name) + self._init_provided("templateitemname", arg, templateitemname) + self._init_provided("value", arg, value) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/colorbar/_title.py b/plotly/graph_objs/volume/colorbar/_title.py index fb92277575..da13b529ab 100644 --- a/plotly/graph_objs/volume/colorbar/_title.py +++ b/plotly/graph_objs/volume/colorbar/_title.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Title(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.colorbar" _path_str = "volume.colorbar.title" _valid_props = {"font", "side", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.volume.colorbar.title.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # side - # ---- @property def side(self): """ @@ -102,8 +53,6 @@ def side(self): def side(self, val): self["side"] = val - # text - # ---- @property def text(self): """ @@ -123,8 +72,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -139,7 +86,14 @@ def _prop_descriptions(self): Sets the title of the color bar. """ - def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): + def __init__( + self, + arg=None, + font: None | None = None, + side: Any | None = None, + text: str | None = None, + **kwargs, + ): """ Construct a new Title object @@ -163,14 +117,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): ------- Title """ - super(Title, self).__init__("title") - + super().__init__("title") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -185,30 +136,11 @@ def __init__(self, arg=None, font=None, side=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.volume.colorbar.Title`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("side", None) - _v = side if side is not None else _v - if _v is not None: - self["side"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("side", arg, side) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/colorbar/title/__init__.py b/plotly/graph_objs/volume/colorbar/title/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/volume/colorbar/title/__init__.py +++ b/plotly/graph_objs/volume/colorbar/title/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/volume/colorbar/title/_font.py b/plotly/graph_objs/volume/colorbar/title/_font.py index 0b90faab5d..9c1004f5cc 100644 --- a/plotly/graph_objs/volume/colorbar/title/_font.py +++ b/plotly/graph_objs/volume/colorbar/title/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.colorbar.title" _path_str = "volume.colorbar.title.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.colorbar.title.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/hoverlabel/__init__.py b/plotly/graph_objs/volume/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/volume/hoverlabel/__init__.py +++ b/plotly/graph_objs/volume/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/volume/hoverlabel/_font.py b/plotly/graph_objs/volume/hoverlabel/_font.py index a095ce2b54..6ac7428d5a 100644 --- a/plotly/graph_objs/volume/hoverlabel/_font.py +++ b/plotly/graph_objs/volume/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.hoverlabel" _path_str = "volume.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/legendgrouptitle/__init__.py b/plotly/graph_objs/volume/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/volume/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/volume/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/volume/legendgrouptitle/_font.py b/plotly/graph_objs/volume/legendgrouptitle/_font.py index 66cfcd0a4d..964439ae40 100644 --- a/plotly/graph_objs/volume/legendgrouptitle/_font.py +++ b/plotly/graph_objs/volume/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.legendgrouptitle" _path_str = "volume.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/slices/__init__.py b/plotly/graph_objs/volume/slices/__init__.py index b7c5709451..649c038369 100644 --- a/plotly/graph_objs/volume/slices/__init__.py +++ b/plotly/graph_objs/volume/slices/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._x import X - from ._y import Y - from ._z import Z -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._x.X", "._y.Y", "._z.Z"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._x.X", "._y.Y", "._z.Z"] +) diff --git a/plotly/graph_objs/volume/slices/_x.py b/plotly/graph_objs/volume/slices/_x.py index 04d84e1847..e16f0e7f56 100644 --- a/plotly/graph_objs/volume/slices/_x.py +++ b/plotly/graph_objs/volume/slices/_x.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class X(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.slices" _path_str = "volume.slices.x" _valid_props = {"fill", "locations", "locationssrc", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # locations - # --------- @property def locations(self): """ @@ -47,7 +44,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -55,8 +52,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -76,8 +71,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # show - # ---- @property def show(self): """ @@ -97,8 +90,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -123,10 +114,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, + fill: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + show: bool | None = None, **kwargs, ): """ @@ -159,14 +150,11 @@ def __init__( ------- X """ - super(X, self).__init__("x") - + super().__init__("x") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -181,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.slices.X`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/slices/_y.py b/plotly/graph_objs/volume/slices/_y.py index dbf474bd00..12eb907e1d 100644 --- a/plotly/graph_objs/volume/slices/_y.py +++ b/plotly/graph_objs/volume/slices/_y.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Y(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.slices" _path_str = "volume.slices.y" _valid_props = {"fill", "locations", "locationssrc", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # locations - # --------- @property def locations(self): """ @@ -47,7 +44,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -55,8 +52,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -76,8 +71,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # show - # ---- @property def show(self): """ @@ -97,8 +90,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -123,10 +114,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, + fill: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + show: bool | None = None, **kwargs, ): """ @@ -159,14 +150,11 @@ def __init__( ------- Y """ - super(Y, self).__init__("y") - + super().__init__("y") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -181,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.slices.Y`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/volume/slices/_z.py b/plotly/graph_objs/volume/slices/_z.py index 32b05693a2..728ec60b88 100644 --- a/plotly/graph_objs/volume/slices/_z.py +++ b/plotly/graph_objs/volume/slices/_z.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Z(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "volume.slices" _path_str = "volume.slices.z" _valid_props = {"fill", "locations", "locationssrc", "show"} - # fill - # ---- @property def fill(self): """ @@ -33,8 +32,6 @@ def fill(self): def fill(self, val): self["fill"] = val - # locations - # --------- @property def locations(self): """ @@ -47,7 +44,7 @@ def locations(self): Returns ------- - numpy.ndarray + NDArray """ return self["locations"] @@ -55,8 +52,6 @@ def locations(self): def locations(self, val): self["locations"] = val - # locationssrc - # ------------ @property def locationssrc(self): """ @@ -76,8 +71,6 @@ def locationssrc(self): def locationssrc(self, val): self["locationssrc"] = val - # show - # ---- @property def show(self): """ @@ -97,8 +90,6 @@ def show(self): def show(self, val): self["show"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -123,10 +114,10 @@ def _prop_descriptions(self): def __init__( self, arg=None, - fill=None, - locations=None, - locationssrc=None, - show=None, + fill: int | float | None = None, + locations: NDArray | None = None, + locationssrc: str | None = None, + show: bool | None = None, **kwargs, ): """ @@ -159,14 +150,11 @@ def __init__( ------- Z """ - super(Z, self).__init__("z") - + super().__init__("z") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -181,34 +169,12 @@ def __init__( an instance of :class:`plotly.graph_objs.volume.slices.Z`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("fill", None) - _v = fill if fill is not None else _v - if _v is not None: - self["fill"] = _v - _v = arg.pop("locations", None) - _v = locations if locations is not None else _v - if _v is not None: - self["locations"] = _v - _v = arg.pop("locationssrc", None) - _v = locationssrc if locationssrc is not None else _v - if _v is not None: - self["locationssrc"] = _v - _v = arg.pop("show", None) - _v = show if show is not None else _v - if _v is not None: - self["show"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("fill", arg, fill) + self._init_provided("locations", arg, locations) + self._init_provided("locationssrc", arg, locationssrc) + self._init_provided("show", arg, show) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/__init__.py b/plotly/graph_objs/waterfall/__init__.py index 6f3b73587c..8ae0fae837 100644 --- a/plotly/graph_objs/waterfall/__init__.py +++ b/plotly/graph_objs/waterfall/__init__.py @@ -1,46 +1,26 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._connector import Connector - from ._decreasing import Decreasing - from ._hoverlabel import Hoverlabel - from ._increasing import Increasing - from ._insidetextfont import Insidetextfont - from ._legendgrouptitle import Legendgrouptitle - from ._outsidetextfont import Outsidetextfont - from ._stream import Stream - from ._textfont import Textfont - from ._totals import Totals - from . import connector - from . import decreasing - from . import hoverlabel - from . import increasing - from . import legendgrouptitle - from . import totals -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [ - ".connector", - ".decreasing", - ".hoverlabel", - ".increasing", - ".legendgrouptitle", - ".totals", - ], - [ - "._connector.Connector", - "._decreasing.Decreasing", - "._hoverlabel.Hoverlabel", - "._increasing.Increasing", - "._insidetextfont.Insidetextfont", - "._legendgrouptitle.Legendgrouptitle", - "._outsidetextfont.Outsidetextfont", - "._stream.Stream", - "._textfont.Textfont", - "._totals.Totals", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [ + ".connector", + ".decreasing", + ".hoverlabel", + ".increasing", + ".legendgrouptitle", + ".totals", + ], + [ + "._connector.Connector", + "._decreasing.Decreasing", + "._hoverlabel.Hoverlabel", + "._increasing.Increasing", + "._insidetextfont.Insidetextfont", + "._legendgrouptitle.Legendgrouptitle", + "._outsidetextfont.Outsidetextfont", + "._stream.Stream", + "._textfont.Textfont", + "._totals.Totals", + ], +) diff --git a/plotly/graph_objs/waterfall/_connector.py b/plotly/graph_objs/waterfall/_connector.py index 9808c28ce7..1b1e3a3561 100644 --- a/plotly/graph_objs/waterfall/_connector.py +++ b/plotly/graph_objs/waterfall/_connector.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Connector(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.connector" _valid_props = {"line", "mode", "visible"} - # line - # ---- @property def line(self): """ @@ -21,18 +20,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). - Returns ------- plotly.graph_objs.waterfall.connector.Line @@ -43,8 +30,6 @@ def line(self): def line(self, val): self["line"] = val - # mode - # ---- @property def mode(self): """ @@ -64,8 +49,6 @@ def mode(self): def mode(self, val): self["mode"] = val - # visible - # ------- @property def visible(self): """ @@ -84,8 +67,6 @@ def visible(self): def visible(self, val): self["visible"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -98,7 +79,14 @@ def _prop_descriptions(self): Determines if connector lines are drawn. """ - def __init__(self, arg=None, line=None, mode=None, visible=None, **kwargs): + def __init__( + self, + arg=None, + line: None | None = None, + mode: Any | None = None, + visible: bool | None = None, + **kwargs, + ): """ Construct a new Connector object @@ -120,14 +108,11 @@ def __init__(self, arg=None, line=None, mode=None, visible=None, **kwargs): ------- Connector """ - super(Connector, self).__init__("connector") - + super().__init__("connector") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -142,30 +127,11 @@ def __init__(self, arg=None, line=None, mode=None, visible=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.Connector`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - _v = arg.pop("mode", None) - _v = mode if mode is not None else _v - if _v is not None: - self["mode"] = _v - _v = arg.pop("visible", None) - _v = visible if visible is not None else _v - if _v is not None: - self["visible"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("line", arg, line) + self._init_provided("mode", arg, mode) + self._init_provided("visible", arg, visible) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_decreasing.py b/plotly/graph_objs/waterfall/_decreasing.py index 452f443961..60ba79be6c 100644 --- a/plotly/graph_objs/waterfall/_decreasing.py +++ b/plotly/graph_objs/waterfall/_decreasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Decreasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.decreasing" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of all decreasing values. - line - :class:`plotly.graph_objects.waterfall.decreasi - ng.marker.Line` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.waterfall.decreasing.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): r` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Decreasing object @@ -68,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Decreasing """ - super(Decreasing, self).__init__("decreasing") - + super().__init__("decreasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -90,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.Decreasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_hoverlabel.py b/plotly/graph_objs/waterfall/_hoverlabel.py index f2c8d8303c..f6683927df 100644 --- a/plotly/graph_objs/waterfall/_hoverlabel.py +++ b/plotly/graph_objs/waterfall/_hoverlabel.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Hoverlabel(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.hoverlabel" _valid_props = { @@ -20,8 +21,6 @@ class Hoverlabel(_BaseTraceHierarchyType): "namelengthsrc", } - # align - # ----- @property def align(self): """ @@ -36,7 +35,7 @@ def align(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["align"] @@ -44,8 +43,6 @@ def align(self): def align(self, val): self["align"] = val - # alignsrc - # -------- @property def alignsrc(self): """ @@ -64,8 +61,6 @@ def alignsrc(self): def alignsrc(self, val): self["alignsrc"] = val - # bgcolor - # ------- @property def bgcolor(self): """ @@ -76,47 +71,12 @@ def bgcolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bgcolor"] @@ -124,8 +84,6 @@ def bgcolor(self): def bgcolor(self, val): self["bgcolor"] = val - # bgcolorsrc - # ---------- @property def bgcolorsrc(self): """ @@ -144,8 +102,6 @@ def bgcolorsrc(self): def bgcolorsrc(self, val): self["bgcolorsrc"] = val - # bordercolor - # ----------- @property def bordercolor(self): """ @@ -156,47 +112,12 @@ def bordercolor(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["bordercolor"] @@ -204,8 +125,6 @@ def bordercolor(self): def bordercolor(self, val): self["bordercolor"] = val - # bordercolorsrc - # -------------- @property def bordercolorsrc(self): """ @@ -225,8 +144,6 @@ def bordercolorsrc(self): def bordercolorsrc(self, val): self["bordercolorsrc"] = val - # font - # ---- @property def font(self): """ @@ -238,79 +155,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. - Returns ------- plotly.graph_objs.waterfall.hoverlabel.Font @@ -321,8 +165,6 @@ def font(self): def font(self, val): self["font"] = val - # namelength - # ---------- @property def namelength(self): """ @@ -340,7 +182,7 @@ def namelength(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["namelength"] @@ -348,8 +190,6 @@ def namelength(self): def namelength(self, val): self["namelength"] = val - # namelengthsrc - # ------------- @property def namelengthsrc(self): """ @@ -369,8 +209,6 @@ def namelengthsrc(self): def namelengthsrc(self, val): self["namelengthsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -411,15 +249,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - align=None, - alignsrc=None, - bgcolor=None, - bgcolorsrc=None, - bordercolor=None, - bordercolorsrc=None, - font=None, - namelength=None, - namelengthsrc=None, + align: Any | None = None, + alignsrc: str | None = None, + bgcolor: str | None = None, + bgcolorsrc: str | None = None, + bordercolor: str | None = None, + bordercolorsrc: str | None = None, + font: None | None = None, + namelength: int | None = None, + namelengthsrc: str | None = None, **kwargs, ): """ @@ -468,14 +306,11 @@ def __init__( ------- Hoverlabel """ - super(Hoverlabel, self).__init__("hoverlabel") - + super().__init__("hoverlabel") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -490,54 +325,17 @@ def __init__( an instance of :class:`plotly.graph_objs.waterfall.Hoverlabel`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("align", None) - _v = align if align is not None else _v - if _v is not None: - self["align"] = _v - _v = arg.pop("alignsrc", None) - _v = alignsrc if alignsrc is not None else _v - if _v is not None: - self["alignsrc"] = _v - _v = arg.pop("bgcolor", None) - _v = bgcolor if bgcolor is not None else _v - if _v is not None: - self["bgcolor"] = _v - _v = arg.pop("bgcolorsrc", None) - _v = bgcolorsrc if bgcolorsrc is not None else _v - if _v is not None: - self["bgcolorsrc"] = _v - _v = arg.pop("bordercolor", None) - _v = bordercolor if bordercolor is not None else _v - if _v is not None: - self["bordercolor"] = _v - _v = arg.pop("bordercolorsrc", None) - _v = bordercolorsrc if bordercolorsrc is not None else _v - if _v is not None: - self["bordercolorsrc"] = _v - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("namelength", None) - _v = namelength if namelength is not None else _v - if _v is not None: - self["namelength"] = _v - _v = arg.pop("namelengthsrc", None) - _v = namelengthsrc if namelengthsrc is not None else _v - if _v is not None: - self["namelengthsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("align", arg, align) + self._init_provided("alignsrc", arg, alignsrc) + self._init_provided("bgcolor", arg, bgcolor) + self._init_provided("bgcolorsrc", arg, bgcolorsrc) + self._init_provided("bordercolor", arg, bordercolor) + self._init_provided("bordercolorsrc", arg, bordercolorsrc) + self._init_provided("font", arg, font) + self._init_provided("namelength", arg, namelength) + self._init_provided("namelengthsrc", arg, namelengthsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_increasing.py b/plotly/graph_objs/waterfall/_increasing.py index 3efad61d15..0e5f3bd1d7 100644 --- a/plotly/graph_objs/waterfall/_increasing.py +++ b/plotly/graph_objs/waterfall/_increasing.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Increasing(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.increasing" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,15 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of all increasing values. - line - :class:`plotly.graph_objects.waterfall.increasi - ng.marker.Line` instance or dict with - compatible properties - Returns ------- plotly.graph_objs.waterfall.increasing.Marker @@ -40,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -50,7 +38,7 @@ def _prop_descriptions(self): r` instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Increasing object @@ -68,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Increasing """ - super(Increasing, self).__init__("increasing") - + super().__init__("increasing") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -90,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.Increasing`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_insidetextfont.py b/plotly/graph_objs/waterfall/_insidetextfont.py index c73f7d4585..96e5db1347 100644 --- a/plotly/graph_objs/waterfall/_insidetextfont.py +++ b/plotly/graph_objs/waterfall/_insidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Insidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.insidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Insidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Insidetextfont """ - super(Insidetextfont, self).__init__("insidetextfont") - + super().__init__("insidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.waterfall.Insidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_legendgrouptitle.py b/plotly/graph_objs/waterfall/_legendgrouptitle.py index 0cdd764056..7ed0de51db 100644 --- a/plotly/graph_objs/waterfall/_legendgrouptitle.py +++ b/plotly/graph_objs/waterfall/_legendgrouptitle.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Legendgrouptitle(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.legendgrouptitle" _valid_props = {"font", "text"} - # font - # ---- @property def font(self): """ @@ -23,52 +22,6 @@ def font(self): - A dict of string/value properties that will be passed to the Font constructor - Supported dict properties: - - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. - Returns ------- plotly.graph_objs.waterfall.legendgrouptitle.Font @@ -79,8 +32,6 @@ def font(self): def font(self, val): self["font"] = val - # text - # ---- @property def text(self): """ @@ -100,8 +51,6 @@ def text(self): def text(self, val): self["text"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -111,7 +60,9 @@ def _prop_descriptions(self): Sets the title of the legend group. """ - def __init__(self, arg=None, font=None, text=None, **kwargs): + def __init__( + self, arg=None, font: None | None = None, text: str | None = None, **kwargs + ): """ Construct a new Legendgrouptitle object @@ -130,14 +81,11 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): ------- Legendgrouptitle """ - super(Legendgrouptitle, self).__init__("legendgrouptitle") - + super().__init__("legendgrouptitle") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -152,26 +100,10 @@ def __init__(self, arg=None, font=None, text=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.Legendgrouptitle`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("font", None) - _v = font if font is not None else _v - if _v is not None: - self["font"] = _v - _v = arg.pop("text", None) - _v = text if text is not None else _v - if _v is not None: - self["text"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("font", arg, font) + self._init_provided("text", arg, text) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_outsidetextfont.py b/plotly/graph_objs/waterfall/_outsidetextfont.py index 7ecc6cc912..91add64c4a 100644 --- a/plotly/graph_objs/waterfall/_outsidetextfont.py +++ b/plotly/graph_objs/waterfall/_outsidetextfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Outsidetextfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.outsidetextfont" _valid_props = { @@ -29,8 +30,6 @@ class Outsidetextfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Outsidetextfont """ - super(Outsidetextfont, self).__init__("outsidetextfont") - + super().__init__("outsidetextfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.waterfall.Outsidetextfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_stream.py b/plotly/graph_objs/waterfall/_stream.py index 36060f46e3..4f7d055512 100644 --- a/plotly/graph_objs/waterfall/_stream.py +++ b/plotly/graph_objs/waterfall/_stream.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Stream(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.stream" _valid_props = {"maxpoints", "token"} - # maxpoints - # --------- @property def maxpoints(self): """ @@ -32,8 +31,6 @@ def maxpoints(self): def maxpoints(self, val): self["maxpoints"] = val - # token - # ----- @property def token(self): """ @@ -54,8 +51,6 @@ def token(self): def token(self, val): self["token"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -70,7 +65,13 @@ def _prop_descriptions(self): for more details. """ - def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): + def __init__( + self, + arg=None, + maxpoints: int | float | None = None, + token: str | None = None, + **kwargs, + ): """ Construct a new Stream object @@ -94,14 +95,11 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): ------- Stream """ - super(Stream, self).__init__("stream") - + super().__init__("stream") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -116,26 +114,10 @@ def __init__(self, arg=None, maxpoints=None, token=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.Stream`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("maxpoints", None) - _v = maxpoints if maxpoints is not None else _v - if _v is not None: - self["maxpoints"] = _v - _v = arg.pop("token", None) - _v = token if token is not None else _v - if _v is not None: - self["token"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("maxpoints", arg, maxpoints) + self._init_provided("token", arg, token) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_textfont.py b/plotly/graph_objs/waterfall/_textfont.py index 0cab4c92c8..f85d0f6503 100644 --- a/plotly/graph_objs/waterfall/_textfont.py +++ b/plotly/graph_objs/waterfall/_textfont.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Textfont(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.textfont" _valid_props = { @@ -29,8 +30,6 @@ class Textfont(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Textfont """ - super(Textfont, self).__init__("textfont") - + super().__init__("textfont") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.waterfall.Textfont`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/_totals.py b/plotly/graph_objs/waterfall/_totals.py index 48611b7b00..016f015423 100644 --- a/plotly/graph_objs/waterfall/_totals.py +++ b/plotly/graph_objs/waterfall/_totals.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Totals(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall" _path_str = "waterfall.totals" _valid_props = {"marker"} - # marker - # ------ @property def marker(self): """ @@ -21,16 +20,6 @@ def marker(self): - A dict of string/value properties that will be passed to the Marker constructor - Supported dict properties: - - color - Sets the marker color of all intermediate sums - and total values. - line - :class:`plotly.graph_objects.waterfall.totals.m - arker.Line` instance or dict with compatible - properties - Returns ------- plotly.graph_objs.waterfall.totals.Marker @@ -41,8 +30,6 @@ def marker(self): def marker(self, val): self["marker"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -51,7 +38,7 @@ def _prop_descriptions(self): instance or dict with compatible properties """ - def __init__(self, arg=None, marker=None, **kwargs): + def __init__(self, arg=None, marker: None | None = None, **kwargs): """ Construct a new Totals object @@ -69,14 +56,11 @@ def __init__(self, arg=None, marker=None, **kwargs): ------- Totals """ - super(Totals, self).__init__("totals") - + super().__init__("totals") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -91,22 +75,9 @@ def __init__(self, arg=None, marker=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.Totals`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("marker", None) - _v = marker if marker is not None else _v - if _v is not None: - self["marker"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("marker", arg, marker) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/connector/__init__.py b/plotly/graph_objs/waterfall/connector/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/waterfall/connector/__init__.py +++ b/plotly/graph_objs/waterfall/connector/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/waterfall/connector/_line.py b/plotly/graph_objs/waterfall/connector/_line.py index 28924db864..750901ac77 100644 --- a/plotly/graph_objs/waterfall/connector/_line.py +++ b/plotly/graph_objs/waterfall/connector/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.connector" _path_str = "waterfall.connector.line" _valid_props = {"color", "dash", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # dash - # ---- @property def dash(self): """ @@ -95,8 +57,6 @@ def dash(self): def dash(self, val): self["dash"] = val - # width - # ----- @property def width(self): """ @@ -115,8 +75,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -131,7 +89,14 @@ def _prop_descriptions(self): Sets the line width (in px). """ - def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + dash: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -155,14 +120,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -177,30 +139,11 @@ def __init__(self, arg=None, color=None, dash=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.connector.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("dash", None) - _v = dash if dash is not None else _v - if _v is not None: - self["dash"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("dash", arg, dash) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/decreasing/__init__.py b/plotly/graph_objs/waterfall/decreasing/__init__.py index 61fdd95de6..83d0eda7aa 100644 --- a/plotly/graph_objs/waterfall/decreasing/__init__.py +++ b/plotly/graph_objs/waterfall/decreasing/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from . import marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".marker"], ["._marker.Marker"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".marker"], ["._marker.Marker"] +) diff --git a/plotly/graph_objs/waterfall/decreasing/_marker.py b/plotly/graph_objs/waterfall/decreasing/_marker.py index 1c97357d3c..7a3305f555 100644 --- a/plotly/graph_objs/waterfall/decreasing/_marker.py +++ b/plotly/graph_objs/waterfall/decreasing/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.decreasing" _path_str = "waterfall.decreasing.marker" _valid_props = {"color", "line"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -80,13 +42,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color of all decreasing values. - width - Sets the line width of all decreasing values. - Returns ------- plotly.graph_objs.waterfall.decreasing.marker.Line @@ -97,8 +52,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -109,7 +62,9 @@ def _prop_descriptions(self): r.Line` instance or dict with compatible properties """ - def __init__(self, arg=None, color=None, line=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, line: None | None = None, **kwargs + ): """ Construct a new Marker object @@ -129,14 +84,11 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -151,26 +103,10 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.decreasing.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/decreasing/marker/__init__.py b/plotly/graph_objs/waterfall/decreasing/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/waterfall/decreasing/marker/__init__.py +++ b/plotly/graph_objs/waterfall/decreasing/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/waterfall/decreasing/marker/_line.py b/plotly/graph_objs/waterfall/decreasing/marker/_line.py index d368f65b95..1d8c0a747c 100644 --- a/plotly/graph_objs/waterfall/decreasing/marker/_line.py +++ b/plotly/graph_objs/waterfall/decreasing/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.decreasing.marker" _path_str = "waterfall.decreasing.marker.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the line width of all decreasing values. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.decreasing.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/hoverlabel/__init__.py b/plotly/graph_objs/waterfall/hoverlabel/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/waterfall/hoverlabel/__init__.py +++ b/plotly/graph_objs/waterfall/hoverlabel/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/waterfall/hoverlabel/_font.py b/plotly/graph_objs/waterfall/hoverlabel/_font.py index 81dd9a21e9..88bc18e9c1 100644 --- a/plotly/graph_objs/waterfall/hoverlabel/_font.py +++ b/plotly/graph_objs/waterfall/hoverlabel/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.hoverlabel" _path_str = "waterfall.hoverlabel.font" _valid_props = { @@ -29,8 +30,6 @@ class Font(_BaseTraceHierarchyType): "weightsrc", } - # color - # ----- @property def color(self): """ @@ -39,47 +38,12 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color - A list or array of any of the above Returns ------- - str|numpy.ndarray + str|NDArray """ return self["color"] @@ -87,8 +51,6 @@ def color(self): def color(self, val): self["color"] = val - # colorsrc - # -------- @property def colorsrc(self): """ @@ -107,23 +69,14 @@ def colorsrc(self): def colorsrc(self, val): self["colorsrc"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -131,7 +84,7 @@ def family(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["family"] @@ -139,8 +92,6 @@ def family(self): def family(self, val): self["family"] = val - # familysrc - # --------- @property def familysrc(self): """ @@ -159,8 +110,6 @@ def familysrc(self): def familysrc(self, val): self["familysrc"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -177,7 +126,7 @@ def lineposition(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["lineposition"] @@ -185,8 +134,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # linepositionsrc - # --------------- @property def linepositionsrc(self): """ @@ -206,8 +153,6 @@ def linepositionsrc(self): def linepositionsrc(self, val): self["linepositionsrc"] = val - # shadow - # ------ @property def shadow(self): """ @@ -223,7 +168,7 @@ def shadow(self): Returns ------- - str|numpy.ndarray + str|NDArray """ return self["shadow"] @@ -231,8 +176,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # shadowsrc - # --------- @property def shadowsrc(self): """ @@ -251,8 +194,6 @@ def shadowsrc(self): def shadowsrc(self, val): self["shadowsrc"] = val - # size - # ---- @property def size(self): """ @@ -262,7 +203,7 @@ def size(self): Returns ------- - int|float|numpy.ndarray + int|float|NDArray """ return self["size"] @@ -270,8 +211,6 @@ def size(self): def size(self, val): self["size"] = val - # sizesrc - # ------- @property def sizesrc(self): """ @@ -290,8 +229,6 @@ def sizesrc(self): def sizesrc(self, val): self["sizesrc"] = val - # style - # ----- @property def style(self): """ @@ -305,7 +242,7 @@ def style(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["style"] @@ -313,8 +250,6 @@ def style(self): def style(self, val): self["style"] = val - # stylesrc - # -------- @property def stylesrc(self): """ @@ -333,8 +268,6 @@ def stylesrc(self): def stylesrc(self, val): self["stylesrc"] = val - # textcase - # -------- @property def textcase(self): """ @@ -349,7 +282,7 @@ def textcase(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["textcase"] @@ -357,8 +290,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # textcasesrc - # ----------- @property def textcasesrc(self): """ @@ -377,8 +308,6 @@ def textcasesrc(self): def textcasesrc(self, val): self["textcasesrc"] = val - # variant - # ------- @property def variant(self): """ @@ -392,7 +321,7 @@ def variant(self): Returns ------- - Any|numpy.ndarray + Any|NDArray """ return self["variant"] @@ -400,8 +329,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # variantsrc - # ---------- @property def variantsrc(self): """ @@ -420,8 +347,6 @@ def variantsrc(self): def variantsrc(self, val): self["variantsrc"] = val - # weight - # ------ @property def weight(self): """ @@ -435,7 +360,7 @@ def weight(self): Returns ------- - int|numpy.ndarray + int|NDArray """ return self["weight"] @@ -443,8 +368,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # weightsrc - # --------- @property def weightsrc(self): """ @@ -463,8 +386,6 @@ def weightsrc(self): def weightsrc(self, val): self["weightsrc"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -475,18 +396,11 @@ def _prop_descriptions(self): `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -538,24 +452,24 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - colorsrc=None, - family=None, - familysrc=None, - lineposition=None, - linepositionsrc=None, - shadow=None, - shadowsrc=None, - size=None, - sizesrc=None, - style=None, - stylesrc=None, - textcase=None, - textcasesrc=None, - variant=None, - variantsrc=None, - weight=None, - weightsrc=None, + color: str | None = None, + colorsrc: str | None = None, + family: str | None = None, + familysrc: str | None = None, + lineposition: Any | None = None, + linepositionsrc: str | None = None, + shadow: str | None = None, + shadowsrc: str | None = None, + size: int | float | None = None, + sizesrc: str | None = None, + style: Any | None = None, + stylesrc: str | None = None, + textcase: Any | None = None, + textcasesrc: str | None = None, + variant: Any | None = None, + variantsrc: str | None = None, + weight: int | None = None, + weightsrc: str | None = None, **kwargs, ): """ @@ -576,18 +490,11 @@ def __init__( `color`. family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. familysrc Sets the source reference on Chart Studio Cloud for `family`. @@ -639,14 +546,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -661,90 +565,26 @@ def __init__( an instance of :class:`plotly.graph_objs.waterfall.hoverlabel.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("colorsrc", None) - _v = colorsrc if colorsrc is not None else _v - if _v is not None: - self["colorsrc"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("familysrc", None) - _v = familysrc if familysrc is not None else _v - if _v is not None: - self["familysrc"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("linepositionsrc", None) - _v = linepositionsrc if linepositionsrc is not None else _v - if _v is not None: - self["linepositionsrc"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("shadowsrc", None) - _v = shadowsrc if shadowsrc is not None else _v - if _v is not None: - self["shadowsrc"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("sizesrc", None) - _v = sizesrc if sizesrc is not None else _v - if _v is not None: - self["sizesrc"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("stylesrc", None) - _v = stylesrc if stylesrc is not None else _v - if _v is not None: - self["stylesrc"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("textcasesrc", None) - _v = textcasesrc if textcasesrc is not None else _v - if _v is not None: - self["textcasesrc"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("variantsrc", None) - _v = variantsrc if variantsrc is not None else _v - if _v is not None: - self["variantsrc"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - _v = arg.pop("weightsrc", None) - _v = weightsrc if weightsrc is not None else _v - if _v is not None: - self["weightsrc"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("colorsrc", arg, colorsrc) + self._init_provided("family", arg, family) + self._init_provided("familysrc", arg, familysrc) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("linepositionsrc", arg, linepositionsrc) + self._init_provided("shadow", arg, shadow) + self._init_provided("shadowsrc", arg, shadowsrc) + self._init_provided("size", arg, size) + self._init_provided("sizesrc", arg, sizesrc) + self._init_provided("style", arg, style) + self._init_provided("stylesrc", arg, stylesrc) + self._init_provided("textcase", arg, textcase) + self._init_provided("textcasesrc", arg, textcasesrc) + self._init_provided("variant", arg, variant) + self._init_provided("variantsrc", arg, variantsrc) + self._init_provided("weight", arg, weight) + self._init_provided("weightsrc", arg, weightsrc) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/increasing/__init__.py b/plotly/graph_objs/waterfall/increasing/__init__.py index 61fdd95de6..83d0eda7aa 100644 --- a/plotly/graph_objs/waterfall/increasing/__init__.py +++ b/plotly/graph_objs/waterfall/increasing/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from . import marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".marker"], ["._marker.Marker"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".marker"], ["._marker.Marker"] +) diff --git a/plotly/graph_objs/waterfall/increasing/_marker.py b/plotly/graph_objs/waterfall/increasing/_marker.py index d781c684bd..26e14c9b8f 100644 --- a/plotly/graph_objs/waterfall/increasing/_marker.py +++ b/plotly/graph_objs/waterfall/increasing/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.increasing" _path_str = "waterfall.increasing.marker" _valid_props = {"color", "line"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -80,13 +42,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color of all increasing values. - width - Sets the line width of all increasing values. - Returns ------- plotly.graph_objs.waterfall.increasing.marker.Line @@ -97,8 +52,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -109,7 +62,9 @@ def _prop_descriptions(self): r.Line` instance or dict with compatible properties """ - def __init__(self, arg=None, color=None, line=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, line: None | None = None, **kwargs + ): """ Construct a new Marker object @@ -129,14 +84,11 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -151,26 +103,10 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.increasing.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/increasing/marker/__init__.py b/plotly/graph_objs/waterfall/increasing/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/waterfall/increasing/marker/__init__.py +++ b/plotly/graph_objs/waterfall/increasing/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/waterfall/increasing/marker/_line.py b/plotly/graph_objs/waterfall/increasing/marker/_line.py index 476494b42c..16c9cbbcb1 100644 --- a/plotly/graph_objs/waterfall/increasing/marker/_line.py +++ b/plotly/graph_objs/waterfall/increasing/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.increasing.marker" _path_str = "waterfall.increasing.marker.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -100,7 +60,13 @@ def _prop_descriptions(self): Sets the line width of all increasing values. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -119,14 +85,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -141,26 +104,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.increasing.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/legendgrouptitle/__init__.py b/plotly/graph_objs/waterfall/legendgrouptitle/__init__.py index 2b474e3e06..f78e7c474e 100644 --- a/plotly/graph_objs/waterfall/legendgrouptitle/__init__.py +++ b/plotly/graph_objs/waterfall/legendgrouptitle/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import Font -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._font.Font"]) diff --git a/plotly/graph_objs/waterfall/legendgrouptitle/_font.py b/plotly/graph_objs/waterfall/legendgrouptitle/_font.py index c4c6cc8d7e..02f8588ae7 100644 --- a/plotly/graph_objs/waterfall/legendgrouptitle/_font.py +++ b/plotly/graph_objs/waterfall/legendgrouptitle/_font.py @@ -1,11 +1,12 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.legendgrouptitle" _path_str = "waterfall.legendgrouptitle.font" _valid_props = { @@ -20,8 +21,6 @@ class Font(_BaseTraceHierarchyType): "weight", } - # color - # ----- @property def color(self): """ @@ -30,42 +29,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -77,23 +41,14 @@ def color(self): def color(self, val): self["color"] = val - # family - # ------ @property def family(self): """ HTML font family - the typeface that will be applied by the web - browser. The web browser will only be able to apply a font if - it is available on the system which it operates. Provide - multiple font families, separated by commas, to indicate the - preference in which to apply fonts if they aren't available on - the system. The Chart Studio Cloud (at https://chart- - studio.plotly.com or on-premise) generates images on a server, - where only a select number of fonts are installed and - supported. These include "Arial", "Balto", "Courier New", - "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", - "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", - "Raleway", "Times New Roman". + browser. The web browser can only apply a font if it is + available on the system where it runs. Provide multiple font + families, separated by commas, to indicate the order in which + to apply fonts if they aren't available. The 'family' property is a string and must be specified as: - A non-empty string @@ -108,8 +63,6 @@ def family(self): def family(self, val): self["family"] = val - # lineposition - # ------------ @property def lineposition(self): """ @@ -133,8 +86,6 @@ def lineposition(self): def lineposition(self, val): self["lineposition"] = val - # shadow - # ------ @property def shadow(self): """ @@ -157,8 +108,6 @@ def shadow(self): def shadow(self, val): self["shadow"] = val - # size - # ---- @property def size(self): """ @@ -175,8 +124,6 @@ def size(self): def size(self, val): self["size"] = val - # style - # ----- @property def style(self): """ @@ -197,8 +144,6 @@ def style(self): def style(self, val): self["style"] = val - # textcase - # -------- @property def textcase(self): """ @@ -220,8 +165,6 @@ def textcase(self): def textcase(self, val): self["textcase"] = val - # variant - # ------- @property def variant(self): """ @@ -242,8 +185,6 @@ def variant(self): def variant(self, val): self["variant"] = val - # weight - # ------ @property def weight(self): """ @@ -264,8 +205,6 @@ def weight(self): def weight(self, val): self["weight"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -273,18 +212,11 @@ def _prop_descriptions(self): family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -312,15 +244,15 @@ def _prop_descriptions(self): def __init__( self, arg=None, - color=None, - family=None, - lineposition=None, - shadow=None, - size=None, - style=None, - textcase=None, - variant=None, - weight=None, + color: str | None = None, + family: str | None = None, + lineposition: Any | None = None, + shadow: str | None = None, + size: int | float | None = None, + style: Any | None = None, + textcase: Any | None = None, + variant: Any | None = None, + weight: int | None = None, **kwargs, ): """ @@ -338,18 +270,11 @@ def __init__( family HTML font family - the typeface that will be applied by - the web browser. The web browser will only be able to - apply a font if it is available on the system which it - operates. Provide multiple font families, separated by - commas, to indicate the preference in which to apply - fonts if they aren't available on the system. The Chart - Studio Cloud (at https://chart-studio.plotly.com or on- - premise) generates images on a server, where only a - select number of fonts are installed and supported. - These include "Arial", "Balto", "Courier New", "Droid - Sans", "Droid Serif", "Droid Sans Mono", "Gravitas - One", "Old Standard TT", "Open Sans", "Overpass", "PT - Sans Narrow", "Raleway", "Times New Roman". + the web browser. The web browser can only apply a font + if it is available on the system where it runs. Provide + multiple font families, separated by commas, to + indicate the order in which to apply fonts if they + aren't available. lineposition Sets the kind of decoration line(s) with text, such as an "under", "over" or "through" as well as combinations @@ -377,14 +302,11 @@ def __init__( ------- Font """ - super(Font, self).__init__("font") - + super().__init__("font") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -399,54 +321,17 @@ def __init__( an instance of :class:`plotly.graph_objs.waterfall.legendgrouptitle.Font`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("family", None) - _v = family if family is not None else _v - if _v is not None: - self["family"] = _v - _v = arg.pop("lineposition", None) - _v = lineposition if lineposition is not None else _v - if _v is not None: - self["lineposition"] = _v - _v = arg.pop("shadow", None) - _v = shadow if shadow is not None else _v - if _v is not None: - self["shadow"] = _v - _v = arg.pop("size", None) - _v = size if size is not None else _v - if _v is not None: - self["size"] = _v - _v = arg.pop("style", None) - _v = style if style is not None else _v - if _v is not None: - self["style"] = _v - _v = arg.pop("textcase", None) - _v = textcase if textcase is not None else _v - if _v is not None: - self["textcase"] = _v - _v = arg.pop("variant", None) - _v = variant if variant is not None else _v - if _v is not None: - self["variant"] = _v - _v = arg.pop("weight", None) - _v = weight if weight is not None else _v - if _v is not None: - self["weight"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("family", arg, family) + self._init_provided("lineposition", arg, lineposition) + self._init_provided("shadow", arg, shadow) + self._init_provided("size", arg, size) + self._init_provided("style", arg, style) + self._init_provided("textcase", arg, textcase) + self._init_provided("variant", arg, variant) + self._init_provided("weight", arg, weight) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/totals/__init__.py b/plotly/graph_objs/waterfall/totals/__init__.py index 61fdd95de6..83d0eda7aa 100644 --- a/plotly/graph_objs/waterfall/totals/__init__.py +++ b/plotly/graph_objs/waterfall/totals/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import Marker - from . import marker -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [".marker"], ["._marker.Marker"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [".marker"], ["._marker.Marker"] +) diff --git a/plotly/graph_objs/waterfall/totals/_marker.py b/plotly/graph_objs/waterfall/totals/_marker.py index 569e78ac5d..c414ddad75 100644 --- a/plotly/graph_objs/waterfall/totals/_marker.py +++ b/plotly/graph_objs/waterfall/totals/_marker.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.totals" _path_str = "waterfall.totals.marker" _valid_props = {"color", "line"} - # color - # ----- @property def color(self): """ @@ -23,42 +22,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -70,8 +34,6 @@ def color(self): def color(self, val): self["color"] = val - # line - # ---- @property def line(self): """ @@ -81,15 +43,6 @@ def line(self): - A dict of string/value properties that will be passed to the Line constructor - Supported dict properties: - - color - Sets the line color of all intermediate sums - and total values. - width - Sets the line width of all intermediate sums - and total values. - Returns ------- plotly.graph_objs.waterfall.totals.marker.Line @@ -100,8 +53,6 @@ def line(self): def line(self, val): self["line"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -113,7 +64,9 @@ def _prop_descriptions(self): ne` instance or dict with compatible properties """ - def __init__(self, arg=None, color=None, line=None, **kwargs): + def __init__( + self, arg=None, color: str | None = None, line: None | None = None, **kwargs + ): """ Construct a new Marker object @@ -134,14 +87,11 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): ------- Marker """ - super(Marker, self).__init__("marker") - + super().__init__("marker") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -156,26 +106,10 @@ def __init__(self, arg=None, color=None, line=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.totals.Marker`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("line", None) - _v = line if line is not None else _v - if _v is not None: - self["line"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("line", arg, line) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/graph_objs/waterfall/totals/marker/__init__.py b/plotly/graph_objs/waterfall/totals/marker/__init__.py index 8722c15a2b..579ff002ce 100644 --- a/plotly/graph_objs/waterfall/totals/marker/__init__.py +++ b/plotly/graph_objs/waterfall/totals/marker/__init__.py @@ -1,9 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import Line -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.Line"]) diff --git a/plotly/graph_objs/waterfall/totals/marker/_line.py b/plotly/graph_objs/waterfall/totals/marker/_line.py index d0eec46f41..17d011d505 100644 --- a/plotly/graph_objs/waterfall/totals/marker/_line.py +++ b/plotly/graph_objs/waterfall/totals/marker/_line.py @@ -1,17 +1,16 @@ +from __future__ import annotations +from typing import Any +from numpy.typing import NDArray from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): - # class properties - # -------------------- _parent_path_str = "waterfall.totals.marker" _path_str = "waterfall.totals.marker.line" _valid_props = {"color", "width"} - # color - # ----- @property def color(self): """ @@ -22,42 +21,7 @@ def color(self): - An rgb/rgba string (e.g. 'rgb(255,0,0)') - An hsl/hsla string (e.g. 'hsl(0,100%,50%)') - An hsv/hsva string (e.g. 'hsv(0,100%,100%)') - - A named CSS color: - aliceblue, antiquewhite, aqua, aquamarine, azure, - beige, bisque, black, blanchedalmond, blue, - blueviolet, brown, burlywood, cadetblue, - chartreuse, chocolate, coral, cornflowerblue, - cornsilk, crimson, cyan, darkblue, darkcyan, - darkgoldenrod, darkgray, darkgrey, darkgreen, - darkkhaki, darkmagenta, darkolivegreen, darkorange, - darkorchid, darkred, darksalmon, darkseagreen, - darkslateblue, darkslategray, darkslategrey, - darkturquoise, darkviolet, deeppink, deepskyblue, - dimgray, dimgrey, dodgerblue, firebrick, - floralwhite, forestgreen, fuchsia, gainsboro, - ghostwhite, gold, goldenrod, gray, grey, green, - greenyellow, honeydew, hotpink, indianred, indigo, - ivory, khaki, lavender, lavenderblush, lawngreen, - lemonchiffon, lightblue, lightcoral, lightcyan, - lightgoldenrodyellow, lightgray, lightgrey, - lightgreen, lightpink, lightsalmon, lightseagreen, - lightskyblue, lightslategray, lightslategrey, - lightsteelblue, lightyellow, lime, limegreen, - linen, magenta, maroon, mediumaquamarine, - mediumblue, mediumorchid, mediumpurple, - mediumseagreen, mediumslateblue, mediumspringgreen, - mediumturquoise, mediumvioletred, midnightblue, - mintcream, mistyrose, moccasin, navajowhite, navy, - oldlace, olive, olivedrab, orange, orangered, - orchid, palegoldenrod, palegreen, paleturquoise, - palevioletred, papayawhip, peachpuff, peru, pink, - plum, powderblue, purple, red, rosybrown, - royalblue, rebeccapurple, saddlebrown, salmon, - sandybrown, seagreen, seashell, sienna, silver, - skyblue, slateblue, slategray, slategrey, snow, - springgreen, steelblue, tan, teal, thistle, tomato, - turquoise, violet, wheat, white, whitesmoke, - yellow, yellowgreen + - A named CSS color Returns ------- @@ -69,8 +33,6 @@ def color(self): def color(self, val): self["color"] = val - # width - # ----- @property def width(self): """ @@ -89,8 +51,6 @@ def width(self): def width(self, val): self["width"] = val - # Self properties description - # --------------------------- @property def _prop_descriptions(self): return """\ @@ -102,7 +62,13 @@ def _prop_descriptions(self): values. """ - def __init__(self, arg=None, color=None, width=None, **kwargs): + def __init__( + self, + arg=None, + color: str | None = None, + width: int | float | None = None, + **kwargs, + ): """ Construct a new Line object @@ -123,14 +89,11 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): ------- Line """ - super(Line, self).__init__("line") - + super().__init__("line") if "_parent" in kwargs: self._parent = kwargs["_parent"] return - # Validate arg - # ------------ if arg is None: arg = {} elif isinstance(arg, self.__class__): @@ -145,26 +108,10 @@ def __init__(self, arg=None, color=None, width=None, **kwargs): an instance of :class:`plotly.graph_objs.waterfall.totals.marker.Line`""" ) - # Handle skip_invalid - # ------------------- self._skip_invalid = kwargs.pop("skip_invalid", False) self._validate = kwargs.pop("_validate", True) - # Populate data dict with properties - # ---------------------------------- - _v = arg.pop("color", None) - _v = color if color is not None else _v - if _v is not None: - self["color"] = _v - _v = arg.pop("width", None) - _v = width if width is not None else _v - if _v is not None: - self["width"] = _v - - # Process unknown kwargs - # ---------------------- + self._init_provided("color", arg, color) + self._init_provided("width", arg, width) self._process_kwargs(**dict(arg, **kwargs)) - - # Reset skip_invalid - # ------------------ self._skip_invalid = False diff --git a/plotly/io/_templates.py b/plotly/io/_templates.py index 85e2461f16..ad2d37f6d6 100644 --- a/plotly/io/_templates.py +++ b/plotly/io/_templates.py @@ -273,6 +273,7 @@ def _merge_2_templates(self, template1, template2): templates = TemplatesConfig() del TemplatesConfig + # Template utilities # ------------------ def walk_push_to_template(fig_obj, template_obj, skip): diff --git a/plotly/matplotlylib/__init__.py b/plotly/matplotlylib/__init__.py index 8891cc7c7c..9abe924f6f 100644 --- a/plotly/matplotlylib/__init__.py +++ b/plotly/matplotlylib/__init__.py @@ -9,5 +9,6 @@ 'tools' module or 'plotly' package. """ + from plotly.matplotlylib.renderer import PlotlyRenderer from plotly.matplotlylib.mplexporter import Exporter diff --git a/plotly/matplotlylib/mplexporter/exporter.py b/plotly/matplotlylib/mplexporter/exporter.py index dc3a0b08d8..c81dcb2a87 100644 --- a/plotly/matplotlylib/mplexporter/exporter.py +++ b/plotly/matplotlylib/mplexporter/exporter.py @@ -4,6 +4,7 @@ This submodule contains tools for crawling a matplotlib figure and exporting relevant pieces to a renderer. """ + import warnings import io from . import utils diff --git a/plotly/matplotlylib/mplexporter/utils.py b/plotly/matplotlylib/mplexporter/utils.py index 713620f44c..cdc39ed552 100644 --- a/plotly/matplotlylib/mplexporter/utils.py +++ b/plotly/matplotlylib/mplexporter/utils.py @@ -2,6 +2,7 @@ Utility Routines for Working with Matplotlib Objects ==================================================== """ + import itertools import io import base64 diff --git a/plotly/matplotlylib/mpltools.py b/plotly/matplotlylib/mpltools.py index 9e69fb7fa4..641606b318 100644 --- a/plotly/matplotlylib/mpltools.py +++ b/plotly/matplotlylib/mpltools.py @@ -4,6 +4,7 @@ A module for converting from mpl language to plotly language. """ + import math import warnings @@ -291,7 +292,7 @@ def convert_rgba_array(color_list): clean_color_list = list() for c in color_list: clean_color_list += [ - (dict(r=int(c[0] * 255), g=int(c[1] * 255), b=int(c[2] * 255), a=c[3])) + dict(r=int(c[0] * 255), g=int(c[1] * 255), b=int(c[2] * 255), a=c[3]) ] plotly_colors = list() for rgba in clean_color_list: diff --git a/plotly/matplotlylib/renderer.py b/plotly/matplotlylib/renderer.py index 3321879cbe..e05a046607 100644 --- a/plotly/matplotlylib/renderer.py +++ b/plotly/matplotlylib/renderer.py @@ -6,6 +6,7 @@ with the matplotlylib package. """ + import warnings import plotly.graph_objs as go diff --git a/plotly/offline/__init__.py b/plotly/offline/__init__.py index 9f82e47a90..d4d57e6106 100644 --- a/plotly/offline/__init__.py +++ b/plotly/offline/__init__.py @@ -3,6 +3,7 @@ ====== This module provides offline functionality. """ + from .offline import ( download_plotlyjs, get_plotlyjs_version, diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index ac05f7db4a..8fd88ec9c3 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -1,8 +1,9 @@ -""" Plotly Offline - A module to use Plotly's graphing library with Python - without connecting to a public or private plotly enterprise - server. +"""Plotly Offline +A module to use Plotly's graphing library with Python +without connecting to a public or private plotly enterprise +server. """ + import os import warnings import pkgutil diff --git a/plotly/tools.py b/plotly/tools.py index 4a4a6e136d..dd73453cf3 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -5,6 +5,7 @@ Functions that USERS will possibly want access to. """ + import json import warnings @@ -571,6 +572,7 @@ def return_figure_from_figure_or_data(figure_or_data, validate_figure): DIAG_CHOICES = ["scatter", "histogram", "box"] VALID_COLORMAP_TYPES = ["cat", "seq"] + # Deprecations class FigureFactory(object): @staticmethod diff --git a/plotly/utils.py b/plotly/utils.py index 6271631416..b61d29de6f 100644 --- a/plotly/utils.py +++ b/plotly/utils.py @@ -4,6 +4,7 @@ from _plotly_utils.utils import * from _plotly_utils.data_utils import * + # Pretty printing def _list_repr_elided(v, threshold=200, edgeitems=3, indent=0, width=80): """ diff --git a/plotly/validators/__init__.py b/plotly/validators/__init__.py index b1e8258104..375c16bf3c 100644 --- a/plotly/validators/__init__.py +++ b/plotly/validators/__init__.py @@ -1,117 +1,61 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._waterfall import WaterfallValidator - from ._volume import VolumeValidator - from ._violin import ViolinValidator - from ._treemap import TreemapValidator - from ._table import TableValidator - from ._surface import SurfaceValidator - from ._sunburst import SunburstValidator - from ._streamtube import StreamtubeValidator - from ._splom import SplomValidator - from ._scatterternary import ScatterternaryValidator - from ._scattersmith import ScattersmithValidator - from ._scatterpolargl import ScatterpolarglValidator - from ._scatterpolar import ScatterpolarValidator - from ._scattermapbox import ScattermapboxValidator - from ._scattermap import ScattermapValidator - from ._scattergl import ScatterglValidator - from ._scattergeo import ScattergeoValidator - from ._scattercarpet import ScattercarpetValidator - from ._scatter3d import Scatter3DValidator - from ._scatter import ScatterValidator - from ._sankey import SankeyValidator - from ._pie import PieValidator - from ._parcoords import ParcoordsValidator - from ._parcats import ParcatsValidator - from ._ohlc import OhlcValidator - from ._mesh3d import Mesh3DValidator - from ._isosurface import IsosurfaceValidator - from ._indicator import IndicatorValidator - from ._image import ImageValidator - from ._icicle import IcicleValidator - from ._histogram2dcontour import Histogram2DcontourValidator - from ._histogram2d import Histogram2DValidator - from ._histogram import HistogramValidator - from ._heatmap import HeatmapValidator - from ._funnelarea import FunnelareaValidator - from ._funnel import FunnelValidator - from ._densitymapbox import DensitymapboxValidator - from ._densitymap import DensitymapValidator - from ._contourcarpet import ContourcarpetValidator - from ._contour import ContourValidator - from ._cone import ConeValidator - from ._choroplethmapbox import ChoroplethmapboxValidator - from ._choroplethmap import ChoroplethmapValidator - from ._choropleth import ChoroplethValidator - from ._carpet import CarpetValidator - from ._candlestick import CandlestickValidator - from ._box import BoxValidator - from ._barpolar import BarpolarValidator - from ._bar import BarValidator - from ._layout import LayoutValidator - from ._frames import FramesValidator - from ._data import DataValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._waterfall.WaterfallValidator", - "._volume.VolumeValidator", - "._violin.ViolinValidator", - "._treemap.TreemapValidator", - "._table.TableValidator", - "._surface.SurfaceValidator", - "._sunburst.SunburstValidator", - "._streamtube.StreamtubeValidator", - "._splom.SplomValidator", - "._scatterternary.ScatterternaryValidator", - "._scattersmith.ScattersmithValidator", - "._scatterpolargl.ScatterpolarglValidator", - "._scatterpolar.ScatterpolarValidator", - "._scattermapbox.ScattermapboxValidator", - "._scattermap.ScattermapValidator", - "._scattergl.ScatterglValidator", - "._scattergeo.ScattergeoValidator", - "._scattercarpet.ScattercarpetValidator", - "._scatter3d.Scatter3DValidator", - "._scatter.ScatterValidator", - "._sankey.SankeyValidator", - "._pie.PieValidator", - "._parcoords.ParcoordsValidator", - "._parcats.ParcatsValidator", - "._ohlc.OhlcValidator", - "._mesh3d.Mesh3DValidator", - "._isosurface.IsosurfaceValidator", - "._indicator.IndicatorValidator", - "._image.ImageValidator", - "._icicle.IcicleValidator", - "._histogram2dcontour.Histogram2DcontourValidator", - "._histogram2d.Histogram2DValidator", - "._histogram.HistogramValidator", - "._heatmap.HeatmapValidator", - "._funnelarea.FunnelareaValidator", - "._funnel.FunnelValidator", - "._densitymapbox.DensitymapboxValidator", - "._densitymap.DensitymapValidator", - "._contourcarpet.ContourcarpetValidator", - "._contour.ContourValidator", - "._cone.ConeValidator", - "._choroplethmapbox.ChoroplethmapboxValidator", - "._choroplethmap.ChoroplethmapValidator", - "._choropleth.ChoroplethValidator", - "._carpet.CarpetValidator", - "._candlestick.CandlestickValidator", - "._box.BoxValidator", - "._barpolar.BarpolarValidator", - "._bar.BarValidator", - "._layout.LayoutValidator", - "._frames.FramesValidator", - "._data.DataValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._waterfall.WaterfallValidator", + "._volume.VolumeValidator", + "._violin.ViolinValidator", + "._treemap.TreemapValidator", + "._table.TableValidator", + "._surface.SurfaceValidator", + "._sunburst.SunburstValidator", + "._streamtube.StreamtubeValidator", + "._splom.SplomValidator", + "._scatterternary.ScatterternaryValidator", + "._scattersmith.ScattersmithValidator", + "._scatterpolargl.ScatterpolarglValidator", + "._scatterpolar.ScatterpolarValidator", + "._scattermapbox.ScattermapboxValidator", + "._scattermap.ScattermapValidator", + "._scattergl.ScatterglValidator", + "._scattergeo.ScattergeoValidator", + "._scattercarpet.ScattercarpetValidator", + "._scatter3d.Scatter3DValidator", + "._scatter.ScatterValidator", + "._sankey.SankeyValidator", + "._pie.PieValidator", + "._parcoords.ParcoordsValidator", + "._parcats.ParcatsValidator", + "._ohlc.OhlcValidator", + "._mesh3d.Mesh3DValidator", + "._isosurface.IsosurfaceValidator", + "._indicator.IndicatorValidator", + "._image.ImageValidator", + "._icicle.IcicleValidator", + "._histogram2dcontour.Histogram2DcontourValidator", + "._histogram2d.Histogram2DValidator", + "._histogram.HistogramValidator", + "._heatmap.HeatmapValidator", + "._funnelarea.FunnelareaValidator", + "._funnel.FunnelValidator", + "._densitymapbox.DensitymapboxValidator", + "._densitymap.DensitymapValidator", + "._contourcarpet.ContourcarpetValidator", + "._contour.ContourValidator", + "._cone.ConeValidator", + "._choroplethmapbox.ChoroplethmapboxValidator", + "._choroplethmap.ChoroplethmapValidator", + "._choropleth.ChoroplethValidator", + "._carpet.CarpetValidator", + "._candlestick.CandlestickValidator", + "._box.BoxValidator", + "._barpolar.BarpolarValidator", + "._bar.BarValidator", + "._layout.LayoutValidator", + "._frames.FramesValidator", + "._data.DataValidator", + ], +) diff --git a/plotly/validators/_bar.py b/plotly/validators/_bar.py index 35b08e62da..9d697d7641 100644 --- a/plotly/validators/_bar.py +++ b/plotly/validators/_bar.py @@ -1,431 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarValidator(_plotly_utils.basevalidators.CompoundValidator): +class BarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="bar", parent_name="", **kwargs): - super(BarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Bar"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - base - Sets where the bar base is drawn (in position - axis units). In "stack" or "relative" barmode, - traces that set "base" will be excluded and - drawn in "overlay" mode instead. - basesrc - Sets the source reference on Chart Studio Cloud - for `base`. - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - error_x - :class:`plotly.graph_objects.bar.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.bar.ErrorY` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.bar.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.bar.Legendgrouptit - le` instance or dict with compatible properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.bar.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - offset - Shifts the position where the bar is drawn (in - position axis units). In "group" barmode, - traces that set "offset" will be excluded and - drawn in "overlay" mode instead. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - offsetsrc - Sets the source reference on Chart Studio Cloud - for `offset`. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the - bar. - selected - :class:`plotly.graph_objects.bar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.bar.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the font used for `text`. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. If "none", no text appears. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `value` and `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.bar.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_barpolar.py b/plotly/validators/_barpolar.py index ab03a272a2..16374cd938 100644 --- a/plotly/validators/_barpolar.py +++ b/plotly/validators/_barpolar.py @@ -1,256 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarpolarValidator(_plotly_utils.basevalidators.CompoundValidator): +class BarpolarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="barpolar", parent_name="", **kwargs): - super(BarpolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Barpolar"), data_docs=kwargs.pop( "data_docs", """ - base - Sets where the bar base is drawn (in radial - axis units). In "stack" barmode, traces that - set "base" will be excluded and drawn in - "overlay" mode instead. - basesrc - Sets the source reference on Chart Studio Cloud - for `base`. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period - divided by the length of the `r` coordinates. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.barpolar.Hoverlabe - l` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.barpolar.Legendgro - uptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.barpolar.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - offset - Shifts the angular position where the bar is - drawn (in "thetatunit" units). - offsetsrc - Sets the source reference on Chart Studio Cloud - for `offset`. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the - starting coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud - for `r`. - selected - :class:`plotly.graph_objects.barpolar.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.barpolar.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a polar subplot. If "polar" - (the default value), the data refer to - `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - text - Sets hover text elements associated with each - bar. If a single string, the same string - appears over all bars. If an array of string, - the items are mapped in order to the this - trace's coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of - theta coordinates. Use with `dtheta` where - `theta0` is the starting coordinate and - `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud - for `theta`. - thetaunit - Sets the unit of input "theta" values. Has an - effect only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.barpolar.Unselecte - d` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar angular width (in "thetaunit" - units). - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/_box.py b/plotly/validators/_box.py index cfbcebe373..426e05e9e6 100644 --- a/plotly/validators/_box.py +++ b/plotly/validators/_box.py @@ -1,514 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxValidator(_plotly_utils.basevalidators.CompoundValidator): +class BoxValidator(_bv.CompoundValidator): def __init__(self, plotly_name="box", parent_name="", **kwargs): - super(BoxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Box"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - boxmean - If True, the mean of the box(es)' underlying - distribution is drawn as a dashed line inside - the box(es). If "sd" the standard deviation is - also drawn. Defaults to True when `mean` is - set. Defaults to "sd" when `sd` is set - Otherwise defaults to False. - boxpoints - If "outliers", only the sample points lying - outside the whiskers are shown If - "suspectedoutliers", the outlier points are - shown and points either less than 4*Q1-3*Q3 or - greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are - shown If False, only the box(es) are shown with - no sample points Defaults to - "suspectedoutliers" when `marker.outliercolor` - or `marker.line.outliercolor` is set. Defaults - to "all" under the q1/median/q3 signature. - Otherwise defaults to "outliers". - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step for multi-box traces - set using q1/median/q3. - dy - Sets the y coordinate step for multi-box traces - set using q1/median/q3. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.box.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual boxes - or sample points or both? - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - jitter - Sets the amount of jitter in the sample points - drawn. If 0, the sample points align along the - distribution axis. If 1, the sample points are - drawn in a random jitter of width equal to the - width of the box(es). - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.box.Legendgrouptit - le` instance or dict with compatible properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.box.Line` instance - or dict with compatible properties - lowerfence - Sets the lower fence values. There should be as - many items as the number of boxes desired. This - attribute has effect only under the - q1/median/q3 signature. If `lowerfence` is not - provided but a sample (in `y` or `x`) is set, - we compute the lower as the last sample point - below 1.5 times the IQR. - lowerfencesrc - Sets the source reference on Chart Studio Cloud - for `lowerfence`. - marker - :class:`plotly.graph_objects.box.Marker` - instance or dict with compatible properties - mean - Sets the mean values. There should be as many - items as the number of boxes desired. This - attribute has effect only under the - q1/median/q3 signature. If `mean` is not - provided but a sample (in `y` or `x`) is set, - we compute the mean for each box using the - sample values. - meansrc - Sets the source reference on Chart Studio Cloud - for `mean`. - median - Sets the median values. There should be as many - items as the number of boxes desired. - mediansrc - Sets the source reference on Chart Studio Cloud - for `median`. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. For box traces, - the name will also be used for the position - coordinate, if `x` and `x0` (`y` and `y0` if - horizontal) are missing and the position axis - is categorical - notched - Determines whether or not notches are drawn. - Notches displays a confidence interval around - the median. We compute the confidence interval - as median +/- 1.57 * IQR / sqrt(N), where IQR - is the interquartile range and N is the sample - size. If two boxes' notches do not overlap - there is 95% confidence their medians differ. - See https://sites.google.com/site/davidsstatist - ics/home/notched-box-plots for more info. - Defaults to False unless `notchwidth` or - `notchspan` is set. - notchspan - Sets the notch span from the boxes' `median` - values. There should be as many items as the - number of boxes desired. This attribute has - effect only under the q1/median/q3 signature. - If `notchspan` is not provided but a sample (in - `y` or `x`) is set, we compute it as 1.57 * IQR - / sqrt(N), where N is the sample size. - notchspansrc - Sets the source reference on Chart Studio Cloud - for `notchspan`. - notchwidth - Sets the width of the notches relative to the - box' width. For example, with 0, the notches - are as wide as the box(es). - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the box(es). If "v" - ("h"), the distribution is visualized along the - vertical (horizontal). - pointpos - Sets the position of the sample points in - relation to the box(es). If 0, the sample - points are places over the center of the - box(es). Positive (negative) values correspond - to positions to the right (left) for vertical - boxes and above (below) for horizontal boxes - q1 - Sets the Quartile 1 values. There should be as - many items as the number of boxes desired. - q1src - Sets the source reference on Chart Studio Cloud - for `q1`. - q3 - Sets the Quartile 3 values. There should be as - many items as the number of boxes desired. - q3src - Sets the source reference on Chart Studio Cloud - for `q3`. - quartilemethod - Sets the method used to compute the sample's Q1 - and Q3 quartiles. The "linear" method uses the - 25th percentile for Q1 and 75th percentile for - Q3 as computed using method #10 (listed on - http://jse.amstat.org/v14n3/langford.html). The - "exclusive" method uses the median to divide - the ordered dataset into two halves if the - sample is odd, it does not include the median - in either half - Q1 is then the median of the - lower half and Q3 the median of the upper half. - The "inclusive" method also uses the median to - divide the ordered dataset into two halves but - if the sample is odd, it includes the median in - both halves - Q1 is then the median of the - lower half and Q3 the median of the upper half. - sd - Sets the standard deviation values. There - should be as many items as the number of boxes - desired. This attribute has effect only under - the q1/median/q3 signature. If `sd` is not - provided but a sample (in `y` or `x`) is set, - we compute the standard deviation for each box - using the sample values. - sdmultiple - Scales the box size when sizemode=sd Allowing - boxes to be drawn across any stddev range For - example 1-stddev, 3-stddev, 5-stddev - sdsrc - Sets the source reference on Chart Studio Cloud - for `sd`. - selected - :class:`plotly.graph_objects.box.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showwhiskers - Determines whether or not whiskers are visible. - Defaults to true for `sizemode` "quartiles", - false for "sd". - sizemode - Sets the upper and lower bound for the boxes - quartiles means box is drawn between Q1 and Q3 - SD means the box is drawn between Mean +- - Standard Deviation Argument sdmultiple (default - 1) to scale the box size So it could be drawn - 1-stddev, 3-stddev etc - stream - :class:`plotly.graph_objects.box.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each - sample value. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (x,y) coordinates. To be - seen, trace `hoverinfo` must contain a "text" - flag. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.box.Unselected` - instance or dict with compatible properties - upperfence - Sets the upper fence values. There should be as - many items as the number of boxes desired. This - attribute has effect only under the - q1/median/q3 signature. If `upperfence` is not - provided but a sample (in `y` or `x`) is set, - we compute the upper as the last sample point - above 1.5 times the IQR. - upperfencesrc - Sets the source reference on Chart Studio Cloud - for `upperfence`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the - box' width. For example, with 1, the whiskers - are as wide as the box(es). - width - Sets the width of the box in data coordinate If - 0 (default value) the width is automatically - selected based on the positions of other box - traces in the same subplot. - x - Sets the x sample data or coordinates. See - overview for more info. - x0 - Sets the x coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y sample data or coordinates. See - overview for more info. - y0 - Sets the y coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_candlestick.py b/plotly/validators/_candlestick.py index 10e589d82d..cc461ca70a 100644 --- a/plotly/validators/_candlestick.py +++ b/plotly/validators/_candlestick.py @@ -1,268 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CandlestickValidator(_plotly_utils.basevalidators.CompoundValidator): +class CandlestickValidator(_bv.CompoundValidator): def __init__(self, plotly_name="candlestick", parent_name="", **kwargs): - super(CandlestickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Candlestick"), data_docs=kwargs.pop( "data_docs", """ - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud - for `close`. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - decreasing - :class:`plotly.graph_objects.candlestick.Decrea - sing` instance or dict with compatible - properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud - for `high`. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.candlestick.Hoverl - abel` instance or dict with compatible - properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - increasing - :class:`plotly.graph_objects.candlestick.Increa - sing` instance or dict with compatible - properties - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.candlestick.Legend - grouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.candlestick.Line` - instance or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud - for `low`. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud - for `open`. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.candlestick.Stream - ` instance or dict with compatible properties - text - Sets hover text elements associated with each - sample point. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - whiskerwidth - Sets the width of the whiskers relative to the - box' width. For example, with 1, the whiskers - are as wide as the box(es). - x - Sets the x coordinates. If absent, linear - coordinate will be generated. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_carpet.py b/plotly/validators/_carpet.py index aaf53aaa0d..8da53e01cd 100644 --- a/plotly/validators/_carpet.py +++ b/plotly/validators/_carpet.py @@ -1,194 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CarpetValidator(_plotly_utils.basevalidators.CompoundValidator): +class CarpetValidator(_bv.CompoundValidator): def __init__(self, plotly_name="carpet", parent_name="", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Carpet"), data_docs=kwargs.pop( "data_docs", """ - a - An array containing values of the first - parameter value - a0 - Alternate to `a`. Builds a linear space of a - coordinates. Use with `da` where `a0` is the - starting coordinate and `da` the step. - aaxis - :class:`plotly.graph_objects.carpet.Aaxis` - instance or dict with compatible properties - asrc - Sets the source reference on Chart Studio Cloud - for `a`. - b - A two dimensional array of y coordinates at - each carpet point. - b0 - Alternate to `b`. Builds a linear space of a - coordinates. Use with `db` where `b0` is the - starting coordinate and `db` the step. - baxis - :class:`plotly.graph_objects.carpet.Baxis` - instance or dict with compatible properties - bsrc - Sets the source reference on Chart Studio Cloud - for `b`. - carpet - An identifier for this carpet, so that - `scattercarpet` and `contourcarpet` traces can - specify a carpet plot on which they lie - cheaterslope - The shift applied to each successive row of - data in creating a cheater plot. Only used if - `x` is been omitted. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - da - Sets the a coordinate step. See `a0` for more - info. - db - Sets the b coordinate step. See `b0` for more - info. - font - The default font used for axis & tick labels on - this carpet - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.carpet.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - stream - :class:`plotly.graph_objects.carpet.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - A two dimensional array of x coordinates at - each carpet point. If omitted, the plot is a - cheater plot and the xaxis is hidden by - default. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - A two dimensional array of y coordinates at - each carpet point. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_choropleth.py b/plotly/validators/_choropleth.py index 010ef0d401..2f679cd7e1 100644 --- a/plotly/validators/_choropleth.py +++ b/plotly/validators/_choropleth.py @@ -1,301 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ChoroplethValidator(_plotly_utils.basevalidators.CompoundValidator): +class ChoroplethValidator(_bv.CompoundValidator): def __init__(self, plotly_name="choropleth", parent_name="", **kwargs): - super(ChoroplethValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Choropleth"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.choropleth.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Only has an effect when - `geojson` is set. Support nested property, for - example "properties.name". - geo - Sets a reference between this trace's - geospatial coordinates and a geographic map. If - "geo" (the default value), the geospatial - coordinates refer to `layout.geo`. If "geo2", - the geospatial coordinates refer to - `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this - trace. If not given, the features on the base - map are used. It can be set as a valid GeoJSON - object or as a URL string. Note that we only - accept GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.choropleth.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.choropleth.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - locationmode - Determines the set of locations used to match - entries in `locations` to regions on the map. - Values "ISO-3", "USA-states", *country names* - correspond to features on the base map and - value "geojson-id" corresponds to features from - a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. - See `locationmode` for more info. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - marker - :class:`plotly.graph_objects.choropleth.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - selected - :class:`plotly.graph_objects.choropleth.Selecte - d` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.choropleth.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each - location. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choropleth.Unselec - ted` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_choroplethmap.py b/plotly/validators/_choroplethmap.py index 6efaef4941..64e8b7d2a0 100644 --- a/plotly/validators/_choroplethmap.py +++ b/plotly/validators/_choroplethmap.py @@ -1,299 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ChoroplethmapValidator(_plotly_utils.basevalidators.CompoundValidator): +class ChoroplethmapValidator(_bv.CompoundValidator): def __init__(self, plotly_name="choroplethmap", parent_name="", **kwargs): - super(ChoroplethmapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Choroplethmap"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be - inserted before the layer with the specified - ID. By default, choroplethmap traces are placed - above the water layers. If set to '', the layer - will be inserted above every existing layer. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.choroplethmap.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Support nested property, for - example "properties.name". - geojson - Sets the GeoJSON data associated with this - trace. It can be set as a valid GeoJSON object - or as a URL string. Note that we only accept - GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.choroplethmap.Hove - rlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variable `properties` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.choroplethmap.Lege - ndgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - locations - Sets which features found in "geojson" to plot - using their feature `id` field. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - marker - :class:`plotly.graph_objects.choroplethmap.Mark - er` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - selected - :class:`plotly.graph_objects.choroplethmap.Sele - cted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.choroplethmap.Stre - am` instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a map subplot. If "map" (the - default value), the data refer to `layout.map`. - If "map2", the data refer to `layout.map2`, and - so on. - text - Sets the text elements associated with each - location. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choroplethmap.Unse - lected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_choroplethmapbox.py b/plotly/validators/_choroplethmapbox.py index ff3439c0c3..839a6a0fa9 100644 --- a/plotly/validators/_choroplethmapbox.py +++ b/plotly/validators/_choroplethmapbox.py @@ -1,308 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ChoroplethmapboxValidator(_plotly_utils.basevalidators.CompoundValidator): +class ChoroplethmapboxValidator(_bv.CompoundValidator): def __init__(self, plotly_name="choroplethmapbox", parent_name="", **kwargs): - super(ChoroplethmapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Choroplethmapbox"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the choropleth polygons will be - inserted before the layer with the specified - ID. By default, choroplethmapbox traces are - placed above the water layers. If set to '', - the layer will be inserted above every existing - layer. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.choroplethmapbox.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Support nested property, for - example "properties.name". - geojson - Sets the GeoJSON data associated with this - trace. It can be set as a valid GeoJSON object - or as a URL string. Note that we only accept - GeoJSONs of type "FeatureCollection" or - "Feature" with geometries of type "Polygon" or - "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.choroplethmapbox.H - overlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variable `properties` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.choroplethmapbox.L - egendgrouptitle` instance or dict with - compatible properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - locations - Sets which features found in "geojson" to plot - using their feature `id` field. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - marker - :class:`plotly.graph_objects.choroplethmapbox.M - arker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - selected - :class:`plotly.graph_objects.choroplethmapbox.S - elected` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.choroplethmapbox.S - tream` instance or dict with compatible - properties - subplot - mapbox subplots and traces are deprecated! - Please consider switching to `map` subplots and - traces. Learn more at: - https://plotly.com/python/maplibre-migration/ - as well as - https://plotly.com/javascript/maplibre- - migration/ Sets a reference between this - trace's data coordinates and a mapbox subplot. - If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data - refer to `layout.mapbox2`, and so on. - text - Sets the text elements associated with each - location. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.choroplethmapbox.U - nselected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the color values. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_cone.py b/plotly/validators/_cone.py index 94ba1197c3..e388f8a2c7 100644 --- a/plotly/validators/_cone.py +++ b/plotly/validators/_cone.py @@ -1,396 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConeValidator(_plotly_utils.basevalidators.CompoundValidator): +class ConeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="cone", parent_name="", **kwargs): - super(ConeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Cone"), data_docs=kwargs.pop( "data_docs", """ - anchor - Sets the cones' anchor with respect to their - x/y/z positions. Note that "cm" denote the - cone's center of mass which corresponds to 1/4 - from the tail to tip. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - u/v/w norm) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as u/v/w norm. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.cone.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.cone.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variable `norm` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.cone.Legendgroupti - tle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lighting - :class:`plotly.graph_objects.cone.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.cone.Lightposition - ` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - sizemode - Determines whether `sizeref` is set as a - "scaled" (i.e unitless) scalar (normalized by - the max u/v/w norm in the vector field) or as - "absolute" value (in the same units as the - vector field). To display sizes in actual - vector length use "raw". - sizeref - Adjusts the cone size scaling. The size of the - cones is determined by their u/v/w norm - multiplied a factor and `sizeref`. This factor - (computed internally) corresponds to the - minimum "time" to travel across two successive - x/y/z positions at the average velocity of - those two successive positions. All cones in a - given trace use the same factor. With - `sizemode` set to "raw", its default value is - 1. With `sizemode` set to "scaled", `sizeref` - is unitless, its default value is 0.5. With - `sizemode` set to "absolute", `sizeref` has the - same units as the u/v/w vector field, its the - default value is half the sample's maximum - vector norm. - stream - :class:`plotly.graph_objects.cone.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with the - cones. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements - will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - u - Sets the x components of the vector field. - uhoverformat - Sets the hover text formatting rulefor `u` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud - for `u`. - v - Sets the y components of the vector field. - vhoverformat - Sets the hover text formatting rulefor `v` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - vsrc - Sets the source reference on Chart Studio Cloud - for `v`. - w - Sets the z components of the vector field. - whoverformat - Sets the hover text formatting rulefor `w` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - wsrc - Sets the source reference on Chart Studio Cloud - for `w`. - x - Sets the x coordinates of the vector field and - of the displayed cones. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates of the vector field and - of the displayed cones. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the z coordinates of the vector field and - of the displayed cones. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_contour.py b/plotly/validators/_contour.py index 3fde1bf29d..527ad06330 100644 --- a/plotly/validators/_contour.py +++ b/plotly/validators/_contour.py @@ -1,444 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContourValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contour", parent_name="", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contour"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level - attributes are picked by an algorithm. If True, - the number of contour levels can be set in - `ncontours`. If False, set the contour level - attributes in `contours`. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.contour.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data are filled in. - It is defaulted to true if `z` is a one - dimensional array otherwise it is defaulted to - false. - contours - :class:`plotly.graph_objects.contour.Contours` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - fillcolor - Sets the fill color if `contours.type` is - "constraint". Defaults to a half-transparent - variant of the line color, marker color, or - marker line color, whichever is available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.contour.Hoverlabel - ` instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data have hover - labels associated with them. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.contour.Legendgrou - ptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.contour.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The - actual number of contours will be chosen - automatically to be less than or equal to the - value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is - missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.contour.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textfont - For this trace it only has an effect if - `coloring` is set to "heatmap". Sets the text - font. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - For this trace it only has an effect if - `coloring` is set to "heatmap". Template string - used for rendering the information text that - appear on points. Note that this will override - `textinfo`. Variables are inserted using - %{variable}, for example "y: %{y}". Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `x`, `y`, `z` and `text`. - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - xtype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - ytype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_contourcarpet.py b/plotly/validators/_contourcarpet.py index 3995ea7d3e..5ab9daf251 100644 --- a/plotly/validators/_contourcarpet.py +++ b/plotly/validators/_contourcarpet.py @@ -1,284 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourcarpetValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContourcarpetValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contourcarpet", parent_name="", **kwargs): - super(ContourcarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contourcarpet"), data_docs=kwargs.pop( "data_docs", """ - a - Sets the x coordinates. - a0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - asrc - Sets the source reference on Chart Studio Cloud - for `a`. - atype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level - attributes are picked by an algorithm. If True, - the number of contour levels can be set in - `ncontours`. If False, set the contour level - attributes in `contours`. - b - Sets the y coordinates. - b0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - bsrc - Sets the source reference on Chart Studio Cloud - for `b`. - btype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - carpet - The `carpet` of the carpet axes on which this - contour trace lies - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.contourcarpet.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - contours - :class:`plotly.graph_objects.contourcarpet.Cont - ours` instance or dict with compatible - properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - da - Sets the x coordinate step. See `x0` for more - info. - db - Sets the y coordinate step. See `y0` for more - info. - fillcolor - Sets the fill color if `contours.type` is - "constraint". Defaults to a half-transparent - variant of the line color, marker color, or - marker line color, whichever is available. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.contourcarpet.Lege - ndgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.contourcarpet.Line - ` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - ncontours - Sets the maximum number of contour levels. The - actual number of contours will be chosen - automatically to be less than or equal to the - value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is - missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.contourcarpet.Stre - am` instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_data.py b/plotly/validators/_data.py index 19c1dc1f04..6fc88e8c47 100644 --- a/plotly/validators/_data.py +++ b/plotly/validators/_data.py @@ -2,10 +2,11 @@ class DataValidator(_plotly_utils.basevalidators.BaseDataValidator): + def __init__(self, plotly_name="data", parent_name="", **kwargs): - super(DataValidator, self).__init__( - class_strs_map={ + super().__init__( + { "bar": "Bar", "barpolar": "Barpolar", "box": "Box", @@ -56,7 +57,7 @@ def __init__(self, plotly_name="data", parent_name="", **kwargs): "volume": "Volume", "waterfall": "Waterfall", }, - plotly_name=plotly_name, - parent_name=parent_name, + plotly_name, + parent_name, **kwargs, ) diff --git a/plotly/validators/_densitymap.py b/plotly/validators/_densitymap.py index df46712d65..a7a081f5ba 100644 --- a/plotly/validators/_densitymap.py +++ b/plotly/validators/_densitymap.py @@ -1,296 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DensitymapValidator(_plotly_utils.basevalidators.CompoundValidator): +class DensitymapValidator(_bv.CompoundValidator): def __init__(self, plotly_name="densitymap", parent_name="", **kwargs): - super(DensitymapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Densitymap"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the densitymap trace will be - inserted before the layer with the specified - ID. By default, densitymap traces are placed - below the first layer of type symbol If set to - '', the layer will be inserted above every - existing layer. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.densitymap.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.densitymap.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. To - be seen, trace `hoverinfo` must contain a - "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for `lat`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.densitymap.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for `lon`. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / - `lat` point in pixels. Increasing the value - makes the densitymap trace smoother, but less - detailed. - radiussrc - Sets the source reference on Chart Studio Cloud - for `radius`. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.densitymap.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a map subplot. If "map" (the - default value), the data refer to `layout.map`. - If "map2", the data refer to `layout.map2`, and - so on. - text - Sets text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the points' weight. For example, a value - of 10 would be equivalent to having 10 points - of weight 1 in the same spot - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_densitymapbox.py b/plotly/validators/_densitymapbox.py index 8125ff84d3..bd62407dcd 100644 --- a/plotly/validators/_densitymapbox.py +++ b/plotly/validators/_densitymapbox.py @@ -1,303 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DensitymapboxValidator(_plotly_utils.basevalidators.CompoundValidator): +class DensitymapboxValidator(_bv.CompoundValidator): def __init__(self, plotly_name="densitymapbox", parent_name="", **kwargs): - super(DensitymapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Densitymapbox"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - below - Determines if the densitymapbox trace will be - inserted before the layer with the specified - ID. By default, densitymapbox traces are placed - below the first layer of type symbol If set to - '', the layer will be inserted above every - existing layer. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.densitymapbox.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.densitymapbox.Hove - rlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. To - be seen, trace `hoverinfo` must contain a - "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for `lat`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.densitymapbox.Lege - ndgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for `lon`. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - radius - Sets the radius of influence of one `lon` / - `lat` point in pixels. Increasing the value - makes the densitymapbox trace smoother, but - less detailed. - radiussrc - Sets the source reference on Chart Studio Cloud - for `radius`. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.densitymapbox.Stre - am` instance or dict with compatible properties - subplot - mapbox subplots and traces are deprecated! - Please consider switching to `map` subplots and - traces. Learn more at: - https://plotly.com/python/maplibre-migration/ - as well as - https://plotly.com/javascript/maplibre- - migration/ Sets a reference between this - trace's data coordinates and a mapbox subplot. - If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data - refer to `layout.mapbox2`, and so on. - text - Sets text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - z - Sets the points' weight. For example, a value - of 10 would be equivalent to having 10 points - of weight 1 in the same spot - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_frames.py b/plotly/validators/_frames.py index 00345981b1..fbd84e36fd 100644 --- a/plotly/validators/_frames.py +++ b/plotly/validators/_frames.py @@ -1,38 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FramesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class FramesValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="frames", parent_name="", **kwargs): - super(FramesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Frame"), data_docs=kwargs.pop( "data_docs", """ - baseframe - The name of the frame into which this frame's - properties are merged before applying. This is - used to unify properties and avoid needing to - specify the same values for the same properties - in multiple frames. - data - A list of traces this frame modifies. The - format is identical to the normal trace - definition. - group - An identifier that specifies the group to which - the frame belongs, used by animate to select a - subset of frames. - layout - Layout properties which this frame modifies. - The format is identical to the normal layout - definition. - name - A label by which to identify the frame - traces - A list of trace indices that identify the - respective traces in the data attribute """, ), **kwargs, diff --git a/plotly/validators/_funnel.py b/plotly/validators/_funnel.py index 8144f93e67..79afbca442 100644 --- a/plotly/validators/_funnel.py +++ b/plotly/validators/_funnel.py @@ -1,414 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelValidator(_plotly_utils.basevalidators.CompoundValidator): +class FunnelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="funnel", parent_name="", **kwargs): - super(FunnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Funnel"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connector - :class:`plotly.graph_objects.funnel.Connector` - instance or dict with compatible properties - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.funnel.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `percentInitial`, `percentPrevious` - and `percentTotal`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.funnel.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.funnel.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - offset - Shifts the position where the bar is drawn (in - position axis units). In "group" barmode, - traces that set "offset" will be excluded and - drawn in "overlay" mode instead. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the funnels. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). By default funnels - are tend to be oriented horizontally; unless - only "y" array is presented or orientation is - set to "v". Also regarding graphs including - only 'horizontal' funnels, "autorange" on the - "y-axis" are set to "reversed". - outsidetextfont - Sets the font used for `text` lying outside the - bar. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnel.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on - the graph. In the case of having multiple - funnels, percentages & totals are computed - separately (per trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. If "none", no text appears. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `percentInitial`, `percentPrevious`, - `percentTotal`, `label` and `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_funnelarea.py b/plotly/validators/_funnelarea.py index 1785d3b0c5..ca4cac2104 100644 --- a/plotly/validators/_funnelarea.py +++ b/plotly/validators/_funnelarea.py @@ -1,271 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelareaValidator(_plotly_utils.basevalidators.CompoundValidator): +class FunnelareaValidator(_bv.CompoundValidator): def __init__(self, plotly_name="funnelarea", parent_name="", **kwargs): - super(FunnelareaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Funnelarea"), data_docs=kwargs.pop( "data_docs", """ - aspectratio - Sets the ratio between height and width - baseratio - Sets the ratio between bottom length and - maximum top length. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dlabel - Sets the label step. See `label0` for more - info. - domain - :class:`plotly.graph_objects.funnelarea.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.funnelarea.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `label`, `color`, `value`, `text` and - `percent`. Anything contained in tag `` - is displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - label0 - Alternate to `labels`. Builds a numeric set of - labels. Use with `dlabel` where `label0` is the - starting label and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or - simply count occurrences if `values` is not - provided. For other array attributes (including - color) we use the first non-empty entry among - all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud - for `labels`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.funnelarea.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.funnelarea.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - scalegroup - If there are multiple funnelareas that should - be sized according to their totals, link them - by providing a non-empty group id here shared - by every trace in the same group. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.funnelarea.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `label`, `color`, `value`, `text` and - `percent`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - title - :class:`plotly.graph_objects.funnelarea.Title` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we - count occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_heatmap.py b/plotly/validators/_heatmap.py index 40a96d167b..abf429694a 100644 --- a/plotly/validators/_heatmap.py +++ b/plotly/validators/_heatmap.py @@ -1,425 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeatmapValidator(_plotly_utils.basevalidators.CompoundValidator): +class HeatmapValidator(_bv.CompoundValidator): def __init__(self, plotly_name="heatmap", parent_name="", **kwargs): - super(HeatmapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Heatmap"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.heatmap.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data are filled in. - It is defaulted to true if `z` is a one - dimensional array and `zsmooth` is not false; - otherwise it is defaulted to false. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.heatmap.Hoverlabel - ` instance or dict with compatible properties - hoverongaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data have hover - labels associated with them. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.heatmap.Legendgrou - ptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.heatmap.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textfont - Sets the text font. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `x`, `y`, `z` and `text`. - transpose - Transposes the z data. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xgap - Sets the horizontal gap (in pixels) between - bricks. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - xtype - If "array", the heatmap's x coordinates are - given by "x" (the default behavior when `x` is - provided). If "scaled", the heatmap's x - coordinates are given by "x0" and "dx" (the - default behavior when `x` is not provided). - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - ygap - Sets the vertical gap (in pixels) between - bricks. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - ytype - If "array", the heatmap's y coordinates are - given by "y" (the default behavior when `y` is - provided) If "scaled", the heatmap's y - coordinates are given by "y0" and "dy" (the - default behavior when `y` is not provided) - z - Sets the z data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. - zsmooth - Picks a smoothing algorithm use to smooth `z` - data. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_histogram.py b/plotly/validators/_histogram.py index d43f724f6a..ad4612d661 100644 --- a/plotly/validators/_histogram.py +++ b/plotly/validators/_histogram.py @@ -1,417 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistogramValidator(_plotly_utils.basevalidators.CompoundValidator): +class HistogramValidator(_bv.CompoundValidator): def __init__(self, plotly_name="histogram", parent_name="", **kwargs): - super(HistogramValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Histogram"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - autobinx - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobinx` is - not needed. However, we accept `autobinx: true` - or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobiny` is - not needed. However, we accept `autobiny: true` - or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - bingroup - Set a group of histogram traces which will have - compatible bin settings. Note that traces on - the same subplot and with the same - "orientation" under `barmode` "stack", - "relative" and "group" are forced into the same - bingroup, Using `bingroup`, traces under - `barmode` "overlay" and on different axes (of - the same axis type) can have compatible bin - settings. Note that histogram and histogram2d* - trace can share the same `bingroup` - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - cumulative - :class:`plotly.graph_objects.histogram.Cumulati - ve` instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - error_x - :class:`plotly.graph_objects.histogram.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.histogram.ErrorY` - instance or dict with compatible properties - histfunc - Specifies the binning function used for this - histogram trace. If "count", the histogram - values are computed by counting the number of - values lying inside each bin. If "sum", "avg", - "min", "max", the histogram values are computed - using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for - this histogram trace. If "", the span of each - bar corresponds to the number of occurrences - (i.e. the number of data points lying inside - the bins). If "percent" / "probability", the - span of each bar corresponds to the percentage - / fraction of occurrences with respect to the - total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", - the span of each bar corresponds to the number - of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin - AREAS equals the total number of sample - points). If *probability density*, the area of - each bar corresponds to the probability that an - event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.histogram.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variable `binNumber` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.histogram.Legendgr - ouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.histogram.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `ybins.size` is provided. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the - bar. - selected - :class:`plotly.graph_objects.histogram.Selected - ` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.histogram.Stream` - instance or dict with compatible properties - text - Sets hover text elements associated with each - bar. If a single string, the same string - appears over all bars. If an array of string, - the items are mapped in order to the this - trace's coordinates. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the text font. - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. If "none", no text appears. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `label` and `value`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.histogram.Unselect - ed` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the sample data to be binned on the x - axis. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbins - :class:`plotly.graph_objects.histogram.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the sample data to be binned on the y - axis. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybins - :class:`plotly.graph_objects.histogram.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_histogram2d.py b/plotly/validators/_histogram2d.py index d689a688cb..2730a8fe3e 100644 --- a/plotly/validators/_histogram2d.py +++ b/plotly/validators/_histogram2d.py @@ -1,417 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Histogram2DValidator(_plotly_utils.basevalidators.CompoundValidator): +class Histogram2DValidator(_bv.CompoundValidator): def __init__(self, plotly_name="histogram2d", parent_name="", **kwargs): - super(Histogram2DValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Histogram2d"), data_docs=kwargs.pop( "data_docs", """ - autobinx - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobinx` is - not needed. However, we accept `autobinx: true` - or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobiny` is - not needed. However, we accept `autobiny: true` - or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - bingroup - Set the `xbingroup` and `ybingroup` default - prefix For example, setting a `bingroup` of 1 - on two histogram2d traces will make them their - x-bins and y-bins match separately. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram2d.ColorB - ar` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - histfunc - Specifies the binning function used for this - histogram trace. If "count", the histogram - values are computed by counting the number of - values lying inside each bin. If "sum", "avg", - "min", "max", the histogram values are computed - using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for - this histogram trace. If "", the span of each - bar corresponds to the number of occurrences - (i.e. the number of data points lying inside - the bins). If "percent" / "probability", the - span of each bar corresponds to the percentage - / fraction of occurrences with respect to the - total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", - the span of each bar corresponds to the number - of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin - AREAS equals the total number of sample - points). If *probability density*, the area of - each bar corresponds to the probability that an - event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.histogram2d.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variable `z` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.histogram2d.Legend - grouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.histogram2d.Marker - ` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `ybins.size` is provided. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.histogram2d.Stream - ` instance or dict with compatible properties - textfont - Sets the text font. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variable `z` - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the sample data to be binned on the x - axis. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram - `bingroup` - xbins - :class:`plotly.graph_objects.histogram2d.XBins` - instance or dict with compatible properties - xcalendar - Sets the calendar system to use with `x` date - data. - xgap - Sets the horizontal gap (in pixels) between - bricks. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the sample data to be binned on the y - axis. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram - `bingroup` - ybins - :class:`plotly.graph_objects.histogram2d.YBins` - instance or dict with compatible properties - ycalendar - Sets the calendar system to use with `y` date - data. - ygap - Sets the vertical gap (in pixels) between - bricks. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsmooth - Picks a smoothing algorithm use to smooth `z` - data. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_histogram2dcontour.py b/plotly/validators/_histogram2dcontour.py index 2a1ae751cd..f68227e071 100644 --- a/plotly/validators/_histogram2dcontour.py +++ b/plotly/validators/_histogram2dcontour.py @@ -1,439 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Histogram2DcontourValidator(_plotly_utils.basevalidators.CompoundValidator): +class Histogram2DcontourValidator(_bv.CompoundValidator): def __init__(self, plotly_name="histogram2dcontour", parent_name="", **kwargs): - super(Histogram2DcontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Histogram2dContour"), data_docs=kwargs.pop( "data_docs", """ - autobinx - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobinx` is - not needed. However, we accept `autobinx: true` - or `false` and will update `xbins` accordingly - before deleting `autobinx` from the trace. - autobiny - Obsolete: since v1.42 each bin attribute is - auto-determined separately and `autobiny` is - not needed. However, we accept `autobiny: true` - or `false` and will update `ybins` accordingly - before deleting `autobiny` from the trace. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - autocontour - Determines whether or not the contour level - attributes are picked by an algorithm. If True, - the number of contour levels can be set in - `ncontours`. If False, set the contour level - attributes in `contours`. - bingroup - Set the `xbingroup` and `ybingroup` default - prefix For example, setting a `bingroup` of 1 - on two histogram2d traces will make them their - x-bins and y-bins match separately. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram2dcontour - .ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `zmin` and - `zmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - contours - :class:`plotly.graph_objects.histogram2dcontour - .Contours` instance or dict with compatible - properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - histfunc - Specifies the binning function used for this - histogram trace. If "count", the histogram - values are computed by counting the number of - values lying inside each bin. If "sum", "avg", - "min", "max", the histogram values are computed - using the sum, the average, the minimum or the - maximum of the values lying inside each bin - respectively. - histnorm - Specifies the type of normalization used for - this histogram trace. If "", the span of each - bar corresponds to the number of occurrences - (i.e. the number of data points lying inside - the bins). If "percent" / "probability", the - span of each bar corresponds to the percentage - / fraction of occurrences with respect to the - total number of sample points (here, the sum of - all bin HEIGHTS equals 100% / 1). If "density", - the span of each bar corresponds to the number - of occurrences in a bin divided by the size of - the bin interval (here, the sum of all bin - AREAS equals the total number of sample - points). If *probability density*, the area of - each bar corresponds to the probability that an - event will fall into the corresponding bin - (here, the sum of all bin AREAS equals 1). - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.histogram2dcontour - .Hoverlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variable `z` Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.histogram2dcontour - .Legendgrouptitle` instance or dict with - compatible properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.histogram2dcontour - .Line` instance or dict with compatible - properties - marker - :class:`plotly.graph_objects.histogram2dcontour - .Marker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - nbinsx - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `xbins.size` is provided. - nbinsy - Specifies the maximum number of desired bins. - This value will be used in an algorithm that - will decide the optimal bin size such that the - histogram best visualizes the distribution of - the data. Ignored if `ybins.size` is provided. - ncontours - Sets the maximum number of contour levels. The - actual number of contours will be chosen - automatically to be less than or equal to the - value of `ncontours`. Has an effect only if - `autocontour` is True or if `contours.size` is - missing. - opacity - Sets the opacity of the trace. - reversescale - Reverses the color mapping if true. If true, - `zmin` will correspond to the last color in the - array and `zmax` will correspond to the first - color. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.histogram2dcontour - .Stream` instance or dict with compatible - properties - textfont - For this trace it only has an effect if - `coloring` is set to "heatmap". Sets the text - font. - texttemplate - For this trace it only has an effect if - `coloring` is set to "heatmap". Template string - used for rendering the information text that - appear on points. Note that this will override - `textinfo`. Variables are inserted using - %{variable}, for example "y: %{y}". Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `x`, `y`, `z` and `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the sample data to be binned on the x - axis. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xbingroup - Set a group of histogram traces which will have - compatible x-bin settings. Using `xbingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - x-bin settings. Note that the same `xbingroup` - value can be used to set (1D) histogram - `bingroup` - xbins - :class:`plotly.graph_objects.histogram2dcontour - .XBins` instance or dict with compatible - properties - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the sample data to be binned on the y - axis. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ybingroup - Set a group of histogram traces which will have - compatible y-bin settings. Using `ybingroup`, - histogram2d and histogram2dcontour traces (on - axes of the same axis type) can have compatible - y-bin settings. Note that the same `ybingroup` - value can be used to set (1D) histogram - `bingroup` - ybins - :class:`plotly.graph_objects.histogram2dcontour - .YBins` instance or dict with compatible - properties - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the aggregation data. - zauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `z`) or the bounds set in `zmin` and `zmax` - Defaults to `false` when `zmin` and `zmax` are - set by the user. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - zmax - Sets the upper bound of the color domain. Value - should have the same units as in `z` and if - set, `zmin` must be set as well. - zmid - Sets the mid-point of the color domain by - scaling `zmin` and/or `zmax` to be equidistant - to this point. Value should have the same units - as in `z`. Has no effect when `zauto` is - `false`. - zmin - Sets the lower bound of the color domain. Value - should have the same units as in `z` and if - set, `zmax` must be set as well. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_icicle.py b/plotly/validators/_icicle.py index 7cc2802425..0e3edaffd3 100644 --- a/plotly/validators/_icicle.py +++ b/plotly/validators/_icicle.py @@ -1,292 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IcicleValidator(_plotly_utils.basevalidators.CompoundValidator): +class IcicleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="icicle", parent_name="", **kwargs): - super(IcicleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Icicle"), data_docs=kwargs.pop( "data_docs", """ - branchvalues - Determines how the items in `values` are - summed. When set to "total", items in `values` - are taken to be value of all its descendants. - When set to "remainder", items in `values` - corresponding to the root and the branches - sectors are taken to be the extra part not part - of the sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the - "leaves" and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - domain - :class:`plotly.graph_objects.icicle.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.icicle.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud - for `labels`. - leaf - :class:`plotly.graph_objects.icicle.Leaf` - instance or dict with compatible properties - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.icicle.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - level - Sets the level from which this trace hierarchy - is rendered. Set `level` to `''` to start from - the root node in the hierarchy. Must be an "id" - if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - marker - :class:`plotly.graph_objects.icicle.Marker` - instance or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any - given `level`. Set `maxdepth` to "-1" to render - all the levels in the hierarchy. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. This option refers to the root of - the hierarchy presented on top left corner of a - treemap graph. Please note that if a hierarchy - has multiple root nodes, this option won't have - any effect and `insidetextfont` would be used. - parents - Sets the parent sectors for each of the - sectors. Empty string items '' are understood - to reference the root node in the hierarchy. If - `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, - plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud - for `parents`. - pathbar - :class:`plotly.graph_objects.icicle.Pathbar` - instance or dict with compatible properties - root - :class:`plotly.graph_objects.icicle.Root` - instance or dict with compatible properties - sort - Determines whether or not the sectors are - reordered from largest to smallest. - stream - :class:`plotly.graph_objects.icicle.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Sets the positions of the `text` elements. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and - `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - tiling - :class:`plotly.graph_objects.icicle.Tiling` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values associated with each of the - sectors. Use with `branchvalues` to determine - how the values are summed. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_image.py b/plotly/validators/_image.py index 9e0546ce62..e7fbe51e6c 100644 --- a/plotly/validators/_image.py +++ b/plotly/validators/_image.py @@ -1,250 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImageValidator(_plotly_utils.basevalidators.CompoundValidator): +class ImageValidator(_bv.CompoundValidator): def __init__(self, plotly_name="image", parent_name="", **kwargs): - super(ImageValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Image"), data_docs=kwargs.pop( "data_docs", """ - colormodel - Color model used to map the numerical color - components described in `z` into colors. If - `source` is specified, this attribute will be - set to `rgba256` otherwise it defaults to - `rgb`. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Set the pixel's horizontal size. - dy - Set the pixel's vertical size - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.image.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `z`, `color` and `colormodel`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.image.Legendgroupt - itle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - source - Specifies the data URI of the image to be - visualized. The URI consists of - "data:image/[][;base64]," - stream - :class:`plotly.graph_objects.image.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each z - value. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x0 - Set the image's x position. The left edge of - the image (or the right edge if the x axis is - reversed or dx is negative) will be found at - xmin=x0-dx/2 - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - y0 - Set the image's y position. The top edge of the - image (or the bottom edge if the y axis is NOT - reversed or if dy is negative) will be found at - ymin=y0-dy/2. By default when an image trace is - included, the y axis will be reversed so that - the image is right-side-up, but you can disable - this by setting yaxis.autorange=true or by - providing an explicit y axis range. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - z - A 2-dimensional array in which each element is - an array of 3 or 4 numbers representing a - color. - zmax - Array defining the higher bound for each color - component. Note that the default value will - depend on the colormodel. For the `rgb` - colormodel, it is [255, 255, 255]. For the - `rgba` colormodel, it is [255, 255, 255, 1]. - For the `rgba256` colormodel, it is [255, 255, - 255, 255]. For the `hsl` colormodel, it is - [360, 100, 100]. For the `hsla` colormodel, it - is [360, 100, 100, 1]. - zmin - Array defining the lower bound for each color - component. Note that the default value will - depend on the colormodel. For the `rgb` - colormodel, it is [0, 0, 0]. For the `rgba` - colormodel, it is [0, 0, 0, 0]. For the - `rgba256` colormodel, it is [0, 0, 0, 0]. For - the `hsl` colormodel, it is [0, 0, 0]. For the - `hsla` colormodel, it is [0, 0, 0, 0]. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. - zsmooth - Picks a smoothing algorithm used to smooth `z` - data. This only applies for image traces that - use the `source` attribute. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_indicator.py b/plotly/validators/_indicator.py index 4e715e83d5..7ff419f5ac 100644 --- a/plotly/validators/_indicator.py +++ b/plotly/validators/_indicator.py @@ -1,139 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IndicatorValidator(_plotly_utils.basevalidators.CompoundValidator): +class IndicatorValidator(_bv.CompoundValidator): def __init__(self, plotly_name="indicator", parent_name="", **kwargs): - super(IndicatorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Indicator"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the `text` - within the box. Note that this attribute has no - effect if an angular gauge is displayed: in - this case, it is always centered - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - delta - :class:`plotly.graph_objects.indicator.Delta` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.indicator.Domain` - instance or dict with compatible properties - gauge - The gauge of the Indicator plot. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.indicator.Legendgr - ouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines how the value is displayed on the - graph. `number` displays the value numerically - in text. `delta` displays the difference to a - reference value in text. Finally, `gauge` - displays the value graphically on an axis. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - number - :class:`plotly.graph_objects.indicator.Number` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.indicator.Stream` - instance or dict with compatible properties - title - :class:`plotly.graph_objects.indicator.Title` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - value - Sets the number to be displayed. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_isosurface.py b/plotly/validators/_isosurface.py index 004d4dae08..93b7045983 100644 --- a/plotly/validators/_isosurface.py +++ b/plotly/validators/_isosurface.py @@ -1,367 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsosurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): +class IsosurfaceValidator(_bv.CompoundValidator): def __init__(self, plotly_name="isosurface", parent_name="", **kwargs): - super(IsosurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Isosurface"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.isosurface.Caps` - instance or dict with compatible properties - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - `value`) or the bounds set in `cmin` and `cmax` - Defaults to `false` when `cmin` and `cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as `value` and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as `value`. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as `value` and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.isosurface.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - contour - :class:`plotly.graph_objects.isosurface.Contour - ` instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - flatshading - Determines whether or not normal smoothing is - applied to the meshes, creating meshes with an - angular, low-poly look via flat reflections. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.isosurface.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.isosurface.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lighting - :class:`plotly.graph_objects.isosurface.Lightin - g` instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.isosurface.Lightpo - sition` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - slices - :class:`plotly.graph_objects.isosurface.Slices` - instance or dict with compatible properties - spaceframe - :class:`plotly.graph_objects.isosurface.Spacefr - ame` instance or dict with compatible - properties - stream - :class:`plotly.graph_objects.isosurface.Stream` - instance or dict with compatible properties - surface - :class:`plotly.graph_objects.isosurface.Surface - ` instance or dict with compatible properties - text - Sets the text elements associated with the - vertices. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuehoverformat - Sets the hover text formatting rulefor `value` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - valuesrc - Sets the source reference on Chart Studio Cloud - for `value`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the X coordinates of the vertices on X - axis. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the Y coordinates of the vertices on Y - axis. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the Z coordinates of the vertices on Z - axis. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_layout.py b/plotly/validators/_layout.py index 5e29ff17e8..cd09d9aa1d 100644 --- a/plotly/validators/_layout.py +++ b/plotly/validators/_layout.py @@ -1,558 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): +class LayoutValidator(_bv.CompoundValidator): def __init__(self, plotly_name="layout", parent_name="", **kwargs): - super(LayoutValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Layout"), data_docs=kwargs.pop( "data_docs", """ - activeselection - :class:`plotly.graph_objects.layout.Activeselec - tion` instance or dict with compatible - properties - activeshape - :class:`plotly.graph_objects.layout.Activeshape - ` instance or dict with compatible properties - annotations - A tuple of - :class:`plotly.graph_objects.layout.Annotation` - instances or dicts with compatible properties - annotationdefaults - When used in a template (as - layout.template.layout.annotationdefaults), - sets the default property values to use for - elements of layout.annotations - autosize - Determines whether or not a layout width or - height that has been left undefined by the user - is initialized on each relayout. Note that, - regardless of this attribute, an undefined - layout width or height is always initialized on - the first call to plot. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. This is the default value; - however it could be overridden for individual - axes. - barcornerradius - Sets the rounding of bar corners. May be an - integer number of pixels, or a percentage of - bar width (as a string ending in %). - bargap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - bargroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "relative", the bars are stacked - on top of one another, with negative values - below the axis, positive values above With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to reduce "opacity" to - see multiple bars. - barnorm - Sets the normalization for bar traces on the - graph. With "fraction", the value of each bar - is divided by the sum of all values at that - location coordinate. "percent" is the same but - multiplied by 100 to show percentages. - boxgap - Sets the gap (in plot fraction) between boxes - of adjacent location coordinates. Has no effect - on traces that have "width" set. - boxgroupgap - Sets the gap (in plot fraction) between boxes - of the same location coordinate. Has no effect - on traces that have "width" set. - boxmode - Determines how boxes at the same location - coordinate are displayed on the graph. If - "group", the boxes are plotted next to one - another centered around the shared location. If - "overlay", the boxes are plotted over one - another, you might need to set "opacity" to see - them multiple boxes. Has no effect on traces - that have "width" set. - calendar - Sets the default calendar system to use for - interpreting and displaying dates throughout - the plot. - clickmode - Determines the mode of single click - interactions. "event" is the default value and - emits the `plotly_click` event. In addition - this mode emits the `plotly_selected` event in - drag modes "lasso" and "select", but with no - event data attached (kept for compatibility - reasons). The "select" flag enables selecting - single data points via click. This mode also - supports persistent selections, meaning that - pressing Shift while clicking, adds to / - subtracts from an existing selection. "select" - with `hovermode`: "x" can be confusing, - consider explicitly setting `hovermode`: - "closest" when using this feature. Selection - events are sent accordingly as long as "event" - flag is set as well. When the "event" flag is - missing, `plotly_click` and `plotly_selected` - events are not fired. - coloraxis - :class:`plotly.graph_objects.layout.Coloraxis` - instance or dict with compatible properties - colorscale - :class:`plotly.graph_objects.layout.Colorscale` - instance or dict with compatible properties - colorway - Sets the default trace colors. - computed - Placeholder for exporting automargin-impacting - values namely `margin.t`, `margin.b`, - `margin.l` and `margin.r` in "full-json" mode. - datarevision - If provided, a changed value tells - `Plotly.react` that one or more data arrays has - changed. This way you can modify arrays in- - place rather than making a complete new copy - for an incremental change. If NOT provided, - `Plotly.react` assumes that data arrays are - being treated as immutable, thus any data array - with a different identity from its predecessor - contains new data. - dragmode - Determines the mode of drag interactions. - "select" and "lasso" apply only to scatter - traces with markers or text. "orbit" and - "turntable" apply only to 3D scenes. - editrevision - Controls persistence of user-driven changes in - `editable: true` configuration, other than - trace names and axis titles. Defaults to - `layout.uirevision`. - extendfunnelareacolors - If `true`, the funnelarea slice colors (whether - given by `funnelareacolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendiciclecolors - If `true`, the icicle slice colors (whether - given by `iciclecolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendpiecolors - If `true`, the pie slice colors (whether given - by `piecolorway` or inherited from `colorway`) - will be extended to three times its original - length by first repeating every color 20% - lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendsunburstcolors - If `true`, the sunburst slice colors (whether - given by `sunburstcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - extendtreemapcolors - If `true`, the treemap slice colors (whether - given by `treemapcolorway` or inherited from - `colorway`) will be extended to three times its - original length by first repeating every color - 20% lighter then each color 20% darker. This is - intended to reduce the likelihood of reusing - the same color when you have many slices, but - you can set `false` to disable. Colors provided - in the trace, using `marker.colors`, are never - extended. - font - Sets the global font. Note that fonts used in - traces and other layout components inherit from - the global font. - funnelareacolorway - Sets the default funnelarea slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendfunnelareacolors`. - funnelgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - funnelgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - funnelmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "group", the bars are plotted next - to one another centered around the shared - location. With "overlay", the bars are plotted - over one another, you might need to reduce - "opacity" to see multiple bars. - geo - :class:`plotly.graph_objects.layout.Geo` - instance or dict with compatible properties - grid - :class:`plotly.graph_objects.layout.Grid` - instance or dict with compatible properties - height - Sets the plot's height (in px). - hiddenlabels - hiddenlabels is the funnelarea & pie chart - analog of visible:'legendonly' but it can - contain many labels, and can simultaneously - hide slices from several pies/funnelarea charts - hiddenlabelssrc - Sets the source reference on Chart Studio Cloud - for `hiddenlabels`. - hidesources - Determines whether or not a text link citing - the data source is placed at the bottom-right - cored of the figure. Has only an effect only on - graphs that have been generated via forked - graphs from the Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise). - hoverdistance - Sets the default distance (in pixels) to look - for data to add hover labels (-1 means no - cutoff, 0 means no looking for data). This is - only a real distance for hovering on point-like - objects, like scatter points. For area-like - objects (bars, scatter fills, etc) hovering is - on inside the area and off outside, but these - objects will not supersede hover on point-like - objects in case of conflict. - hoverlabel - :class:`plotly.graph_objects.layout.Hoverlabel` - instance or dict with compatible properties - hovermode - Determines the mode of hover interactions. If - "closest", a single hoverlabel will appear for - the "closest" point within the `hoverdistance`. - If "x" (or "y"), multiple hoverlabels will - appear for multiple points at the "closest" x- - (or y-) coordinate within the `hoverdistance`, - with the caveat that no more than one - hoverlabel will appear per trace. If *x - unified* (or *y unified*), a single hoverlabel - will appear multiple points at the closest x- - (or y-) coordinate within the `hoverdistance` - with the caveat that no more than one - hoverlabel will appear per trace. In this mode, - spikelines are enabled by default perpendicular - to the specified axis. If false, hover - interactions are disabled. - hoversubplots - Determines expansion of hover effects to other - subplots If "single" just the axis pair of the - primary point is included without overlaying - subplots. If "overlaying" all subplots using - the main axis and occupying the same space are - included. If "axis", also include stacked - subplots using the same axis when `hovermode` - is set to "x", *x unified*, "y" or *y unified*. - iciclecolorway - Sets the default icicle slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendiciclecolors`. - images - A tuple of - :class:`plotly.graph_objects.layout.Image` - instances or dicts with compatible properties - imagedefaults - When used in a template (as - layout.template.layout.imagedefaults), sets the - default property values to use for elements of - layout.images - legend - :class:`plotly.graph_objects.layout.Legend` - instance or dict with compatible properties - map - :class:`plotly.graph_objects.layout.Map` - instance or dict with compatible properties - mapbox - :class:`plotly.graph_objects.layout.Mapbox` - instance or dict with compatible properties - margin - :class:`plotly.graph_objects.layout.Margin` - instance or dict with compatible properties - meta - Assigns extra meta information that can be used - in various `text` attributes. Attributes such - as the graph, axis and colorbar `title.text`, - annotation `text` `trace.name` in legend items, - `rangeselector`, `updatemenus` and `sliders` - `label` text all support `meta`. One can access - `meta` fields using template strings: - `%{meta[i]}` where `i` is the index of the - `meta` item in question. `meta` can also be an - object for example `{key: value}` which can be - accessed %{meta[key]}. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - minreducedheight - Minimum height of the plot with - margin.automargin applied (in px) - minreducedwidth - Minimum width of the plot with - margin.automargin applied (in px) - modebar - :class:`plotly.graph_objects.layout.Modebar` - instance or dict with compatible properties - newselection - :class:`plotly.graph_objects.layout.Newselectio - n` instance or dict with compatible properties - newshape - :class:`plotly.graph_objects.layout.Newshape` - instance or dict with compatible properties - paper_bgcolor - Sets the background color of the paper where - the graph is drawn. - piecolorway - Sets the default pie slice colors. Defaults to - the main `colorway` used for trace colors. If - you specify a new list here it can still be - extended with lighter and darker colors, see - `extendpiecolors`. - plot_bgcolor - Sets the background color of the plotting area - in-between x and y axes. - polar - :class:`plotly.graph_objects.layout.Polar` - instance or dict with compatible properties - scattergap - Sets the gap (in plot fraction) between scatter - points of adjacent location coordinates. - Defaults to `bargap`. - scattermode - Determines how scatter points at the same - location coordinate are displayed on the graph. - With "group", the scatter points are plotted - next to one another centered around the shared - location. With "overlay", the scatter points - are plotted over one another, you might need to - reduce "opacity" to see multiple scatter - points. - scene - :class:`plotly.graph_objects.layout.Scene` - instance or dict with compatible properties - selectdirection - When `dragmode` is set to "select", this limits - the selection of the drag to horizontal, - vertical or diagonal. "h" only allows - horizontal selection, "v" only vertical, "d" - only diagonal and "any" sets no limit. - selectionrevision - Controls persistence of user-driven changes in - selected points from all traces. - selections - A tuple of - :class:`plotly.graph_objects.layout.Selection` - instances or dicts with compatible properties - selectiondefaults - When used in a template (as - layout.template.layout.selectiondefaults), sets - the default property values to use for elements - of layout.selections - separators - Sets the decimal and thousand separators. For - example, *. * puts a '.' before decimals and a - space between thousands. In English locales, - dflt is ".," but other locales may alter this - default. - shapes - A tuple of - :class:`plotly.graph_objects.layout.Shape` - instances or dicts with compatible properties - shapedefaults - When used in a template (as - layout.template.layout.shapedefaults), sets the - default property values to use for elements of - layout.shapes - showlegend - Determines whether or not a legend is drawn. - Default is `true` if there is a trace to show - and any of these: a) Two or more traces would - by default be shown in the legend. b) One pie - trace is shown in the legend. c) One trace is - explicitly given with `showlegend: true`. - sliders - A tuple of - :class:`plotly.graph_objects.layout.Slider` - instances or dicts with compatible properties - sliderdefaults - When used in a template (as - layout.template.layout.sliderdefaults), sets - the default property values to use for elements - of layout.sliders - smith - :class:`plotly.graph_objects.layout.Smith` - instance or dict with compatible properties - spikedistance - Sets the default distance (in pixels) to look - for data to draw spikelines to (-1 means no - cutoff, 0 means no looking for data). As with - hoverdistance, distance does not apply to area- - like objects. In addition, some objects can be - hovered on but will not generate spikelines, - such as scatter fills. - sunburstcolorway - Sets the default sunburst slice colors. - Defaults to the main `colorway` used for trace - colors. If you specify a new list here it can - still be extended with lighter and darker - colors, see `extendsunburstcolors`. - template - Default attributes to be applied to the plot. - This should be a dict with format: `{'layout': - layoutTemplate, 'data': {trace_type: - [traceTemplate, ...], ...}}` where - `layoutTemplate` is a dict matching the - structure of `figure.layout` and - `traceTemplate` is a dict matching the - structure of the trace with type `trace_type` - (e.g. 'scatter'). Alternatively, this may be - specified as an instance of - plotly.graph_objs.layout.Template. Trace - templates are applied cyclically to traces of - each type. Container arrays (eg `annotations`) - have special handling: An object ending in - `defaults` (eg `annotationdefaults`) is applied - to each array item. But if an item has a - `templateitemname` key we look in the template - array for an item with matching `name` and - apply that instead. If no matching `name` is - found we mark the item invisible. Any named - template item not referenced is appended to the - end of the array, so this can be used to add a - watermark annotation or a logo image, for - example. To omit one of these items on the - plot, make an item with matching - `templateitemname` and `visible: false`. - ternary - :class:`plotly.graph_objects.layout.Ternary` - instance or dict with compatible properties - title - :class:`plotly.graph_objects.layout.Title` - instance or dict with compatible properties - transition - Sets transition options used during - Plotly.react updates. - treemapcolorway - Sets the default treemap slice colors. Defaults - to the main `colorway` used for trace colors. - If you specify a new list here it can still be - extended with lighter and darker colors, see - `extendtreemapcolors`. - uirevision - Used to allow user interactions with the plot - to persist after `Plotly.react` calls that are - unaware of these interactions. If `uirevision` - is omitted, or if it is given and it changed - from the previous `Plotly.react` call, the - exact new figure is used. If `uirevision` is - truthy and did NOT change, any attribute that - has been affected by user interactions and did - not receive a different value in the new figure - will keep the interaction value. - `layout.uirevision` attribute serves as the - default for `uirevision` attributes in various - sub-containers. For finer control you can set - these sub-attributes directly. For example, if - your app separately controls the data on the x - and y axes you might set - `xaxis.uirevision=*time*` and - `yaxis.uirevision=*cost*`. Then if only the y - data is changed, you can update - `yaxis.uirevision=*quantity*` and the y axis - range will reset but the x axis range will - retain any user-driven zoom. - uniformtext - :class:`plotly.graph_objects.layout.Uniformtext - ` instance or dict with compatible properties - updatemenus - A tuple of - :class:`plotly.graph_objects.layout.Updatemenu` - instances or dicts with compatible properties - updatemenudefaults - When used in a template (as - layout.template.layout.updatemenudefaults), - sets the default property values to use for - elements of layout.updatemenus - violingap - Sets the gap (in plot fraction) between violins - of adjacent location coordinates. Has no effect - on traces that have "width" set. - violingroupgap - Sets the gap (in plot fraction) between violins - of the same location coordinate. Has no effect - on traces that have "width" set. - violinmode - Determines how violins at the same location - coordinate are displayed on the graph. If - "group", the violins are plotted next to one - another centered around the shared location. If - "overlay", the violins are plotted over one - another, you might need to set "opacity" to see - them multiple violins. Has no effect on traces - that have "width" set. - waterfallgap - Sets the gap (in plot fraction) between bars of - adjacent location coordinates. - waterfallgroupgap - Sets the gap (in plot fraction) between bars of - the same location coordinate. - waterfallmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "group", the bars are plotted next to one - another centered around the shared location. - With "overlay", the bars are plotted over one - another, you might need to reduce "opacity" to - see multiple bars. - width - Sets the plot's width (in px). - xaxis - :class:`plotly.graph_objects.layout.XAxis` - instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.YAxis` - instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/_mesh3d.py b/plotly/validators/_mesh3d.py index 6f2ba240a8..b10746b428 100644 --- a/plotly/validators/_mesh3d.py +++ b/plotly/validators/_mesh3d.py @@ -1,445 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Mesh3DValidator(_plotly_utils.basevalidators.CompoundValidator): +class Mesh3DValidator(_bv.CompoundValidator): def __init__(self, plotly_name="mesh3d", parent_name="", **kwargs): - super(Mesh3DValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Mesh3d"), data_docs=kwargs.pop( "data_docs", """ - alphahull - Determines how the mesh surface triangles are - derived from the set of vertices (points) - represented by the `x`, `y` and `z` arrays, if - the `i`, `j`, `k` arrays are not supplied. For - general use of `mesh3d` it is preferred that - `i`, `j`, `k` are supplied. If "-1", Delaunay - triangulation is used, which is mainly suitable - if the mesh is a single, more or less layer - surface that is perpendicular to - `delaunayaxis`. In case the `delaunayaxis` - intersects the mesh surface at more than one - point it will result triangles that are very - long in the dimension of `delaunayaxis`. If - ">0", the alpha-shape algorithm is used. In - this case, the positive `alphahull` value - signals the use of the alpha-shape algorithm, - _and_ its value acts as the parameter for the - mesh fitting. If 0, the convex-hull algorithm - is used. It is suitable for convex bodies or if - the intention is to enclose the `x`, `y` and - `z` point set into a convex hull. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - `intensity`) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as `intensity` and - if set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as `intensity`. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as `intensity` and - if set, `cmax` must be set as well. - color - Sets the color of the whole mesh - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.mesh3d.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - contour - :class:`plotly.graph_objects.mesh3d.Contour` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - delaunayaxis - Sets the Delaunay axis, which is the axis that - is perpendicular to the surface of the Delaunay - triangulation. It has an effect if `i`, `j`, - `k` are not provided and `alphahull` is set to - indicate Delaunay triangulation. - facecolor - Sets the color of each face Overrides "color" - and "vertexcolor". - facecolorsrc - Sets the source reference on Chart Studio Cloud - for `facecolor`. - flatshading - Determines whether or not normal smoothing is - applied to the meshes, creating meshes with an - angular, low-poly look via flat reflections. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.mesh3d.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - i - A vector of vertex indices, i.e. integer values - between 0 and the length of the vertex vectors, - representing the "first" vertex of a triangle. - For example, `{i[m], j[m], k[m]}` together - represent face m (triangle m) in the mesh, - where `i[m] = n` points to the triplet `{x[n], - y[n], z[n]}` in the vertex arrays. Therefore, - each element in `i` represents a point in - space, which is the first vertex of a triangle. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - intensity - Sets the intensity values for vertices or cells - as defined by `intensitymode`. It can be used - for plotting fields on meshes. - intensitymode - Determines the source of `intensity` values. - intensitysrc - Sets the source reference on Chart Studio Cloud - for `intensity`. - isrc - Sets the source reference on Chart Studio Cloud - for `i`. - j - A vector of vertex indices, i.e. integer values - between 0 and the length of the vertex vectors, - representing the "second" vertex of a triangle. - For example, `{i[m], j[m], k[m]}` together - represent face m (triangle m) in the mesh, - where `j[m] = n` points to the triplet `{x[n], - y[n], z[n]}` in the vertex arrays. Therefore, - each element in `j` represents a point in - space, which is the second vertex of a - triangle. - jsrc - Sets the source reference on Chart Studio Cloud - for `j`. - k - A vector of vertex indices, i.e. integer values - between 0 and the length of the vertex vectors, - representing the "third" vertex of a triangle. - For example, `{i[m], j[m], k[m]}` together - represent face m (triangle m) in the mesh, - where `k[m] = n` points to the triplet `{x[n], - y[n], z[n]}` in the vertex arrays. Therefore, - each element in `k` represents a point in - space, which is the third vertex of a triangle. - ksrc - Sets the source reference on Chart Studio Cloud - for `k`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.mesh3d.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lighting - :class:`plotly.graph_objects.mesh3d.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.mesh3d.Lightpositi - on` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.mesh3d.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with the - vertices. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - vertexcolor - Sets the color of each vertex Overrides - "color". While Red, green and blue colors are - in the range of 0 and 255; in the case of - having vertex color data in RGBA format, the - alpha color should be normalized to be between - 0 and 1. - vertexcolorsrc - Sets the source reference on Chart Studio Cloud - for `vertexcolor`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the X coordinates of the vertices. The nth - element of vectors `x`, `y` and `z` jointly - represent the X, Y and Z coordinates of the nth - vertex. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the Y coordinates of the vertices. The nth - element of vectors `x`, `y` and `z` jointly - represent the X, Y and Z coordinates of the nth - vertex. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the Z coordinates of the vertices. The nth - element of vectors `x`, `y` and `z` jointly - represent the X, Y and Z coordinates of the nth - vertex. - zcalendar - Sets the calendar system to use with `z` date - data. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_ohlc.py b/plotly/validators/_ohlc.py index ee7fc6c29f..06d5baf53e 100644 --- a/plotly/validators/_ohlc.py +++ b/plotly/validators/_ohlc.py @@ -1,264 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OhlcValidator(_plotly_utils.basevalidators.CompoundValidator): +class OhlcValidator(_bv.CompoundValidator): def __init__(self, plotly_name="ohlc", parent_name="", **kwargs): - super(OhlcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Ohlc"), data_docs=kwargs.pop( "data_docs", """ - close - Sets the close values. - closesrc - Sets the source reference on Chart Studio Cloud - for `close`. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - decreasing - :class:`plotly.graph_objects.ohlc.Decreasing` - instance or dict with compatible properties - high - Sets the high values. - highsrc - Sets the source reference on Chart Studio Cloud - for `high`. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.ohlc.Hoverlabel` - instance or dict with compatible properties - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - increasing - :class:`plotly.graph_objects.ohlc.Increasing` - instance or dict with compatible properties - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.ohlc.Legendgroupti - tle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.ohlc.Line` - instance or dict with compatible properties - low - Sets the low values. - lowsrc - Sets the source reference on Chart Studio Cloud - for `low`. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - open - Sets the open values. - opensrc - Sets the source reference on Chart Studio Cloud - for `open`. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.ohlc.Stream` - instance or dict with compatible properties - text - Sets hover text elements associated with each - sample point. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to this trace's sample points. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - tickwidth - Sets the width of the open/close tick marks - relative to the "x" minimal interval. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. If absent, linear - coordinate will be generated. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_parcats.py b/plotly/validators/_parcats.py index d92f9337e3..8ef2eaa644 100644 --- a/plotly/validators/_parcats.py +++ b/plotly/validators/_parcats.py @@ -1,170 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParcatsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ParcatsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="parcats", parent_name="", **kwargs): - super(ParcatsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Parcats"), data_docs=kwargs.pop( "data_docs", """ - arrangement - Sets the drag interaction mode for categories - and dimensions. If `perpendicular`, the - categories can only move along a line - perpendicular to the paths. If `freeform`, the - categories can freely move on the plane. If - `fixed`, the categories and dimensions are - stationary. - bundlecolors - Sort paths so that like colors are bundled - together within each category. - counts - The number of observations represented by each - state. Defaults to 1 so that each state - represents one observation - countssrc - Sets the source reference on Chart Studio Cloud - for `counts`. - dimensions - The dimensions (variables) of the parallel - categories diagram. - dimensiondefaults - When used in a template (as layout.template.dat - a.parcats.dimensiondefaults), sets the default - property values to use for elements of - parcats.dimensions - domain - :class:`plotly.graph_objects.parcats.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoveron - Sets the hover interaction mode for the parcats - diagram. If `category`, hover interaction take - place per category. If `color`, hover - interactions take place per color per category. - If `dimension`, hover interactions take place - across all categories per dimension. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - This value here applies when hovering over - dimensions. Note that `*categorycount`, - "colorcount" and "bandcolorcount" are only - available when `hoveron` contains the "color" - flagFinally, the template string has access to - variables `count`, `probability`, `category`, - `categorycount`, `colorcount` and - `bandcolorcount`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - labelfont - Sets the font for the `dimension` labels. - legendgrouptitle - :class:`plotly.graph_objects.parcats.Legendgrou - ptitle` instance or dict with compatible - properties - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.parcats.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - sortpaths - Sets the path sorting algorithm. If `forward`, - sort paths based on dimension categories from - left to right. If `backward`, sort paths based - on dimensions categories from right to left. - stream - :class:`plotly.graph_objects.parcats.Stream` - instance or dict with compatible properties - tickfont - Sets the font for the `category` labels. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_parcoords.py b/plotly/validators/_parcoords.py index 0b588926f4..8e24f12445 100644 --- a/plotly/validators/_parcoords.py +++ b/plotly/validators/_parcoords.py @@ -1,150 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParcoordsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ParcoordsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="parcoords", parent_name="", **kwargs): - super(ParcoordsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Parcoords"), data_docs=kwargs.pop( "data_docs", """ - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dimensions - The dimensions (variables) of the parallel - coordinates chart. 2..60 dimensions are - supported. - dimensiondefaults - When used in a template (as layout.template.dat - a.parcoords.dimensiondefaults), sets the - default property values to use for elements of - parcoords.dimensions - domain - :class:`plotly.graph_objects.parcoords.Domain` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - labelangle - Sets the angle of the labels with respect to - the horizontal. For example, a `tickangle` of - -90 draws the labels vertically. Tilted labels - with "labelangle" may be positioned better - inside margins when `labelposition` is set to - "bottom". - labelfont - Sets the font for the `dimension` labels. - labelside - Specifies the location of the `label`. "top" - positions labels above, next to the title - "bottom" positions labels below the graph - Tilted labels with "labelangle" may be - positioned better inside margins when - `labelposition` is set to "bottom". - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.parcoords.Legendgr - ouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.parcoords.Line` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - rangefont - Sets the font for the `dimension` range values. - stream - :class:`plotly.graph_objects.parcoords.Stream` - instance or dict with compatible properties - tickfont - Sets the font for the `dimension` tick values. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.parcoords.Unselect - ed` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_pie.py b/plotly/validators/_pie.py index 38f6f99da8..79e5537799 100644 --- a/plotly/validators/_pie.py +++ b/plotly/validators/_pie.py @@ -1,302 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PieValidator(_plotly_utils.basevalidators.CompoundValidator): +class PieValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pie", parent_name="", **kwargs): - super(PieValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pie"), data_docs=kwargs.pop( "data_docs", """ - automargin - Determines whether outside text labels can push - the margins. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - direction - Specifies the direction at which succeeding - sectors follow one another. - dlabel - Sets the label step. See `label0` for more - info. - domain - :class:`plotly.graph_objects.pie.Domain` - instance or dict with compatible properties - hole - Sets the fraction of the radius to cut out of - the pie. Use this to make a donut chart. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.pie.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `label`, `color`, `value`, `percent` - and `text`. Anything contained in tag `` - is displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - insidetextorientation - Controls the orientation of the text inside - chart sectors. When set to "auto", text may be - oriented in any direction in order to be as big - as possible in the middle of a sector. The - "horizontal" option orients text to be parallel - with the bottom of the chart, and may make text - smaller in order to achieve that goal. The - "radial" option orients text along the radius - of the sector. The "tangential" option orients - text perpendicular to the radius of the sector. - label0 - Alternate to `labels`. Builds a numeric set of - labels. Use with `dlabel` where `label0` is the - starting label and `dlabel` the step. - labels - Sets the sector labels. If `labels` entries are - duplicated, we sum associated `values` or - simply count occurrences if `values` is not - provided. For other array attributes (including - color) we use the first non-empty entry among - all occurrences of the label. - labelssrc - Sets the source reference on Chart Studio Cloud - for `labels`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.pie.Legendgrouptit - le` instance or dict with compatible properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.pie.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. - pull - Sets the fraction of larger radius to pull the - sectors out from the center. This can be a - constant to pull all slices apart from each - other equally or an array to highlight one or - more slices. - pullsrc - Sets the source reference on Chart Studio Cloud - for `pull`. - rotation - Instead of the first slice starting at 12 - o'clock, rotate to some other angle. - scalegroup - If there are multiple pie charts that should be - sized according to their totals, link them by - providing a non-empty group id here shared by - every trace in the same group. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - sort - Determines whether or not the sectors are - reordered from largest to smallest. - stream - :class:`plotly.graph_objects.pie.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Specifies the location of the `textinfo`. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `label`, `color`, `value`, `percent` and - `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - title - :class:`plotly.graph_objects.pie.Title` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values of the sectors. If omitted, we - count occurrences of each label. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_sankey.py b/plotly/validators/_sankey.py index 979fd89e92..0b543beaac 100644 --- a/plotly/validators/_sankey.py +++ b/plotly/validators/_sankey.py @@ -1,163 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SankeyValidator(_plotly_utils.basevalidators.CompoundValidator): +class SankeyValidator(_bv.CompoundValidator): def __init__(self, plotly_name="sankey", parent_name="", **kwargs): - super(SankeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Sankey"), data_docs=kwargs.pop( "data_docs", """ - arrangement - If value is `snap` (the default), the node - arrangement is assisted by automatic snapping - of elements to preserve space between nodes - specified via `nodepad`. If value is - `perpendicular`, the nodes can only move along - a line perpendicular to the flow. If value is - `freeform`, the nodes can freely move on the - plane. If value is `fixed`, the nodes are - stationary. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - domain - :class:`plotly.graph_objects.sankey.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. Note that this attribute is superseded - by `node.hoverinfo` and `node.hoverinfo` for - nodes and links respectively. - hoverlabel - :class:`plotly.graph_objects.sankey.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.sankey.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - link - The links of the Sankey plot. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - node - The nodes of the Sankey plot. - orientation - Sets the orientation of the Sankey diagram. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - stream - :class:`plotly.graph_objects.sankey.Stream` - instance or dict with compatible properties - textfont - Sets the font for node labels - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - valueformat - Sets the value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - valuesuffix - Adds a unit to follow the value in the hover - tooltip. Add a space if a separation is - necessary from the value. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scatter.py b/plotly/validators/_scatter.py index 8c492af138..92eec06e5a 100644 --- a/plotly/validators/_scatter.py +++ b/plotly/validators/_scatter.py @@ -1,489 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScatterValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scatter", parent_name="", **kwargs): - super(ScatterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatter"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - error_x - :class:`plotly.graph_objects.scatter.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter.ErrorY` - instance or dict with compatible properties - fill - Sets the area to fill with a solid color. - Defaults to "none" unless this trace is - stacked, then it gets "tonexty" ("tonextx") if - `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to - x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this - trace and the endpoints of the trace before it, - connecting those endpoints with straight lines - (to make a stacked area graph); if there is no - trace before it, they behave like "tozerox" and - "tozeroy". "toself" connects the endpoints of - the trace (or each segment of the trace if it - has gaps) into a closed shape. "tonext" fills - the space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. Traces - in a `stackgroup` will only fill to (or be - filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked - and some not, if fill-linked traces are not - already consecutive, the later ones will be - pushed down in the drawing order. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. If fillgradient is specified, - fillcolor is ignored except for setting the - background color of the hover label, if any. - fillgradient - Sets a fill gradient. If not specified, the - fillcolor is used instead. - fillpattern - Sets the pattern within the marker. - groupnorm - Only relevant when `stackgroup` is used, and - only the first `groupnorm` found in the - `stackgroup` will be used - including if - `visible` is "legendonly" but not if it is - `false`. Sets the normalization for the sum of - this `stackgroup`. With "fraction", the value - of each trace at each location is divided by - the sum of all trace values at that location. - "percent" is the same but multiplied by 100 to - show percentages. If there are multiple - subplots, or multiple `stackgroup`s on one - subplot, each will be normalized within its own - set. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scatter.Hoverlabel - ` instance or dict with compatible properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scatter.Legendgrou - ptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scatter.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatter.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Only relevant in the following cases: 1. when - `scattermode` is set to "group". 2. when - `stackgroup` is used, and only the first - `orientation` found in the `stackgroup` will be - used - including if `visible` is "legendonly" - but not if it is `false`. Sets the stacking - direction. With "v" ("h"), the y (x) values of - subsequent traces are added. Also affects the - default value of `fill`. - selected - :class:`plotly.graph_objects.scatter.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stackgaps - Only relevant when `stackgroup` is used, and - only the first `stackgaps` found in the - `stackgroup` will be used - including if - `visible` is "legendonly" but not if it is - `false`. Determines how we handle locations at - which other traces in this group have data but - this one does not. With *infer zero* we insert - a zero at these locations. With "interpolate" - we linearly interpolate between existing - values, and extrapolate a constant beyond the - existing values. - stackgroup - Set several scatter traces (on the same - subplot) to the same stackgroup in order to add - their y values (or their x values if - `orientation` is "h"). If blank or omitted this - trace will not be stacked. Stacking also turns - `fill` on by default, using "tonexty" - ("tonextx") if `orientation` is "h" ("v") and - sets the default `mode` to "lines" irrespective - of point count. You can only stack on a numeric - (linear or log) axis. Traces in a `stackgroup` - will only fill to (or be filled to) other - traces in the same group. With multiple - `stackgroup`s or some traces stacked and some - not, if fill-linked traces are not already - consecutive, the later ones will be pushed down - in the drawing order. - stream - :class:`plotly.graph_objects.scatter.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatter.Unselected - ` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_scatter3d.py b/plotly/validators/_scatter3d.py index 1c7b6b16a9..ca6ce91ef9 100644 --- a/plotly/validators/_scatter3d.py +++ b/plotly/validators/_scatter3d.py @@ -1,333 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Scatter3DValidator(_plotly_utils.basevalidators.CompoundValidator): +class Scatter3DValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scatter3d", parent_name="", **kwargs): - super(Scatter3DValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatter3d"), data_docs=kwargs.pop( "data_docs", """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - error_x - :class:`plotly.graph_objects.scatter3d.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.scatter3d.ErrorY` - instance or dict with compatible properties - error_z - :class:`plotly.graph_objects.scatter3d.ErrorZ` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scatter3d.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y,z) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scatter3d.Legendgr - ouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scatter3d.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatter3d.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - projection - :class:`plotly.graph_objects.scatter3d.Projecti - on` instance or dict with compatible properties - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatter3d.Stream` - instance or dict with compatible properties - surfaceaxis - If "-1", the scatter points are not fill with a - surface If 0, 1, 2, the scatter points are - filled with a Delaunay surface about the x, y, - z respectively. - surfacecolor - Sets the surface fill color. - text - Sets text elements associated with each (x,y,z) - triplet. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y,z) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date - data. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_scattercarpet.py b/plotly/validators/_scattercarpet.py index 949b7097d1..ddd9c6aac2 100644 --- a/plotly/validators/_scattercarpet.py +++ b/plotly/validators/_scattercarpet.py @@ -1,313 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattercarpetValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScattercarpetValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scattercarpet", parent_name="", **kwargs): - super(ScattercarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattercarpet"), data_docs=kwargs.pop( "data_docs", """ - a - Sets the a-axis coordinates. - asrc - Sets the source reference on Chart Studio Cloud - for `a`. - b - Sets the b-axis coordinates. - bsrc - Sets the source reference on Chart Studio Cloud - for `b`. - carpet - An identifier for this carpet, so that - `scattercarpet` and `contourcarpet` traces can - specify a carpet plot on which they lie - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scatterternary - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scattercarpet.Hove - rlabel` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (a,b) point. If a single string, the same - string appears over all the data points. If an - array of strings, the items are mapped in order - to the the data points in (a,b). To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scattercarpet.Lege - ndgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scattercarpet.Line - ` instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattercarpet.Mark - er` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattercarpet.Sele - cted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattercarpet.Stre - am` instance or dict with compatible properties - text - Sets text elements associated with each (a,b) - point. If a single string, the same string - appears over all the data points. If an array - of strings, the items are mapped in order to - the the data points in (a,b). If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `a`, `b` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattercarpet.Unse - lected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_scattergeo.py b/plotly/validators/_scattergeo.py index 7774080183..ec82512081 100644 --- a/plotly/validators/_scattergeo.py +++ b/plotly/validators/_scattergeo.py @@ -1,320 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattergeoValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScattergeoValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scattergeo", parent_name="", **kwargs): - super(ScattergeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattergeo"), data_docs=kwargs.pop( "data_docs", """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - featureidkey - Sets the key in GeoJSON features which is used - as id to match the items included in the - `locations` array. Only has an effect when - `geojson` is set. Support nested property, for - example "properties.name". - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". "toself" - connects the endpoints of the trace (or each - segment of the trace if it has gaps) into a - closed shape. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - geo - Sets a reference between this trace's - geospatial coordinates and a geographic map. If - "geo" (the default value), the geospatial - coordinates refer to `layout.geo`. If "geo2", - the geospatial coordinates refer to - `layout.geo2`, and so on. - geojson - Sets optional GeoJSON data associated with this - trace. If not given, the features on the base - map are used when `locations` is set. It can be - set as a valid GeoJSON object or as a URL - string. Note that we only accept GeoJSONs of - type "FeatureCollection" or "Feature" with - geometries of type "Polygon" or "MultiPolygon". - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scattergeo.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (lon,lat) pair or item in `locations`. If a - single string, the same string appears over all - the data points. If an array of string, the - items are mapped in order to the this trace's - (lon,lat) or `locations` coordinates. To be - seen, trace `hoverinfo` must contain a "text" - flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for `lat`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scattergeo.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scattergeo.Line` - instance or dict with compatible properties - locationmode - Determines the set of locations used to match - entries in `locations` to regions on the map. - Values "ISO-3", "USA-states", *country names* - correspond to features on the base map and - value "geojson-id" corresponds to features from - a custom GeoJSON linked to the `geojson` - attribute. - locations - Sets the coordinates via location IDs or names. - Coordinates correspond to the centroid of each - location given. See `locationmode` for more - info. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for `lon`. - marker - :class:`plotly.graph_objects.scattergeo.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergeo.Selecte - d` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergeo.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each - (lon,lat) pair or item in `locations`. If a - single string, the same string appears over all - the data points. If an array of string, the - items are mapped in order to the this trace's - (lon,lat) or `locations` coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `lat`, `lon`, `location` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergeo.Unselec - ted` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scattergl.py b/plotly/validators/_scattergl.py index 6de1be4c2e..0637bcce23 100644 --- a/plotly/validators/_scattergl.py +++ b/plotly/validators/_scattergl.py @@ -1,395 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterglValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScatterglValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scattergl", parent_name="", **kwargs): - super(ScatterglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattergl"), data_docs=kwargs.pop( "data_docs", """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - error_x - :class:`plotly.graph_objects.scattergl.ErrorX` - instance or dict with compatible properties - error_y - :class:`plotly.graph_objects.scattergl.ErrorY` - instance or dict with compatible properties - fill - Sets the area to fill with a solid color. - Defaults to "none" unless this trace is - stacked, then it gets "tonexty" ("tonextx") if - `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to - x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this - trace and the endpoints of the trace before it, - connecting those endpoints with straight lines - (to make a stacked area graph); if there is no - trace before it, they behave like "tozerox" and - "tozeroy". "toself" connects the endpoints of - the trace (or each segment of the trace if it - has gaps) into a closed shape. "tonext" fills - the space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. Traces - in a `stackgroup` will only fill to (or be - filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked - and some not, if fill-linked traces are not - already consecutive, the later ones will be - pushed down in the drawing order. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scattergl.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scattergl.Legendgr - ouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scattergl.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattergl.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattergl.Selected - ` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattergl.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattergl.Unselect - ed` instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. """, ), **kwargs, diff --git a/plotly/validators/_scattermap.py b/plotly/validators/_scattermap.py index de6a4905eb..1ad1ec36ad 100644 --- a/plotly/validators/_scattermap.py +++ b/plotly/validators/_scattermap.py @@ -1,295 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattermapValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScattermapValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scattermap", parent_name="", **kwargs): - super(ScattermapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattermap"), data_docs=kwargs.pop( "data_docs", """ - below - Determines if this scattermap trace's layers - are to be inserted before the layer with the - specified ID. By default, scattermap layers are - inserted above all the base layers. To place - the scattermap layers above every other layer, - set `below` to "''". - cluster - :class:`plotly.graph_objects.scattermap.Cluster - ` instance or dict with compatible properties - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". "toself" - connects the endpoints of the trace (or each - segment of the trace if it has gaps) into a - closed shape. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scattermap.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. To - be seen, trace `hoverinfo` must contain a - "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for `lat`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scattermap.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scattermap.Line` - instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for `lon`. - marker - :class:`plotly.graph_objects.scattermap.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattermap.Selecte - d` instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattermap.Stream` - instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a map subplot. If "map" (the - default value), the data refer to `layout.map`. - If "map2", the data refer to `layout.map2`, and - so on. - text - Sets text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the icon text font - (color=map.layer.paint.text-color, - size=map.layer.layout.text-size). Has an effect - only when `type` is set to "symbol". - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `lat`, `lon` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattermap.Unselec - ted` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scattermapbox.py b/plotly/validators/_scattermapbox.py index 7868cc8772..8684a88ce5 100644 --- a/plotly/validators/_scattermapbox.py +++ b/plotly/validators/_scattermapbox.py @@ -1,303 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScattermapboxValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs): - super(ScattermapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattermapbox"), data_docs=kwargs.pop( "data_docs", """ - below - Determines if this scattermapbox trace's layers - are to be inserted before the layer with the - specified ID. By default, scattermapbox layers - are inserted above all the base layers. To - place the scattermapbox layers above every - other layer, set `below` to "''". - cluster - :class:`plotly.graph_objects.scattermapbox.Clus - ter` instance or dict with compatible - properties - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". "toself" - connects the endpoints of the trace (or each - segment of the trace if it has gaps) into a - closed shape. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scattermapbox.Hove - rlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. To - be seen, trace `hoverinfo` must contain a - "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - lat - Sets the latitude coordinates (in degrees - North). - latsrc - Sets the source reference on Chart Studio Cloud - for `lat`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scattermapbox.Lege - ndgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scattermapbox.Line - ` instance or dict with compatible properties - lon - Sets the longitude coordinates (in degrees - East). - lonsrc - Sets the source reference on Chart Studio Cloud - for `lon`. - marker - :class:`plotly.graph_objects.scattermapbox.Mark - er` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scattermapbox.Sele - cted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattermapbox.Stre - am` instance or dict with compatible properties - subplot - mapbox subplots and traces are deprecated! - Please consider switching to `map` subplots and - traces. Learn more at: - https://plotly.com/python/maplibre-migration/ - as well as - https://plotly.com/javascript/maplibre- - migration/ Sets a reference between this - trace's data coordinates and a mapbox subplot. - If "mapbox" (the default value), the data refer - to `layout.mapbox`. If "mapbox2", the data - refer to `layout.mapbox2`, and so on. - text - Sets text elements associated with each - (lon,lat) pair If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (lon,lat) coordinates. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the icon text font - (color=mapbox.layer.paint.text-color, - size=mapbox.layer.layout.text-size). Has an - effect only when `type` is set to "symbol". - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `lat`, `lon` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattermapbox.Unse - lected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scatterpolar.py b/plotly/validators/_scatterpolar.py index be7cf43733..f2165018d2 100644 --- a/plotly/validators/_scatterpolar.py +++ b/plotly/validators/_scatterpolar.py @@ -1,322 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterpolarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScatterpolarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scatterpolar", parent_name="", **kwargs): - super(ScatterpolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatterpolar"), data_docs=kwargs.pop( "data_docs", """ - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period - divided by the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scatterpolar - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scatterpolar.Hover - label` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scatterpolar.Legen - dgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scatterpolar.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolar.Marke - r` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the - starting coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud - for `r`. - selected - :class:`plotly.graph_objects.scatterpolar.Selec - ted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolar.Strea - m` instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a polar subplot. If "polar" - (the default value), the data refer to - `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `r`, `theta` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of - theta coordinates. Use with `dtheta` where - `theta0` is the starting coordinate and - `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud - for `theta`. - thetaunit - Sets the unit of input "theta" values. Has an - effect only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolar.Unsel - ected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scatterpolargl.py b/plotly/validators/_scatterpolargl.py index 2bc3598169..7d9755b7cf 100644 --- a/plotly/validators/_scatterpolargl.py +++ b/plotly/validators/_scatterpolargl.py @@ -1,325 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterpolarglValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScatterpolarglValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scatterpolargl", parent_name="", **kwargs): - super(ScatterpolarglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatterpolargl"), data_docs=kwargs.pop( "data_docs", """ - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - dr - Sets the r coordinate step. - dtheta - Sets the theta coordinate step. By default, the - `dtheta` step equals the subplot's period - divided by the length of the `r` coordinates. - fill - Sets the area to fill with a solid color. - Defaults to "none" unless this trace is - stacked, then it gets "tonexty" ("tonextx") if - `orientation` is "v" ("h") Use with `fillcolor` - if not "none". "tozerox" and "tozeroy" fill to - x=0 and y=0 respectively. "tonextx" and - "tonexty" fill between the endpoints of this - trace and the endpoints of the trace before it, - connecting those endpoints with straight lines - (to make a stacked area graph); if there is no - trace before it, they behave like "tozerox" and - "tozeroy". "toself" connects the endpoints of - the trace (or each segment of the trace if it - has gaps) into a closed shape. "tonext" fills - the space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. Traces - in a `stackgroup` will only fill to (or be - filled to) other traces in the same group. With - multiple `stackgroup`s or some traces stacked - and some not, if fill-linked traces are not - already consecutive, the later ones will be - pushed down in the drawing order. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scatterpolargl.Hov - erlabel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scatterpolargl.Leg - endgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scatterpolargl.Lin - e` instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterpolargl.Mar - ker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - r - Sets the radial coordinates - r0 - Alternate to `r`. Builds a linear space of r - coordinates. Use with `dr` where `r0` is the - starting coordinate and `dr` the step. - rsrc - Sets the source reference on Chart Studio Cloud - for `r`. - selected - :class:`plotly.graph_objects.scatterpolargl.Sel - ected` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterpolargl.Str - eam` instance or dict with compatible - properties - subplot - Sets a reference between this trace's data - coordinates and a polar subplot. If "polar" - (the default value), the data refer to - `layout.polar`. If "polar2", the data refer to - `layout.polar2`, and so on. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `r`, `theta` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - theta - Sets the angular coordinates - theta0 - Alternate to `theta`. Builds a linear space of - theta coordinates. Use with `dtheta` where - `theta0` is the starting coordinate and - `dtheta` the step. - thetasrc - Sets the source reference on Chart Studio Cloud - for `theta`. - thetaunit - Sets the unit of input "theta" values. Has an - effect only when on "linear" angular axes. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterpolargl.Uns - elected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scattersmith.py b/plotly/validators/_scattersmith.py index 256d9bdda3..c83842b808 100644 --- a/plotly/validators/_scattersmith.py +++ b/plotly/validators/_scattersmith.py @@ -1,308 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattersmithValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScattersmithValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scattersmith", parent_name="", **kwargs): - super(ScattersmithValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattersmith"), data_docs=kwargs.pop( "data_docs", """ - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scattersmith - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scattersmith.Hover - label` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - imag - Sets the imaginary component of the data, in - units of normalized impedance such that real=1, - imag=0 is the center of the chart. - imagsrc - Sets the source reference on Chart Studio Cloud - for `imag`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scattersmith.Legen - dgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scattersmith.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scattersmith.Marke - r` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - real - Sets the real component of the data, in units - of normalized impedance such that real=1, - imag=0 is the center of the chart. - realsrc - Sets the source reference on Chart Studio Cloud - for `real`. - selected - :class:`plotly.graph_objects.scattersmith.Selec - ted` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scattersmith.Strea - m` instance or dict with compatible properties - subplot - Sets a reference between this trace's data - coordinates and a smith subplot. If "smith" - (the default value), the data refer to - `layout.smith`. If "smith2", the data refer to - `layout.smith2`, and so on. - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `real`, `imag` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scattersmith.Unsel - ected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_scatterternary.py b/plotly/validators/_scatterternary.py index b43ccb9690..43791239f4 100644 --- a/plotly/validators/_scatterternary.py +++ b/plotly/validators/_scatterternary.py @@ -1,333 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterternaryValidator(_plotly_utils.basevalidators.CompoundValidator): +class ScatterternaryValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scatterternary", parent_name="", **kwargs): - super(ScatterternaryValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatterternary"), data_docs=kwargs.pop( "data_docs", """ - a - Sets the quantity of component `a` in each data - point. If `a`, `b`, and `c` are all provided, - they need not be normalized, only the relative - values matter. If only two arrays are provided - they must be normalized to match - `ternary.sum`. - asrc - Sets the source reference on Chart Studio Cloud - for `a`. - b - Sets the quantity of component `a` in each data - point. If `a`, `b`, and `c` are all provided, - they need not be normalized, only the relative - values matter. If only two arrays are provided - they must be normalized to match - `ternary.sum`. - bsrc - Sets the source reference on Chart Studio Cloud - for `b`. - c - Sets the quantity of component `a` in each data - point. If `a`, `b`, and `c` are all provided, - they need not be normalized, only the relative - values matter. If only two arrays are provided - they must be normalized to match - `ternary.sum`. - cliponaxis - Determines whether or not markers and text - nodes are clipped about the subplot axes. To - show markers and text nodes above axis lines - and tick labels, make sure to set `xaxis.layer` - and `yaxis.layer` to *below traces*. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the provided data arrays are - connected. - csrc - Sets the source reference on Chart Studio Cloud - for `c`. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - fill - Sets the area to fill with a solid color. Use - with `fillcolor` if not "none". scatterternary - has a subset of the options available to - scatter. "toself" connects the endpoints of the - trace (or each segment of the trace if it has - gaps) into a closed shape. "tonext" fills the - space between two traces if one completely - encloses the other (eg consecutive contour - lines), and behaves like "toself" if there is - no trace before it. "tonext" should not be used - if one trace does not enclose the other. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.scatterternary.Hov - erlabel` instance or dict with compatible - properties - hoveron - Do the hover effects highlight individual - points (markers or line points) or do they - highlight filled regions? If the fill is - "toself" or "tonext" and there are no markers - or text, then the default is "fills", otherwise - it is "points". - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (a,b,c) point. If a single string, the same - string appears over all the data points. If an - array of strings, the items are mapped in order - to the the data points in (a,b,c). To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.scatterternary.Leg - endgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.scatterternary.Lin - e` instance or dict with compatible properties - marker - :class:`plotly.graph_objects.scatterternary.Mar - ker` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - mode - Determines the drawing mode for this scatter - trace. If the provided `mode` includes "text" - then the `text` elements appear at the - coordinates. Otherwise, the `text` elements - appear on hover. If there are less than 20 - points and the trace is not stacked then the - default is "lines+markers". Otherwise, "lines". - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.scatterternary.Sel - ected` instance or dict with compatible - properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.scatterternary.Str - eam` instance or dict with compatible - properties - subplot - Sets a reference between this trace's data - coordinates and a ternary subplot. If "ternary" - (the default value), the data refer to - `layout.ternary`. If "ternary2", the data refer - to `layout.ternary2`, and so on. - sum - The number each triplet should sum to, if only - two of `a`, `b`, and `c` are provided. This - overrides `ternary.sum` to normalize this - specific trace, but does not affect the values - displayed on the axes. 0 (or missing) means to - use ternary.sum - text - Sets text elements associated with each (a,b,c) - point. If a single string, the same string - appears over all the data points. If an array - of strings, the items are mapped in order to - the the data points in (a,b,c). If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the text font. - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `a`, `b`, `c` and `text`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.scatterternary.Uns - elected` instance or dict with compatible - properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_splom.py b/plotly/validators/_splom.py index 4d695a2bc5..2eb9157328 100644 --- a/plotly/validators/_splom.py +++ b/plotly/validators/_splom.py @@ -1,269 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SplomValidator(_plotly_utils.basevalidators.CompoundValidator): +class SplomValidator(_bv.CompoundValidator): def __init__(self, plotly_name="splom", parent_name="", **kwargs): - super(SplomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Splom"), data_docs=kwargs.pop( "data_docs", """ - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - diagonal - :class:`plotly.graph_objects.splom.Diagonal` - instance or dict with compatible properties - dimensions - A tuple of - :class:`plotly.graph_objects.splom.Dimension` - instances or dicts with compatible properties - dimensiondefaults - When used in a template (as - layout.template.data.splom.dimensiondefaults), - sets the default property values to use for - elements of splom.dimensions - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.splom.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.splom.Legendgroupt - itle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - marker - :class:`plotly.graph_objects.splom.Marker` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - selected - :class:`plotly.graph_objects.splom.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showlowerhalf - Determines whether or not subplots on the lower - half from the diagonal are displayed. - showupperhalf - Determines whether or not subplots on the upper - half from the diagonal are displayed. - stream - :class:`plotly.graph_objects.splom.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair to appear on hover. If a single string, - the same string appears over all the data - points. If an array of string, the items are - mapped in order to the this trace's (x,y) - coordinates. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.splom.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - xaxes - Sets the list of x axes corresponding to - dimensions of this splom trace. By default, a - splom will match the first N xaxes where N is - the number of input dimensions. Note that, in - case where `diagonal.visible` is false and - `showupperhalf` or `showlowerhalf` is false, - this splom trace will generate one less x-axis - and one less y-axis. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - yaxes - Sets the list of y axes corresponding to - dimensions of this splom trace. By default, a - splom will match the first N yaxes where N is - the number of input dimensions. Note that, in - case where `diagonal.visible` is false and - `showupperhalf` or `showlowerhalf` is false, - this splom trace will generate one less x-axis - and one less y-axis. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. """, ), **kwargs, diff --git a/plotly/validators/_streamtube.py b/plotly/validators/_streamtube.py index 5336ae1fb9..5efa8605ec 100644 --- a/plotly/validators/_streamtube.py +++ b/plotly/validators/_streamtube.py @@ -1,375 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamtubeValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamtubeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="streamtube", parent_name="", **kwargs): - super(StreamtubeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Streamtube"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - u/v/w norm) or the bounds set in `cmin` and - `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as u/v/w norm. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as u/v/w norm and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.streamtube.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.streamtube.Hoverla - bel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `tubex`, `tubey`, `tubez`, `tubeu`, - `tubev`, `tubew`, `norm` and `divergence`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.streamtube.Legendg - rouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lighting - :class:`plotly.graph_objects.streamtube.Lightin - g` instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.streamtube.Lightpo - sition` instance or dict with compatible - properties - maxdisplayed - The maximum number of displayed segments in a - streamtube. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - sizeref - The scaling factor for the streamtubes. The - default is 1, which avoids two max divergence - tubes from touching at adjacent starting - positions. - starts - :class:`plotly.graph_objects.streamtube.Starts` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.streamtube.Stream` - instance or dict with compatible properties - text - Sets a text element associated with this trace. - If trace `hoverinfo` contains a "text" flag, - this text element will be seen in all hover - labels. Note that streamtube traces do not - support array `text` values. - u - Sets the x components of the vector field. - uhoverformat - Sets the hover text formatting rulefor `u` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - usrc - Sets the source reference on Chart Studio Cloud - for `u`. - v - Sets the y components of the vector field. - vhoverformat - Sets the hover text formatting rulefor `v` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - vsrc - Sets the source reference on Chart Studio Cloud - for `v`. - w - Sets the z components of the vector field. - whoverformat - Sets the hover text formatting rulefor `w` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - wsrc - Sets the source reference on Chart Studio Cloud - for `w`. - x - Sets the x coordinates of the vector field. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates of the vector field. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the z coordinates of the vector field. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_sunburst.py b/plotly/validators/_sunburst.py index 7a6593dae7..4eb22a161f 100644 --- a/plotly/validators/_sunburst.py +++ b/plotly/validators/_sunburst.py @@ -1,299 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SunburstValidator(_plotly_utils.basevalidators.CompoundValidator): +class SunburstValidator(_bv.CompoundValidator): def __init__(self, plotly_name="sunburst", parent_name="", **kwargs): - super(SunburstValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Sunburst"), data_docs=kwargs.pop( "data_docs", """ - branchvalues - Determines how the items in `values` are - summed. When set to "total", items in `values` - are taken to be value of all its descendants. - When set to "remainder", items in `values` - corresponding to the root and the branches - sectors are taken to be the extra part not part - of the sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the - "leaves" and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - domain - :class:`plotly.graph_objects.sunburst.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.sunburst.Hoverlabe - l` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - insidetextorientation - Controls the orientation of the text inside - chart sectors. When set to "auto", text may be - oriented in any direction in order to be as big - as possible in the middle of a sector. The - "horizontal" option orients text to be parallel - with the bottom of the chart, and may make text - smaller in order to achieve that goal. The - "radial" option orients text along the radius - of the sector. The "tangential" option orients - text perpendicular to the radius of the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud - for `labels`. - leaf - :class:`plotly.graph_objects.sunburst.Leaf` - instance or dict with compatible properties - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.sunburst.Legendgro - uptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - level - Sets the level from which this trace hierarchy - is rendered. Set `level` to `''` to start from - the root node in the hierarchy. Must be an "id" - if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - marker - :class:`plotly.graph_objects.sunburst.Marker` - instance or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any - given `level`. Set `maxdepth` to "-1" to render - all the levels in the hierarchy. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. This option refers to the root of - the hierarchy presented at the center of a - sunburst graph. Please note that if a hierarchy - has multiple root nodes, this option won't have - any effect and `insidetextfont` would be used. - parents - Sets the parent sectors for each of the - sectors. Empty string items '' are understood - to reference the root node in the hierarchy. If - `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, - plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud - for `parents`. - root - :class:`plotly.graph_objects.sunburst.Root` - instance or dict with compatible properties - rotation - Rotates the whole diagram counterclockwise by - some angle. By default the first slice starts - at 3 o'clock. - sort - Determines whether or not the sectors are - reordered from largest to smallest. - stream - :class:`plotly.graph_objects.sunburst.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and - `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values associated with each of the - sectors. Use with `branchvalues` to determine - how the values are summed. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_surface.py b/plotly/validators/_surface.py index 6356503fbc..1d8f76848f 100644 --- a/plotly/validators/_surface.py +++ b/plotly/validators/_surface.py @@ -1,365 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): +class SurfaceValidator(_bv.CompoundValidator): def __init__(self, plotly_name="surface", parent_name="", **kwargs): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Surface"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here z - or surfacecolor) or the bounds set in `cmin` - and `cmax` Defaults to `false` when `cmin` and - `cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as z or surfacecolor - and if set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as z or surfacecolor. Has no effect when - `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as z or surfacecolor - and if set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.surface.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - connectgaps - Determines whether or not gaps (i.e. {nan} or - missing values) in the `z` data are filled in. - contours - :class:`plotly.graph_objects.surface.Contours` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hidesurface - Determines whether or not a surface is drawn. - For example, set `hidesurface` to False - `contours.x.show` to True and `contours.y.show` - to True to draw a wire frame plot. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.surface.Hoverlabel - ` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.surface.Legendgrou - ptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lighting - :class:`plotly.graph_objects.surface.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.surface.Lightposit - ion` instance or dict with compatible - properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be - an array containing arrays mapping a normalized - value to an opacity value. At minimum, a - mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], - [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and - those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette - name string of the following list: 'min', - 'max', 'extremes' and 'uniform'. The default is - 'uniform'. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - stream - :class:`plotly.graph_objects.surface.Stream` - instance or dict with compatible properties - surfacecolor - Sets the surface color values, used for setting - a color scale independent of `z`. - surfacecolorsrc - Sets the source reference on Chart Studio Cloud - for `surfacecolor`. - text - Sets the text elements associated with each z - value. If trace `hoverinfo` contains a "text" - flag and "hovertext" is not set, these elements - will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the x coordinates. - xcalendar - Sets the calendar system to use with `x` date - data. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - ycalendar - Sets the calendar system to use with `y` date - data. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the z coordinates. - zcalendar - Sets the calendar system to use with `z` date - data. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_table.py b/plotly/validators/_table.py index b98caa7c4d..de0dc47d05 100644 --- a/plotly/validators/_table.py +++ b/plotly/validators/_table.py @@ -1,149 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TableValidator(_plotly_utils.basevalidators.CompoundValidator): +class TableValidator(_bv.CompoundValidator): def __init__(self, plotly_name="table", parent_name="", **kwargs): - super(TableValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Table"), data_docs=kwargs.pop( "data_docs", """ - cells - :class:`plotly.graph_objects.table.Cells` - instance or dict with compatible properties - columnorder - Specifies the rendered order of the data - columns; for example, a value `2` at position - `0` means that column index `0` in the data - will be rendered as the third column, as - columns have an index base of zero. - columnordersrc - Sets the source reference on Chart Studio Cloud - for `columnorder`. - columnwidth - The width of columns expressed as a ratio. - Columns fill the available width in proportion - of their specified column widths. - columnwidthsrc - Sets the source reference on Chart Studio Cloud - for `columnwidth`. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - domain - :class:`plotly.graph_objects.table.Domain` - instance or dict with compatible properties - header - :class:`plotly.graph_objects.table.Header` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.table.Hoverlabel` - instance or dict with compatible properties - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.table.Legendgroupt - itle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - stream - :class:`plotly.graph_objects.table.Stream` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_treemap.py b/plotly/validators/_treemap.py index f35001f80a..1e3a01d71d 100644 --- a/plotly/validators/_treemap.py +++ b/plotly/validators/_treemap.py @@ -1,289 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TreemapValidator(_plotly_utils.basevalidators.CompoundValidator): +class TreemapValidator(_bv.CompoundValidator): def __init__(self, plotly_name="treemap", parent_name="", **kwargs): - super(TreemapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Treemap"), data_docs=kwargs.pop( "data_docs", """ - branchvalues - Determines how the items in `values` are - summed. When set to "total", items in `values` - are taken to be value of all its descendants. - When set to "remainder", items in `values` - corresponding to the root and the branches - sectors are taken to be the extra part not part - of the sum of the values at their leaves. - count - Determines default for `values` when it is not - provided, by inferring a 1 for each of the - "leaves" and/or "branches", otherwise 0. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - domain - :class:`plotly.graph_objects.treemap.Domain` - instance or dict with compatible properties - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.treemap.Hoverlabel - ` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `currentPath`, `root`, `entry`, - `percentRoot`, `percentEntry` and - `percentParent`. Anything contained in tag - `` is displayed in the secondary box, - for example "{fullData.name}". - To hide the secondary box completely, use an - empty tag ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - sector. If a single string, the same string - appears for all data points. If an array of - string, the items are mapped in order of this - trace's sectors. To be seen, trace `hoverinfo` - must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - insidetextfont - Sets the font used for `textinfo` lying inside - the sector. - labels - Sets the labels of each of the sectors. - labelssrc - Sets the source reference on Chart Studio Cloud - for `labels`. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgrouptitle - :class:`plotly.graph_objects.treemap.Legendgrou - ptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - level - Sets the level from which this trace hierarchy - is rendered. Set `level` to `''` to start from - the root node in the hierarchy. Must be an "id" - if `ids` is filled in, otherwise plotly - attempts to find a matching item in `labels`. - marker - :class:`plotly.graph_objects.treemap.Marker` - instance or dict with compatible properties - maxdepth - Sets the number of rendered sectors from any - given `level`. Set `maxdepth` to "-1" to render - all the levels in the hierarchy. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the trace. - outsidetextfont - Sets the font used for `textinfo` lying outside - the sector. This option refers to the root of - the hierarchy presented on top left corner of a - treemap graph. Please note that if a hierarchy - has multiple root nodes, this option won't have - any effect and `insidetextfont` would be used. - parents - Sets the parent sectors for each of the - sectors. Empty string items '' are understood - to reference the root node in the hierarchy. If - `ids` is filled, `parents` items are understood - to be "ids" themselves. When `ids` is not set, - plotly attempts to find matching items in - `labels`, but beware they must be unique. - parentssrc - Sets the source reference on Chart Studio Cloud - for `parents`. - pathbar - :class:`plotly.graph_objects.treemap.Pathbar` - instance or dict with compatible properties - root - :class:`plotly.graph_objects.treemap.Root` - instance or dict with compatible properties - sort - Determines whether or not the sectors are - reordered from largest to smallest. - stream - :class:`plotly.graph_objects.treemap.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each sector. - If trace `textinfo` contains a "text" flag, - these elements will be seen on the chart. If - trace `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textfont - Sets the font used for `textinfo`. - textinfo - Determines which trace information appear on - the graph. - textposition - Sets the positions of the `text` elements. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `currentPath`, `root`, `entry`, `percentRoot`, - `percentEntry`, `percentParent`, `label` and - `value`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - tiling - :class:`plotly.graph_objects.treemap.Tiling` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - values - Sets the values associated with each of the - sectors. Use with `branchvalues` to determine - how the values are summed. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/_violin.py b/plotly/validators/_violin.py index c7ab18059d..84e1d7187f 100644 --- a/plotly/validators/_violin.py +++ b/plotly/validators/_violin.py @@ -1,400 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ViolinValidator(_plotly_utils.basevalidators.CompoundValidator): +class ViolinValidator(_bv.CompoundValidator): def __init__(self, plotly_name="violin", parent_name="", **kwargs): - super(ViolinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Violin"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - bandwidth - Sets the bandwidth used to compute the kernel - density estimate. By default, the bandwidth is - determined by Silverman's rule of thumb. - box - :class:`plotly.graph_objects.violin.Box` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.violin.Hoverlabel` - instance or dict with compatible properties - hoveron - Do the hover effects highlight individual - violins or sample points or the kernel density - estimate or any combination of them? - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - jitter - Sets the amount of jitter in the sample points - drawn. If 0, the sample points align along the - distribution axis. If 1, the sample points are - drawn in a random jitter of width equal to the - width of the violins. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.violin.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - line - :class:`plotly.graph_objects.violin.Line` - instance or dict with compatible properties - marker - :class:`plotly.graph_objects.violin.Marker` - instance or dict with compatible properties - meanline - :class:`plotly.graph_objects.violin.Meanline` - instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. For violin - traces, the name will also be used for the - position coordinate, if `x` and `x0` (`y` and - `y0` if horizontal) are missing and the - position axis is categorical. Note that the - trace name is also used as a default value for - attribute `scalegroup` (please see its - description for details). - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the violin(s). If "v" - ("h"), the distribution is visualized along the - vertical (horizontal). - pointpos - Sets the position of the sample points in - relation to the violins. If 0, the sample - points are places over the center of the - violins. Positive (negative) values correspond - to positions to the right (left) for vertical - violins and above (below) for horizontal - violins. - points - If "outliers", only the sample points lying - outside the whiskers are shown If - "suspectedoutliers", the outlier points are - shown and points either less than 4*Q1-3*Q3 or - greater than 4*Q3-3*Q1 are highlighted (see - `outliercolor`) If "all", all sample points are - shown If False, only the violins are shown with - no sample points. Defaults to - "suspectedoutliers" when `marker.outliercolor` - or `marker.line.outliercolor` is set, otherwise - defaults to "outliers". - quartilemethod - Sets the method used to compute the sample's Q1 - and Q3 quartiles. The "linear" method uses the - 25th percentile for Q1 and 75th percentile for - Q3 as computed using method #10 (listed on - http://jse.amstat.org/v14n3/langford.html). The - "exclusive" method uses the median to divide - the ordered dataset into two halves if the - sample is odd, it does not include the median - in either half - Q1 is then the median of the - lower half and Q3 the median of the upper half. - The "inclusive" method also uses the median to - divide the ordered dataset into two halves but - if the sample is odd, it includes the median in - both halves - Q1 is then the median of the - lower half and Q3 the median of the upper half. - scalegroup - If there are multiple violins that should be - sized according to to some metric (see - `scalemode`), link them by providing a non- - empty group id here shared by every trace in - the same group. If a violin's `width` is - undefined, `scalegroup` will default to the - trace's name. In this case, violins with the - same names will be linked together - scalemode - Sets the metric by which the width of each - violin is determined. "width" means each violin - has the same (max) width "count" means the - violins are scaled by the number of sample - points making up each violin. - selected - :class:`plotly.graph_objects.violin.Selected` - instance or dict with compatible properties - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - side - Determines on which side of the position value - the density function making up one half of a - violin is plotted. Useful when comparing two - violin traces under "overlay" mode, where one - trace has `side` set to "positive" and the - other to "negative". - span - Sets the span in data space for which the - density function will be computed. Has an - effect only when `spanmode` is set to "manual". - spanmode - Sets the method by which the span in data space - where the density function will be computed. - "soft" means the span goes from the sample's - minimum value minus two bandwidths to the - sample's maximum value plus two bandwidths. - "hard" means the span goes from the sample's - minimum to its maximum value. For custom span - settings, use mode "manual" and fill in the - `span` attribute. - stream - :class:`plotly.graph_objects.violin.Stream` - instance or dict with compatible properties - text - Sets the text elements associated with each - sample value. If a single string, the same - string appears over all the data points. If an - array of string, the items are mapped in order - to the this trace's (x,y) coordinates. To be - seen, trace `hoverinfo` must contain a "text" - flag. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - unselected - :class:`plotly.graph_objects.violin.Unselected` - instance or dict with compatible properties - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the width of the violin in data - coordinates. If 0 (default value) the width is - automatically selected based on the positions - of other violin traces in the same subplot. - x - Sets the x sample data or coordinates. See - overview for more info. - x0 - Sets the x coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y sample data or coordinates. See - overview for more info. - y0 - Sets the y coordinate for single-box traces or - the starting coordinate for multi-box traces - set using q1/median/q3. See overview for more - info. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/_volume.py b/plotly/validators/_volume.py index 16409dcb98..edbfecc7d6 100644 --- a/plotly/validators/_volume.py +++ b/plotly/validators/_volume.py @@ -1,377 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VolumeValidator(_plotly_utils.basevalidators.CompoundValidator): +class VolumeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="volume", parent_name="", **kwargs): - super(VolumeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Volume"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - caps - :class:`plotly.graph_objects.volume.Caps` - instance or dict with compatible properties - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - `value`) or the bounds set in `cmin` and `cmax` - Defaults to `false` when `cmin` and `cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as `value` and if - set, `cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as `value`. Has no effect when `cauto` is - `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as `value` and if - set, `cmax` must be set as well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.volume.ColorBar` - instance or dict with compatible properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - contour - :class:`plotly.graph_objects.volume.Contour` - instance or dict with compatible properties - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - flatshading - Determines whether or not normal smoothing is - applied to the meshes, creating meshes with an - angular, low-poly look via flat reflections. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.volume.Hoverlabel` - instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Same as `text`. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - isomax - Sets the maximum boundary for iso-surface plot. - isomin - Sets the minimum boundary for iso-surface plot. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.volume.Legendgroup - title` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - lighting - :class:`plotly.graph_objects.volume.Lighting` - instance or dict with compatible properties - lightposition - :class:`plotly.graph_objects.volume.Lightpositi - on` instance or dict with compatible properties - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - opacity - Sets the opacity of the surface. Please note - that in the case of using high `opacity` values - for example a value greater than or equal to - 0.5 on two surfaces (and 0.25 with four - surfaces), an overlay of multiple transparent - surfaces may not perfectly be sorted in depth - by the webgl API. This behavior may be improved - in the near future and is subject to change. - opacityscale - Sets the opacityscale. The opacityscale must be - an array containing arrays mapping a normalized - value to an opacity value. At minimum, a - mapping for the lowest (0) and highest (1) - values are required. For example, `[[0, 1], - [0.5, 0.2], [1, 1]]` means that higher/lower - values would have higher opacity values and - those in the middle would be more transparent - Alternatively, `opacityscale` may be a palette - name string of the following list: 'min', - 'max', 'extremes' and 'uniform'. The default is - 'uniform'. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - scene - Sets a reference between this trace's 3D - coordinate system and a 3D scene. If "scene" - (the default value), the (x,y,z) coordinates - refer to `layout.scene`. If "scene2", the - (x,y,z) coordinates refer to `layout.scene2`, - and so on. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - showscale - Determines whether or not a colorbar is - displayed for this trace. - slices - :class:`plotly.graph_objects.volume.Slices` - instance or dict with compatible properties - spaceframe - :class:`plotly.graph_objects.volume.Spaceframe` - instance or dict with compatible properties - stream - :class:`plotly.graph_objects.volume.Stream` - instance or dict with compatible properties - surface - :class:`plotly.graph_objects.volume.Surface` - instance or dict with compatible properties - text - Sets the text elements associated with the - vertices. If trace `hoverinfo` contains a - "text" flag and "hovertext" is not set, these - elements will be seen in the hover labels. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - value - Sets the 4th dimension (value) of the vertices. - valuehoverformat - Sets the hover text formatting rulefor `value` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format.By default the - values are formatted using generic number - format. - valuesrc - Sets the source reference on Chart Studio Cloud - for `value`. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x - Sets the X coordinates of the vertices on X - axis. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the Y coordinates of the vertices on Y - axis. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the Z coordinates of the vertices on Z - axis. - zhoverformat - Sets the hover text formatting rulefor `z` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `zaxis.hoverformat`. - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/_waterfall.py b/plotly/validators/_waterfall.py index 4368af6336..b88c8ddfbb 100644 --- a/plotly/validators/_waterfall.py +++ b/plotly/validators/_waterfall.py @@ -1,433 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WaterfallValidator(_plotly_utils.basevalidators.CompoundValidator): +class WaterfallValidator(_bv.CompoundValidator): def __init__(self, plotly_name="waterfall", parent_name="", **kwargs): - super(WaterfallValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Waterfall"), data_docs=kwargs.pop( "data_docs", """ - alignmentgroup - Set several traces linked to the same position - axis or matching axes to the same - alignmentgroup. This controls whether bars - compute their positional range dependently or - independently. - base - Sets where the bar base is drawn (in position - axis units). - cliponaxis - Determines whether the text nodes are clipped - about the subplot axes. To show the text nodes - above axis lines and tick labels, make sure to - set `xaxis.layer` and `yaxis.layer` to *below - traces*. - connector - :class:`plotly.graph_objects.waterfall.Connecto - r` instance or dict with compatible properties - constraintext - Constrain the size of text inside or outside a - bar to be no larger than the bar itself. - customdata - Assigns extra data each datum. This may be - useful when listening to hover, click and - selection events. Note that, "scatter" traces - also appends customdata items in the markers - DOM elements - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - decreasing - :class:`plotly.graph_objects.waterfall.Decreasi - ng` instance or dict with compatible properties - dx - Sets the x coordinate step. See `x0` for more - info. - dy - Sets the y coordinate step. See `y0` for more - info. - hoverinfo - Determines which trace information appear on - hover. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverinfosrc - Sets the source reference on Chart Studio Cloud - for `hoverinfo`. - hoverlabel - :class:`plotly.graph_objects.waterfall.Hoverlab - el` instance or dict with compatible properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Finally, the template string has access to - variables `initial`, `delta` and `final`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - hovertext - Sets hover text elements associated with each - (x,y) pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. To be seen, - trace `hoverinfo` must contain a "text" flag. - hovertextsrc - Sets the source reference on Chart Studio Cloud - for `hovertext`. - ids - Assigns id labels to each datum. These ids for - object constancy of data points during - animation. Should be an array of strings, not - numbers or any other type. - idssrc - Sets the source reference on Chart Studio Cloud - for `ids`. - increasing - :class:`plotly.graph_objects.waterfall.Increasi - ng` instance or dict with compatible properties - insidetextanchor - Determines if texts are kept at center or - start/end points in `textposition` "inside" - mode. - insidetextfont - Sets the font used for `text` lying inside the - bar. - legend - Sets the reference to a legend to show this - trace in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this trace. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.waterfall.Legendgr - ouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this trace. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this trace. - measure - An array containing types of values. By default - the values are considered as 'relative'. - However; it is possible to use 'total' to - compute the sums. Also 'absolute' could be - applied to reset the computed total or to - declare an initial value where needed. - measuresrc - Sets the source reference on Chart Studio Cloud - for `measure`. - meta - Assigns extra meta information associated with - this trace that can be used in various text - attributes. Attributes such as trace `name`, - graph, axis and colorbar `title.text`, - annotation `text` `rangeselector`, - `updatemenues` and `sliders` `label` text all - support `meta`. To access the trace `meta` - values in an attribute in the same trace, - simply use `%{meta[i]}` where `i` is the index - or key of the `meta` item in question. To - access trace `meta` in layout attributes, use - `%{data[n[.meta[i]}` where `i` is the index or - key of the `meta` and `n` is the trace index. - metasrc - Sets the source reference on Chart Studio Cloud - for `meta`. - name - Sets the trace name. The trace name appears as - the legend item and on hover. - offset - Shifts the position where the bar is drawn (in - position axis units). In "group" barmode, - traces that set "offset" will be excluded and - drawn in "overlay" mode instead. - offsetgroup - Set several traces linked to the same position - axis or matching axes to the same offsetgroup - where bars of the same position coordinate will - line up. - offsetsrc - Sets the source reference on Chart Studio Cloud - for `offset`. - opacity - Sets the opacity of the trace. - orientation - Sets the orientation of the bars. With "v" - ("h"), the value of the each bar spans along - the vertical (horizontal). - outsidetextfont - Sets the font used for `text` lying outside the - bar. - selectedpoints - Array containing integer indices of selected - points. Has an effect only for traces that - support selections. Note that an empty array - means an empty selection where the `unselected` - are turned on for all points, whereas, any - other non-array values means no selection all - where the `selected` and `unselected` styles - have no effect. - showlegend - Determines whether or not an item corresponding - to this trace is shown in the legend. - stream - :class:`plotly.graph_objects.waterfall.Stream` - instance or dict with compatible properties - text - Sets text elements associated with each (x,y) - pair. If a single string, the same string - appears over all the data points. If an array - of string, the items are mapped in order to the - this trace's (x,y) coordinates. If trace - `hoverinfo` contains a "text" flag and - "hovertext" is not set, these elements will be - seen in the hover labels. - textangle - Sets the angle of the tick labels with respect - to the bar. For example, a `tickangle` of -90 - draws the tick labels vertically. With "auto" - the texts may automatically be rotated to fit - with the maximum size in bars. - textfont - Sets the font used for `text`. - textinfo - Determines which trace information appear on - the graph. In the case of having multiple - waterfalls, totals are computed separately (per - trace). - textposition - Specifies the location of the `text`. "inside" - positions `text` inside, next to the bar end - (rotated and scaled if needed). "outside" - positions `text` outside, next to the bar end - (scaled if needed), unless there is another bar - stacked on this one, then the text gets pushed - inside. "auto" tries to position `text` inside - the bar, but if the bar is too small and no bar - is stacked on this one the text is moved - outside. If "none", no text appears. - textpositionsrc - Sets the source reference on Chart Studio Cloud - for `textposition`. - textsrc - Sets the source reference on Chart Studio Cloud - for `text`. - texttemplate - Template string used for rendering the - information text that appear on points. Note - that this will override `textinfo`. Variables - are inserted using %{variable}, for example "y: - %{y}". Numbers are formatted using d3-format's - syntax %{variable:d3-format}, for example - "Price: %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. Every attributes - that can be specified per-point (the ones that - are `arrayOk: true`) are available. Finally, - the template string has access to variables - `initial`, `delta`, `final` and `label`. - texttemplatesrc - Sets the source reference on Chart Studio Cloud - for `texttemplate`. - totals - :class:`plotly.graph_objects.waterfall.Totals` - instance or dict with compatible properties - uid - Assign an id to this trace, Use this to provide - object constancy between traces during - animations and transitions. - uirevision - Controls persistence of some user-driven - changes to the trace: `constraintrange` in - `parcoords` traces, as well as some `editable: - true` modifications such as `name` and - `colorbar.title`. Defaults to - `layout.uirevision`. Note that other user- - driven trace attribute changes are controlled - by `layout` attributes: `trace.visible` is - controlled by `layout.legend.uirevision`, - `selectedpoints` is controlled by - `layout.selectionrevision`, and - `colorbar.(x|y)` (accessible with `config: - {editable: true}`) is controlled by - `layout.editrevision`. Trace changes are - tracked by `uid`, which only falls back on - trace index if no `uid` is provided. So if your - app can add/remove traces before the end of the - `data` array, such that the same trace has a - different index, you can still preserve user- - driven changes if you give each trace a `uid` - that stays with it as it moves. - visible - Determines whether or not this trace is - visible. If "legendonly", the trace is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - width - Sets the bar width (in position axis units). - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. - x - Sets the x coordinates. - x0 - Alternate to `x`. Builds a linear space of x - coordinates. Use with `dx` where `x0` is the - starting coordinate and `dx` the step. - xaxis - Sets a reference between this trace's x - coordinates and a 2D cartesian x axis. If "x" - (the default value), the x coordinates refer to - `layout.xaxis`. If "x2", the x coordinates - refer to `layout.xaxis2`, and so on. - xhoverformat - Sets the hover text formatting rulefor `x` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `xaxis.hoverformat`. - xperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the x axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - xperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the x0 axis. - When `x0period` is round number of weeks, the - `x0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - xperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the x - axis. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y coordinates. - y0 - Alternate to `y`. Builds a linear space of y - coordinates. Use with `dy` where `y0` is the - starting coordinate and `dy` the step. - yaxis - Sets a reference between this trace's y - coordinates and a 2D cartesian y axis. If "y" - (the default value), the y coordinates refer to - `layout.yaxis`. If "y2", the y coordinates - refer to `layout.yaxis2`, and so on. - yhoverformat - Sets the hover text formatting rulefor `y` - using d3 formatting mini-languages which are - very similar to those in Python. For numbers, - see: https://github.com/d3/d3- - format/tree/v1.4.5#d3-format. And for dates - see: https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - *09~15~23.46*By default the values are - formatted using `yaxis.hoverformat`. - yperiod - Only relevant when the axis `type` is "date". - Sets the period positioning in milliseconds or - "M" on the y axis. Special values in the - form of "M" could be used to declare the - number of months. In this case `n` must be a - positive integer. - yperiod0 - Only relevant when the axis `type` is "date". - Sets the base for period positioning in - milliseconds or date string on the y0 axis. - When `y0period` is round number of weeks, the - `y0period0` by default would be on a Sunday - i.e. 2000-01-02, otherwise it would be at - 2000-01-01. - yperiodalignment - Only relevant when the axis `type` is "date". - Sets the alignment of data points on the y - axis. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - zorder - Sets the layer on which this trace is - displayed, relative to other SVG traces on the - same subplot. SVG traces with higher `zorder` - appear in front of those with lower `zorder`. """, ), **kwargs, diff --git a/plotly/validators/bar/__init__.py b/plotly/validators/bar/__init__.py index 152121c186..ca538949b3 100644 --- a/plotly/validators/bar/__init__.py +++ b/plotly/validators/bar/__init__.py @@ -1,161 +1,83 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetsrc import OffsetsrcValidator - from ._offsetgroup import OffsetgroupValidator - from ._offset import OffsetValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._insidetextfont import InsidetextfontValidator - from ._insidetextanchor import InsidetextanchorValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._error_y import Error_YValidator - from ._error_x import Error_XValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._constraintext import ConstraintextValidator - from ._cliponaxis import CliponaxisValidator - from ._basesrc import BasesrcValidator - from ._base import BaseValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetsrc.OffsetsrcValidator", - "._offsetgroup.OffsetgroupValidator", - "._offset.OffsetValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._insidetextfont.InsidetextfontValidator", - "._insidetextanchor.InsidetextanchorValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._error_y.Error_YValidator", - "._error_x.Error_XValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._constraintext.ConstraintextValidator", - "._cliponaxis.CliponaxisValidator", - "._basesrc.BasesrcValidator", - "._base.BaseValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetsrc.OffsetsrcValidator", + "._offsetgroup.OffsetgroupValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._constraintext.ConstraintextValidator", + "._cliponaxis.CliponaxisValidator", + "._basesrc.BasesrcValidator", + "._base.BaseValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/bar/_alignmentgroup.py b/plotly/validators/bar/_alignmentgroup.py index 9fbb19855f..c5e393acf1 100644 --- a/plotly/validators/bar/_alignmentgroup.py +++ b/plotly/validators/bar/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="bar", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_base.py b/plotly/validators/bar/_base.py index 584377e50e..e038fd998a 100644 --- a/plotly/validators/bar/_base.py +++ b/plotly/validators/bar/_base.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaseValidator(_plotly_utils.basevalidators.AnyValidator): +class BaseValidator(_bv.AnyValidator): def __init__(self, plotly_name="base", parent_name="bar", **kwargs): - super(BaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/_basesrc.py b/plotly/validators/bar/_basesrc.py index a0d9cc1a8a..fea5145a42 100644 --- a/plotly/validators/bar/_basesrc.py +++ b/plotly/validators/bar/_basesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BasesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="basesrc", parent_name="bar", **kwargs): - super(BasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_cliponaxis.py b/plotly/validators/bar/_cliponaxis.py index e6d801a1db..8429b4fbda 100644 --- a/plotly/validators/bar/_cliponaxis.py +++ b/plotly/validators/bar/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="bar", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/bar/_constraintext.py b/plotly/validators/bar/_constraintext.py index 606706b908..f0e4768c7c 100644 --- a/plotly/validators/bar/_constraintext.py +++ b/plotly/validators/bar/_constraintext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstraintextValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="constraintext", parent_name="bar", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "both", "none"]), **kwargs, diff --git a/plotly/validators/bar/_customdata.py b/plotly/validators/bar/_customdata.py index 237901bd6e..da0bafe494 100644 --- a/plotly/validators/bar/_customdata.py +++ b/plotly/validators/bar/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="bar", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_customdatasrc.py b/plotly/validators/bar/_customdatasrc.py index 47908075b8..dcf392fbe0 100644 --- a/plotly/validators/bar/_customdatasrc.py +++ b/plotly/validators/bar/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="bar", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_dx.py b/plotly/validators/bar/_dx.py index 0a0050b93b..1322c40fb3 100644 --- a/plotly/validators/bar/_dx.py +++ b/plotly/validators/bar/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="bar", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/_dy.py b/plotly/validators/bar/_dy.py index b60aa22419..3921bc1080 100644 --- a/plotly/validators/bar/_dy.py +++ b/plotly/validators/bar/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="bar", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/_error_x.py b/plotly/validators/bar/_error_x.py index 04824c2eff..b9afc09cc9 100644 --- a/plotly/validators/bar/_error_x.py +++ b/plotly/validators/bar/_error_x.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_x", parent_name="bar", **kwargs): - super(Error_XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorX"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/bar/_error_y.py b/plotly/validators/bar/_error_y.py index 0d27d95c63..ef242da448 100644 --- a/plotly/validators/bar/_error_y.py +++ b/plotly/validators/bar/_error_y.py @@ -1,70 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_y", parent_name="bar", **kwargs): - super(Error_YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorY"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/bar/_hoverinfo.py b/plotly/validators/bar/_hoverinfo.py index 867db37826..f3b10b6eb5 100644 --- a/plotly/validators/bar/_hoverinfo.py +++ b/plotly/validators/bar/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="bar", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/bar/_hoverinfosrc.py b/plotly/validators/bar/_hoverinfosrc.py index 8cb8cec131..ef8a525d0c 100644 --- a/plotly/validators/bar/_hoverinfosrc.py +++ b/plotly/validators/bar/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="bar", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_hoverlabel.py b/plotly/validators/bar/_hoverlabel.py index 702f72613a..5dace5f5f3 100644 --- a/plotly/validators/bar/_hoverlabel.py +++ b/plotly/validators/bar/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="bar", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/bar/_hovertemplate.py b/plotly/validators/bar/_hovertemplate.py index 8e90cd0272..6b658d4cb8 100644 --- a/plotly/validators/bar/_hovertemplate.py +++ b/plotly/validators/bar/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="bar", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/bar/_hovertemplatesrc.py b/plotly/validators/bar/_hovertemplatesrc.py index 69cbf69851..90378ba5de 100644 --- a/plotly/validators/bar/_hovertemplatesrc.py +++ b/plotly/validators/bar/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="bar", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_hovertext.py b/plotly/validators/bar/_hovertext.py index 01550e746b..f7d8ee825d 100644 --- a/plotly/validators/bar/_hovertext.py +++ b/plotly/validators/bar/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="bar", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/_hovertextsrc.py b/plotly/validators/bar/_hovertextsrc.py index 753980999b..bb208eeced 100644 --- a/plotly/validators/bar/_hovertextsrc.py +++ b/plotly/validators/bar/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="bar", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_ids.py b/plotly/validators/bar/_ids.py index 321a2b976f..d9b470ab7b 100644 --- a/plotly/validators/bar/_ids.py +++ b/plotly/validators/bar/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="bar", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/_idssrc.py b/plotly/validators/bar/_idssrc.py index 198c60ea60..af1bdb4ad1 100644 --- a/plotly/validators/bar/_idssrc.py +++ b/plotly/validators/bar/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="bar", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_insidetextanchor.py b/plotly/validators/bar/_insidetextanchor.py index 0dcbe0aafa..b2bde175f8 100644 --- a/plotly/validators/bar/_insidetextanchor.py +++ b/plotly/validators/bar/_insidetextanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class InsidetextanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="insidetextanchor", parent_name="bar", **kwargs): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["end", "middle", "start"]), **kwargs, diff --git a/plotly/validators/bar/_insidetextfont.py b/plotly/validators/bar/_insidetextfont.py index 6235a6e486..538966ed1e 100644 --- a/plotly/validators/bar/_insidetextfont.py +++ b/plotly/validators/bar/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="bar", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/bar/_legend.py b/plotly/validators/bar/_legend.py index 81e028057c..33d4d781e2 100644 --- a/plotly/validators/bar/_legend.py +++ b/plotly/validators/bar/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="bar", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/_legendgroup.py b/plotly/validators/bar/_legendgroup.py index 5242235527..dbd8294b9c 100644 --- a/plotly/validators/bar/_legendgroup.py +++ b/plotly/validators/bar/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="bar", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/_legendgrouptitle.py b/plotly/validators/bar/_legendgrouptitle.py index 9500b982d5..909ba4351f 100644 --- a/plotly/validators/bar/_legendgrouptitle.py +++ b/plotly/validators/bar/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="bar", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/bar/_legendrank.py b/plotly/validators/bar/_legendrank.py index e92f1f374b..55ef66852a 100644 --- a/plotly/validators/bar/_legendrank.py +++ b/plotly/validators/bar/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="bar", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/_legendwidth.py b/plotly/validators/bar/_legendwidth.py index 4e7854401f..d441c66c98 100644 --- a/plotly/validators/bar/_legendwidth.py +++ b/plotly/validators/bar/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="bar", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/_marker.py b/plotly/validators/bar/_marker.py index 08d21a4439..5fd462ad12 100644 --- a/plotly/validators/bar/_marker.py +++ b/plotly/validators/bar/_marker.py @@ -1,118 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="bar", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.bar.marker.ColorBa - r` instance or dict with compatible properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - cornerradius - Sets the rounding of corners. May be an integer - number of pixels, or a percentage of bar width - (as a string ending in %). Defaults to - `layout.barcornerradius`. In stack or relative - barmode, the first trace to set cornerradius is - used for the whole stack. - line - :class:`plotly.graph_objects.bar.marker.Line` - instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/bar/_meta.py b/plotly/validators/bar/_meta.py index ef0ae4f75c..4639089aa4 100644 --- a/plotly/validators/bar/_meta.py +++ b/plotly/validators/bar/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="bar", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/bar/_metasrc.py b/plotly/validators/bar/_metasrc.py index f145bbe6ba..68736a48fb 100644 --- a/plotly/validators/bar/_metasrc.py +++ b/plotly/validators/bar/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="bar", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_name.py b/plotly/validators/bar/_name.py index a5c39d828e..c719aec78c 100644 --- a/plotly/validators/bar/_name.py +++ b/plotly/validators/bar/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="bar", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/_offset.py b/plotly/validators/bar/_offset.py index 97eaa5fc92..054964d373 100644 --- a/plotly/validators/bar/_offset.py +++ b/plotly/validators/bar/_offset.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__(self, plotly_name="offset", parent_name="bar", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/_offsetgroup.py b/plotly/validators/bar/_offsetgroup.py index 27143f915b..d631ad6ea8 100644 --- a/plotly/validators/bar/_offsetgroup.py +++ b/plotly/validators/bar/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="bar", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_offsetsrc.py b/plotly/validators/bar/_offsetsrc.py index f4a2749b0c..9d5c56fab6 100644 --- a/plotly/validators/bar/_offsetsrc.py +++ b/plotly/validators/bar/_offsetsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OffsetsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="offsetsrc", parent_name="bar", **kwargs): - super(OffsetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_opacity.py b/plotly/validators/bar/_opacity.py index 616a651834..c2e66236af 100644 --- a/plotly/validators/bar/_opacity.py +++ b/plotly/validators/bar/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="bar", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/_orientation.py b/plotly/validators/bar/_orientation.py index bdae787bd4..1c89aa76ba 100644 --- a/plotly/validators/bar/_orientation.py +++ b/plotly/validators/bar/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="bar", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/bar/_outsidetextfont.py b/plotly/validators/bar/_outsidetextfont.py index 5910716f5a..cffb96dbd3 100644 --- a/plotly/validators/bar/_outsidetextfont.py +++ b/plotly/validators/bar/_outsidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="outsidetextfont", parent_name="bar", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/bar/_selected.py b/plotly/validators/bar/_selected.py index cbe89b4db7..bd3d6f34bf 100644 --- a/plotly/validators/bar/_selected.py +++ b/plotly/validators/bar/_selected.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="bar", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.bar.selected.Marke - r` instance or dict with compatible properties - textfont - :class:`plotly.graph_objects.bar.selected.Textf - ont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/bar/_selectedpoints.py b/plotly/validators/bar/_selectedpoints.py index 8a35381e27..fdac13731b 100644 --- a/plotly/validators/bar/_selectedpoints.py +++ b/plotly/validators/bar/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="bar", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_showlegend.py b/plotly/validators/bar/_showlegend.py index 0b960cd3e9..fcef460ae7 100644 --- a/plotly/validators/bar/_showlegend.py +++ b/plotly/validators/bar/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="bar", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/_stream.py b/plotly/validators/bar/_stream.py index cd88e2d165..d74fb6463c 100644 --- a/plotly/validators/bar/_stream.py +++ b/plotly/validators/bar/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="bar", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/bar/_text.py b/plotly/validators/bar/_text.py index b160636bc3..38e5cfb301 100644 --- a/plotly/validators/bar/_text.py +++ b/plotly/validators/bar/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="bar", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/_textangle.py b/plotly/validators/bar/_textangle.py index 497870cb91..abd80a2999 100644 --- a/plotly/validators/bar/_textangle.py +++ b/plotly/validators/bar/_textangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="textangle", parent_name="bar", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/bar/_textfont.py b/plotly/validators/bar/_textfont.py index 385f6fcc4d..f06c527613 100644 --- a/plotly/validators/bar/_textfont.py +++ b/plotly/validators/bar/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="bar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/bar/_textposition.py b/plotly/validators/bar/_textposition.py index 6824e0998e..848c38ccd9 100644 --- a/plotly/validators/bar/_textposition.py +++ b/plotly/validators/bar/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="bar", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), diff --git a/plotly/validators/bar/_textpositionsrc.py b/plotly/validators/bar/_textpositionsrc.py index 31f0e4b317..16f7db3289 100644 --- a/plotly/validators/bar/_textpositionsrc.py +++ b/plotly/validators/bar/_textpositionsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textpositionsrc", parent_name="bar", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_textsrc.py b/plotly/validators/bar/_textsrc.py index fe8489b785..7494ed39cc 100644 --- a/plotly/validators/bar/_textsrc.py +++ b/plotly/validators/bar/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="bar", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_texttemplate.py b/plotly/validators/bar/_texttemplate.py index 265c623d0b..4f36ffc2f4 100644 --- a/plotly/validators/bar/_texttemplate.py +++ b/plotly/validators/bar/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="bar", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/bar/_texttemplatesrc.py b/plotly/validators/bar/_texttemplatesrc.py index b0100106ef..dadc694194 100644 --- a/plotly/validators/bar/_texttemplatesrc.py +++ b/plotly/validators/bar/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="bar", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_uid.py b/plotly/validators/bar/_uid.py index a7d8b47251..de80369a3b 100644 --- a/plotly/validators/bar/_uid.py +++ b/plotly/validators/bar/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="bar", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/bar/_uirevision.py b/plotly/validators/bar/_uirevision.py index b86c9c4caf..0fd978d3a1 100644 --- a/plotly/validators/bar/_uirevision.py +++ b/plotly/validators/bar/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="bar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_unselected.py b/plotly/validators/bar/_unselected.py index 7ac6e1cf2f..b0bc38fb9e 100644 --- a/plotly/validators/bar/_unselected.py +++ b/plotly/validators/bar/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="bar", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.bar.unselected.Mar - ker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.bar.unselected.Tex - tfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/bar/_visible.py b/plotly/validators/bar/_visible.py index fadd861c3b..2bd323456f 100644 --- a/plotly/validators/bar/_visible.py +++ b/plotly/validators/bar/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="bar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/bar/_width.py b/plotly/validators/bar/_width.py index 7aa8affd49..8e1dbbcad6 100644 --- a/plotly/validators/bar/_width.py +++ b/plotly/validators/bar/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="bar", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/_widthsrc.py b/plotly/validators/bar/_widthsrc.py index 00296c11f3..ba958f2405 100644 --- a/plotly/validators/bar/_widthsrc.py +++ b/plotly/validators/bar/_widthsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="widthsrc", parent_name="bar", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_x.py b/plotly/validators/bar/_x.py index 11de3a8357..8f79eff056 100644 --- a/plotly/validators/bar/_x.py +++ b/plotly/validators/bar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="bar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/bar/_x0.py b/plotly/validators/bar/_x0.py index 6391202546..57c57c593b 100644 --- a/plotly/validators/bar/_x0.py +++ b/plotly/validators/bar/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="bar", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/bar/_xaxis.py b/plotly/validators/bar/_xaxis.py index c29e53fdbf..6224632c9b 100644 --- a/plotly/validators/bar/_xaxis.py +++ b/plotly/validators/bar/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="bar", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/bar/_xcalendar.py b/plotly/validators/bar/_xcalendar.py index 3018735736..fdedf7ecdf 100644 --- a/plotly/validators/bar/_xcalendar.py +++ b/plotly/validators/bar/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="bar", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/bar/_xhoverformat.py b/plotly/validators/bar/_xhoverformat.py index 4c9fafd7f5..ce3f71e005 100644 --- a/plotly/validators/bar/_xhoverformat.py +++ b/plotly/validators/bar/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="bar", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_xperiod.py b/plotly/validators/bar/_xperiod.py index 09da5f1fb9..7d8f179481 100644 --- a/plotly/validators/bar/_xperiod.py +++ b/plotly/validators/bar/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="bar", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_xperiod0.py b/plotly/validators/bar/_xperiod0.py index 9b0d8b4daa..d818ecb520 100644 --- a/plotly/validators/bar/_xperiod0.py +++ b/plotly/validators/bar/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="bar", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_xperiodalignment.py b/plotly/validators/bar/_xperiodalignment.py index 1cbbe3811e..ceb3b49d67 100644 --- a/plotly/validators/bar/_xperiodalignment.py +++ b/plotly/validators/bar/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="bar", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/bar/_xsrc.py b/plotly/validators/bar/_xsrc.py index 2280a4303a..f50e48d7f3 100644 --- a/plotly/validators/bar/_xsrc.py +++ b/plotly/validators/bar/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="bar", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_y.py b/plotly/validators/bar/_y.py index ca53806e22..a2c3645226 100644 --- a/plotly/validators/bar/_y.py +++ b/plotly/validators/bar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="bar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/bar/_y0.py b/plotly/validators/bar/_y0.py index aa07a1fb20..77c6821743 100644 --- a/plotly/validators/bar/_y0.py +++ b/plotly/validators/bar/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="bar", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/bar/_yaxis.py b/plotly/validators/bar/_yaxis.py index cde2a362fb..fbde28473e 100644 --- a/plotly/validators/bar/_yaxis.py +++ b/plotly/validators/bar/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="bar", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/bar/_ycalendar.py b/plotly/validators/bar/_ycalendar.py index 83a9cbd651..7a6cac5d86 100644 --- a/plotly/validators/bar/_ycalendar.py +++ b/plotly/validators/bar/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="bar", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/bar/_yhoverformat.py b/plotly/validators/bar/_yhoverformat.py index d7a37be739..c8b3bd0267 100644 --- a/plotly/validators/bar/_yhoverformat.py +++ b/plotly/validators/bar/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="bar", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_yperiod.py b/plotly/validators/bar/_yperiod.py index 36187a6958..9ff133770e 100644 --- a/plotly/validators/bar/_yperiod.py +++ b/plotly/validators/bar/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="bar", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_yperiod0.py b/plotly/validators/bar/_yperiod0.py index 5787e5d5d2..4cc0d71e8a 100644 --- a/plotly/validators/bar/_yperiod0.py +++ b/plotly/validators/bar/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="bar", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/_yperiodalignment.py b/plotly/validators/bar/_yperiodalignment.py index f31d64f4cd..a0b0dc8a46 100644 --- a/plotly/validators/bar/_yperiodalignment.py +++ b/plotly/validators/bar/_yperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yperiodalignment", parent_name="bar", **kwargs): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/bar/_ysrc.py b/plotly/validators/bar/_ysrc.py index 174e8a9067..783e43e89f 100644 --- a/plotly/validators/bar/_ysrc.py +++ b/plotly/validators/bar/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="bar", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/_zorder.py b/plotly/validators/bar/_zorder.py index aed8610a6d..7ca4033fd8 100644 --- a/plotly/validators/bar/_zorder.py +++ b/plotly/validators/bar/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="bar", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/__init__.py b/plotly/validators/bar/error_x/__init__.py index 2e3ce59d75..62838bdb73 100644 --- a/plotly/validators/bar/error_x/__init__.py +++ b/plotly/validators/bar/error_x/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._copy_ystyle import Copy_YstyleValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._copy_ystyle.Copy_YstyleValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/bar/error_x/_array.py b/plotly/validators/bar/error_x/_array.py index f07bcc848c..a7a4e71fce 100644 --- a/plotly/validators/bar/error_x/_array.py +++ b/plotly/validators/bar/error_x/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="bar.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_arrayminus.py b/plotly/validators/bar/error_x/_arrayminus.py index 762d79517d..e05473355c 100644 --- a/plotly/validators/bar/error_x/_arrayminus.py +++ b/plotly/validators/bar/error_x/_arrayminus.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="arrayminus", parent_name="bar.error_x", **kwargs): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_arrayminussrc.py b/plotly/validators/bar/error_x/_arrayminussrc.py index 68ae194f8a..523d840151 100644 --- a/plotly/validators/bar/error_x/_arrayminussrc.py +++ b/plotly/validators/bar/error_x/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="bar.error_x", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_arraysrc.py b/plotly/validators/bar/error_x/_arraysrc.py index 2e5407c752..cfcd2676f3 100644 --- a/plotly/validators/bar/error_x/_arraysrc.py +++ b/plotly/validators/bar/error_x/_arraysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="arraysrc", parent_name="bar.error_x", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_color.py b/plotly/validators/bar/error_x/_color.py index 8137504294..926ebd0921 100644 --- a/plotly/validators/bar/error_x/_color.py +++ b/plotly/validators/bar/error_x/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="bar.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_copy_ystyle.py b/plotly/validators/bar/error_x/_copy_ystyle.py index 931ab66b6a..1a01236950 100644 --- a/plotly/validators/bar/error_x/_copy_ystyle.py +++ b/plotly/validators/bar/error_x/_copy_ystyle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): +class Copy_YstyleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="copy_ystyle", parent_name="bar.error_x", **kwargs): - super(Copy_YstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_symmetric.py b/plotly/validators/bar/error_x/_symmetric.py index 5c638bc087..66e1d5e78a 100644 --- a/plotly/validators/bar/error_x/_symmetric.py +++ b/plotly/validators/bar/error_x/_symmetric.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__(self, plotly_name="symmetric", parent_name="bar.error_x", **kwargs): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_thickness.py b/plotly/validators/bar/error_x/_thickness.py index 7c2072d34a..024bfa0e56 100644 --- a/plotly/validators/bar/error_x/_thickness.py +++ b/plotly/validators/bar/error_x/_thickness.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__(self, plotly_name="thickness", parent_name="bar.error_x", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_x/_traceref.py b/plotly/validators/bar/error_x/_traceref.py index 868d031cdf..c83c9163a6 100644 --- a/plotly/validators/bar/error_x/_traceref.py +++ b/plotly/validators/bar/error_x/_traceref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__(self, plotly_name="traceref", parent_name="bar.error_x", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_x/_tracerefminus.py b/plotly/validators/bar/error_x/_tracerefminus.py index 0d2f33e85d..59ff075bfc 100644 --- a/plotly/validators/bar/error_x/_tracerefminus.py +++ b/plotly/validators/bar/error_x/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="bar.error_x", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_x/_type.py b/plotly/validators/bar/error_x/_type.py index 12cc52ef43..f73aa09c97 100644 --- a/plotly/validators/bar/error_x/_type.py +++ b/plotly/validators/bar/error_x/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="bar.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/bar/error_x/_value.py b/plotly/validators/bar/error_x/_value.py index 340f71c585..9965d7e64d 100644 --- a/plotly/validators/bar/error_x/_value.py +++ b/plotly/validators/bar/error_x/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="bar.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_x/_valueminus.py b/plotly/validators/bar/error_x/_valueminus.py index e9925de8e1..eea1519cd6 100644 --- a/plotly/validators/bar/error_x/_valueminus.py +++ b/plotly/validators/bar/error_x/_valueminus.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__(self, plotly_name="valueminus", parent_name="bar.error_x", **kwargs): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_x/_visible.py b/plotly/validators/bar/error_x/_visible.py index 79f4ad008f..7be59c21c7 100644 --- a/plotly/validators/bar/error_x/_visible.py +++ b/plotly/validators/bar/error_x/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="bar.error_x", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_x/_width.py b/plotly/validators/bar/error_x/_width.py index b0e7efdd94..3866b521fe 100644 --- a/plotly/validators/bar/error_x/_width.py +++ b/plotly/validators/bar/error_x/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="bar.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_y/__init__.py b/plotly/validators/bar/error_y/__init__.py index eff09cd6a0..ea49850d5f 100644 --- a/plotly/validators/bar/error_y/__init__.py +++ b/plotly/validators/bar/error_y/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/bar/error_y/_array.py b/plotly/validators/bar/error_y/_array.py index 31f085ced7..8dab7f04fe 100644 --- a/plotly/validators/bar/error_y/_array.py +++ b/plotly/validators/bar/error_y/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="bar.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_arrayminus.py b/plotly/validators/bar/error_y/_arrayminus.py index 3b6605bda8..423bdffc15 100644 --- a/plotly/validators/bar/error_y/_arrayminus.py +++ b/plotly/validators/bar/error_y/_arrayminus.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="arrayminus", parent_name="bar.error_y", **kwargs): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_arrayminussrc.py b/plotly/validators/bar/error_y/_arrayminussrc.py index bf7c682490..a8c4333510 100644 --- a/plotly/validators/bar/error_y/_arrayminussrc.py +++ b/plotly/validators/bar/error_y/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="bar.error_y", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_arraysrc.py b/plotly/validators/bar/error_y/_arraysrc.py index 7d5f461276..04798eace6 100644 --- a/plotly/validators/bar/error_y/_arraysrc.py +++ b/plotly/validators/bar/error_y/_arraysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="arraysrc", parent_name="bar.error_y", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_color.py b/plotly/validators/bar/error_y/_color.py index 63a2d1c101..294000c450 100644 --- a/plotly/validators/bar/error_y/_color.py +++ b/plotly/validators/bar/error_y/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="bar.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_symmetric.py b/plotly/validators/bar/error_y/_symmetric.py index f5aad6348d..069b597a23 100644 --- a/plotly/validators/bar/error_y/_symmetric.py +++ b/plotly/validators/bar/error_y/_symmetric.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__(self, plotly_name="symmetric", parent_name="bar.error_y", **kwargs): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_thickness.py b/plotly/validators/bar/error_y/_thickness.py index 4cc0602e6e..fe598a806c 100644 --- a/plotly/validators/bar/error_y/_thickness.py +++ b/plotly/validators/bar/error_y/_thickness.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__(self, plotly_name="thickness", parent_name="bar.error_y", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_y/_traceref.py b/plotly/validators/bar/error_y/_traceref.py index c040e4fab7..74c3696f18 100644 --- a/plotly/validators/bar/error_y/_traceref.py +++ b/plotly/validators/bar/error_y/_traceref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__(self, plotly_name="traceref", parent_name="bar.error_y", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_y/_tracerefminus.py b/plotly/validators/bar/error_y/_tracerefminus.py index 9924af17a6..aa9268a301 100644 --- a/plotly/validators/bar/error_y/_tracerefminus.py +++ b/plotly/validators/bar/error_y/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="bar.error_y", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_y/_type.py b/plotly/validators/bar/error_y/_type.py index 21dfcee015..29492a5f8c 100644 --- a/plotly/validators/bar/error_y/_type.py +++ b/plotly/validators/bar/error_y/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="bar.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/bar/error_y/_value.py b/plotly/validators/bar/error_y/_value.py index 521dabdf8b..1093835064 100644 --- a/plotly/validators/bar/error_y/_value.py +++ b/plotly/validators/bar/error_y/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="bar.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_y/_valueminus.py b/plotly/validators/bar/error_y/_valueminus.py index 16b77f3c14..9f6ca812a9 100644 --- a/plotly/validators/bar/error_y/_valueminus.py +++ b/plotly/validators/bar/error_y/_valueminus.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__(self, plotly_name="valueminus", parent_name="bar.error_y", **kwargs): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/error_y/_visible.py b/plotly/validators/bar/error_y/_visible.py index 5d3453b0d0..5f2e68309d 100644 --- a/plotly/validators/bar/error_y/_visible.py +++ b/plotly/validators/bar/error_y/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="bar.error_y", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/error_y/_width.py b/plotly/validators/bar/error_y/_width.py index 8306a787d3..3204413abd 100644 --- a/plotly/validators/bar/error_y/_width.py +++ b/plotly/validators/bar/error_y/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="bar.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/hoverlabel/__init__.py b/plotly/validators/bar/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/bar/hoverlabel/__init__.py +++ b/plotly/validators/bar/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/bar/hoverlabel/_align.py b/plotly/validators/bar/hoverlabel/_align.py index 5b85aada0b..2a8cc721bf 100644 --- a/plotly/validators/bar/hoverlabel/_align.py +++ b/plotly/validators/bar/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="bar.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/bar/hoverlabel/_alignsrc.py b/plotly/validators/bar/hoverlabel/_alignsrc.py index 1936477839..a92a6a6b9d 100644 --- a/plotly/validators/bar/hoverlabel/_alignsrc.py +++ b/plotly/validators/bar/hoverlabel/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="bar.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/_bgcolor.py b/plotly/validators/bar/hoverlabel/_bgcolor.py index 5c1cd30b77..a62eff6a53 100644 --- a/plotly/validators/bar/hoverlabel/_bgcolor.py +++ b/plotly/validators/bar/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="bar.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/bar/hoverlabel/_bgcolorsrc.py b/plotly/validators/bar/hoverlabel/_bgcolorsrc.py index 52bb4c8ada..f7c8893077 100644 --- a/plotly/validators/bar/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/bar/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="bar.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/_bordercolor.py b/plotly/validators/bar/hoverlabel/_bordercolor.py index 61eeca39f5..b088e84cbe 100644 --- a/plotly/validators/bar/hoverlabel/_bordercolor.py +++ b/plotly/validators/bar/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="bar.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/bar/hoverlabel/_bordercolorsrc.py b/plotly/validators/bar/hoverlabel/_bordercolorsrc.py index e3612555c4..3333aaa275 100644 --- a/plotly/validators/bar/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/bar/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="bar.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/_font.py b/plotly/validators/bar/hoverlabel/_font.py index 4502e73540..a6474a9701 100644 --- a/plotly/validators/bar/hoverlabel/_font.py +++ b/plotly/validators/bar/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="bar.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/bar/hoverlabel/_namelength.py b/plotly/validators/bar/hoverlabel/_namelength.py index deecf475f9..eeec8979db 100644 --- a/plotly/validators/bar/hoverlabel/_namelength.py +++ b/plotly/validators/bar/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="bar.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/bar/hoverlabel/_namelengthsrc.py b/plotly/validators/bar/hoverlabel/_namelengthsrc.py index e3dc7e34ee..309a9ed923 100644 --- a/plotly/validators/bar/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/bar/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="bar.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/__init__.py b/plotly/validators/bar/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/bar/hoverlabel/font/__init__.py +++ b/plotly/validators/bar/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/hoverlabel/font/_color.py b/plotly/validators/bar/hoverlabel/font/_color.py index ec600f7127..f9f1d9dcb7 100644 --- a/plotly/validators/bar/hoverlabel/font/_color.py +++ b/plotly/validators/bar/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/bar/hoverlabel/font/_colorsrc.py b/plotly/validators/bar/hoverlabel/font/_colorsrc.py index c9026f36cf..0aa6f8f097 100644 --- a/plotly/validators/bar/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/bar/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_family.py b/plotly/validators/bar/hoverlabel/font/_family.py index 8ce9c0474c..eba5ae4b55 100644 --- a/plotly/validators/bar/hoverlabel/font/_family.py +++ b/plotly/validators/bar/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="bar.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/bar/hoverlabel/font/_familysrc.py b/plotly/validators/bar/hoverlabel/font/_familysrc.py index 4f35a77503..e7542caff3 100644 --- a/plotly/validators/bar/hoverlabel/font/_familysrc.py +++ b/plotly/validators/bar/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_lineposition.py b/plotly/validators/bar/hoverlabel/font/_lineposition.py index 007cdf181f..5c112e19d3 100644 --- a/plotly/validators/bar/hoverlabel/font/_lineposition.py +++ b/plotly/validators/bar/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/bar/hoverlabel/font/_linepositionsrc.py b/plotly/validators/bar/hoverlabel/font/_linepositionsrc.py index bfac3c81ad..8b8a8e7718 100644 --- a/plotly/validators/bar/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/bar/hoverlabel/font/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_shadow.py b/plotly/validators/bar/hoverlabel/font/_shadow.py index 91752e8bee..27e68b8ea3 100644 --- a/plotly/validators/bar/hoverlabel/font/_shadow.py +++ b/plotly/validators/bar/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/bar/hoverlabel/font/_shadowsrc.py b/plotly/validators/bar/hoverlabel/font/_shadowsrc.py index 0d87bc22f5..5156a7a10d 100644 --- a/plotly/validators/bar/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/bar/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_size.py b/plotly/validators/bar/hoverlabel/font/_size.py index 9a5c81fa26..21e9a376d3 100644 --- a/plotly/validators/bar/hoverlabel/font/_size.py +++ b/plotly/validators/bar/hoverlabel/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="bar.hoverlabel.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/bar/hoverlabel/font/_sizesrc.py b/plotly/validators/bar/hoverlabel/font/_sizesrc.py index c55978c66e..905b5a1b39 100644 --- a/plotly/validators/bar/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/bar/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_style.py b/plotly/validators/bar/hoverlabel/font/_style.py index 6b9717a78e..c5a4e0a812 100644 --- a/plotly/validators/bar/hoverlabel/font/_style.py +++ b/plotly/validators/bar/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="bar.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/bar/hoverlabel/font/_stylesrc.py b/plotly/validators/bar/hoverlabel/font/_stylesrc.py index 0ed6844d92..3eef0500a9 100644 --- a/plotly/validators/bar/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/bar/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_textcase.py b/plotly/validators/bar/hoverlabel/font/_textcase.py index 2d7559f05c..a4d7e912e4 100644 --- a/plotly/validators/bar/hoverlabel/font/_textcase.py +++ b/plotly/validators/bar/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="bar.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/bar/hoverlabel/font/_textcasesrc.py b/plotly/validators/bar/hoverlabel/font/_textcasesrc.py index 7c09323e4e..c195719de5 100644 --- a/plotly/validators/bar/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/bar/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_variant.py b/plotly/validators/bar/hoverlabel/font/_variant.py index b5d5150a29..77be9e1ce9 100644 --- a/plotly/validators/bar/hoverlabel/font/_variant.py +++ b/plotly/validators/bar/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="bar.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/bar/hoverlabel/font/_variantsrc.py b/plotly/validators/bar/hoverlabel/font/_variantsrc.py index 2e36ec85fc..21f52d86a3 100644 --- a/plotly/validators/bar/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/bar/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/hoverlabel/font/_weight.py b/plotly/validators/bar/hoverlabel/font/_weight.py index 79ee83df1b..dfd42818cb 100644 --- a/plotly/validators/bar/hoverlabel/font/_weight.py +++ b/plotly/validators/bar/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="bar.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/bar/hoverlabel/font/_weightsrc.py b/plotly/validators/bar/hoverlabel/font/_weightsrc.py index aabcbb8c06..7b6159ea6e 100644 --- a/plotly/validators/bar/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/bar/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="bar.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/__init__.py b/plotly/validators/bar/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/bar/insidetextfont/__init__.py +++ b/plotly/validators/bar/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/insidetextfont/_color.py b/plotly/validators/bar/insidetextfont/_color.py index e4a3334fd8..4ce5cbfa2a 100644 --- a/plotly/validators/bar/insidetextfont/_color.py +++ b/plotly/validators/bar/insidetextfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="bar.insidetextfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/insidetextfont/_colorsrc.py b/plotly/validators/bar/insidetextfont/_colorsrc.py index 43615916f5..ceab704af1 100644 --- a/plotly/validators/bar/insidetextfont/_colorsrc.py +++ b/plotly/validators/bar/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="bar.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_family.py b/plotly/validators/bar/insidetextfont/_family.py index 705f9d7332..624642a538 100644 --- a/plotly/validators/bar/insidetextfont/_family.py +++ b/plotly/validators/bar/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="bar.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/bar/insidetextfont/_familysrc.py b/plotly/validators/bar/insidetextfont/_familysrc.py index a35011e40b..e88fdfac3d 100644 --- a/plotly/validators/bar/insidetextfont/_familysrc.py +++ b/plotly/validators/bar/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="bar.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_lineposition.py b/plotly/validators/bar/insidetextfont/_lineposition.py index fc9c74a27d..b6da23b024 100644 --- a/plotly/validators/bar/insidetextfont/_lineposition.py +++ b/plotly/validators/bar/insidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.insidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/bar/insidetextfont/_linepositionsrc.py b/plotly/validators/bar/insidetextfont/_linepositionsrc.py index 15948f678e..e3e8a6f4ae 100644 --- a/plotly/validators/bar/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/bar/insidetextfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="bar.insidetextfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_shadow.py b/plotly/validators/bar/insidetextfont/_shadow.py index 375090a768..1ed7aa673c 100644 --- a/plotly/validators/bar/insidetextfont/_shadow.py +++ b/plotly/validators/bar/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/insidetextfont/_shadowsrc.py b/plotly/validators/bar/insidetextfont/_shadowsrc.py index 60540f1d3b..98526577f7 100644 --- a/plotly/validators/bar/insidetextfont/_shadowsrc.py +++ b/plotly/validators/bar/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="bar.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_size.py b/plotly/validators/bar/insidetextfont/_size.py index 8e6a922ab1..1a2f8c1aea 100644 --- a/plotly/validators/bar/insidetextfont/_size.py +++ b/plotly/validators/bar/insidetextfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="bar.insidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/bar/insidetextfont/_sizesrc.py b/plotly/validators/bar/insidetextfont/_sizesrc.py index 53f7c8a195..47c5e8dd64 100644 --- a/plotly/validators/bar/insidetextfont/_sizesrc.py +++ b/plotly/validators/bar/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="bar.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_style.py b/plotly/validators/bar/insidetextfont/_style.py index 55d9947aa7..e91fe3b9c2 100644 --- a/plotly/validators/bar/insidetextfont/_style.py +++ b/plotly/validators/bar/insidetextfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="bar.insidetextfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/bar/insidetextfont/_stylesrc.py b/plotly/validators/bar/insidetextfont/_stylesrc.py index f88a26cd39..ba8fd87161 100644 --- a/plotly/validators/bar/insidetextfont/_stylesrc.py +++ b/plotly/validators/bar/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="bar.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_textcase.py b/plotly/validators/bar/insidetextfont/_textcase.py index d5948682e5..27b91e54a0 100644 --- a/plotly/validators/bar/insidetextfont/_textcase.py +++ b/plotly/validators/bar/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="bar.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/bar/insidetextfont/_textcasesrc.py b/plotly/validators/bar/insidetextfont/_textcasesrc.py index c505245de9..a7fd5675df 100644 --- a/plotly/validators/bar/insidetextfont/_textcasesrc.py +++ b/plotly/validators/bar/insidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="bar.insidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_variant.py b/plotly/validators/bar/insidetextfont/_variant.py index fc14ee7d69..c474f8442c 100644 --- a/plotly/validators/bar/insidetextfont/_variant.py +++ b/plotly/validators/bar/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="bar.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/bar/insidetextfont/_variantsrc.py b/plotly/validators/bar/insidetextfont/_variantsrc.py index 569ab9e0cf..4d8278c8bf 100644 --- a/plotly/validators/bar/insidetextfont/_variantsrc.py +++ b/plotly/validators/bar/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="bar.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/insidetextfont/_weight.py b/plotly/validators/bar/insidetextfont/_weight.py index c307665152..0db6de445f 100644 --- a/plotly/validators/bar/insidetextfont/_weight.py +++ b/plotly/validators/bar/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="bar.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/bar/insidetextfont/_weightsrc.py b/plotly/validators/bar/insidetextfont/_weightsrc.py index b483266fa9..007eb2c07b 100644 --- a/plotly/validators/bar/insidetextfont/_weightsrc.py +++ b/plotly/validators/bar/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="bar.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/legendgrouptitle/__init__.py b/plotly/validators/bar/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/bar/legendgrouptitle/__init__.py +++ b/plotly/validators/bar/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/bar/legendgrouptitle/_font.py b/plotly/validators/bar/legendgrouptitle/_font.py index 1e12588a83..f04ebb176d 100644 --- a/plotly/validators/bar/legendgrouptitle/_font.py +++ b/plotly/validators/bar/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="bar.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/bar/legendgrouptitle/_text.py b/plotly/validators/bar/legendgrouptitle/_text.py index e2d707f876..18c1cfaf97 100644 --- a/plotly/validators/bar/legendgrouptitle/_text.py +++ b/plotly/validators/bar/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="bar.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/legendgrouptitle/font/__init__.py b/plotly/validators/bar/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/bar/legendgrouptitle/font/__init__.py +++ b/plotly/validators/bar/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/legendgrouptitle/font/_color.py b/plotly/validators/bar/legendgrouptitle/font/_color.py index e11487a07e..08a20e7661 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_color.py +++ b/plotly/validators/bar/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/legendgrouptitle/font/_family.py b/plotly/validators/bar/legendgrouptitle/font/_family.py index c83f577e3a..a6de9fa401 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_family.py +++ b/plotly/validators/bar/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/bar/legendgrouptitle/font/_lineposition.py b/plotly/validators/bar/legendgrouptitle/font/_lineposition.py index 090b1d827f..60dcbf80de 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/bar/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/bar/legendgrouptitle/font/_shadow.py b/plotly/validators/bar/legendgrouptitle/font/_shadow.py index f96027b1b0..a770e7a2b6 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/bar/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/legendgrouptitle/font/_size.py b/plotly/validators/bar/legendgrouptitle/font/_size.py index dc2f56db96..2a9084886d 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_size.py +++ b/plotly/validators/bar/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/bar/legendgrouptitle/font/_style.py b/plotly/validators/bar/legendgrouptitle/font/_style.py index cb34f49562..b85b1cdb06 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_style.py +++ b/plotly/validators/bar/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/bar/legendgrouptitle/font/_textcase.py b/plotly/validators/bar/legendgrouptitle/font/_textcase.py index cdda04773c..bfa1f2da8f 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/bar/legendgrouptitle/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/bar/legendgrouptitle/font/_variant.py b/plotly/validators/bar/legendgrouptitle/font/_variant.py index e6fc43fb31..e2b2de832f 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_variant.py +++ b/plotly/validators/bar/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/bar/legendgrouptitle/font/_weight.py b/plotly/validators/bar/legendgrouptitle/font/_weight.py index 4028d48749..1e90c5afed 100644 --- a/plotly/validators/bar/legendgrouptitle/font/_weight.py +++ b/plotly/validators/bar/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="bar.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/bar/marker/__init__.py b/plotly/validators/bar/marker/__init__.py index 8f8e3d4a93..69ad877d80 100644 --- a/plotly/validators/bar/marker/__init__.py +++ b/plotly/validators/bar/marker/__init__.py @@ -1,47 +1,26 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._pattern import PatternValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._cornerradius import CornerradiusValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._pattern.PatternValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._cornerradius.CornerradiusValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pattern.PatternValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._cornerradius.CornerradiusValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/bar/marker/_autocolorscale.py b/plotly/validators/bar/marker/_autocolorscale.py index 3427fbf601..e4158aaeb3 100644 --- a/plotly/validators/bar/marker/_autocolorscale.py +++ b/plotly/validators/bar/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="bar.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/bar/marker/_cauto.py b/plotly/validators/bar/marker/_cauto.py index 00e27c9f3a..73f8fc6a8c 100644 --- a/plotly/validators/bar/marker/_cauto.py +++ b/plotly/validators/bar/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="bar.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/bar/marker/_cmax.py b/plotly/validators/bar/marker/_cmax.py index 2d937d74a0..284b79d621 100644 --- a/plotly/validators/bar/marker/_cmax.py +++ b/plotly/validators/bar/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="bar.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/bar/marker/_cmid.py b/plotly/validators/bar/marker/_cmid.py index 4bccb1831f..82c13e68ea 100644 --- a/plotly/validators/bar/marker/_cmid.py +++ b/plotly/validators/bar/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="bar.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/bar/marker/_cmin.py b/plotly/validators/bar/marker/_cmin.py index 3d3d12baa6..8d829a1f65 100644 --- a/plotly/validators/bar/marker/_cmin.py +++ b/plotly/validators/bar/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="bar.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/bar/marker/_color.py b/plotly/validators/bar/marker/_color.py index 000a617f32..80f2740ebc 100644 --- a/plotly/validators/bar/marker/_color.py +++ b/plotly/validators/bar/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="bar.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop("colorscale_path", "bar.marker.colorscale"), diff --git a/plotly/validators/bar/marker/_coloraxis.py b/plotly/validators/bar/marker/_coloraxis.py index 6308c4be1c..b754a2de3b 100644 --- a/plotly/validators/bar/marker/_coloraxis.py +++ b/plotly/validators/bar/marker/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="bar.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/bar/marker/_colorbar.py b/plotly/validators/bar/marker/_colorbar.py index 4155df5580..4198c92b9b 100644 --- a/plotly/validators/bar/marker/_colorbar.py +++ b/plotly/validators/bar/marker/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="bar.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.bar.mar - ker.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.bar.marker.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of bar.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.bar.marker.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/bar/marker/_colorscale.py b/plotly/validators/bar/marker/_colorscale.py index 32805483a4..a060ecefbf 100644 --- a/plotly/validators/bar/marker/_colorscale.py +++ b/plotly/validators/bar/marker/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="bar.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/bar/marker/_colorsrc.py b/plotly/validators/bar/marker/_colorsrc.py index eca2204e44..9f93933005 100644 --- a/plotly/validators/bar/marker/_colorsrc.py +++ b/plotly/validators/bar/marker/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="bar.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/_cornerradius.py b/plotly/validators/bar/marker/_cornerradius.py index 889051129c..b94415e9be 100644 --- a/plotly/validators/bar/marker/_cornerradius.py +++ b/plotly/validators/bar/marker/_cornerradius.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CornerradiusValidator(_plotly_utils.basevalidators.AnyValidator): +class CornerradiusValidator(_bv.AnyValidator): def __init__(self, plotly_name="cornerradius", parent_name="bar.marker", **kwargs): - super(CornerradiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/marker/_line.py b/plotly/validators/bar/marker/_line.py index 7a0fa50653..29a0eeccef 100644 --- a/plotly/validators/bar/marker/_line.py +++ b/plotly/validators/bar/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="bar.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/bar/marker/_opacity.py b/plotly/validators/bar/marker/_opacity.py index 0dbed4dd7e..54eb2e2d42 100644 --- a/plotly/validators/bar/marker/_opacity.py +++ b/plotly/validators/bar/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="bar.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/bar/marker/_opacitysrc.py b/plotly/validators/bar/marker/_opacitysrc.py index f4fff7ba6a..495899464c 100644 --- a/plotly/validators/bar/marker/_opacitysrc.py +++ b/plotly/validators/bar/marker/_opacitysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="opacitysrc", parent_name="bar.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/_pattern.py b/plotly/validators/bar/marker/_pattern.py index 07b9431191..2ec0b0379c 100644 --- a/plotly/validators/bar/marker/_pattern.py +++ b/plotly/validators/bar/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="bar.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/bar/marker/_reversescale.py b/plotly/validators/bar/marker/_reversescale.py index 87e1df93fa..b3b8b5f118 100644 --- a/plotly/validators/bar/marker/_reversescale.py +++ b/plotly/validators/bar/marker/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="bar.marker", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/bar/marker/_showscale.py b/plotly/validators/bar/marker/_showscale.py index f89c360ae8..626db5967d 100644 --- a/plotly/validators/bar/marker/_showscale.py +++ b/plotly/validators/bar/marker/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="bar.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/__init__.py b/plotly/validators/bar/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/bar/marker/colorbar/__init__.py +++ b/plotly/validators/bar/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/bar/marker/colorbar/_bgcolor.py b/plotly/validators/bar/marker/colorbar/_bgcolor.py index 87d8ddd5f2..f53c0aad9e 100644 --- a/plotly/validators/bar/marker/colorbar/_bgcolor.py +++ b/plotly/validators/bar/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="bar.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_bordercolor.py b/plotly/validators/bar/marker/colorbar/_bordercolor.py index 309f7eb65c..32c99f08aa 100644 --- a/plotly/validators/bar/marker/colorbar/_bordercolor.py +++ b/plotly/validators/bar/marker/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="bar.marker.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_borderwidth.py b/plotly/validators/bar/marker/colorbar/_borderwidth.py index fb311243c7..52a27b2715 100644 --- a/plotly/validators/bar/marker/colorbar/_borderwidth.py +++ b/plotly/validators/bar/marker/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="bar.marker.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_dtick.py b/plotly/validators/bar/marker/colorbar/_dtick.py index 342b57809d..ec6d45025a 100644 --- a/plotly/validators/bar/marker/colorbar/_dtick.py +++ b/plotly/validators/bar/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="bar.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_exponentformat.py b/plotly/validators/bar/marker/colorbar/_exponentformat.py index 5ed0f77e3a..1e1818792b 100644 --- a/plotly/validators/bar/marker/colorbar/_exponentformat.py +++ b/plotly/validators/bar/marker/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="bar.marker.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_labelalias.py b/plotly/validators/bar/marker/colorbar/_labelalias.py index 58f08b59ff..7f1868e4f8 100644 --- a/plotly/validators/bar/marker/colorbar/_labelalias.py +++ b/plotly/validators/bar/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="bar.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_len.py b/plotly/validators/bar/marker/colorbar/_len.py index 5111f984c4..c2758faa06 100644 --- a/plotly/validators/bar/marker/colorbar/_len.py +++ b/plotly/validators/bar/marker/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="bar.marker.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_lenmode.py b/plotly/validators/bar/marker/colorbar/_lenmode.py index 090299432d..530290f2aa 100644 --- a/plotly/validators/bar/marker/colorbar/_lenmode.py +++ b/plotly/validators/bar/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="bar.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_minexponent.py b/plotly/validators/bar/marker/colorbar/_minexponent.py index 1590bda863..b04859f3e3 100644 --- a/plotly/validators/bar/marker/colorbar/_minexponent.py +++ b/plotly/validators/bar/marker/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="bar.marker.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_nticks.py b/plotly/validators/bar/marker/colorbar/_nticks.py index 3ba23e297d..ec22ddb79a 100644 --- a/plotly/validators/bar/marker/colorbar/_nticks.py +++ b/plotly/validators/bar/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="bar.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_orientation.py b/plotly/validators/bar/marker/colorbar/_orientation.py index 439fa7b0d6..88375dd202 100644 --- a/plotly/validators/bar/marker/colorbar/_orientation.py +++ b/plotly/validators/bar/marker/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="bar.marker.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_outlinecolor.py b/plotly/validators/bar/marker/colorbar/_outlinecolor.py index 78330ffaef..f12daae243 100644 --- a/plotly/validators/bar/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/bar/marker/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="bar.marker.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_outlinewidth.py b/plotly/validators/bar/marker/colorbar/_outlinewidth.py index 54c5c36927..9b58f1e00d 100644 --- a/plotly/validators/bar/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/bar/marker/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="bar.marker.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_separatethousands.py b/plotly/validators/bar/marker/colorbar/_separatethousands.py index 31d071f1e1..0f2d938903 100644 --- a/plotly/validators/bar/marker/colorbar/_separatethousands.py +++ b/plotly/validators/bar/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="bar.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_showexponent.py b/plotly/validators/bar/marker/colorbar/_showexponent.py index 6da60dae8e..8b82b7e3e7 100644 --- a/plotly/validators/bar/marker/colorbar/_showexponent.py +++ b/plotly/validators/bar/marker/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="bar.marker.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_showticklabels.py b/plotly/validators/bar/marker/colorbar/_showticklabels.py index 41d65921d4..17095ed850 100644 --- a/plotly/validators/bar/marker/colorbar/_showticklabels.py +++ b/plotly/validators/bar/marker/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="bar.marker.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_showtickprefix.py b/plotly/validators/bar/marker/colorbar/_showtickprefix.py index 892554666c..20fecd0e8d 100644 --- a/plotly/validators/bar/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/bar/marker/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="bar.marker.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_showticksuffix.py b/plotly/validators/bar/marker/colorbar/_showticksuffix.py index 84c7eb4fb3..9ddf0cbe65 100644 --- a/plotly/validators/bar/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/bar/marker/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="bar.marker.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_thickness.py b/plotly/validators/bar/marker/colorbar/_thickness.py index 664c33c9b0..525753ece9 100644 --- a/plotly/validators/bar/marker/colorbar/_thickness.py +++ b/plotly/validators/bar/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="bar.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_thicknessmode.py b/plotly/validators/bar/marker/colorbar/_thicknessmode.py index 129a7e972a..dc69a935e5 100644 --- a/plotly/validators/bar/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/bar/marker/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="bar.marker.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_tick0.py b/plotly/validators/bar/marker/colorbar/_tick0.py index 6f949f131b..ce59b16ffa 100644 --- a/plotly/validators/bar/marker/colorbar/_tick0.py +++ b/plotly/validators/bar/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="bar.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_tickangle.py b/plotly/validators/bar/marker/colorbar/_tickangle.py index a4002dc912..2fff07d636 100644 --- a/plotly/validators/bar/marker/colorbar/_tickangle.py +++ b/plotly/validators/bar/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="bar.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_tickcolor.py b/plotly/validators/bar/marker/colorbar/_tickcolor.py index fa4e805bb6..a99c99b780 100644 --- a/plotly/validators/bar/marker/colorbar/_tickcolor.py +++ b/plotly/validators/bar/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="bar.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_tickfont.py b/plotly/validators/bar/marker/colorbar/_tickfont.py index b73e949eed..f83136347d 100644 --- a/plotly/validators/bar/marker/colorbar/_tickfont.py +++ b/plotly/validators/bar/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="bar.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_tickformat.py b/plotly/validators/bar/marker/colorbar/_tickformat.py index f8b126d9ad..73b479c49d 100644 --- a/plotly/validators/bar/marker/colorbar/_tickformat.py +++ b/plotly/validators/bar/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="bar.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py index 6398584338..07311ee47c 100644 --- a/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/bar/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="bar.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/bar/marker/colorbar/_tickformatstops.py b/plotly/validators/bar/marker/colorbar/_tickformatstops.py index 84d9dcfa42..7985836d1a 100644 --- a/plotly/validators/bar/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/bar/marker/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="bar.marker.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/bar/marker/colorbar/_ticklabeloverflow.py index 8f4306b30d..e7b5ff844d 100644 --- a/plotly/validators/bar/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/bar/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="bar.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_ticklabelposition.py b/plotly/validators/bar/marker/colorbar/_ticklabelposition.py index 3da79dcd03..0994bc67d0 100644 --- a/plotly/validators/bar/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/bar/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="bar.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/bar/marker/colorbar/_ticklabelstep.py b/plotly/validators/bar/marker/colorbar/_ticklabelstep.py index 7dda5eb2a0..5f5349da41 100644 --- a/plotly/validators/bar/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/bar/marker/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="bar.marker.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_ticklen.py b/plotly/validators/bar/marker/colorbar/_ticklen.py index d56749cc7c..fd3f378bdd 100644 --- a/plotly/validators/bar/marker/colorbar/_ticklen.py +++ b/plotly/validators/bar/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="bar.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_tickmode.py b/plotly/validators/bar/marker/colorbar/_tickmode.py index 112080de23..ad620f0073 100644 --- a/plotly/validators/bar/marker/colorbar/_tickmode.py +++ b/plotly/validators/bar/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="bar.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/bar/marker/colorbar/_tickprefix.py b/plotly/validators/bar/marker/colorbar/_tickprefix.py index 62ee4d2b8b..21648caaa6 100644 --- a/plotly/validators/bar/marker/colorbar/_tickprefix.py +++ b/plotly/validators/bar/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="bar.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_ticks.py b/plotly/validators/bar/marker/colorbar/_ticks.py index cede8bd688..6ba7f6552c 100644 --- a/plotly/validators/bar/marker/colorbar/_ticks.py +++ b/plotly/validators/bar/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="bar.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_ticksuffix.py b/plotly/validators/bar/marker/colorbar/_ticksuffix.py index 4fe862b540..2bb7f0ec41 100644 --- a/plotly/validators/bar/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/bar/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="bar.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_ticktext.py b/plotly/validators/bar/marker/colorbar/_ticktext.py index 0c86bcb17b..fa79a0b74f 100644 --- a/plotly/validators/bar/marker/colorbar/_ticktext.py +++ b/plotly/validators/bar/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="bar.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_ticktextsrc.py b/plotly/validators/bar/marker/colorbar/_ticktextsrc.py index 3b45f4d9c7..6b62d57868 100644 --- a/plotly/validators/bar/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/bar/marker/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="bar.marker.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_tickvals.py b/plotly/validators/bar/marker/colorbar/_tickvals.py index 55ef267a6d..9ae8199afd 100644 --- a/plotly/validators/bar/marker/colorbar/_tickvals.py +++ b/plotly/validators/bar/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="bar.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_tickvalssrc.py b/plotly/validators/bar/marker/colorbar/_tickvalssrc.py index 39fc27b4db..cf2d5c933a 100644 --- a/plotly/validators/bar/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/bar/marker/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="bar.marker.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_tickwidth.py b/plotly/validators/bar/marker/colorbar/_tickwidth.py index dce4b9578c..53a327740a 100644 --- a/plotly/validators/bar/marker/colorbar/_tickwidth.py +++ b/plotly/validators/bar/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="bar.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_title.py b/plotly/validators/bar/marker/colorbar/_title.py index cb47c32f1a..e1a34114cc 100644 --- a/plotly/validators/bar/marker/colorbar/_title.py +++ b/plotly/validators/bar/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="bar.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_x.py b/plotly/validators/bar/marker/colorbar/_x.py index f8cc0c516d..ba7d7ddb2e 100644 --- a/plotly/validators/bar/marker/colorbar/_x.py +++ b/plotly/validators/bar/marker/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="bar.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_xanchor.py b/plotly/validators/bar/marker/colorbar/_xanchor.py index ac443b16ea..c089f2abbd 100644 --- a/plotly/validators/bar/marker/colorbar/_xanchor.py +++ b/plotly/validators/bar/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="bar.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_xpad.py b/plotly/validators/bar/marker/colorbar/_xpad.py index 8c1888f8cc..c2405674df 100644 --- a/plotly/validators/bar/marker/colorbar/_xpad.py +++ b/plotly/validators/bar/marker/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="bar.marker.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_xref.py b/plotly/validators/bar/marker/colorbar/_xref.py index 732ea06b73..1cac4103ca 100644 --- a/plotly/validators/bar/marker/colorbar/_xref.py +++ b/plotly/validators/bar/marker/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="bar.marker.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_y.py b/plotly/validators/bar/marker/colorbar/_y.py index d8b1fdf0ec..ab1d786dd6 100644 --- a/plotly/validators/bar/marker/colorbar/_y.py +++ b/plotly/validators/bar/marker/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="bar.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/_yanchor.py b/plotly/validators/bar/marker/colorbar/_yanchor.py index 3178891622..222183e341 100644 --- a/plotly/validators/bar/marker/colorbar/_yanchor.py +++ b/plotly/validators/bar/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="bar.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_ypad.py b/plotly/validators/bar/marker/colorbar/_ypad.py index 67cd6d14d0..4079fea38c 100644 --- a/plotly/validators/bar/marker/colorbar/_ypad.py +++ b/plotly/validators/bar/marker/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="bar.marker.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/_yref.py b/plotly/validators/bar/marker/colorbar/_yref.py index 6409082484..e6cc167cb0 100644 --- a/plotly/validators/bar/marker/colorbar/_yref.py +++ b/plotly/validators/bar/marker/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="bar.marker.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/tickfont/__init__.py b/plotly/validators/bar/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_color.py b/plotly/validators/bar/marker/colorbar/tickfont/_color.py index 70f24e2c93..6dfa5d9172 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.marker.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_family.py b/plotly/validators/bar/marker/colorbar/tickfont/_family.py index 86e55813c1..e7dd6c4704 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="bar.marker.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/bar/marker/colorbar/tickfont/_lineposition.py index 49769a210f..32eede4946 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_shadow.py b/plotly/validators/bar/marker/colorbar/tickfont/_shadow.py index 4633af29b3..f1adbb1d6b 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.marker.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_size.py b/plotly/validators/bar/marker/colorbar/tickfont/_size.py index 0e6853f8b2..563f1dcd17 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="bar.marker.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_style.py b/plotly/validators/bar/marker/colorbar/tickfont/_style.py index ffe55fa9bb..c277f96417 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="bar.marker.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_textcase.py b/plotly/validators/bar/marker/colorbar/tickfont/_textcase.py index cf9ee8d0f5..a18c55e305 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="bar.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_variant.py b/plotly/validators/bar/marker/colorbar/tickfont/_variant.py index 6975504bf2..7acf6cfebb 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="bar.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/bar/marker/colorbar/tickfont/_weight.py b/plotly/validators/bar/marker/colorbar/tickfont/_weight.py index 197e064242..bc15ad43f1 100644 --- a/plotly/validators/bar/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/bar/marker/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="bar.marker.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/bar/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py index 5ce0669f8e..d9b4c2731b 100644 --- a/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="bar.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py index 5d0cef2821..1610a78efe 100644 --- a/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/bar/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="bar.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py b/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py index 9d75e33584..e75d7847db 100644 --- a/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/bar/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="bar.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py index ee5bacc8bb..9eb8cef88b 100644 --- a/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/bar/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="bar.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py b/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py index 1822265492..a9bbe61a70 100644 --- a/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/bar/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="bar.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/title/__init__.py b/plotly/validators/bar/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/bar/marker/colorbar/title/__init__.py +++ b/plotly/validators/bar/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/bar/marker/colorbar/title/_font.py b/plotly/validators/bar/marker/colorbar/title/_font.py index c477a242b4..94a3ff19e0 100644 --- a/plotly/validators/bar/marker/colorbar/title/_font.py +++ b/plotly/validators/bar/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="bar.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/title/_side.py b/plotly/validators/bar/marker/colorbar/title/_side.py index 4e07b00449..4100aaa1b3 100644 --- a/plotly/validators/bar/marker/colorbar/title/_side.py +++ b/plotly/validators/bar/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="bar.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/title/_text.py b/plotly/validators/bar/marker/colorbar/title/_text.py index 46d351d1e5..7cd87698b3 100644 --- a/plotly/validators/bar/marker/colorbar/title/_text.py +++ b/plotly/validators/bar/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="bar.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/title/font/__init__.py b/plotly/validators/bar/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/bar/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/marker/colorbar/title/font/_color.py b/plotly/validators/bar/marker/colorbar/title/font/_color.py index ce4585a51d..984cef8f20 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_color.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/title/font/_family.py b/plotly/validators/bar/marker/colorbar/title/font/_family.py index ae9a20ad46..3507ede5b9 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_family.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/bar/marker/colorbar/title/font/_lineposition.py b/plotly/validators/bar/marker/colorbar/title/font/_lineposition.py index 6c2e66429c..ebc79509f1 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/bar/marker/colorbar/title/font/_shadow.py b/plotly/validators/bar/marker/colorbar/title/font/_shadow.py index 0f51d82f97..b553f50901 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/bar/marker/colorbar/title/font/_size.py b/plotly/validators/bar/marker/colorbar/title/font/_size.py index 393f91e902..d7319a1706 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_size.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="bar.marker.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/title/font/_style.py b/plotly/validators/bar/marker/colorbar/title/font/_style.py index 3d235df56b..2fdf69c870 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_style.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/title/font/_textcase.py b/plotly/validators/bar/marker/colorbar/title/font/_textcase.py index 38d4fa4ff7..17c0908f36 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/bar/marker/colorbar/title/font/_variant.py b/plotly/validators/bar/marker/colorbar/title/font/_variant.py index 57f976bbe8..8b0eb70bbc 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/bar/marker/colorbar/title/font/_weight.py b/plotly/validators/bar/marker/colorbar/title/font/_weight.py index 6d9f231efc..51449e41df 100644 --- a/plotly/validators/bar/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/bar/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="bar.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/bar/marker/line/__init__.py b/plotly/validators/bar/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/bar/marker/line/__init__.py +++ b/plotly/validators/bar/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/bar/marker/line/_autocolorscale.py b/plotly/validators/bar/marker/line/_autocolorscale.py index 01e1d7f83a..11d1a6b17f 100644 --- a/plotly/validators/bar/marker/line/_autocolorscale.py +++ b/plotly/validators/bar/marker/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="bar.marker.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/bar/marker/line/_cauto.py b/plotly/validators/bar/marker/line/_cauto.py index 5b097579c2..8ece1f2993 100644 --- a/plotly/validators/bar/marker/line/_cauto.py +++ b/plotly/validators/bar/marker/line/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="bar.marker.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/bar/marker/line/_cmax.py b/plotly/validators/bar/marker/line/_cmax.py index 77f09c737b..aeb86997b7 100644 --- a/plotly/validators/bar/marker/line/_cmax.py +++ b/plotly/validators/bar/marker/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="bar.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/bar/marker/line/_cmid.py b/plotly/validators/bar/marker/line/_cmid.py index 5792aaa808..b330fc39a2 100644 --- a/plotly/validators/bar/marker/line/_cmid.py +++ b/plotly/validators/bar/marker/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="bar.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/bar/marker/line/_cmin.py b/plotly/validators/bar/marker/line/_cmin.py index c18678aa44..cdece5f257 100644 --- a/plotly/validators/bar/marker/line/_cmin.py +++ b/plotly/validators/bar/marker/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="bar.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/bar/marker/line/_color.py b/plotly/validators/bar/marker/line/_color.py index a4119ed532..700718467d 100644 --- a/plotly/validators/bar/marker/line/_color.py +++ b/plotly/validators/bar/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="bar.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop("colorscale_path", "bar.marker.line.colorscale"), diff --git a/plotly/validators/bar/marker/line/_coloraxis.py b/plotly/validators/bar/marker/line/_coloraxis.py index 3e2579a8fc..a9f118c1c8 100644 --- a/plotly/validators/bar/marker/line/_coloraxis.py +++ b/plotly/validators/bar/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="bar.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/bar/marker/line/_colorscale.py b/plotly/validators/bar/marker/line/_colorscale.py index 27453650ee..687cfd394a 100644 --- a/plotly/validators/bar/marker/line/_colorscale.py +++ b/plotly/validators/bar/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="bar.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/bar/marker/line/_colorsrc.py b/plotly/validators/bar/marker/line/_colorsrc.py index 22afdcb887..b08adde751 100644 --- a/plotly/validators/bar/marker/line/_colorsrc.py +++ b/plotly/validators/bar/marker/line/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="bar.marker.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/line/_reversescale.py b/plotly/validators/bar/marker/line/_reversescale.py index 1377e78c8a..02a44333cf 100644 --- a/plotly/validators/bar/marker/line/_reversescale.py +++ b/plotly/validators/bar/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="bar.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/bar/marker/line/_width.py b/plotly/validators/bar/marker/line/_width.py index 0ada8567f2..a918c1373a 100644 --- a/plotly/validators/bar/marker/line/_width.py +++ b/plotly/validators/bar/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="bar.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), diff --git a/plotly/validators/bar/marker/line/_widthsrc.py b/plotly/validators/bar/marker/line/_widthsrc.py index 40f1890123..0f88567e2d 100644 --- a/plotly/validators/bar/marker/line/_widthsrc.py +++ b/plotly/validators/bar/marker/line/_widthsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="widthsrc", parent_name="bar.marker.line", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/pattern/__init__.py b/plotly/validators/bar/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/bar/marker/pattern/__init__.py +++ b/plotly/validators/bar/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/bar/marker/pattern/_bgcolor.py b/plotly/validators/bar/marker/pattern/_bgcolor.py index db17a413ce..2d2a6ed8a5 100644 --- a/plotly/validators/bar/marker/pattern/_bgcolor.py +++ b/plotly/validators/bar/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="bar.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/marker/pattern/_bgcolorsrc.py b/plotly/validators/bar/marker/pattern/_bgcolorsrc.py index c30d7c95e9..921050e187 100644 --- a/plotly/validators/bar/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/bar/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="bar.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/pattern/_fgcolor.py b/plotly/validators/bar/marker/pattern/_fgcolor.py index c3b3726e05..3d04f45804 100644 --- a/plotly/validators/bar/marker/pattern/_fgcolor.py +++ b/plotly/validators/bar/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="bar.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/marker/pattern/_fgcolorsrc.py b/plotly/validators/bar/marker/pattern/_fgcolorsrc.py index fb0cf79964..69296300b3 100644 --- a/plotly/validators/bar/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/bar/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="bar.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/pattern/_fgopacity.py b/plotly/validators/bar/marker/pattern/_fgopacity.py index e6216c61a9..49801cfeab 100644 --- a/plotly/validators/bar/marker/pattern/_fgopacity.py +++ b/plotly/validators/bar/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="bar.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/marker/pattern/_fillmode.py b/plotly/validators/bar/marker/pattern/_fillmode.py index 533f8bdef7..166dfabd7d 100644 --- a/plotly/validators/bar/marker/pattern/_fillmode.py +++ b/plotly/validators/bar/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="bar.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/bar/marker/pattern/_shape.py b/plotly/validators/bar/marker/pattern/_shape.py index 9ed95d39bb..3086786107 100644 --- a/plotly/validators/bar/marker/pattern/_shape.py +++ b/plotly/validators/bar/marker/pattern/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="bar.marker.pattern", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/bar/marker/pattern/_shapesrc.py b/plotly/validators/bar/marker/pattern/_shapesrc.py index e3e6351d2e..801df42565 100644 --- a/plotly/validators/bar/marker/pattern/_shapesrc.py +++ b/plotly/validators/bar/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="bar.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/pattern/_size.py b/plotly/validators/bar/marker/pattern/_size.py index c46713a044..d9488107ef 100644 --- a/plotly/validators/bar/marker/pattern/_size.py +++ b/plotly/validators/bar/marker/pattern/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="bar.marker.pattern", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/marker/pattern/_sizesrc.py b/plotly/validators/bar/marker/pattern/_sizesrc.py index cc51f8f703..2fa05dc897 100644 --- a/plotly/validators/bar/marker/pattern/_sizesrc.py +++ b/plotly/validators/bar/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="bar.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/marker/pattern/_solidity.py b/plotly/validators/bar/marker/pattern/_solidity.py index 91c1088e7e..5503a9d85f 100644 --- a/plotly/validators/bar/marker/pattern/_solidity.py +++ b/plotly/validators/bar/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="bar.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/bar/marker/pattern/_soliditysrc.py b/plotly/validators/bar/marker/pattern/_soliditysrc.py index 97b7ca72fc..1385ccbfeb 100644 --- a/plotly/validators/bar/marker/pattern/_soliditysrc.py +++ b/plotly/validators/bar/marker/pattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="bar.marker.pattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/__init__.py b/plotly/validators/bar/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/bar/outsidetextfont/__init__.py +++ b/plotly/validators/bar/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/outsidetextfont/_color.py b/plotly/validators/bar/outsidetextfont/_color.py index f810277d92..c02711ad3e 100644 --- a/plotly/validators/bar/outsidetextfont/_color.py +++ b/plotly/validators/bar/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/outsidetextfont/_colorsrc.py b/plotly/validators/bar/outsidetextfont/_colorsrc.py index c63bb0d48a..4b96a2f933 100644 --- a/plotly/validators/bar/outsidetextfont/_colorsrc.py +++ b/plotly/validators/bar/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="bar.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_family.py b/plotly/validators/bar/outsidetextfont/_family.py index ba04e7afef..3e33a33fba 100644 --- a/plotly/validators/bar/outsidetextfont/_family.py +++ b/plotly/validators/bar/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="bar.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/bar/outsidetextfont/_familysrc.py b/plotly/validators/bar/outsidetextfont/_familysrc.py index ff178c5fa9..a9346f6ae3 100644 --- a/plotly/validators/bar/outsidetextfont/_familysrc.py +++ b/plotly/validators/bar/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="bar.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_lineposition.py b/plotly/validators/bar/outsidetextfont/_lineposition.py index 8af29c51b3..e9645e0731 100644 --- a/plotly/validators/bar/outsidetextfont/_lineposition.py +++ b/plotly/validators/bar/outsidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.outsidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/bar/outsidetextfont/_linepositionsrc.py b/plotly/validators/bar/outsidetextfont/_linepositionsrc.py index 330525401d..038e7b4296 100644 --- a/plotly/validators/bar/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/bar/outsidetextfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="bar.outsidetextfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_shadow.py b/plotly/validators/bar/outsidetextfont/_shadow.py index 8a148e4d70..191c905b37 100644 --- a/plotly/validators/bar/outsidetextfont/_shadow.py +++ b/plotly/validators/bar/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="bar.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/outsidetextfont/_shadowsrc.py b/plotly/validators/bar/outsidetextfont/_shadowsrc.py index a09eeb4c5a..fddccd5162 100644 --- a/plotly/validators/bar/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/bar/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="bar.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_size.py b/plotly/validators/bar/outsidetextfont/_size.py index 0f689cc8ed..ad5e1e5259 100644 --- a/plotly/validators/bar/outsidetextfont/_size.py +++ b/plotly/validators/bar/outsidetextfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="bar.outsidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/bar/outsidetextfont/_sizesrc.py b/plotly/validators/bar/outsidetextfont/_sizesrc.py index 72b786c3fe..f7faeed432 100644 --- a/plotly/validators/bar/outsidetextfont/_sizesrc.py +++ b/plotly/validators/bar/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="bar.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_style.py b/plotly/validators/bar/outsidetextfont/_style.py index ba5a9ba0c0..911dc89dca 100644 --- a/plotly/validators/bar/outsidetextfont/_style.py +++ b/plotly/validators/bar/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="bar.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/bar/outsidetextfont/_stylesrc.py b/plotly/validators/bar/outsidetextfont/_stylesrc.py index ec63bebdd0..127723ce94 100644 --- a/plotly/validators/bar/outsidetextfont/_stylesrc.py +++ b/plotly/validators/bar/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="bar.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_textcase.py b/plotly/validators/bar/outsidetextfont/_textcase.py index 5bf0002fee..f207148d2e 100644 --- a/plotly/validators/bar/outsidetextfont/_textcase.py +++ b/plotly/validators/bar/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="bar.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/bar/outsidetextfont/_textcasesrc.py b/plotly/validators/bar/outsidetextfont/_textcasesrc.py index d35b0b1acb..a305ba7a77 100644 --- a/plotly/validators/bar/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/bar/outsidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="bar.outsidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_variant.py b/plotly/validators/bar/outsidetextfont/_variant.py index a35838d2ce..18150c031d 100644 --- a/plotly/validators/bar/outsidetextfont/_variant.py +++ b/plotly/validators/bar/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="bar.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/bar/outsidetextfont/_variantsrc.py b/plotly/validators/bar/outsidetextfont/_variantsrc.py index c9069e7b89..08895df47d 100644 --- a/plotly/validators/bar/outsidetextfont/_variantsrc.py +++ b/plotly/validators/bar/outsidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="bar.outsidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/outsidetextfont/_weight.py b/plotly/validators/bar/outsidetextfont/_weight.py index 3eef854c20..978578593a 100644 --- a/plotly/validators/bar/outsidetextfont/_weight.py +++ b/plotly/validators/bar/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="bar.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/bar/outsidetextfont/_weightsrc.py b/plotly/validators/bar/outsidetextfont/_weightsrc.py index b29eaf336a..e33d917f20 100644 --- a/plotly/validators/bar/outsidetextfont/_weightsrc.py +++ b/plotly/validators/bar/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="bar.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/selected/__init__.py b/plotly/validators/bar/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/bar/selected/__init__.py +++ b/plotly/validators/bar/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/bar/selected/_marker.py b/plotly/validators/bar/selected/_marker.py index 32eba2a589..3a61d668b6 100644 --- a/plotly/validators/bar/selected/_marker.py +++ b/plotly/validators/bar/selected/_marker.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="bar.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. """, ), **kwargs, diff --git a/plotly/validators/bar/selected/_textfont.py b/plotly/validators/bar/selected/_textfont.py index 1f6c9d64b7..93df629a4b 100644 --- a/plotly/validators/bar/selected/_textfont.py +++ b/plotly/validators/bar/selected/_textfont.py @@ -1,17 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="bar.selected", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/bar/selected/marker/__init__.py b/plotly/validators/bar/selected/marker/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/bar/selected/marker/__init__.py +++ b/plotly/validators/bar/selected/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/bar/selected/marker/_color.py b/plotly/validators/bar/selected/marker/_color.py index e6bb2c9c58..bfe725ff0c 100644 --- a/plotly/validators/bar/selected/marker/_color.py +++ b/plotly/validators/bar/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/selected/marker/_opacity.py b/plotly/validators/bar/selected/marker/_opacity.py index e9ce475812..5c0406010e 100644 --- a/plotly/validators/bar/selected/marker/_opacity.py +++ b/plotly/validators/bar/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="bar.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/selected/textfont/__init__.py b/plotly/validators/bar/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/bar/selected/textfont/__init__.py +++ b/plotly/validators/bar/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/bar/selected/textfont/_color.py b/plotly/validators/bar/selected/textfont/_color.py index f2fd78a286..c2c3965a92 100644 --- a/plotly/validators/bar/selected/textfont/_color.py +++ b/plotly/validators/bar/selected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.selected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/stream/__init__.py b/plotly/validators/bar/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/bar/stream/__init__.py +++ b/plotly/validators/bar/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/bar/stream/_maxpoints.py b/plotly/validators/bar/stream/_maxpoints.py index d2dc00626d..2f52a931c9 100644 --- a/plotly/validators/bar/stream/_maxpoints.py +++ b/plotly/validators/bar/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="bar.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/stream/_token.py b/plotly/validators/bar/stream/_token.py index 5aeed749d6..fe1b388616 100644 --- a/plotly/validators/bar/stream/_token.py +++ b/plotly/validators/bar/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="bar.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/bar/textfont/__init__.py b/plotly/validators/bar/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/bar/textfont/__init__.py +++ b/plotly/validators/bar/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/bar/textfont/_color.py b/plotly/validators/bar/textfont/_color.py index 79644aa5a3..8fcb6e62c7 100644 --- a/plotly/validators/bar/textfont/_color.py +++ b/plotly/validators/bar/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="bar.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/bar/textfont/_colorsrc.py b/plotly/validators/bar/textfont/_colorsrc.py index 0ab662025c..32dbda1458 100644 --- a/plotly/validators/bar/textfont/_colorsrc.py +++ b/plotly/validators/bar/textfont/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="bar.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_family.py b/plotly/validators/bar/textfont/_family.py index 1ee78b440e..1a04daff36 100644 --- a/plotly/validators/bar/textfont/_family.py +++ b/plotly/validators/bar/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="bar.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/bar/textfont/_familysrc.py b/plotly/validators/bar/textfont/_familysrc.py index 878d83e8aa..deceacedf7 100644 --- a/plotly/validators/bar/textfont/_familysrc.py +++ b/plotly/validators/bar/textfont/_familysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="familysrc", parent_name="bar.textfont", **kwargs): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_lineposition.py b/plotly/validators/bar/textfont/_lineposition.py index bed0d04aa6..946853af52 100644 --- a/plotly/validators/bar/textfont/_lineposition.py +++ b/plotly/validators/bar/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="bar.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/bar/textfont/_linepositionsrc.py b/plotly/validators/bar/textfont/_linepositionsrc.py index c1c2a7b720..137e81c0fd 100644 --- a/plotly/validators/bar/textfont/_linepositionsrc.py +++ b/plotly/validators/bar/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="bar.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_shadow.py b/plotly/validators/bar/textfont/_shadow.py index 55c0e4ca68..34c350e8bb 100644 --- a/plotly/validators/bar/textfont/_shadow.py +++ b/plotly/validators/bar/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="bar.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/bar/textfont/_shadowsrc.py b/plotly/validators/bar/textfont/_shadowsrc.py index f189ea33d8..c02efa7a12 100644 --- a/plotly/validators/bar/textfont/_shadowsrc.py +++ b/plotly/validators/bar/textfont/_shadowsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="shadowsrc", parent_name="bar.textfont", **kwargs): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_size.py b/plotly/validators/bar/textfont/_size.py index 4fd24f5992..dffc282435 100644 --- a/plotly/validators/bar/textfont/_size.py +++ b/plotly/validators/bar/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="bar.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/bar/textfont/_sizesrc.py b/plotly/validators/bar/textfont/_sizesrc.py index cc8132d5b0..84fdf6b6a6 100644 --- a/plotly/validators/bar/textfont/_sizesrc.py +++ b/plotly/validators/bar/textfont/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="bar.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_style.py b/plotly/validators/bar/textfont/_style.py index 7242a00e7c..036b3af32d 100644 --- a/plotly/validators/bar/textfont/_style.py +++ b/plotly/validators/bar/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="bar.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/bar/textfont/_stylesrc.py b/plotly/validators/bar/textfont/_stylesrc.py index 313c820105..46bb531a9e 100644 --- a/plotly/validators/bar/textfont/_stylesrc.py +++ b/plotly/validators/bar/textfont/_stylesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="stylesrc", parent_name="bar.textfont", **kwargs): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_textcase.py b/plotly/validators/bar/textfont/_textcase.py index 70da6f7f43..d8e66e4692 100644 --- a/plotly/validators/bar/textfont/_textcase.py +++ b/plotly/validators/bar/textfont/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="bar.textfont", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/bar/textfont/_textcasesrc.py b/plotly/validators/bar/textfont/_textcasesrc.py index 64714087a8..c67e9aa028 100644 --- a/plotly/validators/bar/textfont/_textcasesrc.py +++ b/plotly/validators/bar/textfont/_textcasesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textcasesrc", parent_name="bar.textfont", **kwargs): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_variant.py b/plotly/validators/bar/textfont/_variant.py index dddda71860..ffd58e5487 100644 --- a/plotly/validators/bar/textfont/_variant.py +++ b/plotly/validators/bar/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="bar.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/bar/textfont/_variantsrc.py b/plotly/validators/bar/textfont/_variantsrc.py index f3aa16e901..2b33e66f87 100644 --- a/plotly/validators/bar/textfont/_variantsrc.py +++ b/plotly/validators/bar/textfont/_variantsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="variantsrc", parent_name="bar.textfont", **kwargs): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/textfont/_weight.py b/plotly/validators/bar/textfont/_weight.py index 80b816dfed..e389c113a1 100644 --- a/plotly/validators/bar/textfont/_weight.py +++ b/plotly/validators/bar/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="bar.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/bar/textfont/_weightsrc.py b/plotly/validators/bar/textfont/_weightsrc.py index 1fb08a92ef..3812bec5ab 100644 --- a/plotly/validators/bar/textfont/_weightsrc.py +++ b/plotly/validators/bar/textfont/_weightsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="weightsrc", parent_name="bar.textfont", **kwargs): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/bar/unselected/__init__.py b/plotly/validators/bar/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/bar/unselected/__init__.py +++ b/plotly/validators/bar/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/bar/unselected/_marker.py b/plotly/validators/bar/unselected/_marker.py index 2ee11271c7..f602f07f3d 100644 --- a/plotly/validators/bar/unselected/_marker.py +++ b/plotly/validators/bar/unselected/_marker.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="bar.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/bar/unselected/_textfont.py b/plotly/validators/bar/unselected/_textfont.py index 9609db7487..d754013989 100644 --- a/plotly/validators/bar/unselected/_textfont.py +++ b/plotly/validators/bar/unselected/_textfont.py @@ -1,18 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="bar.unselected", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/bar/unselected/marker/__init__.py b/plotly/validators/bar/unselected/marker/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/bar/unselected/marker/__init__.py +++ b/plotly/validators/bar/unselected/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/bar/unselected/marker/_color.py b/plotly/validators/bar/unselected/marker/_color.py index 59219f90af..2cabdb7a8d 100644 --- a/plotly/validators/bar/unselected/marker/_color.py +++ b/plotly/validators/bar/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/bar/unselected/marker/_opacity.py b/plotly/validators/bar/unselected/marker/_opacity.py index 283e9efabf..8d48b04155 100644 --- a/plotly/validators/bar/unselected/marker/_opacity.py +++ b/plotly/validators/bar/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="bar.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/bar/unselected/textfont/__init__.py b/plotly/validators/bar/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/bar/unselected/textfont/__init__.py +++ b/plotly/validators/bar/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/bar/unselected/textfont/_color.py b/plotly/validators/bar/unselected/textfont/_color.py index 1e969db592..0974b8f2ce 100644 --- a/plotly/validators/bar/unselected/textfont/_color.py +++ b/plotly/validators/bar/unselected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="bar.unselected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/__init__.py b/plotly/validators/barpolar/__init__.py index bb1ecd886b..75779f181d 100644 --- a/plotly/validators/barpolar/__init__.py +++ b/plotly/validators/barpolar/__init__.py @@ -1,107 +1,56 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._thetaunit import ThetaunitValidator - from ._thetasrc import ThetasrcValidator - from ._theta0 import Theta0Validator - from ._theta import ThetaValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._rsrc import RsrcValidator - from ._r0 import R0Validator - from ._r import RValidator - from ._opacity import OpacityValidator - from ._offsetsrc import OffsetsrcValidator - from ._offset import OffsetValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._dtheta import DthetaValidator - from ._dr import DrValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._basesrc import BasesrcValidator - from ._base import BaseValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._thetaunit.ThetaunitValidator", - "._thetasrc.ThetasrcValidator", - "._theta0.Theta0Validator", - "._theta.ThetaValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._rsrc.RsrcValidator", - "._r0.R0Validator", - "._r.RValidator", - "._opacity.OpacityValidator", - "._offsetsrc.OffsetsrcValidator", - "._offset.OffsetValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._dtheta.DthetaValidator", - "._dr.DrValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._basesrc.BasesrcValidator", - "._base.BaseValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._thetaunit.ThetaunitValidator", + "._thetasrc.ThetasrcValidator", + "._theta0.Theta0Validator", + "._theta.ThetaValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r0.R0Validator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._offsetsrc.OffsetsrcValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dtheta.DthetaValidator", + "._dr.DrValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._basesrc.BasesrcValidator", + "._base.BaseValidator", + ], +) diff --git a/plotly/validators/barpolar/_base.py b/plotly/validators/barpolar/_base.py index ac72c72f35..fe27b83974 100644 --- a/plotly/validators/barpolar/_base.py +++ b/plotly/validators/barpolar/_base.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaseValidator(_plotly_utils.basevalidators.AnyValidator): +class BaseValidator(_bv.AnyValidator): def __init__(self, plotly_name="base", parent_name="barpolar", **kwargs): - super(BaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/barpolar/_basesrc.py b/plotly/validators/barpolar/_basesrc.py index 3b77a8652a..2dfd179c7f 100644 --- a/plotly/validators/barpolar/_basesrc.py +++ b/plotly/validators/barpolar/_basesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BasesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="basesrc", parent_name="barpolar", **kwargs): - super(BasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_customdata.py b/plotly/validators/barpolar/_customdata.py index 4a2ed8cdc8..a5698cdc7b 100644 --- a/plotly/validators/barpolar/_customdata.py +++ b/plotly/validators/barpolar/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="barpolar", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/barpolar/_customdatasrc.py b/plotly/validators/barpolar/_customdatasrc.py index 6c574521f6..2689fd701d 100644 --- a/plotly/validators/barpolar/_customdatasrc.py +++ b/plotly/validators/barpolar/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="barpolar", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_dr.py b/plotly/validators/barpolar/_dr.py index 4c60f92e9e..809ac6cb61 100644 --- a/plotly/validators/barpolar/_dr.py +++ b/plotly/validators/barpolar/_dr.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DrValidator(_plotly_utils.basevalidators.NumberValidator): +class DrValidator(_bv.NumberValidator): def __init__(self, plotly_name="dr", parent_name="barpolar", **kwargs): - super(DrValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/barpolar/_dtheta.py b/plotly/validators/barpolar/_dtheta.py index dc98f72ce3..de7e68be4e 100644 --- a/plotly/validators/barpolar/_dtheta.py +++ b/plotly/validators/barpolar/_dtheta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): +class DthetaValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtheta", parent_name="barpolar", **kwargs): - super(DthetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/barpolar/_hoverinfo.py b/plotly/validators/barpolar/_hoverinfo.py index f8e222eb88..a98ab54e13 100644 --- a/plotly/validators/barpolar/_hoverinfo.py +++ b/plotly/validators/barpolar/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="barpolar", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/barpolar/_hoverinfosrc.py b/plotly/validators/barpolar/_hoverinfosrc.py index a6fc8c5471..91df0d6f7a 100644 --- a/plotly/validators/barpolar/_hoverinfosrc.py +++ b/plotly/validators/barpolar/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="barpolar", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_hoverlabel.py b/plotly/validators/barpolar/_hoverlabel.py index 42f3c3ebf6..ab782f0119 100644 --- a/plotly/validators/barpolar/_hoverlabel.py +++ b/plotly/validators/barpolar/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="barpolar", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/barpolar/_hovertemplate.py b/plotly/validators/barpolar/_hovertemplate.py index 19a99d888b..1c760e28be 100644 --- a/plotly/validators/barpolar/_hovertemplate.py +++ b/plotly/validators/barpolar/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="barpolar", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/barpolar/_hovertemplatesrc.py b/plotly/validators/barpolar/_hovertemplatesrc.py index 0ebd4ff86d..a9e73109b3 100644 --- a/plotly/validators/barpolar/_hovertemplatesrc.py +++ b/plotly/validators/barpolar/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="barpolar", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_hovertext.py b/plotly/validators/barpolar/_hovertext.py index d03039152d..5b8cbcd703 100644 --- a/plotly/validators/barpolar/_hovertext.py +++ b/plotly/validators/barpolar/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="barpolar", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/barpolar/_hovertextsrc.py b/plotly/validators/barpolar/_hovertextsrc.py index 61ab77b50f..3eb7673aeb 100644 --- a/plotly/validators/barpolar/_hovertextsrc.py +++ b/plotly/validators/barpolar/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="barpolar", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_ids.py b/plotly/validators/barpolar/_ids.py index 5417df6d08..1c59f192f1 100644 --- a/plotly/validators/barpolar/_ids.py +++ b/plotly/validators/barpolar/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="barpolar", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/barpolar/_idssrc.py b/plotly/validators/barpolar/_idssrc.py index 6c84093fe7..e7c5a07904 100644 --- a/plotly/validators/barpolar/_idssrc.py +++ b/plotly/validators/barpolar/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="barpolar", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_legend.py b/plotly/validators/barpolar/_legend.py index 3563b94928..8119155759 100644 --- a/plotly/validators/barpolar/_legend.py +++ b/plotly/validators/barpolar/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="barpolar", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/barpolar/_legendgroup.py b/plotly/validators/barpolar/_legendgroup.py index e987517b6a..1383cb0320 100644 --- a/plotly/validators/barpolar/_legendgroup.py +++ b/plotly/validators/barpolar/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="barpolar", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/_legendgrouptitle.py b/plotly/validators/barpolar/_legendgrouptitle.py index 8cb70c81d5..5c87915e07 100644 --- a/plotly/validators/barpolar/_legendgrouptitle.py +++ b/plotly/validators/barpolar/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="barpolar", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/barpolar/_legendrank.py b/plotly/validators/barpolar/_legendrank.py index eac54224ef..df7ac231d1 100644 --- a/plotly/validators/barpolar/_legendrank.py +++ b/plotly/validators/barpolar/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="barpolar", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/_legendwidth.py b/plotly/validators/barpolar/_legendwidth.py index c92b47e03f..d67d672909 100644 --- a/plotly/validators/barpolar/_legendwidth.py +++ b/plotly/validators/barpolar/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="barpolar", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/_marker.py b/plotly/validators/barpolar/_marker.py index e5bbec8ae4..d8c4c16b6b 100644 --- a/plotly/validators/barpolar/_marker.py +++ b/plotly/validators/barpolar/_marker.py @@ -1,112 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="barpolar", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.barpolar.marker.Co - lorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.barpolar.marker.Li - ne` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/barpolar/_meta.py b/plotly/validators/barpolar/_meta.py index 9cfc41ee2a..4618b418f5 100644 --- a/plotly/validators/barpolar/_meta.py +++ b/plotly/validators/barpolar/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="barpolar", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/barpolar/_metasrc.py b/plotly/validators/barpolar/_metasrc.py index abeff2fb5d..d1a6765eb4 100644 --- a/plotly/validators/barpolar/_metasrc.py +++ b/plotly/validators/barpolar/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="barpolar", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_name.py b/plotly/validators/barpolar/_name.py index 4aeeea2507..f7a5e9f35e 100644 --- a/plotly/validators/barpolar/_name.py +++ b/plotly/validators/barpolar/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="barpolar", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/_offset.py b/plotly/validators/barpolar/_offset.py index d1e8d56263..24f88f2b10 100644 --- a/plotly/validators/barpolar/_offset.py +++ b/plotly/validators/barpolar/_offset.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__(self, plotly_name="offset", parent_name="barpolar", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/barpolar/_offsetsrc.py b/plotly/validators/barpolar/_offsetsrc.py index 1917d722cf..3ee54bb678 100644 --- a/plotly/validators/barpolar/_offsetsrc.py +++ b/plotly/validators/barpolar/_offsetsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OffsetsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="offsetsrc", parent_name="barpolar", **kwargs): - super(OffsetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_opacity.py b/plotly/validators/barpolar/_opacity.py index 3dadedfcc2..66613797e7 100644 --- a/plotly/validators/barpolar/_opacity.py +++ b/plotly/validators/barpolar/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="barpolar", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/_r.py b/plotly/validators/barpolar/_r.py index 19991e14ad..25d632d368 100644 --- a/plotly/validators/barpolar/_r.py +++ b/plotly/validators/barpolar/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): +class RValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="r", parent_name="barpolar", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/barpolar/_r0.py b/plotly/validators/barpolar/_r0.py index 9d7d715669..6372e2658c 100644 --- a/plotly/validators/barpolar/_r0.py +++ b/plotly/validators/barpolar/_r0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class R0Validator(_plotly_utils.basevalidators.AnyValidator): +class R0Validator(_bv.AnyValidator): def __init__(self, plotly_name="r0", parent_name="barpolar", **kwargs): - super(R0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/barpolar/_rsrc.py b/plotly/validators/barpolar/_rsrc.py index 1b95b540ee..dd25a4861c 100644 --- a/plotly/validators/barpolar/_rsrc.py +++ b/plotly/validators/barpolar/_rsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="rsrc", parent_name="barpolar", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_selected.py b/plotly/validators/barpolar/_selected.py index ff6a794c8d..35c45da040 100644 --- a/plotly/validators/barpolar/_selected.py +++ b/plotly/validators/barpolar/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="barpolar", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.barpolar.selected. - Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.selected. - Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/barpolar/_selectedpoints.py b/plotly/validators/barpolar/_selectedpoints.py index 0f198b5d5d..b70eef9979 100644 --- a/plotly/validators/barpolar/_selectedpoints.py +++ b/plotly/validators/barpolar/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="barpolar", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/barpolar/_showlegend.py b/plotly/validators/barpolar/_showlegend.py index e13db2b1aa..41819c6476 100644 --- a/plotly/validators/barpolar/_showlegend.py +++ b/plotly/validators/barpolar/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="barpolar", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/_stream.py b/plotly/validators/barpolar/_stream.py index 630e892ce5..6b4f087a74 100644 --- a/plotly/validators/barpolar/_stream.py +++ b/plotly/validators/barpolar/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="barpolar", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/barpolar/_subplot.py b/plotly/validators/barpolar/_subplot.py index 3d4c909246..95d2be9383 100644 --- a/plotly/validators/barpolar/_subplot.py +++ b/plotly/validators/barpolar/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="barpolar", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "polar"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/barpolar/_text.py b/plotly/validators/barpolar/_text.py index 72b02b34bc..c0cd133982 100644 --- a/plotly/validators/barpolar/_text.py +++ b/plotly/validators/barpolar/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="barpolar", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/barpolar/_textsrc.py b/plotly/validators/barpolar/_textsrc.py index b086f454ee..b090827c01 100644 --- a/plotly/validators/barpolar/_textsrc.py +++ b/plotly/validators/barpolar/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="barpolar", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_theta.py b/plotly/validators/barpolar/_theta.py index db2f43243e..3b1e3d8266 100644 --- a/plotly/validators/barpolar/_theta.py +++ b/plotly/validators/barpolar/_theta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ThetaValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="theta", parent_name="barpolar", **kwargs): - super(ThetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/barpolar/_theta0.py b/plotly/validators/barpolar/_theta0.py index ecbfacf22c..cdfa1e4f8d 100644 --- a/plotly/validators/barpolar/_theta0.py +++ b/plotly/validators/barpolar/_theta0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): +class Theta0Validator(_bv.AnyValidator): def __init__(self, plotly_name="theta0", parent_name="barpolar", **kwargs): - super(Theta0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/barpolar/_thetasrc.py b/plotly/validators/barpolar/_thetasrc.py index 78bd2754bb..df918bbcc1 100644 --- a/plotly/validators/barpolar/_thetasrc.py +++ b/plotly/validators/barpolar/_thetasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ThetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="thetasrc", parent_name="barpolar", **kwargs): - super(ThetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_thetaunit.py b/plotly/validators/barpolar/_thetaunit.py index 206be95acb..93f1618f78 100644 --- a/plotly/validators/barpolar/_thetaunit.py +++ b/plotly/validators/barpolar/_thetaunit.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThetaunitValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="thetaunit", parent_name="barpolar", **kwargs): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["radians", "degrees", "gradians"]), **kwargs, diff --git a/plotly/validators/barpolar/_uid.py b/plotly/validators/barpolar/_uid.py index b249b5e9f9..58f6dcc835 100644 --- a/plotly/validators/barpolar/_uid.py +++ b/plotly/validators/barpolar/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="barpolar", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/barpolar/_uirevision.py b/plotly/validators/barpolar/_uirevision.py index 47f4a15c65..684ad2c939 100644 --- a/plotly/validators/barpolar/_uirevision.py +++ b/plotly/validators/barpolar/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="barpolar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/_unselected.py b/plotly/validators/barpolar/_unselected.py index 7b3dfcc64a..262e707dda 100644 --- a/plotly/validators/barpolar/_unselected.py +++ b/plotly/validators/barpolar/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="barpolar", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.barpolar.unselecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.barpolar.unselecte - d.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/barpolar/_visible.py b/plotly/validators/barpolar/_visible.py index 84b34b54c3..6e5291fb2c 100644 --- a/plotly/validators/barpolar/_visible.py +++ b/plotly/validators/barpolar/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="barpolar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/barpolar/_width.py b/plotly/validators/barpolar/_width.py index 456f8d5152..2e2e75a822 100644 --- a/plotly/validators/barpolar/_width.py +++ b/plotly/validators/barpolar/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="barpolar", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/_widthsrc.py b/plotly/validators/barpolar/_widthsrc.py index 4b0a07f8f6..8dea421c5a 100644 --- a/plotly/validators/barpolar/_widthsrc.py +++ b/plotly/validators/barpolar/_widthsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="widthsrc", parent_name="barpolar", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/__init__.py b/plotly/validators/barpolar/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/barpolar/hoverlabel/__init__.py +++ b/plotly/validators/barpolar/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/barpolar/hoverlabel/_align.py b/plotly/validators/barpolar/hoverlabel/_align.py index 7bc89113be..c8a17d7e6d 100644 --- a/plotly/validators/barpolar/hoverlabel/_align.py +++ b/plotly/validators/barpolar/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="barpolar.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/barpolar/hoverlabel/_alignsrc.py b/plotly/validators/barpolar/hoverlabel/_alignsrc.py index 3482b47212..4430c9ed5f 100644 --- a/plotly/validators/barpolar/hoverlabel/_alignsrc.py +++ b/plotly/validators/barpolar/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="barpolar.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/_bgcolor.py b/plotly/validators/barpolar/hoverlabel/_bgcolor.py index f7b09cd5a9..400830f8f9 100644 --- a/plotly/validators/barpolar/hoverlabel/_bgcolor.py +++ b/plotly/validators/barpolar/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="barpolar.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py b/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py index be26dbaec6..44bbdf321b 100644 --- a/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/barpolar/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="barpolar.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/_bordercolor.py b/plotly/validators/barpolar/hoverlabel/_bordercolor.py index 59ec3897a4..6fdb5d30c5 100644 --- a/plotly/validators/barpolar/hoverlabel/_bordercolor.py +++ b/plotly/validators/barpolar/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="barpolar.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py b/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py index 0b482d46f6..b249c4d419 100644 --- a/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/barpolar/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="barpolar.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/_font.py b/plotly/validators/barpolar/hoverlabel/_font.py index f529b520e5..2135f2d9d2 100644 --- a/plotly/validators/barpolar/hoverlabel/_font.py +++ b/plotly/validators/barpolar/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="barpolar.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/barpolar/hoverlabel/_namelength.py b/plotly/validators/barpolar/hoverlabel/_namelength.py index d01f5a9e7f..3d150f6a6f 100644 --- a/plotly/validators/barpolar/hoverlabel/_namelength.py +++ b/plotly/validators/barpolar/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="barpolar.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py b/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py index 6f3150022e..2c37144427 100644 --- a/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/barpolar/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="barpolar.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/__init__.py b/plotly/validators/barpolar/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/barpolar/hoverlabel/font/__init__.py +++ b/plotly/validators/barpolar/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/barpolar/hoverlabel/font/_color.py b/plotly/validators/barpolar/hoverlabel/font/_color.py index 241cb12e50..d36d11c9b6 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_color.py +++ b/plotly/validators/barpolar/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py b/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py index 3ce150eece..662afe6e57 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_family.py b/plotly/validators/barpolar/hoverlabel/font/_family.py index 1e7415e4c8..a2304cee75 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_family.py +++ b/plotly/validators/barpolar/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/barpolar/hoverlabel/font/_familysrc.py b/plotly/validators/barpolar/hoverlabel/font/_familysrc.py index bf5b1d3d3e..81697ff955 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_familysrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_lineposition.py b/plotly/validators/barpolar/hoverlabel/font/_lineposition.py index e5019fd042..ec5ccbeb04 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_lineposition.py +++ b/plotly/validators/barpolar/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="barpolar.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/barpolar/hoverlabel/font/_linepositionsrc.py b/plotly/validators/barpolar/hoverlabel/font/_linepositionsrc.py index a06da6ecc1..3a54125842 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="barpolar.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_shadow.py b/plotly/validators/barpolar/hoverlabel/font/_shadow.py index d3d2015544..ece955fcfa 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_shadow.py +++ b/plotly/validators/barpolar/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/barpolar/hoverlabel/font/_shadowsrc.py b/plotly/validators/barpolar/hoverlabel/font/_shadowsrc.py index b410217dff..b21946f43f 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_size.py b/plotly/validators/barpolar/hoverlabel/font/_size.py index c9a57903e8..54172a1d5c 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_size.py +++ b/plotly/validators/barpolar/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py b/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py index 22553161cf..8c45e8aab9 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_style.py b/plotly/validators/barpolar/hoverlabel/font/_style.py index 4f686c36ce..8d60b1ede3 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_style.py +++ b/plotly/validators/barpolar/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/barpolar/hoverlabel/font/_stylesrc.py b/plotly/validators/barpolar/hoverlabel/font/_stylesrc.py index e8d0156091..95772cdcbd 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_textcase.py b/plotly/validators/barpolar/hoverlabel/font/_textcase.py index cb42bdd372..bfd0e92b63 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_textcase.py +++ b/plotly/validators/barpolar/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/barpolar/hoverlabel/font/_textcasesrc.py b/plotly/validators/barpolar/hoverlabel/font/_textcasesrc.py index bb8bee4bf5..abf17285a2 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="barpolar.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_variant.py b/plotly/validators/barpolar/hoverlabel/font/_variant.py index 431e17d43f..e292b0a722 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_variant.py +++ b/plotly/validators/barpolar/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/barpolar/hoverlabel/font/_variantsrc.py b/plotly/validators/barpolar/hoverlabel/font/_variantsrc.py index 387d8294cc..dbd23422ac 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/hoverlabel/font/_weight.py b/plotly/validators/barpolar/hoverlabel/font/_weight.py index e7bfbb1d06..b050f41659 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_weight.py +++ b/plotly/validators/barpolar/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/barpolar/hoverlabel/font/_weightsrc.py b/plotly/validators/barpolar/hoverlabel/font/_weightsrc.py index 5e3f309dd7..6d437700fc 100644 --- a/plotly/validators/barpolar/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/barpolar/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="barpolar.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/legendgrouptitle/__init__.py b/plotly/validators/barpolar/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/barpolar/legendgrouptitle/__init__.py +++ b/plotly/validators/barpolar/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/barpolar/legendgrouptitle/_font.py b/plotly/validators/barpolar/legendgrouptitle/_font.py index a164b0cd7f..a99a4edee1 100644 --- a/plotly/validators/barpolar/legendgrouptitle/_font.py +++ b/plotly/validators/barpolar/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="barpolar.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/barpolar/legendgrouptitle/_text.py b/plotly/validators/barpolar/legendgrouptitle/_text.py index 4c1da1d4ee..19bb2e2afc 100644 --- a/plotly/validators/barpolar/legendgrouptitle/_text.py +++ b/plotly/validators/barpolar/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="barpolar.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/legendgrouptitle/font/__init__.py b/plotly/validators/barpolar/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/__init__.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_color.py b/plotly/validators/barpolar/legendgrouptitle/font/_color.py index e595ec6de3..ab439dd9ff 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_color.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_family.py b/plotly/validators/barpolar/legendgrouptitle/font/_family.py index f35d9adec1..ac7288cc5b 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_family.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_lineposition.py b/plotly/validators/barpolar/legendgrouptitle/font/_lineposition.py index c8d6f9c244..d261adb163 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_shadow.py b/plotly/validators/barpolar/legendgrouptitle/font/_shadow.py index 1ae18a336a..6bb5a57d79 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_size.py b/plotly/validators/barpolar/legendgrouptitle/font/_size.py index 98ca85b38c..d1ac0b9bed 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_size.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="barpolar.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_style.py b/plotly/validators/barpolar/legendgrouptitle/font/_style.py index 9f07619ab0..b0d0cb7f65 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_style.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_textcase.py b/plotly/validators/barpolar/legendgrouptitle/font/_textcase.py index e203d377b4..d39e9324fe 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_variant.py b/plotly/validators/barpolar/legendgrouptitle/font/_variant.py index dd6c6623a3..5a059a32d0 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_variant.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/barpolar/legendgrouptitle/font/_weight.py b/plotly/validators/barpolar/legendgrouptitle/font/_weight.py index 95ae34c2a6..f175083282 100644 --- a/plotly/validators/barpolar/legendgrouptitle/font/_weight.py +++ b/plotly/validators/barpolar/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="barpolar.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/barpolar/marker/__init__.py b/plotly/validators/barpolar/marker/__init__.py index 8fa5005737..339b1c7bb8 100644 --- a/plotly/validators/barpolar/marker/__init__.py +++ b/plotly/validators/barpolar/marker/__init__.py @@ -1,45 +1,25 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._pattern import PatternValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._pattern.PatternValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pattern.PatternValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/_autocolorscale.py b/plotly/validators/barpolar/marker/_autocolorscale.py index c3f9dd8056..4ac27e4691 100644 --- a/plotly/validators/barpolar/marker/_autocolorscale.py +++ b/plotly/validators/barpolar/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="barpolar.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/barpolar/marker/_cauto.py b/plotly/validators/barpolar/marker/_cauto.py index 7e6a6fdc50..8deca8afb5 100644 --- a/plotly/validators/barpolar/marker/_cauto.py +++ b/plotly/validators/barpolar/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="barpolar.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/barpolar/marker/_cmax.py b/plotly/validators/barpolar/marker/_cmax.py index eebadac8e5..ceb0ec0a30 100644 --- a/plotly/validators/barpolar/marker/_cmax.py +++ b/plotly/validators/barpolar/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="barpolar.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/barpolar/marker/_cmid.py b/plotly/validators/barpolar/marker/_cmid.py index 4570b8a08c..2d13777c52 100644 --- a/plotly/validators/barpolar/marker/_cmid.py +++ b/plotly/validators/barpolar/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="barpolar.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/barpolar/marker/_cmin.py b/plotly/validators/barpolar/marker/_cmin.py index a5744b37a1..103230154e 100644 --- a/plotly/validators/barpolar/marker/_cmin.py +++ b/plotly/validators/barpolar/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="barpolar.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/barpolar/marker/_color.py b/plotly/validators/barpolar/marker/_color.py index 1ecb1f88f0..840482ab67 100644 --- a/plotly/validators/barpolar/marker/_color.py +++ b/plotly/validators/barpolar/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="barpolar.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop("colorscale_path", "barpolar.marker.colorscale"), diff --git a/plotly/validators/barpolar/marker/_coloraxis.py b/plotly/validators/barpolar/marker/_coloraxis.py index d8b859d1cf..aa3e1e7876 100644 --- a/plotly/validators/barpolar/marker/_coloraxis.py +++ b/plotly/validators/barpolar/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="barpolar.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/barpolar/marker/_colorbar.py b/plotly/validators/barpolar/marker/_colorbar.py index 5e232c6350..73b80323cc 100644 --- a/plotly/validators/barpolar/marker/_colorbar.py +++ b/plotly/validators/barpolar/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="barpolar.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.barpola - r.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.barpolar.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - barpolar.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.barpolar.marker.co - lorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/_colorscale.py b/plotly/validators/barpolar/marker/_colorscale.py index 3cd3c946db..a3a934d64d 100644 --- a/plotly/validators/barpolar/marker/_colorscale.py +++ b/plotly/validators/barpolar/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="barpolar.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/barpolar/marker/_colorsrc.py b/plotly/validators/barpolar/marker/_colorsrc.py index 59db87041c..9903510367 100644 --- a/plotly/validators/barpolar/marker/_colorsrc.py +++ b/plotly/validators/barpolar/marker/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="barpolar.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/_line.py b/plotly/validators/barpolar/marker/_line.py index 166209cdec..0c7beed5df 100644 --- a/plotly/validators/barpolar/marker/_line.py +++ b/plotly/validators/barpolar/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="barpolar.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/_opacity.py b/plotly/validators/barpolar/marker/_opacity.py index 4f2689e7a0..45be1e7879 100644 --- a/plotly/validators/barpolar/marker/_opacity.py +++ b/plotly/validators/barpolar/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="barpolar.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/barpolar/marker/_opacitysrc.py b/plotly/validators/barpolar/marker/_opacitysrc.py index c49997f833..a47e85530f 100644 --- a/plotly/validators/barpolar/marker/_opacitysrc.py +++ b/plotly/validators/barpolar/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="barpolar.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/_pattern.py b/plotly/validators/barpolar/marker/_pattern.py index b6441fb1c1..3c33472ea5 100644 --- a/plotly/validators/barpolar/marker/_pattern.py +++ b/plotly/validators/barpolar/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="barpolar.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/_reversescale.py b/plotly/validators/barpolar/marker/_reversescale.py index 2d564158f9..b599397220 100644 --- a/plotly/validators/barpolar/marker/_reversescale.py +++ b/plotly/validators/barpolar/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="barpolar.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/_showscale.py b/plotly/validators/barpolar/marker/_showscale.py index be73b8266c..8d687b2753 100644 --- a/plotly/validators/barpolar/marker/_showscale.py +++ b/plotly/validators/barpolar/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="barpolar.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/__init__.py b/plotly/validators/barpolar/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/barpolar/marker/colorbar/__init__.py +++ b/plotly/validators/barpolar/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/colorbar/_bgcolor.py b/plotly/validators/barpolar/marker/colorbar/_bgcolor.py index afb613d184..677249b20c 100644 --- a/plotly/validators/barpolar/marker/colorbar/_bgcolor.py +++ b/plotly/validators/barpolar/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="barpolar.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_bordercolor.py b/plotly/validators/barpolar/marker/colorbar/_bordercolor.py index e35f8af2f0..bcd20c571e 100644 --- a/plotly/validators/barpolar/marker/colorbar/_bordercolor.py +++ b/plotly/validators/barpolar/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_borderwidth.py b/plotly/validators/barpolar/marker/colorbar/_borderwidth.py index 72feb719e4..f86ff3bf67 100644 --- a/plotly/validators/barpolar/marker/colorbar/_borderwidth.py +++ b/plotly/validators/barpolar/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_dtick.py b/plotly/validators/barpolar/marker/colorbar/_dtick.py index 3131e700df..b12c4e10ea 100644 --- a/plotly/validators/barpolar/marker/colorbar/_dtick.py +++ b/plotly/validators/barpolar/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="barpolar.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_exponentformat.py b/plotly/validators/barpolar/marker/colorbar/_exponentformat.py index ded52c3fb6..c0b2edf41b 100644 --- a/plotly/validators/barpolar/marker/colorbar/_exponentformat.py +++ b/plotly/validators/barpolar/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_labelalias.py b/plotly/validators/barpolar/marker/colorbar/_labelalias.py index 8d9fb9a426..144bd32fef 100644 --- a/plotly/validators/barpolar/marker/colorbar/_labelalias.py +++ b/plotly/validators/barpolar/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="barpolar.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_len.py b/plotly/validators/barpolar/marker/colorbar/_len.py index c97cdff724..60fca74b3e 100644 --- a/plotly/validators/barpolar/marker/colorbar/_len.py +++ b/plotly/validators/barpolar/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="barpolar.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_lenmode.py b/plotly/validators/barpolar/marker/colorbar/_lenmode.py index 9051b2ec17..f7c188d7a4 100644 --- a/plotly/validators/barpolar/marker/colorbar/_lenmode.py +++ b/plotly/validators/barpolar/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="barpolar.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_minexponent.py b/plotly/validators/barpolar/marker/colorbar/_minexponent.py index e32cdcd20e..2f49b9fbe1 100644 --- a/plotly/validators/barpolar/marker/colorbar/_minexponent.py +++ b/plotly/validators/barpolar/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_nticks.py b/plotly/validators/barpolar/marker/colorbar/_nticks.py index 23b6275892..3b49bd5dd2 100644 --- a/plotly/validators/barpolar/marker/colorbar/_nticks.py +++ b/plotly/validators/barpolar/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="barpolar.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_orientation.py b/plotly/validators/barpolar/marker/colorbar/_orientation.py index 4421855ec2..bccc15071d 100644 --- a/plotly/validators/barpolar/marker/colorbar/_orientation.py +++ b/plotly/validators/barpolar/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py b/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py index d184ed2688..bcdc93adf1 100644 --- a/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/barpolar/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py b/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py index 4137bb9d31..fcffa17ca5 100644 --- a/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/barpolar/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_separatethousands.py b/plotly/validators/barpolar/marker/colorbar/_separatethousands.py index 9e68248223..b93f6894e0 100644 --- a/plotly/validators/barpolar/marker/colorbar/_separatethousands.py +++ b/plotly/validators/barpolar/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_showexponent.py b/plotly/validators/barpolar/marker/colorbar/_showexponent.py index 8ff6dec479..4a6fc5b316 100644 --- a/plotly/validators/barpolar/marker/colorbar/_showexponent.py +++ b/plotly/validators/barpolar/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_showticklabels.py b/plotly/validators/barpolar/marker/colorbar/_showticklabels.py index 86621a6de9..af06c44c11 100644 --- a/plotly/validators/barpolar/marker/colorbar/_showticklabels.py +++ b/plotly/validators/barpolar/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py b/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py index c39c63dc36..922e009b64 100644 --- a/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/barpolar/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py b/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py index bf44764f43..dc8996517b 100644 --- a/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/barpolar/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_thickness.py b/plotly/validators/barpolar/marker/colorbar/_thickness.py index b79ecd5780..c128609f51 100644 --- a/plotly/validators/barpolar/marker/colorbar/_thickness.py +++ b/plotly/validators/barpolar/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="barpolar.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py b/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py index d77b8474d3..c158f19588 100644 --- a/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/barpolar/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_tick0.py b/plotly/validators/barpolar/marker/colorbar/_tick0.py index 69a2667ee5..76a33d8dfb 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tick0.py +++ b/plotly/validators/barpolar/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="barpolar.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_tickangle.py b/plotly/validators/barpolar/marker/colorbar/_tickangle.py index 8a135c77bc..ce5438c749 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickangle.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_tickcolor.py b/plotly/validators/barpolar/marker/colorbar/_tickcolor.py index 5cbf4df698..6fa63b2aeb 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickcolor.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_tickfont.py b/plotly/validators/barpolar/marker/colorbar/_tickfont.py index 8186f73650..829e8ad812 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickfont.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_tickformat.py b/plotly/validators/barpolar/marker/colorbar/_tickformat.py index 8e641b2ec1..e0e2b5da63 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickformat.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py index 2874c562d7..50ef441801 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py b/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py index 8697692f92..151b0183ae 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/barpolar/marker/colorbar/_ticklabeloverflow.py index 33481d9611..f6bb2be6d4 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_ticklabelposition.py b/plotly/validators/barpolar/marker/colorbar/_ticklabelposition.py index 4f97a2a13f..e2f19283a9 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/barpolar/marker/colorbar/_ticklabelstep.py b/plotly/validators/barpolar/marker/colorbar/_ticklabelstep.py index 799e5801f2..6bc52a5745 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_ticklen.py b/plotly/validators/barpolar/marker/colorbar/_ticklen.py index 7df86e5dd3..5c59ab17a1 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticklen.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_tickmode.py b/plotly/validators/barpolar/marker/colorbar/_tickmode.py index 45aa8e21a1..eddbeeadae 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickmode.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/barpolar/marker/colorbar/_tickprefix.py b/plotly/validators/barpolar/marker/colorbar/_tickprefix.py index 566789ecb8..2fe93c30f5 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickprefix.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_ticks.py b/plotly/validators/barpolar/marker/colorbar/_ticks.py index 29d0919662..dc5754ee91 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticks.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py b/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py index 1cc223e92c..bd86467b0f 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_ticktext.py b/plotly/validators/barpolar/marker/colorbar/_ticktext.py index e3e6605e59..d7be4aade0 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticktext.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py b/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py index 7f76d9c17d..70da254e37 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/barpolar/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_tickvals.py b/plotly/validators/barpolar/marker/colorbar/_tickvals.py index ffde504681..b383e7c0ba 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickvals.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py b/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py index a86e3a2303..d67935ab90 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="barpolar.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_tickwidth.py b/plotly/validators/barpolar/marker/colorbar/_tickwidth.py index 262391b05d..a6a9190c93 100644 --- a/plotly/validators/barpolar/marker/colorbar/_tickwidth.py +++ b/plotly/validators/barpolar/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_title.py b/plotly/validators/barpolar/marker/colorbar/_title.py index d8e8416d87..6d349db8ac 100644 --- a/plotly/validators/barpolar/marker/colorbar/_title.py +++ b/plotly/validators/barpolar/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="barpolar.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_x.py b/plotly/validators/barpolar/marker/colorbar/_x.py index 722a577735..272a636dea 100644 --- a/plotly/validators/barpolar/marker/colorbar/_x.py +++ b/plotly/validators/barpolar/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="barpolar.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_xanchor.py b/plotly/validators/barpolar/marker/colorbar/_xanchor.py index 21906e128c..dcf01b99e5 100644 --- a/plotly/validators/barpolar/marker/colorbar/_xanchor.py +++ b/plotly/validators/barpolar/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="barpolar.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_xpad.py b/plotly/validators/barpolar/marker/colorbar/_xpad.py index 07c65b980e..567b772a89 100644 --- a/plotly/validators/barpolar/marker/colorbar/_xpad.py +++ b/plotly/validators/barpolar/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="barpolar.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_xref.py b/plotly/validators/barpolar/marker/colorbar/_xref.py index b9a34595c6..c798463baa 100644 --- a/plotly/validators/barpolar/marker/colorbar/_xref.py +++ b/plotly/validators/barpolar/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="barpolar.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_y.py b/plotly/validators/barpolar/marker/colorbar/_y.py index cc8f201012..6934e9852b 100644 --- a/plotly/validators/barpolar/marker/colorbar/_y.py +++ b/plotly/validators/barpolar/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="barpolar.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/_yanchor.py b/plotly/validators/barpolar/marker/colorbar/_yanchor.py index bfe37aedb5..2f40495bb2 100644 --- a/plotly/validators/barpolar/marker/colorbar/_yanchor.py +++ b/plotly/validators/barpolar/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="barpolar.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_ypad.py b/plotly/validators/barpolar/marker/colorbar/_ypad.py index eab9120464..3a2335b48e 100644 --- a/plotly/validators/barpolar/marker/colorbar/_ypad.py +++ b/plotly/validators/barpolar/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="barpolar.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/_yref.py b/plotly/validators/barpolar/marker/colorbar/_yref.py index a0d8f83c02..1ec862b554 100644 --- a/plotly/validators/barpolar/marker/colorbar/_yref.py +++ b/plotly/validators/barpolar/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="barpolar.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py b/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py index 398cbf9410..ca54f939b6 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py index bd87b5330b..350ff3a509 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_lineposition.py index 00ceec2d25..6de419abd5 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_shadow.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_shadow.py index e21a4ea4cc..bd4eda4fd2 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py index 34f7a7e957..bae312d3d6 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_style.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_style.py index c5913ebf0c..1812110a9e 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_textcase.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_textcase.py index a24c36d995..fc50f9f5eb 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_variant.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_variant.py index b569936339..45820042ab 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/barpolar/marker/colorbar/tickfont/_weight.py b/plotly/validators/barpolar/marker/colorbar/tickfont/_weight.py index 37eceb0c6d..e3b6348d53 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/barpolar/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="barpolar.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/barpolar/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py index 1de66adfa5..f9e1944138 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="barpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py index 88b672ee0a..86f6c4ac12 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="barpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py index a2755744fa..0e590d45bb 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="barpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py index f36c42403a..b396f7ebe0 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="barpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py index 9957697bea..3267a0a410 100644 --- a/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/barpolar/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="barpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/title/__init__.py b/plotly/validators/barpolar/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/__init__.py +++ b/plotly/validators/barpolar/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/barpolar/marker/colorbar/title/_font.py b/plotly/validators/barpolar/marker/colorbar/title/_font.py index 35b1b64844..ede9cb079c 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/_font.py +++ b/plotly/validators/barpolar/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="barpolar.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/title/_side.py b/plotly/validators/barpolar/marker/colorbar/title/_side.py index 78d7b65277..de95d82d50 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/_side.py +++ b/plotly/validators/barpolar/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="barpolar.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/title/_text.py b/plotly/validators/barpolar/marker/colorbar/title/_text.py index f724467171..a0e8ac9e5e 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/_text.py +++ b/plotly/validators/barpolar/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="barpolar.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py b/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_color.py b/plotly/validators/barpolar/marker/colorbar/title/font/_color.py index 476732bc40..0430723d88 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_color.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_family.py b/plotly/validators/barpolar/marker/colorbar/title/font/_family.py index c01f60828f..4d01b41cdb 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_family.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_lineposition.py b/plotly/validators/barpolar/marker/colorbar/title/font/_lineposition.py index bf1bbfc51f..631f5d69a3 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_shadow.py b/plotly/validators/barpolar/marker/colorbar/title/font/_shadow.py index fceff83879..38545c7383 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_size.py b/plotly/validators/barpolar/marker/colorbar/title/font/_size.py index 699cc002b6..3d37e5c746 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_size.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_style.py b/plotly/validators/barpolar/marker/colorbar/title/font/_style.py index 1bf7646dae..c9d60242c0 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_style.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_textcase.py b/plotly/validators/barpolar/marker/colorbar/title/font/_textcase.py index 4c45cd8ce5..334267ca58 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_variant.py b/plotly/validators/barpolar/marker/colorbar/title/font/_variant.py index beec6b2df5..e29f236c90 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/barpolar/marker/colorbar/title/font/_weight.py b/plotly/validators/barpolar/marker/colorbar/title/font/_weight.py index 4fe7d3c1f3..fda0f92486 100644 --- a/plotly/validators/barpolar/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/barpolar/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="barpolar.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/barpolar/marker/line/__init__.py b/plotly/validators/barpolar/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/barpolar/marker/line/__init__.py +++ b/plotly/validators/barpolar/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/line/_autocolorscale.py b/plotly/validators/barpolar/marker/line/_autocolorscale.py index ed8298c09e..9179d88906 100644 --- a/plotly/validators/barpolar/marker/line/_autocolorscale.py +++ b/plotly/validators/barpolar/marker/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="barpolar.marker.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/barpolar/marker/line/_cauto.py b/plotly/validators/barpolar/marker/line/_cauto.py index 8b54dff990..028cb3e62e 100644 --- a/plotly/validators/barpolar/marker/line/_cauto.py +++ b/plotly/validators/barpolar/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="barpolar.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/barpolar/marker/line/_cmax.py b/plotly/validators/barpolar/marker/line/_cmax.py index bbb781ad4d..ba7ce80a4c 100644 --- a/plotly/validators/barpolar/marker/line/_cmax.py +++ b/plotly/validators/barpolar/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="barpolar.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/barpolar/marker/line/_cmid.py b/plotly/validators/barpolar/marker/line/_cmid.py index b8c79ed0cd..41e57285da 100644 --- a/plotly/validators/barpolar/marker/line/_cmid.py +++ b/plotly/validators/barpolar/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="barpolar.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/barpolar/marker/line/_cmin.py b/plotly/validators/barpolar/marker/line/_cmin.py index a18d76c246..1300b08d4f 100644 --- a/plotly/validators/barpolar/marker/line/_cmin.py +++ b/plotly/validators/barpolar/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="barpolar.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/barpolar/marker/line/_color.py b/plotly/validators/barpolar/marker/line/_color.py index 5f66d2b107..5557438501 100644 --- a/plotly/validators/barpolar/marker/line/_color.py +++ b/plotly/validators/barpolar/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/barpolar/marker/line/_coloraxis.py b/plotly/validators/barpolar/marker/line/_coloraxis.py index 3e63f02e42..5c2d701ac2 100644 --- a/plotly/validators/barpolar/marker/line/_coloraxis.py +++ b/plotly/validators/barpolar/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="barpolar.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/barpolar/marker/line/_colorscale.py b/plotly/validators/barpolar/marker/line/_colorscale.py index f04fdbc442..3e7a5b9d8f 100644 --- a/plotly/validators/barpolar/marker/line/_colorscale.py +++ b/plotly/validators/barpolar/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="barpolar.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/barpolar/marker/line/_colorsrc.py b/plotly/validators/barpolar/marker/line/_colorsrc.py index b65b9e33d7..3b56d09c33 100644 --- a/plotly/validators/barpolar/marker/line/_colorsrc.py +++ b/plotly/validators/barpolar/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="barpolar.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/line/_reversescale.py b/plotly/validators/barpolar/marker/line/_reversescale.py index 5faf9e8860..24ed5f0a04 100644 --- a/plotly/validators/barpolar/marker/line/_reversescale.py +++ b/plotly/validators/barpolar/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="barpolar.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/line/_width.py b/plotly/validators/barpolar/marker/line/_width.py index 0f9b4aa3bd..40ceb91a8b 100644 --- a/plotly/validators/barpolar/marker/line/_width.py +++ b/plotly/validators/barpolar/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="barpolar.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/marker/line/_widthsrc.py b/plotly/validators/barpolar/marker/line/_widthsrc.py index 055bce41dd..552127ff8f 100644 --- a/plotly/validators/barpolar/marker/line/_widthsrc.py +++ b/plotly/validators/barpolar/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="barpolar.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/pattern/__init__.py b/plotly/validators/barpolar/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/barpolar/marker/pattern/__init__.py +++ b/plotly/validators/barpolar/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/barpolar/marker/pattern/_bgcolor.py b/plotly/validators/barpolar/marker/pattern/_bgcolor.py index c18cec305d..7135763929 100644 --- a/plotly/validators/barpolar/marker/pattern/_bgcolor.py +++ b/plotly/validators/barpolar/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="barpolar.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/barpolar/marker/pattern/_bgcolorsrc.py b/plotly/validators/barpolar/marker/pattern/_bgcolorsrc.py index d7a4399481..6c5dbfc6e7 100644 --- a/plotly/validators/barpolar/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/barpolar/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="barpolar.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/pattern/_fgcolor.py b/plotly/validators/barpolar/marker/pattern/_fgcolor.py index 13d6c69670..45d3e080e7 100644 --- a/plotly/validators/barpolar/marker/pattern/_fgcolor.py +++ b/plotly/validators/barpolar/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="barpolar.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/barpolar/marker/pattern/_fgcolorsrc.py b/plotly/validators/barpolar/marker/pattern/_fgcolorsrc.py index 55503a1f1e..09248a9923 100644 --- a/plotly/validators/barpolar/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/barpolar/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="barpolar.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/pattern/_fgopacity.py b/plotly/validators/barpolar/marker/pattern/_fgopacity.py index 9a30372b4b..fbbd89ed72 100644 --- a/plotly/validators/barpolar/marker/pattern/_fgopacity.py +++ b/plotly/validators/barpolar/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="barpolar.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/marker/pattern/_fillmode.py b/plotly/validators/barpolar/marker/pattern/_fillmode.py index 78f32cd378..45a94d9dfc 100644 --- a/plotly/validators/barpolar/marker/pattern/_fillmode.py +++ b/plotly/validators/barpolar/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="barpolar.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/barpolar/marker/pattern/_shape.py b/plotly/validators/barpolar/marker/pattern/_shape.py index de4649413e..8fe417a43d 100644 --- a/plotly/validators/barpolar/marker/pattern/_shape.py +++ b/plotly/validators/barpolar/marker/pattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="barpolar.marker.pattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/barpolar/marker/pattern/_shapesrc.py b/plotly/validators/barpolar/marker/pattern/_shapesrc.py index a3037c115f..a03297cdf8 100644 --- a/plotly/validators/barpolar/marker/pattern/_shapesrc.py +++ b/plotly/validators/barpolar/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="barpolar.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/pattern/_size.py b/plotly/validators/barpolar/marker/pattern/_size.py index 84f9477578..5d1914dfda 100644 --- a/plotly/validators/barpolar/marker/pattern/_size.py +++ b/plotly/validators/barpolar/marker/pattern/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="barpolar.marker.pattern", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/marker/pattern/_sizesrc.py b/plotly/validators/barpolar/marker/pattern/_sizesrc.py index b19de7f1f8..aaeb7fb99e 100644 --- a/plotly/validators/barpolar/marker/pattern/_sizesrc.py +++ b/plotly/validators/barpolar/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="barpolar.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/marker/pattern/_solidity.py b/plotly/validators/barpolar/marker/pattern/_solidity.py index c047af38cb..3733934446 100644 --- a/plotly/validators/barpolar/marker/pattern/_solidity.py +++ b/plotly/validators/barpolar/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="barpolar.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/barpolar/marker/pattern/_soliditysrc.py b/plotly/validators/barpolar/marker/pattern/_soliditysrc.py index 5527c84bfa..af03d26d3c 100644 --- a/plotly/validators/barpolar/marker/pattern/_soliditysrc.py +++ b/plotly/validators/barpolar/marker/pattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="barpolar.marker.pattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/barpolar/selected/__init__.py b/plotly/validators/barpolar/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/barpolar/selected/__init__.py +++ b/plotly/validators/barpolar/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/barpolar/selected/_marker.py b/plotly/validators/barpolar/selected/_marker.py index 9e6d8fd6e4..8050363587 100644 --- a/plotly/validators/barpolar/selected/_marker.py +++ b/plotly/validators/barpolar/selected/_marker.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="barpolar.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. """, ), **kwargs, diff --git a/plotly/validators/barpolar/selected/_textfont.py b/plotly/validators/barpolar/selected/_textfont.py index 2888a5aa14..260f8d9bde 100644 --- a/plotly/validators/barpolar/selected/_textfont.py +++ b/plotly/validators/barpolar/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="barpolar.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/barpolar/selected/marker/__init__.py b/plotly/validators/barpolar/selected/marker/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/barpolar/selected/marker/__init__.py +++ b/plotly/validators/barpolar/selected/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/barpolar/selected/marker/_color.py b/plotly/validators/barpolar/selected/marker/_color.py index 5e0113d377..3586709d1c 100644 --- a/plotly/validators/barpolar/selected/marker/_color.py +++ b/plotly/validators/barpolar/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/selected/marker/_opacity.py b/plotly/validators/barpolar/selected/marker/_opacity.py index 810923ba6a..ca1fabe42a 100644 --- a/plotly/validators/barpolar/selected/marker/_opacity.py +++ b/plotly/validators/barpolar/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="barpolar.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/selected/textfont/__init__.py b/plotly/validators/barpolar/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/barpolar/selected/textfont/__init__.py +++ b/plotly/validators/barpolar/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/barpolar/selected/textfont/_color.py b/plotly/validators/barpolar/selected/textfont/_color.py index e17e8b3f2e..0d92d4e0a6 100644 --- a/plotly/validators/barpolar/selected/textfont/_color.py +++ b/plotly/validators/barpolar/selected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.selected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/stream/__init__.py b/plotly/validators/barpolar/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/barpolar/stream/__init__.py +++ b/plotly/validators/barpolar/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/barpolar/stream/_maxpoints.py b/plotly/validators/barpolar/stream/_maxpoints.py index af46099704..9c60afce5b 100644 --- a/plotly/validators/barpolar/stream/_maxpoints.py +++ b/plotly/validators/barpolar/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="barpolar.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/stream/_token.py b/plotly/validators/barpolar/stream/_token.py index f0ce0dd931..70c5e05e21 100644 --- a/plotly/validators/barpolar/stream/_token.py +++ b/plotly/validators/barpolar/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="barpolar.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/barpolar/unselected/__init__.py b/plotly/validators/barpolar/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/barpolar/unselected/__init__.py +++ b/plotly/validators/barpolar/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/barpolar/unselected/_marker.py b/plotly/validators/barpolar/unselected/_marker.py index ba3837c50c..51a77186f5 100644 --- a/plotly/validators/barpolar/unselected/_marker.py +++ b/plotly/validators/barpolar/unselected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="barpolar.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/barpolar/unselected/_textfont.py b/plotly/validators/barpolar/unselected/_textfont.py index c59a480113..2333102c54 100644 --- a/plotly/validators/barpolar/unselected/_textfont.py +++ b/plotly/validators/barpolar/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="barpolar.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/barpolar/unselected/marker/__init__.py b/plotly/validators/barpolar/unselected/marker/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/barpolar/unselected/marker/__init__.py +++ b/plotly/validators/barpolar/unselected/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/barpolar/unselected/marker/_color.py b/plotly/validators/barpolar/unselected/marker/_color.py index 358b851a75..57539ef789 100644 --- a/plotly/validators/barpolar/unselected/marker/_color.py +++ b/plotly/validators/barpolar/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/barpolar/unselected/marker/_opacity.py b/plotly/validators/barpolar/unselected/marker/_opacity.py index 27c9d779d6..981377e9d5 100644 --- a/plotly/validators/barpolar/unselected/marker/_opacity.py +++ b/plotly/validators/barpolar/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="barpolar.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/barpolar/unselected/textfont/__init__.py b/plotly/validators/barpolar/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/barpolar/unselected/textfont/__init__.py +++ b/plotly/validators/barpolar/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/barpolar/unselected/textfont/_color.py b/plotly/validators/barpolar/unselected/textfont/_color.py index 2bd20d6506..9fb64dff17 100644 --- a/plotly/validators/barpolar/unselected/textfont/_color.py +++ b/plotly/validators/barpolar/unselected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="barpolar.unselected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/__init__.py b/plotly/validators/box/__init__.py index 3970b2cf4b..ccfd18ac33 100644 --- a/plotly/validators/box/__init__.py +++ b/plotly/validators/box/__init__.py @@ -1,185 +1,95 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._width import WidthValidator - from ._whiskerwidth import WhiskerwidthValidator - from ._visible import VisibleValidator - from ._upperfencesrc import UpperfencesrcValidator - from ._upperfence import UpperfenceValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._sizemode import SizemodeValidator - from ._showwhiskers import ShowwhiskersValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._sdsrc import SdsrcValidator - from ._sdmultiple import SdmultipleValidator - from ._sd import SdValidator - from ._quartilemethod import QuartilemethodValidator - from ._q3src import Q3SrcValidator - from ._q3 import Q3Validator - from ._q1src import Q1SrcValidator - from ._q1 import Q1Validator - from ._pointpos import PointposValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetgroup import OffsetgroupValidator - from ._notchwidth import NotchwidthValidator - from ._notchspansrc import NotchspansrcValidator - from ._notchspan import NotchspanValidator - from ._notched import NotchedValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._mediansrc import MediansrcValidator - from ._median import MedianValidator - from ._meansrc import MeansrcValidator - from ._mean import MeanValidator - from ._marker import MarkerValidator - from ._lowerfencesrc import LowerfencesrcValidator - from ._lowerfence import LowerfenceValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._jitter import JitterValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._boxpoints import BoxpointsValidator - from ._boxmean import BoxmeanValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._width.WidthValidator", - "._whiskerwidth.WhiskerwidthValidator", - "._visible.VisibleValidator", - "._upperfencesrc.UpperfencesrcValidator", - "._upperfence.UpperfenceValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._sizemode.SizemodeValidator", - "._showwhiskers.ShowwhiskersValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._sdsrc.SdsrcValidator", - "._sdmultiple.SdmultipleValidator", - "._sd.SdValidator", - "._quartilemethod.QuartilemethodValidator", - "._q3src.Q3SrcValidator", - "._q3.Q3Validator", - "._q1src.Q1SrcValidator", - "._q1.Q1Validator", - "._pointpos.PointposValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetgroup.OffsetgroupValidator", - "._notchwidth.NotchwidthValidator", - "._notchspansrc.NotchspansrcValidator", - "._notchspan.NotchspanValidator", - "._notched.NotchedValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._mediansrc.MediansrcValidator", - "._median.MedianValidator", - "._meansrc.MeansrcValidator", - "._mean.MeanValidator", - "._marker.MarkerValidator", - "._lowerfencesrc.LowerfencesrcValidator", - "._lowerfence.LowerfenceValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._jitter.JitterValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._boxpoints.BoxpointsValidator", - "._boxmean.BoxmeanValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._width.WidthValidator", + "._whiskerwidth.WhiskerwidthValidator", + "._visible.VisibleValidator", + "._upperfencesrc.UpperfencesrcValidator", + "._upperfence.UpperfenceValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sizemode.SizemodeValidator", + "._showwhiskers.ShowwhiskersValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._sdsrc.SdsrcValidator", + "._sdmultiple.SdmultipleValidator", + "._sd.SdValidator", + "._quartilemethod.QuartilemethodValidator", + "._q3src.Q3SrcValidator", + "._q3.Q3Validator", + "._q1src.Q1SrcValidator", + "._q1.Q1Validator", + "._pointpos.PointposValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._notchwidth.NotchwidthValidator", + "._notchspansrc.NotchspansrcValidator", + "._notchspan.NotchspanValidator", + "._notched.NotchedValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._mediansrc.MediansrcValidator", + "._median.MedianValidator", + "._meansrc.MeansrcValidator", + "._mean.MeanValidator", + "._marker.MarkerValidator", + "._lowerfencesrc.LowerfencesrcValidator", + "._lowerfence.LowerfenceValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._jitter.JitterValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._boxpoints.BoxpointsValidator", + "._boxmean.BoxmeanValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/box/_alignmentgroup.py b/plotly/validators/box/_alignmentgroup.py index ced7c9d994..209ff29944 100644 --- a/plotly/validators/box/_alignmentgroup.py +++ b/plotly/validators/box/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="box", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_boxmean.py b/plotly/validators/box/_boxmean.py index 6cf2567dca..fed930d613 100644 --- a/plotly/validators/box/_boxmean.py +++ b/plotly/validators/box/_boxmean.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxmeanValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BoxmeanValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="boxmean", parent_name="box", **kwargs): - super(BoxmeanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, "sd", False]), **kwargs, diff --git a/plotly/validators/box/_boxpoints.py b/plotly/validators/box/_boxpoints.py index 448f9d16c4..9a8cd87f3a 100644 --- a/plotly/validators/box/_boxpoints.py +++ b/plotly/validators/box/_boxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxpointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BoxpointsValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="boxpoints", parent_name="box", **kwargs): - super(BoxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["all", "outliers", "suspectedoutliers", False] diff --git a/plotly/validators/box/_customdata.py b/plotly/validators/box/_customdata.py index c6da0ed67f..efd7b6234f 100644 --- a/plotly/validators/box/_customdata.py +++ b/plotly/validators/box/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="box", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_customdatasrc.py b/plotly/validators/box/_customdatasrc.py index 5da01e58ba..3e098de22b 100644 --- a/plotly/validators/box/_customdatasrc.py +++ b/plotly/validators/box/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="box", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_dx.py b/plotly/validators/box/_dx.py index ea05c47206..9ac568ec7d 100644 --- a/plotly/validators/box/_dx.py +++ b/plotly/validators/box/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="box", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_dy.py b/plotly/validators/box/_dy.py index 769e12b145..ef237b82df 100644 --- a/plotly/validators/box/_dy.py +++ b/plotly/validators/box/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="box", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_fillcolor.py b/plotly/validators/box/_fillcolor.py index 575d4b2562..8ec627d81f 100644 --- a/plotly/validators/box/_fillcolor.py +++ b/plotly/validators/box/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="box", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/_hoverinfo.py b/plotly/validators/box/_hoverinfo.py index aeb3bc8207..3993069d03 100644 --- a/plotly/validators/box/_hoverinfo.py +++ b/plotly/validators/box/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="box", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/box/_hoverinfosrc.py b/plotly/validators/box/_hoverinfosrc.py index cdb181ade9..f3e1bb3548 100644 --- a/plotly/validators/box/_hoverinfosrc.py +++ b/plotly/validators/box/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="box", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_hoverlabel.py b/plotly/validators/box/_hoverlabel.py index fdac144a49..d86d253ae0 100644 --- a/plotly/validators/box/_hoverlabel.py +++ b/plotly/validators/box/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="box", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/box/_hoveron.py b/plotly/validators/box/_hoveron.py index c06659a204..3eb77d63cb 100644 --- a/plotly/validators/box/_hoveron.py +++ b/plotly/validators/box/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="box", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), flags=kwargs.pop("flags", ["boxes", "points"]), **kwargs, diff --git a/plotly/validators/box/_hovertemplate.py b/plotly/validators/box/_hovertemplate.py index 433ffe3370..f952e5cb02 100644 --- a/plotly/validators/box/_hovertemplate.py +++ b/plotly/validators/box/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="box", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/box/_hovertemplatesrc.py b/plotly/validators/box/_hovertemplatesrc.py index 00962d6e4d..42f10e7e7c 100644 --- a/plotly/validators/box/_hovertemplatesrc.py +++ b/plotly/validators/box/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="box", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_hovertext.py b/plotly/validators/box/_hovertext.py index 95369933b6..1496fe9357 100644 --- a/plotly/validators/box/_hovertext.py +++ b/plotly/validators/box/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="box", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/box/_hovertextsrc.py b/plotly/validators/box/_hovertextsrc.py index f8c607d2d8..3ed74d846b 100644 --- a/plotly/validators/box/_hovertextsrc.py +++ b/plotly/validators/box/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="box", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_ids.py b/plotly/validators/box/_ids.py index e9f8a69b62..2e10f85a6b 100644 --- a/plotly/validators/box/_ids.py +++ b/plotly/validators/box/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="box", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_idssrc.py b/plotly/validators/box/_idssrc.py index ec0c15690a..6108ee2957 100644 --- a/plotly/validators/box/_idssrc.py +++ b/plotly/validators/box/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="box", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_jitter.py b/plotly/validators/box/_jitter.py index 8e0aba4f62..ce650a18d7 100644 --- a/plotly/validators/box/_jitter.py +++ b/plotly/validators/box/_jitter.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class JitterValidator(_plotly_utils.basevalidators.NumberValidator): +class JitterValidator(_bv.NumberValidator): def __init__(self, plotly_name="jitter", parent_name="box", **kwargs): - super(JitterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/_legend.py b/plotly/validators/box/_legend.py index 43533845d8..d8dc42bb4f 100644 --- a/plotly/validators/box/_legend.py +++ b/plotly/validators/box/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="box", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/box/_legendgroup.py b/plotly/validators/box/_legendgroup.py index 906ec00bed..3f3929f404 100644 --- a/plotly/validators/box/_legendgroup.py +++ b/plotly/validators/box/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="box", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/_legendgrouptitle.py b/plotly/validators/box/_legendgrouptitle.py index a296eb102c..063dfc9dc1 100644 --- a/plotly/validators/box/_legendgrouptitle.py +++ b/plotly/validators/box/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="box", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/box/_legendrank.py b/plotly/validators/box/_legendrank.py index 6ea5db74e4..5a95d42e5e 100644 --- a/plotly/validators/box/_legendrank.py +++ b/plotly/validators/box/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="box", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/_legendwidth.py b/plotly/validators/box/_legendwidth.py index 299e26e6a8..e90286feba 100644 --- a/plotly/validators/box/_legendwidth.py +++ b/plotly/validators/box/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="box", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/box/_line.py b/plotly/validators/box/_line.py index 99579d3c70..d516168712 100644 --- a/plotly/validators/box/_line.py +++ b/plotly/validators/box/_line.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="box", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). """, ), **kwargs, diff --git a/plotly/validators/box/_lowerfence.py b/plotly/validators/box/_lowerfence.py index 86103479af..a87e3fca28 100644 --- a/plotly/validators/box/_lowerfence.py +++ b/plotly/validators/box/_lowerfence.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LowerfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LowerfenceValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lowerfence", parent_name="box", **kwargs): - super(LowerfenceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_lowerfencesrc.py b/plotly/validators/box/_lowerfencesrc.py index 7f4be5d641..eb4a701e6b 100644 --- a/plotly/validators/box/_lowerfencesrc.py +++ b/plotly/validators/box/_lowerfencesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LowerfencesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LowerfencesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lowerfencesrc", parent_name="box", **kwargs): - super(LowerfencesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_marker.py b/plotly/validators/box/_marker.py index 50d9f7df33..d333e46dc4 100644 --- a/plotly/validators/box/_marker.py +++ b/plotly/validators/box/_marker.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="box", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.box.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. """, ), **kwargs, diff --git a/plotly/validators/box/_mean.py b/plotly/validators/box/_mean.py index d593b4646c..fe0569ced2 100644 --- a/plotly/validators/box/_mean.py +++ b/plotly/validators/box/_mean.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MeanValidator(_plotly_utils.basevalidators.DataArrayValidator): +class MeanValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="mean", parent_name="box", **kwargs): - super(MeanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_meansrc.py b/plotly/validators/box/_meansrc.py index 1a3d77bb37..a0cec43ab1 100644 --- a/plotly/validators/box/_meansrc.py +++ b/plotly/validators/box/_meansrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MeansrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MeansrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="meansrc", parent_name="box", **kwargs): - super(MeansrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_median.py b/plotly/validators/box/_median.py index feba0852f7..edfe483c34 100644 --- a/plotly/validators/box/_median.py +++ b/plotly/validators/box/_median.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MedianValidator(_plotly_utils.basevalidators.DataArrayValidator): +class MedianValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="median", parent_name="box", **kwargs): - super(MedianValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_mediansrc.py b/plotly/validators/box/_mediansrc.py index 4a42d422b3..6cc5a811a2 100644 --- a/plotly/validators/box/_mediansrc.py +++ b/plotly/validators/box/_mediansrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MediansrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MediansrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="mediansrc", parent_name="box", **kwargs): - super(MediansrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_meta.py b/plotly/validators/box/_meta.py index fdd345f328..b4ad99bc55 100644 --- a/plotly/validators/box/_meta.py +++ b/plotly/validators/box/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="box", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/box/_metasrc.py b/plotly/validators/box/_metasrc.py index 7979c4ccd1..a637a09ba2 100644 --- a/plotly/validators/box/_metasrc.py +++ b/plotly/validators/box/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="box", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_name.py b/plotly/validators/box/_name.py index 75ce3bd6df..0e06e5b2d2 100644 --- a/plotly/validators/box/_name.py +++ b/plotly/validators/box/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="box", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_notched.py b/plotly/validators/box/_notched.py index e53fb61542..7b096d54ad 100644 --- a/plotly/validators/box/_notched.py +++ b/plotly/validators/box/_notched.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NotchedValidator(_plotly_utils.basevalidators.BooleanValidator): +class NotchedValidator(_bv.BooleanValidator): def __init__(self, plotly_name="notched", parent_name="box", **kwargs): - super(NotchedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_notchspan.py b/plotly/validators/box/_notchspan.py index 57617f3380..db539f8444 100644 --- a/plotly/validators/box/_notchspan.py +++ b/plotly/validators/box/_notchspan.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NotchspanValidator(_plotly_utils.basevalidators.DataArrayValidator): +class NotchspanValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="notchspan", parent_name="box", **kwargs): - super(NotchspanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_notchspansrc.py b/plotly/validators/box/_notchspansrc.py index a26747dcae..b97ca0288b 100644 --- a/plotly/validators/box/_notchspansrc.py +++ b/plotly/validators/box/_notchspansrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NotchspansrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NotchspansrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="notchspansrc", parent_name="box", **kwargs): - super(NotchspansrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_notchwidth.py b/plotly/validators/box/_notchwidth.py index 59b6b21ce1..79bb38f85d 100644 --- a/plotly/validators/box/_notchwidth.py +++ b/plotly/validators/box/_notchwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NotchwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class NotchwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="notchwidth", parent_name="box", **kwargs): - super(NotchwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 0.5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/_offsetgroup.py b/plotly/validators/box/_offsetgroup.py index aff875521c..f04a0dd8c8 100644 --- a/plotly/validators/box/_offsetgroup.py +++ b/plotly/validators/box/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="box", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_opacity.py b/plotly/validators/box/_opacity.py index 7143e23171..5c1a616b95 100644 --- a/plotly/validators/box/_opacity.py +++ b/plotly/validators/box/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="box", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/_orientation.py b/plotly/validators/box/_orientation.py index a86b3ff00d..d9d210c441 100644 --- a/plotly/validators/box/_orientation.py +++ b/plotly/validators/box/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="box", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/box/_pointpos.py b/plotly/validators/box/_pointpos.py index a088c5b4a5..75980ca477 100644 --- a/plotly/validators/box/_pointpos.py +++ b/plotly/validators/box/_pointpos.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PointposValidator(_plotly_utils.basevalidators.NumberValidator): +class PointposValidator(_bv.NumberValidator): def __init__(self, plotly_name="pointpos", parent_name="box", **kwargs): - super(PointposValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", -2), diff --git a/plotly/validators/box/_q1.py b/plotly/validators/box/_q1.py index 45267966bd..7869b56b80 100644 --- a/plotly/validators/box/_q1.py +++ b/plotly/validators/box/_q1.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Q1Validator(_plotly_utils.basevalidators.DataArrayValidator): +class Q1Validator(_bv.DataArrayValidator): def __init__(self, plotly_name="q1", parent_name="box", **kwargs): - super(Q1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_q1src.py b/plotly/validators/box/_q1src.py index 7b097f7f66..f2a4a00513 100644 --- a/plotly/validators/box/_q1src.py +++ b/plotly/validators/box/_q1src.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Q1SrcValidator(_plotly_utils.basevalidators.SrcValidator): +class Q1SrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="q1src", parent_name="box", **kwargs): - super(Q1SrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_q3.py b/plotly/validators/box/_q3.py index bc42bfd882..d86906a5ac 100644 --- a/plotly/validators/box/_q3.py +++ b/plotly/validators/box/_q3.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Q3Validator(_plotly_utils.basevalidators.DataArrayValidator): +class Q3Validator(_bv.DataArrayValidator): def __init__(self, plotly_name="q3", parent_name="box", **kwargs): - super(Q3Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_q3src.py b/plotly/validators/box/_q3src.py index b9b7ab9608..8e9a8b85f4 100644 --- a/plotly/validators/box/_q3src.py +++ b/plotly/validators/box/_q3src.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Q3SrcValidator(_plotly_utils.basevalidators.SrcValidator): +class Q3SrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="q3src", parent_name="box", **kwargs): - super(Q3SrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_quartilemethod.py b/plotly/validators/box/_quartilemethod.py index 59f3c6290c..2ee62e2471 100644 --- a/plotly/validators/box/_quartilemethod.py +++ b/plotly/validators/box/_quartilemethod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class QuartilemethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class QuartilemethodValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="quartilemethod", parent_name="box", **kwargs): - super(QuartilemethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["linear", "exclusive", "inclusive"]), **kwargs, diff --git a/plotly/validators/box/_sd.py b/plotly/validators/box/_sd.py index b59d56f52d..a7e3ca8bbe 100644 --- a/plotly/validators/box/_sd.py +++ b/plotly/validators/box/_sd.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SdValidator(_plotly_utils.basevalidators.DataArrayValidator): +class SdValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="sd", parent_name="box", **kwargs): - super(SdValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_sdmultiple.py b/plotly/validators/box/_sdmultiple.py index 07d52e0b7f..36efeadb02 100644 --- a/plotly/validators/box/_sdmultiple.py +++ b/plotly/validators/box/_sdmultiple.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SdmultipleValidator(_plotly_utils.basevalidators.NumberValidator): +class SdmultipleValidator(_bv.NumberValidator): def __init__(self, plotly_name="sdmultiple", parent_name="box", **kwargs): - super(SdmultipleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/box/_sdsrc.py b/plotly/validators/box/_sdsrc.py index acdc6269d8..209864f890 100644 --- a/plotly/validators/box/_sdsrc.py +++ b/plotly/validators/box/_sdsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SdsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SdsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sdsrc", parent_name="box", **kwargs): - super(SdsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_selected.py b/plotly/validators/box/_selected.py index 068acc10e9..1f445d6a4e 100644 --- a/plotly/validators/box/_selected.py +++ b/plotly/validators/box/_selected.py @@ -1,18 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="box", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.box.selected.Marke - r` instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/box/_selectedpoints.py b/plotly/validators/box/_selectedpoints.py index 90c24a218f..d7b9da624c 100644 --- a/plotly/validators/box/_selectedpoints.py +++ b/plotly/validators/box/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="box", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_showlegend.py b/plotly/validators/box/_showlegend.py index 29c7fe221e..0f612092d4 100644 --- a/plotly/validators/box/_showlegend.py +++ b/plotly/validators/box/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="box", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/_showwhiskers.py b/plotly/validators/box/_showwhiskers.py index c4f4f664c2..10c83aa168 100644 --- a/plotly/validators/box/_showwhiskers.py +++ b/plotly/validators/box/_showwhiskers.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowwhiskersValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowwhiskersValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showwhiskers", parent_name="box", **kwargs): - super(ShowwhiskersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_sizemode.py b/plotly/validators/box/_sizemode.py index da6ae123e9..4463dd52ad 100644 --- a/plotly/validators/box/_sizemode.py +++ b/plotly/validators/box/_sizemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="sizemode", parent_name="box", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["quartiles", "sd"]), **kwargs, diff --git a/plotly/validators/box/_stream.py b/plotly/validators/box/_stream.py index 3a962fb384..75e44916c2 100644 --- a/plotly/validators/box/_stream.py +++ b/plotly/validators/box/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="box", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/box/_text.py b/plotly/validators/box/_text.py index 322c5add00..86b10c32f8 100644 --- a/plotly/validators/box/_text.py +++ b/plotly/validators/box/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="box", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/box/_textsrc.py b/plotly/validators/box/_textsrc.py index 1d8444ca5d..3dbf9aa753 100644 --- a/plotly/validators/box/_textsrc.py +++ b/plotly/validators/box/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="box", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_uid.py b/plotly/validators/box/_uid.py index 8b380346da..cb7039c67f 100644 --- a/plotly/validators/box/_uid.py +++ b/plotly/validators/box/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="box", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/box/_uirevision.py b/plotly/validators/box/_uirevision.py index 332c9edb37..6bd017759e 100644 --- a/plotly/validators/box/_uirevision.py +++ b/plotly/validators/box/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="box", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_unselected.py b/plotly/validators/box/_unselected.py index 73be085ef1..aa1c58f99e 100644 --- a/plotly/validators/box/_unselected.py +++ b/plotly/validators/box/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="box", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.box.unselected.Mar - ker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/box/_upperfence.py b/plotly/validators/box/_upperfence.py index febe9470b0..bb7e82935a 100644 --- a/plotly/validators/box/_upperfence.py +++ b/plotly/validators/box/_upperfence.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UpperfenceValidator(_plotly_utils.basevalidators.DataArrayValidator): +class UpperfenceValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="upperfence", parent_name="box", **kwargs): - super(UpperfenceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_upperfencesrc.py b/plotly/validators/box/_upperfencesrc.py index fb103b84f8..93a7266113 100644 --- a/plotly/validators/box/_upperfencesrc.py +++ b/plotly/validators/box/_upperfencesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UpperfencesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class UpperfencesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="upperfencesrc", parent_name="box", **kwargs): - super(UpperfencesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_visible.py b/plotly/validators/box/_visible.py index c6ba2bb6ab..e9d93bc7dd 100644 --- a/plotly/validators/box/_visible.py +++ b/plotly/validators/box/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="box", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/box/_whiskerwidth.py b/plotly/validators/box/_whiskerwidth.py index bde5802230..21dd820688 100644 --- a/plotly/validators/box/_whiskerwidth.py +++ b/plotly/validators/box/_whiskerwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WhiskerwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WhiskerwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="whiskerwidth", parent_name="box", **kwargs): - super(WhiskerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/_width.py b/plotly/validators/box/_width.py index 479db4fe82..bdf726f537 100644 --- a/plotly/validators/box/_width.py +++ b/plotly/validators/box/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="box", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/box/_x.py b/plotly/validators/box/_x.py index ae2db23717..236feb20cd 100644 --- a/plotly/validators/box/_x.py +++ b/plotly/validators/box/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="box", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_x0.py b/plotly/validators/box/_x0.py index 7a3522b1a4..10e453403a 100644 --- a/plotly/validators/box/_x0.py +++ b/plotly/validators/box/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="box", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_xaxis.py b/plotly/validators/box/_xaxis.py index 1dfe478195..ebf16ba924 100644 --- a/plotly/validators/box/_xaxis.py +++ b/plotly/validators/box/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="box", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/box/_xcalendar.py b/plotly/validators/box/_xcalendar.py index 4c6d2c9b3b..95a1fa3347 100644 --- a/plotly/validators/box/_xcalendar.py +++ b/plotly/validators/box/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="box", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/box/_xhoverformat.py b/plotly/validators/box/_xhoverformat.py index 590afd1c5b..7c57faaaa7 100644 --- a/plotly/validators/box/_xhoverformat.py +++ b/plotly/validators/box/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="box", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_xperiod.py b/plotly/validators/box/_xperiod.py index c261a0fed6..2f35673e81 100644 --- a/plotly/validators/box/_xperiod.py +++ b/plotly/validators/box/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="box", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_xperiod0.py b/plotly/validators/box/_xperiod0.py index 7130a0c523..73c0a269f2 100644 --- a/plotly/validators/box/_xperiod0.py +++ b/plotly/validators/box/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="box", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_xperiodalignment.py b/plotly/validators/box/_xperiodalignment.py index 74923b1237..18909dcd00 100644 --- a/plotly/validators/box/_xperiodalignment.py +++ b/plotly/validators/box/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="box", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/box/_xsrc.py b/plotly/validators/box/_xsrc.py index 5313ccb2e1..328a8ec833 100644 --- a/plotly/validators/box/_xsrc.py +++ b/plotly/validators/box/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="box", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_y.py b/plotly/validators/box/_y.py index 5054599dd2..b0e0a5ab28 100644 --- a/plotly/validators/box/_y.py +++ b/plotly/validators/box/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="box", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_y0.py b/plotly/validators/box/_y0.py index 8ab218c586..dc995978a8 100644 --- a/plotly/validators/box/_y0.py +++ b/plotly/validators/box/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="box", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/box/_yaxis.py b/plotly/validators/box/_yaxis.py index 1b081a8545..c5551ee66d 100644 --- a/plotly/validators/box/_yaxis.py +++ b/plotly/validators/box/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="box", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/box/_ycalendar.py b/plotly/validators/box/_ycalendar.py index 65d2a40025..949c838dbf 100644 --- a/plotly/validators/box/_ycalendar.py +++ b/plotly/validators/box/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="box", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/box/_yhoverformat.py b/plotly/validators/box/_yhoverformat.py index da2e1f2751..927fc5ec54 100644 --- a/plotly/validators/box/_yhoverformat.py +++ b/plotly/validators/box/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="box", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_yperiod.py b/plotly/validators/box/_yperiod.py index 03a84e4aff..8974ce3121 100644 --- a/plotly/validators/box/_yperiod.py +++ b/plotly/validators/box/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="box", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_yperiod0.py b/plotly/validators/box/_yperiod0.py index f8ed1d3892..1f8da4103c 100644 --- a/plotly/validators/box/_yperiod0.py +++ b/plotly/validators/box/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="box", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/box/_yperiodalignment.py b/plotly/validators/box/_yperiodalignment.py index 1f7795a211..2641434d68 100644 --- a/plotly/validators/box/_yperiodalignment.py +++ b/plotly/validators/box/_yperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yperiodalignment", parent_name="box", **kwargs): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/box/_ysrc.py b/plotly/validators/box/_ysrc.py index 242d96af5b..9a8e3b2796 100644 --- a/plotly/validators/box/_ysrc.py +++ b/plotly/validators/box/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="box", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/_zorder.py b/plotly/validators/box/_zorder.py index 87a0623104..3934f91b89 100644 --- a/plotly/validators/box/_zorder.py +++ b/plotly/validators/box/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="box", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/__init__.py b/plotly/validators/box/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/box/hoverlabel/__init__.py +++ b/plotly/validators/box/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/box/hoverlabel/_align.py b/plotly/validators/box/hoverlabel/_align.py index d978c54ef9..3132d696b2 100644 --- a/plotly/validators/box/hoverlabel/_align.py +++ b/plotly/validators/box/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="box.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/box/hoverlabel/_alignsrc.py b/plotly/validators/box/hoverlabel/_alignsrc.py index b62f55c035..ed3aa178e0 100644 --- a/plotly/validators/box/hoverlabel/_alignsrc.py +++ b/plotly/validators/box/hoverlabel/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="box.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/_bgcolor.py b/plotly/validators/box/hoverlabel/_bgcolor.py index ae3069b690..fcd592d401 100644 --- a/plotly/validators/box/hoverlabel/_bgcolor.py +++ b/plotly/validators/box/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="box.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/box/hoverlabel/_bgcolorsrc.py b/plotly/validators/box/hoverlabel/_bgcolorsrc.py index f2bd1e329e..e1ba89128b 100644 --- a/plotly/validators/box/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/box/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="box.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/_bordercolor.py b/plotly/validators/box/hoverlabel/_bordercolor.py index cd10223927..43b8c6b5d0 100644 --- a/plotly/validators/box/hoverlabel/_bordercolor.py +++ b/plotly/validators/box/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="box.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/box/hoverlabel/_bordercolorsrc.py b/plotly/validators/box/hoverlabel/_bordercolorsrc.py index e63b525983..3a88f21a4d 100644 --- a/plotly/validators/box/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/box/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="box.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/_font.py b/plotly/validators/box/hoverlabel/_font.py index 4710b01d4b..16fcebe888 100644 --- a/plotly/validators/box/hoverlabel/_font.py +++ b/plotly/validators/box/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="box.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/box/hoverlabel/_namelength.py b/plotly/validators/box/hoverlabel/_namelength.py index d1837e9169..11a995bb2b 100644 --- a/plotly/validators/box/hoverlabel/_namelength.py +++ b/plotly/validators/box/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="box.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/box/hoverlabel/_namelengthsrc.py b/plotly/validators/box/hoverlabel/_namelengthsrc.py index c66ff3938b..6773cea35e 100644 --- a/plotly/validators/box/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/box/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="box.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/__init__.py b/plotly/validators/box/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/box/hoverlabel/font/__init__.py +++ b/plotly/validators/box/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/box/hoverlabel/font/_color.py b/plotly/validators/box/hoverlabel/font/_color.py index 9f2ca27ec1..ad107d1d6c 100644 --- a/plotly/validators/box/hoverlabel/font/_color.py +++ b/plotly/validators/box/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="box.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/box/hoverlabel/font/_colorsrc.py b/plotly/validators/box/hoverlabel/font/_colorsrc.py index 5fc4a7d24d..5609084214 100644 --- a/plotly/validators/box/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/box/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="box.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_family.py b/plotly/validators/box/hoverlabel/font/_family.py index 31ba24191a..4a8a35c419 100644 --- a/plotly/validators/box/hoverlabel/font/_family.py +++ b/plotly/validators/box/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="box.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/box/hoverlabel/font/_familysrc.py b/plotly/validators/box/hoverlabel/font/_familysrc.py index 1a73987318..117bc353d0 100644 --- a/plotly/validators/box/hoverlabel/font/_familysrc.py +++ b/plotly/validators/box/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="box.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_lineposition.py b/plotly/validators/box/hoverlabel/font/_lineposition.py index 6efa962c15..83f690e4b5 100644 --- a/plotly/validators/box/hoverlabel/font/_lineposition.py +++ b/plotly/validators/box/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="box.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/box/hoverlabel/font/_linepositionsrc.py b/plotly/validators/box/hoverlabel/font/_linepositionsrc.py index 9a852f12ef..4f726538f7 100644 --- a/plotly/validators/box/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/box/hoverlabel/font/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="box.hoverlabel.font", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_shadow.py b/plotly/validators/box/hoverlabel/font/_shadow.py index 28bb8404ea..e0518df96b 100644 --- a/plotly/validators/box/hoverlabel/font/_shadow.py +++ b/plotly/validators/box/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="box.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/box/hoverlabel/font/_shadowsrc.py b/plotly/validators/box/hoverlabel/font/_shadowsrc.py index 1b0189b1b9..f6009e3200 100644 --- a/plotly/validators/box/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/box/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="box.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_size.py b/plotly/validators/box/hoverlabel/font/_size.py index e2ba458863..1f19353112 100644 --- a/plotly/validators/box/hoverlabel/font/_size.py +++ b/plotly/validators/box/hoverlabel/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="box.hoverlabel.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/box/hoverlabel/font/_sizesrc.py b/plotly/validators/box/hoverlabel/font/_sizesrc.py index 173e4fa679..56933f4886 100644 --- a/plotly/validators/box/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/box/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="box.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_style.py b/plotly/validators/box/hoverlabel/font/_style.py index 31fc69bb3e..5039777d9b 100644 --- a/plotly/validators/box/hoverlabel/font/_style.py +++ b/plotly/validators/box/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="box.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/box/hoverlabel/font/_stylesrc.py b/plotly/validators/box/hoverlabel/font/_stylesrc.py index 14462534f7..8c1d6cd782 100644 --- a/plotly/validators/box/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/box/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="box.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_textcase.py b/plotly/validators/box/hoverlabel/font/_textcase.py index 93b0055654..e612439f07 100644 --- a/plotly/validators/box/hoverlabel/font/_textcase.py +++ b/plotly/validators/box/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="box.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/box/hoverlabel/font/_textcasesrc.py b/plotly/validators/box/hoverlabel/font/_textcasesrc.py index 82e4948464..20c2e266ee 100644 --- a/plotly/validators/box/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/box/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="box.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_variant.py b/plotly/validators/box/hoverlabel/font/_variant.py index f196c4496f..ebaba0a9fd 100644 --- a/plotly/validators/box/hoverlabel/font/_variant.py +++ b/plotly/validators/box/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="box.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/box/hoverlabel/font/_variantsrc.py b/plotly/validators/box/hoverlabel/font/_variantsrc.py index be3a298405..d3d7b9bbc2 100644 --- a/plotly/validators/box/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/box/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="box.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/hoverlabel/font/_weight.py b/plotly/validators/box/hoverlabel/font/_weight.py index 5f4cc3aace..237321d9b9 100644 --- a/plotly/validators/box/hoverlabel/font/_weight.py +++ b/plotly/validators/box/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="box.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/box/hoverlabel/font/_weightsrc.py b/plotly/validators/box/hoverlabel/font/_weightsrc.py index 06f0d60847..dcfbceee98 100644 --- a/plotly/validators/box/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/box/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="box.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/box/legendgrouptitle/__init__.py b/plotly/validators/box/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/box/legendgrouptitle/__init__.py +++ b/plotly/validators/box/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/box/legendgrouptitle/_font.py b/plotly/validators/box/legendgrouptitle/_font.py index c1489caef2..1539d354f3 100644 --- a/plotly/validators/box/legendgrouptitle/_font.py +++ b/plotly/validators/box/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="box.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/box/legendgrouptitle/_text.py b/plotly/validators/box/legendgrouptitle/_text.py index 9ed226e161..91d8a09809 100644 --- a/plotly/validators/box/legendgrouptitle/_text.py +++ b/plotly/validators/box/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="box.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/legendgrouptitle/font/__init__.py b/plotly/validators/box/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/box/legendgrouptitle/font/__init__.py +++ b/plotly/validators/box/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/box/legendgrouptitle/font/_color.py b/plotly/validators/box/legendgrouptitle/font/_color.py index 506ef98a85..123412293a 100644 --- a/plotly/validators/box/legendgrouptitle/font/_color.py +++ b/plotly/validators/box/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="box.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/legendgrouptitle/font/_family.py b/plotly/validators/box/legendgrouptitle/font/_family.py index 75b138d1e3..aca442190d 100644 --- a/plotly/validators/box/legendgrouptitle/font/_family.py +++ b/plotly/validators/box/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="box.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/box/legendgrouptitle/font/_lineposition.py b/plotly/validators/box/legendgrouptitle/font/_lineposition.py index cfd688e509..a555bb113e 100644 --- a/plotly/validators/box/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/box/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="box.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/box/legendgrouptitle/font/_shadow.py b/plotly/validators/box/legendgrouptitle/font/_shadow.py index 2e642ee86c..970f223d34 100644 --- a/plotly/validators/box/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/box/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="box.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/legendgrouptitle/font/_size.py b/plotly/validators/box/legendgrouptitle/font/_size.py index 4f67a911cb..9604dadbaa 100644 --- a/plotly/validators/box/legendgrouptitle/font/_size.py +++ b/plotly/validators/box/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="box.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/box/legendgrouptitle/font/_style.py b/plotly/validators/box/legendgrouptitle/font/_style.py index 47263ff089..ca2c961dc2 100644 --- a/plotly/validators/box/legendgrouptitle/font/_style.py +++ b/plotly/validators/box/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="box.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/box/legendgrouptitle/font/_textcase.py b/plotly/validators/box/legendgrouptitle/font/_textcase.py index 1faa69bb32..a38a216d3c 100644 --- a/plotly/validators/box/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/box/legendgrouptitle/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="box.legendgrouptitle.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/box/legendgrouptitle/font/_variant.py b/plotly/validators/box/legendgrouptitle/font/_variant.py index 17c9f79928..aa4ee656de 100644 --- a/plotly/validators/box/legendgrouptitle/font/_variant.py +++ b/plotly/validators/box/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="box.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/box/legendgrouptitle/font/_weight.py b/plotly/validators/box/legendgrouptitle/font/_weight.py index 1085b2e07f..797ae1cd79 100644 --- a/plotly/validators/box/legendgrouptitle/font/_weight.py +++ b/plotly/validators/box/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="box.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/box/line/__init__.py b/plotly/validators/box/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/box/line/__init__.py +++ b/plotly/validators/box/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/box/line/_color.py b/plotly/validators/box/line/_color.py index e762ea592a..3cd15bda84 100644 --- a/plotly/validators/box/line/_color.py +++ b/plotly/validators/box/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="box.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/line/_width.py b/plotly/validators/box/line/_width.py index 6e61d4e57b..b4563497cd 100644 --- a/plotly/validators/box/line/_width.py +++ b/plotly/validators/box/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="box.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/box/marker/__init__.py b/plotly/validators/box/marker/__init__.py index 59cc1848f1..e15653f2f3 100644 --- a/plotly/validators/box/marker/__init__.py +++ b/plotly/validators/box/marker/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbol import SymbolValidator - from ._size import SizeValidator - from ._outliercolor import OutliercolorValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._color import ColorValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbol.SymbolValidator", - "._size.SizeValidator", - "._outliercolor.OutliercolorValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._color.ColorValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbol.SymbolValidator", + "._size.SizeValidator", + "._outliercolor.OutliercolorValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._color.ColorValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/box/marker/_angle.py b/plotly/validators/box/marker/_angle.py index 4e04fbe3d7..2419a766a0 100644 --- a/plotly/validators/box/marker/_angle.py +++ b/plotly/validators/box/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__(self, plotly_name="angle", parent_name="box.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/box/marker/_color.py b/plotly/validators/box/marker/_color.py index eccffc530b..676cc30e1e 100644 --- a/plotly/validators/box/marker/_color.py +++ b/plotly/validators/box/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="box.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/box/marker/_line.py b/plotly/validators/box/marker/_line.py index c81640f474..70d0188e67 100644 --- a/plotly/validators/box/marker/_line.py +++ b/plotly/validators/box/marker/_line.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="box.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. """, ), **kwargs, diff --git a/plotly/validators/box/marker/_opacity.py b/plotly/validators/box/marker/_opacity.py index d5a17b6858..6063cce164 100644 --- a/plotly/validators/box/marker/_opacity.py +++ b/plotly/validators/box/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="box.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/box/marker/_outliercolor.py b/plotly/validators/box/marker/_outliercolor.py index e8bdd773c6..44f9d14437 100644 --- a/plotly/validators/box/marker/_outliercolor.py +++ b/plotly/validators/box/marker/_outliercolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutliercolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="outliercolor", parent_name="box.marker", **kwargs): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/marker/_size.py b/plotly/validators/box/marker/_size.py index aef23cd6fd..f0588d2515 100644 --- a/plotly/validators/box/marker/_size.py +++ b/plotly/validators/box/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="box.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/marker/_symbol.py b/plotly/validators/box/marker/_symbol.py index bf3aa141cf..11fd6c2631 100644 --- a/plotly/validators/box/marker/_symbol.py +++ b/plotly/validators/box/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="box.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/box/marker/line/__init__.py b/plotly/validators/box/marker/line/__init__.py index 7778bf581e..e296cd4850 100644 --- a/plotly/validators/box/marker/line/__init__.py +++ b/plotly/validators/box/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._outlierwidth import OutlierwidthValidator - from ._outliercolor import OutliercolorValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._outlierwidth.OutlierwidthValidator", - "._outliercolor.OutliercolorValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._outlierwidth.OutlierwidthValidator", + "._outliercolor.OutliercolorValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/box/marker/line/_color.py b/plotly/validators/box/marker/line/_color.py index 5435c5acbb..c520cea6d8 100644 --- a/plotly/validators/box/marker/line/_color.py +++ b/plotly/validators/box/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="box.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/box/marker/line/_outliercolor.py b/plotly/validators/box/marker/line/_outliercolor.py index ee06420559..41d21a313b 100644 --- a/plotly/validators/box/marker/line/_outliercolor.py +++ b/plotly/validators/box/marker/line/_outliercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutliercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outliercolor", parent_name="box.marker.line", **kwargs ): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/marker/line/_outlierwidth.py b/plotly/validators/box/marker/line/_outlierwidth.py index 2f1a9d8b14..14fc4efe2d 100644 --- a/plotly/validators/box/marker/line/_outlierwidth.py +++ b/plotly/validators/box/marker/line/_outlierwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlierwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlierwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlierwidth", parent_name="box.marker.line", **kwargs ): - super(OutlierwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/box/marker/line/_width.py b/plotly/validators/box/marker/line/_width.py index d938bf302e..87e5f88261 100644 --- a/plotly/validators/box/marker/line/_width.py +++ b/plotly/validators/box/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="box.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/selected/__init__.py b/plotly/validators/box/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/box/selected/__init__.py +++ b/plotly/validators/box/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/box/selected/_marker.py b/plotly/validators/box/selected/_marker.py index 35cb47a659..bbd69b5c16 100644 --- a/plotly/validators/box/selected/_marker.py +++ b/plotly/validators/box/selected/_marker.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="box.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/box/selected/marker/__init__.py b/plotly/validators/box/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/box/selected/marker/__init__.py +++ b/plotly/validators/box/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/box/selected/marker/_color.py b/plotly/validators/box/selected/marker/_color.py index 28b3692ad7..c9b6a7bffb 100644 --- a/plotly/validators/box/selected/marker/_color.py +++ b/plotly/validators/box/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="box.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/selected/marker/_opacity.py b/plotly/validators/box/selected/marker/_opacity.py index 7ce8a2dd58..704bb772f1 100644 --- a/plotly/validators/box/selected/marker/_opacity.py +++ b/plotly/validators/box/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="box.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/selected/marker/_size.py b/plotly/validators/box/selected/marker/_size.py index cc58197458..3c285adc23 100644 --- a/plotly/validators/box/selected/marker/_size.py +++ b/plotly/validators/box/selected/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="box.selected.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/box/stream/__init__.py b/plotly/validators/box/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/box/stream/__init__.py +++ b/plotly/validators/box/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/box/stream/_maxpoints.py b/plotly/validators/box/stream/_maxpoints.py index 874da7def5..b94d157e74 100644 --- a/plotly/validators/box/stream/_maxpoints.py +++ b/plotly/validators/box/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="box.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/stream/_token.py b/plotly/validators/box/stream/_token.py index 36b10987e4..fc27f262cc 100644 --- a/plotly/validators/box/stream/_token.py +++ b/plotly/validators/box/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="box.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/box/unselected/__init__.py b/plotly/validators/box/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/box/unselected/__init__.py +++ b/plotly/validators/box/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/box/unselected/_marker.py b/plotly/validators/box/unselected/_marker.py index dff160f815..0cc1244521 100644 --- a/plotly/validators/box/unselected/_marker.py +++ b/plotly/validators/box/unselected/_marker.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="box.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/box/unselected/marker/__init__.py b/plotly/validators/box/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/box/unselected/marker/__init__.py +++ b/plotly/validators/box/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/box/unselected/marker/_color.py b/plotly/validators/box/unselected/marker/_color.py index eb7066d46b..aae5377ace 100644 --- a/plotly/validators/box/unselected/marker/_color.py +++ b/plotly/validators/box/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="box.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/box/unselected/marker/_opacity.py b/plotly/validators/box/unselected/marker/_opacity.py index 3773c7044d..44a45029c9 100644 --- a/plotly/validators/box/unselected/marker/_opacity.py +++ b/plotly/validators/box/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="box.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/box/unselected/marker/_size.py b/plotly/validators/box/unselected/marker/_size.py index cfe9f3a2e0..70b7b68c7e 100644 --- a/plotly/validators/box/unselected/marker/_size.py +++ b/plotly/validators/box/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="box.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/candlestick/__init__.py b/plotly/validators/candlestick/__init__.py index ad4090b7f5..8737b9b824 100644 --- a/plotly/validators/candlestick/__init__.py +++ b/plotly/validators/candlestick/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._yhoverformat import YhoverformatValidator - from ._yaxis import YaxisValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x import XValidator - from ._whiskerwidth import WhiskerwidthValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._opensrc import OpensrcValidator - from ._open import OpenValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lowsrc import LowsrcValidator - from ._low import LowValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._increasing import IncreasingValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._highsrc import HighsrcValidator - from ._high import HighValidator - from ._decreasing import DecreasingValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._closesrc import ClosesrcValidator - from ._close import CloseValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._yhoverformat.YhoverformatValidator", - "._yaxis.YaxisValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x.XValidator", - "._whiskerwidth.WhiskerwidthValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._opensrc.OpensrcValidator", - "._open.OpenValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lowsrc.LowsrcValidator", - "._low.LowValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._increasing.IncreasingValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._highsrc.HighsrcValidator", - "._high.HighValidator", - "._decreasing.DecreasingValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._closesrc.ClosesrcValidator", - "._close.CloseValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._yhoverformat.YhoverformatValidator", + "._yaxis.YaxisValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._whiskerwidth.WhiskerwidthValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._opensrc.OpensrcValidator", + "._open.OpenValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lowsrc.LowsrcValidator", + "._low.LowValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._increasing.IncreasingValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._highsrc.HighsrcValidator", + "._high.HighValidator", + "._decreasing.DecreasingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._closesrc.ClosesrcValidator", + "._close.CloseValidator", + ], +) diff --git a/plotly/validators/candlestick/_close.py b/plotly/validators/candlestick/_close.py index aa882c3815..a34e9ef640 100644 --- a/plotly/validators/candlestick/_close.py +++ b/plotly/validators/candlestick/_close.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CloseValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CloseValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="close", parent_name="candlestick", **kwargs): - super(CloseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_closesrc.py b/plotly/validators/candlestick/_closesrc.py index e6b30c635b..3f9695fca5 100644 --- a/plotly/validators/candlestick/_closesrc.py +++ b/plotly/validators/candlestick/_closesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ClosesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="closesrc", parent_name="candlestick", **kwargs): - super(ClosesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_customdata.py b/plotly/validators/candlestick/_customdata.py index 081b023bea..bfd8a1f0a5 100644 --- a/plotly/validators/candlestick/_customdata.py +++ b/plotly/validators/candlestick/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="candlestick", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_customdatasrc.py b/plotly/validators/candlestick/_customdatasrc.py index 9f1f5962fc..59a7420f7e 100644 --- a/plotly/validators/candlestick/_customdatasrc.py +++ b/plotly/validators/candlestick/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="candlestick", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_decreasing.py b/plotly/validators/candlestick/_decreasing.py index bd24046cd3..47a54f6445 100644 --- a/plotly/validators/candlestick/_decreasing.py +++ b/plotly/validators/candlestick/_decreasing.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class DecreasingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="decreasing", parent_name="candlestick", **kwargs): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Decreasing"), data_docs=kwargs.pop( "data_docs", """ - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.decrea - sing.Line` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/candlestick/_high.py b/plotly/validators/candlestick/_high.py index 7875b4ca4a..1093fafeec 100644 --- a/plotly/validators/candlestick/_high.py +++ b/plotly/validators/candlestick/_high.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HighValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="high", parent_name="candlestick", **kwargs): - super(HighValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_highsrc.py b/plotly/validators/candlestick/_highsrc.py index cf23bcf8b7..4662862aee 100644 --- a/plotly/validators/candlestick/_highsrc.py +++ b/plotly/validators/candlestick/_highsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HighsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="highsrc", parent_name="candlestick", **kwargs): - super(HighsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_hoverinfo.py b/plotly/validators/candlestick/_hoverinfo.py index 2d674dd6db..e8845b4c6d 100644 --- a/plotly/validators/candlestick/_hoverinfo.py +++ b/plotly/validators/candlestick/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="candlestick", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/candlestick/_hoverinfosrc.py b/plotly/validators/candlestick/_hoverinfosrc.py index 5642695f7c..bc017792fe 100644 --- a/plotly/validators/candlestick/_hoverinfosrc.py +++ b/plotly/validators/candlestick/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="candlestick", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_hoverlabel.py b/plotly/validators/candlestick/_hoverlabel.py index 274f5c5873..c318398b6e 100644 --- a/plotly/validators/candlestick/_hoverlabel.py +++ b/plotly/validators/candlestick/_hoverlabel.py @@ -1,53 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="candlestick", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - split - Show hover information (open, close, high, low) - in separate labels. """, ), **kwargs, diff --git a/plotly/validators/candlestick/_hovertext.py b/plotly/validators/candlestick/_hovertext.py index 39e7d0b7a4..10b3a1b5cd 100644 --- a/plotly/validators/candlestick/_hovertext.py +++ b/plotly/validators/candlestick/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="candlestick", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/candlestick/_hovertextsrc.py b/plotly/validators/candlestick/_hovertextsrc.py index 624a95d843..4106118b26 100644 --- a/plotly/validators/candlestick/_hovertextsrc.py +++ b/plotly/validators/candlestick/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="candlestick", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_ids.py b/plotly/validators/candlestick/_ids.py index 6f32ec6b9b..d972a00301 100644 --- a/plotly/validators/candlestick/_ids.py +++ b/plotly/validators/candlestick/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="candlestick", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_idssrc.py b/plotly/validators/candlestick/_idssrc.py index 2197f6a914..b00acdf658 100644 --- a/plotly/validators/candlestick/_idssrc.py +++ b/plotly/validators/candlestick/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="candlestick", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_increasing.py b/plotly/validators/candlestick/_increasing.py index 7577bd191c..e8b838c799 100644 --- a/plotly/validators/candlestick/_increasing.py +++ b/plotly/validators/candlestick/_increasing.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class IncreasingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="increasing", parent_name="candlestick", **kwargs): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Increasing"), data_docs=kwargs.pop( "data_docs", """ - fillcolor - Sets the fill color. Defaults to a half- - transparent variant of the line color, marker - color, or marker line color, whichever is - available. - line - :class:`plotly.graph_objects.candlestick.increa - sing.Line` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/candlestick/_legend.py b/plotly/validators/candlestick/_legend.py index 899ab2e3f7..1564bbb0cc 100644 --- a/plotly/validators/candlestick/_legend.py +++ b/plotly/validators/candlestick/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="candlestick", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/candlestick/_legendgroup.py b/plotly/validators/candlestick/_legendgroup.py index 849481ed80..758cec861b 100644 --- a/plotly/validators/candlestick/_legendgroup.py +++ b/plotly/validators/candlestick/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="candlestick", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/_legendgrouptitle.py b/plotly/validators/candlestick/_legendgrouptitle.py index d683367ef3..4f91fff771 100644 --- a/plotly/validators/candlestick/_legendgrouptitle.py +++ b/plotly/validators/candlestick/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="candlestick", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/candlestick/_legendrank.py b/plotly/validators/candlestick/_legendrank.py index d168f5854b..703e5da192 100644 --- a/plotly/validators/candlestick/_legendrank.py +++ b/plotly/validators/candlestick/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="candlestick", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/_legendwidth.py b/plotly/validators/candlestick/_legendwidth.py index f3a6a8ec62..bc1f533bb6 100644 --- a/plotly/validators/candlestick/_legendwidth.py +++ b/plotly/validators/candlestick/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="candlestick", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/candlestick/_line.py b/plotly/validators/candlestick/_line.py index 7f168b6aa5..982c2e363f 100644 --- a/plotly/validators/candlestick/_line.py +++ b/plotly/validators/candlestick/_line.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="candlestick", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - width - Sets the width (in px) of line bounding the - box(es). Note that this style setting can also - be set per direction via - `increasing.line.width` and - `decreasing.line.width`. """, ), **kwargs, diff --git a/plotly/validators/candlestick/_low.py b/plotly/validators/candlestick/_low.py index 45a12d0987..67d33ff86d 100644 --- a/plotly/validators/candlestick/_low.py +++ b/plotly/validators/candlestick/_low.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LowValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LowValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="low", parent_name="candlestick", **kwargs): - super(LowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_lowsrc.py b/plotly/validators/candlestick/_lowsrc.py index 2bdf22746b..5d365c1e62 100644 --- a/plotly/validators/candlestick/_lowsrc.py +++ b/plotly/validators/candlestick/_lowsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LowsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lowsrc", parent_name="candlestick", **kwargs): - super(LowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_meta.py b/plotly/validators/candlestick/_meta.py index b604b85f90..7ba42494ac 100644 --- a/plotly/validators/candlestick/_meta.py +++ b/plotly/validators/candlestick/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="candlestick", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/candlestick/_metasrc.py b/plotly/validators/candlestick/_metasrc.py index c33b7e49e1..db2f28fcd8 100644 --- a/plotly/validators/candlestick/_metasrc.py +++ b/plotly/validators/candlestick/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="candlestick", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_name.py b/plotly/validators/candlestick/_name.py index ae23cc4a5b..5505df7400 100644 --- a/plotly/validators/candlestick/_name.py +++ b/plotly/validators/candlestick/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="candlestick", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/_opacity.py b/plotly/validators/candlestick/_opacity.py index 7ead8254b3..cb3e42492d 100644 --- a/plotly/validators/candlestick/_opacity.py +++ b/plotly/validators/candlestick/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="candlestick", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/candlestick/_open.py b/plotly/validators/candlestick/_open.py index d969109af5..f9493413eb 100644 --- a/plotly/validators/candlestick/_open.py +++ b/plotly/validators/candlestick/_open.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): +class OpenValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="open", parent_name="candlestick", **kwargs): - super(OpenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_opensrc.py b/plotly/validators/candlestick/_opensrc.py index 311dd9633b..04382b68a8 100644 --- a/plotly/validators/candlestick/_opensrc.py +++ b/plotly/validators/candlestick/_opensrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpensrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="opensrc", parent_name="candlestick", **kwargs): - super(OpensrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_selectedpoints.py b/plotly/validators/candlestick/_selectedpoints.py index ec62165565..0cf949a5a2 100644 --- a/plotly/validators/candlestick/_selectedpoints.py +++ b/plotly/validators/candlestick/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="candlestick", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_showlegend.py b/plotly/validators/candlestick/_showlegend.py index 7588a298c1..ce73afaf90 100644 --- a/plotly/validators/candlestick/_showlegend.py +++ b/plotly/validators/candlestick/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="candlestick", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/_stream.py b/plotly/validators/candlestick/_stream.py index 896c1b9319..9cf9000b87 100644 --- a/plotly/validators/candlestick/_stream.py +++ b/plotly/validators/candlestick/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="candlestick", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/candlestick/_text.py b/plotly/validators/candlestick/_text.py index e5edada321..fa5881a133 100644 --- a/plotly/validators/candlestick/_text.py +++ b/plotly/validators/candlestick/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="candlestick", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/candlestick/_textsrc.py b/plotly/validators/candlestick/_textsrc.py index 0b76dbf853..925c741005 100644 --- a/plotly/validators/candlestick/_textsrc.py +++ b/plotly/validators/candlestick/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="candlestick", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_uid.py b/plotly/validators/candlestick/_uid.py index 1668723f08..15fa620c45 100644 --- a/plotly/validators/candlestick/_uid.py +++ b/plotly/validators/candlestick/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="candlestick", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/candlestick/_uirevision.py b/plotly/validators/candlestick/_uirevision.py index 3c92f0dc6c..9a8a5d7b38 100644 --- a/plotly/validators/candlestick/_uirevision.py +++ b/plotly/validators/candlestick/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="candlestick", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_visible.py b/plotly/validators/candlestick/_visible.py index ba9e64239e..35c26b4b0e 100644 --- a/plotly/validators/candlestick/_visible.py +++ b/plotly/validators/candlestick/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="candlestick", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/candlestick/_whiskerwidth.py b/plotly/validators/candlestick/_whiskerwidth.py index 3d74487d2c..de331aa8ac 100644 --- a/plotly/validators/candlestick/_whiskerwidth.py +++ b/plotly/validators/candlestick/_whiskerwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WhiskerwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WhiskerwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="whiskerwidth", parent_name="candlestick", **kwargs): - super(WhiskerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/candlestick/_x.py b/plotly/validators/candlestick/_x.py index e6ebee3138..a58f7dc822 100644 --- a/plotly/validators/candlestick/_x.py +++ b/plotly/validators/candlestick/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="candlestick", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/candlestick/_xaxis.py b/plotly/validators/candlestick/_xaxis.py index 50443d20b9..c38e3861b5 100644 --- a/plotly/validators/candlestick/_xaxis.py +++ b/plotly/validators/candlestick/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="candlestick", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/candlestick/_xcalendar.py b/plotly/validators/candlestick/_xcalendar.py index 142ec652ac..eea6a8739b 100644 --- a/plotly/validators/candlestick/_xcalendar.py +++ b/plotly/validators/candlestick/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="candlestick", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/candlestick/_xhoverformat.py b/plotly/validators/candlestick/_xhoverformat.py index 2e34c43825..959e3b1984 100644 --- a/plotly/validators/candlestick/_xhoverformat.py +++ b/plotly/validators/candlestick/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="candlestick", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_xperiod.py b/plotly/validators/candlestick/_xperiod.py index 8d3a25fd31..e06da325a5 100644 --- a/plotly/validators/candlestick/_xperiod.py +++ b/plotly/validators/candlestick/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="candlestick", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_xperiod0.py b/plotly/validators/candlestick/_xperiod0.py index 29e4b848e3..88bda6d842 100644 --- a/plotly/validators/candlestick/_xperiod0.py +++ b/plotly/validators/candlestick/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="candlestick", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/candlestick/_xperiodalignment.py b/plotly/validators/candlestick/_xperiodalignment.py index 3cd653b2a8..54c516b30e 100644 --- a/plotly/validators/candlestick/_xperiodalignment.py +++ b/plotly/validators/candlestick/_xperiodalignment.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xperiodalignment", parent_name="candlestick", **kwargs ): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/candlestick/_xsrc.py b/plotly/validators/candlestick/_xsrc.py index acbd1919bb..7a48e22bbd 100644 --- a/plotly/validators/candlestick/_xsrc.py +++ b/plotly/validators/candlestick/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="candlestick", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_yaxis.py b/plotly/validators/candlestick/_yaxis.py index affd6a4570..4abd76771c 100644 --- a/plotly/validators/candlestick/_yaxis.py +++ b/plotly/validators/candlestick/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="candlestick", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/candlestick/_yhoverformat.py b/plotly/validators/candlestick/_yhoverformat.py index d38420a84d..f9db7759fc 100644 --- a/plotly/validators/candlestick/_yhoverformat.py +++ b/plotly/validators/candlestick/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="candlestick", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/_zorder.py b/plotly/validators/candlestick/_zorder.py index cb084aaa50..2ee2fb61ce 100644 --- a/plotly/validators/candlestick/_zorder.py +++ b/plotly/validators/candlestick/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="candlestick", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/candlestick/decreasing/__init__.py b/plotly/validators/candlestick/decreasing/__init__.py index 07aaa323c2..94446eb305 100644 --- a/plotly/validators/candlestick/decreasing/__init__.py +++ b/plotly/validators/candlestick/decreasing/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator - from ._fillcolor import FillcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator", "._fillcolor.FillcolorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._fillcolor.FillcolorValidator"] +) diff --git a/plotly/validators/candlestick/decreasing/_fillcolor.py b/plotly/validators/candlestick/decreasing/_fillcolor.py index 50f6ac57ab..3a63b1b9bf 100644 --- a/plotly/validators/candlestick/decreasing/_fillcolor.py +++ b/plotly/validators/candlestick/decreasing/_fillcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fillcolor", parent_name="candlestick.decreasing", **kwargs ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/decreasing/_line.py b/plotly/validators/candlestick/decreasing/_line.py index 1fc4bc295d..6547e7c9a0 100644 --- a/plotly/validators/candlestick/decreasing/_line.py +++ b/plotly/validators/candlestick/decreasing/_line.py @@ -1,22 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="candlestick.decreasing", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). """, ), **kwargs, diff --git a/plotly/validators/candlestick/decreasing/line/__init__.py b/plotly/validators/candlestick/decreasing/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/candlestick/decreasing/line/__init__.py +++ b/plotly/validators/candlestick/decreasing/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/candlestick/decreasing/line/_color.py b/plotly/validators/candlestick/decreasing/line/_color.py index 4a472cba46..ea7a3f5535 100644 --- a/plotly/validators/candlestick/decreasing/line/_color.py +++ b/plotly/validators/candlestick/decreasing/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="candlestick.decreasing.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/decreasing/line/_width.py b/plotly/validators/candlestick/decreasing/line/_width.py index 178378059c..98ede4db8d 100644 --- a/plotly/validators/candlestick/decreasing/line/_width.py +++ b/plotly/validators/candlestick/decreasing/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="candlestick.decreasing.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/candlestick/hoverlabel/__init__.py b/plotly/validators/candlestick/hoverlabel/__init__.py index 5504c36e76..f4773f7cdd 100644 --- a/plotly/validators/candlestick/hoverlabel/__init__.py +++ b/plotly/validators/candlestick/hoverlabel/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._split import SplitValidator - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._split.SplitValidator", - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._split.SplitValidator", + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/candlestick/hoverlabel/_align.py b/plotly/validators/candlestick/hoverlabel/_align.py index 9b8e586980..9d13d6fe12 100644 --- a/plotly/validators/candlestick/hoverlabel/_align.py +++ b/plotly/validators/candlestick/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="candlestick.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/candlestick/hoverlabel/_alignsrc.py b/plotly/validators/candlestick/hoverlabel/_alignsrc.py index ba196f7615..bb7902a03c 100644 --- a/plotly/validators/candlestick/hoverlabel/_alignsrc.py +++ b/plotly/validators/candlestick/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="candlestick.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/_bgcolor.py b/plotly/validators/candlestick/hoverlabel/_bgcolor.py index ac79bc46a3..4222c27a47 100644 --- a/plotly/validators/candlestick/hoverlabel/_bgcolor.py +++ b/plotly/validators/candlestick/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="candlestick.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py b/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py index 2fe71ab30b..6d6f46e423 100644 --- a/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/candlestick/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="candlestick.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/_bordercolor.py b/plotly/validators/candlestick/hoverlabel/_bordercolor.py index bc694e0ddc..f2c9863cae 100644 --- a/plotly/validators/candlestick/hoverlabel/_bordercolor.py +++ b/plotly/validators/candlestick/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="candlestick.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py b/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py index 27ce604d13..287d4a4357 100644 --- a/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/candlestick/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="candlestick.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/_font.py b/plotly/validators/candlestick/hoverlabel/_font.py index 580977fe24..99c9a2db87 100644 --- a/plotly/validators/candlestick/hoverlabel/_font.py +++ b/plotly/validators/candlestick/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="candlestick.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/candlestick/hoverlabel/_namelength.py b/plotly/validators/candlestick/hoverlabel/_namelength.py index 156b95441a..58fc66e304 100644 --- a/plotly/validators/candlestick/hoverlabel/_namelength.py +++ b/plotly/validators/candlestick/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="candlestick.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py b/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py index 1bcb9cffe7..08070abaf5 100644 --- a/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/candlestick/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="candlestick.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/_split.py b/plotly/validators/candlestick/hoverlabel/_split.py index b8fc33251e..f3514b4621 100644 --- a/plotly/validators/candlestick/hoverlabel/_split.py +++ b/plotly/validators/candlestick/hoverlabel/_split.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SplitValidator(_plotly_utils.basevalidators.BooleanValidator): +class SplitValidator(_bv.BooleanValidator): def __init__( self, plotly_name="split", parent_name="candlestick.hoverlabel", **kwargs ): - super(SplitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/__init__.py b/plotly/validators/candlestick/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/candlestick/hoverlabel/font/__init__.py +++ b/plotly/validators/candlestick/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/candlestick/hoverlabel/font/_color.py b/plotly/validators/candlestick/hoverlabel/font/_color.py index 596d135e39..c76f6c475d 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_color.py +++ b/plotly/validators/candlestick/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py b/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py index 04bf818a9b..f9f405b114 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_family.py b/plotly/validators/candlestick/hoverlabel/font/_family.py index 2c0d989782..7b201c83c4 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_family.py +++ b/plotly/validators/candlestick/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/candlestick/hoverlabel/font/_familysrc.py b/plotly/validators/candlestick/hoverlabel/font/_familysrc.py index 7aeead762b..ec6d9dd311 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_familysrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_lineposition.py b/plotly/validators/candlestick/hoverlabel/font/_lineposition.py index 68e16a20c7..f257967c54 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_lineposition.py +++ b/plotly/validators/candlestick/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/candlestick/hoverlabel/font/_linepositionsrc.py b/plotly/validators/candlestick/hoverlabel/font/_linepositionsrc.py index b86eab99ae..153cd0e513 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_shadow.py b/plotly/validators/candlestick/hoverlabel/font/_shadow.py index d959626dc7..64dbde945e 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_shadow.py +++ b/plotly/validators/candlestick/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/candlestick/hoverlabel/font/_shadowsrc.py b/plotly/validators/candlestick/hoverlabel/font/_shadowsrc.py index 45df55b8c7..e80d27056a 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_size.py b/plotly/validators/candlestick/hoverlabel/font/_size.py index 9e6a1257f3..4f3fe3782a 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_size.py +++ b/plotly/validators/candlestick/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py b/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py index 3c22d6fb15..96e6fa397c 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_style.py b/plotly/validators/candlestick/hoverlabel/font/_style.py index cdfddde345..2f21c02c93 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_style.py +++ b/plotly/validators/candlestick/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/candlestick/hoverlabel/font/_stylesrc.py b/plotly/validators/candlestick/hoverlabel/font/_stylesrc.py index ed3b1c3778..8f5e416745 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_textcase.py b/plotly/validators/candlestick/hoverlabel/font/_textcase.py index a01c4d85a2..aa4cf54b2f 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_textcase.py +++ b/plotly/validators/candlestick/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/candlestick/hoverlabel/font/_textcasesrc.py b/plotly/validators/candlestick/hoverlabel/font/_textcasesrc.py index fc566982a5..cf5c659e35 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_variant.py b/plotly/validators/candlestick/hoverlabel/font/_variant.py index 94dbcf0856..da55b62539 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_variant.py +++ b/plotly/validators/candlestick/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/candlestick/hoverlabel/font/_variantsrc.py b/plotly/validators/candlestick/hoverlabel/font/_variantsrc.py index bcb1fd117b..0d5fa7dbd1 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/hoverlabel/font/_weight.py b/plotly/validators/candlestick/hoverlabel/font/_weight.py index 7525538684..f7e3cddaf8 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_weight.py +++ b/plotly/validators/candlestick/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="candlestick.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/candlestick/hoverlabel/font/_weightsrc.py b/plotly/validators/candlestick/hoverlabel/font/_weightsrc.py index ea7e93201b..3991847430 100644 --- a/plotly/validators/candlestick/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/candlestick/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="candlestick.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/candlestick/increasing/__init__.py b/plotly/validators/candlestick/increasing/__init__.py index 07aaa323c2..94446eb305 100644 --- a/plotly/validators/candlestick/increasing/__init__.py +++ b/plotly/validators/candlestick/increasing/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator - from ._fillcolor import FillcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator", "._fillcolor.FillcolorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._fillcolor.FillcolorValidator"] +) diff --git a/plotly/validators/candlestick/increasing/_fillcolor.py b/plotly/validators/candlestick/increasing/_fillcolor.py index e92c67124c..5754b40161 100644 --- a/plotly/validators/candlestick/increasing/_fillcolor.py +++ b/plotly/validators/candlestick/increasing/_fillcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fillcolor", parent_name="candlestick.increasing", **kwargs ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/increasing/_line.py b/plotly/validators/candlestick/increasing/_line.py index 795d7b268c..fbc5329b30 100644 --- a/plotly/validators/candlestick/increasing/_line.py +++ b/plotly/validators/candlestick/increasing/_line.py @@ -1,22 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="candlestick.increasing", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of line bounding the box(es). - width - Sets the width (in px) of line bounding the - box(es). """, ), **kwargs, diff --git a/plotly/validators/candlestick/increasing/line/__init__.py b/plotly/validators/candlestick/increasing/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/candlestick/increasing/line/__init__.py +++ b/plotly/validators/candlestick/increasing/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/candlestick/increasing/line/_color.py b/plotly/validators/candlestick/increasing/line/_color.py index 41f12609ab..bc29206a05 100644 --- a/plotly/validators/candlestick/increasing/line/_color.py +++ b/plotly/validators/candlestick/increasing/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="candlestick.increasing.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/increasing/line/_width.py b/plotly/validators/candlestick/increasing/line/_width.py index 81615634b6..294f7bf822 100644 --- a/plotly/validators/candlestick/increasing/line/_width.py +++ b/plotly/validators/candlestick/increasing/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="candlestick.increasing.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/candlestick/legendgrouptitle/__init__.py b/plotly/validators/candlestick/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/candlestick/legendgrouptitle/__init__.py +++ b/plotly/validators/candlestick/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/candlestick/legendgrouptitle/_font.py b/plotly/validators/candlestick/legendgrouptitle/_font.py index 62873f1c2b..6121149b36 100644 --- a/plotly/validators/candlestick/legendgrouptitle/_font.py +++ b/plotly/validators/candlestick/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="candlestick.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/candlestick/legendgrouptitle/_text.py b/plotly/validators/candlestick/legendgrouptitle/_text.py index 0898b7026c..21dbb5a74d 100644 --- a/plotly/validators/candlestick/legendgrouptitle/_text.py +++ b/plotly/validators/candlestick/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="candlestick.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/legendgrouptitle/font/__init__.py b/plotly/validators/candlestick/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/__init__.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_color.py b/plotly/validators/candlestick/legendgrouptitle/font/_color.py index 97477e09d6..cebee28a16 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_color.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_family.py b/plotly/validators/candlestick/legendgrouptitle/font/_family.py index 8ed4dc9a9d..ced978e171 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_family.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_lineposition.py b/plotly/validators/candlestick/legendgrouptitle/font/_lineposition.py index 7abca22903..933a292bcf 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_shadow.py b/plotly/validators/candlestick/legendgrouptitle/font/_shadow.py index 0e8d2c3263..b2b77e3bd6 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_size.py b/plotly/validators/candlestick/legendgrouptitle/font/_size.py index bef3eea594..ce1678acba 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_size.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_style.py b/plotly/validators/candlestick/legendgrouptitle/font/_style.py index dc8ae59a18..be0e7dca2b 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_style.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_textcase.py b/plotly/validators/candlestick/legendgrouptitle/font/_textcase.py index 19b8710fe1..144291a5a8 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_variant.py b/plotly/validators/candlestick/legendgrouptitle/font/_variant.py index c785a04e53..9a6c5495c2 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_variant.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/candlestick/legendgrouptitle/font/_weight.py b/plotly/validators/candlestick/legendgrouptitle/font/_weight.py index b2eb97d9f5..5f6afa7fd6 100644 --- a/plotly/validators/candlestick/legendgrouptitle/font/_weight.py +++ b/plotly/validators/candlestick/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="candlestick.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/candlestick/line/__init__.py b/plotly/validators/candlestick/line/__init__.py index 99e75bd271..c61e0d7012 100644 --- a/plotly/validators/candlestick/line/__init__.py +++ b/plotly/validators/candlestick/line/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator"] +) diff --git a/plotly/validators/candlestick/line/_width.py b/plotly/validators/candlestick/line/_width.py index c34b2bec85..c68688c190 100644 --- a/plotly/validators/candlestick/line/_width.py +++ b/plotly/validators/candlestick/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="candlestick.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/candlestick/stream/__init__.py b/plotly/validators/candlestick/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/candlestick/stream/__init__.py +++ b/plotly/validators/candlestick/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/candlestick/stream/_maxpoints.py b/plotly/validators/candlestick/stream/_maxpoints.py index 36e63a006b..583a34dc15 100644 --- a/plotly/validators/candlestick/stream/_maxpoints.py +++ b/plotly/validators/candlestick/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="candlestick.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/candlestick/stream/_token.py b/plotly/validators/candlestick/stream/_token.py index 3f569028c9..d69977988f 100644 --- a/plotly/validators/candlestick/stream/_token.py +++ b/plotly/validators/candlestick/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="candlestick.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/__init__.py b/plotly/validators/carpet/__init__.py index 93ee44386e..52df60daab 100644 --- a/plotly/validators/carpet/__init__.py +++ b/plotly/validators/carpet/__init__.py @@ -1,87 +1,46 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yaxis import YaxisValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xaxis import XaxisValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._stream import StreamValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._font import FontValidator - from ._db import DbValidator - from ._da import DaValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._color import ColorValidator - from ._cheaterslope import CheaterslopeValidator - from ._carpet import CarpetValidator - from ._bsrc import BsrcValidator - from ._baxis import BaxisValidator - from ._b0 import B0Validator - from ._b import BValidator - from ._asrc import AsrcValidator - from ._aaxis import AaxisValidator - from ._a0 import A0Validator - from ._a import AValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yaxis.YaxisValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xaxis.XaxisValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._stream.StreamValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._font.FontValidator", - "._db.DbValidator", - "._da.DaValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._color.ColorValidator", - "._cheaterslope.CheaterslopeValidator", - "._carpet.CarpetValidator", - "._bsrc.BsrcValidator", - "._baxis.BaxisValidator", - "._b0.B0Validator", - "._b.BValidator", - "._asrc.AsrcValidator", - "._aaxis.AaxisValidator", - "._a0.A0Validator", - "._a.AValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._stream.StreamValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._font.FontValidator", + "._db.DbValidator", + "._da.DaValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._color.ColorValidator", + "._cheaterslope.CheaterslopeValidator", + "._carpet.CarpetValidator", + "._bsrc.BsrcValidator", + "._baxis.BaxisValidator", + "._b0.B0Validator", + "._b.BValidator", + "._asrc.AsrcValidator", + "._aaxis.AaxisValidator", + "._a0.A0Validator", + "._a.AValidator", + ], +) diff --git a/plotly/validators/carpet/_a.py b/plotly/validators/carpet/_a.py index f81ae659a9..e8a35e4e25 100644 --- a/plotly/validators/carpet/_a.py +++ b/plotly/validators/carpet/_a.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): +class AValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="a", parent_name="carpet", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_a0.py b/plotly/validators/carpet/_a0.py index 57204e2d74..ba967ddcbb 100644 --- a/plotly/validators/carpet/_a0.py +++ b/plotly/validators/carpet/_a0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class A0Validator(_plotly_utils.basevalidators.NumberValidator): +class A0Validator(_bv.NumberValidator): def __init__(self, plotly_name="a0", parent_name="carpet", **kwargs): - super(A0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_aaxis.py b/plotly/validators/carpet/_aaxis.py index f482fd8bba..f49dbaa616 100644 --- a/plotly/validators/carpet/_aaxis.py +++ b/plotly/validators/carpet/_aaxis.py @@ -1,250 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class AaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="aaxis", parent_name="carpet", **kwargs): - super(AaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Aaxis"), data_docs=kwargs.pop( "data_docs", """ - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the axis line. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minexponent - Hide SI prefix for 10^n if |n| is below this - number - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgriddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - aaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.aaxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - title - :class:`plotly.graph_objects.carpet.aaxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. """, ), **kwargs, diff --git a/plotly/validators/carpet/_asrc.py b/plotly/validators/carpet/_asrc.py index f0e213d32f..efb103d9da 100644 --- a/plotly/validators/carpet/_asrc.py +++ b/plotly/validators/carpet/_asrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="asrc", parent_name="carpet", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_b.py b/plotly/validators/carpet/_b.py index 545a72f789..644cc19e07 100644 --- a/plotly/validators/carpet/_b.py +++ b/plotly/validators/carpet/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): +class BValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="carpet", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_b0.py b/plotly/validators/carpet/_b0.py index 7f6b8166b2..24fad93aab 100644 --- a/plotly/validators/carpet/_b0.py +++ b/plotly/validators/carpet/_b0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class B0Validator(_plotly_utils.basevalidators.NumberValidator): +class B0Validator(_bv.NumberValidator): def __init__(self, plotly_name="b0", parent_name="carpet", **kwargs): - super(B0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_baxis.py b/plotly/validators/carpet/_baxis.py index dbcc47c632..d81f7bcb92 100644 --- a/plotly/validators/carpet/_baxis.py +++ b/plotly/validators/carpet/_baxis.py @@ -1,250 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class BaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="baxis", parent_name="carpet", **kwargs): - super(BaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Baxis"), data_docs=kwargs.pop( "data_docs", """ - arraydtick - The stride between grid lines along the axis - arraytick0 - The starting index of grid lines along the axis - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided, then `autorange` is set to False. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - cheatertype - - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - The stride between grid lines along the axis - endline - Determines whether or not a line is drawn at - along the final value of this axis. If True, - the end line is drawn on top of the grid lines. - endlinecolor - Sets the line color of the end line. - endlinewidth - Sets the width (in px) of the end line. - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the axis line color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the axis line. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - labelpadding - Extra padding between label and the axis - labelprefix - Sets a axis label prefix. - labelsuffix - Sets a axis label suffix. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minexponent - Hide SI prefix for 10^n if |n| is below this - number - minorgridcolor - Sets the color of the grid lines. - minorgridcount - Sets the number of minor grid ticks per major - grid tick - minorgriddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - minorgridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether axis labels are drawn on the - low side, the high side, both, or neither side - of the axis. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - smoothing - - startline - Determines whether or not a line is drawn at - along the starting value of this axis. If True, - the start line is drawn on top of the grid - lines. - startlinecolor - Sets the line color of the start line. - startlinewidth - Sets the width (in px) of the start line. - tick0 - The starting index of grid lines along the axis - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.carpet. - baxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.carpet.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of carpet.baxis.tickformatstops - tickmode - - tickprefix - Sets a tick label prefix. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - title - :class:`plotly.graph_objects.carpet.baxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. """, ), **kwargs, diff --git a/plotly/validators/carpet/_bsrc.py b/plotly/validators/carpet/_bsrc.py index f4a216d0fa..7ee765300a 100644 --- a/plotly/validators/carpet/_bsrc.py +++ b/plotly/validators/carpet/_bsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="bsrc", parent_name="carpet", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_carpet.py b/plotly/validators/carpet/_carpet.py index e6a2a28435..7439149418 100644 --- a/plotly/validators/carpet/_carpet.py +++ b/plotly/validators/carpet/_carpet.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CarpetValidator(_plotly_utils.basevalidators.StringValidator): +class CarpetValidator(_bv.StringValidator): def __init__(self, plotly_name="carpet", parent_name="carpet", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_cheaterslope.py b/plotly/validators/carpet/_cheaterslope.py index 7b7b726292..517ac67e48 100644 --- a/plotly/validators/carpet/_cheaterslope.py +++ b/plotly/validators/carpet/_cheaterslope.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CheaterslopeValidator(_plotly_utils.basevalidators.NumberValidator): +class CheaterslopeValidator(_bv.NumberValidator): def __init__(self, plotly_name="cheaterslope", parent_name="carpet", **kwargs): - super(CheaterslopeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_color.py b/plotly/validators/carpet/_color.py index aca2607808..b6266389cd 100644 --- a/plotly/validators/carpet/_color.py +++ b/plotly/validators/carpet/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="carpet", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/carpet/_customdata.py b/plotly/validators/carpet/_customdata.py index a52b0e5c34..b29b5e7061 100644 --- a/plotly/validators/carpet/_customdata.py +++ b/plotly/validators/carpet/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="carpet", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_customdatasrc.py b/plotly/validators/carpet/_customdatasrc.py index fba389c4b7..53ea409f55 100644 --- a/plotly/validators/carpet/_customdatasrc.py +++ b/plotly/validators/carpet/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="carpet", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_da.py b/plotly/validators/carpet/_da.py index bb81f48428..57abe2ce1c 100644 --- a/plotly/validators/carpet/_da.py +++ b/plotly/validators/carpet/_da.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DaValidator(_plotly_utils.basevalidators.NumberValidator): +class DaValidator(_bv.NumberValidator): def __init__(self, plotly_name="da", parent_name="carpet", **kwargs): - super(DaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_db.py b/plotly/validators/carpet/_db.py index 2c8dd15f5d..992c8b9f2c 100644 --- a/plotly/validators/carpet/_db.py +++ b/plotly/validators/carpet/_db.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DbValidator(_plotly_utils.basevalidators.NumberValidator): +class DbValidator(_bv.NumberValidator): def __init__(self, plotly_name="db", parent_name="carpet", **kwargs): - super(DbValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/_font.py b/plotly/validators/carpet/_font.py index 38ec5d817c..309825852e 100644 --- a/plotly/validators/carpet/_font.py +++ b/plotly/validators/carpet/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="carpet", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/carpet/_ids.py b/plotly/validators/carpet/_ids.py index 76e9824960..38e5bd0b03 100644 --- a/plotly/validators/carpet/_ids.py +++ b/plotly/validators/carpet/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="carpet", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/carpet/_idssrc.py b/plotly/validators/carpet/_idssrc.py index 98e4fb6ae7..386f6c93d3 100644 --- a/plotly/validators/carpet/_idssrc.py +++ b/plotly/validators/carpet/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="carpet", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_legend.py b/plotly/validators/carpet/_legend.py index 5483d3ce13..d9e3b9889f 100644 --- a/plotly/validators/carpet/_legend.py +++ b/plotly/validators/carpet/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="carpet", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/carpet/_legendgrouptitle.py b/plotly/validators/carpet/_legendgrouptitle.py index 6c6a94af66..00dff42523 100644 --- a/plotly/validators/carpet/_legendgrouptitle.py +++ b/plotly/validators/carpet/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="carpet", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/carpet/_legendrank.py b/plotly/validators/carpet/_legendrank.py index bbc7fdee7e..f25ed59b50 100644 --- a/plotly/validators/carpet/_legendrank.py +++ b/plotly/validators/carpet/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="carpet", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/carpet/_legendwidth.py b/plotly/validators/carpet/_legendwidth.py index 76a5fbf857..7d258d6987 100644 --- a/plotly/validators/carpet/_legendwidth.py +++ b/plotly/validators/carpet/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="carpet", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/_meta.py b/plotly/validators/carpet/_meta.py index 25296ba83a..4a61ac5e9a 100644 --- a/plotly/validators/carpet/_meta.py +++ b/plotly/validators/carpet/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="carpet", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/carpet/_metasrc.py b/plotly/validators/carpet/_metasrc.py index 441c5d5772..c36b22c006 100644 --- a/plotly/validators/carpet/_metasrc.py +++ b/plotly/validators/carpet/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="carpet", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_name.py b/plotly/validators/carpet/_name.py index eec35ae608..e7f3e41b4b 100644 --- a/plotly/validators/carpet/_name.py +++ b/plotly/validators/carpet/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="carpet", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/carpet/_opacity.py b/plotly/validators/carpet/_opacity.py index bcdb60fee6..c7dc796922 100644 --- a/plotly/validators/carpet/_opacity.py +++ b/plotly/validators/carpet/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="carpet", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/carpet/_stream.py b/plotly/validators/carpet/_stream.py index 80138cc999..7fe96e13b3 100644 --- a/plotly/validators/carpet/_stream.py +++ b/plotly/validators/carpet/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="carpet", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/carpet/_uid.py b/plotly/validators/carpet/_uid.py index c49db6d374..23b2f78367 100644 --- a/plotly/validators/carpet/_uid.py +++ b/plotly/validators/carpet/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="carpet", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/carpet/_uirevision.py b/plotly/validators/carpet/_uirevision.py index a45d4d90a9..3bf01f04ff 100644 --- a/plotly/validators/carpet/_uirevision.py +++ b/plotly/validators/carpet/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="carpet", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_visible.py b/plotly/validators/carpet/_visible.py index bc6699a72f..dec678ce1b 100644 --- a/plotly/validators/carpet/_visible.py +++ b/plotly/validators/carpet/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="carpet", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/carpet/_x.py b/plotly/validators/carpet/_x.py index 81e306b227..0bbf90cdf7 100644 --- a/plotly/validators/carpet/_x.py +++ b/plotly/validators/carpet/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="carpet", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/carpet/_xaxis.py b/plotly/validators/carpet/_xaxis.py index 22e0c0e934..1ce9726301 100644 --- a/plotly/validators/carpet/_xaxis.py +++ b/plotly/validators/carpet/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="carpet", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/carpet/_xsrc.py b/plotly/validators/carpet/_xsrc.py index da240ceed3..4154e16a3a 100644 --- a/plotly/validators/carpet/_xsrc.py +++ b/plotly/validators/carpet/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="carpet", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_y.py b/plotly/validators/carpet/_y.py index b626a69ac9..484aeca8b5 100644 --- a/plotly/validators/carpet/_y.py +++ b/plotly/validators/carpet/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="carpet", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/carpet/_yaxis.py b/plotly/validators/carpet/_yaxis.py index d72408ea60..fbb522335d 100644 --- a/plotly/validators/carpet/_yaxis.py +++ b/plotly/validators/carpet/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="carpet", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/carpet/_ysrc.py b/plotly/validators/carpet/_ysrc.py index 5f955a124b..0bc0dba886 100644 --- a/plotly/validators/carpet/_ysrc.py +++ b/plotly/validators/carpet/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="carpet", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/_zorder.py b/plotly/validators/carpet/_zorder.py index 5d719f1f91..586e05d454 100644 --- a/plotly/validators/carpet/_zorder.py +++ b/plotly/validators/carpet/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="carpet", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/__init__.py b/plotly/validators/carpet/aaxis/__init__.py index 5d27db03f9..eb5d615977 100644 --- a/plotly/validators/carpet/aaxis/__init__.py +++ b/plotly/validators/carpet/aaxis/__init__.py @@ -1,129 +1,67 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._startlinewidth import StartlinewidthValidator - from ._startlinecolor import StartlinecolorValidator - from ._startline import StartlineValidator - from ._smoothing import SmoothingValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._rangemode import RangemodeValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._minorgridwidth import MinorgridwidthValidator - from ._minorgriddash import MinorgriddashValidator - from ._minorgridcount import MinorgridcountValidator - from ._minorgridcolor import MinorgridcolorValidator - from ._minexponent import MinexponentValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._labelsuffix import LabelsuffixValidator - from ._labelprefix import LabelprefixValidator - from ._labelpadding import LabelpaddingValidator - from ._labelalias import LabelaliasValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._fixedrange import FixedrangeValidator - from ._exponentformat import ExponentformatValidator - from ._endlinewidth import EndlinewidthValidator - from ._endlinecolor import EndlinecolorValidator - from ._endline import EndlineValidator - from ._dtick import DtickValidator - from ._color import ColorValidator - from ._cheatertype import CheatertypeValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autorange import AutorangeValidator - from ._arraytick0 import Arraytick0Validator - from ._arraydtick import ArraydtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._type.TypeValidator", - "._title.TitleValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._startlinewidth.StartlinewidthValidator", - "._startlinecolor.StartlinecolorValidator", - "._startline.StartlineValidator", - "._smoothing.SmoothingValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._rangemode.RangemodeValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._minorgridwidth.MinorgridwidthValidator", - "._minorgriddash.MinorgriddashValidator", - "._minorgridcount.MinorgridcountValidator", - "._minorgridcolor.MinorgridcolorValidator", - "._minexponent.MinexponentValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._labelsuffix.LabelsuffixValidator", - "._labelprefix.LabelprefixValidator", - "._labelpadding.LabelpaddingValidator", - "._labelalias.LabelaliasValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._fixedrange.FixedrangeValidator", - "._exponentformat.ExponentformatValidator", - "._endlinewidth.EndlinewidthValidator", - "._endlinecolor.EndlinecolorValidator", - "._endline.EndlineValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - "._cheatertype.CheatertypeValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autorange.AutorangeValidator", - "._arraytick0.Arraytick0Validator", - "._arraydtick.ArraydtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._title.TitleValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._startlinewidth.StartlinewidthValidator", + "._startlinecolor.StartlinecolorValidator", + "._startline.StartlineValidator", + "._smoothing.SmoothingValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._minorgridwidth.MinorgridwidthValidator", + "._minorgriddash.MinorgriddashValidator", + "._minorgridcount.MinorgridcountValidator", + "._minorgridcolor.MinorgridcolorValidator", + "._minexponent.MinexponentValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelsuffix.LabelsuffixValidator", + "._labelprefix.LabelprefixValidator", + "._labelpadding.LabelpaddingValidator", + "._labelalias.LabelaliasValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._endlinewidth.EndlinewidthValidator", + "._endlinecolor.EndlinecolorValidator", + "._endline.EndlineValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._cheatertype.CheatertypeValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autorange.AutorangeValidator", + "._arraytick0.Arraytick0Validator", + "._arraydtick.ArraydtickValidator", + ], +) diff --git a/plotly/validators/carpet/aaxis/_arraydtick.py b/plotly/validators/carpet/aaxis/_arraydtick.py index be8b9e6b66..bc359860f3 100644 --- a/plotly/validators/carpet/aaxis/_arraydtick.py +++ b/plotly/validators/carpet/aaxis/_arraydtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraydtickValidator(_plotly_utils.basevalidators.IntegerValidator): +class ArraydtickValidator(_bv.IntegerValidator): def __init__(self, plotly_name="arraydtick", parent_name="carpet.aaxis", **kwargs): - super(ArraydtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_arraytick0.py b/plotly/validators/carpet/aaxis/_arraytick0.py index f15e03c5b1..5b54e94801 100644 --- a/plotly/validators/carpet/aaxis/_arraytick0.py +++ b/plotly/validators/carpet/aaxis/_arraytick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Arraytick0Validator(_plotly_utils.basevalidators.IntegerValidator): +class Arraytick0Validator(_bv.IntegerValidator): def __init__(self, plotly_name="arraytick0", parent_name="carpet.aaxis", **kwargs): - super(Arraytick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_autorange.py b/plotly/validators/carpet/aaxis/_autorange.py index 642c06f31a..4e19da6ddc 100644 --- a/plotly/validators/carpet/aaxis/_autorange.py +++ b/plotly/validators/carpet/aaxis/_autorange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="autorange", parent_name="carpet.aaxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "reversed"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_autotypenumbers.py b/plotly/validators/carpet/aaxis/_autotypenumbers.py index 9effc861b3..9474a74d50 100644 --- a/plotly/validators/carpet/aaxis/_autotypenumbers.py +++ b/plotly/validators/carpet/aaxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="carpet.aaxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_categoryarray.py b/plotly/validators/carpet/aaxis/_categoryarray.py index 14ea6b75a7..75f7750758 100644 --- a/plotly/validators/carpet/aaxis/_categoryarray.py +++ b/plotly/validators/carpet/aaxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="carpet.aaxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_categoryarraysrc.py b/plotly/validators/carpet/aaxis/_categoryarraysrc.py index 1be1defc87..af07a673fb 100644 --- a/plotly/validators/carpet/aaxis/_categoryarraysrc.py +++ b/plotly/validators/carpet/aaxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="carpet.aaxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_categoryorder.py b/plotly/validators/carpet/aaxis/_categoryorder.py index e1f26d06eb..8af7380576 100644 --- a/plotly/validators/carpet/aaxis/_categoryorder.py +++ b/plotly/validators/carpet/aaxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="carpet.aaxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/aaxis/_cheatertype.py b/plotly/validators/carpet/aaxis/_cheatertype.py index 95fbc67508..f60946d588 100644 --- a/plotly/validators/carpet/aaxis/_cheatertype.py +++ b/plotly/validators/carpet/aaxis/_cheatertype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CheatertypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CheatertypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="cheatertype", parent_name="carpet.aaxis", **kwargs): - super(CheatertypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["index", "value"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_color.py b/plotly/validators/carpet/aaxis/_color.py index 7e5daa1100..ea3889cfdc 100644 --- a/plotly/validators/carpet/aaxis/_color.py +++ b/plotly/validators/carpet/aaxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="carpet.aaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_dtick.py b/plotly/validators/carpet/aaxis/_dtick.py index c93797800e..be97b8ec3f 100644 --- a/plotly/validators/carpet/aaxis/_dtick.py +++ b/plotly/validators/carpet/aaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): +class DtickValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtick", parent_name="carpet.aaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_endline.py b/plotly/validators/carpet/aaxis/_endline.py index caceb51a63..c105acfa48 100644 --- a/plotly/validators/carpet/aaxis/_endline.py +++ b/plotly/validators/carpet/aaxis/_endline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class EndlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="endline", parent_name="carpet.aaxis", **kwargs): - super(EndlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_endlinecolor.py b/plotly/validators/carpet/aaxis/_endlinecolor.py index 4465746c21..363b012e63 100644 --- a/plotly/validators/carpet/aaxis/_endlinecolor.py +++ b/plotly/validators/carpet/aaxis/_endlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class EndlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="endlinecolor", parent_name="carpet.aaxis", **kwargs ): - super(EndlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_endlinewidth.py b/plotly/validators/carpet/aaxis/_endlinewidth.py index 90d4ddc754..f38fea1abb 100644 --- a/plotly/validators/carpet/aaxis/_endlinewidth.py +++ b/plotly/validators/carpet/aaxis/_endlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class EndlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="endlinewidth", parent_name="carpet.aaxis", **kwargs ): - super(EndlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_exponentformat.py b/plotly/validators/carpet/aaxis/_exponentformat.py index 5ec3f114b0..06301eb3a2 100644 --- a/plotly/validators/carpet/aaxis/_exponentformat.py +++ b/plotly/validators/carpet/aaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="carpet.aaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_fixedrange.py b/plotly/validators/carpet/aaxis/_fixedrange.py index c148da6c80..2a8cfb4c6b 100644 --- a/plotly/validators/carpet/aaxis/_fixedrange.py +++ b/plotly/validators/carpet/aaxis/_fixedrange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): +class FixedrangeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="fixedrange", parent_name="carpet.aaxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_gridcolor.py b/plotly/validators/carpet/aaxis/_gridcolor.py index fd056931e6..5d649ab964 100644 --- a/plotly/validators/carpet/aaxis/_gridcolor.py +++ b/plotly/validators/carpet/aaxis/_gridcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="gridcolor", parent_name="carpet.aaxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_griddash.py b/plotly/validators/carpet/aaxis/_griddash.py index e5aa719beb..eb433714bd 100644 --- a/plotly/validators/carpet/aaxis/_griddash.py +++ b/plotly/validators/carpet/aaxis/_griddash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__(self, plotly_name="griddash", parent_name="carpet.aaxis", **kwargs): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/carpet/aaxis/_gridwidth.py b/plotly/validators/carpet/aaxis/_gridwidth.py index b5d2199bd6..a25302dc13 100644 --- a/plotly/validators/carpet/aaxis/_gridwidth.py +++ b/plotly/validators/carpet/aaxis/_gridwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="gridwidth", parent_name="carpet.aaxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_labelalias.py b/plotly/validators/carpet/aaxis/_labelalias.py index 8007dbd5b4..f4553ff67b 100644 --- a/plotly/validators/carpet/aaxis/_labelalias.py +++ b/plotly/validators/carpet/aaxis/_labelalias.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__(self, plotly_name="labelalias", parent_name="carpet.aaxis", **kwargs): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_labelpadding.py b/plotly/validators/carpet/aaxis/_labelpadding.py index 7b5db6ec8a..f23b0a3728 100644 --- a/plotly/validators/carpet/aaxis/_labelpadding.py +++ b/plotly/validators/carpet/aaxis/_labelpadding.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): +class LabelpaddingValidator(_bv.IntegerValidator): def __init__( self, plotly_name="labelpadding", parent_name="carpet.aaxis", **kwargs ): - super(LabelpaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_labelprefix.py b/plotly/validators/carpet/aaxis/_labelprefix.py index c121272d45..dd40a4815b 100644 --- a/plotly/validators/carpet/aaxis/_labelprefix.py +++ b/plotly/validators/carpet/aaxis/_labelprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): +class LabelprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="labelprefix", parent_name="carpet.aaxis", **kwargs): - super(LabelprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_labelsuffix.py b/plotly/validators/carpet/aaxis/_labelsuffix.py index 2d3122cfc1..bbdf540c44 100644 --- a/plotly/validators/carpet/aaxis/_labelsuffix.py +++ b/plotly/validators/carpet/aaxis/_labelsuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsuffixValidator(_plotly_utils.basevalidators.StringValidator): +class LabelsuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="labelsuffix", parent_name="carpet.aaxis", **kwargs): - super(LabelsuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_linecolor.py b/plotly/validators/carpet/aaxis/_linecolor.py index d6df4cf8cd..b6977bcfd6 100644 --- a/plotly/validators/carpet/aaxis/_linecolor.py +++ b/plotly/validators/carpet/aaxis/_linecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="linecolor", parent_name="carpet.aaxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_linewidth.py b/plotly/validators/carpet/aaxis/_linewidth.py index 79108ec8ba..440a9827d6 100644 --- a/plotly/validators/carpet/aaxis/_linewidth.py +++ b/plotly/validators/carpet/aaxis/_linewidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="linewidth", parent_name="carpet.aaxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_minexponent.py b/plotly/validators/carpet/aaxis/_minexponent.py index 7b6c5fd267..7b7f7e8e38 100644 --- a/plotly/validators/carpet/aaxis/_minexponent.py +++ b/plotly/validators/carpet/aaxis/_minexponent.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__(self, plotly_name="minexponent", parent_name="carpet.aaxis", **kwargs): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_minorgridcolor.py b/plotly/validators/carpet/aaxis/_minorgridcolor.py index f15b9cef52..2a43879b8e 100644 --- a/plotly/validators/carpet/aaxis/_minorgridcolor.py +++ b/plotly/validators/carpet/aaxis/_minorgridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class MinorgridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="minorgridcolor", parent_name="carpet.aaxis", **kwargs ): - super(MinorgridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_minorgridcount.py b/plotly/validators/carpet/aaxis/_minorgridcount.py index 2832b1d289..a106b43028 100644 --- a/plotly/validators/carpet/aaxis/_minorgridcount.py +++ b/plotly/validators/carpet/aaxis/_minorgridcount.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgridcountValidator(_plotly_utils.basevalidators.IntegerValidator): +class MinorgridcountValidator(_bv.IntegerValidator): def __init__( self, plotly_name="minorgridcount", parent_name="carpet.aaxis", **kwargs ): - super(MinorgridcountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_minorgriddash.py b/plotly/validators/carpet/aaxis/_minorgriddash.py index e6b36727aa..0f9df67d17 100644 --- a/plotly/validators/carpet/aaxis/_minorgriddash.py +++ b/plotly/validators/carpet/aaxis/_minorgriddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgriddashValidator(_plotly_utils.basevalidators.DashValidator): +class MinorgriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="minorgriddash", parent_name="carpet.aaxis", **kwargs ): - super(MinorgriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/carpet/aaxis/_minorgridwidth.py b/plotly/validators/carpet/aaxis/_minorgridwidth.py index 938ab1547a..a7c4a4648d 100644 --- a/plotly/validators/carpet/aaxis/_minorgridwidth.py +++ b/plotly/validators/carpet/aaxis/_minorgridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class MinorgridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="minorgridwidth", parent_name="carpet.aaxis", **kwargs ): - super(MinorgridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_nticks.py b/plotly/validators/carpet/aaxis/_nticks.py index 7d2fbca303..44726524dc 100644 --- a/plotly/validators/carpet/aaxis/_nticks.py +++ b/plotly/validators/carpet/aaxis/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="carpet.aaxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_range.py b/plotly/validators/carpet/aaxis/_range.py index 126ecae738..65690563e4 100644 --- a/plotly/validators/carpet/aaxis/_range.py +++ b/plotly/validators/carpet/aaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="carpet.aaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/carpet/aaxis/_rangemode.py b/plotly/validators/carpet/aaxis/_rangemode.py index 8e09dbd3aa..af606d78cd 100644 --- a/plotly/validators/carpet/aaxis/_rangemode.py +++ b/plotly/validators/carpet/aaxis/_rangemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="carpet.aaxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_separatethousands.py b/plotly/validators/carpet/aaxis/_separatethousands.py index 50e4d8ad4c..03147bf479 100644 --- a/plotly/validators/carpet/aaxis/_separatethousands.py +++ b/plotly/validators/carpet/aaxis/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="carpet.aaxis", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_showexponent.py b/plotly/validators/carpet/aaxis/_showexponent.py index 8085450d39..ecde341ec2 100644 --- a/plotly/validators/carpet/aaxis/_showexponent.py +++ b/plotly/validators/carpet/aaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="carpet.aaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_showgrid.py b/plotly/validators/carpet/aaxis/_showgrid.py index 0d3587c153..eb77c60623 100644 --- a/plotly/validators/carpet/aaxis/_showgrid.py +++ b/plotly/validators/carpet/aaxis/_showgrid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showgrid", parent_name="carpet.aaxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_showline.py b/plotly/validators/carpet/aaxis/_showline.py index b94d0f8f93..a301c2ae5a 100644 --- a/plotly/validators/carpet/aaxis/_showline.py +++ b/plotly/validators/carpet/aaxis/_showline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showline", parent_name="carpet.aaxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_showticklabels.py b/plotly/validators/carpet/aaxis/_showticklabels.py index 64ff3879b4..ee3dc24a2f 100644 --- a/plotly/validators/carpet/aaxis/_showticklabels.py +++ b/plotly/validators/carpet/aaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticklabelsValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticklabels", parent_name="carpet.aaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "end", "both", "none"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_showtickprefix.py b/plotly/validators/carpet/aaxis/_showtickprefix.py index 1e60df9d88..37ff92621b 100644 --- a/plotly/validators/carpet/aaxis/_showtickprefix.py +++ b/plotly/validators/carpet/aaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="carpet.aaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_showticksuffix.py b/plotly/validators/carpet/aaxis/_showticksuffix.py index 402d700eff..a762156453 100644 --- a/plotly/validators/carpet/aaxis/_showticksuffix.py +++ b/plotly/validators/carpet/aaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="carpet.aaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_smoothing.py b/plotly/validators/carpet/aaxis/_smoothing.py index 1a2fa736ea..0468eae4bc 100644 --- a/plotly/validators/carpet/aaxis/_smoothing.py +++ b/plotly/validators/carpet/aaxis/_smoothing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__(self, plotly_name="smoothing", parent_name="carpet.aaxis", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/carpet/aaxis/_startline.py b/plotly/validators/carpet/aaxis/_startline.py index 285ae6dcb9..0306062b92 100644 --- a/plotly/validators/carpet/aaxis/_startline.py +++ b/plotly/validators/carpet/aaxis/_startline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class StartlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="startline", parent_name="carpet.aaxis", **kwargs): - super(StartlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_startlinecolor.py b/plotly/validators/carpet/aaxis/_startlinecolor.py index 51db824e77..ac63303c01 100644 --- a/plotly/validators/carpet/aaxis/_startlinecolor.py +++ b/plotly/validators/carpet/aaxis/_startlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class StartlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="startlinecolor", parent_name="carpet.aaxis", **kwargs ): - super(StartlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_startlinewidth.py b/plotly/validators/carpet/aaxis/_startlinewidth.py index b1da9a35dc..3f61207e24 100644 --- a/plotly/validators/carpet/aaxis/_startlinewidth.py +++ b/plotly/validators/carpet/aaxis/_startlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class StartlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="startlinewidth", parent_name="carpet.aaxis", **kwargs ): - super(StartlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_tick0.py b/plotly/validators/carpet/aaxis/_tick0.py index 92306c27b3..f7088fe877 100644 --- a/plotly/validators/carpet/aaxis/_tick0.py +++ b/plotly/validators/carpet/aaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): +class Tick0Validator(_bv.NumberValidator): def __init__(self, plotly_name="tick0", parent_name="carpet.aaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_tickangle.py b/plotly/validators/carpet/aaxis/_tickangle.py index 1b01919ce7..d05b072e54 100644 --- a/plotly/validators/carpet/aaxis/_tickangle.py +++ b/plotly/validators/carpet/aaxis/_tickangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="tickangle", parent_name="carpet.aaxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_tickfont.py b/plotly/validators/carpet/aaxis/_tickfont.py index 8b1b185788..b16a0fff44 100644 --- a/plotly/validators/carpet/aaxis/_tickfont.py +++ b/plotly/validators/carpet/aaxis/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="carpet.aaxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_tickformat.py b/plotly/validators/carpet/aaxis/_tickformat.py index 98c9e26318..2a0c4953b5 100644 --- a/plotly/validators/carpet/aaxis/_tickformat.py +++ b/plotly/validators/carpet/aaxis/_tickformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__(self, plotly_name="tickformat", parent_name="carpet.aaxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py b/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py index 127edaa141..c276250d1e 100644 --- a/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py +++ b/plotly/validators/carpet/aaxis/_tickformatstopdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="carpet.aaxis", **kwargs ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/carpet/aaxis/_tickformatstops.py b/plotly/validators/carpet/aaxis/_tickformatstops.py index 3ea7958566..0e562e35dc 100644 --- a/plotly/validators/carpet/aaxis/_tickformatstops.py +++ b/plotly/validators/carpet/aaxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="carpet.aaxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_tickmode.py b/plotly/validators/carpet/aaxis/_tickmode.py index 41e2de0476..50f6f6c300 100644 --- a/plotly/validators/carpet/aaxis/_tickmode.py +++ b/plotly/validators/carpet/aaxis/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="carpet.aaxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["linear", "array"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_tickprefix.py b/plotly/validators/carpet/aaxis/_tickprefix.py index e574efcb3a..9f4951bd7b 100644 --- a/plotly/validators/carpet/aaxis/_tickprefix.py +++ b/plotly/validators/carpet/aaxis/_tickprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="carpet.aaxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_ticksuffix.py b/plotly/validators/carpet/aaxis/_ticksuffix.py index 6fe0dc03c9..d70182f323 100644 --- a/plotly/validators/carpet/aaxis/_ticksuffix.py +++ b/plotly/validators/carpet/aaxis/_ticksuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="ticksuffix", parent_name="carpet.aaxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_ticktext.py b/plotly/validators/carpet/aaxis/_ticktext.py index 934224f2a0..404745ed4f 100644 --- a/plotly/validators/carpet/aaxis/_ticktext.py +++ b/plotly/validators/carpet/aaxis/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="carpet.aaxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_ticktextsrc.py b/plotly/validators/carpet/aaxis/_ticktextsrc.py index 1a49ad59d8..b881fa9c42 100644 --- a/plotly/validators/carpet/aaxis/_ticktextsrc.py +++ b/plotly/validators/carpet/aaxis/_ticktextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.aaxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_tickvals.py b/plotly/validators/carpet/aaxis/_tickvals.py index bd8be33270..7b82c08766 100644 --- a/plotly/validators/carpet/aaxis/_tickvals.py +++ b/plotly/validators/carpet/aaxis/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="carpet.aaxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_tickvalssrc.py b/plotly/validators/carpet/aaxis/_tickvalssrc.py index 9d50850b59..a8195816dc 100644 --- a/plotly/validators/carpet/aaxis/_tickvalssrc.py +++ b/plotly/validators/carpet/aaxis/_tickvalssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="tickvalssrc", parent_name="carpet.aaxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/_title.py b/plotly/validators/carpet/aaxis/_title.py index c8675919df..9ff452cc26 100644 --- a/plotly/validators/carpet/aaxis/_title.py +++ b/plotly/validators/carpet/aaxis/_title.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="carpet.aaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/carpet/aaxis/_type.py b/plotly/validators/carpet/aaxis/_type.py index 4cc5942654..5882602e82 100644 --- a/plotly/validators/carpet/aaxis/_type.py +++ b/plotly/validators/carpet/aaxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="carpet.aaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["-", "linear", "date", "category"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/tickfont/__init__.py b/plotly/validators/carpet/aaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/carpet/aaxis/tickfont/__init__.py +++ b/plotly/validators/carpet/aaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/carpet/aaxis/tickfont/_color.py b/plotly/validators/carpet/aaxis/tickfont/_color.py index cf0f227aa3..1370c414e5 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_color.py +++ b/plotly/validators/carpet/aaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/tickfont/_family.py b/plotly/validators/carpet/aaxis/tickfont/_family.py index 68eada5366..1914fe7f72 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_family.py +++ b/plotly/validators/carpet/aaxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/aaxis/tickfont/_lineposition.py b/plotly/validators/carpet/aaxis/tickfont/_lineposition.py index 0de8af7229..a1d3a8ddcd 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_lineposition.py +++ b/plotly/validators/carpet/aaxis/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/carpet/aaxis/tickfont/_shadow.py b/plotly/validators/carpet/aaxis/tickfont/_shadow.py index e4e8aa733c..4a40f3217d 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_shadow.py +++ b/plotly/validators/carpet/aaxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/tickfont/_size.py b/plotly/validators/carpet/aaxis/tickfont/_size.py index cc3022043d..66a67e40a5 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_size.py +++ b/plotly/validators/carpet/aaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/aaxis/tickfont/_style.py b/plotly/validators/carpet/aaxis/tickfont/_style.py index 41cec4af04..75366ddcb0 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_style.py +++ b/plotly/validators/carpet/aaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/tickfont/_textcase.py b/plotly/validators/carpet/aaxis/tickfont/_textcase.py index ed3ad9a0d2..8fbc2489c8 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_textcase.py +++ b/plotly/validators/carpet/aaxis/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/tickfont/_variant.py b/plotly/validators/carpet/aaxis/tickfont/_variant.py index f5870c35c3..6352638ae3 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_variant.py +++ b/plotly/validators/carpet/aaxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/aaxis/tickfont/_weight.py b/plotly/validators/carpet/aaxis/tickfont/_weight.py index 6bfafb5029..cfd3be28c9 100644 --- a/plotly/validators/carpet/aaxis/tickfont/_weight.py +++ b/plotly/validators/carpet/aaxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="carpet.aaxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/carpet/aaxis/tickformatstop/__init__.py b/plotly/validators/carpet/aaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/carpet/aaxis/tickformatstop/__init__.py +++ b/plotly/validators/carpet/aaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py b/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py index 7d0756cf92..b5e5f99103 100644 --- a/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/carpet/aaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="carpet.aaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py b/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py index 428a0d524f..fec51a30a5 100644 --- a/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py +++ b/plotly/validators/carpet/aaxis/tickformatstop/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="carpet.aaxis.tickformatstop", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/tickformatstop/_name.py b/plotly/validators/carpet/aaxis/tickformatstop/_name.py index 5480115316..efc6522775 100644 --- a/plotly/validators/carpet/aaxis/tickformatstop/_name.py +++ b/plotly/validators/carpet/aaxis/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="carpet.aaxis.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py b/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py index 45f098d8aa..ecdaa750b9 100644 --- a/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/carpet/aaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="carpet.aaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/tickformatstop/_value.py b/plotly/validators/carpet/aaxis/tickformatstop/_value.py index eba33d8c03..563aa426c4 100644 --- a/plotly/validators/carpet/aaxis/tickformatstop/_value.py +++ b/plotly/validators/carpet/aaxis/tickformatstop/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="carpet.aaxis.tickformatstop", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/title/__init__.py b/plotly/validators/carpet/aaxis/title/__init__.py index ff2ee4cb29..5a003b67cd 100644 --- a/plotly/validators/carpet/aaxis/title/__init__.py +++ b/plotly/validators/carpet/aaxis/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._offset import OffsetValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._offset.OffsetValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._offset.OffsetValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/carpet/aaxis/title/_font.py b/plotly/validators/carpet/aaxis/title/_font.py index 9de2ef7ac5..0b74674fab 100644 --- a/plotly/validators/carpet/aaxis/title/_font.py +++ b/plotly/validators/carpet/aaxis/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="carpet.aaxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/carpet/aaxis/title/_offset.py b/plotly/validators/carpet/aaxis/title/_offset.py index e2d8bf052f..85db7a571e 100644 --- a/plotly/validators/carpet/aaxis/title/_offset.py +++ b/plotly/validators/carpet/aaxis/title/_offset.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__( self, plotly_name="offset", parent_name="carpet.aaxis.title", **kwargs ): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/title/_text.py b/plotly/validators/carpet/aaxis/title/_text.py index 1042ef0d18..9add2bba99 100644 --- a/plotly/validators/carpet/aaxis/title/_text.py +++ b/plotly/validators/carpet/aaxis/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="carpet.aaxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/title/font/__init__.py b/plotly/validators/carpet/aaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/carpet/aaxis/title/font/__init__.py +++ b/plotly/validators/carpet/aaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/carpet/aaxis/title/font/_color.py b/plotly/validators/carpet/aaxis/title/font/_color.py index 39c81ce2c7..2b2d20e5b1 100644 --- a/plotly/validators/carpet/aaxis/title/font/_color.py +++ b/plotly/validators/carpet/aaxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="carpet.aaxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/title/font/_family.py b/plotly/validators/carpet/aaxis/title/font/_family.py index ba1331070a..8ec2c0da4f 100644 --- a/plotly/validators/carpet/aaxis/title/font/_family.py +++ b/plotly/validators/carpet/aaxis/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="carpet.aaxis.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/aaxis/title/font/_lineposition.py b/plotly/validators/carpet/aaxis/title/font/_lineposition.py index 7a128d3ed3..8d9d613892 100644 --- a/plotly/validators/carpet/aaxis/title/font/_lineposition.py +++ b/plotly/validators/carpet/aaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="carpet.aaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/carpet/aaxis/title/font/_shadow.py b/plotly/validators/carpet/aaxis/title/font/_shadow.py index 1a8dc4aaa9..0f1835e204 100644 --- a/plotly/validators/carpet/aaxis/title/font/_shadow.py +++ b/plotly/validators/carpet/aaxis/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="carpet.aaxis.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/aaxis/title/font/_size.py b/plotly/validators/carpet/aaxis/title/font/_size.py index d68e16cea5..bb591f1416 100644 --- a/plotly/validators/carpet/aaxis/title/font/_size.py +++ b/plotly/validators/carpet/aaxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="carpet.aaxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/aaxis/title/font/_style.py b/plotly/validators/carpet/aaxis/title/font/_style.py index e164229bd3..c1df971ad7 100644 --- a/plotly/validators/carpet/aaxis/title/font/_style.py +++ b/plotly/validators/carpet/aaxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.aaxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/title/font/_textcase.py b/plotly/validators/carpet/aaxis/title/font/_textcase.py index 456c3db7e4..68dff595f8 100644 --- a/plotly/validators/carpet/aaxis/title/font/_textcase.py +++ b/plotly/validators/carpet/aaxis/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="carpet.aaxis.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/carpet/aaxis/title/font/_variant.py b/plotly/validators/carpet/aaxis/title/font/_variant.py index 02bd955e89..9ef0f7afc6 100644 --- a/plotly/validators/carpet/aaxis/title/font/_variant.py +++ b/plotly/validators/carpet/aaxis/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="carpet.aaxis.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/aaxis/title/font/_weight.py b/plotly/validators/carpet/aaxis/title/font/_weight.py index 24f95f0aae..8c4a84b596 100644 --- a/plotly/validators/carpet/aaxis/title/font/_weight.py +++ b/plotly/validators/carpet/aaxis/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="carpet.aaxis.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/carpet/baxis/__init__.py b/plotly/validators/carpet/baxis/__init__.py index 5d27db03f9..eb5d615977 100644 --- a/plotly/validators/carpet/baxis/__init__.py +++ b/plotly/validators/carpet/baxis/__init__.py @@ -1,129 +1,67 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._startlinewidth import StartlinewidthValidator - from ._startlinecolor import StartlinecolorValidator - from ._startline import StartlineValidator - from ._smoothing import SmoothingValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._rangemode import RangemodeValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._minorgridwidth import MinorgridwidthValidator - from ._minorgriddash import MinorgriddashValidator - from ._minorgridcount import MinorgridcountValidator - from ._minorgridcolor import MinorgridcolorValidator - from ._minexponent import MinexponentValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._labelsuffix import LabelsuffixValidator - from ._labelprefix import LabelprefixValidator - from ._labelpadding import LabelpaddingValidator - from ._labelalias import LabelaliasValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._fixedrange import FixedrangeValidator - from ._exponentformat import ExponentformatValidator - from ._endlinewidth import EndlinewidthValidator - from ._endlinecolor import EndlinecolorValidator - from ._endline import EndlineValidator - from ._dtick import DtickValidator - from ._color import ColorValidator - from ._cheatertype import CheatertypeValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autorange import AutorangeValidator - from ._arraytick0 import Arraytick0Validator - from ._arraydtick import ArraydtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._type.TypeValidator", - "._title.TitleValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._startlinewidth.StartlinewidthValidator", - "._startlinecolor.StartlinecolorValidator", - "._startline.StartlineValidator", - "._smoothing.SmoothingValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._rangemode.RangemodeValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._minorgridwidth.MinorgridwidthValidator", - "._minorgriddash.MinorgriddashValidator", - "._minorgridcount.MinorgridcountValidator", - "._minorgridcolor.MinorgridcolorValidator", - "._minexponent.MinexponentValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._labelsuffix.LabelsuffixValidator", - "._labelprefix.LabelprefixValidator", - "._labelpadding.LabelpaddingValidator", - "._labelalias.LabelaliasValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._fixedrange.FixedrangeValidator", - "._exponentformat.ExponentformatValidator", - "._endlinewidth.EndlinewidthValidator", - "._endlinecolor.EndlinecolorValidator", - "._endline.EndlineValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - "._cheatertype.CheatertypeValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autorange.AutorangeValidator", - "._arraytick0.Arraytick0Validator", - "._arraydtick.ArraydtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._title.TitleValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._startlinewidth.StartlinewidthValidator", + "._startlinecolor.StartlinecolorValidator", + "._startline.StartlineValidator", + "._smoothing.SmoothingValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._minorgridwidth.MinorgridwidthValidator", + "._minorgriddash.MinorgriddashValidator", + "._minorgridcount.MinorgridcountValidator", + "._minorgridcolor.MinorgridcolorValidator", + "._minexponent.MinexponentValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelsuffix.LabelsuffixValidator", + "._labelprefix.LabelprefixValidator", + "._labelpadding.LabelpaddingValidator", + "._labelalias.LabelaliasValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._endlinewidth.EndlinewidthValidator", + "._endlinecolor.EndlinecolorValidator", + "._endline.EndlineValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._cheatertype.CheatertypeValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autorange.AutorangeValidator", + "._arraytick0.Arraytick0Validator", + "._arraydtick.ArraydtickValidator", + ], +) diff --git a/plotly/validators/carpet/baxis/_arraydtick.py b/plotly/validators/carpet/baxis/_arraydtick.py index 797feb0577..7f24f48aa5 100644 --- a/plotly/validators/carpet/baxis/_arraydtick.py +++ b/plotly/validators/carpet/baxis/_arraydtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraydtickValidator(_plotly_utils.basevalidators.IntegerValidator): +class ArraydtickValidator(_bv.IntegerValidator): def __init__(self, plotly_name="arraydtick", parent_name="carpet.baxis", **kwargs): - super(ArraydtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/baxis/_arraytick0.py b/plotly/validators/carpet/baxis/_arraytick0.py index dbdafa0185..dd3533837c 100644 --- a/plotly/validators/carpet/baxis/_arraytick0.py +++ b/plotly/validators/carpet/baxis/_arraytick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Arraytick0Validator(_plotly_utils.basevalidators.IntegerValidator): +class Arraytick0Validator(_bv.IntegerValidator): def __init__(self, plotly_name="arraytick0", parent_name="carpet.baxis", **kwargs): - super(Arraytick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_autorange.py b/plotly/validators/carpet/baxis/_autorange.py index 51d366028a..8af12aa89e 100644 --- a/plotly/validators/carpet/baxis/_autorange.py +++ b/plotly/validators/carpet/baxis/_autorange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="autorange", parent_name="carpet.baxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "reversed"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_autotypenumbers.py b/plotly/validators/carpet/baxis/_autotypenumbers.py index 10a7e7613a..817c26e1c7 100644 --- a/plotly/validators/carpet/baxis/_autotypenumbers.py +++ b/plotly/validators/carpet/baxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="carpet.baxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_categoryarray.py b/plotly/validators/carpet/baxis/_categoryarray.py index 7d8cdb5160..4ccd22d1c5 100644 --- a/plotly/validators/carpet/baxis/_categoryarray.py +++ b/plotly/validators/carpet/baxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="carpet.baxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_categoryarraysrc.py b/plotly/validators/carpet/baxis/_categoryarraysrc.py index f44c1ae255..53e089de00 100644 --- a/plotly/validators/carpet/baxis/_categoryarraysrc.py +++ b/plotly/validators/carpet/baxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="carpet.baxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_categoryorder.py b/plotly/validators/carpet/baxis/_categoryorder.py index f50246bab8..6d790c51f4 100644 --- a/plotly/validators/carpet/baxis/_categoryorder.py +++ b/plotly/validators/carpet/baxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="carpet.baxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/baxis/_cheatertype.py b/plotly/validators/carpet/baxis/_cheatertype.py index 0a72d8e86d..9fd8ed91ac 100644 --- a/plotly/validators/carpet/baxis/_cheatertype.py +++ b/plotly/validators/carpet/baxis/_cheatertype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CheatertypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CheatertypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="cheatertype", parent_name="carpet.baxis", **kwargs): - super(CheatertypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["index", "value"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_color.py b/plotly/validators/carpet/baxis/_color.py index 3159ac9940..33d5f64d38 100644 --- a/plotly/validators/carpet/baxis/_color.py +++ b/plotly/validators/carpet/baxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="carpet.baxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_dtick.py b/plotly/validators/carpet/baxis/_dtick.py index d0b8516dc5..b469da930e 100644 --- a/plotly/validators/carpet/baxis/_dtick.py +++ b/plotly/validators/carpet/baxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): +class DtickValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtick", parent_name="carpet.baxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_endline.py b/plotly/validators/carpet/baxis/_endline.py index c4bb0d4b54..a24847dd81 100644 --- a/plotly/validators/carpet/baxis/_endline.py +++ b/plotly/validators/carpet/baxis/_endline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class EndlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="endline", parent_name="carpet.baxis", **kwargs): - super(EndlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_endlinecolor.py b/plotly/validators/carpet/baxis/_endlinecolor.py index 0643dd54d1..44b44a3527 100644 --- a/plotly/validators/carpet/baxis/_endlinecolor.py +++ b/plotly/validators/carpet/baxis/_endlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class EndlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="endlinecolor", parent_name="carpet.baxis", **kwargs ): - super(EndlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_endlinewidth.py b/plotly/validators/carpet/baxis/_endlinewidth.py index 5f519dbc4e..9dc6720624 100644 --- a/plotly/validators/carpet/baxis/_endlinewidth.py +++ b/plotly/validators/carpet/baxis/_endlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class EndlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="endlinewidth", parent_name="carpet.baxis", **kwargs ): - super(EndlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_exponentformat.py b/plotly/validators/carpet/baxis/_exponentformat.py index c501d567c0..6b6027fdd3 100644 --- a/plotly/validators/carpet/baxis/_exponentformat.py +++ b/plotly/validators/carpet/baxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="carpet.baxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_fixedrange.py b/plotly/validators/carpet/baxis/_fixedrange.py index 43fb67c7bd..dcd06837a6 100644 --- a/plotly/validators/carpet/baxis/_fixedrange.py +++ b/plotly/validators/carpet/baxis/_fixedrange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): +class FixedrangeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="fixedrange", parent_name="carpet.baxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_gridcolor.py b/plotly/validators/carpet/baxis/_gridcolor.py index 385571f72d..2ec0223ec6 100644 --- a/plotly/validators/carpet/baxis/_gridcolor.py +++ b/plotly/validators/carpet/baxis/_gridcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="gridcolor", parent_name="carpet.baxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_griddash.py b/plotly/validators/carpet/baxis/_griddash.py index da58807f1f..d986b2f071 100644 --- a/plotly/validators/carpet/baxis/_griddash.py +++ b/plotly/validators/carpet/baxis/_griddash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__(self, plotly_name="griddash", parent_name="carpet.baxis", **kwargs): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/carpet/baxis/_gridwidth.py b/plotly/validators/carpet/baxis/_gridwidth.py index ef1dc87253..90515b8a49 100644 --- a/plotly/validators/carpet/baxis/_gridwidth.py +++ b/plotly/validators/carpet/baxis/_gridwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="gridwidth", parent_name="carpet.baxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_labelalias.py b/plotly/validators/carpet/baxis/_labelalias.py index 053e432e02..0878c58256 100644 --- a/plotly/validators/carpet/baxis/_labelalias.py +++ b/plotly/validators/carpet/baxis/_labelalias.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__(self, plotly_name="labelalias", parent_name="carpet.baxis", **kwargs): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_labelpadding.py b/plotly/validators/carpet/baxis/_labelpadding.py index de9e4dce74..25223039bc 100644 --- a/plotly/validators/carpet/baxis/_labelpadding.py +++ b/plotly/validators/carpet/baxis/_labelpadding.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelpaddingValidator(_plotly_utils.basevalidators.IntegerValidator): +class LabelpaddingValidator(_bv.IntegerValidator): def __init__( self, plotly_name="labelpadding", parent_name="carpet.baxis", **kwargs ): - super(LabelpaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_labelprefix.py b/plotly/validators/carpet/baxis/_labelprefix.py index f140983213..20efc1979e 100644 --- a/plotly/validators/carpet/baxis/_labelprefix.py +++ b/plotly/validators/carpet/baxis/_labelprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelprefixValidator(_plotly_utils.basevalidators.StringValidator): +class LabelprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="labelprefix", parent_name="carpet.baxis", **kwargs): - super(LabelprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_labelsuffix.py b/plotly/validators/carpet/baxis/_labelsuffix.py index f23f212fc7..fa17fea6e7 100644 --- a/plotly/validators/carpet/baxis/_labelsuffix.py +++ b/plotly/validators/carpet/baxis/_labelsuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsuffixValidator(_plotly_utils.basevalidators.StringValidator): +class LabelsuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="labelsuffix", parent_name="carpet.baxis", **kwargs): - super(LabelsuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_linecolor.py b/plotly/validators/carpet/baxis/_linecolor.py index 4cf436ffe7..1389fff264 100644 --- a/plotly/validators/carpet/baxis/_linecolor.py +++ b/plotly/validators/carpet/baxis/_linecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="linecolor", parent_name="carpet.baxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_linewidth.py b/plotly/validators/carpet/baxis/_linewidth.py index 5bad47e196..8b7990bec1 100644 --- a/plotly/validators/carpet/baxis/_linewidth.py +++ b/plotly/validators/carpet/baxis/_linewidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="linewidth", parent_name="carpet.baxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_minexponent.py b/plotly/validators/carpet/baxis/_minexponent.py index ef9a3223a8..77ae1f2540 100644 --- a/plotly/validators/carpet/baxis/_minexponent.py +++ b/plotly/validators/carpet/baxis/_minexponent.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__(self, plotly_name="minexponent", parent_name="carpet.baxis", **kwargs): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_minorgridcolor.py b/plotly/validators/carpet/baxis/_minorgridcolor.py index 730506ae18..29ba5cd59d 100644 --- a/plotly/validators/carpet/baxis/_minorgridcolor.py +++ b/plotly/validators/carpet/baxis/_minorgridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class MinorgridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="minorgridcolor", parent_name="carpet.baxis", **kwargs ): - super(MinorgridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_minorgridcount.py b/plotly/validators/carpet/baxis/_minorgridcount.py index b5cc473f8b..696c41cfde 100644 --- a/plotly/validators/carpet/baxis/_minorgridcount.py +++ b/plotly/validators/carpet/baxis/_minorgridcount.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgridcountValidator(_plotly_utils.basevalidators.IntegerValidator): +class MinorgridcountValidator(_bv.IntegerValidator): def __init__( self, plotly_name="minorgridcount", parent_name="carpet.baxis", **kwargs ): - super(MinorgridcountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_minorgriddash.py b/plotly/validators/carpet/baxis/_minorgriddash.py index 2459307360..3674b5db4c 100644 --- a/plotly/validators/carpet/baxis/_minorgriddash.py +++ b/plotly/validators/carpet/baxis/_minorgriddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgriddashValidator(_plotly_utils.basevalidators.DashValidator): +class MinorgriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="minorgriddash", parent_name="carpet.baxis", **kwargs ): - super(MinorgriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/carpet/baxis/_minorgridwidth.py b/plotly/validators/carpet/baxis/_minorgridwidth.py index 28d9c866a7..18fee4f1ce 100644 --- a/plotly/validators/carpet/baxis/_minorgridwidth.py +++ b/plotly/validators/carpet/baxis/_minorgridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorgridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class MinorgridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="minorgridwidth", parent_name="carpet.baxis", **kwargs ): - super(MinorgridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_nticks.py b/plotly/validators/carpet/baxis/_nticks.py index a3b1723f55..18363e4299 100644 --- a/plotly/validators/carpet/baxis/_nticks.py +++ b/plotly/validators/carpet/baxis/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="carpet.baxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_range.py b/plotly/validators/carpet/baxis/_range.py index a7dffc77ac..9071967e2f 100644 --- a/plotly/validators/carpet/baxis/_range.py +++ b/plotly/validators/carpet/baxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="carpet.baxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/carpet/baxis/_rangemode.py b/plotly/validators/carpet/baxis/_rangemode.py index 9805c78659..7c5e077190 100644 --- a/plotly/validators/carpet/baxis/_rangemode.py +++ b/plotly/validators/carpet/baxis/_rangemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="carpet.baxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_separatethousands.py b/plotly/validators/carpet/baxis/_separatethousands.py index 3e9b4b2ccc..3a9b783923 100644 --- a/plotly/validators/carpet/baxis/_separatethousands.py +++ b/plotly/validators/carpet/baxis/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="carpet.baxis", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_showexponent.py b/plotly/validators/carpet/baxis/_showexponent.py index d1ca370403..241d7ee713 100644 --- a/plotly/validators/carpet/baxis/_showexponent.py +++ b/plotly/validators/carpet/baxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="carpet.baxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_showgrid.py b/plotly/validators/carpet/baxis/_showgrid.py index 7bf8be4438..2578a9c1c1 100644 --- a/plotly/validators/carpet/baxis/_showgrid.py +++ b/plotly/validators/carpet/baxis/_showgrid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showgrid", parent_name="carpet.baxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_showline.py b/plotly/validators/carpet/baxis/_showline.py index 3fcbf4b3e8..2febe3553b 100644 --- a/plotly/validators/carpet/baxis/_showline.py +++ b/plotly/validators/carpet/baxis/_showline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showline", parent_name="carpet.baxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_showticklabels.py b/plotly/validators/carpet/baxis/_showticklabels.py index 70167b9e12..0840f95c79 100644 --- a/plotly/validators/carpet/baxis/_showticklabels.py +++ b/plotly/validators/carpet/baxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticklabelsValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticklabels", parent_name="carpet.baxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "end", "both", "none"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_showtickprefix.py b/plotly/validators/carpet/baxis/_showtickprefix.py index 89821be4a4..38658ba0a6 100644 --- a/plotly/validators/carpet/baxis/_showtickprefix.py +++ b/plotly/validators/carpet/baxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="carpet.baxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_showticksuffix.py b/plotly/validators/carpet/baxis/_showticksuffix.py index 8cfdc06068..42a1984ac5 100644 --- a/plotly/validators/carpet/baxis/_showticksuffix.py +++ b/plotly/validators/carpet/baxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="carpet.baxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_smoothing.py b/plotly/validators/carpet/baxis/_smoothing.py index fb16f9feab..ca58695267 100644 --- a/plotly/validators/carpet/baxis/_smoothing.py +++ b/plotly/validators/carpet/baxis/_smoothing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__(self, plotly_name="smoothing", parent_name="carpet.baxis", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/carpet/baxis/_startline.py b/plotly/validators/carpet/baxis/_startline.py index 316cc9df94..7feea27bbf 100644 --- a/plotly/validators/carpet/baxis/_startline.py +++ b/plotly/validators/carpet/baxis/_startline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class StartlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="startline", parent_name="carpet.baxis", **kwargs): - super(StartlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_startlinecolor.py b/plotly/validators/carpet/baxis/_startlinecolor.py index bb58d2cbab..b60eadefb7 100644 --- a/plotly/validators/carpet/baxis/_startlinecolor.py +++ b/plotly/validators/carpet/baxis/_startlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class StartlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="startlinecolor", parent_name="carpet.baxis", **kwargs ): - super(StartlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_startlinewidth.py b/plotly/validators/carpet/baxis/_startlinewidth.py index 5bf8f68908..15bab59614 100644 --- a/plotly/validators/carpet/baxis/_startlinewidth.py +++ b/plotly/validators/carpet/baxis/_startlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class StartlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="startlinewidth", parent_name="carpet.baxis", **kwargs ): - super(StartlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_tick0.py b/plotly/validators/carpet/baxis/_tick0.py index 6a41eb647f..5c5e9e8798 100644 --- a/plotly/validators/carpet/baxis/_tick0.py +++ b/plotly/validators/carpet/baxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): +class Tick0Validator(_bv.NumberValidator): def __init__(self, plotly_name="tick0", parent_name="carpet.baxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/carpet/baxis/_tickangle.py b/plotly/validators/carpet/baxis/_tickangle.py index 9131d4fb67..b3683ef78c 100644 --- a/plotly/validators/carpet/baxis/_tickangle.py +++ b/plotly/validators/carpet/baxis/_tickangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="tickangle", parent_name="carpet.baxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_tickfont.py b/plotly/validators/carpet/baxis/_tickfont.py index 2c9341300a..31c3a3dfb3 100644 --- a/plotly/validators/carpet/baxis/_tickfont.py +++ b/plotly/validators/carpet/baxis/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="carpet.baxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/carpet/baxis/_tickformat.py b/plotly/validators/carpet/baxis/_tickformat.py index 17090c7528..042d65d096 100644 --- a/plotly/validators/carpet/baxis/_tickformat.py +++ b/plotly/validators/carpet/baxis/_tickformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__(self, plotly_name="tickformat", parent_name="carpet.baxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_tickformatstopdefaults.py b/plotly/validators/carpet/baxis/_tickformatstopdefaults.py index 615da496d3..3b39b2753a 100644 --- a/plotly/validators/carpet/baxis/_tickformatstopdefaults.py +++ b/plotly/validators/carpet/baxis/_tickformatstopdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="carpet.baxis", **kwargs ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/carpet/baxis/_tickformatstops.py b/plotly/validators/carpet/baxis/_tickformatstops.py index 9ef98d4f38..dd29043116 100644 --- a/plotly/validators/carpet/baxis/_tickformatstops.py +++ b/plotly/validators/carpet/baxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="carpet.baxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/carpet/baxis/_tickmode.py b/plotly/validators/carpet/baxis/_tickmode.py index 3c87ec2af7..a1942e6b1d 100644 --- a/plotly/validators/carpet/baxis/_tickmode.py +++ b/plotly/validators/carpet/baxis/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="carpet.baxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["linear", "array"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/_tickprefix.py b/plotly/validators/carpet/baxis/_tickprefix.py index e578f01f94..cecdc0e767 100644 --- a/plotly/validators/carpet/baxis/_tickprefix.py +++ b/plotly/validators/carpet/baxis/_tickprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="carpet.baxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_ticksuffix.py b/plotly/validators/carpet/baxis/_ticksuffix.py index 27b78432f5..07a9ffa9ba 100644 --- a/plotly/validators/carpet/baxis/_ticksuffix.py +++ b/plotly/validators/carpet/baxis/_ticksuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="ticksuffix", parent_name="carpet.baxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_ticktext.py b/plotly/validators/carpet/baxis/_ticktext.py index 42b5bf4be4..3f6df436fa 100644 --- a/plotly/validators/carpet/baxis/_ticktext.py +++ b/plotly/validators/carpet/baxis/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="carpet.baxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_ticktextsrc.py b/plotly/validators/carpet/baxis/_ticktextsrc.py index 5dd8343f8c..5feba94bd2 100644 --- a/plotly/validators/carpet/baxis/_ticktextsrc.py +++ b/plotly/validators/carpet/baxis/_ticktextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="carpet.baxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_tickvals.py b/plotly/validators/carpet/baxis/_tickvals.py index 170741e75b..013118e329 100644 --- a/plotly/validators/carpet/baxis/_tickvals.py +++ b/plotly/validators/carpet/baxis/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="carpet.baxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_tickvalssrc.py b/plotly/validators/carpet/baxis/_tickvalssrc.py index f1a22cb086..59854b7fb8 100644 --- a/plotly/validators/carpet/baxis/_tickvalssrc.py +++ b/plotly/validators/carpet/baxis/_tickvalssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="tickvalssrc", parent_name="carpet.baxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/_title.py b/plotly/validators/carpet/baxis/_title.py index 6f31f8636a..7b3d29be0c 100644 --- a/plotly/validators/carpet/baxis/_title.py +++ b/plotly/validators/carpet/baxis/_title.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="carpet.baxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - offset - An additional amount by which to offset the - title from the tick labels, given in pixels. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/carpet/baxis/_type.py b/plotly/validators/carpet/baxis/_type.py index 35b43e57ce..883a186f63 100644 --- a/plotly/validators/carpet/baxis/_type.py +++ b/plotly/validators/carpet/baxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="carpet.baxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["-", "linear", "date", "category"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/tickfont/__init__.py b/plotly/validators/carpet/baxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/carpet/baxis/tickfont/__init__.py +++ b/plotly/validators/carpet/baxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/carpet/baxis/tickfont/_color.py b/plotly/validators/carpet/baxis/tickfont/_color.py index 525a291ec1..350a2b4ce0 100644 --- a/plotly/validators/carpet/baxis/tickfont/_color.py +++ b/plotly/validators/carpet/baxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="carpet.baxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/tickfont/_family.py b/plotly/validators/carpet/baxis/tickfont/_family.py index c5d4421c5d..cd78da8e00 100644 --- a/plotly/validators/carpet/baxis/tickfont/_family.py +++ b/plotly/validators/carpet/baxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="carpet.baxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/baxis/tickfont/_lineposition.py b/plotly/validators/carpet/baxis/tickfont/_lineposition.py index 68d145c64f..2da87e8b62 100644 --- a/plotly/validators/carpet/baxis/tickfont/_lineposition.py +++ b/plotly/validators/carpet/baxis/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="carpet.baxis.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/carpet/baxis/tickfont/_shadow.py b/plotly/validators/carpet/baxis/tickfont/_shadow.py index 41c9fe6336..083a154a56 100644 --- a/plotly/validators/carpet/baxis/tickfont/_shadow.py +++ b/plotly/validators/carpet/baxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="carpet.baxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/tickfont/_size.py b/plotly/validators/carpet/baxis/tickfont/_size.py index 61dab17944..712c887029 100644 --- a/plotly/validators/carpet/baxis/tickfont/_size.py +++ b/plotly/validators/carpet/baxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="carpet.baxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/baxis/tickfont/_style.py b/plotly/validators/carpet/baxis/tickfont/_style.py index f503eda879..086dcee7ac 100644 --- a/plotly/validators/carpet/baxis/tickfont/_style.py +++ b/plotly/validators/carpet/baxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.baxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/tickfont/_textcase.py b/plotly/validators/carpet/baxis/tickfont/_textcase.py index 99140e3bdb..6764a01b9e 100644 --- a/plotly/validators/carpet/baxis/tickfont/_textcase.py +++ b/plotly/validators/carpet/baxis/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="carpet.baxis.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/tickfont/_variant.py b/plotly/validators/carpet/baxis/tickfont/_variant.py index e6623e9a58..589cf44e99 100644 --- a/plotly/validators/carpet/baxis/tickfont/_variant.py +++ b/plotly/validators/carpet/baxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="carpet.baxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/baxis/tickfont/_weight.py b/plotly/validators/carpet/baxis/tickfont/_weight.py index 5a0fb30b48..592a42006d 100644 --- a/plotly/validators/carpet/baxis/tickfont/_weight.py +++ b/plotly/validators/carpet/baxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="carpet.baxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/carpet/baxis/tickformatstop/__init__.py b/plotly/validators/carpet/baxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/carpet/baxis/tickformatstop/__init__.py +++ b/plotly/validators/carpet/baxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py b/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py index 275e262922..af4e8e29e5 100644 --- a/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/carpet/baxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="carpet.baxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/carpet/baxis/tickformatstop/_enabled.py b/plotly/validators/carpet/baxis/tickformatstop/_enabled.py index 49fb95e877..ef5032237b 100644 --- a/plotly/validators/carpet/baxis/tickformatstop/_enabled.py +++ b/plotly/validators/carpet/baxis/tickformatstop/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="carpet.baxis.tickformatstop", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/tickformatstop/_name.py b/plotly/validators/carpet/baxis/tickformatstop/_name.py index 1cb60593bd..a2ac0f9465 100644 --- a/plotly/validators/carpet/baxis/tickformatstop/_name.py +++ b/plotly/validators/carpet/baxis/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="carpet.baxis.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py b/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py index 41778e1101..f10db82d97 100644 --- a/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/carpet/baxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="carpet.baxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/tickformatstop/_value.py b/plotly/validators/carpet/baxis/tickformatstop/_value.py index 5243b87035..74017045e1 100644 --- a/plotly/validators/carpet/baxis/tickformatstop/_value.py +++ b/plotly/validators/carpet/baxis/tickformatstop/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="carpet.baxis.tickformatstop", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/title/__init__.py b/plotly/validators/carpet/baxis/title/__init__.py index ff2ee4cb29..5a003b67cd 100644 --- a/plotly/validators/carpet/baxis/title/__init__.py +++ b/plotly/validators/carpet/baxis/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._offset import OffsetValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._offset.OffsetValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._offset.OffsetValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/carpet/baxis/title/_font.py b/plotly/validators/carpet/baxis/title/_font.py index f8bef608e1..ee2a6645d2 100644 --- a/plotly/validators/carpet/baxis/title/_font.py +++ b/plotly/validators/carpet/baxis/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="carpet.baxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/carpet/baxis/title/_offset.py b/plotly/validators/carpet/baxis/title/_offset.py index ffb2d5c011..75cd67812b 100644 --- a/plotly/validators/carpet/baxis/title/_offset.py +++ b/plotly/validators/carpet/baxis/title/_offset.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__( self, plotly_name="offset", parent_name="carpet.baxis.title", **kwargs ): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/title/_text.py b/plotly/validators/carpet/baxis/title/_text.py index 5fdc11173a..a2ccd7d399 100644 --- a/plotly/validators/carpet/baxis/title/_text.py +++ b/plotly/validators/carpet/baxis/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="carpet.baxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/title/font/__init__.py b/plotly/validators/carpet/baxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/carpet/baxis/title/font/__init__.py +++ b/plotly/validators/carpet/baxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/carpet/baxis/title/font/_color.py b/plotly/validators/carpet/baxis/title/font/_color.py index 27dc892115..83c35c88b5 100644 --- a/plotly/validators/carpet/baxis/title/font/_color.py +++ b/plotly/validators/carpet/baxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="carpet.baxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/title/font/_family.py b/plotly/validators/carpet/baxis/title/font/_family.py index c798648c92..27931d728a 100644 --- a/plotly/validators/carpet/baxis/title/font/_family.py +++ b/plotly/validators/carpet/baxis/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="carpet.baxis.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/baxis/title/font/_lineposition.py b/plotly/validators/carpet/baxis/title/font/_lineposition.py index 2e16204496..0e0161cf7d 100644 --- a/plotly/validators/carpet/baxis/title/font/_lineposition.py +++ b/plotly/validators/carpet/baxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="carpet.baxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/carpet/baxis/title/font/_shadow.py b/plotly/validators/carpet/baxis/title/font/_shadow.py index 4bc9e72813..964a0f286f 100644 --- a/plotly/validators/carpet/baxis/title/font/_shadow.py +++ b/plotly/validators/carpet/baxis/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="carpet.baxis.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/baxis/title/font/_size.py b/plotly/validators/carpet/baxis/title/font/_size.py index abf8c48cb0..9ac889b718 100644 --- a/plotly/validators/carpet/baxis/title/font/_size.py +++ b/plotly/validators/carpet/baxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="carpet.baxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/baxis/title/font/_style.py b/plotly/validators/carpet/baxis/title/font/_style.py index dee9f02479..a6532fc2e5 100644 --- a/plotly/validators/carpet/baxis/title/font/_style.py +++ b/plotly/validators/carpet/baxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.baxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/title/font/_textcase.py b/plotly/validators/carpet/baxis/title/font/_textcase.py index 7662aa30a3..821c0dd8db 100644 --- a/plotly/validators/carpet/baxis/title/font/_textcase.py +++ b/plotly/validators/carpet/baxis/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="carpet.baxis.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/carpet/baxis/title/font/_variant.py b/plotly/validators/carpet/baxis/title/font/_variant.py index ff18b7eceb..bd16125931 100644 --- a/plotly/validators/carpet/baxis/title/font/_variant.py +++ b/plotly/validators/carpet/baxis/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="carpet.baxis.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/baxis/title/font/_weight.py b/plotly/validators/carpet/baxis/title/font/_weight.py index 8a04fcf852..03a6cba05b 100644 --- a/plotly/validators/carpet/baxis/title/font/_weight.py +++ b/plotly/validators/carpet/baxis/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="carpet.baxis.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/carpet/font/__init__.py b/plotly/validators/carpet/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/carpet/font/__init__.py +++ b/plotly/validators/carpet/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/carpet/font/_color.py b/plotly/validators/carpet/font/_color.py index 20190ce0bc..71a66663b1 100644 --- a/plotly/validators/carpet/font/_color.py +++ b/plotly/validators/carpet/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="carpet.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/font/_family.py b/plotly/validators/carpet/font/_family.py index b504547d66..3c6dcfa436 100644 --- a/plotly/validators/carpet/font/_family.py +++ b/plotly/validators/carpet/font/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="carpet.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/font/_lineposition.py b/plotly/validators/carpet/font/_lineposition.py index 62357f2ebf..4fbb262d9f 100644 --- a/plotly/validators/carpet/font/_lineposition.py +++ b/plotly/validators/carpet/font/_lineposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="lineposition", parent_name="carpet.font", **kwargs): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/carpet/font/_shadow.py b/plotly/validators/carpet/font/_shadow.py index a81eacbaa2..9e90ad216b 100644 --- a/plotly/validators/carpet/font/_shadow.py +++ b/plotly/validators/carpet/font/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="carpet.font", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/carpet/font/_size.py b/plotly/validators/carpet/font/_size.py index 7095055981..af01160b5a 100644 --- a/plotly/validators/carpet/font/_size.py +++ b/plotly/validators/carpet/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="carpet.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/font/_style.py b/plotly/validators/carpet/font/_style.py index f980b6392e..24f3970296 100644 --- a/plotly/validators/carpet/font/_style.py +++ b/plotly/validators/carpet/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="carpet.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/carpet/font/_textcase.py b/plotly/validators/carpet/font/_textcase.py index 4458271444..a295f703db 100644 --- a/plotly/validators/carpet/font/_textcase.py +++ b/plotly/validators/carpet/font/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="carpet.font", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/carpet/font/_variant.py b/plotly/validators/carpet/font/_variant.py index 0645ee8f57..54ac660f7d 100644 --- a/plotly/validators/carpet/font/_variant.py +++ b/plotly/validators/carpet/font/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="carpet.font", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/font/_weight.py b/plotly/validators/carpet/font/_weight.py index 6d7afe2e75..0d898359a4 100644 --- a/plotly/validators/carpet/font/_weight.py +++ b/plotly/validators/carpet/font/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="carpet.font", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/carpet/legendgrouptitle/__init__.py b/plotly/validators/carpet/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/carpet/legendgrouptitle/__init__.py +++ b/plotly/validators/carpet/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/carpet/legendgrouptitle/_font.py b/plotly/validators/carpet/legendgrouptitle/_font.py index 7f67ac14d7..6cade48ea5 100644 --- a/plotly/validators/carpet/legendgrouptitle/_font.py +++ b/plotly/validators/carpet/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="carpet.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/carpet/legendgrouptitle/_text.py b/plotly/validators/carpet/legendgrouptitle/_text.py index cc369a17f6..3c3a354f90 100644 --- a/plotly/validators/carpet/legendgrouptitle/_text.py +++ b/plotly/validators/carpet/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="carpet.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/carpet/legendgrouptitle/font/__init__.py b/plotly/validators/carpet/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/__init__.py +++ b/plotly/validators/carpet/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/carpet/legendgrouptitle/font/_color.py b/plotly/validators/carpet/legendgrouptitle/font/_color.py index d229c68863..129644c4c8 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_color.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="carpet.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/carpet/legendgrouptitle/font/_family.py b/plotly/validators/carpet/legendgrouptitle/font/_family.py index bc59037f1e..47095939f1 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_family.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="carpet.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/carpet/legendgrouptitle/font/_lineposition.py b/plotly/validators/carpet/legendgrouptitle/font/_lineposition.py index 24fe20738f..42774df83f 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="carpet.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/carpet/legendgrouptitle/font/_shadow.py b/plotly/validators/carpet/legendgrouptitle/font/_shadow.py index 17477c2fdc..296eb71b7d 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="carpet.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/carpet/legendgrouptitle/font/_size.py b/plotly/validators/carpet/legendgrouptitle/font/_size.py index 3ab7fbae18..1c22dd86ed 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_size.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="carpet.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/carpet/legendgrouptitle/font/_style.py b/plotly/validators/carpet/legendgrouptitle/font/_style.py index 967552352d..8243669675 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_style.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="carpet.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/carpet/legendgrouptitle/font/_textcase.py b/plotly/validators/carpet/legendgrouptitle/font/_textcase.py index 74dc63c316..ff24e3da46 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="carpet.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/carpet/legendgrouptitle/font/_variant.py b/plotly/validators/carpet/legendgrouptitle/font/_variant.py index 74c321bc29..cc874756c4 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_variant.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="carpet.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/carpet/legendgrouptitle/font/_weight.py b/plotly/validators/carpet/legendgrouptitle/font/_weight.py index 4ac56dd83f..6dfd978cf3 100644 --- a/plotly/validators/carpet/legendgrouptitle/font/_weight.py +++ b/plotly/validators/carpet/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="carpet.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/carpet/stream/__init__.py b/plotly/validators/carpet/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/carpet/stream/__init__.py +++ b/plotly/validators/carpet/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/carpet/stream/_maxpoints.py b/plotly/validators/carpet/stream/_maxpoints.py index 264c6f4d69..30a737e20e 100644 --- a/plotly/validators/carpet/stream/_maxpoints.py +++ b/plotly/validators/carpet/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="carpet.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/carpet/stream/_token.py b/plotly/validators/carpet/stream/_token.py index a668906119..1663175d09 100644 --- a/plotly/validators/carpet/stream/_token.py +++ b/plotly/validators/carpet/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="carpet.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choropleth/__init__.py b/plotly/validators/choropleth/__init__.py index b1f72cd16e..f988bf1cc8 100644 --- a/plotly/validators/choropleth/__init__.py +++ b/plotly/validators/choropleth/__init__.py @@ -1,109 +1,57 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._reversescale import ReversescaleValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._locationmode import LocationmodeValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._geojson import GeojsonValidator - from ._geo import GeoValidator - from ._featureidkey import FeatureidkeyValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._reversescale.ReversescaleValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._locationmode.LocationmodeValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._geojson.GeojsonValidator", - "._geo.GeoValidator", - "._featureidkey.FeatureidkeyValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._reversescale.ReversescaleValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._locationmode.LocationmodeValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._geo.GeoValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/choropleth/_autocolorscale.py b/plotly/validators/choropleth/_autocolorscale.py index 3bc74402a2..4ec997db3f 100644 --- a/plotly/validators/choropleth/_autocolorscale.py +++ b/plotly/validators/choropleth/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="choropleth", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choropleth/_coloraxis.py b/plotly/validators/choropleth/_coloraxis.py index 472db6a709..9ee1986e01 100644 --- a/plotly/validators/choropleth/_coloraxis.py +++ b/plotly/validators/choropleth/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="choropleth", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/choropleth/_colorbar.py b/plotly/validators/choropleth/_colorbar.py index b696d78d6b..6460ab7eab 100644 --- a/plotly/validators/choropleth/_colorbar.py +++ b/plotly/validators/choropleth/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="choropleth", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - eth.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choropleth.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of choropleth.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choropleth.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/choropleth/_colorscale.py b/plotly/validators/choropleth/_colorscale.py index 0756b0b1d5..15517663d6 100644 --- a/plotly/validators/choropleth/_colorscale.py +++ b/plotly/validators/choropleth/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="choropleth", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/choropleth/_customdata.py b/plotly/validators/choropleth/_customdata.py index 2de9dea3e9..334913a559 100644 --- a/plotly/validators/choropleth/_customdata.py +++ b/plotly/validators/choropleth/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="choropleth", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_customdatasrc.py b/plotly/validators/choropleth/_customdatasrc.py index 151d7ddaac..51645421eb 100644 --- a/plotly/validators/choropleth/_customdatasrc.py +++ b/plotly/validators/choropleth/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="choropleth", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_featureidkey.py b/plotly/validators/choropleth/_featureidkey.py index d1efbb9a16..05afa37001 100644 --- a/plotly/validators/choropleth/_featureidkey.py +++ b/plotly/validators/choropleth/_featureidkey.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): +class FeatureidkeyValidator(_bv.StringValidator): def __init__(self, plotly_name="featureidkey", parent_name="choropleth", **kwargs): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_geo.py b/plotly/validators/choropleth/_geo.py index b963fd008f..a2a100166d 100644 --- a/plotly/validators/choropleth/_geo.py +++ b/plotly/validators/choropleth/_geo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeoValidator(_plotly_utils.basevalidators.SubplotidValidator): +class GeoValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="geo", parent_name="choropleth", **kwargs): - super(GeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "geo"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choropleth/_geojson.py b/plotly/validators/choropleth/_geojson.py index 71a69a7a80..422ffdb1cd 100644 --- a/plotly/validators/choropleth/_geojson.py +++ b/plotly/validators/choropleth/_geojson.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): +class GeojsonValidator(_bv.AnyValidator): def __init__(self, plotly_name="geojson", parent_name="choropleth", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_hoverinfo.py b/plotly/validators/choropleth/_hoverinfo.py index 42c37ee22f..eda710f3fe 100644 --- a/plotly/validators/choropleth/_hoverinfo.py +++ b/plotly/validators/choropleth/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="choropleth", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/choropleth/_hoverinfosrc.py b/plotly/validators/choropleth/_hoverinfosrc.py index 4318e56413..3904e1bc49 100644 --- a/plotly/validators/choropleth/_hoverinfosrc.py +++ b/plotly/validators/choropleth/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="choropleth", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_hoverlabel.py b/plotly/validators/choropleth/_hoverlabel.py index 8896657cd6..e189366a2f 100644 --- a/plotly/validators/choropleth/_hoverlabel.py +++ b/plotly/validators/choropleth/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="choropleth", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/choropleth/_hovertemplate.py b/plotly/validators/choropleth/_hovertemplate.py index d8c40630c6..092053ad99 100644 --- a/plotly/validators/choropleth/_hovertemplate.py +++ b/plotly/validators/choropleth/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="choropleth", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choropleth/_hovertemplatesrc.py b/plotly/validators/choropleth/_hovertemplatesrc.py index 1e99bfd0bf..396e635b00 100644 --- a/plotly/validators/choropleth/_hovertemplatesrc.py +++ b/plotly/validators/choropleth/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="choropleth", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_hovertext.py b/plotly/validators/choropleth/_hovertext.py index 8f59d47dbf..b2071a40a5 100644 --- a/plotly/validators/choropleth/_hovertext.py +++ b/plotly/validators/choropleth/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="choropleth", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choropleth/_hovertextsrc.py b/plotly/validators/choropleth/_hovertextsrc.py index a2babf8d61..5ce37a5954 100644 --- a/plotly/validators/choropleth/_hovertextsrc.py +++ b/plotly/validators/choropleth/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="choropleth", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_ids.py b/plotly/validators/choropleth/_ids.py index e6c741fffe..2c8b0e8d45 100644 --- a/plotly/validators/choropleth/_ids.py +++ b/plotly/validators/choropleth/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="choropleth", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_idssrc.py b/plotly/validators/choropleth/_idssrc.py index ed22d7d409..11d238c48f 100644 --- a/plotly/validators/choropleth/_idssrc.py +++ b/plotly/validators/choropleth/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="choropleth", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_legend.py b/plotly/validators/choropleth/_legend.py index 04273e21ef..00184da9bb 100644 --- a/plotly/validators/choropleth/_legend.py +++ b/plotly/validators/choropleth/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="choropleth", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/choropleth/_legendgroup.py b/plotly/validators/choropleth/_legendgroup.py index 4711ae2d62..ad3dc00947 100644 --- a/plotly/validators/choropleth/_legendgroup.py +++ b/plotly/validators/choropleth/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="choropleth", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/_legendgrouptitle.py b/plotly/validators/choropleth/_legendgrouptitle.py index 72f53c248d..7c410cbe10 100644 --- a/plotly/validators/choropleth/_legendgrouptitle.py +++ b/plotly/validators/choropleth/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="choropleth", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/choropleth/_legendrank.py b/plotly/validators/choropleth/_legendrank.py index 7c24c40c35..9f765a961f 100644 --- a/plotly/validators/choropleth/_legendrank.py +++ b/plotly/validators/choropleth/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="choropleth", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/_legendwidth.py b/plotly/validators/choropleth/_legendwidth.py index b8d8b752db..24c0028260 100644 --- a/plotly/validators/choropleth/_legendwidth.py +++ b/plotly/validators/choropleth/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="choropleth", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/_locationmode.py b/plotly/validators/choropleth/_locationmode.py index afe54f8b3d..8a7f92e4c0 100644 --- a/plotly/validators/choropleth/_locationmode.py +++ b/plotly/validators/choropleth/_locationmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LocationmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="locationmode", parent_name="choropleth", **kwargs): - super(LocationmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["ISO-3", "USA-states", "country names", "geojson-id"] diff --git a/plotly/validators/choropleth/_locations.py b/plotly/validators/choropleth/_locations.py index 85335eb35f..004df38e41 100644 --- a/plotly/validators/choropleth/_locations.py +++ b/plotly/validators/choropleth/_locations.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="locations", parent_name="choropleth", **kwargs): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_locationssrc.py b/plotly/validators/choropleth/_locationssrc.py index 9bf200c9c5..1b9f0d3c11 100644 --- a/plotly/validators/choropleth/_locationssrc.py +++ b/plotly/validators/choropleth/_locationssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="locationssrc", parent_name="choropleth", **kwargs): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_marker.py b/plotly/validators/choropleth/_marker.py index 1cb088f8a5..6259fb4ce1 100644 --- a/plotly/validators/choropleth/_marker.py +++ b/plotly/validators/choropleth/_marker.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="choropleth", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.choropleth.marker. - Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. """, ), **kwargs, diff --git a/plotly/validators/choropleth/_meta.py b/plotly/validators/choropleth/_meta.py index 9f6ade45f7..098aed7839 100644 --- a/plotly/validators/choropleth/_meta.py +++ b/plotly/validators/choropleth/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="choropleth", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/choropleth/_metasrc.py b/plotly/validators/choropleth/_metasrc.py index ef4bc3d80d..cb0dfd302a 100644 --- a/plotly/validators/choropleth/_metasrc.py +++ b/plotly/validators/choropleth/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="choropleth", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_name.py b/plotly/validators/choropleth/_name.py index e7e6e91d8c..560426b274 100644 --- a/plotly/validators/choropleth/_name.py +++ b/plotly/validators/choropleth/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="choropleth", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/_reversescale.py b/plotly/validators/choropleth/_reversescale.py index eaddd60af0..7e3689c50c 100644 --- a/plotly/validators/choropleth/_reversescale.py +++ b/plotly/validators/choropleth/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="choropleth", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choropleth/_selected.py b/plotly/validators/choropleth/_selected.py index ef83768b61..1b3941a21f 100644 --- a/plotly/validators/choropleth/_selected.py +++ b/plotly/validators/choropleth/_selected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="choropleth", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.choropleth.selecte - d.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/choropleth/_selectedpoints.py b/plotly/validators/choropleth/_selectedpoints.py index 0797dc3752..a22ff95506 100644 --- a/plotly/validators/choropleth/_selectedpoints.py +++ b/plotly/validators/choropleth/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="choropleth", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_showlegend.py b/plotly/validators/choropleth/_showlegend.py index 9f6d2144ee..4da6591d29 100644 --- a/plotly/validators/choropleth/_showlegend.py +++ b/plotly/validators/choropleth/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="choropleth", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/_showscale.py b/plotly/validators/choropleth/_showscale.py index 91c6b290ad..fbfc91c85b 100644 --- a/plotly/validators/choropleth/_showscale.py +++ b/plotly/validators/choropleth/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="choropleth", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_stream.py b/plotly/validators/choropleth/_stream.py index 28f58af6e8..4b77264ba6 100644 --- a/plotly/validators/choropleth/_stream.py +++ b/plotly/validators/choropleth/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="choropleth", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/choropleth/_text.py b/plotly/validators/choropleth/_text.py index 8b89687d23..b0022eb974 100644 --- a/plotly/validators/choropleth/_text.py +++ b/plotly/validators/choropleth/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="choropleth", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choropleth/_textsrc.py b/plotly/validators/choropleth/_textsrc.py index f4afc915d0..1d55e2289b 100644 --- a/plotly/validators/choropleth/_textsrc.py +++ b/plotly/validators/choropleth/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="choropleth", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_uid.py b/plotly/validators/choropleth/_uid.py index 4fdb25e0de..ad2d5971ad 100644 --- a/plotly/validators/choropleth/_uid.py +++ b/plotly/validators/choropleth/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="choropleth", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choropleth/_uirevision.py b/plotly/validators/choropleth/_uirevision.py index 07a6238f97..c8c098ca18 100644 --- a/plotly/validators/choropleth/_uirevision.py +++ b/plotly/validators/choropleth/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="choropleth", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/_unselected.py b/plotly/validators/choropleth/_unselected.py index 86808ffde7..3ffe877eea 100644 --- a/plotly/validators/choropleth/_unselected.py +++ b/plotly/validators/choropleth/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="choropleth", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.choropleth.unselec - ted.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/choropleth/_visible.py b/plotly/validators/choropleth/_visible.py index d7998697a8..02e3c14392 100644 --- a/plotly/validators/choropleth/_visible.py +++ b/plotly/validators/choropleth/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="choropleth", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/choropleth/_z.py b/plotly/validators/choropleth/_z.py index 51d611f024..43b6031077 100644 --- a/plotly/validators/choropleth/_z.py +++ b/plotly/validators/choropleth/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="choropleth", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choropleth/_zauto.py b/plotly/validators/choropleth/_zauto.py index 1ea1a26f01..fa6d8072a1 100644 --- a/plotly/validators/choropleth/_zauto.py +++ b/plotly/validators/choropleth/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="choropleth", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choropleth/_zmax.py b/plotly/validators/choropleth/_zmax.py index e8335ee71f..eb32abe7cd 100644 --- a/plotly/validators/choropleth/_zmax.py +++ b/plotly/validators/choropleth/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="choropleth", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/choropleth/_zmid.py b/plotly/validators/choropleth/_zmid.py index 15d1dd8dee..6d9714bf6b 100644 --- a/plotly/validators/choropleth/_zmid.py +++ b/plotly/validators/choropleth/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="choropleth", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choropleth/_zmin.py b/plotly/validators/choropleth/_zmin.py index 16b4b4f12c..6b3981c3f6 100644 --- a/plotly/validators/choropleth/_zmin.py +++ b/plotly/validators/choropleth/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="choropleth", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/choropleth/_zsrc.py b/plotly/validators/choropleth/_zsrc.py index 76db7f1718..dc0f7ef559 100644 --- a/plotly/validators/choropleth/_zsrc.py +++ b/plotly/validators/choropleth/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="choropleth", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/__init__.py b/plotly/validators/choropleth/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/choropleth/colorbar/__init__.py +++ b/plotly/validators/choropleth/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/choropleth/colorbar/_bgcolor.py b/plotly/validators/choropleth/colorbar/_bgcolor.py index 3c9fbd793f..41072f1b98 100644 --- a/plotly/validators/choropleth/colorbar/_bgcolor.py +++ b/plotly/validators/choropleth/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="choropleth.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_bordercolor.py b/plotly/validators/choropleth/colorbar/_bordercolor.py index 21c06b7e3e..29ee343181 100644 --- a/plotly/validators/choropleth/colorbar/_bordercolor.py +++ b/plotly/validators/choropleth/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choropleth.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_borderwidth.py b/plotly/validators/choropleth/colorbar/_borderwidth.py index be6d033cc6..de34c48301 100644 --- a/plotly/validators/choropleth/colorbar/_borderwidth.py +++ b/plotly/validators/choropleth/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="choropleth.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_dtick.py b/plotly/validators/choropleth/colorbar/_dtick.py index a1ad58a5e8..7bd40788f1 100644 --- a/plotly/validators/choropleth/colorbar/_dtick.py +++ b/plotly/validators/choropleth/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="choropleth.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_exponentformat.py b/plotly/validators/choropleth/colorbar/_exponentformat.py index 11a19c541f..f05ff57cf0 100644 --- a/plotly/validators/choropleth/colorbar/_exponentformat.py +++ b/plotly/validators/choropleth/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="choropleth.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_labelalias.py b/plotly/validators/choropleth/colorbar/_labelalias.py index fc52785dba..a57b23042a 100644 --- a/plotly/validators/choropleth/colorbar/_labelalias.py +++ b/plotly/validators/choropleth/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="choropleth.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_len.py b/plotly/validators/choropleth/colorbar/_len.py index eee3c960c5..648c880bdd 100644 --- a/plotly/validators/choropleth/colorbar/_len.py +++ b/plotly/validators/choropleth/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="choropleth.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_lenmode.py b/plotly/validators/choropleth/colorbar/_lenmode.py index 4dd0b085bf..418e61240a 100644 --- a/plotly/validators/choropleth/colorbar/_lenmode.py +++ b/plotly/validators/choropleth/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="choropleth.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_minexponent.py b/plotly/validators/choropleth/colorbar/_minexponent.py index c3f49d5802..2a5a18f83c 100644 --- a/plotly/validators/choropleth/colorbar/_minexponent.py +++ b/plotly/validators/choropleth/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="choropleth.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_nticks.py b/plotly/validators/choropleth/colorbar/_nticks.py index b620eb0b9d..8d4af903ec 100644 --- a/plotly/validators/choropleth/colorbar/_nticks.py +++ b/plotly/validators/choropleth/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="choropleth.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_orientation.py b/plotly/validators/choropleth/colorbar/_orientation.py index 18cb0412ea..a9b252d8fb 100644 --- a/plotly/validators/choropleth/colorbar/_orientation.py +++ b/plotly/validators/choropleth/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="choropleth.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_outlinecolor.py b/plotly/validators/choropleth/colorbar/_outlinecolor.py index c3820715c1..a0c7e10897 100644 --- a/plotly/validators/choropleth/colorbar/_outlinecolor.py +++ b/plotly/validators/choropleth/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="choropleth.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_outlinewidth.py b/plotly/validators/choropleth/colorbar/_outlinewidth.py index 5c77227b07..ab4f58c3de 100644 --- a/plotly/validators/choropleth/colorbar/_outlinewidth.py +++ b/plotly/validators/choropleth/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="choropleth.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_separatethousands.py b/plotly/validators/choropleth/colorbar/_separatethousands.py index 874e38e0ac..23cee55148 100644 --- a/plotly/validators/choropleth/colorbar/_separatethousands.py +++ b/plotly/validators/choropleth/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="choropleth.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_showexponent.py b/plotly/validators/choropleth/colorbar/_showexponent.py index 309539996e..f5f2a4aba1 100644 --- a/plotly/validators/choropleth/colorbar/_showexponent.py +++ b/plotly/validators/choropleth/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="choropleth.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_showticklabels.py b/plotly/validators/choropleth/colorbar/_showticklabels.py index 6638ccba73..6230aa5eba 100644 --- a/plotly/validators/choropleth/colorbar/_showticklabels.py +++ b/plotly/validators/choropleth/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="choropleth.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_showtickprefix.py b/plotly/validators/choropleth/colorbar/_showtickprefix.py index f382c87e5c..fe626c2bd8 100644 --- a/plotly/validators/choropleth/colorbar/_showtickprefix.py +++ b/plotly/validators/choropleth/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="choropleth.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_showticksuffix.py b/plotly/validators/choropleth/colorbar/_showticksuffix.py index 04d3bc5b4f..081d4b2aad 100644 --- a/plotly/validators/choropleth/colorbar/_showticksuffix.py +++ b/plotly/validators/choropleth/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="choropleth.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_thickness.py b/plotly/validators/choropleth/colorbar/_thickness.py index f6395f1b62..e27472cc6a 100644 --- a/plotly/validators/choropleth/colorbar/_thickness.py +++ b/plotly/validators/choropleth/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="choropleth.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_thicknessmode.py b/plotly/validators/choropleth/colorbar/_thicknessmode.py index 3572839993..d7109f7bfe 100644 --- a/plotly/validators/choropleth/colorbar/_thicknessmode.py +++ b/plotly/validators/choropleth/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="choropleth.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_tick0.py b/plotly/validators/choropleth/colorbar/_tick0.py index 45ca3fc875..d04b6e9a3c 100644 --- a/plotly/validators/choropleth/colorbar/_tick0.py +++ b/plotly/validators/choropleth/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="choropleth.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_tickangle.py b/plotly/validators/choropleth/colorbar/_tickangle.py index 311fd67e1b..18f996da3c 100644 --- a/plotly/validators/choropleth/colorbar/_tickangle.py +++ b/plotly/validators/choropleth/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="choropleth.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_tickcolor.py b/plotly/validators/choropleth/colorbar/_tickcolor.py index a612c449e6..ffbba54ab7 100644 --- a/plotly/validators/choropleth/colorbar/_tickcolor.py +++ b/plotly/validators/choropleth/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="choropleth.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_tickfont.py b/plotly/validators/choropleth/colorbar/_tickfont.py index 209724d606..79389781ac 100644 --- a/plotly/validators/choropleth/colorbar/_tickfont.py +++ b/plotly/validators/choropleth/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="choropleth.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_tickformat.py b/plotly/validators/choropleth/colorbar/_tickformat.py index 8482fc84e5..1242c47db8 100644 --- a/plotly/validators/choropleth/colorbar/_tickformat.py +++ b/plotly/validators/choropleth/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="choropleth.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py b/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py index 0e4f78c1a8..2e9274b45c 100644 --- a/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/choropleth/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="choropleth.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/choropleth/colorbar/_tickformatstops.py b/plotly/validators/choropleth/colorbar/_tickformatstops.py index 888481e60d..b053806968 100644 --- a/plotly/validators/choropleth/colorbar/_tickformatstops.py +++ b/plotly/validators/choropleth/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="choropleth.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_ticklabeloverflow.py b/plotly/validators/choropleth/colorbar/_ticklabeloverflow.py index c8d6c4344a..8339617a1a 100644 --- a/plotly/validators/choropleth/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/choropleth/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="choropleth.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_ticklabelposition.py b/plotly/validators/choropleth/colorbar/_ticklabelposition.py index 14f303e94b..a396cd4a85 100644 --- a/plotly/validators/choropleth/colorbar/_ticklabelposition.py +++ b/plotly/validators/choropleth/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="choropleth.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choropleth/colorbar/_ticklabelstep.py b/plotly/validators/choropleth/colorbar/_ticklabelstep.py index 78e8af8739..07dab3b104 100644 --- a/plotly/validators/choropleth/colorbar/_ticklabelstep.py +++ b/plotly/validators/choropleth/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="choropleth.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_ticklen.py b/plotly/validators/choropleth/colorbar/_ticklen.py index 836a76caf8..ec06ae259d 100644 --- a/plotly/validators/choropleth/colorbar/_ticklen.py +++ b/plotly/validators/choropleth/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="choropleth.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_tickmode.py b/plotly/validators/choropleth/colorbar/_tickmode.py index 9828a93634..7570840735 100644 --- a/plotly/validators/choropleth/colorbar/_tickmode.py +++ b/plotly/validators/choropleth/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="choropleth.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/choropleth/colorbar/_tickprefix.py b/plotly/validators/choropleth/colorbar/_tickprefix.py index 1ae52f1551..e395115456 100644 --- a/plotly/validators/choropleth/colorbar/_tickprefix.py +++ b/plotly/validators/choropleth/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="choropleth.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_ticks.py b/plotly/validators/choropleth/colorbar/_ticks.py index 421cc3c7fe..8a109e2cfb 100644 --- a/plotly/validators/choropleth/colorbar/_ticks.py +++ b/plotly/validators/choropleth/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="choropleth.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_ticksuffix.py b/plotly/validators/choropleth/colorbar/_ticksuffix.py index aea6550992..565ed6794c 100644 --- a/plotly/validators/choropleth/colorbar/_ticksuffix.py +++ b/plotly/validators/choropleth/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="choropleth.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_ticktext.py b/plotly/validators/choropleth/colorbar/_ticktext.py index 318924a28a..7e93bd9619 100644 --- a/plotly/validators/choropleth/colorbar/_ticktext.py +++ b/plotly/validators/choropleth/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="choropleth.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_ticktextsrc.py b/plotly/validators/choropleth/colorbar/_ticktextsrc.py index f544556654..8041fa32eb 100644 --- a/plotly/validators/choropleth/colorbar/_ticktextsrc.py +++ b/plotly/validators/choropleth/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="choropleth.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_tickvals.py b/plotly/validators/choropleth/colorbar/_tickvals.py index 4be520f819..b8006656b4 100644 --- a/plotly/validators/choropleth/colorbar/_tickvals.py +++ b/plotly/validators/choropleth/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="choropleth.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_tickvalssrc.py b/plotly/validators/choropleth/colorbar/_tickvalssrc.py index 3e2fcb31ad..06feb49496 100644 --- a/plotly/validators/choropleth/colorbar/_tickvalssrc.py +++ b/plotly/validators/choropleth/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="choropleth.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_tickwidth.py b/plotly/validators/choropleth/colorbar/_tickwidth.py index 0a317a9490..c5084ed57c 100644 --- a/plotly/validators/choropleth/colorbar/_tickwidth.py +++ b/plotly/validators/choropleth/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="choropleth.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_title.py b/plotly/validators/choropleth/colorbar/_title.py index ddefb78154..6526f425db 100644 --- a/plotly/validators/choropleth/colorbar/_title.py +++ b/plotly/validators/choropleth/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="choropleth.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_x.py b/plotly/validators/choropleth/colorbar/_x.py index 38bdf123d8..c99e515394 100644 --- a/plotly/validators/choropleth/colorbar/_x.py +++ b/plotly/validators/choropleth/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="choropleth.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_xanchor.py b/plotly/validators/choropleth/colorbar/_xanchor.py index 29b64c1ac3..e29cbf5b2d 100644 --- a/plotly/validators/choropleth/colorbar/_xanchor.py +++ b/plotly/validators/choropleth/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="choropleth.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_xpad.py b/plotly/validators/choropleth/colorbar/_xpad.py index 156d72b09d..eda15d9a04 100644 --- a/plotly/validators/choropleth/colorbar/_xpad.py +++ b/plotly/validators/choropleth/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="choropleth.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_xref.py b/plotly/validators/choropleth/colorbar/_xref.py index 38dfbb2c5b..e2c471ae50 100644 --- a/plotly/validators/choropleth/colorbar/_xref.py +++ b/plotly/validators/choropleth/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="choropleth.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_y.py b/plotly/validators/choropleth/colorbar/_y.py index 1e75127902..7838fa616d 100644 --- a/plotly/validators/choropleth/colorbar/_y.py +++ b/plotly/validators/choropleth/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="choropleth.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/_yanchor.py b/plotly/validators/choropleth/colorbar/_yanchor.py index 8431e52e9b..2013d9a27e 100644 --- a/plotly/validators/choropleth/colorbar/_yanchor.py +++ b/plotly/validators/choropleth/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="choropleth.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_ypad.py b/plotly/validators/choropleth/colorbar/_ypad.py index 09309a5ac6..8854db1c8a 100644 --- a/plotly/validators/choropleth/colorbar/_ypad.py +++ b/plotly/validators/choropleth/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="choropleth.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/_yref.py b/plotly/validators/choropleth/colorbar/_yref.py index fad04acf62..a3d23ba158 100644 --- a/plotly/validators/choropleth/colorbar/_yref.py +++ b/plotly/validators/choropleth/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="choropleth.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/tickfont/__init__.py b/plotly/validators/choropleth/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/__init__.py +++ b/plotly/validators/choropleth/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choropleth/colorbar/tickfont/_color.py b/plotly/validators/choropleth/colorbar/tickfont/_color.py index 25ed1bd9e9..6aa487b254 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_color.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choropleth.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/tickfont/_family.py b/plotly/validators/choropleth/colorbar/tickfont/_family.py index ddd3ae57bd..f59cf44b40 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_family.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choropleth.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choropleth/colorbar/tickfont/_lineposition.py b/plotly/validators/choropleth/colorbar/tickfont/_lineposition.py index 07bd241c3f..f852286dc6 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choropleth.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choropleth/colorbar/tickfont/_shadow.py b/plotly/validators/choropleth/colorbar/tickfont/_shadow.py index 1751424594..0f05d105f2 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_shadow.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choropleth.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/tickfont/_size.py b/plotly/validators/choropleth/colorbar/tickfont/_size.py index fdb57e1f89..156628f2c2 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_size.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choropleth.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/tickfont/_style.py b/plotly/validators/choropleth/colorbar/tickfont/_style.py index b6c1c895c8..e14edf51b1 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_style.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choropleth.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/tickfont/_textcase.py b/plotly/validators/choropleth/colorbar/tickfont/_textcase.py index 721f1e6e0b..fea118416e 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_textcase.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choropleth.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/tickfont/_variant.py b/plotly/validators/choropleth/colorbar/tickfont/_variant.py index 45bce1fd8a..6ef54c4ca5 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_variant.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choropleth.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choropleth/colorbar/tickfont/_weight.py b/plotly/validators/choropleth/colorbar/tickfont/_weight.py index 6fa5bd9452..421d73f8cc 100644 --- a/plotly/validators/choropleth/colorbar/tickfont/_weight.py +++ b/plotly/validators/choropleth/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choropleth.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py b/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/choropleth/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py index a61712ab78..47e19a0dbf 100644 --- a/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/choropleth/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="choropleth.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py b/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py index d105887cc7..650cfd7253 100644 --- a/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/choropleth/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="choropleth.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/tickformatstop/_name.py b/plotly/validators/choropleth/colorbar/tickformatstop/_name.py index 2d666fb1d6..a99d23d64f 100644 --- a/plotly/validators/choropleth/colorbar/tickformatstop/_name.py +++ b/plotly/validators/choropleth/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="choropleth.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py index 94098b0448..217bee8760 100644 --- a/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/choropleth/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="choropleth.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/tickformatstop/_value.py b/plotly/validators/choropleth/colorbar/tickformatstop/_value.py index a036c49c85..9133bcb508 100644 --- a/plotly/validators/choropleth/colorbar/tickformatstop/_value.py +++ b/plotly/validators/choropleth/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="choropleth.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/title/__init__.py b/plotly/validators/choropleth/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/choropleth/colorbar/title/__init__.py +++ b/plotly/validators/choropleth/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/choropleth/colorbar/title/_font.py b/plotly/validators/choropleth/colorbar/title/_font.py index 69eb73980e..dc285ad70f 100644 --- a/plotly/validators/choropleth/colorbar/title/_font.py +++ b/plotly/validators/choropleth/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choropleth.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/title/_side.py b/plotly/validators/choropleth/colorbar/title/_side.py index 366984329c..1ddeb2d5c2 100644 --- a/plotly/validators/choropleth/colorbar/title/_side.py +++ b/plotly/validators/choropleth/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="choropleth.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/title/_text.py b/plotly/validators/choropleth/colorbar/title/_text.py index 9efb61a753..48eae1b2cb 100644 --- a/plotly/validators/choropleth/colorbar/title/_text.py +++ b/plotly/validators/choropleth/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="choropleth.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/title/font/__init__.py b/plotly/validators/choropleth/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choropleth/colorbar/title/font/__init__.py +++ b/plotly/validators/choropleth/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choropleth/colorbar/title/font/_color.py b/plotly/validators/choropleth/colorbar/title/font/_color.py index b31e89d5fc..1b20ebc1bf 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_color.py +++ b/plotly/validators/choropleth/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/title/font/_family.py b/plotly/validators/choropleth/colorbar/title/font/_family.py index 04fb50e0d1..3fea539b3f 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_family.py +++ b/plotly/validators/choropleth/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choropleth/colorbar/title/font/_lineposition.py b/plotly/validators/choropleth/colorbar/title/font/_lineposition.py index 011a4da477..83dcd3a9a2 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_lineposition.py +++ b/plotly/validators/choropleth/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choropleth/colorbar/title/font/_shadow.py b/plotly/validators/choropleth/colorbar/title/font/_shadow.py index 818744b2c8..5565d12da7 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_shadow.py +++ b/plotly/validators/choropleth/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choropleth/colorbar/title/font/_size.py b/plotly/validators/choropleth/colorbar/title/font/_size.py index 40c6789a1c..dd2d9e6812 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_size.py +++ b/plotly/validators/choropleth/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choropleth.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/title/font/_style.py b/plotly/validators/choropleth/colorbar/title/font/_style.py index 6a2b690957..fe7c133cdc 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_style.py +++ b/plotly/validators/choropleth/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/title/font/_textcase.py b/plotly/validators/choropleth/colorbar/title/font/_textcase.py index 699580a416..c7304993cf 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_textcase.py +++ b/plotly/validators/choropleth/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choropleth/colorbar/title/font/_variant.py b/plotly/validators/choropleth/colorbar/title/font/_variant.py index e5eddd36b5..13d9cbf5ab 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_variant.py +++ b/plotly/validators/choropleth/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choropleth/colorbar/title/font/_weight.py b/plotly/validators/choropleth/colorbar/title/font/_weight.py index 7a9fd5f71f..2434678ebc 100644 --- a/plotly/validators/choropleth/colorbar/title/font/_weight.py +++ b/plotly/validators/choropleth/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choropleth.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choropleth/hoverlabel/__init__.py b/plotly/validators/choropleth/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/choropleth/hoverlabel/__init__.py +++ b/plotly/validators/choropleth/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/choropleth/hoverlabel/_align.py b/plotly/validators/choropleth/hoverlabel/_align.py index 7a49989309..ac043d1ccf 100644 --- a/plotly/validators/choropleth/hoverlabel/_align.py +++ b/plotly/validators/choropleth/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="choropleth.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/choropleth/hoverlabel/_alignsrc.py b/plotly/validators/choropleth/hoverlabel/_alignsrc.py index 4616498547..5a3c15d85c 100644 --- a/plotly/validators/choropleth/hoverlabel/_alignsrc.py +++ b/plotly/validators/choropleth/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="choropleth.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/_bgcolor.py b/plotly/validators/choropleth/hoverlabel/_bgcolor.py index 41377530fe..89b4cdf86b 100644 --- a/plotly/validators/choropleth/hoverlabel/_bgcolor.py +++ b/plotly/validators/choropleth/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="choropleth.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py b/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py index f8104c1384..bbdd718a5d 100644 --- a/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/choropleth/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="choropleth.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/_bordercolor.py b/plotly/validators/choropleth/hoverlabel/_bordercolor.py index 83da7cdb3c..0e5af978a6 100644 --- a/plotly/validators/choropleth/hoverlabel/_bordercolor.py +++ b/plotly/validators/choropleth/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choropleth.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py b/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py index d9d08a0e26..a4f53db462 100644 --- a/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/choropleth/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="choropleth.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/_font.py b/plotly/validators/choropleth/hoverlabel/_font.py index 60c62f076f..bff515577a 100644 --- a/plotly/validators/choropleth/hoverlabel/_font.py +++ b/plotly/validators/choropleth/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choropleth.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/choropleth/hoverlabel/_namelength.py b/plotly/validators/choropleth/hoverlabel/_namelength.py index 250baa5eba..b59a309d48 100644 --- a/plotly/validators/choropleth/hoverlabel/_namelength.py +++ b/plotly/validators/choropleth/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="choropleth.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py b/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py index 8bf1c0d704..640949397f 100644 --- a/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/choropleth/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="choropleth.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/__init__.py b/plotly/validators/choropleth/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/choropleth/hoverlabel/font/__init__.py +++ b/plotly/validators/choropleth/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choropleth/hoverlabel/font/_color.py b/plotly/validators/choropleth/hoverlabel/font/_color.py index ab7144e019..5c8ec00ec0 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_color.py +++ b/plotly/validators/choropleth/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py b/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py index 43d9bd9a03..d1d827fdb1 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_family.py b/plotly/validators/choropleth/hoverlabel/font/_family.py index baa4bbe2c7..4274e77c51 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_family.py +++ b/plotly/validators/choropleth/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/choropleth/hoverlabel/font/_familysrc.py b/plotly/validators/choropleth/hoverlabel/font/_familysrc.py index b34fe45177..5024100e96 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_familysrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_lineposition.py b/plotly/validators/choropleth/hoverlabel/font/_lineposition.py index 2c9a32d0aa..4c3ec1d31a 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_lineposition.py +++ b/plotly/validators/choropleth/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/choropleth/hoverlabel/font/_linepositionsrc.py b/plotly/validators/choropleth/hoverlabel/font/_linepositionsrc.py index 3c75a8d0dc..5c150324f4 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_shadow.py b/plotly/validators/choropleth/hoverlabel/font/_shadow.py index 21f410d145..741e2deaaa 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_shadow.py +++ b/plotly/validators/choropleth/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choropleth/hoverlabel/font/_shadowsrc.py b/plotly/validators/choropleth/hoverlabel/font/_shadowsrc.py index 01073e1357..3d9c7a1eb1 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_size.py b/plotly/validators/choropleth/hoverlabel/font/_size.py index a30f27bd5f..59d29973bf 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_size.py +++ b/plotly/validators/choropleth/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py b/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py index 9df299a3bc..2a00ae1db0 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_style.py b/plotly/validators/choropleth/hoverlabel/font/_style.py index 36ad00ae59..684a50fe8b 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_style.py +++ b/plotly/validators/choropleth/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/choropleth/hoverlabel/font/_stylesrc.py b/plotly/validators/choropleth/hoverlabel/font/_stylesrc.py index ed102052e7..cf057eee86 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_textcase.py b/plotly/validators/choropleth/hoverlabel/font/_textcase.py index 2d9539318f..e26148639e 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_textcase.py +++ b/plotly/validators/choropleth/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/choropleth/hoverlabel/font/_textcasesrc.py b/plotly/validators/choropleth/hoverlabel/font/_textcasesrc.py index a0f205eba6..dfcd9396da 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_variant.py b/plotly/validators/choropleth/hoverlabel/font/_variant.py index 700d8f8b38..18886ac8ba 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_variant.py +++ b/plotly/validators/choropleth/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/choropleth/hoverlabel/font/_variantsrc.py b/plotly/validators/choropleth/hoverlabel/font/_variantsrc.py index c03ef9d191..bc62531f1f 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/hoverlabel/font/_weight.py b/plotly/validators/choropleth/hoverlabel/font/_weight.py index 428fa8413b..f26aad9697 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_weight.py +++ b/plotly/validators/choropleth/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choropleth.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/choropleth/hoverlabel/font/_weightsrc.py b/plotly/validators/choropleth/hoverlabel/font/_weightsrc.py index 2775bc49b3..4aa1776a5d 100644 --- a/plotly/validators/choropleth/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/choropleth/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="choropleth.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/legendgrouptitle/__init__.py b/plotly/validators/choropleth/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/choropleth/legendgrouptitle/__init__.py +++ b/plotly/validators/choropleth/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/choropleth/legendgrouptitle/_font.py b/plotly/validators/choropleth/legendgrouptitle/_font.py index b0adf30906..2125f12060 100644 --- a/plotly/validators/choropleth/legendgrouptitle/_font.py +++ b/plotly/validators/choropleth/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choropleth.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choropleth/legendgrouptitle/_text.py b/plotly/validators/choropleth/legendgrouptitle/_text.py index dfb456a15f..21d65c0c1d 100644 --- a/plotly/validators/choropleth/legendgrouptitle/_text.py +++ b/plotly/validators/choropleth/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="choropleth.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/legendgrouptitle/font/__init__.py b/plotly/validators/choropleth/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/__init__.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_color.py b/plotly/validators/choropleth/legendgrouptitle/font/_color.py index c86bb9862e..49d1c487f7 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_color.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_family.py b/plotly/validators/choropleth/legendgrouptitle/font/_family.py index 2becb0c7ea..be9899197b 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_family.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_lineposition.py b/plotly/validators/choropleth/legendgrouptitle/font/_lineposition.py index 11338b6396..e067221a23 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_shadow.py b/plotly/validators/choropleth/legendgrouptitle/font/_shadow.py index 2686892d74..fd0b66b69d 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_size.py b/plotly/validators/choropleth/legendgrouptitle/font/_size.py index ecdb4eaf5d..022f6cc22d 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_size.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_style.py b/plotly/validators/choropleth/legendgrouptitle/font/_style.py index e67a564072..91914407db 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_style.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_textcase.py b/plotly/validators/choropleth/legendgrouptitle/font/_textcase.py index 1929650daa..bf005fbcbf 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_variant.py b/plotly/validators/choropleth/legendgrouptitle/font/_variant.py index c1f15750c5..e00146db21 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_variant.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/choropleth/legendgrouptitle/font/_weight.py b/plotly/validators/choropleth/legendgrouptitle/font/_weight.py index 258a65f2de..1a9fa78a43 100644 --- a/plotly/validators/choropleth/legendgrouptitle/font/_weight.py +++ b/plotly/validators/choropleth/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choropleth.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choropleth/marker/__init__.py b/plotly/validators/choropleth/marker/__init__.py index 711bedd189..3f0890dec8 100644 --- a/plotly/validators/choropleth/marker/__init__.py +++ b/plotly/validators/choropleth/marker/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + ], +) diff --git a/plotly/validators/choropleth/marker/_line.py b/plotly/validators/choropleth/marker/_line.py index 547bad0e28..890d8188f2 100644 --- a/plotly/validators/choropleth/marker/_line.py +++ b/plotly/validators/choropleth/marker/_line.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="choropleth.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/choropleth/marker/_opacity.py b/plotly/validators/choropleth/marker/_opacity.py index 4df13693bc..5769a21bb9 100644 --- a/plotly/validators/choropleth/marker/_opacity.py +++ b/plotly/validators/choropleth/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choropleth.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/choropleth/marker/_opacitysrc.py b/plotly/validators/choropleth/marker/_opacitysrc.py index 9771883a88..bdd9dbeae3 100644 --- a/plotly/validators/choropleth/marker/_opacitysrc.py +++ b/plotly/validators/choropleth/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="choropleth.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/marker/line/__init__.py b/plotly/validators/choropleth/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/choropleth/marker/line/__init__.py +++ b/plotly/validators/choropleth/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choropleth/marker/line/_color.py b/plotly/validators/choropleth/marker/line/_color.py index 3a3924f1de..3c82846c39 100644 --- a/plotly/validators/choropleth/marker/line/_color.py +++ b/plotly/validators/choropleth/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choropleth.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choropleth/marker/line/_colorsrc.py b/plotly/validators/choropleth/marker/line/_colorsrc.py index cfa763bed7..25dc82d40c 100644 --- a/plotly/validators/choropleth/marker/line/_colorsrc.py +++ b/plotly/validators/choropleth/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="choropleth.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/marker/line/_width.py b/plotly/validators/choropleth/marker/line/_width.py index 2cbdfbb624..5022a4b208 100644 --- a/plotly/validators/choropleth/marker/line/_width.py +++ b/plotly/validators/choropleth/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="choropleth.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choropleth/marker/line/_widthsrc.py b/plotly/validators/choropleth/marker/line/_widthsrc.py index 0d9d7dc919..df13d881b7 100644 --- a/plotly/validators/choropleth/marker/line/_widthsrc.py +++ b/plotly/validators/choropleth/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="choropleth.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choropleth/selected/__init__.py b/plotly/validators/choropleth/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/choropleth/selected/__init__.py +++ b/plotly/validators/choropleth/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/choropleth/selected/_marker.py b/plotly/validators/choropleth/selected/_marker.py index 48a15eec4d..f78a61e6c1 100644 --- a/plotly/validators/choropleth/selected/_marker.py +++ b/plotly/validators/choropleth/selected/_marker.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="choropleth.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the marker opacity of selected points. """, ), **kwargs, diff --git a/plotly/validators/choropleth/selected/marker/__init__.py b/plotly/validators/choropleth/selected/marker/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/choropleth/selected/marker/__init__.py +++ b/plotly/validators/choropleth/selected/marker/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/choropleth/selected/marker/_opacity.py b/plotly/validators/choropleth/selected/marker/_opacity.py index 0b98e257f8..71852907f7 100644 --- a/plotly/validators/choropleth/selected/marker/_opacity.py +++ b/plotly/validators/choropleth/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choropleth.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choropleth/stream/__init__.py b/plotly/validators/choropleth/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/choropleth/stream/__init__.py +++ b/plotly/validators/choropleth/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/choropleth/stream/_maxpoints.py b/plotly/validators/choropleth/stream/_maxpoints.py index 5035673027..ca47c85eb0 100644 --- a/plotly/validators/choropleth/stream/_maxpoints.py +++ b/plotly/validators/choropleth/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="choropleth.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choropleth/stream/_token.py b/plotly/validators/choropleth/stream/_token.py index b3fab49246..f7914c1ca6 100644 --- a/plotly/validators/choropleth/stream/_token.py +++ b/plotly/validators/choropleth/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="choropleth.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choropleth/unselected/__init__.py b/plotly/validators/choropleth/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/choropleth/unselected/__init__.py +++ b/plotly/validators/choropleth/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/choropleth/unselected/_marker.py b/plotly/validators/choropleth/unselected/_marker.py index 059e7cf4fc..cdff7e0f64 100644 --- a/plotly/validators/choropleth/unselected/_marker.py +++ b/plotly/validators/choropleth/unselected/_marker.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="choropleth.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/choropleth/unselected/marker/__init__.py b/plotly/validators/choropleth/unselected/marker/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/choropleth/unselected/marker/__init__.py +++ b/plotly/validators/choropleth/unselected/marker/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/choropleth/unselected/marker/_opacity.py b/plotly/validators/choropleth/unselected/marker/_opacity.py index 3146f089ad..cd1c04f891 100644 --- a/plotly/validators/choropleth/unselected/marker/_opacity.py +++ b/plotly/validators/choropleth/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choropleth.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmap/__init__.py b/plotly/validators/choroplethmap/__init__.py index 7fe8fbdc42..6cc11beb49 100644 --- a/plotly/validators/choroplethmap/__init__.py +++ b/plotly/validators/choroplethmap/__init__.py @@ -1,109 +1,57 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._reversescale import ReversescaleValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._geojson import GeojsonValidator - from ._featureidkey import FeatureidkeyValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._below import BelowValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._reversescale.ReversescaleValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._geojson.GeojsonValidator", - "._featureidkey.FeatureidkeyValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._below.BelowValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._reversescale.ReversescaleValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._below.BelowValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/choroplethmap/_autocolorscale.py b/plotly/validators/choroplethmap/_autocolorscale.py index ebc1688f03..7329938338 100644 --- a/plotly/validators/choroplethmap/_autocolorscale.py +++ b/plotly/validators/choroplethmap/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="choroplethmap", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choroplethmap/_below.py b/plotly/validators/choroplethmap/_below.py index 2f4097e7b8..ecf0e8cbb4 100644 --- a/plotly/validators/choroplethmap/_below.py +++ b/plotly/validators/choroplethmap/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="choroplethmap", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_coloraxis.py b/plotly/validators/choroplethmap/_coloraxis.py index d5acd98233..a4d61c9774 100644 --- a/plotly/validators/choroplethmap/_coloraxis.py +++ b/plotly/validators/choroplethmap/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="choroplethmap", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/choroplethmap/_colorbar.py b/plotly/validators/choroplethmap/_colorbar.py index 8ca58b0793..6b98f3557e 100644 --- a/plotly/validators/choroplethmap/_colorbar.py +++ b/plotly/validators/choroplethmap/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="choroplethmap", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - ethmap.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choroplethmap.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - choroplethmap.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmap.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_colorscale.py b/plotly/validators/choroplethmap/_colorscale.py index e0fb5b49ae..db500293fd 100644 --- a/plotly/validators/choroplethmap/_colorscale.py +++ b/plotly/validators/choroplethmap/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="choroplethmap", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/choroplethmap/_customdata.py b/plotly/validators/choroplethmap/_customdata.py index caa9f53299..5b7588350d 100644 --- a/plotly/validators/choroplethmap/_customdata.py +++ b/plotly/validators/choroplethmap/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="choroplethmap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_customdatasrc.py b/plotly/validators/choroplethmap/_customdatasrc.py index d5fc207ccb..46c44d0dd5 100644 --- a/plotly/validators/choroplethmap/_customdatasrc.py +++ b/plotly/validators/choroplethmap/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="choroplethmap", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_featureidkey.py b/plotly/validators/choroplethmap/_featureidkey.py index 01f865fe1d..18b54f20a1 100644 --- a/plotly/validators/choroplethmap/_featureidkey.py +++ b/plotly/validators/choroplethmap/_featureidkey.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): +class FeatureidkeyValidator(_bv.StringValidator): def __init__( self, plotly_name="featureidkey", parent_name="choroplethmap", **kwargs ): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_geojson.py b/plotly/validators/choroplethmap/_geojson.py index 9b557fae03..9a5d371a19 100644 --- a/plotly/validators/choroplethmap/_geojson.py +++ b/plotly/validators/choroplethmap/_geojson.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): +class GeojsonValidator(_bv.AnyValidator): def __init__(self, plotly_name="geojson", parent_name="choroplethmap", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_hoverinfo.py b/plotly/validators/choroplethmap/_hoverinfo.py index 0d3c691c0f..76a2310061 100644 --- a/plotly/validators/choroplethmap/_hoverinfo.py +++ b/plotly/validators/choroplethmap/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="choroplethmap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/choroplethmap/_hoverinfosrc.py b/plotly/validators/choroplethmap/_hoverinfosrc.py index 850589f59f..1186e36f74 100644 --- a/plotly/validators/choroplethmap/_hoverinfosrc.py +++ b/plotly/validators/choroplethmap/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="choroplethmap", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_hoverlabel.py b/plotly/validators/choroplethmap/_hoverlabel.py index 72cb56cbca..a490dce3bc 100644 --- a/plotly/validators/choroplethmap/_hoverlabel.py +++ b/plotly/validators/choroplethmap/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="choroplethmap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_hovertemplate.py b/plotly/validators/choroplethmap/_hovertemplate.py index a59b0cea05..e2d9e926bd 100644 --- a/plotly/validators/choroplethmap/_hovertemplate.py +++ b/plotly/validators/choroplethmap/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="choroplethmap", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmap/_hovertemplatesrc.py b/plotly/validators/choroplethmap/_hovertemplatesrc.py index 962b2d24fd..062d2ec19a 100644 --- a/plotly/validators/choroplethmap/_hovertemplatesrc.py +++ b/plotly/validators/choroplethmap/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="choroplethmap", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_hovertext.py b/plotly/validators/choroplethmap/_hovertext.py index 12edaf97e1..d6327ee3cf 100644 --- a/plotly/validators/choroplethmap/_hovertext.py +++ b/plotly/validators/choroplethmap/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="choroplethmap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choroplethmap/_hovertextsrc.py b/plotly/validators/choroplethmap/_hovertextsrc.py index 90c373d001..2c3f4d3cd8 100644 --- a/plotly/validators/choroplethmap/_hovertextsrc.py +++ b/plotly/validators/choroplethmap/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="choroplethmap", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_ids.py b/plotly/validators/choroplethmap/_ids.py index a5ef2862bf..025afeac2a 100644 --- a/plotly/validators/choroplethmap/_ids.py +++ b/plotly/validators/choroplethmap/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="choroplethmap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_idssrc.py b/plotly/validators/choroplethmap/_idssrc.py index 4b9d03020d..e263fae176 100644 --- a/plotly/validators/choroplethmap/_idssrc.py +++ b/plotly/validators/choroplethmap/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="choroplethmap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_legend.py b/plotly/validators/choroplethmap/_legend.py index 64129d0a7e..a4bd41540d 100644 --- a/plotly/validators/choroplethmap/_legend.py +++ b/plotly/validators/choroplethmap/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="choroplethmap", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/choroplethmap/_legendgroup.py b/plotly/validators/choroplethmap/_legendgroup.py index c7e157f35e..93edbabf59 100644 --- a/plotly/validators/choroplethmap/_legendgroup.py +++ b/plotly/validators/choroplethmap/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="choroplethmap", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_legendgrouptitle.py b/plotly/validators/choroplethmap/_legendgrouptitle.py index 8516009ff5..1e80529573 100644 --- a/plotly/validators/choroplethmap/_legendgrouptitle.py +++ b/plotly/validators/choroplethmap/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="choroplethmap", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_legendrank.py b/plotly/validators/choroplethmap/_legendrank.py index 4a98688346..c36e154b08 100644 --- a/plotly/validators/choroplethmap/_legendrank.py +++ b/plotly/validators/choroplethmap/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="choroplethmap", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_legendwidth.py b/plotly/validators/choroplethmap/_legendwidth.py index 756a339486..a8172cc2ee 100644 --- a/plotly/validators/choroplethmap/_legendwidth.py +++ b/plotly/validators/choroplethmap/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="choroplethmap", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/_locations.py b/plotly/validators/choroplethmap/_locations.py index ccf3870cb4..62037e2147 100644 --- a/plotly/validators/choroplethmap/_locations.py +++ b/plotly/validators/choroplethmap/_locations.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="locations", parent_name="choroplethmap", **kwargs): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_locationssrc.py b/plotly/validators/choroplethmap/_locationssrc.py index 7c393b055d..21c5f46800 100644 --- a/plotly/validators/choroplethmap/_locationssrc.py +++ b/plotly/validators/choroplethmap/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="choroplethmap", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_marker.py b/plotly/validators/choroplethmap/_marker.py index 50210d93eb..8b76019100 100644 --- a/plotly/validators/choroplethmap/_marker.py +++ b/plotly/validators/choroplethmap/_marker.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="choroplethmap", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.choroplethmap.mark - er.Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_meta.py b/plotly/validators/choroplethmap/_meta.py index e62758e024..719cba89ff 100644 --- a/plotly/validators/choroplethmap/_meta.py +++ b/plotly/validators/choroplethmap/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="choroplethmap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/choroplethmap/_metasrc.py b/plotly/validators/choroplethmap/_metasrc.py index 83646e8303..663c1a4b5b 100644 --- a/plotly/validators/choroplethmap/_metasrc.py +++ b/plotly/validators/choroplethmap/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="choroplethmap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_name.py b/plotly/validators/choroplethmap/_name.py index bd72135c23..d2d1094ab2 100644 --- a/plotly/validators/choroplethmap/_name.py +++ b/plotly/validators/choroplethmap/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="choroplethmap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_reversescale.py b/plotly/validators/choroplethmap/_reversescale.py index 6801b5302b..f0228e5955 100644 --- a/plotly/validators/choroplethmap/_reversescale.py +++ b/plotly/validators/choroplethmap/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="choroplethmap", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_selected.py b/plotly/validators/choroplethmap/_selected.py index 49c67ef10f..4594a851a1 100644 --- a/plotly/validators/choroplethmap/_selected.py +++ b/plotly/validators/choroplethmap/_selected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="choroplethmap", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.choroplethmap.sele - cted.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_selectedpoints.py b/plotly/validators/choroplethmap/_selectedpoints.py index 2b825a6ed1..d3d4ae393f 100644 --- a/plotly/validators/choroplethmap/_selectedpoints.py +++ b/plotly/validators/choroplethmap/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="choroplethmap", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_showlegend.py b/plotly/validators/choroplethmap/_showlegend.py index 5db21dfbe4..03b6be79dd 100644 --- a/plotly/validators/choroplethmap/_showlegend.py +++ b/plotly/validators/choroplethmap/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="choroplethmap", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_showscale.py b/plotly/validators/choroplethmap/_showscale.py index 78ca26be3b..8ddbdb8faf 100644 --- a/plotly/validators/choroplethmap/_showscale.py +++ b/plotly/validators/choroplethmap/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="choroplethmap", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_stream.py b/plotly/validators/choroplethmap/_stream.py index 96caf2388d..3464bc6819 100644 --- a/plotly/validators/choroplethmap/_stream.py +++ b/plotly/validators/choroplethmap/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="choroplethmap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_subplot.py b/plotly/validators/choroplethmap/_subplot.py index 8bf094f983..45d00a9c2c 100644 --- a/plotly/validators/choroplethmap/_subplot.py +++ b/plotly/validators/choroplethmap/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="choroplethmap", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "map"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choroplethmap/_text.py b/plotly/validators/choroplethmap/_text.py index f45483bba0..5889413006 100644 --- a/plotly/validators/choroplethmap/_text.py +++ b/plotly/validators/choroplethmap/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="choroplethmap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choroplethmap/_textsrc.py b/plotly/validators/choroplethmap/_textsrc.py index 096ecac752..acca4f5f81 100644 --- a/plotly/validators/choroplethmap/_textsrc.py +++ b/plotly/validators/choroplethmap/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="choroplethmap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_uid.py b/plotly/validators/choroplethmap/_uid.py index fb06eaebcf..298113be19 100644 --- a/plotly/validators/choroplethmap/_uid.py +++ b/plotly/validators/choroplethmap/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="choroplethmap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_uirevision.py b/plotly/validators/choroplethmap/_uirevision.py index 6852a67ae6..3e52fb6bd1 100644 --- a/plotly/validators/choroplethmap/_uirevision.py +++ b/plotly/validators/choroplethmap/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="choroplethmap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_unselected.py b/plotly/validators/choroplethmap/_unselected.py index b020b7a9b1..33d672a48e 100644 --- a/plotly/validators/choroplethmap/_unselected.py +++ b/plotly/validators/choroplethmap/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="choroplethmap", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.choroplethmap.unse - lected.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/_visible.py b/plotly/validators/choroplethmap/_visible.py index 52812d21f1..246e7045f3 100644 --- a/plotly/validators/choroplethmap/_visible.py +++ b/plotly/validators/choroplethmap/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="choroplethmap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/choroplethmap/_z.py b/plotly/validators/choroplethmap/_z.py index 6ad9ebe532..e4d958dd83 100644 --- a/plotly/validators/choroplethmap/_z.py +++ b/plotly/validators/choroplethmap/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="choroplethmap", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/_zauto.py b/plotly/validators/choroplethmap/_zauto.py index 1f99ccda3b..004092f6b0 100644 --- a/plotly/validators/choroplethmap/_zauto.py +++ b/plotly/validators/choroplethmap/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="choroplethmap", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choroplethmap/_zmax.py b/plotly/validators/choroplethmap/_zmax.py index 1928457587..923d62eacf 100644 --- a/plotly/validators/choroplethmap/_zmax.py +++ b/plotly/validators/choroplethmap/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="choroplethmap", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/choroplethmap/_zmid.py b/plotly/validators/choroplethmap/_zmid.py index b7126f60ff..ff3320a97b 100644 --- a/plotly/validators/choroplethmap/_zmid.py +++ b/plotly/validators/choroplethmap/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="choroplethmap", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choroplethmap/_zmin.py b/plotly/validators/choroplethmap/_zmin.py index 9e6949622c..829e914e06 100644 --- a/plotly/validators/choroplethmap/_zmin.py +++ b/plotly/validators/choroplethmap/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="choroplethmap", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/choroplethmap/_zsrc.py b/plotly/validators/choroplethmap/_zsrc.py index 2f134025da..a8926512cc 100644 --- a/plotly/validators/choroplethmap/_zsrc.py +++ b/plotly/validators/choroplethmap/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="choroplethmap", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/__init__.py b/plotly/validators/choroplethmap/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/choroplethmap/colorbar/__init__.py +++ b/plotly/validators/choroplethmap/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/choroplethmap/colorbar/_bgcolor.py b/plotly/validators/choroplethmap/colorbar/_bgcolor.py index df726700db..a3b0451082 100644 --- a/plotly/validators/choroplethmap/colorbar/_bgcolor.py +++ b/plotly/validators/choroplethmap/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="choroplethmap.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_bordercolor.py b/plotly/validators/choroplethmap/colorbar/_bordercolor.py index ae42bcce83..4dd5d04903 100644 --- a/plotly/validators/choroplethmap/colorbar/_bordercolor.py +++ b/plotly/validators/choroplethmap/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choroplethmap.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_borderwidth.py b/plotly/validators/choroplethmap/colorbar/_borderwidth.py index 15b47d8e69..c774256858 100644 --- a/plotly/validators/choroplethmap/colorbar/_borderwidth.py +++ b/plotly/validators/choroplethmap/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="choroplethmap.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_dtick.py b/plotly/validators/choroplethmap/colorbar/_dtick.py index 5668ced91a..47735466c6 100644 --- a/plotly/validators/choroplethmap/colorbar/_dtick.py +++ b/plotly/validators/choroplethmap/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="choroplethmap.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_exponentformat.py b/plotly/validators/choroplethmap/colorbar/_exponentformat.py index e278237f30..af237f0a9f 100644 --- a/plotly/validators/choroplethmap/colorbar/_exponentformat.py +++ b/plotly/validators/choroplethmap/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="choroplethmap.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_labelalias.py b/plotly/validators/choroplethmap/colorbar/_labelalias.py index 8b17bb9cf6..b223ee0e5a 100644 --- a/plotly/validators/choroplethmap/colorbar/_labelalias.py +++ b/plotly/validators/choroplethmap/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="choroplethmap.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_len.py b/plotly/validators/choroplethmap/colorbar/_len.py index f5076680b9..e882fba309 100644 --- a/plotly/validators/choroplethmap/colorbar/_len.py +++ b/plotly/validators/choroplethmap/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="choroplethmap.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_lenmode.py b/plotly/validators/choroplethmap/colorbar/_lenmode.py index 6a6ea32593..1645ea77bf 100644 --- a/plotly/validators/choroplethmap/colorbar/_lenmode.py +++ b/plotly/validators/choroplethmap/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="choroplethmap.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_minexponent.py b/plotly/validators/choroplethmap/colorbar/_minexponent.py index f74f6267d9..e358ebf30e 100644 --- a/plotly/validators/choroplethmap/colorbar/_minexponent.py +++ b/plotly/validators/choroplethmap/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="choroplethmap.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_nticks.py b/plotly/validators/choroplethmap/colorbar/_nticks.py index ece4fb4ccc..fe31cb5df9 100644 --- a/plotly/validators/choroplethmap/colorbar/_nticks.py +++ b/plotly/validators/choroplethmap/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="choroplethmap.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_orientation.py b/plotly/validators/choroplethmap/colorbar/_orientation.py index feff3920bc..858aaa921a 100644 --- a/plotly/validators/choroplethmap/colorbar/_orientation.py +++ b/plotly/validators/choroplethmap/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="choroplethmap.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_outlinecolor.py b/plotly/validators/choroplethmap/colorbar/_outlinecolor.py index 8db948e0c7..1ddcbebff0 100644 --- a/plotly/validators/choroplethmap/colorbar/_outlinecolor.py +++ b/plotly/validators/choroplethmap/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="choroplethmap.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_outlinewidth.py b/plotly/validators/choroplethmap/colorbar/_outlinewidth.py index 6bee1ad281..d57f6ca0c1 100644 --- a/plotly/validators/choroplethmap/colorbar/_outlinewidth.py +++ b/plotly/validators/choroplethmap/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="choroplethmap.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_separatethousands.py b/plotly/validators/choroplethmap/colorbar/_separatethousands.py index a319758bb6..63ccbf5be6 100644 --- a/plotly/validators/choroplethmap/colorbar/_separatethousands.py +++ b/plotly/validators/choroplethmap/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="choroplethmap.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_showexponent.py b/plotly/validators/choroplethmap/colorbar/_showexponent.py index 2804d8e6f5..9788d6d24b 100644 --- a/plotly/validators/choroplethmap/colorbar/_showexponent.py +++ b/plotly/validators/choroplethmap/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="choroplethmap.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_showticklabels.py b/plotly/validators/choroplethmap/colorbar/_showticklabels.py index 1bb1a56577..f079acbc8c 100644 --- a/plotly/validators/choroplethmap/colorbar/_showticklabels.py +++ b/plotly/validators/choroplethmap/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="choroplethmap.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_showtickprefix.py b/plotly/validators/choroplethmap/colorbar/_showtickprefix.py index 4faedc00f3..a1ce560ec6 100644 --- a/plotly/validators/choroplethmap/colorbar/_showtickprefix.py +++ b/plotly/validators/choroplethmap/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="choroplethmap.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_showticksuffix.py b/plotly/validators/choroplethmap/colorbar/_showticksuffix.py index bb1186be83..10d52afa89 100644 --- a/plotly/validators/choroplethmap/colorbar/_showticksuffix.py +++ b/plotly/validators/choroplethmap/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="choroplethmap.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_thickness.py b/plotly/validators/choroplethmap/colorbar/_thickness.py index bd92180faa..4231d770b5 100644 --- a/plotly/validators/choroplethmap/colorbar/_thickness.py +++ b/plotly/validators/choroplethmap/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="choroplethmap.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_thicknessmode.py b/plotly/validators/choroplethmap/colorbar/_thicknessmode.py index 7ca21d6b6e..dbd131740b 100644 --- a/plotly/validators/choroplethmap/colorbar/_thicknessmode.py +++ b/plotly/validators/choroplethmap/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="choroplethmap.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_tick0.py b/plotly/validators/choroplethmap/colorbar/_tick0.py index f0fa73390f..8c82f68ea8 100644 --- a/plotly/validators/choroplethmap/colorbar/_tick0.py +++ b/plotly/validators/choroplethmap/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="choroplethmap.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_tickangle.py b/plotly/validators/choroplethmap/colorbar/_tickangle.py index 2b81833c61..538ebbb228 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickangle.py +++ b/plotly/validators/choroplethmap/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_tickcolor.py b/plotly/validators/choroplethmap/colorbar/_tickcolor.py index 9f393f9c9a..8503f7eb55 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickcolor.py +++ b/plotly/validators/choroplethmap/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_tickfont.py b/plotly/validators/choroplethmap/colorbar/_tickfont.py index c44c26b6f1..1b5495d0ad 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickfont.py +++ b/plotly/validators/choroplethmap/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_tickformat.py b/plotly/validators/choroplethmap/colorbar/_tickformat.py index dd268512fd..ced5ecd5a8 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickformat.py +++ b/plotly/validators/choroplethmap/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_tickformatstopdefaults.py b/plotly/validators/choroplethmap/colorbar/_tickformatstopdefaults.py index afce1b37d9..f286f0d7c0 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/choroplethmap/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="choroplethmap.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/choroplethmap/colorbar/_tickformatstops.py b/plotly/validators/choroplethmap/colorbar/_tickformatstops.py index 249ae2b384..a910886c7c 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickformatstops.py +++ b/plotly/validators/choroplethmap/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="choroplethmap.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_ticklabeloverflow.py b/plotly/validators/choroplethmap/colorbar/_ticklabeloverflow.py index a51335a5e9..d5fd1cad8b 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/choroplethmap/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="choroplethmap.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_ticklabelposition.py b/plotly/validators/choroplethmap/colorbar/_ticklabelposition.py index 5e53a6b0a0..d8aace7c90 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticklabelposition.py +++ b/plotly/validators/choroplethmap/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="choroplethmap.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmap/colorbar/_ticklabelstep.py b/plotly/validators/choroplethmap/colorbar/_ticklabelstep.py index 2514fac94c..28816f27de 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticklabelstep.py +++ b/plotly/validators/choroplethmap/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="choroplethmap.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_ticklen.py b/plotly/validators/choroplethmap/colorbar/_ticklen.py index 5f5334905c..cfdc547aed 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticklen.py +++ b/plotly/validators/choroplethmap/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="choroplethmap.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_tickmode.py b/plotly/validators/choroplethmap/colorbar/_tickmode.py index 9f988e6423..2803df3791 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickmode.py +++ b/plotly/validators/choroplethmap/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/choroplethmap/colorbar/_tickprefix.py b/plotly/validators/choroplethmap/colorbar/_tickprefix.py index 52b93dc3d9..f5de7e7833 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickprefix.py +++ b/plotly/validators/choroplethmap/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_ticks.py b/plotly/validators/choroplethmap/colorbar/_ticks.py index 4e843ee5eb..9322a3d8f8 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticks.py +++ b/plotly/validators/choroplethmap/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="choroplethmap.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_ticksuffix.py b/plotly/validators/choroplethmap/colorbar/_ticksuffix.py index f7242b0cff..6b2e21d0b6 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticksuffix.py +++ b/plotly/validators/choroplethmap/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="choroplethmap.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_ticktext.py b/plotly/validators/choroplethmap/colorbar/_ticktext.py index 3d923ed603..3b17db701b 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticktext.py +++ b/plotly/validators/choroplethmap/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="choroplethmap.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_ticktextsrc.py b/plotly/validators/choroplethmap/colorbar/_ticktextsrc.py index 280426204b..5fa42315c3 100644 --- a/plotly/validators/choroplethmap/colorbar/_ticktextsrc.py +++ b/plotly/validators/choroplethmap/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="choroplethmap.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_tickvals.py b/plotly/validators/choroplethmap/colorbar/_tickvals.py index c470da7532..a9e5db7313 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickvals.py +++ b/plotly/validators/choroplethmap/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_tickvalssrc.py b/plotly/validators/choroplethmap/colorbar/_tickvalssrc.py index 524c84cecf..fa34312300 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickvalssrc.py +++ b/plotly/validators/choroplethmap/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_tickwidth.py b/plotly/validators/choroplethmap/colorbar/_tickwidth.py index 6edd12e931..d751f13920 100644 --- a/plotly/validators/choroplethmap/colorbar/_tickwidth.py +++ b/plotly/validators/choroplethmap/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="choroplethmap.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_title.py b/plotly/validators/choroplethmap/colorbar/_title.py index d8d7945bb4..8db0b2e56f 100644 --- a/plotly/validators/choroplethmap/colorbar/_title.py +++ b/plotly/validators/choroplethmap/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="choroplethmap.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_x.py b/plotly/validators/choroplethmap/colorbar/_x.py index 322e53a07a..4b583a769e 100644 --- a/plotly/validators/choroplethmap/colorbar/_x.py +++ b/plotly/validators/choroplethmap/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="choroplethmap.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_xanchor.py b/plotly/validators/choroplethmap/colorbar/_xanchor.py index e7c8569630..5c9d3a7aec 100644 --- a/plotly/validators/choroplethmap/colorbar/_xanchor.py +++ b/plotly/validators/choroplethmap/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="choroplethmap.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_xpad.py b/plotly/validators/choroplethmap/colorbar/_xpad.py index c0b4b74419..a14ebac2db 100644 --- a/plotly/validators/choroplethmap/colorbar/_xpad.py +++ b/plotly/validators/choroplethmap/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="choroplethmap.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_xref.py b/plotly/validators/choroplethmap/colorbar/_xref.py index 35860db609..8593061b13 100644 --- a/plotly/validators/choroplethmap/colorbar/_xref.py +++ b/plotly/validators/choroplethmap/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="choroplethmap.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_y.py b/plotly/validators/choroplethmap/colorbar/_y.py index 264b02436e..095fbb7151 100644 --- a/plotly/validators/choroplethmap/colorbar/_y.py +++ b/plotly/validators/choroplethmap/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="choroplethmap.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/_yanchor.py b/plotly/validators/choroplethmap/colorbar/_yanchor.py index 775e308c68..45a39e9d19 100644 --- a/plotly/validators/choroplethmap/colorbar/_yanchor.py +++ b/plotly/validators/choroplethmap/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="choroplethmap.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_ypad.py b/plotly/validators/choroplethmap/colorbar/_ypad.py index e4bd5a0376..3f540a6a76 100644 --- a/plotly/validators/choroplethmap/colorbar/_ypad.py +++ b/plotly/validators/choroplethmap/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="choroplethmap.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/_yref.py b/plotly/validators/choroplethmap/colorbar/_yref.py index 6b1f48879d..7a9f047b1e 100644 --- a/plotly/validators/choroplethmap/colorbar/_yref.py +++ b/plotly/validators/choroplethmap/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="choroplethmap.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/__init__.py b/plotly/validators/choroplethmap/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/__init__.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_color.py b/plotly/validators/choroplethmap/colorbar/tickfont/_color.py index 2cb4bb06bd..7218c96836 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_color.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_family.py b/plotly/validators/choroplethmap/colorbar/tickfont/_family.py index 5770789e29..c9fb092978 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_family.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_lineposition.py b/plotly/validators/choroplethmap/colorbar/tickfont/_lineposition.py index 1a730691b2..45b4bb94e0 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_shadow.py b/plotly/validators/choroplethmap/colorbar/tickfont/_shadow.py index 24dd884d76..86c6fe9107 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_shadow.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_size.py b/plotly/validators/choroplethmap/colorbar/tickfont/_size.py index 33854bfb4e..231aa54b22 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_size.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_style.py b/plotly/validators/choroplethmap/colorbar/tickfont/_style.py index 7f76437bbf..fa3c951ed6 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_style.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_textcase.py b/plotly/validators/choroplethmap/colorbar/tickfont/_textcase.py index 488b7b49b2..41cfaa96b7 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_textcase.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_variant.py b/plotly/validators/choroplethmap/colorbar/tickfont/_variant.py index fa4e8c751b..058d7cdcdc 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_variant.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmap/colorbar/tickfont/_weight.py b/plotly/validators/choroplethmap/colorbar/tickfont/_weight.py index 7b9654c231..e7ea700c39 100644 --- a/plotly/validators/choroplethmap/colorbar/tickfont/_weight.py +++ b/plotly/validators/choroplethmap/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmap.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choroplethmap/colorbar/tickformatstop/__init__.py b/plotly/validators/choroplethmap/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/choroplethmap/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/choroplethmap/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/choroplethmap/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/choroplethmap/colorbar/tickformatstop/_dtickrange.py index 2762d6e49d..e869e6a8a9 100644 --- a/plotly/validators/choroplethmap/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/choroplethmap/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="choroplethmap.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/choroplethmap/colorbar/tickformatstop/_enabled.py b/plotly/validators/choroplethmap/colorbar/tickformatstop/_enabled.py index 055162254a..3b71bee6d4 100644 --- a/plotly/validators/choroplethmap/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/choroplethmap/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="choroplethmap.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/tickformatstop/_name.py b/plotly/validators/choroplethmap/colorbar/tickformatstop/_name.py index 5e6ad9d1bb..d55772e73f 100644 --- a/plotly/validators/choroplethmap/colorbar/tickformatstop/_name.py +++ b/plotly/validators/choroplethmap/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="choroplethmap.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/choroplethmap/colorbar/tickformatstop/_templateitemname.py index 4a51c9fb50..e218d4f1a2 100644 --- a/plotly/validators/choroplethmap/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/choroplethmap/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="choroplethmap.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/tickformatstop/_value.py b/plotly/validators/choroplethmap/colorbar/tickformatstop/_value.py index e88fea5f54..246b8773d1 100644 --- a/plotly/validators/choroplethmap/colorbar/tickformatstop/_value.py +++ b/plotly/validators/choroplethmap/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="choroplethmap.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/title/__init__.py b/plotly/validators/choroplethmap/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/choroplethmap/colorbar/title/__init__.py +++ b/plotly/validators/choroplethmap/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/choroplethmap/colorbar/title/_font.py b/plotly/validators/choroplethmap/colorbar/title/_font.py index 0a3722c295..ecacb16df6 100644 --- a/plotly/validators/choroplethmap/colorbar/title/_font.py +++ b/plotly/validators/choroplethmap/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmap.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/title/_side.py b/plotly/validators/choroplethmap/colorbar/title/_side.py index a31a0993ae..8e3fea049b 100644 --- a/plotly/validators/choroplethmap/colorbar/title/_side.py +++ b/plotly/validators/choroplethmap/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="choroplethmap.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/title/_text.py b/plotly/validators/choroplethmap/colorbar/title/_text.py index fb6f397b88..212301de96 100644 --- a/plotly/validators/choroplethmap/colorbar/title/_text.py +++ b/plotly/validators/choroplethmap/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="choroplethmap.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/title/font/__init__.py b/plotly/validators/choroplethmap/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/__init__.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_color.py b/plotly/validators/choroplethmap/colorbar/title/font/_color.py index 8a245cae6d..76af96a79b 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_color.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_family.py b/plotly/validators/choroplethmap/colorbar/title/font/_family.py index f9203387d1..d26ca78bb1 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_family.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_lineposition.py b/plotly/validators/choroplethmap/colorbar/title/font/_lineposition.py index 4e33846f21..729f061010 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_lineposition.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_shadow.py b/plotly/validators/choroplethmap/colorbar/title/font/_shadow.py index 591d3eccd1..405ed41cf6 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_shadow.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_size.py b/plotly/validators/choroplethmap/colorbar/title/font/_size.py index 37864d5f7f..4c2acb8ca5 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_size.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_style.py b/plotly/validators/choroplethmap/colorbar/title/font/_style.py index d82b117014..0eacf58f62 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_style.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_textcase.py b/plotly/validators/choroplethmap/colorbar/title/font/_textcase.py index ee6548aeed..0c79ec89e8 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_textcase.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_variant.py b/plotly/validators/choroplethmap/colorbar/title/font/_variant.py index e43268cbe1..d7280d163c 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_variant.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmap/colorbar/title/font/_weight.py b/plotly/validators/choroplethmap/colorbar/title/font/_weight.py index dec306bb0c..067f737fdd 100644 --- a/plotly/validators/choroplethmap/colorbar/title/font/_weight.py +++ b/plotly/validators/choroplethmap/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmap.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choroplethmap/hoverlabel/__init__.py b/plotly/validators/choroplethmap/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/choroplethmap/hoverlabel/__init__.py +++ b/plotly/validators/choroplethmap/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/choroplethmap/hoverlabel/_align.py b/plotly/validators/choroplethmap/hoverlabel/_align.py index a08d98c2f1..1999c95a13 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_align.py +++ b/plotly/validators/choroplethmap/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="choroplethmap.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/choroplethmap/hoverlabel/_alignsrc.py b/plotly/validators/choroplethmap/hoverlabel/_alignsrc.py index 63e447fbbd..544b159607 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_alignsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="choroplethmap.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/_bgcolor.py b/plotly/validators/choroplethmap/hoverlabel/_bgcolor.py index d691048361..9fa4354112 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_bgcolor.py +++ b/plotly/validators/choroplethmap/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="choroplethmap.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmap/hoverlabel/_bgcolorsrc.py b/plotly/validators/choroplethmap/hoverlabel/_bgcolorsrc.py index f9fd747f1a..1cd3ebc60e 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="choroplethmap.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/_bordercolor.py b/plotly/validators/choroplethmap/hoverlabel/_bordercolor.py index adda912438..c33eff6584 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_bordercolor.py +++ b/plotly/validators/choroplethmap/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choroplethmap.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmap/hoverlabel/_bordercolorsrc.py b/plotly/validators/choroplethmap/hoverlabel/_bordercolorsrc.py index e8c8389420..b49a44398b 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="choroplethmap.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/_font.py b/plotly/validators/choroplethmap/hoverlabel/_font.py index 25e18797bf..3d79baf18f 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_font.py +++ b/plotly/validators/choroplethmap/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmap.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/hoverlabel/_namelength.py b/plotly/validators/choroplethmap/hoverlabel/_namelength.py index 4f55c65694..af5b0bc6b6 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_namelength.py +++ b/plotly/validators/choroplethmap/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="choroplethmap.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/choroplethmap/hoverlabel/_namelengthsrc.py b/plotly/validators/choroplethmap/hoverlabel/_namelengthsrc.py index 1f1daa5ce7..531be01e8c 100644 --- a/plotly/validators/choroplethmap/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="choroplethmap.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/__init__.py b/plotly/validators/choroplethmap/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/__init__.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_color.py b/plotly/validators/choroplethmap/hoverlabel/font/_color.py index c6c6741fed..8d7789b603 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_color.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmap.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_colorsrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_colorsrc.py index d5cd012c0e..f3e9edc40d 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_family.py b/plotly/validators/choroplethmap/hoverlabel/font/_family.py index 0e83ec6746..a1c2ae8df5 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_family.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_familysrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_familysrc.py index cb0f11cef8..188240223c 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_familysrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_lineposition.py b/plotly/validators/choroplethmap/hoverlabel/font/_lineposition.py index b84c4baa78..5b25d2596d 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_lineposition.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_linepositionsrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_linepositionsrc.py index 0779913198..7a77c51991 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_shadow.py b/plotly/validators/choroplethmap/hoverlabel/font/_shadow.py index 5bb7c0fb8d..07605603d1 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_shadow.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_shadowsrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_shadowsrc.py index d00c8eb5e9..76e1d60f43 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_size.py b/plotly/validators/choroplethmap/hoverlabel/font/_size.py index 630d7bc439..b4448ac972 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_size.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmap.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_sizesrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_sizesrc.py index ba124a4e3f..2a93687375 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_style.py b/plotly/validators/choroplethmap/hoverlabel/font/_style.py index 8a65fc04f7..856687623d 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_style.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmap.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_stylesrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_stylesrc.py index d070807285..3753ff8ec9 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_textcase.py b/plotly/validators/choroplethmap/hoverlabel/font/_textcase.py index e26a80a088..024c0fed50 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_textcase.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_textcasesrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_textcasesrc.py index 04da50d657..2ed77c3f47 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_variant.py b/plotly/validators/choroplethmap/hoverlabel/font/_variant.py index 4af5a45af9..3ec57d5b1f 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_variant.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_variantsrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_variantsrc.py index 8c115b6c7f..dde1d9f750 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_weight.py b/plotly/validators/choroplethmap/hoverlabel/font/_weight.py index 9466523ff7..f7d92e71ff 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_weight.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/choroplethmap/hoverlabel/font/_weightsrc.py b/plotly/validators/choroplethmap/hoverlabel/font/_weightsrc.py index d362c1e2c3..156e3ae12b 100644 --- a/plotly/validators/choroplethmap/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/choroplethmap/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="choroplethmap.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/legendgrouptitle/__init__.py b/plotly/validators/choroplethmap/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/__init__.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/choroplethmap/legendgrouptitle/_font.py b/plotly/validators/choroplethmap/legendgrouptitle/_font.py index d42f9cba57..d9da0eaa25 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/_font.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmap.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/legendgrouptitle/_text.py b/plotly/validators/choroplethmap/legendgrouptitle/_text.py index 5ad8e2f7e6..6ea1bacd90 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/_text.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="choroplethmap.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/__init__.py b/plotly/validators/choroplethmap/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/__init__.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_color.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_color.py index 50311a20f8..228780c53c 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_color.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_family.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_family.py index 5ad43c5895..94dd4410bb 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_family.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_lineposition.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_lineposition.py index d1a4c7c9fe..1d32454fc4 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_shadow.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_shadow.py index f85b590bcc..5d10f1fac5 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_size.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_size.py index 2093f3ec23..fcb2fe5bdd 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_size.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_style.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_style.py index d47d455058..fcd392a726 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_style.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_textcase.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_textcase.py index 972e6f77b9..e9b09fc604 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_variant.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_variant.py index 29faeacc5c..b39ca7b26e 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_variant.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmap/legendgrouptitle/font/_weight.py b/plotly/validators/choroplethmap/legendgrouptitle/font/_weight.py index 2d6abe7060..2d407b4e5b 100644 --- a/plotly/validators/choroplethmap/legendgrouptitle/font/_weight.py +++ b/plotly/validators/choroplethmap/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmap.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choroplethmap/marker/__init__.py b/plotly/validators/choroplethmap/marker/__init__.py index 711bedd189..3f0890dec8 100644 --- a/plotly/validators/choroplethmap/marker/__init__.py +++ b/plotly/validators/choroplethmap/marker/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + ], +) diff --git a/plotly/validators/choroplethmap/marker/_line.py b/plotly/validators/choroplethmap/marker/_line.py index 00ea39a850..f1ef49bf3b 100644 --- a/plotly/validators/choroplethmap/marker/_line.py +++ b/plotly/validators/choroplethmap/marker/_line.py @@ -1,33 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="choroplethmap.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/marker/_opacity.py b/plotly/validators/choroplethmap/marker/_opacity.py index f939eb7a53..737b9b36d6 100644 --- a/plotly/validators/choroplethmap/marker/_opacity.py +++ b/plotly/validators/choroplethmap/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choroplethmap.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/choroplethmap/marker/_opacitysrc.py b/plotly/validators/choroplethmap/marker/_opacitysrc.py index ecb9b792f9..2644c7cf9f 100644 --- a/plotly/validators/choroplethmap/marker/_opacitysrc.py +++ b/plotly/validators/choroplethmap/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="choroplethmap.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/marker/line/__init__.py b/plotly/validators/choroplethmap/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/choroplethmap/marker/line/__init__.py +++ b/plotly/validators/choroplethmap/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmap/marker/line/_color.py b/plotly/validators/choroplethmap/marker/line/_color.py index 606ea6c37a..16eb3c95a8 100644 --- a/plotly/validators/choroplethmap/marker/line/_color.py +++ b/plotly/validators/choroplethmap/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmap.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/choroplethmap/marker/line/_colorsrc.py b/plotly/validators/choroplethmap/marker/line/_colorsrc.py index d35b6eb7a3..6918c3aa66 100644 --- a/plotly/validators/choroplethmap/marker/line/_colorsrc.py +++ b/plotly/validators/choroplethmap/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="choroplethmap.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/marker/line/_width.py b/plotly/validators/choroplethmap/marker/line/_width.py index b80dbfe433..ff190503fe 100644 --- a/plotly/validators/choroplethmap/marker/line/_width.py +++ b/plotly/validators/choroplethmap/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="choroplethmap.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmap/marker/line/_widthsrc.py b/plotly/validators/choroplethmap/marker/line/_widthsrc.py index 68c948070d..faa6754b0d 100644 --- a/plotly/validators/choroplethmap/marker/line/_widthsrc.py +++ b/plotly/validators/choroplethmap/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="choroplethmap.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmap/selected/__init__.py b/plotly/validators/choroplethmap/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/choroplethmap/selected/__init__.py +++ b/plotly/validators/choroplethmap/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/choroplethmap/selected/_marker.py b/plotly/validators/choroplethmap/selected/_marker.py index 921dda5fcf..c06c9741b1 100644 --- a/plotly/validators/choroplethmap/selected/_marker.py +++ b/plotly/validators/choroplethmap/selected/_marker.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="choroplethmap.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the marker opacity of selected points. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/selected/marker/__init__.py b/plotly/validators/choroplethmap/selected/marker/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/choroplethmap/selected/marker/__init__.py +++ b/plotly/validators/choroplethmap/selected/marker/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/choroplethmap/selected/marker/_opacity.py b/plotly/validators/choroplethmap/selected/marker/_opacity.py index b5619ccf12..8372c09438 100644 --- a/plotly/validators/choroplethmap/selected/marker/_opacity.py +++ b/plotly/validators/choroplethmap/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choroplethmap.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmap/stream/__init__.py b/plotly/validators/choroplethmap/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/choroplethmap/stream/__init__.py +++ b/plotly/validators/choroplethmap/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/choroplethmap/stream/_maxpoints.py b/plotly/validators/choroplethmap/stream/_maxpoints.py index c530d6c733..6873a25c19 100644 --- a/plotly/validators/choroplethmap/stream/_maxpoints.py +++ b/plotly/validators/choroplethmap/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="choroplethmap.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmap/stream/_token.py b/plotly/validators/choroplethmap/stream/_token.py index 0839381016..db4b2fc4fb 100644 --- a/plotly/validators/choroplethmap/stream/_token.py +++ b/plotly/validators/choroplethmap/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="choroplethmap.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmap/unselected/__init__.py b/plotly/validators/choroplethmap/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/choroplethmap/unselected/__init__.py +++ b/plotly/validators/choroplethmap/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/choroplethmap/unselected/_marker.py b/plotly/validators/choroplethmap/unselected/_marker.py index 4b639b2885..b0fc463c45 100644 --- a/plotly/validators/choroplethmap/unselected/_marker.py +++ b/plotly/validators/choroplethmap/unselected/_marker.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="choroplethmap.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/choroplethmap/unselected/marker/__init__.py b/plotly/validators/choroplethmap/unselected/marker/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/choroplethmap/unselected/marker/__init__.py +++ b/plotly/validators/choroplethmap/unselected/marker/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/choroplethmap/unselected/marker/_opacity.py b/plotly/validators/choroplethmap/unselected/marker/_opacity.py index c8caeb42d6..e6251c4f4c 100644 --- a/plotly/validators/choroplethmap/unselected/marker/_opacity.py +++ b/plotly/validators/choroplethmap/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choroplethmap.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmapbox/__init__.py b/plotly/validators/choroplethmapbox/__init__.py index 7fe8fbdc42..6cc11beb49 100644 --- a/plotly/validators/choroplethmapbox/__init__.py +++ b/plotly/validators/choroplethmapbox/__init__.py @@ -1,109 +1,57 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._reversescale import ReversescaleValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._geojson import GeojsonValidator - from ._featureidkey import FeatureidkeyValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._below import BelowValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._reversescale.ReversescaleValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._geojson.GeojsonValidator", - "._featureidkey.FeatureidkeyValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._below.BelowValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._reversescale.ReversescaleValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._below.BelowValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/_autocolorscale.py b/plotly/validators/choroplethmapbox/_autocolorscale.py index f417a1edc9..fc25f1a279 100644 --- a/plotly/validators/choroplethmapbox/_autocolorscale.py +++ b/plotly/validators/choroplethmapbox/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="choroplethmapbox", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_below.py b/plotly/validators/choroplethmapbox/_below.py index 10817e9dea..a86aded18b 100644 --- a/plotly/validators/choroplethmapbox/_below.py +++ b/plotly/validators/choroplethmapbox/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="choroplethmapbox", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_coloraxis.py b/plotly/validators/choroplethmapbox/_coloraxis.py index 88a3a82580..9a93841a42 100644 --- a/plotly/validators/choroplethmapbox/_coloraxis.py +++ b/plotly/validators/choroplethmapbox/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="choroplethmapbox", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/choroplethmapbox/_colorbar.py b/plotly/validators/choroplethmapbox/_colorbar.py index 00157f0f71..d0f5e15a88 100644 --- a/plotly/validators/choroplethmapbox/_colorbar.py +++ b/plotly/validators/choroplethmapbox/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="choroplethmapbox", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.choropl - ethmapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.choroplethmapbox.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - choroplethmapbox.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.choroplethmapbox.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_colorscale.py b/plotly/validators/choroplethmapbox/_colorscale.py index d75a37e199..09f171935d 100644 --- a/plotly/validators/choroplethmapbox/_colorscale.py +++ b/plotly/validators/choroplethmapbox/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="choroplethmapbox", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_customdata.py b/plotly/validators/choroplethmapbox/_customdata.py index e9001026bc..3ed1438cc6 100644 --- a/plotly/validators/choroplethmapbox/_customdata.py +++ b/plotly/validators/choroplethmapbox/_customdata.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="customdata", parent_name="choroplethmapbox", **kwargs ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_customdatasrc.py b/plotly/validators/choroplethmapbox/_customdatasrc.py index 9d23916eaf..936a7d8945 100644 --- a/plotly/validators/choroplethmapbox/_customdatasrc.py +++ b/plotly/validators/choroplethmapbox/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="choroplethmapbox", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_featureidkey.py b/plotly/validators/choroplethmapbox/_featureidkey.py index b6bb2f692c..03e2d2d5e7 100644 --- a/plotly/validators/choroplethmapbox/_featureidkey.py +++ b/plotly/validators/choroplethmapbox/_featureidkey.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): +class FeatureidkeyValidator(_bv.StringValidator): def __init__( self, plotly_name="featureidkey", parent_name="choroplethmapbox", **kwargs ): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_geojson.py b/plotly/validators/choroplethmapbox/_geojson.py index 01a619246a..065236d984 100644 --- a/plotly/validators/choroplethmapbox/_geojson.py +++ b/plotly/validators/choroplethmapbox/_geojson.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): +class GeojsonValidator(_bv.AnyValidator): def __init__(self, plotly_name="geojson", parent_name="choroplethmapbox", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_hoverinfo.py b/plotly/validators/choroplethmapbox/_hoverinfo.py index 2994f34d2e..380bc2cf99 100644 --- a/plotly/validators/choroplethmapbox/_hoverinfo.py +++ b/plotly/validators/choroplethmapbox/_hoverinfo.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="hoverinfo", parent_name="choroplethmapbox", **kwargs ): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/choroplethmapbox/_hoverinfosrc.py b/plotly/validators/choroplethmapbox/_hoverinfosrc.py index 9ef099599b..5916d7dbcd 100644 --- a/plotly/validators/choroplethmapbox/_hoverinfosrc.py +++ b/plotly/validators/choroplethmapbox/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="choroplethmapbox", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_hoverlabel.py b/plotly/validators/choroplethmapbox/_hoverlabel.py index 7e424bb2a6..71624fbf72 100644 --- a/plotly/validators/choroplethmapbox/_hoverlabel.py +++ b/plotly/validators/choroplethmapbox/_hoverlabel.py @@ -1,52 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__( self, plotly_name="hoverlabel", parent_name="choroplethmapbox", **kwargs ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_hovertemplate.py b/plotly/validators/choroplethmapbox/_hovertemplate.py index 1d52384669..371eb6d5c5 100644 --- a/plotly/validators/choroplethmapbox/_hovertemplate.py +++ b/plotly/validators/choroplethmapbox/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="choroplethmapbox", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_hovertemplatesrc.py b/plotly/validators/choroplethmapbox/_hovertemplatesrc.py index 1522281d2d..28f7d49e19 100644 --- a/plotly/validators/choroplethmapbox/_hovertemplatesrc.py +++ b/plotly/validators/choroplethmapbox/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="choroplethmapbox", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_hovertext.py b/plotly/validators/choroplethmapbox/_hovertext.py index 9730982061..d0ec3d3a34 100644 --- a/plotly/validators/choroplethmapbox/_hovertext.py +++ b/plotly/validators/choroplethmapbox/_hovertext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertext", parent_name="choroplethmapbox", **kwargs ): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_hovertextsrc.py b/plotly/validators/choroplethmapbox/_hovertextsrc.py index 2900ca8228..4d0354cff3 100644 --- a/plotly/validators/choroplethmapbox/_hovertextsrc.py +++ b/plotly/validators/choroplethmapbox/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="choroplethmapbox", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_ids.py b/plotly/validators/choroplethmapbox/_ids.py index dacadd033c..165d0103c6 100644 --- a/plotly/validators/choroplethmapbox/_ids.py +++ b/plotly/validators/choroplethmapbox/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="choroplethmapbox", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_idssrc.py b/plotly/validators/choroplethmapbox/_idssrc.py index 1a78b60b66..15275d2168 100644 --- a/plotly/validators/choroplethmapbox/_idssrc.py +++ b/plotly/validators/choroplethmapbox/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="choroplethmapbox", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_legend.py b/plotly/validators/choroplethmapbox/_legend.py index 77edb93d07..3ce9131f0f 100644 --- a/plotly/validators/choroplethmapbox/_legend.py +++ b/plotly/validators/choroplethmapbox/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="choroplethmapbox", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_legendgroup.py b/plotly/validators/choroplethmapbox/_legendgroup.py index 4a800e9553..374cfdf265 100644 --- a/plotly/validators/choroplethmapbox/_legendgroup.py +++ b/plotly/validators/choroplethmapbox/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="choroplethmapbox", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_legendgrouptitle.py b/plotly/validators/choroplethmapbox/_legendgrouptitle.py index 4fd8739eb8..5e78bfb07a 100644 --- a/plotly/validators/choroplethmapbox/_legendgrouptitle.py +++ b/plotly/validators/choroplethmapbox/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="choroplethmapbox", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_legendrank.py b/plotly/validators/choroplethmapbox/_legendrank.py index 1f77eb2ace..450baf1a96 100644 --- a/plotly/validators/choroplethmapbox/_legendrank.py +++ b/plotly/validators/choroplethmapbox/_legendrank.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendrank", parent_name="choroplethmapbox", **kwargs ): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_legendwidth.py b/plotly/validators/choroplethmapbox/_legendwidth.py index a6f64e2644..6ebbab2b67 100644 --- a/plotly/validators/choroplethmapbox/_legendwidth.py +++ b/plotly/validators/choroplethmapbox/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="choroplethmapbox", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_locations.py b/plotly/validators/choroplethmapbox/_locations.py index 00aae1d30b..7b1f439932 100644 --- a/plotly/validators/choroplethmapbox/_locations.py +++ b/plotly/validators/choroplethmapbox/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="choroplethmapbox", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_locationssrc.py b/plotly/validators/choroplethmapbox/_locationssrc.py index 40f7990958..5b847cbbd7 100644 --- a/plotly/validators/choroplethmapbox/_locationssrc.py +++ b/plotly/validators/choroplethmapbox/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="choroplethmapbox", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_marker.py b/plotly/validators/choroplethmapbox/_marker.py index fe851e1707..0d5773ea64 100644 --- a/plotly/validators/choroplethmapbox/_marker.py +++ b/plotly/validators/choroplethmapbox/_marker.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="choroplethmapbox", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.choroplethmapbox.m - arker.Line` instance or dict with compatible - properties - opacity - Sets the opacity of the locations. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_meta.py b/plotly/validators/choroplethmapbox/_meta.py index 3f8fcb4df8..d129c4fd12 100644 --- a/plotly/validators/choroplethmapbox/_meta.py +++ b/plotly/validators/choroplethmapbox/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="choroplethmapbox", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_metasrc.py b/plotly/validators/choroplethmapbox/_metasrc.py index d524c0e0a5..10e05411fb 100644 --- a/plotly/validators/choroplethmapbox/_metasrc.py +++ b/plotly/validators/choroplethmapbox/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="choroplethmapbox", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_name.py b/plotly/validators/choroplethmapbox/_name.py index f7c2956ab2..168ba71cf5 100644 --- a/plotly/validators/choroplethmapbox/_name.py +++ b/plotly/validators/choroplethmapbox/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="choroplethmapbox", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_reversescale.py b/plotly/validators/choroplethmapbox/_reversescale.py index bf5fdf5293..a11835e67d 100644 --- a/plotly/validators/choroplethmapbox/_reversescale.py +++ b/plotly/validators/choroplethmapbox/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="choroplethmapbox", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_selected.py b/plotly/validators/choroplethmapbox/_selected.py index 41c73f36de..3163c5fafa 100644 --- a/plotly/validators/choroplethmapbox/_selected.py +++ b/plotly/validators/choroplethmapbox/_selected.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__( self, plotly_name="selected", parent_name="choroplethmapbox", **kwargs ): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.choroplethmapbox.s - elected.Marker` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_selectedpoints.py b/plotly/validators/choroplethmapbox/_selectedpoints.py index 40818a5ae8..673993b730 100644 --- a/plotly/validators/choroplethmapbox/_selectedpoints.py +++ b/plotly/validators/choroplethmapbox/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="choroplethmapbox", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_showlegend.py b/plotly/validators/choroplethmapbox/_showlegend.py index eb11282839..74d1bbab3c 100644 --- a/plotly/validators/choroplethmapbox/_showlegend.py +++ b/plotly/validators/choroplethmapbox/_showlegend.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlegend", parent_name="choroplethmapbox", **kwargs ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_showscale.py b/plotly/validators/choroplethmapbox/_showscale.py index fbe91bb804..3f7d41a36e 100644 --- a/plotly/validators/choroplethmapbox/_showscale.py +++ b/plotly/validators/choroplethmapbox/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="choroplethmapbox", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_stream.py b/plotly/validators/choroplethmapbox/_stream.py index b8802c8a13..20615b8766 100644 --- a/plotly/validators/choroplethmapbox/_stream.py +++ b/plotly/validators/choroplethmapbox/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="choroplethmapbox", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_subplot.py b/plotly/validators/choroplethmapbox/_subplot.py index a1affd05a0..a0f103c918 100644 --- a/plotly/validators/choroplethmapbox/_subplot.py +++ b/plotly/validators/choroplethmapbox/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="choroplethmapbox", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "mapbox"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_text.py b/plotly/validators/choroplethmapbox/_text.py index 51e4c73cad..37e3c09715 100644 --- a/plotly/validators/choroplethmapbox/_text.py +++ b/plotly/validators/choroplethmapbox/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="choroplethmapbox", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_textsrc.py b/plotly/validators/choroplethmapbox/_textsrc.py index 4d325ebba1..92d8a0308e 100644 --- a/plotly/validators/choroplethmapbox/_textsrc.py +++ b/plotly/validators/choroplethmapbox/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="choroplethmapbox", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_uid.py b/plotly/validators/choroplethmapbox/_uid.py index 810900f105..ac2856c5a9 100644 --- a/plotly/validators/choroplethmapbox/_uid.py +++ b/plotly/validators/choroplethmapbox/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="choroplethmapbox", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_uirevision.py b/plotly/validators/choroplethmapbox/_uirevision.py index 7383568b64..45aa358413 100644 --- a/plotly/validators/choroplethmapbox/_uirevision.py +++ b/plotly/validators/choroplethmapbox/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="choroplethmapbox", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_unselected.py b/plotly/validators/choroplethmapbox/_unselected.py index ef2cf3a2a5..769530acd6 100644 --- a/plotly/validators/choroplethmapbox/_unselected.py +++ b/plotly/validators/choroplethmapbox/_unselected.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__( self, plotly_name="unselected", parent_name="choroplethmapbox", **kwargs ): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.choroplethmapbox.u - nselected.Marker` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_visible.py b/plotly/validators/choroplethmapbox/_visible.py index c75e350312..55a4be2eb6 100644 --- a/plotly/validators/choroplethmapbox/_visible.py +++ b/plotly/validators/choroplethmapbox/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="choroplethmapbox", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_z.py b/plotly/validators/choroplethmapbox/_z.py index 8511fb22e3..1a45311473 100644 --- a/plotly/validators/choroplethmapbox/_z.py +++ b/plotly/validators/choroplethmapbox/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="choroplethmapbox", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/_zauto.py b/plotly/validators/choroplethmapbox/_zauto.py index 2ce01a4caf..123e14c5dd 100644 --- a/plotly/validators/choroplethmapbox/_zauto.py +++ b/plotly/validators/choroplethmapbox/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="choroplethmapbox", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_zmax.py b/plotly/validators/choroplethmapbox/_zmax.py index 4cf912d954..4319dc20a6 100644 --- a/plotly/validators/choroplethmapbox/_zmax.py +++ b/plotly/validators/choroplethmapbox/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="choroplethmapbox", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_zmid.py b/plotly/validators/choroplethmapbox/_zmid.py index 3982b10017..d43b896816 100644 --- a/plotly/validators/choroplethmapbox/_zmid.py +++ b/plotly/validators/choroplethmapbox/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="choroplethmapbox", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_zmin.py b/plotly/validators/choroplethmapbox/_zmin.py index 7ab9b76599..4585efa91a 100644 --- a/plotly/validators/choroplethmapbox/_zmin.py +++ b/plotly/validators/choroplethmapbox/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="choroplethmapbox", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/_zsrc.py b/plotly/validators/choroplethmapbox/_zsrc.py index 5e878d6aea..5432c2ac20 100644 --- a/plotly/validators/choroplethmapbox/_zsrc.py +++ b/plotly/validators/choroplethmapbox/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="choroplethmapbox", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/__init__.py b/plotly/validators/choroplethmapbox/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/choroplethmapbox/colorbar/__init__.py +++ b/plotly/validators/choroplethmapbox/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py b/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py index 7a94b87027..50126d38ed 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py +++ b/plotly/validators/choroplethmapbox/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py b/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py index 18927babfe..2a3d9bd2e0 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py +++ b/plotly/validators/choroplethmapbox/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py b/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py index 5242efc624..fc81f47496 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py +++ b/plotly/validators/choroplethmapbox/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_dtick.py b/plotly/validators/choroplethmapbox/colorbar/_dtick.py index 8dbe774f76..7713dc426f 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_dtick.py +++ b/plotly/validators/choroplethmapbox/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py b/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py index b0a571e639..09e90b4b42 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py +++ b/plotly/validators/choroplethmapbox/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_labelalias.py b/plotly/validators/choroplethmapbox/colorbar/_labelalias.py index 43b4e1e514..e10ae64adc 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_labelalias.py +++ b/plotly/validators/choroplethmapbox/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_len.py b/plotly/validators/choroplethmapbox/colorbar/_len.py index 0acf918744..caf77bf554 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_len.py +++ b/plotly/validators/choroplethmapbox/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_lenmode.py b/plotly/validators/choroplethmapbox/colorbar/_lenmode.py index a1903a3dae..e7b9944fd7 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_lenmode.py +++ b/plotly/validators/choroplethmapbox/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_minexponent.py b/plotly/validators/choroplethmapbox/colorbar/_minexponent.py index cc8afe6bbd..d01e3d0a4f 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_minexponent.py +++ b/plotly/validators/choroplethmapbox/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_nticks.py b/plotly/validators/choroplethmapbox/colorbar/_nticks.py index aa244104dc..7499425eb5 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_nticks.py +++ b/plotly/validators/choroplethmapbox/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_orientation.py b/plotly/validators/choroplethmapbox/colorbar/_orientation.py index 5d54e3ff89..bf75608fc2 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_orientation.py +++ b/plotly/validators/choroplethmapbox/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py b/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py index a92c79a39a..104975d509 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py +++ b/plotly/validators/choroplethmapbox/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py b/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py index 01367a0b93..11dc70c3b1 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py +++ b/plotly/validators/choroplethmapbox/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py b/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py index 445a896715..fefa8e9e90 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py +++ b/plotly/validators/choroplethmapbox/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_showexponent.py b/plotly/validators/choroplethmapbox/colorbar/_showexponent.py index ebcfb6f8f1..e5d13822fa 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_showexponent.py +++ b/plotly/validators/choroplethmapbox/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py b/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py index 5c0c22fb17..effbc51ae5 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py +++ b/plotly/validators/choroplethmapbox/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py b/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py index 9c836751d6..094a006d0e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py +++ b/plotly/validators/choroplethmapbox/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py b/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py index 17866b2499..13ccf24646 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py +++ b/plotly/validators/choroplethmapbox/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_thickness.py b/plotly/validators/choroplethmapbox/colorbar/_thickness.py index e956912ba8..a10e229e9d 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_thickness.py +++ b/plotly/validators/choroplethmapbox/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py b/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py index 1c03e06e39..6be0189f34 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py +++ b/plotly/validators/choroplethmapbox/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_tick0.py b/plotly/validators/choroplethmapbox/colorbar/_tick0.py index dfbc8918f5..11d62b914e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tick0.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickangle.py b/plotly/validators/choroplethmapbox/colorbar/_tickangle.py index 8b3292c5ce..ce2edd1245 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickangle.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py b/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py index 970bee6ba7..ed58fa7cd3 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickfont.py b/plotly/validators/choroplethmapbox/colorbar/_tickfont.py index a24e3fa7f9..5c0938e85e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickfont.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickformat.py b/plotly/validators/choroplethmapbox/colorbar/_tickformat.py index ca847b0e1b..5fff55e82a 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickformat.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py b/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py index 342a3b0bda..a99e83e317 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py b/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py index cf687a600c..ed825084fe 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticklabeloverflow.py b/plotly/validators/choroplethmapbox/colorbar/_ticklabeloverflow.py index 47b5afda2d..d44c815c7b 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py b/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py index 83fef37a19..b583480d4e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticklabelstep.py b/plotly/validators/choroplethmapbox/colorbar/_ticklabelstep.py index a42710a40d..99568a99c7 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticklabelstep.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticklen.py b/plotly/validators/choroplethmapbox/colorbar/_ticklen.py index fd1dd71ab2..80a1e4862c 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticklen.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickmode.py b/plotly/validators/choroplethmapbox/colorbar/_tickmode.py index cbdcad91dc..73865c9e04 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickmode.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py b/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py index 0d115ad05b..cb10c5e23a 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticks.py b/plotly/validators/choroplethmapbox/colorbar/_ticks.py index 2d21ca4996..9e642ac31e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticks.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py b/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py index 403ab10ae9..5e8ff1709e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticktext.py b/plotly/validators/choroplethmapbox/colorbar/_ticktext.py index 1e3949e617..3787075e58 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticktext.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py b/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py index 03ec18e361..45407f5b91 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickvals.py b/plotly/validators/choroplethmapbox/colorbar/_tickvals.py index 9d4080e438..df0584f2e2 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickvals.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py b/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py index 41d22a3687..732b4f4086 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="choroplethmapbox.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py b/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py index 671231f3a3..8a0555c7fc 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py +++ b/plotly/validators/choroplethmapbox/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_title.py b/plotly/validators/choroplethmapbox/colorbar/_title.py index ae0e94e9c9..41957f54f3 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_title.py +++ b/plotly/validators/choroplethmapbox/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_x.py b/plotly/validators/choroplethmapbox/colorbar/_x.py index 7f97f64a35..5004cc9043 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_x.py +++ b/plotly/validators/choroplethmapbox/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_xanchor.py b/plotly/validators/choroplethmapbox/colorbar/_xanchor.py index 1dd7fab973..72c7808b04 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_xanchor.py +++ b/plotly/validators/choroplethmapbox/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_xpad.py b/plotly/validators/choroplethmapbox/colorbar/_xpad.py index dcab51716f..b5e5eea480 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_xpad.py +++ b/plotly/validators/choroplethmapbox/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_xref.py b/plotly/validators/choroplethmapbox/colorbar/_xref.py index 68e6ce93e5..347df3b78a 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_xref.py +++ b/plotly/validators/choroplethmapbox/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_y.py b/plotly/validators/choroplethmapbox/colorbar/_y.py index 6045065c66..6e0eb5fded 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_y.py +++ b/plotly/validators/choroplethmapbox/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/_yanchor.py b/plotly/validators/choroplethmapbox/colorbar/_yanchor.py index 5592c4857f..601d237715 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_yanchor.py +++ b/plotly/validators/choroplethmapbox/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_ypad.py b/plotly/validators/choroplethmapbox/colorbar/_ypad.py index 2f3b5ec253..fc0444861b 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_ypad.py +++ b/plotly/validators/choroplethmapbox/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/_yref.py b/plotly/validators/choroplethmapbox/colorbar/_yref.py index dce38598a9..9bde96ef19 100644 --- a/plotly/validators/choroplethmapbox/colorbar/_yref.py +++ b/plotly/validators/choroplethmapbox/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="choroplethmapbox.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py index 21e8d444c6..77356dfae6 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py index e4f20bcbf6..8f42289fb0 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_lineposition.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_lineposition.py index 56bc389d21..2c349a7245 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_shadow.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_shadow.py index 1096ea6776..034b7d9efd 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_shadow.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py index d5315bef5a..a10db7d5c5 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_style.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_style.py index 22ef4d6c67..fb38ace86c 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_style.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_textcase.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_textcase.py index 99b6da10c6..6ee021ade1 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_textcase.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_variant.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_variant.py index f30724b5be..5ab63321f6 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_variant.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmapbox/colorbar/tickfont/_weight.py b/plotly/validators/choroplethmapbox/colorbar/tickfont/_weight.py index ecb0fcb989..4cd3c8ee7c 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickfont/_weight.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmapbox.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py index 767b80f91d..262bab6a2d 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="choroplethmapbox.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py index a9f8012ed9..0b452ecd00 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="choroplethmapbox.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py index 04acf77c21..ef688b8112 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="choroplethmapbox.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py index 0b693444e2..80265aac47 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="choroplethmapbox.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py index 302d0e03a9..968e563a04 100644 --- a/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py +++ b/plotly/validators/choroplethmapbox/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="choroplethmapbox.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/title/__init__.py b/plotly/validators/choroplethmapbox/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/__init__.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/choroplethmapbox/colorbar/title/_font.py b/plotly/validators/choroplethmapbox/colorbar/title/_font.py index 0380452190..1abc71da3d 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/_font.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmapbox.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/title/_side.py b/plotly/validators/choroplethmapbox/colorbar/title/_side.py index 5818896f14..0a0d4990f1 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/_side.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="choroplethmapbox.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/title/_text.py b/plotly/validators/choroplethmapbox/colorbar/title/_text.py index 154af5382c..dd2178788e 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/_text.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="choroplethmapbox.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py b/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py index 5eed83b481..33fb598d39 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py index 0736688c28..cb12ebcf71 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_lineposition.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_lineposition.py index fcaf4ad41e..afe1a0f5e1 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_lineposition.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_shadow.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_shadow.py index de87c8e4fa..99573ff6a5 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_shadow.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py index 0eecaff9d3..a2483dd17a 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_style.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_style.py index 69ab357620..507dd44ed2 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_style.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_textcase.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_textcase.py index 210550f3e8..240f84da06 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_textcase.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_variant.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_variant.py index 9991fa25f8..cec932a769 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_variant.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmapbox/colorbar/title/font/_weight.py b/plotly/validators/choroplethmapbox/colorbar/title/font/_weight.py index 6797a9ca1f..351bc4f867 100644 --- a/plotly/validators/choroplethmapbox/colorbar/title/font/_weight.py +++ b/plotly/validators/choroplethmapbox/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmapbox.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/__init__.py b/plotly/validators/choroplethmapbox/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/__init__.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_align.py b/plotly/validators/choroplethmapbox/hoverlabel/_align.py index 0e7ff425f5..6924d97f9b 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_align.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="choroplethmapbox.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py index 3d4cf0b79e..56b6dda2c6 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_alignsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="choroplethmapbox.hoverlabel", **kwargs, ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py b/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py index 17f61a20f8..86c031018a 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="choroplethmapbox.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py index 6908196697..bf71065c99 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_bgcolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="choroplethmapbox.hoverlabel", **kwargs, ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py b/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py index c7cc32e16b..9cd0cb51fb 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="choroplethmapbox.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py index 0c49731774..c0afa437b3 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="choroplethmapbox.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_font.py b/plotly/validators/choroplethmapbox/hoverlabel/_font.py index deb78cfa03..0862c1f13e 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_font.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmapbox.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py b/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py index 9eab58415b..fdac537549 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_namelength.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="choroplethmapbox.hoverlabel", **kwargs, ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py index b0173b3e2c..f0aebe164e 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="choroplethmapbox.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py b/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py index f941246c81..a7ae6fcc3a 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py index c6e0a26de3..626a53b733 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py index 9789a2ee34..1facc5d902 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py index ef9f61756d..63805bb013 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_lineposition.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_lineposition.py index 4cd48b565b..daba92df32 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_lineposition.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_linepositionsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_linepositionsrc.py index 50bcb9d786..17de610252 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_shadow.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_shadow.py index 2e00f0af83..40b914bdb9 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_shadow.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_shadowsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_shadowsrc.py index 4439ad22a3..e762c61315 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py index 4387553527..1ff6ba538f 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py index fc25b80b0e..bea7efd514 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_style.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_style.py index 817df04ef9..42d580c328 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_style.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_stylesrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_stylesrc.py index d6d3d50305..3c52eb1c7f 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_textcase.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_textcase.py index 355ddc941c..3d3978b455 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_textcase.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_textcasesrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_textcasesrc.py index c376a96d44..a7c3b0ef74 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_variant.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_variant.py index d24fe6cfc3..d9495252cf 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_variant.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_variantsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_variantsrc.py index f0cf771c3e..43da21f755 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_weight.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_weight.py index aaec3d4a94..b75dec1f80 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_weight.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/choroplethmapbox/hoverlabel/font/_weightsrc.py b/plotly/validators/choroplethmapbox/hoverlabel/font/_weightsrc.py index c64b572736..b276445114 100644 --- a/plotly/validators/choroplethmapbox/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/choroplethmapbox/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="choroplethmapbox.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/__init__.py b/plotly/validators/choroplethmapbox/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/__init__.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/_font.py b/plotly/validators/choroplethmapbox/legendgrouptitle/_font.py index fcade545c9..c3ccd145b0 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/_font.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="choroplethmapbox.legendgrouptitle", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/_text.py b/plotly/validators/choroplethmapbox/legendgrouptitle/_text.py index 583705963c..ad4efc924d 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/_text.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="choroplethmapbox.legendgrouptitle", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/__init__.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/__init__.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_color.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_color.py index 3387953587..ada1dfd18a 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_color.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_family.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_family.py index ac4c21c0cd..1f0094b249 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_family.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_lineposition.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_lineposition.py index 97910b5a94..c237d462c9 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_shadow.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_shadow.py index 2a619f712e..f6cd2a16ab 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_size.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_size.py index 72ead375c5..0925b9fbe3 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_size.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_style.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_style.py index e0178f19eb..0dba0b686e 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_style.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_textcase.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_textcase.py index 79780f5748..f5985f23d0 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_variant.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_variant.py index a863b5f895..615e6afbf4 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_variant.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_weight.py b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_weight.py index d05ccd5152..077b8df6ad 100644 --- a/plotly/validators/choroplethmapbox/legendgrouptitle/font/_weight.py +++ b/plotly/validators/choroplethmapbox/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="choroplethmapbox.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/choroplethmapbox/marker/__init__.py b/plotly/validators/choroplethmapbox/marker/__init__.py index 711bedd189..3f0890dec8 100644 --- a/plotly/validators/choroplethmapbox/marker/__init__.py +++ b/plotly/validators/choroplethmapbox/marker/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/marker/_line.py b/plotly/validators/choroplethmapbox/marker/_line.py index e65e9449ef..133acc2c71 100644 --- a/plotly/validators/choroplethmapbox/marker/_line.py +++ b/plotly/validators/choroplethmapbox/marker/_line.py @@ -1,33 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="choroplethmapbox.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/marker/_opacity.py b/plotly/validators/choroplethmapbox/marker/_opacity.py index 261c3edca8..11a9f67d9f 100644 --- a/plotly/validators/choroplethmapbox/marker/_opacity.py +++ b/plotly/validators/choroplethmapbox/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choroplethmapbox.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/choroplethmapbox/marker/_opacitysrc.py b/plotly/validators/choroplethmapbox/marker/_opacitysrc.py index 3c6e04b19d..31becc6a35 100644 --- a/plotly/validators/choroplethmapbox/marker/_opacitysrc.py +++ b/plotly/validators/choroplethmapbox/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="choroplethmapbox.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/marker/line/__init__.py b/plotly/validators/choroplethmapbox/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/choroplethmapbox/marker/line/__init__.py +++ b/plotly/validators/choroplethmapbox/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/choroplethmapbox/marker/line/_color.py b/plotly/validators/choroplethmapbox/marker/line/_color.py index ca9c031f3f..1b4468a6df 100644 --- a/plotly/validators/choroplethmapbox/marker/line/_color.py +++ b/plotly/validators/choroplethmapbox/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="choroplethmapbox.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py b/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py index 6d1dc7538d..fba1b1dd83 100644 --- a/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py +++ b/plotly/validators/choroplethmapbox/marker/line/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="choroplethmapbox.marker.line", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/marker/line/_width.py b/plotly/validators/choroplethmapbox/marker/line/_width.py index 3753f152d7..a434eedfb3 100644 --- a/plotly/validators/choroplethmapbox/marker/line/_width.py +++ b/plotly/validators/choroplethmapbox/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="choroplethmapbox.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py b/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py index a7af1a0717..183b42d43d 100644 --- a/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py +++ b/plotly/validators/choroplethmapbox/marker/line/_widthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="choroplethmapbox.marker.line", **kwargs, ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/choroplethmapbox/selected/__init__.py b/plotly/validators/choroplethmapbox/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/choroplethmapbox/selected/__init__.py +++ b/plotly/validators/choroplethmapbox/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/choroplethmapbox/selected/_marker.py b/plotly/validators/choroplethmapbox/selected/_marker.py index f66f7181a6..458bd96a7a 100644 --- a/plotly/validators/choroplethmapbox/selected/_marker.py +++ b/plotly/validators/choroplethmapbox/selected/_marker.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="choroplethmapbox.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the marker opacity of selected points. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/selected/marker/__init__.py b/plotly/validators/choroplethmapbox/selected/marker/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/choroplethmapbox/selected/marker/__init__.py +++ b/plotly/validators/choroplethmapbox/selected/marker/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/choroplethmapbox/selected/marker/_opacity.py b/plotly/validators/choroplethmapbox/selected/marker/_opacity.py index 9cf9d8c1c8..5c7c8c0b14 100644 --- a/plotly/validators/choroplethmapbox/selected/marker/_opacity.py +++ b/plotly/validators/choroplethmapbox/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choroplethmapbox.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmapbox/stream/__init__.py b/plotly/validators/choroplethmapbox/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/choroplethmapbox/stream/__init__.py +++ b/plotly/validators/choroplethmapbox/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/choroplethmapbox/stream/_maxpoints.py b/plotly/validators/choroplethmapbox/stream/_maxpoints.py index 13ea5763ae..55872a45ef 100644 --- a/plotly/validators/choroplethmapbox/stream/_maxpoints.py +++ b/plotly/validators/choroplethmapbox/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="choroplethmapbox.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/choroplethmapbox/stream/_token.py b/plotly/validators/choroplethmapbox/stream/_token.py index 2da96f5db7..e3e7af1cfd 100644 --- a/plotly/validators/choroplethmapbox/stream/_token.py +++ b/plotly/validators/choroplethmapbox/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="choroplethmapbox.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/choroplethmapbox/unselected/__init__.py b/plotly/validators/choroplethmapbox/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/choroplethmapbox/unselected/__init__.py +++ b/plotly/validators/choroplethmapbox/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/choroplethmapbox/unselected/_marker.py b/plotly/validators/choroplethmapbox/unselected/_marker.py index 10ae2f9cb7..46dd83befb 100644 --- a/plotly/validators/choroplethmapbox/unselected/_marker.py +++ b/plotly/validators/choroplethmapbox/unselected/_marker.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="choroplethmapbox.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/choroplethmapbox/unselected/marker/__init__.py b/plotly/validators/choroplethmapbox/unselected/marker/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/choroplethmapbox/unselected/marker/__init__.py +++ b/plotly/validators/choroplethmapbox/unselected/marker/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py b/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py index ae1ad27234..2ad2fe2495 100644 --- a/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py +++ b/plotly/validators/choroplethmapbox/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="choroplethmapbox.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/__init__.py b/plotly/validators/cone/__init__.py index 4d36d20a24..7d1632100c 100644 --- a/plotly/validators/cone/__init__.py +++ b/plotly/validators/cone/__init__.py @@ -1,135 +1,70 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._x import XValidator - from ._wsrc import WsrcValidator - from ._whoverformat import WhoverformatValidator - from ._w import WValidator - from ._vsrc import VsrcValidator - from ._visible import VisibleValidator - from ._vhoverformat import VhoverformatValidator - from ._v import VValidator - from ._usrc import UsrcValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._uhoverformat import UhoverformatValidator - from ._u import UValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lightposition import LightpositionValidator - from ._lighting import LightingValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anchor import AnchorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._x.XValidator", - "._wsrc.WsrcValidator", - "._whoverformat.WhoverformatValidator", - "._w.WValidator", - "._vsrc.VsrcValidator", - "._visible.VisibleValidator", - "._vhoverformat.VhoverformatValidator", - "._v.VValidator", - "._usrc.UsrcValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._uhoverformat.UhoverformatValidator", - "._u.UValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lightposition.LightpositionValidator", - "._lighting.LightingValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anchor.AnchorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._x.XValidator", + "._wsrc.WsrcValidator", + "._whoverformat.WhoverformatValidator", + "._w.WValidator", + "._vsrc.VsrcValidator", + "._visible.VisibleValidator", + "._vhoverformat.VhoverformatValidator", + "._v.VValidator", + "._usrc.UsrcValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._uhoverformat.UhoverformatValidator", + "._u.UValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anchor.AnchorValidator", + ], +) diff --git a/plotly/validators/cone/_anchor.py b/plotly/validators/cone/_anchor.py index d7f0e0d12e..fbcb988e4f 100644 --- a/plotly/validators/cone/_anchor.py +++ b/plotly/validators/cone/_anchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="anchor", parent_name="cone", **kwargs): - super(AnchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["tip", "tail", "cm", "center"]), **kwargs, diff --git a/plotly/validators/cone/_autocolorscale.py b/plotly/validators/cone/_autocolorscale.py index 6f1d4c685c..bf915d5ea8 100644 --- a/plotly/validators/cone/_autocolorscale.py +++ b/plotly/validators/cone/_autocolorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="cone", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/cone/_cauto.py b/plotly/validators/cone/_cauto.py index 55a5e5a0af..b5c272c806 100644 --- a/plotly/validators/cone/_cauto.py +++ b/plotly/validators/cone/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="cone", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/cone/_cmax.py b/plotly/validators/cone/_cmax.py index 2d7c0b69bb..64b42873d5 100644 --- a/plotly/validators/cone/_cmax.py +++ b/plotly/validators/cone/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="cone", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/cone/_cmid.py b/plotly/validators/cone/_cmid.py index 3e2ebf00b7..9eda52d4e4 100644 --- a/plotly/validators/cone/_cmid.py +++ b/plotly/validators/cone/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="cone", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/cone/_cmin.py b/plotly/validators/cone/_cmin.py index 896207d567..bddbdfcdc0 100644 --- a/plotly/validators/cone/_cmin.py +++ b/plotly/validators/cone/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="cone", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/cone/_coloraxis.py b/plotly/validators/cone/_coloraxis.py index 17cc8e488b..1ffc7dd3d0 100644 --- a/plotly/validators/cone/_coloraxis.py +++ b/plotly/validators/cone/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="cone", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/cone/_colorbar.py b/plotly/validators/cone/_colorbar.py index 4c962146ae..7d94552aad 100644 --- a/plotly/validators/cone/_colorbar.py +++ b/plotly/validators/cone/_colorbar.py @@ -1,277 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="cone", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.cone.co - lorbar.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.cone.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of cone.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.cone.colorbar.Titl - e` instance or dict with compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/cone/_colorscale.py b/plotly/validators/cone/_colorscale.py index 02802b4c3e..14546e9a9f 100644 --- a/plotly/validators/cone/_colorscale.py +++ b/plotly/validators/cone/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="cone", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/cone/_customdata.py b/plotly/validators/cone/_customdata.py index d4c111ce8c..0fc58a28cd 100644 --- a/plotly/validators/cone/_customdata.py +++ b/plotly/validators/cone/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="cone", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/cone/_customdatasrc.py b/plotly/validators/cone/_customdatasrc.py index b9f520f54f..b66e0ed4f7 100644 --- a/plotly/validators/cone/_customdatasrc.py +++ b/plotly/validators/cone/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="cone", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_hoverinfo.py b/plotly/validators/cone/_hoverinfo.py index 37a7fd5f02..aa1cd0ff11 100644 --- a/plotly/validators/cone/_hoverinfo.py +++ b/plotly/validators/cone/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="cone", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/cone/_hoverinfosrc.py b/plotly/validators/cone/_hoverinfosrc.py index 48110ff964..9c669ce3ed 100644 --- a/plotly/validators/cone/_hoverinfosrc.py +++ b/plotly/validators/cone/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="cone", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_hoverlabel.py b/plotly/validators/cone/_hoverlabel.py index 7105913c5e..d576e0712f 100644 --- a/plotly/validators/cone/_hoverlabel.py +++ b/plotly/validators/cone/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="cone", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/cone/_hovertemplate.py b/plotly/validators/cone/_hovertemplate.py index aa0bcd6ad2..f01ea95702 100644 --- a/plotly/validators/cone/_hovertemplate.py +++ b/plotly/validators/cone/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="cone", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/cone/_hovertemplatesrc.py b/plotly/validators/cone/_hovertemplatesrc.py index 9ec2ca4864..5c585eec37 100644 --- a/plotly/validators/cone/_hovertemplatesrc.py +++ b/plotly/validators/cone/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="cone", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_hovertext.py b/plotly/validators/cone/_hovertext.py index 4e714a3585..8033aad555 100644 --- a/plotly/validators/cone/_hovertext.py +++ b/plotly/validators/cone/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="cone", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/cone/_hovertextsrc.py b/plotly/validators/cone/_hovertextsrc.py index f7393f6de5..13eec247e5 100644 --- a/plotly/validators/cone/_hovertextsrc.py +++ b/plotly/validators/cone/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="cone", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_ids.py b/plotly/validators/cone/_ids.py index 3d0741f375..d012d212c1 100644 --- a/plotly/validators/cone/_ids.py +++ b/plotly/validators/cone/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="cone", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/cone/_idssrc.py b/plotly/validators/cone/_idssrc.py index f8fa113c33..cf94985356 100644 --- a/plotly/validators/cone/_idssrc.py +++ b/plotly/validators/cone/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="cone", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_legend.py b/plotly/validators/cone/_legend.py index 9093a9caa2..3f7b2da9d4 100644 --- a/plotly/validators/cone/_legend.py +++ b/plotly/validators/cone/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="cone", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/cone/_legendgroup.py b/plotly/validators/cone/_legendgroup.py index 1031225875..0157ef4e18 100644 --- a/plotly/validators/cone/_legendgroup.py +++ b/plotly/validators/cone/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="cone", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/_legendgrouptitle.py b/plotly/validators/cone/_legendgrouptitle.py index 891c1ef85e..88bb65666d 100644 --- a/plotly/validators/cone/_legendgrouptitle.py +++ b/plotly/validators/cone/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="cone", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/cone/_legendrank.py b/plotly/validators/cone/_legendrank.py index b5507d457f..7ba186d37f 100644 --- a/plotly/validators/cone/_legendrank.py +++ b/plotly/validators/cone/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="cone", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/_legendwidth.py b/plotly/validators/cone/_legendwidth.py index 5fe9fbfa85..0f3a323922 100644 --- a/plotly/validators/cone/_legendwidth.py +++ b/plotly/validators/cone/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="cone", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/_lighting.py b/plotly/validators/cone/_lighting.py index a6897f1cf0..b3043e689c 100644 --- a/plotly/validators/cone/_lighting.py +++ b/plotly/validators/cone/_lighting.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lighting", parent_name="cone", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lighting"), data_docs=kwargs.pop( "data_docs", """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. """, ), **kwargs, diff --git a/plotly/validators/cone/_lightposition.py b/plotly/validators/cone/_lightposition.py index 88c04133b3..350150964f 100644 --- a/plotly/validators/cone/_lightposition.py +++ b/plotly/validators/cone/_lightposition.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightpositionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="cone", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lightposition"), data_docs=kwargs.pop( "data_docs", """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. """, ), **kwargs, diff --git a/plotly/validators/cone/_meta.py b/plotly/validators/cone/_meta.py index e38247aa6d..5325c91cca 100644 --- a/plotly/validators/cone/_meta.py +++ b/plotly/validators/cone/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="cone", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/cone/_metasrc.py b/plotly/validators/cone/_metasrc.py index 30fb8dd092..a5cc3e490b 100644 --- a/plotly/validators/cone/_metasrc.py +++ b/plotly/validators/cone/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="cone", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_name.py b/plotly/validators/cone/_name.py index 3e7fd95b72..c97bb2f8c8 100644 --- a/plotly/validators/cone/_name.py +++ b/plotly/validators/cone/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="cone", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/_opacity.py b/plotly/validators/cone/_opacity.py index 344823463a..00ab249c11 100644 --- a/plotly/validators/cone/_opacity.py +++ b/plotly/validators/cone/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="cone", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/_reversescale.py b/plotly/validators/cone/_reversescale.py index dcfaeb579b..04972e6602 100644 --- a/plotly/validators/cone/_reversescale.py +++ b/plotly/validators/cone/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="cone", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/cone/_scene.py b/plotly/validators/cone/_scene.py index f7a60f764b..0bfb491982 100644 --- a/plotly/validators/cone/_scene.py +++ b/plotly/validators/cone/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="cone", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/cone/_showlegend.py b/plotly/validators/cone/_showlegend.py index d928c8388a..c0e674c01e 100644 --- a/plotly/validators/cone/_showlegend.py +++ b/plotly/validators/cone/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="cone", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/_showscale.py b/plotly/validators/cone/_showscale.py index e9efe817de..b48f5f0255 100644 --- a/plotly/validators/cone/_showscale.py +++ b/plotly/validators/cone/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="cone", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/cone/_sizemode.py b/plotly/validators/cone/_sizemode.py index 5bfc57b487..686a08bed3 100644 --- a/plotly/validators/cone/_sizemode.py +++ b/plotly/validators/cone/_sizemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="sizemode", parent_name="cone", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["scaled", "absolute", "raw"]), **kwargs, diff --git a/plotly/validators/cone/_sizeref.py b/plotly/validators/cone/_sizeref.py index 6f5f60e84b..e6920a2a22 100644 --- a/plotly/validators/cone/_sizeref.py +++ b/plotly/validators/cone/_sizeref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="cone", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/_stream.py b/plotly/validators/cone/_stream.py index 7dc54c095a..c6b92aaefb 100644 --- a/plotly/validators/cone/_stream.py +++ b/plotly/validators/cone/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="cone", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/cone/_text.py b/plotly/validators/cone/_text.py index c8d15062cf..755192e1e5 100644 --- a/plotly/validators/cone/_text.py +++ b/plotly/validators/cone/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="cone", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/cone/_textsrc.py b/plotly/validators/cone/_textsrc.py index 721fa8c210..3a5a957403 100644 --- a/plotly/validators/cone/_textsrc.py +++ b/plotly/validators/cone/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="cone", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_u.py b/plotly/validators/cone/_u.py index e1276f326b..1955ea7e32 100644 --- a/plotly/validators/cone/_u.py +++ b/plotly/validators/cone/_u.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UValidator(_plotly_utils.basevalidators.DataArrayValidator): +class UValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="u", parent_name="cone", **kwargs): - super(UValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/cone/_uhoverformat.py b/plotly/validators/cone/_uhoverformat.py index 7434944295..7081531624 100644 --- a/plotly/validators/cone/_uhoverformat.py +++ b/plotly/validators/cone/_uhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class UhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="uhoverformat", parent_name="cone", **kwargs): - super(UhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_uid.py b/plotly/validators/cone/_uid.py index 5f6884653d..a9640c4540 100644 --- a/plotly/validators/cone/_uid.py +++ b/plotly/validators/cone/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="cone", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/cone/_uirevision.py b/plotly/validators/cone/_uirevision.py index 8962d8d3a0..1b01ff7ce2 100644 --- a/plotly/validators/cone/_uirevision.py +++ b/plotly/validators/cone/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="cone", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_usrc.py b/plotly/validators/cone/_usrc.py index b3f75fb6fa..28bd3ae132 100644 --- a/plotly/validators/cone/_usrc.py +++ b/plotly/validators/cone/_usrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class UsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="usrc", parent_name="cone", **kwargs): - super(UsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_v.py b/plotly/validators/cone/_v.py index 645be3a8f5..658a755980 100644 --- a/plotly/validators/cone/_v.py +++ b/plotly/validators/cone/_v.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VValidator(_plotly_utils.basevalidators.DataArrayValidator): +class VValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="v", parent_name="cone", **kwargs): - super(VValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/cone/_vhoverformat.py b/plotly/validators/cone/_vhoverformat.py index 1dff27e9f6..acf88afcf0 100644 --- a/plotly/validators/cone/_vhoverformat.py +++ b/plotly/validators/cone/_vhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class VhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="vhoverformat", parent_name="cone", **kwargs): - super(VhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_visible.py b/plotly/validators/cone/_visible.py index 5b057de862..336c666651 100644 --- a/plotly/validators/cone/_visible.py +++ b/plotly/validators/cone/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="cone", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/cone/_vsrc.py b/plotly/validators/cone/_vsrc.py index ff49a98f48..b403529d35 100644 --- a/plotly/validators/cone/_vsrc.py +++ b/plotly/validators/cone/_vsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="vsrc", parent_name="cone", **kwargs): - super(VsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_w.py b/plotly/validators/cone/_w.py index 71826dd0d1..2f357721d9 100644 --- a/plotly/validators/cone/_w.py +++ b/plotly/validators/cone/_w.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WValidator(_plotly_utils.basevalidators.DataArrayValidator): +class WValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="w", parent_name="cone", **kwargs): - super(WValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/cone/_whoverformat.py b/plotly/validators/cone/_whoverformat.py index 9100d456aa..671f3efbe4 100644 --- a/plotly/validators/cone/_whoverformat.py +++ b/plotly/validators/cone/_whoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class WhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="whoverformat", parent_name="cone", **kwargs): - super(WhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_wsrc.py b/plotly/validators/cone/_wsrc.py index b15e963237..c5c33666f5 100644 --- a/plotly/validators/cone/_wsrc.py +++ b/plotly/validators/cone/_wsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="wsrc", parent_name="cone", **kwargs): - super(WsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_x.py b/plotly/validators/cone/_x.py index 79bb35931a..6f1854c61b 100644 --- a/plotly/validators/cone/_x.py +++ b/plotly/validators/cone/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="cone", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/cone/_xhoverformat.py b/plotly/validators/cone/_xhoverformat.py index 3259493d34..9c14c0b04f 100644 --- a/plotly/validators/cone/_xhoverformat.py +++ b/plotly/validators/cone/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="cone", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_xsrc.py b/plotly/validators/cone/_xsrc.py index 5f167d6648..1cc59b2bee 100644 --- a/plotly/validators/cone/_xsrc.py +++ b/plotly/validators/cone/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="cone", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_y.py b/plotly/validators/cone/_y.py index 6e6bc31c36..abae4ad9fb 100644 --- a/plotly/validators/cone/_y.py +++ b/plotly/validators/cone/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="cone", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/cone/_yhoverformat.py b/plotly/validators/cone/_yhoverformat.py index 93fd8c5418..96fd45c641 100644 --- a/plotly/validators/cone/_yhoverformat.py +++ b/plotly/validators/cone/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="cone", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_ysrc.py b/plotly/validators/cone/_ysrc.py index e61aa0c8f5..60c23dc7e0 100644 --- a/plotly/validators/cone/_ysrc.py +++ b/plotly/validators/cone/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="cone", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_z.py b/plotly/validators/cone/_z.py index a7f8870627..f70875189b 100644 --- a/plotly/validators/cone/_z.py +++ b/plotly/validators/cone/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="cone", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/cone/_zhoverformat.py b/plotly/validators/cone/_zhoverformat.py index 4a3bc5550b..088d3a40fa 100644 --- a/plotly/validators/cone/_zhoverformat.py +++ b/plotly/validators/cone/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="cone", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/_zsrc.py b/plotly/validators/cone/_zsrc.py index b6db12b6fe..4b8b9ac63b 100644 --- a/plotly/validators/cone/_zsrc.py +++ b/plotly/validators/cone/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="cone", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/__init__.py b/plotly/validators/cone/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/cone/colorbar/__init__.py +++ b/plotly/validators/cone/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/cone/colorbar/_bgcolor.py b/plotly/validators/cone/colorbar/_bgcolor.py index 6fed1233d5..7c053bfa2a 100644 --- a/plotly/validators/cone/colorbar/_bgcolor.py +++ b/plotly/validators/cone/colorbar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="cone.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_bordercolor.py b/plotly/validators/cone/colorbar/_bordercolor.py index c24694ee80..8dd1a5dd45 100644 --- a/plotly/validators/cone/colorbar/_bordercolor.py +++ b/plotly/validators/cone/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="cone.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_borderwidth.py b/plotly/validators/cone/colorbar/_borderwidth.py index 668b0050d4..f56268501f 100644 --- a/plotly/validators/cone/colorbar/_borderwidth.py +++ b/plotly/validators/cone/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="cone.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_dtick.py b/plotly/validators/cone/colorbar/_dtick.py index 3154c463de..9998d5faa5 100644 --- a/plotly/validators/cone/colorbar/_dtick.py +++ b/plotly/validators/cone/colorbar/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="cone.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/cone/colorbar/_exponentformat.py b/plotly/validators/cone/colorbar/_exponentformat.py index f0bd7ca5c1..231ad5e72a 100644 --- a/plotly/validators/cone/colorbar/_exponentformat.py +++ b/plotly/validators/cone/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="cone.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_labelalias.py b/plotly/validators/cone/colorbar/_labelalias.py index 8adec2edbb..2862513efb 100644 --- a/plotly/validators/cone/colorbar/_labelalias.py +++ b/plotly/validators/cone/colorbar/_labelalias.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__(self, plotly_name="labelalias", parent_name="cone.colorbar", **kwargs): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_len.py b/plotly/validators/cone/colorbar/_len.py index d7eef61297..eded6bb8d1 100644 --- a/plotly/validators/cone/colorbar/_len.py +++ b/plotly/validators/cone/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="cone.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_lenmode.py b/plotly/validators/cone/colorbar/_lenmode.py index 8d9ba761e8..e0113ac5fe 100644 --- a/plotly/validators/cone/colorbar/_lenmode.py +++ b/plotly/validators/cone/colorbar/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="cone.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_minexponent.py b/plotly/validators/cone/colorbar/_minexponent.py index abe8e359a8..c5147603bb 100644 --- a/plotly/validators/cone/colorbar/_minexponent.py +++ b/plotly/validators/cone/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="cone.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_nticks.py b/plotly/validators/cone/colorbar/_nticks.py index fd679c0575..bf3bd2845e 100644 --- a/plotly/validators/cone/colorbar/_nticks.py +++ b/plotly/validators/cone/colorbar/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="cone.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_orientation.py b/plotly/validators/cone/colorbar/_orientation.py index cb6fdf9f53..997c690109 100644 --- a/plotly/validators/cone/colorbar/_orientation.py +++ b/plotly/validators/cone/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="cone.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_outlinecolor.py b/plotly/validators/cone/colorbar/_outlinecolor.py index 503686174f..0ad5178c53 100644 --- a/plotly/validators/cone/colorbar/_outlinecolor.py +++ b/plotly/validators/cone/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="cone.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_outlinewidth.py b/plotly/validators/cone/colorbar/_outlinewidth.py index 1806fa7c21..8e1ec72e34 100644 --- a/plotly/validators/cone/colorbar/_outlinewidth.py +++ b/plotly/validators/cone/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="cone.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_separatethousands.py b/plotly/validators/cone/colorbar/_separatethousands.py index 2753c95abc..e868dff8cb 100644 --- a/plotly/validators/cone/colorbar/_separatethousands.py +++ b/plotly/validators/cone/colorbar/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="cone.colorbar", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_showexponent.py b/plotly/validators/cone/colorbar/_showexponent.py index 54c039e677..6480cac946 100644 --- a/plotly/validators/cone/colorbar/_showexponent.py +++ b/plotly/validators/cone/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="cone.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_showticklabels.py b/plotly/validators/cone/colorbar/_showticklabels.py index de068b090a..6de774b51b 100644 --- a/plotly/validators/cone/colorbar/_showticklabels.py +++ b/plotly/validators/cone/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="cone.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_showtickprefix.py b/plotly/validators/cone/colorbar/_showtickprefix.py index e1cca43434..f2d163c67e 100644 --- a/plotly/validators/cone/colorbar/_showtickprefix.py +++ b/plotly/validators/cone/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="cone.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_showticksuffix.py b/plotly/validators/cone/colorbar/_showticksuffix.py index c99bc63088..9acb135596 100644 --- a/plotly/validators/cone/colorbar/_showticksuffix.py +++ b/plotly/validators/cone/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="cone.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_thickness.py b/plotly/validators/cone/colorbar/_thickness.py index f6e8f94260..d52ba1a72d 100644 --- a/plotly/validators/cone/colorbar/_thickness.py +++ b/plotly/validators/cone/colorbar/_thickness.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__(self, plotly_name="thickness", parent_name="cone.colorbar", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_thicknessmode.py b/plotly/validators/cone/colorbar/_thicknessmode.py index c816d61845..67074194ae 100644 --- a/plotly/validators/cone/colorbar/_thicknessmode.py +++ b/plotly/validators/cone/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="cone.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_tick0.py b/plotly/validators/cone/colorbar/_tick0.py index fa9984713c..67389f9a41 100644 --- a/plotly/validators/cone/colorbar/_tick0.py +++ b/plotly/validators/cone/colorbar/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="cone.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/cone/colorbar/_tickangle.py b/plotly/validators/cone/colorbar/_tickangle.py index c560c4dab4..da915b0005 100644 --- a/plotly/validators/cone/colorbar/_tickangle.py +++ b/plotly/validators/cone/colorbar/_tickangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="tickangle", parent_name="cone.colorbar", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_tickcolor.py b/plotly/validators/cone/colorbar/_tickcolor.py index 8f4ecc4b09..e3160a0753 100644 --- a/plotly/validators/cone/colorbar/_tickcolor.py +++ b/plotly/validators/cone/colorbar/_tickcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="tickcolor", parent_name="cone.colorbar", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_tickfont.py b/plotly/validators/cone/colorbar/_tickfont.py index 63b0705c0b..bfeacc7d27 100644 --- a/plotly/validators/cone/colorbar/_tickfont.py +++ b/plotly/validators/cone/colorbar/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="cone.colorbar", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/cone/colorbar/_tickformat.py b/plotly/validators/cone/colorbar/_tickformat.py index ffa59ed694..4a1795099d 100644 --- a/plotly/validators/cone/colorbar/_tickformat.py +++ b/plotly/validators/cone/colorbar/_tickformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__(self, plotly_name="tickformat", parent_name="cone.colorbar", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_tickformatstopdefaults.py b/plotly/validators/cone/colorbar/_tickformatstopdefaults.py index b261028238..c7ad8f7878 100644 --- a/plotly/validators/cone/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/cone/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="cone.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/cone/colorbar/_tickformatstops.py b/plotly/validators/cone/colorbar/_tickformatstops.py index 8beb6215b7..66744489d7 100644 --- a/plotly/validators/cone/colorbar/_tickformatstops.py +++ b/plotly/validators/cone/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="cone.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/cone/colorbar/_ticklabeloverflow.py b/plotly/validators/cone/colorbar/_ticklabeloverflow.py index 743a4710b2..631fba6e2d 100644 --- a/plotly/validators/cone/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/cone/colorbar/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="cone.colorbar", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_ticklabelposition.py b/plotly/validators/cone/colorbar/_ticklabelposition.py index b775411670..8a7e720bf6 100644 --- a/plotly/validators/cone/colorbar/_ticklabelposition.py +++ b/plotly/validators/cone/colorbar/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="cone.colorbar", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/cone/colorbar/_ticklabelstep.py b/plotly/validators/cone/colorbar/_ticklabelstep.py index d09c1e0352..6280c59b42 100644 --- a/plotly/validators/cone/colorbar/_ticklabelstep.py +++ b/plotly/validators/cone/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="cone.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/cone/colorbar/_ticklen.py b/plotly/validators/cone/colorbar/_ticklen.py index 4aa67153ba..e3b2b2aaa2 100644 --- a/plotly/validators/cone/colorbar/_ticklen.py +++ b/plotly/validators/cone/colorbar/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="cone.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_tickmode.py b/plotly/validators/cone/colorbar/_tickmode.py index b9330a163b..f3d06e7efa 100644 --- a/plotly/validators/cone/colorbar/_tickmode.py +++ b/plotly/validators/cone/colorbar/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="cone.colorbar", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/cone/colorbar/_tickprefix.py b/plotly/validators/cone/colorbar/_tickprefix.py index 45c98c4a6d..bdfd2c83fc 100644 --- a/plotly/validators/cone/colorbar/_tickprefix.py +++ b/plotly/validators/cone/colorbar/_tickprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="cone.colorbar", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_ticks.py b/plotly/validators/cone/colorbar/_ticks.py index 318892131c..26377faba7 100644 --- a/plotly/validators/cone/colorbar/_ticks.py +++ b/plotly/validators/cone/colorbar/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="cone.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_ticksuffix.py b/plotly/validators/cone/colorbar/_ticksuffix.py index e5d0d20c7a..48fc4c47c6 100644 --- a/plotly/validators/cone/colorbar/_ticksuffix.py +++ b/plotly/validators/cone/colorbar/_ticksuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="ticksuffix", parent_name="cone.colorbar", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_ticktext.py b/plotly/validators/cone/colorbar/_ticktext.py index 229bb43070..48844b3006 100644 --- a/plotly/validators/cone/colorbar/_ticktext.py +++ b/plotly/validators/cone/colorbar/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="cone.colorbar", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_ticktextsrc.py b/plotly/validators/cone/colorbar/_ticktextsrc.py index 1f358445b0..40f9a5246a 100644 --- a/plotly/validators/cone/colorbar/_ticktextsrc.py +++ b/plotly/validators/cone/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="cone.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_tickvals.py b/plotly/validators/cone/colorbar/_tickvals.py index 445c886c03..fabb993869 100644 --- a/plotly/validators/cone/colorbar/_tickvals.py +++ b/plotly/validators/cone/colorbar/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="cone.colorbar", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_tickvalssrc.py b/plotly/validators/cone/colorbar/_tickvalssrc.py index bf933b0ad1..403b70b2d0 100644 --- a/plotly/validators/cone/colorbar/_tickvalssrc.py +++ b/plotly/validators/cone/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="cone.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_tickwidth.py b/plotly/validators/cone/colorbar/_tickwidth.py index 0197320095..6ff386acfc 100644 --- a/plotly/validators/cone/colorbar/_tickwidth.py +++ b/plotly/validators/cone/colorbar/_tickwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="tickwidth", parent_name="cone.colorbar", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_title.py b/plotly/validators/cone/colorbar/_title.py index 4cd3a2d97f..a61ce300e6 100644 --- a/plotly/validators/cone/colorbar/_title.py +++ b/plotly/validators/cone/colorbar/_title.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="cone.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/cone/colorbar/_x.py b/plotly/validators/cone/colorbar/_x.py index 7bbe61e2a5..6893ddea88 100644 --- a/plotly/validators/cone/colorbar/_x.py +++ b/plotly/validators/cone/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="cone.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_xanchor.py b/plotly/validators/cone/colorbar/_xanchor.py index 699aa52fe4..8569c6513c 100644 --- a/plotly/validators/cone/colorbar/_xanchor.py +++ b/plotly/validators/cone/colorbar/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="cone.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_xpad.py b/plotly/validators/cone/colorbar/_xpad.py index dc764b089d..dd861d46cc 100644 --- a/plotly/validators/cone/colorbar/_xpad.py +++ b/plotly/validators/cone/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="cone.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_xref.py b/plotly/validators/cone/colorbar/_xref.py index 00ba2cb199..bd292faf0e 100644 --- a/plotly/validators/cone/colorbar/_xref.py +++ b/plotly/validators/cone/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="cone.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_y.py b/plotly/validators/cone/colorbar/_y.py index 4a5626878b..6c219de025 100644 --- a/plotly/validators/cone/colorbar/_y.py +++ b/plotly/validators/cone/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="cone.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/_yanchor.py b/plotly/validators/cone/colorbar/_yanchor.py index 2628b83d43..55b2e16811 100644 --- a/plotly/validators/cone/colorbar/_yanchor.py +++ b/plotly/validators/cone/colorbar/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="cone.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/_ypad.py b/plotly/validators/cone/colorbar/_ypad.py index 754e53f9af..e7941d2135 100644 --- a/plotly/validators/cone/colorbar/_ypad.py +++ b/plotly/validators/cone/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="cone.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/cone/colorbar/_yref.py b/plotly/validators/cone/colorbar/_yref.py index 27ba8d53ee..999709fda5 100644 --- a/plotly/validators/cone/colorbar/_yref.py +++ b/plotly/validators/cone/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="cone.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/tickfont/__init__.py b/plotly/validators/cone/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/cone/colorbar/tickfont/__init__.py +++ b/plotly/validators/cone/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/cone/colorbar/tickfont/_color.py b/plotly/validators/cone/colorbar/tickfont/_color.py index fc7bec275a..1513d83b2f 100644 --- a/plotly/validators/cone/colorbar/tickfont/_color.py +++ b/plotly/validators/cone/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="cone.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/tickfont/_family.py b/plotly/validators/cone/colorbar/tickfont/_family.py index 8b8e236c49..16f8d402b2 100644 --- a/plotly/validators/cone/colorbar/tickfont/_family.py +++ b/plotly/validators/cone/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="cone.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/cone/colorbar/tickfont/_lineposition.py b/plotly/validators/cone/colorbar/tickfont/_lineposition.py index 2138c049a5..bbbcd0aa95 100644 --- a/plotly/validators/cone/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/cone/colorbar/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="cone.colorbar.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/cone/colorbar/tickfont/_shadow.py b/plotly/validators/cone/colorbar/tickfont/_shadow.py index 064ecede9b..4ca29ade53 100644 --- a/plotly/validators/cone/colorbar/tickfont/_shadow.py +++ b/plotly/validators/cone/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="cone.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/tickfont/_size.py b/plotly/validators/cone/colorbar/tickfont/_size.py index 9cc8826f89..a51eee4911 100644 --- a/plotly/validators/cone/colorbar/tickfont/_size.py +++ b/plotly/validators/cone/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="cone.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/cone/colorbar/tickfont/_style.py b/plotly/validators/cone/colorbar/tickfont/_style.py index a22317659d..e71f605c67 100644 --- a/plotly/validators/cone/colorbar/tickfont/_style.py +++ b/plotly/validators/cone/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="cone.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/tickfont/_textcase.py b/plotly/validators/cone/colorbar/tickfont/_textcase.py index d0514f821f..d658a133f6 100644 --- a/plotly/validators/cone/colorbar/tickfont/_textcase.py +++ b/plotly/validators/cone/colorbar/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="cone.colorbar.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/tickfont/_variant.py b/plotly/validators/cone/colorbar/tickfont/_variant.py index 39dece837b..40c6188344 100644 --- a/plotly/validators/cone/colorbar/tickfont/_variant.py +++ b/plotly/validators/cone/colorbar/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="cone.colorbar.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/cone/colorbar/tickfont/_weight.py b/plotly/validators/cone/colorbar/tickfont/_weight.py index d402c58647..d283109779 100644 --- a/plotly/validators/cone/colorbar/tickfont/_weight.py +++ b/plotly/validators/cone/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="cone.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/cone/colorbar/tickformatstop/__init__.py b/plotly/validators/cone/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/cone/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/cone/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py index 0dcc9a39ce..d5bc4da536 100644 --- a/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/cone/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="cone.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/cone/colorbar/tickformatstop/_enabled.py b/plotly/validators/cone/colorbar/tickformatstop/_enabled.py index 667502b107..07c02b0631 100644 --- a/plotly/validators/cone/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/cone/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="cone.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/tickformatstop/_name.py b/plotly/validators/cone/colorbar/tickformatstop/_name.py index 3192cd7260..335f5abf28 100644 --- a/plotly/validators/cone/colorbar/tickformatstop/_name.py +++ b/plotly/validators/cone/colorbar/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="cone.colorbar.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py index 5f3f3abb48..93c47f5869 100644 --- a/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/cone/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="cone.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/tickformatstop/_value.py b/plotly/validators/cone/colorbar/tickformatstop/_value.py index e74bb51601..6b65b05ec3 100644 --- a/plotly/validators/cone/colorbar/tickformatstop/_value.py +++ b/plotly/validators/cone/colorbar/tickformatstop/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="cone.colorbar.tickformatstop", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/title/__init__.py b/plotly/validators/cone/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/cone/colorbar/title/__init__.py +++ b/plotly/validators/cone/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/cone/colorbar/title/_font.py b/plotly/validators/cone/colorbar/title/_font.py index a9fdeb6733..e92304a289 100644 --- a/plotly/validators/cone/colorbar/title/_font.py +++ b/plotly/validators/cone/colorbar/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="cone.colorbar.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/cone/colorbar/title/_side.py b/plotly/validators/cone/colorbar/title/_side.py index 2a706bbb30..23b96b9295 100644 --- a/plotly/validators/cone/colorbar/title/_side.py +++ b/plotly/validators/cone/colorbar/title/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="cone.colorbar.title", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/title/_text.py b/plotly/validators/cone/colorbar/title/_text.py index be76a31059..781312001f 100644 --- a/plotly/validators/cone/colorbar/title/_text.py +++ b/plotly/validators/cone/colorbar/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="cone.colorbar.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/title/font/__init__.py b/plotly/validators/cone/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/cone/colorbar/title/font/__init__.py +++ b/plotly/validators/cone/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/cone/colorbar/title/font/_color.py b/plotly/validators/cone/colorbar/title/font/_color.py index cfa7ce647d..397377b929 100644 --- a/plotly/validators/cone/colorbar/title/font/_color.py +++ b/plotly/validators/cone/colorbar/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="cone.colorbar.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/title/font/_family.py b/plotly/validators/cone/colorbar/title/font/_family.py index c44378c199..06d208c8b0 100644 --- a/plotly/validators/cone/colorbar/title/font/_family.py +++ b/plotly/validators/cone/colorbar/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="cone.colorbar.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/cone/colorbar/title/font/_lineposition.py b/plotly/validators/cone/colorbar/title/font/_lineposition.py index a43100a993..f0d25e1b4b 100644 --- a/plotly/validators/cone/colorbar/title/font/_lineposition.py +++ b/plotly/validators/cone/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="cone.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/cone/colorbar/title/font/_shadow.py b/plotly/validators/cone/colorbar/title/font/_shadow.py index 9fdb8c184f..32cd43c460 100644 --- a/plotly/validators/cone/colorbar/title/font/_shadow.py +++ b/plotly/validators/cone/colorbar/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="cone.colorbar.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/cone/colorbar/title/font/_size.py b/plotly/validators/cone/colorbar/title/font/_size.py index 553454414e..e1f36c701d 100644 --- a/plotly/validators/cone/colorbar/title/font/_size.py +++ b/plotly/validators/cone/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="cone.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/cone/colorbar/title/font/_style.py b/plotly/validators/cone/colorbar/title/font/_style.py index ac59a8317a..5d045364b0 100644 --- a/plotly/validators/cone/colorbar/title/font/_style.py +++ b/plotly/validators/cone/colorbar/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="cone.colorbar.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/title/font/_textcase.py b/plotly/validators/cone/colorbar/title/font/_textcase.py index a40098bcca..f6803c40e9 100644 --- a/plotly/validators/cone/colorbar/title/font/_textcase.py +++ b/plotly/validators/cone/colorbar/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="cone.colorbar.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/cone/colorbar/title/font/_variant.py b/plotly/validators/cone/colorbar/title/font/_variant.py index ef9b7285d9..c25c77a8c0 100644 --- a/plotly/validators/cone/colorbar/title/font/_variant.py +++ b/plotly/validators/cone/colorbar/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="cone.colorbar.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/cone/colorbar/title/font/_weight.py b/plotly/validators/cone/colorbar/title/font/_weight.py index 781473b656..9329aea8d2 100644 --- a/plotly/validators/cone/colorbar/title/font/_weight.py +++ b/plotly/validators/cone/colorbar/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="cone.colorbar.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/cone/hoverlabel/__init__.py b/plotly/validators/cone/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/cone/hoverlabel/__init__.py +++ b/plotly/validators/cone/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/cone/hoverlabel/_align.py b/plotly/validators/cone/hoverlabel/_align.py index 11f1153b67..1dc97ec130 100644 --- a/plotly/validators/cone/hoverlabel/_align.py +++ b/plotly/validators/cone/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="cone.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/cone/hoverlabel/_alignsrc.py b/plotly/validators/cone/hoverlabel/_alignsrc.py index 0055eeef54..d978e22f8d 100644 --- a/plotly/validators/cone/hoverlabel/_alignsrc.py +++ b/plotly/validators/cone/hoverlabel/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="cone.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/_bgcolor.py b/plotly/validators/cone/hoverlabel/_bgcolor.py index 2831a4b482..9f36eee07e 100644 --- a/plotly/validators/cone/hoverlabel/_bgcolor.py +++ b/plotly/validators/cone/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="cone.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/cone/hoverlabel/_bgcolorsrc.py b/plotly/validators/cone/hoverlabel/_bgcolorsrc.py index d1d605e30d..5a0d1c124f 100644 --- a/plotly/validators/cone/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/cone/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="cone.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/_bordercolor.py b/plotly/validators/cone/hoverlabel/_bordercolor.py index a053819ec3..a2f75bf734 100644 --- a/plotly/validators/cone/hoverlabel/_bordercolor.py +++ b/plotly/validators/cone/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="cone.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/cone/hoverlabel/_bordercolorsrc.py b/plotly/validators/cone/hoverlabel/_bordercolorsrc.py index 6ac1cf6bc2..ae06284921 100644 --- a/plotly/validators/cone/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/cone/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="cone.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/_font.py b/plotly/validators/cone/hoverlabel/_font.py index 1235a36d8f..752dfa0149 100644 --- a/plotly/validators/cone/hoverlabel/_font.py +++ b/plotly/validators/cone/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="cone.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/cone/hoverlabel/_namelength.py b/plotly/validators/cone/hoverlabel/_namelength.py index 75eb9875d8..293806fc1c 100644 --- a/plotly/validators/cone/hoverlabel/_namelength.py +++ b/plotly/validators/cone/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="cone.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/cone/hoverlabel/_namelengthsrc.py b/plotly/validators/cone/hoverlabel/_namelengthsrc.py index ca35a9f458..831981e105 100644 --- a/plotly/validators/cone/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/cone/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="cone.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/__init__.py b/plotly/validators/cone/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/cone/hoverlabel/font/__init__.py +++ b/plotly/validators/cone/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/cone/hoverlabel/font/_color.py b/plotly/validators/cone/hoverlabel/font/_color.py index 31bd6d1097..499a9a441e 100644 --- a/plotly/validators/cone/hoverlabel/font/_color.py +++ b/plotly/validators/cone/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="cone.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/cone/hoverlabel/font/_colorsrc.py b/plotly/validators/cone/hoverlabel/font/_colorsrc.py index 8fcdaef169..1acec3be8b 100644 --- a/plotly/validators/cone/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/cone/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_family.py b/plotly/validators/cone/hoverlabel/font/_family.py index b42f6ecee1..9e2a3691cd 100644 --- a/plotly/validators/cone/hoverlabel/font/_family.py +++ b/plotly/validators/cone/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="cone.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/cone/hoverlabel/font/_familysrc.py b/plotly/validators/cone/hoverlabel/font/_familysrc.py index e5338219a0..583891e9de 100644 --- a/plotly/validators/cone/hoverlabel/font/_familysrc.py +++ b/plotly/validators/cone/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_lineposition.py b/plotly/validators/cone/hoverlabel/font/_lineposition.py index 1a969cc12c..15e3d071c4 100644 --- a/plotly/validators/cone/hoverlabel/font/_lineposition.py +++ b/plotly/validators/cone/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="cone.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/cone/hoverlabel/font/_linepositionsrc.py b/plotly/validators/cone/hoverlabel/font/_linepositionsrc.py index 69a65125af..ec54dab797 100644 --- a/plotly/validators/cone/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/cone/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="cone.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_shadow.py b/plotly/validators/cone/hoverlabel/font/_shadow.py index c1a9b2353a..df650c0270 100644 --- a/plotly/validators/cone/hoverlabel/font/_shadow.py +++ b/plotly/validators/cone/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="cone.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/cone/hoverlabel/font/_shadowsrc.py b/plotly/validators/cone/hoverlabel/font/_shadowsrc.py index 1d218d02ca..8945ef0777 100644 --- a/plotly/validators/cone/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/cone/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_size.py b/plotly/validators/cone/hoverlabel/font/_size.py index 2fd64080c4..39be76840b 100644 --- a/plotly/validators/cone/hoverlabel/font/_size.py +++ b/plotly/validators/cone/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="cone.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/cone/hoverlabel/font/_sizesrc.py b/plotly/validators/cone/hoverlabel/font/_sizesrc.py index 35351a87c3..9316e0bf42 100644 --- a/plotly/validators/cone/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/cone/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_style.py b/plotly/validators/cone/hoverlabel/font/_style.py index dd2b0d3ca7..663473af0e 100644 --- a/plotly/validators/cone/hoverlabel/font/_style.py +++ b/plotly/validators/cone/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="cone.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/cone/hoverlabel/font/_stylesrc.py b/plotly/validators/cone/hoverlabel/font/_stylesrc.py index 57367e9701..ae387dc088 100644 --- a/plotly/validators/cone/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/cone/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_textcase.py b/plotly/validators/cone/hoverlabel/font/_textcase.py index 3a1581f706..4a506a6007 100644 --- a/plotly/validators/cone/hoverlabel/font/_textcase.py +++ b/plotly/validators/cone/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="cone.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/cone/hoverlabel/font/_textcasesrc.py b/plotly/validators/cone/hoverlabel/font/_textcasesrc.py index 486d4259a5..34dcfd5357 100644 --- a/plotly/validators/cone/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/cone/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_variant.py b/plotly/validators/cone/hoverlabel/font/_variant.py index 960385ac92..46263141fc 100644 --- a/plotly/validators/cone/hoverlabel/font/_variant.py +++ b/plotly/validators/cone/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="cone.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/cone/hoverlabel/font/_variantsrc.py b/plotly/validators/cone/hoverlabel/font/_variantsrc.py index dfbe3e645a..1740694cb0 100644 --- a/plotly/validators/cone/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/cone/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/hoverlabel/font/_weight.py b/plotly/validators/cone/hoverlabel/font/_weight.py index 2c9930f70d..afa7a985e5 100644 --- a/plotly/validators/cone/hoverlabel/font/_weight.py +++ b/plotly/validators/cone/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="cone.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/cone/hoverlabel/font/_weightsrc.py b/plotly/validators/cone/hoverlabel/font/_weightsrc.py index 928d9dd843..c492b4ac41 100644 --- a/plotly/validators/cone/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/cone/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="cone.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/cone/legendgrouptitle/__init__.py b/plotly/validators/cone/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/cone/legendgrouptitle/__init__.py +++ b/plotly/validators/cone/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/cone/legendgrouptitle/_font.py b/plotly/validators/cone/legendgrouptitle/_font.py index a466b34904..a3f4e2d378 100644 --- a/plotly/validators/cone/legendgrouptitle/_font.py +++ b/plotly/validators/cone/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="cone.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/cone/legendgrouptitle/_text.py b/plotly/validators/cone/legendgrouptitle/_text.py index b90f511ec1..37c3bd7436 100644 --- a/plotly/validators/cone/legendgrouptitle/_text.py +++ b/plotly/validators/cone/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="cone.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/legendgrouptitle/font/__init__.py b/plotly/validators/cone/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/cone/legendgrouptitle/font/__init__.py +++ b/plotly/validators/cone/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/cone/legendgrouptitle/font/_color.py b/plotly/validators/cone/legendgrouptitle/font/_color.py index d5758d4bcf..5209f51dbe 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_color.py +++ b/plotly/validators/cone/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/legendgrouptitle/font/_family.py b/plotly/validators/cone/legendgrouptitle/font/_family.py index 5d1fc66538..304bf1970d 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_family.py +++ b/plotly/validators/cone/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/cone/legendgrouptitle/font/_lineposition.py b/plotly/validators/cone/legendgrouptitle/font/_lineposition.py index c598e3c69c..b14ff6a07f 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/cone/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="cone.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/cone/legendgrouptitle/font/_shadow.py b/plotly/validators/cone/legendgrouptitle/font/_shadow.py index 8442b3db2a..69e72fe93b 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/cone/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/cone/legendgrouptitle/font/_size.py b/plotly/validators/cone/legendgrouptitle/font/_size.py index 4509f85e29..d069bf19f9 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_size.py +++ b/plotly/validators/cone/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/cone/legendgrouptitle/font/_style.py b/plotly/validators/cone/legendgrouptitle/font/_style.py index 0ada8ad7f7..11fd81a46d 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_style.py +++ b/plotly/validators/cone/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/cone/legendgrouptitle/font/_textcase.py b/plotly/validators/cone/legendgrouptitle/font/_textcase.py index 85cd37860a..e9970b2133 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/cone/legendgrouptitle/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/cone/legendgrouptitle/font/_variant.py b/plotly/validators/cone/legendgrouptitle/font/_variant.py index 6579aa827c..a9dadbf84b 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_variant.py +++ b/plotly/validators/cone/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/cone/legendgrouptitle/font/_weight.py b/plotly/validators/cone/legendgrouptitle/font/_weight.py index adaaf6c26e..759384e1fc 100644 --- a/plotly/validators/cone/legendgrouptitle/font/_weight.py +++ b/plotly/validators/cone/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="cone.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/cone/lighting/__init__.py b/plotly/validators/cone/lighting/__init__.py index 028351f35d..1f11e1b86f 100644 --- a/plotly/validators/cone/lighting/__init__.py +++ b/plotly/validators/cone/lighting/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._vertexnormalsepsilon import VertexnormalsepsilonValidator - from ._specular import SpecularValidator - from ._roughness import RoughnessValidator - from ._fresnel import FresnelValidator - from ._facenormalsepsilon import FacenormalsepsilonValidator - from ._diffuse import DiffuseValidator - from ._ambient import AmbientValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._vertexnormalsepsilon.VertexnormalsepsilonValidator", - "._specular.SpecularValidator", - "._roughness.RoughnessValidator", - "._fresnel.FresnelValidator", - "._facenormalsepsilon.FacenormalsepsilonValidator", - "._diffuse.DiffuseValidator", - "._ambient.AmbientValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], +) diff --git a/plotly/validators/cone/lighting/_ambient.py b/plotly/validators/cone/lighting/_ambient.py index c653d51a80..6c20f1239a 100644 --- a/plotly/validators/cone/lighting/_ambient.py +++ b/plotly/validators/cone/lighting/_ambient.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): +class AmbientValidator(_bv.NumberValidator): def __init__(self, plotly_name="ambient", parent_name="cone.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lighting/_diffuse.py b/plotly/validators/cone/lighting/_diffuse.py index 4e29e0da1c..80cc448063 100644 --- a/plotly/validators/cone/lighting/_diffuse.py +++ b/plotly/validators/cone/lighting/_diffuse.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): +class DiffuseValidator(_bv.NumberValidator): def __init__(self, plotly_name="diffuse", parent_name="cone.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lighting/_facenormalsepsilon.py b/plotly/validators/cone/lighting/_facenormalsepsilon.py index cf70d9e603..bb624540d5 100644 --- a/plotly/validators/cone/lighting/_facenormalsepsilon.py +++ b/plotly/validators/cone/lighting/_facenormalsepsilon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class FacenormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="facenormalsepsilon", parent_name="cone.lighting", **kwargs ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lighting/_fresnel.py b/plotly/validators/cone/lighting/_fresnel.py index 09589f6564..85992e3ab1 100644 --- a/plotly/validators/cone/lighting/_fresnel.py +++ b/plotly/validators/cone/lighting/_fresnel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): +class FresnelValidator(_bv.NumberValidator): def __init__(self, plotly_name="fresnel", parent_name="cone.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lighting/_roughness.py b/plotly/validators/cone/lighting/_roughness.py index fb5e25f590..b84c4c8313 100644 --- a/plotly/validators/cone/lighting/_roughness.py +++ b/plotly/validators/cone/lighting/_roughness.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): +class RoughnessValidator(_bv.NumberValidator): def __init__(self, plotly_name="roughness", parent_name="cone.lighting", **kwargs): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lighting/_specular.py b/plotly/validators/cone/lighting/_specular.py index 807808f499..48330432b6 100644 --- a/plotly/validators/cone/lighting/_specular.py +++ b/plotly/validators/cone/lighting/_specular.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): +class SpecularValidator(_bv.NumberValidator): def __init__(self, plotly_name="specular", parent_name="cone.lighting", **kwargs): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lighting/_vertexnormalsepsilon.py b/plotly/validators/cone/lighting/_vertexnormalsepsilon.py index acceaa00b7..9493159b3e 100644 --- a/plotly/validators/cone/lighting/_vertexnormalsepsilon.py +++ b/plotly/validators/cone/lighting/_vertexnormalsepsilon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class VertexnormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="vertexnormalsepsilon", parent_name="cone.lighting", **kwargs ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/lightposition/__init__.py b/plotly/validators/cone/lightposition/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/cone/lightposition/__init__.py +++ b/plotly/validators/cone/lightposition/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/cone/lightposition/_x.py b/plotly/validators/cone/lightposition/_x.py index 1f3e4123f7..985f688edf 100644 --- a/plotly/validators/cone/lightposition/_x.py +++ b/plotly/validators/cone/lightposition/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="cone.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/cone/lightposition/_y.py b/plotly/validators/cone/lightposition/_y.py index 0a09973d3b..a685843457 100644 --- a/plotly/validators/cone/lightposition/_y.py +++ b/plotly/validators/cone/lightposition/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="cone.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/cone/lightposition/_z.py b/plotly/validators/cone/lightposition/_z.py index 8798d2e718..a004891588 100644 --- a/plotly/validators/cone/lightposition/_z.py +++ b/plotly/validators/cone/lightposition/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__(self, plotly_name="z", parent_name="cone.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/cone/stream/__init__.py b/plotly/validators/cone/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/cone/stream/__init__.py +++ b/plotly/validators/cone/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/cone/stream/_maxpoints.py b/plotly/validators/cone/stream/_maxpoints.py index 8cee99162d..859aca00f5 100644 --- a/plotly/validators/cone/stream/_maxpoints.py +++ b/plotly/validators/cone/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="cone.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/cone/stream/_token.py b/plotly/validators/cone/stream/_token.py index effbe3d849..9164439919 100644 --- a/plotly/validators/cone/stream/_token.py +++ b/plotly/validators/cone/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="cone.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/__init__.py b/plotly/validators/contour/__init__.py index 23cad4b2bf..a6dc766c99 100644 --- a/plotly/validators/contour/__init__.py +++ b/plotly/validators/contour/__init__.py @@ -1,159 +1,82 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zorder import ZorderValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zhoverformat import ZhoverformatValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._ytype import YtypeValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xtype import XtypeValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._transpose import TransposeValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._ncontours import NcontoursValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverongaps import HoverongapsValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contours import ContoursValidator - from ._connectgaps import ConnectgapsValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._autocontour import AutocontourValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zorder.ZorderValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zhoverformat.ZhoverformatValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._ytype.YtypeValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xtype.XtypeValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._transpose.TransposeValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._ncontours.NcontoursValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverongaps.HoverongapsValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contours.ContoursValidator", - "._connectgaps.ConnectgapsValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._autocontour.AutocontourValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zorder.ZorderValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ytype.YtypeValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xtype.XtypeValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._ncontours.NcontoursValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverongaps.HoverongapsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._connectgaps.ConnectgapsValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocontour.AutocontourValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/contour/_autocolorscale.py b/plotly/validators/contour/_autocolorscale.py index 1cb777393a..8a4f68c20c 100644 --- a/plotly/validators/contour/_autocolorscale.py +++ b/plotly/validators/contour/_autocolorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="contour", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contour/_autocontour.py b/plotly/validators/contour/_autocontour.py index e350a10b9a..6c5795f965 100644 --- a/plotly/validators/contour/_autocontour.py +++ b/plotly/validators/contour/_autocontour.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocontourValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocontour", parent_name="contour", **kwargs): - super(AutocontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contour/_coloraxis.py b/plotly/validators/contour/_coloraxis.py index 420af58bf0..6044ad0c0e 100644 --- a/plotly/validators/contour/_coloraxis.py +++ b/plotly/validators/contour/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="contour", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/contour/_colorbar.py b/plotly/validators/contour/_colorbar.py index cab8477632..df4ef5d35e 100644 --- a/plotly/validators/contour/_colorbar.py +++ b/plotly/validators/contour/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="contour", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contour.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of contour.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contour.colorbar.T - itle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/contour/_colorscale.py b/plotly/validators/contour/_colorscale.py index f507719895..719185523b 100644 --- a/plotly/validators/contour/_colorscale.py +++ b/plotly/validators/contour/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="contour", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/contour/_connectgaps.py b/plotly/validators/contour/_connectgaps.py index 96a4520d59..70601d8c99 100644 --- a/plotly/validators/contour/_connectgaps.py +++ b/plotly/validators/contour/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="contour", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_contours.py b/plotly/validators/contour/_contours.py index 7171016089..b63e6c43e1 100644 --- a/plotly/validators/contour/_contours.py +++ b/plotly/validators/contour/_contours.py @@ -1,78 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContoursValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contours", parent_name="contour", **kwargs): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contours"), data_docs=kwargs.pop( "data_docs", """ - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. """, ), **kwargs, diff --git a/plotly/validators/contour/_customdata.py b/plotly/validators/contour/_customdata.py index 1947da3af6..d04f2cbcf3 100644 --- a/plotly/validators/contour/_customdata.py +++ b/plotly/validators/contour/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="contour", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_customdatasrc.py b/plotly/validators/contour/_customdatasrc.py index 527b97972d..987c69ff6c 100644 --- a/plotly/validators/contour/_customdatasrc.py +++ b/plotly/validators/contour/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="contour", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_dx.py b/plotly/validators/contour/_dx.py index 4aeaae3353..a899322414 100644 --- a/plotly/validators/contour/_dx.py +++ b/plotly/validators/contour/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="contour", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/contour/_dy.py b/plotly/validators/contour/_dy.py index 777d093310..30e19324bf 100644 --- a/plotly/validators/contour/_dy.py +++ b/plotly/validators/contour/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="contour", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/contour/_fillcolor.py b/plotly/validators/contour/_fillcolor.py index 140afdba72..01633a806e 100644 --- a/plotly/validators/contour/_fillcolor.py +++ b/plotly/validators/contour/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="contour", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop("colorscale_path", "contour.colorscale"), **kwargs, diff --git a/plotly/validators/contour/_hoverinfo.py b/plotly/validators/contour/_hoverinfo.py index 86a56e0bb7..3ce97127fd 100644 --- a/plotly/validators/contour/_hoverinfo.py +++ b/plotly/validators/contour/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="contour", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/contour/_hoverinfosrc.py b/plotly/validators/contour/_hoverinfosrc.py index 2e607565e9..9996af0311 100644 --- a/plotly/validators/contour/_hoverinfosrc.py +++ b/plotly/validators/contour/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="contour", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_hoverlabel.py b/plotly/validators/contour/_hoverlabel.py index 09aa013906..77cbd88069 100644 --- a/plotly/validators/contour/_hoverlabel.py +++ b/plotly/validators/contour/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="contour", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/contour/_hoverongaps.py b/plotly/validators/contour/_hoverongaps.py index 78bfd06243..163f2cce99 100644 --- a/plotly/validators/contour/_hoverongaps.py +++ b/plotly/validators/contour/_hoverongaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverongapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class HoverongapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="hoverongaps", parent_name="contour", **kwargs): - super(HoverongapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_hovertemplate.py b/plotly/validators/contour/_hovertemplate.py index d756ca1cad..6ae777fa12 100644 --- a/plotly/validators/contour/_hovertemplate.py +++ b/plotly/validators/contour/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="contour", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/contour/_hovertemplatesrc.py b/plotly/validators/contour/_hovertemplatesrc.py index c4cc56de80..0dcf357a75 100644 --- a/plotly/validators/contour/_hovertemplatesrc.py +++ b/plotly/validators/contour/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="contour", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_hovertext.py b/plotly/validators/contour/_hovertext.py index 98cfdc3187..bd888d0ff4 100644 --- a/plotly/validators/contour/_hovertext.py +++ b/plotly/validators/contour/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HovertextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="hovertext", parent_name="contour", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_hovertextsrc.py b/plotly/validators/contour/_hovertextsrc.py index 43e665d354..c87e1a6412 100644 --- a/plotly/validators/contour/_hovertextsrc.py +++ b/plotly/validators/contour/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="contour", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_ids.py b/plotly/validators/contour/_ids.py index 66c18871f2..68c023b1be 100644 --- a/plotly/validators/contour/_ids.py +++ b/plotly/validators/contour/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="contour", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_idssrc.py b/plotly/validators/contour/_idssrc.py index c1b35a13d4..12a04afd55 100644 --- a/plotly/validators/contour/_idssrc.py +++ b/plotly/validators/contour/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="contour", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_legend.py b/plotly/validators/contour/_legend.py index 83c2484961..b81a091888 100644 --- a/plotly/validators/contour/_legend.py +++ b/plotly/validators/contour/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="contour", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/contour/_legendgroup.py b/plotly/validators/contour/_legendgroup.py index 51690bbb5d..1baefbf8a3 100644 --- a/plotly/validators/contour/_legendgroup.py +++ b/plotly/validators/contour/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="contour", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/_legendgrouptitle.py b/plotly/validators/contour/_legendgrouptitle.py index 8a5353fc4e..8ccda1379b 100644 --- a/plotly/validators/contour/_legendgrouptitle.py +++ b/plotly/validators/contour/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="contour", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/contour/_legendrank.py b/plotly/validators/contour/_legendrank.py index 6711ed5976..7af8c53cdf 100644 --- a/plotly/validators/contour/_legendrank.py +++ b/plotly/validators/contour/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="contour", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/_legendwidth.py b/plotly/validators/contour/_legendwidth.py index f46e609e6a..a00e3ea23b 100644 --- a/plotly/validators/contour/_legendwidth.py +++ b/plotly/validators/contour/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="contour", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/_line.py b/plotly/validators/contour/_line.py index c7dbbb7a64..8e0ed05540 100644 --- a/plotly/validators/contour/_line.py +++ b/plotly/validators/contour/_line.py @@ -1,32 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="contour", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". """, ), **kwargs, diff --git a/plotly/validators/contour/_meta.py b/plotly/validators/contour/_meta.py index 099ddb2ff6..fd0244964b 100644 --- a/plotly/validators/contour/_meta.py +++ b/plotly/validators/contour/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="contour", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/contour/_metasrc.py b/plotly/validators/contour/_metasrc.py index 8d304a07ba..661e491bbb 100644 --- a/plotly/validators/contour/_metasrc.py +++ b/plotly/validators/contour/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="contour", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_name.py b/plotly/validators/contour/_name.py index e63bf63d15..2c0ad4e094 100644 --- a/plotly/validators/contour/_name.py +++ b/plotly/validators/contour/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="contour", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/_ncontours.py b/plotly/validators/contour/_ncontours.py index d5ab9bcb07..8bec7934ce 100644 --- a/plotly/validators/contour/_ncontours.py +++ b/plotly/validators/contour/_ncontours.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): +class NcontoursValidator(_bv.IntegerValidator): def __init__(self, plotly_name="ncontours", parent_name="contour", **kwargs): - super(NcontoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/_opacity.py b/plotly/validators/contour/_opacity.py index 17c0c3aee5..bfa51c0cd2 100644 --- a/plotly/validators/contour/_opacity.py +++ b/plotly/validators/contour/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="contour", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contour/_reversescale.py b/plotly/validators/contour/_reversescale.py index c6581da732..ccf305a501 100644 --- a/plotly/validators/contour/_reversescale.py +++ b/plotly/validators/contour/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="contour", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/_showlegend.py b/plotly/validators/contour/_showlegend.py index 196a29fa77..c8d65b17ca 100644 --- a/plotly/validators/contour/_showlegend.py +++ b/plotly/validators/contour/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="contour", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/_showscale.py b/plotly/validators/contour/_showscale.py index c3a7cd5e7b..e903710043 100644 --- a/plotly/validators/contour/_showscale.py +++ b/plotly/validators/contour/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="contour", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_stream.py b/plotly/validators/contour/_stream.py index 5500337ec5..6b024fc34e 100644 --- a/plotly/validators/contour/_stream.py +++ b/plotly/validators/contour/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="contour", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/contour/_text.py b/plotly/validators/contour/_text.py index 20d0400c3a..2036c4d6b8 100644 --- a/plotly/validators/contour/_text.py +++ b/plotly/validators/contour/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="contour", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_textfont.py b/plotly/validators/contour/_textfont.py index efb0de5f6b..e8ea9b072f 100644 --- a/plotly/validators/contour/_textfont.py +++ b/plotly/validators/contour/_textfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="contour", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contour/_textsrc.py b/plotly/validators/contour/_textsrc.py index d829326fa2..d5f42988bf 100644 --- a/plotly/validators/contour/_textsrc.py +++ b/plotly/validators/contour/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="contour", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_texttemplate.py b/plotly/validators/contour/_texttemplate.py index e1bc5d1302..07f40e05e1 100644 --- a/plotly/validators/contour/_texttemplate.py +++ b/plotly/validators/contour/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="contour", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/_transpose.py b/plotly/validators/contour/_transpose.py index 6e8205cc0d..7cb312e511 100644 --- a/plotly/validators/contour/_transpose.py +++ b/plotly/validators/contour/_transpose.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): +class TransposeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="transpose", parent_name="contour", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_uid.py b/plotly/validators/contour/_uid.py index 2a4796ed66..232b3d53b7 100644 --- a/plotly/validators/contour/_uid.py +++ b/plotly/validators/contour/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="contour", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/_uirevision.py b/plotly/validators/contour/_uirevision.py index ed006a7fc5..c876c43ccf 100644 --- a/plotly/validators/contour/_uirevision.py +++ b/plotly/validators/contour/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="contour", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_visible.py b/plotly/validators/contour/_visible.py index 0df9c93d61..bdb7af2fba 100644 --- a/plotly/validators/contour/_visible.py +++ b/plotly/validators/contour/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="contour", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/contour/_x.py b/plotly/validators/contour/_x.py index 81d723ee86..5a0ab928eb 100644 --- a/plotly/validators/contour/_x.py +++ b/plotly/validators/contour/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="contour", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), **kwargs, diff --git a/plotly/validators/contour/_x0.py b/plotly/validators/contour/_x0.py index c26910c0b8..5b940d634e 100644 --- a/plotly/validators/contour/_x0.py +++ b/plotly/validators/contour/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="contour", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/contour/_xaxis.py b/plotly/validators/contour/_xaxis.py index 87546e8b8d..73b5860fe5 100644 --- a/plotly/validators/contour/_xaxis.py +++ b/plotly/validators/contour/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="contour", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/contour/_xcalendar.py b/plotly/validators/contour/_xcalendar.py index aef1d40047..fa30441127 100644 --- a/plotly/validators/contour/_xcalendar.py +++ b/plotly/validators/contour/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="contour", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/_xhoverformat.py b/plotly/validators/contour/_xhoverformat.py index f11f561fc5..e94798b5ad 100644 --- a/plotly/validators/contour/_xhoverformat.py +++ b/plotly/validators/contour/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="contour", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_xperiod.py b/plotly/validators/contour/_xperiod.py index e8e280e16c..2af87047e6 100644 --- a/plotly/validators/contour/_xperiod.py +++ b/plotly/validators/contour/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="contour", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/contour/_xperiod0.py b/plotly/validators/contour/_xperiod0.py index d5feeaf8d9..4e76522e4c 100644 --- a/plotly/validators/contour/_xperiod0.py +++ b/plotly/validators/contour/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="contour", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_xperiodalignment.py b/plotly/validators/contour/_xperiodalignment.py index eb42d53861..0f364606f1 100644 --- a/plotly/validators/contour/_xperiodalignment.py +++ b/plotly/validators/contour/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="contour", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), values=kwargs.pop("values", ["start", "middle", "end"]), diff --git a/plotly/validators/contour/_xsrc.py b/plotly/validators/contour/_xsrc.py index c3e3e736f0..f7ba2571df 100644 --- a/plotly/validators/contour/_xsrc.py +++ b/plotly/validators/contour/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="contour", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_xtype.py b/plotly/validators/contour/_xtype.py index e7fe7fff16..d006b33e23 100644 --- a/plotly/validators/contour/_xtype.py +++ b/plotly/validators/contour/_xtype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XtypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xtype", parent_name="contour", **kwargs): - super(XtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["array", "scaled"]), **kwargs, diff --git a/plotly/validators/contour/_y.py b/plotly/validators/contour/_y.py index 8dafa69a0b..dcf20ab2b5 100644 --- a/plotly/validators/contour/_y.py +++ b/plotly/validators/contour/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="contour", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), **kwargs, diff --git a/plotly/validators/contour/_y0.py b/plotly/validators/contour/_y0.py index 22c0250cf0..fd6a6cd3e4 100644 --- a/plotly/validators/contour/_y0.py +++ b/plotly/validators/contour/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="contour", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/contour/_yaxis.py b/plotly/validators/contour/_yaxis.py index c5d5bf40f2..860e20ddae 100644 --- a/plotly/validators/contour/_yaxis.py +++ b/plotly/validators/contour/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="contour", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/contour/_ycalendar.py b/plotly/validators/contour/_ycalendar.py index 2e89b1e691..691fdf8ef7 100644 --- a/plotly/validators/contour/_ycalendar.py +++ b/plotly/validators/contour/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="contour", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/_yhoverformat.py b/plotly/validators/contour/_yhoverformat.py index 67b279c9b8..faad81a1c1 100644 --- a/plotly/validators/contour/_yhoverformat.py +++ b/plotly/validators/contour/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="contour", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_yperiod.py b/plotly/validators/contour/_yperiod.py index 2b1562efb7..9df898b1e0 100644 --- a/plotly/validators/contour/_yperiod.py +++ b/plotly/validators/contour/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="contour", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/contour/_yperiod0.py b/plotly/validators/contour/_yperiod0.py index 07196dd168..06d83f91ed 100644 --- a/plotly/validators/contour/_yperiod0.py +++ b/plotly/validators/contour/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="contour", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_yperiodalignment.py b/plotly/validators/contour/_yperiodalignment.py index 4b9b05c842..c788ccccae 100644 --- a/plotly/validators/contour/_yperiodalignment.py +++ b/plotly/validators/contour/_yperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yperiodalignment", parent_name="contour", **kwargs): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), values=kwargs.pop("values", ["start", "middle", "end"]), diff --git a/plotly/validators/contour/_ysrc.py b/plotly/validators/contour/_ysrc.py index 30d4f68498..1c2be4e37d 100644 --- a/plotly/validators/contour/_ysrc.py +++ b/plotly/validators/contour/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="contour", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_ytype.py b/plotly/validators/contour/_ytype.py index 5814a57ee9..114f239178 100644 --- a/plotly/validators/contour/_ytype.py +++ b/plotly/validators/contour/_ytype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YtypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ytype", parent_name="contour", **kwargs): - super(YtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["array", "scaled"]), **kwargs, diff --git a/plotly/validators/contour/_z.py b/plotly/validators/contour/_z.py index e48921dc63..d551b7010b 100644 --- a/plotly/validators/contour/_z.py +++ b/plotly/validators/contour/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="contour", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/_zauto.py b/plotly/validators/contour/_zauto.py index fe6f3ccadc..8f57559269 100644 --- a/plotly/validators/contour/_zauto.py +++ b/plotly/validators/contour/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="contour", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contour/_zhoverformat.py b/plotly/validators/contour/_zhoverformat.py index 5c9fe29236..0a01dcf456 100644 --- a/plotly/validators/contour/_zhoverformat.py +++ b/plotly/validators/contour/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="contour", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/_zmax.py b/plotly/validators/contour/_zmax.py index ffe267c85a..bff3047038 100644 --- a/plotly/validators/contour/_zmax.py +++ b/plotly/validators/contour/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="contour", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/contour/_zmid.py b/plotly/validators/contour/_zmid.py index 106c741327..946a2c0558 100644 --- a/plotly/validators/contour/_zmid.py +++ b/plotly/validators/contour/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="contour", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contour/_zmin.py b/plotly/validators/contour/_zmin.py index bb41915fcd..0a8d8b2661 100644 --- a/plotly/validators/contour/_zmin.py +++ b/plotly/validators/contour/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="contour", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/contour/_zorder.py b/plotly/validators/contour/_zorder.py index d6fc961821..e24f9d18fc 100644 --- a/plotly/validators/contour/_zorder.py +++ b/plotly/validators/contour/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="contour", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/_zsrc.py b/plotly/validators/contour/_zsrc.py index 5b411451e3..47bf3415af 100644 --- a/plotly/validators/contour/_zsrc.py +++ b/plotly/validators/contour/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="contour", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/__init__.py b/plotly/validators/contour/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/contour/colorbar/__init__.py +++ b/plotly/validators/contour/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/contour/colorbar/_bgcolor.py b/plotly/validators/contour/colorbar/_bgcolor.py index 4ff5b75d63..916e666cef 100644 --- a/plotly/validators/contour/colorbar/_bgcolor.py +++ b/plotly/validators/contour/colorbar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="contour.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_bordercolor.py b/plotly/validators/contour/colorbar/_bordercolor.py index bd1b8df9f9..6117e4d67d 100644 --- a/plotly/validators/contour/colorbar/_bordercolor.py +++ b/plotly/validators/contour/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="contour.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_borderwidth.py b/plotly/validators/contour/colorbar/_borderwidth.py index 650329372a..23e08f003c 100644 --- a/plotly/validators/contour/colorbar/_borderwidth.py +++ b/plotly/validators/contour/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="contour.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_dtick.py b/plotly/validators/contour/colorbar/_dtick.py index e218c51378..52bb649de5 100644 --- a/plotly/validators/contour/colorbar/_dtick.py +++ b/plotly/validators/contour/colorbar/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="contour.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/contour/colorbar/_exponentformat.py b/plotly/validators/contour/colorbar/_exponentformat.py index 12dc458063..beacc39b63 100644 --- a/plotly/validators/contour/colorbar/_exponentformat.py +++ b/plotly/validators/contour/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="contour.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_labelalias.py b/plotly/validators/contour/colorbar/_labelalias.py index 4256b62021..76988b85c8 100644 --- a/plotly/validators/contour/colorbar/_labelalias.py +++ b/plotly/validators/contour/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="contour.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_len.py b/plotly/validators/contour/colorbar/_len.py index 49818908bc..fbbbe8834f 100644 --- a/plotly/validators/contour/colorbar/_len.py +++ b/plotly/validators/contour/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="contour.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_lenmode.py b/plotly/validators/contour/colorbar/_lenmode.py index fcc0f28c5e..ceffe623c2 100644 --- a/plotly/validators/contour/colorbar/_lenmode.py +++ b/plotly/validators/contour/colorbar/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="contour.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_minexponent.py b/plotly/validators/contour/colorbar/_minexponent.py index 4be592d32d..144c6735e1 100644 --- a/plotly/validators/contour/colorbar/_minexponent.py +++ b/plotly/validators/contour/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="contour.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_nticks.py b/plotly/validators/contour/colorbar/_nticks.py index e4af2c6665..4b81f23532 100644 --- a/plotly/validators/contour/colorbar/_nticks.py +++ b/plotly/validators/contour/colorbar/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="contour.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_orientation.py b/plotly/validators/contour/colorbar/_orientation.py index b76a564fac..e09a709142 100644 --- a/plotly/validators/contour/colorbar/_orientation.py +++ b/plotly/validators/contour/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="contour.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_outlinecolor.py b/plotly/validators/contour/colorbar/_outlinecolor.py index 803cc63f1a..29c4bdfbf8 100644 --- a/plotly/validators/contour/colorbar/_outlinecolor.py +++ b/plotly/validators/contour/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="contour.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_outlinewidth.py b/plotly/validators/contour/colorbar/_outlinewidth.py index 221eaaec1a..d9a6d3f1b8 100644 --- a/plotly/validators/contour/colorbar/_outlinewidth.py +++ b/plotly/validators/contour/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="contour.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_separatethousands.py b/plotly/validators/contour/colorbar/_separatethousands.py index fdf0c4c618..92cdab4c8d 100644 --- a/plotly/validators/contour/colorbar/_separatethousands.py +++ b/plotly/validators/contour/colorbar/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="contour.colorbar", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_showexponent.py b/plotly/validators/contour/colorbar/_showexponent.py index 797d4d9248..cb09dc9db7 100644 --- a/plotly/validators/contour/colorbar/_showexponent.py +++ b/plotly/validators/contour/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="contour.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_showticklabels.py b/plotly/validators/contour/colorbar/_showticklabels.py index 1870a2b3c6..e0ef7bf51d 100644 --- a/plotly/validators/contour/colorbar/_showticklabels.py +++ b/plotly/validators/contour/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="contour.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_showtickprefix.py b/plotly/validators/contour/colorbar/_showtickprefix.py index 1d9c8877f9..47de9df5f4 100644 --- a/plotly/validators/contour/colorbar/_showtickprefix.py +++ b/plotly/validators/contour/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="contour.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_showticksuffix.py b/plotly/validators/contour/colorbar/_showticksuffix.py index 868d7816a8..984ca87e94 100644 --- a/plotly/validators/contour/colorbar/_showticksuffix.py +++ b/plotly/validators/contour/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="contour.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_thickness.py b/plotly/validators/contour/colorbar/_thickness.py index 714d1fe650..0dc95ccb88 100644 --- a/plotly/validators/contour/colorbar/_thickness.py +++ b/plotly/validators/contour/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="contour.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_thicknessmode.py b/plotly/validators/contour/colorbar/_thicknessmode.py index 82ed54bf14..2fa9bc9ee4 100644 --- a/plotly/validators/contour/colorbar/_thicknessmode.py +++ b/plotly/validators/contour/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="contour.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_tick0.py b/plotly/validators/contour/colorbar/_tick0.py index 63689b0999..c540912ca1 100644 --- a/plotly/validators/contour/colorbar/_tick0.py +++ b/plotly/validators/contour/colorbar/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="contour.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/contour/colorbar/_tickangle.py b/plotly/validators/contour/colorbar/_tickangle.py index 34a2d4cbfd..a86e4c3a64 100644 --- a/plotly/validators/contour/colorbar/_tickangle.py +++ b/plotly/validators/contour/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="contour.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_tickcolor.py b/plotly/validators/contour/colorbar/_tickcolor.py index cdb0194206..803b8727ad 100644 --- a/plotly/validators/contour/colorbar/_tickcolor.py +++ b/plotly/validators/contour/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="contour.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_tickfont.py b/plotly/validators/contour/colorbar/_tickfont.py index b14c60b87d..508e659ef0 100644 --- a/plotly/validators/contour/colorbar/_tickfont.py +++ b/plotly/validators/contour/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="contour.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contour/colorbar/_tickformat.py b/plotly/validators/contour/colorbar/_tickformat.py index a40ecebf2a..6711c56bdd 100644 --- a/plotly/validators/contour/colorbar/_tickformat.py +++ b/plotly/validators/contour/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="contour.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_tickformatstopdefaults.py b/plotly/validators/contour/colorbar/_tickformatstopdefaults.py index 63c88800e3..5d0ad7cad5 100644 --- a/plotly/validators/contour/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/contour/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="contour.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/contour/colorbar/_tickformatstops.py b/plotly/validators/contour/colorbar/_tickformatstops.py index cf3e26b504..4f4115d042 100644 --- a/plotly/validators/contour/colorbar/_tickformatstops.py +++ b/plotly/validators/contour/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="contour.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/contour/colorbar/_ticklabeloverflow.py b/plotly/validators/contour/colorbar/_ticklabeloverflow.py index 791ecd374f..8f7c440bac 100644 --- a/plotly/validators/contour/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/contour/colorbar/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="contour.colorbar", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_ticklabelposition.py b/plotly/validators/contour/colorbar/_ticklabelposition.py index a46bb1f367..faac08497d 100644 --- a/plotly/validators/contour/colorbar/_ticklabelposition.py +++ b/plotly/validators/contour/colorbar/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="contour.colorbar", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/colorbar/_ticklabelstep.py b/plotly/validators/contour/colorbar/_ticklabelstep.py index 5307e27ea2..be373a7e13 100644 --- a/plotly/validators/contour/colorbar/_ticklabelstep.py +++ b/plotly/validators/contour/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="contour.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/colorbar/_ticklen.py b/plotly/validators/contour/colorbar/_ticklen.py index 6c58ed26ac..0c97f7ee4b 100644 --- a/plotly/validators/contour/colorbar/_ticklen.py +++ b/plotly/validators/contour/colorbar/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="contour.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_tickmode.py b/plotly/validators/contour/colorbar/_tickmode.py index ae1c534ad5..dccfe73d9f 100644 --- a/plotly/validators/contour/colorbar/_tickmode.py +++ b/plotly/validators/contour/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="contour.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/contour/colorbar/_tickprefix.py b/plotly/validators/contour/colorbar/_tickprefix.py index adb0fd5ee8..1326b2ee39 100644 --- a/plotly/validators/contour/colorbar/_tickprefix.py +++ b/plotly/validators/contour/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="contour.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_ticks.py b/plotly/validators/contour/colorbar/_ticks.py index 590cc07f81..d4be5379e0 100644 --- a/plotly/validators/contour/colorbar/_ticks.py +++ b/plotly/validators/contour/colorbar/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="contour.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_ticksuffix.py b/plotly/validators/contour/colorbar/_ticksuffix.py index 8fd31ffe09..d3f537783a 100644 --- a/plotly/validators/contour/colorbar/_ticksuffix.py +++ b/plotly/validators/contour/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="contour.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_ticktext.py b/plotly/validators/contour/colorbar/_ticktext.py index c544e96f49..df7b4ce28b 100644 --- a/plotly/validators/contour/colorbar/_ticktext.py +++ b/plotly/validators/contour/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="contour.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_ticktextsrc.py b/plotly/validators/contour/colorbar/_ticktextsrc.py index 7cb99e0ef8..fddcb4bd0e 100644 --- a/plotly/validators/contour/colorbar/_ticktextsrc.py +++ b/plotly/validators/contour/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="contour.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_tickvals.py b/plotly/validators/contour/colorbar/_tickvals.py index f8879bbed2..c3044cf545 100644 --- a/plotly/validators/contour/colorbar/_tickvals.py +++ b/plotly/validators/contour/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="contour.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_tickvalssrc.py b/plotly/validators/contour/colorbar/_tickvalssrc.py index dedf91edb6..945d8c6a01 100644 --- a/plotly/validators/contour/colorbar/_tickvalssrc.py +++ b/plotly/validators/contour/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="contour.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_tickwidth.py b/plotly/validators/contour/colorbar/_tickwidth.py index 334eda2215..8ee4ab13cb 100644 --- a/plotly/validators/contour/colorbar/_tickwidth.py +++ b/plotly/validators/contour/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="contour.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_title.py b/plotly/validators/contour/colorbar/_title.py index cae0cab743..4beeb5a6cb 100644 --- a/plotly/validators/contour/colorbar/_title.py +++ b/plotly/validators/contour/colorbar/_title.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="contour.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/contour/colorbar/_x.py b/plotly/validators/contour/colorbar/_x.py index 0f90f06f59..b61c16b05e 100644 --- a/plotly/validators/contour/colorbar/_x.py +++ b/plotly/validators/contour/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="contour.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_xanchor.py b/plotly/validators/contour/colorbar/_xanchor.py index 6110944ed4..0531df0ff7 100644 --- a/plotly/validators/contour/colorbar/_xanchor.py +++ b/plotly/validators/contour/colorbar/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="contour.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_xpad.py b/plotly/validators/contour/colorbar/_xpad.py index f319d6a55f..f7087a319a 100644 --- a/plotly/validators/contour/colorbar/_xpad.py +++ b/plotly/validators/contour/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="contour.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_xref.py b/plotly/validators/contour/colorbar/_xref.py index 67439b019f..aec654d203 100644 --- a/plotly/validators/contour/colorbar/_xref.py +++ b/plotly/validators/contour/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="contour.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_y.py b/plotly/validators/contour/colorbar/_y.py index 5b46f99b06..5af572c239 100644 --- a/plotly/validators/contour/colorbar/_y.py +++ b/plotly/validators/contour/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="contour.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/_yanchor.py b/plotly/validators/contour/colorbar/_yanchor.py index f90780548d..ea12d8cd70 100644 --- a/plotly/validators/contour/colorbar/_yanchor.py +++ b/plotly/validators/contour/colorbar/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="contour.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/_ypad.py b/plotly/validators/contour/colorbar/_ypad.py index a451e01553..662b176977 100644 --- a/plotly/validators/contour/colorbar/_ypad.py +++ b/plotly/validators/contour/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="contour.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/colorbar/_yref.py b/plotly/validators/contour/colorbar/_yref.py index 138459baf6..5af4936151 100644 --- a/plotly/validators/contour/colorbar/_yref.py +++ b/plotly/validators/contour/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="contour.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/tickfont/__init__.py b/plotly/validators/contour/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contour/colorbar/tickfont/__init__.py +++ b/plotly/validators/contour/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/colorbar/tickfont/_color.py b/plotly/validators/contour/colorbar/tickfont/_color.py index a009f0e59b..0ba155fc92 100644 --- a/plotly/validators/contour/colorbar/tickfont/_color.py +++ b/plotly/validators/contour/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contour.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/tickfont/_family.py b/plotly/validators/contour/colorbar/tickfont/_family.py index 252abd6fda..dc1cedc40f 100644 --- a/plotly/validators/contour/colorbar/tickfont/_family.py +++ b/plotly/validators/contour/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contour.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/colorbar/tickfont/_lineposition.py b/plotly/validators/contour/colorbar/tickfont/_lineposition.py index dc05c70d8a..d77b1eb0c5 100644 --- a/plotly/validators/contour/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/contour/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contour.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contour/colorbar/tickfont/_shadow.py b/plotly/validators/contour/colorbar/tickfont/_shadow.py index 02f96f444e..898fae7ca6 100644 --- a/plotly/validators/contour/colorbar/tickfont/_shadow.py +++ b/plotly/validators/contour/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contour.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/tickfont/_size.py b/plotly/validators/contour/colorbar/tickfont/_size.py index 4a4f6553f0..fdf0a0a6a5 100644 --- a/plotly/validators/contour/colorbar/tickfont/_size.py +++ b/plotly/validators/contour/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contour.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/colorbar/tickfont/_style.py b/plotly/validators/contour/colorbar/tickfont/_style.py index e9c699c84f..3ac562d919 100644 --- a/plotly/validators/contour/colorbar/tickfont/_style.py +++ b/plotly/validators/contour/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contour.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/tickfont/_textcase.py b/plotly/validators/contour/colorbar/tickfont/_textcase.py index ea2405d095..b521d4c8ad 100644 --- a/plotly/validators/contour/colorbar/tickfont/_textcase.py +++ b/plotly/validators/contour/colorbar/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contour.colorbar.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/tickfont/_variant.py b/plotly/validators/contour/colorbar/tickfont/_variant.py index 0573ab1be5..ff504543cc 100644 --- a/plotly/validators/contour/colorbar/tickfont/_variant.py +++ b/plotly/validators/contour/colorbar/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contour.colorbar.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/colorbar/tickfont/_weight.py b/plotly/validators/contour/colorbar/tickfont/_weight.py index e6ce1bcf8a..c8e82a3f92 100644 --- a/plotly/validators/contour/colorbar/tickfont/_weight.py +++ b/plotly/validators/contour/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contour.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contour/colorbar/tickformatstop/__init__.py b/plotly/validators/contour/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/contour/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/contour/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py index e1bc16160f..896f480e90 100644 --- a/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/contour/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="contour.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/contour/colorbar/tickformatstop/_enabled.py b/plotly/validators/contour/colorbar/tickformatstop/_enabled.py index bdc7f52040..cd32f6994c 100644 --- a/plotly/validators/contour/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/contour/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="contour.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/tickformatstop/_name.py b/plotly/validators/contour/colorbar/tickformatstop/_name.py index 8fa6c671ab..2bb3f149a9 100644 --- a/plotly/validators/contour/colorbar/tickformatstop/_name.py +++ b/plotly/validators/contour/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="contour.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py index 0ad2276357..5f20e67a6c 100644 --- a/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/contour/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="contour.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/tickformatstop/_value.py b/plotly/validators/contour/colorbar/tickformatstop/_value.py index cd2694801e..8176a15bcc 100644 --- a/plotly/validators/contour/colorbar/tickformatstop/_value.py +++ b/plotly/validators/contour/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="contour.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/title/__init__.py b/plotly/validators/contour/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/contour/colorbar/title/__init__.py +++ b/plotly/validators/contour/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/contour/colorbar/title/_font.py b/plotly/validators/contour/colorbar/title/_font.py index 1ec7acef88..cf4e1cd990 100644 --- a/plotly/validators/contour/colorbar/title/_font.py +++ b/plotly/validators/contour/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="contour.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contour/colorbar/title/_side.py b/plotly/validators/contour/colorbar/title/_side.py index dfc9a5a774..ed8cbcca6e 100644 --- a/plotly/validators/contour/colorbar/title/_side.py +++ b/plotly/validators/contour/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="contour.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/title/_text.py b/plotly/validators/contour/colorbar/title/_text.py index edbc184aae..b9ddd96fb6 100644 --- a/plotly/validators/contour/colorbar/title/_text.py +++ b/plotly/validators/contour/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="contour.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/title/font/__init__.py b/plotly/validators/contour/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contour/colorbar/title/font/__init__.py +++ b/plotly/validators/contour/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/colorbar/title/font/_color.py b/plotly/validators/contour/colorbar/title/font/_color.py index 6a2bd296c5..037141f637 100644 --- a/plotly/validators/contour/colorbar/title/font/_color.py +++ b/plotly/validators/contour/colorbar/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contour.colorbar.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/title/font/_family.py b/plotly/validators/contour/colorbar/title/font/_family.py index 9b29805272..b0e02ed1a2 100644 --- a/plotly/validators/contour/colorbar/title/font/_family.py +++ b/plotly/validators/contour/colorbar/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contour.colorbar.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/colorbar/title/font/_lineposition.py b/plotly/validators/contour/colorbar/title/font/_lineposition.py index 0a0ac5c2dd..fea764c1b2 100644 --- a/plotly/validators/contour/colorbar/title/font/_lineposition.py +++ b/plotly/validators/contour/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contour.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contour/colorbar/title/font/_shadow.py b/plotly/validators/contour/colorbar/title/font/_shadow.py index 67318cf1bc..b765cac13e 100644 --- a/plotly/validators/contour/colorbar/title/font/_shadow.py +++ b/plotly/validators/contour/colorbar/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contour.colorbar.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/colorbar/title/font/_size.py b/plotly/validators/contour/colorbar/title/font/_size.py index 8eac286601..5f689ec314 100644 --- a/plotly/validators/contour/colorbar/title/font/_size.py +++ b/plotly/validators/contour/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contour.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/colorbar/title/font/_style.py b/plotly/validators/contour/colorbar/title/font/_style.py index 1104b4d9c2..13f30dec9d 100644 --- a/plotly/validators/contour/colorbar/title/font/_style.py +++ b/plotly/validators/contour/colorbar/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contour.colorbar.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/title/font/_textcase.py b/plotly/validators/contour/colorbar/title/font/_textcase.py index 98d04bfe7d..f6e4d04161 100644 --- a/plotly/validators/contour/colorbar/title/font/_textcase.py +++ b/plotly/validators/contour/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contour.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contour/colorbar/title/font/_variant.py b/plotly/validators/contour/colorbar/title/font/_variant.py index bae3322109..102b02d7f7 100644 --- a/plotly/validators/contour/colorbar/title/font/_variant.py +++ b/plotly/validators/contour/colorbar/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contour.colorbar.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/colorbar/title/font/_weight.py b/plotly/validators/contour/colorbar/title/font/_weight.py index 5babb767e5..90ef425686 100644 --- a/plotly/validators/contour/colorbar/title/font/_weight.py +++ b/plotly/validators/contour/colorbar/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contour.colorbar.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contour/contours/__init__.py b/plotly/validators/contour/contours/__init__.py index 0650ad574b..230a907cd7 100644 --- a/plotly/validators/contour/contours/__init__.py +++ b/plotly/validators/contour/contours/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._type import TypeValidator - from ._start import StartValidator - from ._size import SizeValidator - from ._showlines import ShowlinesValidator - from ._showlabels import ShowlabelsValidator - from ._operation import OperationValidator - from ._labelformat import LabelformatValidator - from ._labelfont import LabelfontValidator - from ._end import EndValidator - from ._coloring import ColoringValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._type.TypeValidator", - "._start.StartValidator", - "._size.SizeValidator", - "._showlines.ShowlinesValidator", - "._showlabels.ShowlabelsValidator", - "._operation.OperationValidator", - "._labelformat.LabelformatValidator", - "._labelfont.LabelfontValidator", - "._end.EndValidator", - "._coloring.ColoringValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._type.TypeValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._showlines.ShowlinesValidator", + "._showlabels.ShowlabelsValidator", + "._operation.OperationValidator", + "._labelformat.LabelformatValidator", + "._labelfont.LabelfontValidator", + "._end.EndValidator", + "._coloring.ColoringValidator", + ], +) diff --git a/plotly/validators/contour/contours/_coloring.py b/plotly/validators/contour/contours/_coloring.py index 254052570d..cc1b212ecd 100644 --- a/plotly/validators/contour/contours/_coloring.py +++ b/plotly/validators/contour/contours/_coloring.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ColoringValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="coloring", parent_name="contour.contours", **kwargs ): - super(ColoringValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fill", "heatmap", "lines", "none"]), **kwargs, diff --git a/plotly/validators/contour/contours/_end.py b/plotly/validators/contour/contours/_end.py index 00db7cee58..baca1d5385 100644 --- a/plotly/validators/contour/contours/_end.py +++ b/plotly/validators/contour/contours/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.NumberValidator): +class EndValidator(_bv.NumberValidator): def __init__(self, plotly_name="end", parent_name="contour.contours", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), **kwargs, diff --git a/plotly/validators/contour/contours/_labelfont.py b/plotly/validators/contour/contours/_labelfont.py index bae317ba88..19900d159d 100644 --- a/plotly/validators/contour/contours/_labelfont.py +++ b/plotly/validators/contour/contours/_labelfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="labelfont", parent_name="contour.contours", **kwargs ): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Labelfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contour/contours/_labelformat.py b/plotly/validators/contour/contours/_labelformat.py index 62baa0432d..2ffbc5648b 100644 --- a/plotly/validators/contour/contours/_labelformat.py +++ b/plotly/validators/contour/contours/_labelformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): +class LabelformatValidator(_bv.StringValidator): def __init__( self, plotly_name="labelformat", parent_name="contour.contours", **kwargs ): - super(LabelformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/contours/_operation.py b/plotly/validators/contour/contours/_operation.py index fe0fe4ea82..79042a8a21 100644 --- a/plotly/validators/contour/contours/_operation.py +++ b/plotly/validators/contour/contours/_operation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OperationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="operation", parent_name="contour.contours", **kwargs ): - super(OperationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/contours/_showlabels.py b/plotly/validators/contour/contours/_showlabels.py index e1650f5e8f..38c1e11640 100644 --- a/plotly/validators/contour/contours/_showlabels.py +++ b/plotly/validators/contour/contours/_showlabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlabels", parent_name="contour.contours", **kwargs ): - super(ShowlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/contours/_showlines.py b/plotly/validators/contour/contours/_showlines.py index e10c89a100..48a5f8cfd2 100644 --- a/plotly/validators/contour/contours/_showlines.py +++ b/plotly/validators/contour/contours/_showlines.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlinesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlines", parent_name="contour.contours", **kwargs ): - super(ShowlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/contours/_size.py b/plotly/validators/contour/contours/_size.py index aa43586f82..6a89df953a 100644 --- a/plotly/validators/contour/contours/_size.py +++ b/plotly/validators/contour/contours/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="contour.contours", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contour/contours/_start.py b/plotly/validators/contour/contours/_start.py index 2a2b3f0851..5d9a89a0dd 100644 --- a/plotly/validators/contour/contours/_start.py +++ b/plotly/validators/contour/contours/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__(self, plotly_name="start", parent_name="contour.contours", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), **kwargs, diff --git a/plotly/validators/contour/contours/_type.py b/plotly/validators/contour/contours/_type.py index 87ba2189dd..834a6b8d7c 100644 --- a/plotly/validators/contour/contours/_type.py +++ b/plotly/validators/contour/contours/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="contour.contours", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["levels", "constraint"]), **kwargs, diff --git a/plotly/validators/contour/contours/_value.py b/plotly/validators/contour/contours/_value.py index 64e6942be3..474973fed4 100644 --- a/plotly/validators/contour/contours/_value.py +++ b/plotly/validators/contour/contours/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.AnyValidator): +class ValueValidator(_bv.AnyValidator): def __init__(self, plotly_name="value", parent_name="contour.contours", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contour/contours/labelfont/__init__.py b/plotly/validators/contour/contours/labelfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contour/contours/labelfont/__init__.py +++ b/plotly/validators/contour/contours/labelfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/contours/labelfont/_color.py b/plotly/validators/contour/contours/labelfont/_color.py index 6fb8366097..a54ccaac17 100644 --- a/plotly/validators/contour/contours/labelfont/_color.py +++ b/plotly/validators/contour/contours/labelfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contour.contours.labelfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/contours/labelfont/_family.py b/plotly/validators/contour/contours/labelfont/_family.py index ac10b66e65..f5b09e8372 100644 --- a/plotly/validators/contour/contours/labelfont/_family.py +++ b/plotly/validators/contour/contours/labelfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contour.contours.labelfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/contours/labelfont/_lineposition.py b/plotly/validators/contour/contours/labelfont/_lineposition.py index 9dd602d3ea..85a0fea022 100644 --- a/plotly/validators/contour/contours/labelfont/_lineposition.py +++ b/plotly/validators/contour/contours/labelfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contour.contours.labelfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contour/contours/labelfont/_shadow.py b/plotly/validators/contour/contours/labelfont/_shadow.py index e5817a3636..895b617330 100644 --- a/plotly/validators/contour/contours/labelfont/_shadow.py +++ b/plotly/validators/contour/contours/labelfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contour.contours.labelfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/contours/labelfont/_size.py b/plotly/validators/contour/contours/labelfont/_size.py index d365c15aaa..7db4a9530c 100644 --- a/plotly/validators/contour/contours/labelfont/_size.py +++ b/plotly/validators/contour/contours/labelfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contour.contours.labelfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/contours/labelfont/_style.py b/plotly/validators/contour/contours/labelfont/_style.py index b95da8b6b0..0e936011f1 100644 --- a/plotly/validators/contour/contours/labelfont/_style.py +++ b/plotly/validators/contour/contours/labelfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contour.contours.labelfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contour/contours/labelfont/_textcase.py b/plotly/validators/contour/contours/labelfont/_textcase.py index 4bb59970fb..4678f68ce8 100644 --- a/plotly/validators/contour/contours/labelfont/_textcase.py +++ b/plotly/validators/contour/contours/labelfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contour.contours.labelfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contour/contours/labelfont/_variant.py b/plotly/validators/contour/contours/labelfont/_variant.py index 1c5a8056a2..5f88d77989 100644 --- a/plotly/validators/contour/contours/labelfont/_variant.py +++ b/plotly/validators/contour/contours/labelfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contour.contours.labelfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/contours/labelfont/_weight.py b/plotly/validators/contour/contours/labelfont/_weight.py index 3a1289c5ee..949166f5a5 100644 --- a/plotly/validators/contour/contours/labelfont/_weight.py +++ b/plotly/validators/contour/contours/labelfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contour.contours.labelfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contour/hoverlabel/__init__.py b/plotly/validators/contour/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/contour/hoverlabel/__init__.py +++ b/plotly/validators/contour/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/contour/hoverlabel/_align.py b/plotly/validators/contour/hoverlabel/_align.py index 316d217282..07f330b747 100644 --- a/plotly/validators/contour/hoverlabel/_align.py +++ b/plotly/validators/contour/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="contour.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/contour/hoverlabel/_alignsrc.py b/plotly/validators/contour/hoverlabel/_alignsrc.py index 0b7ddaa372..d1edfdbb16 100644 --- a/plotly/validators/contour/hoverlabel/_alignsrc.py +++ b/plotly/validators/contour/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="contour.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/_bgcolor.py b/plotly/validators/contour/hoverlabel/_bgcolor.py index d5ec7ab604..7bc3891a33 100644 --- a/plotly/validators/contour/hoverlabel/_bgcolor.py +++ b/plotly/validators/contour/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="contour.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/contour/hoverlabel/_bgcolorsrc.py b/plotly/validators/contour/hoverlabel/_bgcolorsrc.py index 2be3067538..66bba41df4 100644 --- a/plotly/validators/contour/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/contour/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="contour.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/_bordercolor.py b/plotly/validators/contour/hoverlabel/_bordercolor.py index 69ab9b4202..e23375df2e 100644 --- a/plotly/validators/contour/hoverlabel/_bordercolor.py +++ b/plotly/validators/contour/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="contour.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/contour/hoverlabel/_bordercolorsrc.py b/plotly/validators/contour/hoverlabel/_bordercolorsrc.py index 75780f6fda..fcf5428b83 100644 --- a/plotly/validators/contour/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/contour/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="contour.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/_font.py b/plotly/validators/contour/hoverlabel/_font.py index b29c19615a..d245d261ca 100644 --- a/plotly/validators/contour/hoverlabel/_font.py +++ b/plotly/validators/contour/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="contour.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/contour/hoverlabel/_namelength.py b/plotly/validators/contour/hoverlabel/_namelength.py index c26fc4813f..346c3c0b43 100644 --- a/plotly/validators/contour/hoverlabel/_namelength.py +++ b/plotly/validators/contour/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="contour.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/contour/hoverlabel/_namelengthsrc.py b/plotly/validators/contour/hoverlabel/_namelengthsrc.py index d45f4b334e..18d33c6032 100644 --- a/plotly/validators/contour/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/contour/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="contour.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/__init__.py b/plotly/validators/contour/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/contour/hoverlabel/font/__init__.py +++ b/plotly/validators/contour/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/hoverlabel/font/_color.py b/plotly/validators/contour/hoverlabel/font/_color.py index 3ed213f92e..c6328ba4ef 100644 --- a/plotly/validators/contour/hoverlabel/font/_color.py +++ b/plotly/validators/contour/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contour.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/contour/hoverlabel/font/_colorsrc.py b/plotly/validators/contour/hoverlabel/font/_colorsrc.py index ca5b75f598..2523240dd4 100644 --- a/plotly/validators/contour/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/contour/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_family.py b/plotly/validators/contour/hoverlabel/font/_family.py index a8d4e36043..5b9e69c889 100644 --- a/plotly/validators/contour/hoverlabel/font/_family.py +++ b/plotly/validators/contour/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contour.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/contour/hoverlabel/font/_familysrc.py b/plotly/validators/contour/hoverlabel/font/_familysrc.py index 2a48489048..e6e863536e 100644 --- a/plotly/validators/contour/hoverlabel/font/_familysrc.py +++ b/plotly/validators/contour/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_lineposition.py b/plotly/validators/contour/hoverlabel/font/_lineposition.py index a3ede01fc2..d4669d16ee 100644 --- a/plotly/validators/contour/hoverlabel/font/_lineposition.py +++ b/plotly/validators/contour/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contour.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/contour/hoverlabel/font/_linepositionsrc.py b/plotly/validators/contour/hoverlabel/font/_linepositionsrc.py index 07b256f171..4b5a8aec6c 100644 --- a/plotly/validators/contour/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/contour/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="contour.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_shadow.py b/plotly/validators/contour/hoverlabel/font/_shadow.py index d006168692..e3f8b870fa 100644 --- a/plotly/validators/contour/hoverlabel/font/_shadow.py +++ b/plotly/validators/contour/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contour.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/contour/hoverlabel/font/_shadowsrc.py b/plotly/validators/contour/hoverlabel/font/_shadowsrc.py index b9c1bd5f20..ee74eeb4d9 100644 --- a/plotly/validators/contour/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/contour/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_size.py b/plotly/validators/contour/hoverlabel/font/_size.py index 973ab1d788..cd29aa0fa5 100644 --- a/plotly/validators/contour/hoverlabel/font/_size.py +++ b/plotly/validators/contour/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contour.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/contour/hoverlabel/font/_sizesrc.py b/plotly/validators/contour/hoverlabel/font/_sizesrc.py index 9ba5407254..7f1fd762a5 100644 --- a/plotly/validators/contour/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/contour/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_style.py b/plotly/validators/contour/hoverlabel/font/_style.py index a8dc82235a..62a152ee95 100644 --- a/plotly/validators/contour/hoverlabel/font/_style.py +++ b/plotly/validators/contour/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contour.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/contour/hoverlabel/font/_stylesrc.py b/plotly/validators/contour/hoverlabel/font/_stylesrc.py index 4a436fdeb4..f0b44e0767 100644 --- a/plotly/validators/contour/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/contour/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_textcase.py b/plotly/validators/contour/hoverlabel/font/_textcase.py index ecb8d01a04..c751c873b6 100644 --- a/plotly/validators/contour/hoverlabel/font/_textcase.py +++ b/plotly/validators/contour/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contour.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/contour/hoverlabel/font/_textcasesrc.py b/plotly/validators/contour/hoverlabel/font/_textcasesrc.py index f3d406f722..87a19c18f5 100644 --- a/plotly/validators/contour/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/contour/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_variant.py b/plotly/validators/contour/hoverlabel/font/_variant.py index 0c40e8b4a6..5aa1d21485 100644 --- a/plotly/validators/contour/hoverlabel/font/_variant.py +++ b/plotly/validators/contour/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contour.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/contour/hoverlabel/font/_variantsrc.py b/plotly/validators/contour/hoverlabel/font/_variantsrc.py index 95e6cf234e..113e10e0cf 100644 --- a/plotly/validators/contour/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/contour/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/hoverlabel/font/_weight.py b/plotly/validators/contour/hoverlabel/font/_weight.py index d2cfa94962..92530422ec 100644 --- a/plotly/validators/contour/hoverlabel/font/_weight.py +++ b/plotly/validators/contour/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contour.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/contour/hoverlabel/font/_weightsrc.py b/plotly/validators/contour/hoverlabel/font/_weightsrc.py index f24fbe0d59..b0e7b32b7e 100644 --- a/plotly/validators/contour/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/contour/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="contour.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contour/legendgrouptitle/__init__.py b/plotly/validators/contour/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/contour/legendgrouptitle/__init__.py +++ b/plotly/validators/contour/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/contour/legendgrouptitle/_font.py b/plotly/validators/contour/legendgrouptitle/_font.py index 52dce93bf0..858c59ebe4 100644 --- a/plotly/validators/contour/legendgrouptitle/_font.py +++ b/plotly/validators/contour/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="contour.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contour/legendgrouptitle/_text.py b/plotly/validators/contour/legendgrouptitle/_text.py index edabd90267..47a58c9e20 100644 --- a/plotly/validators/contour/legendgrouptitle/_text.py +++ b/plotly/validators/contour/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="contour.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/legendgrouptitle/font/__init__.py b/plotly/validators/contour/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contour/legendgrouptitle/font/__init__.py +++ b/plotly/validators/contour/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/legendgrouptitle/font/_color.py b/plotly/validators/contour/legendgrouptitle/font/_color.py index a3386cc231..47f943ada8 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_color.py +++ b/plotly/validators/contour/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contour.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/legendgrouptitle/font/_family.py b/plotly/validators/contour/legendgrouptitle/font/_family.py index 2cfce30355..2b31cae07f 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_family.py +++ b/plotly/validators/contour/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contour.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/legendgrouptitle/font/_lineposition.py b/plotly/validators/contour/legendgrouptitle/font/_lineposition.py index 271e0256d8..aab55fc2d0 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/contour/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contour.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contour/legendgrouptitle/font/_shadow.py b/plotly/validators/contour/legendgrouptitle/font/_shadow.py index e51c4b4249..db641b0ca2 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/contour/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contour.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/legendgrouptitle/font/_size.py b/plotly/validators/contour/legendgrouptitle/font/_size.py index 339b6ea13a..5763d63e0a 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_size.py +++ b/plotly/validators/contour/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contour.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/legendgrouptitle/font/_style.py b/plotly/validators/contour/legendgrouptitle/font/_style.py index 4563d55c28..d1e1cc5a13 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_style.py +++ b/plotly/validators/contour/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contour.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contour/legendgrouptitle/font/_textcase.py b/plotly/validators/contour/legendgrouptitle/font/_textcase.py index 52f9e805ca..da84b6dd0b 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/contour/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contour.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contour/legendgrouptitle/font/_variant.py b/plotly/validators/contour/legendgrouptitle/font/_variant.py index 7d6239066f..2216635d02 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_variant.py +++ b/plotly/validators/contour/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contour.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/legendgrouptitle/font/_weight.py b/plotly/validators/contour/legendgrouptitle/font/_weight.py index 9bdf25210e..952f06bc9e 100644 --- a/plotly/validators/contour/legendgrouptitle/font/_weight.py +++ b/plotly/validators/contour/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contour.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contour/line/__init__.py b/plotly/validators/contour/line/__init__.py index cc28ee67fe..13c597bfd2 100644 --- a/plotly/validators/contour/line/__init__.py +++ b/plotly/validators/contour/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._dash.DashValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/line/_color.py b/plotly/validators/contour/line/_color.py index f3006bc32e..30105e5509 100644 --- a/plotly/validators/contour/line/_color.py +++ b/plotly/validators/contour/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="contour.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style+colorbars"), **kwargs, ) diff --git a/plotly/validators/contour/line/_dash.py b/plotly/validators/contour/line/_dash.py index f1aeac4922..31ee8da93f 100644 --- a/plotly/validators/contour/line/_dash.py +++ b/plotly/validators/contour/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="contour.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/contour/line/_smoothing.py b/plotly/validators/contour/line/_smoothing.py index 22a9a7184f..7bde1dabd1 100644 --- a/plotly/validators/contour/line/_smoothing.py +++ b/plotly/validators/contour/line/_smoothing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__(self, plotly_name="smoothing", parent_name="contour.line", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contour/line/_width.py b/plotly/validators/contour/line/_width.py index e20ee1cd35..c81f1f5875 100644 --- a/plotly/validators/contour/line/_width.py +++ b/plotly/validators/contour/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="contour.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style+colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contour/stream/__init__.py b/plotly/validators/contour/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/contour/stream/__init__.py +++ b/plotly/validators/contour/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/contour/stream/_maxpoints.py b/plotly/validators/contour/stream/_maxpoints.py index 91660db059..d29115f5b4 100644 --- a/plotly/validators/contour/stream/_maxpoints.py +++ b/plotly/validators/contour/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="contour.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contour/stream/_token.py b/plotly/validators/contour/stream/_token.py index a9acbffc72..30a17ebb5c 100644 --- a/plotly/validators/contour/stream/_token.py +++ b/plotly/validators/contour/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="contour.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/textfont/__init__.py b/plotly/validators/contour/textfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contour/textfont/__init__.py +++ b/plotly/validators/contour/textfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contour/textfont/_color.py b/plotly/validators/contour/textfont/_color.py index f92b9c2686..0fdf1d3bd7 100644 --- a/plotly/validators/contour/textfont/_color.py +++ b/plotly/validators/contour/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="contour.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contour/textfont/_family.py b/plotly/validators/contour/textfont/_family.py index b75da91bf0..128e2c152f 100644 --- a/plotly/validators/contour/textfont/_family.py +++ b/plotly/validators/contour/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="contour.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contour/textfont/_lineposition.py b/plotly/validators/contour/textfont/_lineposition.py index cd62b8e50f..5b237f430e 100644 --- a/plotly/validators/contour/textfont/_lineposition.py +++ b/plotly/validators/contour/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contour.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contour/textfont/_shadow.py b/plotly/validators/contour/textfont/_shadow.py index 5ad71bce1f..af7270498f 100644 --- a/plotly/validators/contour/textfont/_shadow.py +++ b/plotly/validators/contour/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="contour.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contour/textfont/_size.py b/plotly/validators/contour/textfont/_size.py index 3e392b2dce..567eafdb17 100644 --- a/plotly/validators/contour/textfont/_size.py +++ b/plotly/validators/contour/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="contour.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contour/textfont/_style.py b/plotly/validators/contour/textfont/_style.py index e510ea2130..241432de2c 100644 --- a/plotly/validators/contour/textfont/_style.py +++ b/plotly/validators/contour/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="contour.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contour/textfont/_textcase.py b/plotly/validators/contour/textfont/_textcase.py index 6d18978100..7f4af79327 100644 --- a/plotly/validators/contour/textfont/_textcase.py +++ b/plotly/validators/contour/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contour.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contour/textfont/_variant.py b/plotly/validators/contour/textfont/_variant.py index d991fc820c..c4daa6c513 100644 --- a/plotly/validators/contour/textfont/_variant.py +++ b/plotly/validators/contour/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="contour.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/contour/textfont/_weight.py b/plotly/validators/contour/textfont/_weight.py index 19a8d50bef..9f25e59d8b 100644 --- a/plotly/validators/contour/textfont/_weight.py +++ b/plotly/validators/contour/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="contour.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contourcarpet/__init__.py b/plotly/validators/contourcarpet/__init__.py index b65146b937..549ec31e25 100644 --- a/plotly/validators/contourcarpet/__init__.py +++ b/plotly/validators/contourcarpet/__init__.py @@ -1,121 +1,63 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zorder import ZorderValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._yaxis import YaxisValidator - from ._xaxis import XaxisValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._transpose import TransposeValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._ncontours import NcontoursValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._fillcolor import FillcolorValidator - from ._db import DbValidator - from ._da import DaValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contours import ContoursValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._carpet import CarpetValidator - from ._btype import BtypeValidator - from ._bsrc import BsrcValidator - from ._b0 import B0Validator - from ._b import BValidator - from ._autocontour import AutocontourValidator - from ._autocolorscale import AutocolorscaleValidator - from ._atype import AtypeValidator - from ._asrc import AsrcValidator - from ._a0 import A0Validator - from ._a import AValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zorder.ZorderValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._yaxis.YaxisValidator", - "._xaxis.XaxisValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._transpose.TransposeValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._ncontours.NcontoursValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._fillcolor.FillcolorValidator", - "._db.DbValidator", - "._da.DaValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contours.ContoursValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._carpet.CarpetValidator", - "._btype.BtypeValidator", - "._bsrc.BsrcValidator", - "._b0.B0Validator", - "._b.BValidator", - "._autocontour.AutocontourValidator", - "._autocolorscale.AutocolorscaleValidator", - "._atype.AtypeValidator", - "._asrc.AsrcValidator", - "._a0.A0Validator", - "._a.AValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zorder.ZorderValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._ncontours.NcontoursValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._fillcolor.FillcolorValidator", + "._db.DbValidator", + "._da.DaValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._carpet.CarpetValidator", + "._btype.BtypeValidator", + "._bsrc.BsrcValidator", + "._b0.B0Validator", + "._b.BValidator", + "._autocontour.AutocontourValidator", + "._autocolorscale.AutocolorscaleValidator", + "._atype.AtypeValidator", + "._asrc.AsrcValidator", + "._a0.A0Validator", + "._a.AValidator", + ], +) diff --git a/plotly/validators/contourcarpet/_a.py b/plotly/validators/contourcarpet/_a.py index ba419ae44e..d7b9cc42dd 100644 --- a/plotly/validators/contourcarpet/_a.py +++ b/plotly/validators/contourcarpet/_a.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): +class AValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="a", parent_name="contourcarpet", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), **kwargs, diff --git a/plotly/validators/contourcarpet/_a0.py b/plotly/validators/contourcarpet/_a0.py index b868e35b95..c8e5a52dc1 100644 --- a/plotly/validators/contourcarpet/_a0.py +++ b/plotly/validators/contourcarpet/_a0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class A0Validator(_plotly_utils.basevalidators.AnyValidator): +class A0Validator(_bv.AnyValidator): def __init__(self, plotly_name="a0", parent_name="contourcarpet", **kwargs): - super(A0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/contourcarpet/_asrc.py b/plotly/validators/contourcarpet/_asrc.py index 272956a54e..f508c1eabf 100644 --- a/plotly/validators/contourcarpet/_asrc.py +++ b/plotly/validators/contourcarpet/_asrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="asrc", parent_name="contourcarpet", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_atype.py b/plotly/validators/contourcarpet/_atype.py index 685e958e43..0faa0d61df 100644 --- a/plotly/validators/contourcarpet/_atype.py +++ b/plotly/validators/contourcarpet/_atype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AtypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="atype", parent_name="contourcarpet", **kwargs): - super(AtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["array", "scaled"]), **kwargs, diff --git a/plotly/validators/contourcarpet/_autocolorscale.py b/plotly/validators/contourcarpet/_autocolorscale.py index b765176121..b830a82a5a 100644 --- a/plotly/validators/contourcarpet/_autocolorscale.py +++ b/plotly/validators/contourcarpet/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="contourcarpet", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contourcarpet/_autocontour.py b/plotly/validators/contourcarpet/_autocontour.py index c17015efe7..956580da10 100644 --- a/plotly/validators/contourcarpet/_autocontour.py +++ b/plotly/validators/contourcarpet/_autocontour.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocontourValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocontour", parent_name="contourcarpet", **kwargs ): - super(AutocontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contourcarpet/_b.py b/plotly/validators/contourcarpet/_b.py index c18760716e..fe66d52407 100644 --- a/plotly/validators/contourcarpet/_b.py +++ b/plotly/validators/contourcarpet/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): +class BValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="contourcarpet", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), **kwargs, diff --git a/plotly/validators/contourcarpet/_b0.py b/plotly/validators/contourcarpet/_b0.py index 46e7656569..5b1f5415c4 100644 --- a/plotly/validators/contourcarpet/_b0.py +++ b/plotly/validators/contourcarpet/_b0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class B0Validator(_plotly_utils.basevalidators.AnyValidator): +class B0Validator(_bv.AnyValidator): def __init__(self, plotly_name="b0", parent_name="contourcarpet", **kwargs): - super(B0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/contourcarpet/_bsrc.py b/plotly/validators/contourcarpet/_bsrc.py index cece078ee0..ce7cb4189b 100644 --- a/plotly/validators/contourcarpet/_bsrc.py +++ b/plotly/validators/contourcarpet/_bsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="bsrc", parent_name="contourcarpet", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_btype.py b/plotly/validators/contourcarpet/_btype.py index 4c2b716c73..4d09c04418 100644 --- a/plotly/validators/contourcarpet/_btype.py +++ b/plotly/validators/contourcarpet/_btype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BtypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="btype", parent_name="contourcarpet", **kwargs): - super(BtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["array", "scaled"]), **kwargs, diff --git a/plotly/validators/contourcarpet/_carpet.py b/plotly/validators/contourcarpet/_carpet.py index 38bc54ab4e..5308651df8 100644 --- a/plotly/validators/contourcarpet/_carpet.py +++ b/plotly/validators/contourcarpet/_carpet.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CarpetValidator(_plotly_utils.basevalidators.StringValidator): +class CarpetValidator(_bv.StringValidator): def __init__(self, plotly_name="carpet", parent_name="contourcarpet", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_coloraxis.py b/plotly/validators/contourcarpet/_coloraxis.py index 5bb9807e87..2e64eb83f3 100644 --- a/plotly/validators/contourcarpet/_coloraxis.py +++ b/plotly/validators/contourcarpet/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="contourcarpet", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/contourcarpet/_colorbar.py b/plotly/validators/contourcarpet/_colorbar.py index 998e515856..87edf54844 100644 --- a/plotly/validators/contourcarpet/_colorbar.py +++ b/plotly/validators/contourcarpet/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="contourcarpet", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.contour - carpet.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.contourcarpet.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - contourcarpet.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.contourcarpet.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/_colorscale.py b/plotly/validators/contourcarpet/_colorscale.py index 00798421c5..bf26110a9a 100644 --- a/plotly/validators/contourcarpet/_colorscale.py +++ b/plotly/validators/contourcarpet/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="contourcarpet", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/contourcarpet/_contours.py b/plotly/validators/contourcarpet/_contours.py index 96c3e6f06b..90a3caa8de 100644 --- a/plotly/validators/contourcarpet/_contours.py +++ b/plotly/validators/contourcarpet/_contours.py @@ -1,76 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContoursValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contours", parent_name="contourcarpet", **kwargs): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contours"), data_docs=kwargs.pop( "data_docs", """ - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "lines", - coloring is done on the contour lines. If - "none", no coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/_customdata.py b/plotly/validators/contourcarpet/_customdata.py index 45e1f33765..db6fa8fba7 100644 --- a/plotly/validators/contourcarpet/_customdata.py +++ b/plotly/validators/contourcarpet/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="contourcarpet", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_customdatasrc.py b/plotly/validators/contourcarpet/_customdatasrc.py index 1622e92c76..85e8b1b0d5 100644 --- a/plotly/validators/contourcarpet/_customdatasrc.py +++ b/plotly/validators/contourcarpet/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="contourcarpet", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_da.py b/plotly/validators/contourcarpet/_da.py index 3cb5e641fe..143eb0daea 100644 --- a/plotly/validators/contourcarpet/_da.py +++ b/plotly/validators/contourcarpet/_da.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DaValidator(_plotly_utils.basevalidators.NumberValidator): +class DaValidator(_bv.NumberValidator): def __init__(self, plotly_name="da", parent_name="contourcarpet", **kwargs): - super(DaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/contourcarpet/_db.py b/plotly/validators/contourcarpet/_db.py index 849bcb4304..9d728876f4 100644 --- a/plotly/validators/contourcarpet/_db.py +++ b/plotly/validators/contourcarpet/_db.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DbValidator(_plotly_utils.basevalidators.NumberValidator): +class DbValidator(_bv.NumberValidator): def __init__(self, plotly_name="db", parent_name="contourcarpet", **kwargs): - super(DbValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/contourcarpet/_fillcolor.py b/plotly/validators/contourcarpet/_fillcolor.py index 311cb221f8..775a2cafd8 100644 --- a/plotly/validators/contourcarpet/_fillcolor.py +++ b/plotly/validators/contourcarpet/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="contourcarpet", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop("colorscale_path", "contourcarpet.colorscale"), **kwargs, diff --git a/plotly/validators/contourcarpet/_hovertext.py b/plotly/validators/contourcarpet/_hovertext.py index f96971d7f4..6f9ce47bc0 100644 --- a/plotly/validators/contourcarpet/_hovertext.py +++ b/plotly/validators/contourcarpet/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HovertextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="hovertext", parent_name="contourcarpet", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_hovertextsrc.py b/plotly/validators/contourcarpet/_hovertextsrc.py index ca71455294..761b23b727 100644 --- a/plotly/validators/contourcarpet/_hovertextsrc.py +++ b/plotly/validators/contourcarpet/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="contourcarpet", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_ids.py b/plotly/validators/contourcarpet/_ids.py index b9e45d342c..214d930e1e 100644 --- a/plotly/validators/contourcarpet/_ids.py +++ b/plotly/validators/contourcarpet/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="contourcarpet", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_idssrc.py b/plotly/validators/contourcarpet/_idssrc.py index 3c9b151907..fabd490e60 100644 --- a/plotly/validators/contourcarpet/_idssrc.py +++ b/plotly/validators/contourcarpet/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="contourcarpet", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_legend.py b/plotly/validators/contourcarpet/_legend.py index 6389d68618..05e2a0da76 100644 --- a/plotly/validators/contourcarpet/_legend.py +++ b/plotly/validators/contourcarpet/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="contourcarpet", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/contourcarpet/_legendgroup.py b/plotly/validators/contourcarpet/_legendgroup.py index 7f9759f92a..ddf57d7a99 100644 --- a/plotly/validators/contourcarpet/_legendgroup.py +++ b/plotly/validators/contourcarpet/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="contourcarpet", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_legendgrouptitle.py b/plotly/validators/contourcarpet/_legendgrouptitle.py index 51cbe98b69..a8d27cc887 100644 --- a/plotly/validators/contourcarpet/_legendgrouptitle.py +++ b/plotly/validators/contourcarpet/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="contourcarpet", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/_legendrank.py b/plotly/validators/contourcarpet/_legendrank.py index 060fe935cf..1afbeb74ca 100644 --- a/plotly/validators/contourcarpet/_legendrank.py +++ b/plotly/validators/contourcarpet/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="contourcarpet", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_legendwidth.py b/plotly/validators/contourcarpet/_legendwidth.py index 5e9eddfe2a..49a7a36817 100644 --- a/plotly/validators/contourcarpet/_legendwidth.py +++ b/plotly/validators/contourcarpet/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="contourcarpet", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/_line.py b/plotly/validators/contourcarpet/_line.py index 819e39661c..e7437f3700 100644 --- a/plotly/validators/contourcarpet/_line.py +++ b/plotly/validators/contourcarpet/_line.py @@ -1,32 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="contourcarpet", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) Defaults - to 0.5 when `contours.type` is "levels". - Defaults to 2 when `contour.type` is - "constraint". """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/_meta.py b/plotly/validators/contourcarpet/_meta.py index ba6e325495..8b9372f9c0 100644 --- a/plotly/validators/contourcarpet/_meta.py +++ b/plotly/validators/contourcarpet/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="contourcarpet", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/contourcarpet/_metasrc.py b/plotly/validators/contourcarpet/_metasrc.py index 8a510c8c91..4d8ac48254 100644 --- a/plotly/validators/contourcarpet/_metasrc.py +++ b/plotly/validators/contourcarpet/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="contourcarpet", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_name.py b/plotly/validators/contourcarpet/_name.py index 3aa0b8bac6..37d996799a 100644 --- a/plotly/validators/contourcarpet/_name.py +++ b/plotly/validators/contourcarpet/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="contourcarpet", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_ncontours.py b/plotly/validators/contourcarpet/_ncontours.py index 7e9fc47bc7..30bb19d1fe 100644 --- a/plotly/validators/contourcarpet/_ncontours.py +++ b/plotly/validators/contourcarpet/_ncontours.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): +class NcontoursValidator(_bv.IntegerValidator): def __init__(self, plotly_name="ncontours", parent_name="contourcarpet", **kwargs): - super(NcontoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contourcarpet/_opacity.py b/plotly/validators/contourcarpet/_opacity.py index 290ae96401..111804ff61 100644 --- a/plotly/validators/contourcarpet/_opacity.py +++ b/plotly/validators/contourcarpet/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="contourcarpet", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contourcarpet/_reversescale.py b/plotly/validators/contourcarpet/_reversescale.py index 4ad64ce8de..caf613f7f0 100644 --- a/plotly/validators/contourcarpet/_reversescale.py +++ b/plotly/validators/contourcarpet/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="contourcarpet", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_showlegend.py b/plotly/validators/contourcarpet/_showlegend.py index a3ae37af56..f55c3eeb34 100644 --- a/plotly/validators/contourcarpet/_showlegend.py +++ b/plotly/validators/contourcarpet/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="contourcarpet", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_showscale.py b/plotly/validators/contourcarpet/_showscale.py index 4139ed3d85..39aa8b6487 100644 --- a/plotly/validators/contourcarpet/_showscale.py +++ b/plotly/validators/contourcarpet/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="contourcarpet", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_stream.py b/plotly/validators/contourcarpet/_stream.py index 0ac5aaf6b3..a350284172 100644 --- a/plotly/validators/contourcarpet/_stream.py +++ b/plotly/validators/contourcarpet/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="contourcarpet", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/_text.py b/plotly/validators/contourcarpet/_text.py index dd9087fa3f..77871eaf2b 100644 --- a/plotly/validators/contourcarpet/_text.py +++ b/plotly/validators/contourcarpet/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="contourcarpet", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_textsrc.py b/plotly/validators/contourcarpet/_textsrc.py index 528c04f14c..ac1c4062b4 100644 --- a/plotly/validators/contourcarpet/_textsrc.py +++ b/plotly/validators/contourcarpet/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="contourcarpet", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_transpose.py b/plotly/validators/contourcarpet/_transpose.py index bdba4b91b0..1ed366a191 100644 --- a/plotly/validators/contourcarpet/_transpose.py +++ b/plotly/validators/contourcarpet/_transpose.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): +class TransposeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="transpose", parent_name="contourcarpet", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_uid.py b/plotly/validators/contourcarpet/_uid.py index e7a45e0aa5..095924582a 100644 --- a/plotly/validators/contourcarpet/_uid.py +++ b/plotly/validators/contourcarpet/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="contourcarpet", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_uirevision.py b/plotly/validators/contourcarpet/_uirevision.py index e69f03b7f0..3ce489c57b 100644 --- a/plotly/validators/contourcarpet/_uirevision.py +++ b/plotly/validators/contourcarpet/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="contourcarpet", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_visible.py b/plotly/validators/contourcarpet/_visible.py index 96d54ba8ec..50b3b9847b 100644 --- a/plotly/validators/contourcarpet/_visible.py +++ b/plotly/validators/contourcarpet/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="contourcarpet", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/contourcarpet/_xaxis.py b/plotly/validators/contourcarpet/_xaxis.py index e585163e25..959175d035 100644 --- a/plotly/validators/contourcarpet/_xaxis.py +++ b/plotly/validators/contourcarpet/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="contourcarpet", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/contourcarpet/_yaxis.py b/plotly/validators/contourcarpet/_yaxis.py index c92598bffb..5fdff5f34b 100644 --- a/plotly/validators/contourcarpet/_yaxis.py +++ b/plotly/validators/contourcarpet/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="contourcarpet", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/contourcarpet/_z.py b/plotly/validators/contourcarpet/_z.py index 857f9c9a3e..1bbcf2dbef 100644 --- a/plotly/validators/contourcarpet/_z.py +++ b/plotly/validators/contourcarpet/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="contourcarpet", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_zauto.py b/plotly/validators/contourcarpet/_zauto.py index 865dc31c9c..3e8170df1f 100644 --- a/plotly/validators/contourcarpet/_zauto.py +++ b/plotly/validators/contourcarpet/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="contourcarpet", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contourcarpet/_zmax.py b/plotly/validators/contourcarpet/_zmax.py index 3380d90b4c..83235c8fbd 100644 --- a/plotly/validators/contourcarpet/_zmax.py +++ b/plotly/validators/contourcarpet/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="contourcarpet", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/contourcarpet/_zmid.py b/plotly/validators/contourcarpet/_zmid.py index e830931e79..577cfa79f6 100644 --- a/plotly/validators/contourcarpet/_zmid.py +++ b/plotly/validators/contourcarpet/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="contourcarpet", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/contourcarpet/_zmin.py b/plotly/validators/contourcarpet/_zmin.py index 313d4c589a..a666ecbf81 100644 --- a/plotly/validators/contourcarpet/_zmin.py +++ b/plotly/validators/contourcarpet/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="contourcarpet", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/contourcarpet/_zorder.py b/plotly/validators/contourcarpet/_zorder.py index 8b8d3fa67b..71f608e28d 100644 --- a/plotly/validators/contourcarpet/_zorder.py +++ b/plotly/validators/contourcarpet/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="contourcarpet", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/_zsrc.py b/plotly/validators/contourcarpet/_zsrc.py index 1cd2a5925e..78e5e85513 100644 --- a/plotly/validators/contourcarpet/_zsrc.py +++ b/plotly/validators/contourcarpet/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="contourcarpet", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/__init__.py b/plotly/validators/contourcarpet/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/contourcarpet/colorbar/__init__.py +++ b/plotly/validators/contourcarpet/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/contourcarpet/colorbar/_bgcolor.py b/plotly/validators/contourcarpet/colorbar/_bgcolor.py index 66e53aa1f7..0df61f6a2c 100644 --- a/plotly/validators/contourcarpet/colorbar/_bgcolor.py +++ b/plotly/validators/contourcarpet/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="contourcarpet.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_bordercolor.py b/plotly/validators/contourcarpet/colorbar/_bordercolor.py index 8208951bb5..de50a1746b 100644 --- a/plotly/validators/contourcarpet/colorbar/_bordercolor.py +++ b/plotly/validators/contourcarpet/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="contourcarpet.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_borderwidth.py b/plotly/validators/contourcarpet/colorbar/_borderwidth.py index fe47d05ca8..2477399758 100644 --- a/plotly/validators/contourcarpet/colorbar/_borderwidth.py +++ b/plotly/validators/contourcarpet/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="contourcarpet.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_dtick.py b/plotly/validators/contourcarpet/colorbar/_dtick.py index f3b4117780..b957e585a3 100644 --- a/plotly/validators/contourcarpet/colorbar/_dtick.py +++ b/plotly/validators/contourcarpet/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="contourcarpet.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_exponentformat.py b/plotly/validators/contourcarpet/colorbar/_exponentformat.py index 67b1086ffd..a9639000bf 100644 --- a/plotly/validators/contourcarpet/colorbar/_exponentformat.py +++ b/plotly/validators/contourcarpet/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="contourcarpet.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_labelalias.py b/plotly/validators/contourcarpet/colorbar/_labelalias.py index a4d489147d..437d0781f2 100644 --- a/plotly/validators/contourcarpet/colorbar/_labelalias.py +++ b/plotly/validators/contourcarpet/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="contourcarpet.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_len.py b/plotly/validators/contourcarpet/colorbar/_len.py index 513013ad21..b59ea4a7af 100644 --- a/plotly/validators/contourcarpet/colorbar/_len.py +++ b/plotly/validators/contourcarpet/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="contourcarpet.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_lenmode.py b/plotly/validators/contourcarpet/colorbar/_lenmode.py index c7ae6bdad3..da2edcaf15 100644 --- a/plotly/validators/contourcarpet/colorbar/_lenmode.py +++ b/plotly/validators/contourcarpet/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="contourcarpet.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_minexponent.py b/plotly/validators/contourcarpet/colorbar/_minexponent.py index 9f3a84e182..b81e64d6fe 100644 --- a/plotly/validators/contourcarpet/colorbar/_minexponent.py +++ b/plotly/validators/contourcarpet/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="contourcarpet.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_nticks.py b/plotly/validators/contourcarpet/colorbar/_nticks.py index ae55266d5e..8f4ad9e40d 100644 --- a/plotly/validators/contourcarpet/colorbar/_nticks.py +++ b/plotly/validators/contourcarpet/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="contourcarpet.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_orientation.py b/plotly/validators/contourcarpet/colorbar/_orientation.py index 7a42e3c6a2..9859462e47 100644 --- a/plotly/validators/contourcarpet/colorbar/_orientation.py +++ b/plotly/validators/contourcarpet/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="contourcarpet.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_outlinecolor.py b/plotly/validators/contourcarpet/colorbar/_outlinecolor.py index 8ec398f85c..9457efad46 100644 --- a/plotly/validators/contourcarpet/colorbar/_outlinecolor.py +++ b/plotly/validators/contourcarpet/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="contourcarpet.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_outlinewidth.py b/plotly/validators/contourcarpet/colorbar/_outlinewidth.py index cd25e5faf2..8b04ccd1e3 100644 --- a/plotly/validators/contourcarpet/colorbar/_outlinewidth.py +++ b/plotly/validators/contourcarpet/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="contourcarpet.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_separatethousands.py b/plotly/validators/contourcarpet/colorbar/_separatethousands.py index d663314dfe..29de012382 100644 --- a/plotly/validators/contourcarpet/colorbar/_separatethousands.py +++ b/plotly/validators/contourcarpet/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="contourcarpet.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_showexponent.py b/plotly/validators/contourcarpet/colorbar/_showexponent.py index 6f546bcc31..889806c5af 100644 --- a/plotly/validators/contourcarpet/colorbar/_showexponent.py +++ b/plotly/validators/contourcarpet/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="contourcarpet.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_showticklabels.py b/plotly/validators/contourcarpet/colorbar/_showticklabels.py index 5e3bf7f8ec..abb9ad9499 100644 --- a/plotly/validators/contourcarpet/colorbar/_showticklabels.py +++ b/plotly/validators/contourcarpet/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="contourcarpet.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_showtickprefix.py b/plotly/validators/contourcarpet/colorbar/_showtickprefix.py index 0439dcf6f6..e41e1a51e0 100644 --- a/plotly/validators/contourcarpet/colorbar/_showtickprefix.py +++ b/plotly/validators/contourcarpet/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="contourcarpet.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_showticksuffix.py b/plotly/validators/contourcarpet/colorbar/_showticksuffix.py index e05583ee18..acdf676f0a 100644 --- a/plotly/validators/contourcarpet/colorbar/_showticksuffix.py +++ b/plotly/validators/contourcarpet/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="contourcarpet.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_thickness.py b/plotly/validators/contourcarpet/colorbar/_thickness.py index 8df1b34e40..8eb12858de 100644 --- a/plotly/validators/contourcarpet/colorbar/_thickness.py +++ b/plotly/validators/contourcarpet/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="contourcarpet.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_thicknessmode.py b/plotly/validators/contourcarpet/colorbar/_thicknessmode.py index 6f5ec4118a..ff4fa99c53 100644 --- a/plotly/validators/contourcarpet/colorbar/_thicknessmode.py +++ b/plotly/validators/contourcarpet/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="contourcarpet.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_tick0.py b/plotly/validators/contourcarpet/colorbar/_tick0.py index 0e4c016067..3a671f0f0c 100644 --- a/plotly/validators/contourcarpet/colorbar/_tick0.py +++ b/plotly/validators/contourcarpet/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="contourcarpet.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_tickangle.py b/plotly/validators/contourcarpet/colorbar/_tickangle.py index ef2f769b63..5293abc9ad 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickangle.py +++ b/plotly/validators/contourcarpet/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_tickcolor.py b/plotly/validators/contourcarpet/colorbar/_tickcolor.py index 6eb99c539a..efe23c5e7b 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickcolor.py +++ b/plotly/validators/contourcarpet/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_tickfont.py b/plotly/validators/contourcarpet/colorbar/_tickfont.py index 006b590461..af1b3bca3a 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickfont.py +++ b/plotly/validators/contourcarpet/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_tickformat.py b/plotly/validators/contourcarpet/colorbar/_tickformat.py index 139b461d4f..a78d17b8e2 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickformat.py +++ b/plotly/validators/contourcarpet/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py b/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py index 2ff0759855..2e98f42e96 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/contourcarpet/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="contourcarpet.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/contourcarpet/colorbar/_tickformatstops.py b/plotly/validators/contourcarpet/colorbar/_tickformatstops.py index c437c9f7ed..aa6a1cda98 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickformatstops.py +++ b/plotly/validators/contourcarpet/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="contourcarpet.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_ticklabeloverflow.py b/plotly/validators/contourcarpet/colorbar/_ticklabeloverflow.py index d8c8e22682..7a8e97c0c9 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/contourcarpet/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="contourcarpet.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_ticklabelposition.py b/plotly/validators/contourcarpet/colorbar/_ticklabelposition.py index 0f3201f3ac..65029c1e65 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticklabelposition.py +++ b/plotly/validators/contourcarpet/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="contourcarpet.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/contourcarpet/colorbar/_ticklabelstep.py b/plotly/validators/contourcarpet/colorbar/_ticklabelstep.py index ab140acf34..d957a412fb 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticklabelstep.py +++ b/plotly/validators/contourcarpet/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="contourcarpet.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_ticklen.py b/plotly/validators/contourcarpet/colorbar/_ticklen.py index 4a8304b1bd..8441e54219 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticklen.py +++ b/plotly/validators/contourcarpet/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="contourcarpet.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_tickmode.py b/plotly/validators/contourcarpet/colorbar/_tickmode.py index 6f055103b0..7b03af34e3 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickmode.py +++ b/plotly/validators/contourcarpet/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/contourcarpet/colorbar/_tickprefix.py b/plotly/validators/contourcarpet/colorbar/_tickprefix.py index 9f956d7508..52d45572d1 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickprefix.py +++ b/plotly/validators/contourcarpet/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_ticks.py b/plotly/validators/contourcarpet/colorbar/_ticks.py index 7c5e6f8255..b3a35870c1 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticks.py +++ b/plotly/validators/contourcarpet/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="contourcarpet.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_ticksuffix.py b/plotly/validators/contourcarpet/colorbar/_ticksuffix.py index aad6a41c39..fd1cc04ce5 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticksuffix.py +++ b/plotly/validators/contourcarpet/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="contourcarpet.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_ticktext.py b/plotly/validators/contourcarpet/colorbar/_ticktext.py index 7bb0fab9d2..b42820907d 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticktext.py +++ b/plotly/validators/contourcarpet/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="contourcarpet.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py b/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py index e6f3f5d730..97a2db7ca4 100644 --- a/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py +++ b/plotly/validators/contourcarpet/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="contourcarpet.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_tickvals.py b/plotly/validators/contourcarpet/colorbar/_tickvals.py index 27d527ac84..4160e1da96 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickvals.py +++ b/plotly/validators/contourcarpet/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py b/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py index 7e2233363b..60b1f76a08 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py +++ b/plotly/validators/contourcarpet/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_tickwidth.py b/plotly/validators/contourcarpet/colorbar/_tickwidth.py index 3f57a1c6c6..241bacc0d7 100644 --- a/plotly/validators/contourcarpet/colorbar/_tickwidth.py +++ b/plotly/validators/contourcarpet/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="contourcarpet.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_title.py b/plotly/validators/contourcarpet/colorbar/_title.py index c7b29ac4eb..3b0121edae 100644 --- a/plotly/validators/contourcarpet/colorbar/_title.py +++ b/plotly/validators/contourcarpet/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="contourcarpet.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_x.py b/plotly/validators/contourcarpet/colorbar/_x.py index 11beaef6fc..e3923315c8 100644 --- a/plotly/validators/contourcarpet/colorbar/_x.py +++ b/plotly/validators/contourcarpet/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="contourcarpet.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_xanchor.py b/plotly/validators/contourcarpet/colorbar/_xanchor.py index 9ad4ab1923..60696d396e 100644 --- a/plotly/validators/contourcarpet/colorbar/_xanchor.py +++ b/plotly/validators/contourcarpet/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="contourcarpet.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_xpad.py b/plotly/validators/contourcarpet/colorbar/_xpad.py index 5a5d104d3b..cc5bab786a 100644 --- a/plotly/validators/contourcarpet/colorbar/_xpad.py +++ b/plotly/validators/contourcarpet/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="contourcarpet.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_xref.py b/plotly/validators/contourcarpet/colorbar/_xref.py index ce2aa8e02c..89a4493027 100644 --- a/plotly/validators/contourcarpet/colorbar/_xref.py +++ b/plotly/validators/contourcarpet/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="contourcarpet.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_y.py b/plotly/validators/contourcarpet/colorbar/_y.py index d602f4e7cf..977cd5b16d 100644 --- a/plotly/validators/contourcarpet/colorbar/_y.py +++ b/plotly/validators/contourcarpet/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="contourcarpet.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/_yanchor.py b/plotly/validators/contourcarpet/colorbar/_yanchor.py index b1be18aa30..14f6bb10da 100644 --- a/plotly/validators/contourcarpet/colorbar/_yanchor.py +++ b/plotly/validators/contourcarpet/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="contourcarpet.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_ypad.py b/plotly/validators/contourcarpet/colorbar/_ypad.py index 53b745ad8e..f882e46777 100644 --- a/plotly/validators/contourcarpet/colorbar/_ypad.py +++ b/plotly/validators/contourcarpet/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="contourcarpet.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/_yref.py b/plotly/validators/contourcarpet/colorbar/_yref.py index a7703fd899..dcadf39b8b 100644 --- a/plotly/validators/contourcarpet/colorbar/_yref.py +++ b/plotly/validators/contourcarpet/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="contourcarpet.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py b/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_color.py b/plotly/validators/contourcarpet/colorbar/tickfont/_color.py index 8de80d7fbd..654ee4a8c5 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_color.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_family.py b/plotly/validators/contourcarpet/colorbar/tickfont/_family.py index 3e0f23b0aa..9606c2b8d3 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_family.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_lineposition.py b/plotly/validators/contourcarpet/colorbar/tickfont/_lineposition.py index 1f3e5f9bd2..17da3df44c 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_shadow.py b/plotly/validators/contourcarpet/colorbar/tickfont/_shadow.py index 88feba0562..89174fbbef 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_shadow.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_size.py b/plotly/validators/contourcarpet/colorbar/tickfont/_size.py index 64215008bd..fcf02dd43f 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_size.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_style.py b/plotly/validators/contourcarpet/colorbar/tickfont/_style.py index e0f5b4f60f..1342ea885b 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_style.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_textcase.py b/plotly/validators/contourcarpet/colorbar/tickfont/_textcase.py index a5731b9f83..3ccc068afb 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_textcase.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_variant.py b/plotly/validators/contourcarpet/colorbar/tickfont/_variant.py index e0bac200ff..6f8f07223f 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_variant.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/contourcarpet/colorbar/tickfont/_weight.py b/plotly/validators/contourcarpet/colorbar/tickfont/_weight.py index 18f3315ab0..a2ddf3364c 100644 --- a/plotly/validators/contourcarpet/colorbar/tickfont/_weight.py +++ b/plotly/validators/contourcarpet/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contourcarpet.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py b/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/contourcarpet/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py index 0f76729b10..c962f5adc7 100644 --- a/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/contourcarpet/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="contourcarpet.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py b/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py index e0f35977c1..fade60a84a 100644 --- a/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/contourcarpet/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="contourcarpet.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py b/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py index c3afd39b9f..0c74f0bbb5 100644 --- a/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py +++ b/plotly/validators/contourcarpet/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="contourcarpet.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py index 60cad1da79..937a379cc4 100644 --- a/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/contourcarpet/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="contourcarpet.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py b/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py index 0697bd13d7..a3a167b896 100644 --- a/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py +++ b/plotly/validators/contourcarpet/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="contourcarpet.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/title/__init__.py b/plotly/validators/contourcarpet/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/contourcarpet/colorbar/title/__init__.py +++ b/plotly/validators/contourcarpet/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/contourcarpet/colorbar/title/_font.py b/plotly/validators/contourcarpet/colorbar/title/_font.py index 436b69259b..993f92beea 100644 --- a/plotly/validators/contourcarpet/colorbar/title/_font.py +++ b/plotly/validators/contourcarpet/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="contourcarpet.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/title/_side.py b/plotly/validators/contourcarpet/colorbar/title/_side.py index c4f507575a..c11d45a8cf 100644 --- a/plotly/validators/contourcarpet/colorbar/title/_side.py +++ b/plotly/validators/contourcarpet/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="contourcarpet.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/title/_text.py b/plotly/validators/contourcarpet/colorbar/title/_text.py index d90f44b009..5de1117060 100644 --- a/plotly/validators/contourcarpet/colorbar/title/_text.py +++ b/plotly/validators/contourcarpet/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="contourcarpet.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/title/font/__init__.py b/plotly/validators/contourcarpet/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/__init__.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_color.py b/plotly/validators/contourcarpet/colorbar/title/font/_color.py index 881dd461cf..5df549fa8e 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_color.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_family.py b/plotly/validators/contourcarpet/colorbar/title/font/_family.py index df4c72aa3d..a23e9273c3 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_family.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_lineposition.py b/plotly/validators/contourcarpet/colorbar/title/font/_lineposition.py index e4d02dc5ad..02fc8543ac 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_lineposition.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_shadow.py b/plotly/validators/contourcarpet/colorbar/title/font/_shadow.py index 4c04ba56eb..803b2fa216 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_shadow.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_size.py b/plotly/validators/contourcarpet/colorbar/title/font/_size.py index cce9ef4d71..110544ad92 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_size.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_style.py b/plotly/validators/contourcarpet/colorbar/title/font/_style.py index 12dfb435aa..fa2e69241a 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_style.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_textcase.py b/plotly/validators/contourcarpet/colorbar/title/font/_textcase.py index 49c59ae2a3..580ba39745 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_textcase.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_variant.py b/plotly/validators/contourcarpet/colorbar/title/font/_variant.py index 36414e27ac..fe085db43c 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_variant.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/contourcarpet/colorbar/title/font/_weight.py b/plotly/validators/contourcarpet/colorbar/title/font/_weight.py index 1f5db3de70..160ceb940d 100644 --- a/plotly/validators/contourcarpet/colorbar/title/font/_weight.py +++ b/plotly/validators/contourcarpet/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contourcarpet.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contourcarpet/contours/__init__.py b/plotly/validators/contourcarpet/contours/__init__.py index 0650ad574b..230a907cd7 100644 --- a/plotly/validators/contourcarpet/contours/__init__.py +++ b/plotly/validators/contourcarpet/contours/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._type import TypeValidator - from ._start import StartValidator - from ._size import SizeValidator - from ._showlines import ShowlinesValidator - from ._showlabels import ShowlabelsValidator - from ._operation import OperationValidator - from ._labelformat import LabelformatValidator - from ._labelfont import LabelfontValidator - from ._end import EndValidator - from ._coloring import ColoringValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._type.TypeValidator", - "._start.StartValidator", - "._size.SizeValidator", - "._showlines.ShowlinesValidator", - "._showlabels.ShowlabelsValidator", - "._operation.OperationValidator", - "._labelformat.LabelformatValidator", - "._labelfont.LabelfontValidator", - "._end.EndValidator", - "._coloring.ColoringValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._type.TypeValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._showlines.ShowlinesValidator", + "._showlabels.ShowlabelsValidator", + "._operation.OperationValidator", + "._labelformat.LabelformatValidator", + "._labelfont.LabelfontValidator", + "._end.EndValidator", + "._coloring.ColoringValidator", + ], +) diff --git a/plotly/validators/contourcarpet/contours/_coloring.py b/plotly/validators/contourcarpet/contours/_coloring.py index 029a8a7ef5..2ccce5b32c 100644 --- a/plotly/validators/contourcarpet/contours/_coloring.py +++ b/plotly/validators/contourcarpet/contours/_coloring.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ColoringValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="coloring", parent_name="contourcarpet.contours", **kwargs ): - super(ColoringValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fill", "lines", "none"]), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/_end.py b/plotly/validators/contourcarpet/contours/_end.py index 900f906cd0..2d18df2ae6 100644 --- a/plotly/validators/contourcarpet/contours/_end.py +++ b/plotly/validators/contourcarpet/contours/_end.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.NumberValidator): +class EndValidator(_bv.NumberValidator): def __init__( self, plotly_name="end", parent_name="contourcarpet.contours", **kwargs ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/_labelfont.py b/plotly/validators/contourcarpet/contours/_labelfont.py index 19a5e5ffb4..05daa97603 100644 --- a/plotly/validators/contourcarpet/contours/_labelfont.py +++ b/plotly/validators/contourcarpet/contours/_labelfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="labelfont", parent_name="contourcarpet.contours", **kwargs ): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Labelfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/_labelformat.py b/plotly/validators/contourcarpet/contours/_labelformat.py index a6c5ae42ec..41327ad2eb 100644 --- a/plotly/validators/contourcarpet/contours/_labelformat.py +++ b/plotly/validators/contourcarpet/contours/_labelformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): +class LabelformatValidator(_bv.StringValidator): def __init__( self, plotly_name="labelformat", parent_name="contourcarpet.contours", **kwargs ): - super(LabelformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/contours/_operation.py b/plotly/validators/contourcarpet/contours/_operation.py index 0c7dc8ceb0..25c494beea 100644 --- a/plotly/validators/contourcarpet/contours/_operation.py +++ b/plotly/validators/contourcarpet/contours/_operation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OperationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="operation", parent_name="contourcarpet.contours", **kwargs ): - super(OperationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/contourcarpet/contours/_showlabels.py b/plotly/validators/contourcarpet/contours/_showlabels.py index ae47fa1e2c..35bdceddf3 100644 --- a/plotly/validators/contourcarpet/contours/_showlabels.py +++ b/plotly/validators/contourcarpet/contours/_showlabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlabels", parent_name="contourcarpet.contours", **kwargs ): - super(ShowlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/contours/_showlines.py b/plotly/validators/contourcarpet/contours/_showlines.py index 0fb013b64a..a3cfd92bf3 100644 --- a/plotly/validators/contourcarpet/contours/_showlines.py +++ b/plotly/validators/contourcarpet/contours/_showlines.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlinesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlines", parent_name="contourcarpet.contours", **kwargs ): - super(ShowlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/contours/_size.py b/plotly/validators/contourcarpet/contours/_size.py index 5b6ba1b5e7..423593f42c 100644 --- a/plotly/validators/contourcarpet/contours/_size.py +++ b/plotly/validators/contourcarpet/contours/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contourcarpet.contours", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contourcarpet/contours/_start.py b/plotly/validators/contourcarpet/contours/_start.py index 3782b69a7d..9a632f890d 100644 --- a/plotly/validators/contourcarpet/contours/_start.py +++ b/plotly/validators/contourcarpet/contours/_start.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__( self, plotly_name="start", parent_name="contourcarpet.contours", **kwargs ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/_type.py b/plotly/validators/contourcarpet/contours/_type.py index 787a9475a9..9c4f87f57b 100644 --- a/plotly/validators/contourcarpet/contours/_type.py +++ b/plotly/validators/contourcarpet/contours/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="contourcarpet.contours", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["levels", "constraint"]), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/_value.py b/plotly/validators/contourcarpet/contours/_value.py index af740acacb..b29900f2d1 100644 --- a/plotly/validators/contourcarpet/contours/_value.py +++ b/plotly/validators/contourcarpet/contours/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.AnyValidator): +class ValueValidator(_bv.AnyValidator): def __init__( self, plotly_name="value", parent_name="contourcarpet.contours", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/contours/labelfont/__init__.py b/plotly/validators/contourcarpet/contours/labelfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/__init__.py +++ b/plotly/validators/contourcarpet/contours/labelfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contourcarpet/contours/labelfont/_color.py b/plotly/validators/contourcarpet/contours/labelfont/_color.py index ece189cc3e..c5c1e59dfa 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_color.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/contours/labelfont/_family.py b/plotly/validators/contourcarpet/contours/labelfont/_family.py index 6263bcd069..c6bfebdc84 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_family.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contourcarpet/contours/labelfont/_lineposition.py b/plotly/validators/contourcarpet/contours/labelfont/_lineposition.py index 58948a2486..83179f3ee0 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_lineposition.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contourcarpet/contours/labelfont/_shadow.py b/plotly/validators/contourcarpet/contours/labelfont/_shadow.py index 149ef23611..e81bd49b2a 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_shadow.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/contours/labelfont/_size.py b/plotly/validators/contourcarpet/contours/labelfont/_size.py index 01ccf5ca6d..e2fc2c4fa5 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_size.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/labelfont/_style.py b/plotly/validators/contourcarpet/contours/labelfont/_style.py index 31278931eb..8fb0282c58 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_style.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/labelfont/_textcase.py b/plotly/validators/contourcarpet/contours/labelfont/_textcase.py index 2cfd9859e1..2898e11522 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_textcase.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contourcarpet/contours/labelfont/_variant.py b/plotly/validators/contourcarpet/contours/labelfont/_variant.py index 4fcadb543f..c88b418b17 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_variant.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/contourcarpet/contours/labelfont/_weight.py b/plotly/validators/contourcarpet/contours/labelfont/_weight.py index 62bd65c01f..937cbb4312 100644 --- a/plotly/validators/contourcarpet/contours/labelfont/_weight.py +++ b/plotly/validators/contourcarpet/contours/labelfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contourcarpet.contours.labelfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contourcarpet/legendgrouptitle/__init__.py b/plotly/validators/contourcarpet/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/__init__.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/contourcarpet/legendgrouptitle/_font.py b/plotly/validators/contourcarpet/legendgrouptitle/_font.py index 97a78ffaa1..a92d954e9a 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/_font.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="contourcarpet.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/contourcarpet/legendgrouptitle/_text.py b/plotly/validators/contourcarpet/legendgrouptitle/_text.py index d7583625ed..70b82bb773 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/_text.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="contourcarpet.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/__init__.py b/plotly/validators/contourcarpet/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/__init__.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_color.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_color.py index c63b7692e5..5dbb35fe98 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_color.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_family.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_family.py index b3e79d2b08..9bca64e4e2 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_family.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_lineposition.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_lineposition.py index 1fd1f9e1f7..281fc5bf35 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_shadow.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_shadow.py index 1db76b29c7..0b784c62b9 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_size.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_size.py index ef03e97be5..cb85089b2f 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_size.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_style.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_style.py index c1879d06c8..621957c348 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_style.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_textcase.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_textcase.py index ceba88c475..7ba8eb408a 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_variant.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_variant.py index b35caa60cd..81fabd22c4 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_variant.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/contourcarpet/legendgrouptitle/font/_weight.py b/plotly/validators/contourcarpet/legendgrouptitle/font/_weight.py index d695aec4bd..18ce0efb22 100644 --- a/plotly/validators/contourcarpet/legendgrouptitle/font/_weight.py +++ b/plotly/validators/contourcarpet/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="contourcarpet.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/contourcarpet/line/__init__.py b/plotly/validators/contourcarpet/line/__init__.py index cc28ee67fe..13c597bfd2 100644 --- a/plotly/validators/contourcarpet/line/__init__.py +++ b/plotly/validators/contourcarpet/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._dash.DashValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/contourcarpet/line/_color.py b/plotly/validators/contourcarpet/line/_color.py index 51c153b830..a0aa0b2e80 100644 --- a/plotly/validators/contourcarpet/line/_color.py +++ b/plotly/validators/contourcarpet/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="contourcarpet.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style+colorbars"), **kwargs, ) diff --git a/plotly/validators/contourcarpet/line/_dash.py b/plotly/validators/contourcarpet/line/_dash.py index 35ce25b3d7..9ad3e03ece 100644 --- a/plotly/validators/contourcarpet/line/_dash.py +++ b/plotly/validators/contourcarpet/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="contourcarpet.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/contourcarpet/line/_smoothing.py b/plotly/validators/contourcarpet/line/_smoothing.py index 8f24171fca..77d4fc45af 100644 --- a/plotly/validators/contourcarpet/line/_smoothing.py +++ b/plotly/validators/contourcarpet/line/_smoothing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="contourcarpet.line", **kwargs ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contourcarpet/line/_width.py b/plotly/validators/contourcarpet/line/_width.py index b54bb20a0e..28c10f25d9 100644 --- a/plotly/validators/contourcarpet/line/_width.py +++ b/plotly/validators/contourcarpet/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="contourcarpet.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style+colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/contourcarpet/stream/__init__.py b/plotly/validators/contourcarpet/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/contourcarpet/stream/__init__.py +++ b/plotly/validators/contourcarpet/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/contourcarpet/stream/_maxpoints.py b/plotly/validators/contourcarpet/stream/_maxpoints.py index 174cbbb3d4..b8ff7a4ed3 100644 --- a/plotly/validators/contourcarpet/stream/_maxpoints.py +++ b/plotly/validators/contourcarpet/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="contourcarpet.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/contourcarpet/stream/_token.py b/plotly/validators/contourcarpet/stream/_token.py index 3d57ec4533..0414d66505 100644 --- a/plotly/validators/contourcarpet/stream/_token.py +++ b/plotly/validators/contourcarpet/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="contourcarpet.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymap/__init__.py b/plotly/validators/densitymap/__init__.py index 20b2797e60..7ccb6f0042 100644 --- a/plotly/validators/densitymap/__init__.py +++ b/plotly/validators/densitymap/__init__.py @@ -1,107 +1,56 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._radiussrc import RadiussrcValidator - from ._radius import RadiusValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lonsrc import LonsrcValidator - from ._lon import LonValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._latsrc import LatsrcValidator - from ._lat import LatValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._below import BelowValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._radiussrc.RadiussrcValidator", - "._radius.RadiusValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lonsrc.LonsrcValidator", - "._lon.LonValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._latsrc.LatsrcValidator", - "._lat.LatValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._below.BelowValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._radiussrc.RadiussrcValidator", + "._radius.RadiusValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._below.BelowValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/densitymap/_autocolorscale.py b/plotly/validators/densitymap/_autocolorscale.py index 261792b192..cfd932a9f8 100644 --- a/plotly/validators/densitymap/_autocolorscale.py +++ b/plotly/validators/densitymap/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="densitymap", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/densitymap/_below.py b/plotly/validators/densitymap/_below.py index fdc875efe6..2c73377525 100644 --- a/plotly/validators/densitymap/_below.py +++ b/plotly/validators/densitymap/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="densitymap", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/densitymap/_coloraxis.py b/plotly/validators/densitymap/_coloraxis.py index 65ea5618ec..1d86c2f481 100644 --- a/plotly/validators/densitymap/_coloraxis.py +++ b/plotly/validators/densitymap/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="densitymap", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/densitymap/_colorbar.py b/plotly/validators/densitymap/_colorbar.py index 9ce1d184c0..49620944e3 100644 --- a/plotly/validators/densitymap/_colorbar.py +++ b/plotly/validators/densitymap/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="densitymap", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.density - map.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.densitymap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of densitymap.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymap.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/densitymap/_colorscale.py b/plotly/validators/densitymap/_colorscale.py index de43b33c77..763b04a7c7 100644 --- a/plotly/validators/densitymap/_colorscale.py +++ b/plotly/validators/densitymap/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="densitymap", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/densitymap/_customdata.py b/plotly/validators/densitymap/_customdata.py index 3888bc7f3d..f4fe898831 100644 --- a/plotly/validators/densitymap/_customdata.py +++ b/plotly/validators/densitymap/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="densitymap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymap/_customdatasrc.py b/plotly/validators/densitymap/_customdatasrc.py index 226f1e56fe..76a43b7b83 100644 --- a/plotly/validators/densitymap/_customdatasrc.py +++ b/plotly/validators/densitymap/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="densitymap", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_hoverinfo.py b/plotly/validators/densitymap/_hoverinfo.py index cc43e269e6..a56465a52e 100644 --- a/plotly/validators/densitymap/_hoverinfo.py +++ b/plotly/validators/densitymap/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="densitymap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/densitymap/_hoverinfosrc.py b/plotly/validators/densitymap/_hoverinfosrc.py index 7be3e5cc46..4eb24ca165 100644 --- a/plotly/validators/densitymap/_hoverinfosrc.py +++ b/plotly/validators/densitymap/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="densitymap", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_hoverlabel.py b/plotly/validators/densitymap/_hoverlabel.py index 378d347c95..e63482cf0b 100644 --- a/plotly/validators/densitymap/_hoverlabel.py +++ b/plotly/validators/densitymap/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="densitymap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/densitymap/_hovertemplate.py b/plotly/validators/densitymap/_hovertemplate.py index 1b5faa6295..8de542b098 100644 --- a/plotly/validators/densitymap/_hovertemplate.py +++ b/plotly/validators/densitymap/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="densitymap", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymap/_hovertemplatesrc.py b/plotly/validators/densitymap/_hovertemplatesrc.py index f7aa78f2de..d482c1dd1e 100644 --- a/plotly/validators/densitymap/_hovertemplatesrc.py +++ b/plotly/validators/densitymap/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="densitymap", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_hovertext.py b/plotly/validators/densitymap/_hovertext.py index db4426160e..52b676f99c 100644 --- a/plotly/validators/densitymap/_hovertext.py +++ b/plotly/validators/densitymap/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="densitymap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/densitymap/_hovertextsrc.py b/plotly/validators/densitymap/_hovertextsrc.py index df48a20638..c934648975 100644 --- a/plotly/validators/densitymap/_hovertextsrc.py +++ b/plotly/validators/densitymap/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="densitymap", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_ids.py b/plotly/validators/densitymap/_ids.py index a43157ae9d..dddc21d00a 100644 --- a/plotly/validators/densitymap/_ids.py +++ b/plotly/validators/densitymap/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="densitymap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymap/_idssrc.py b/plotly/validators/densitymap/_idssrc.py index d0a668c4c8..77d6ea3275 100644 --- a/plotly/validators/densitymap/_idssrc.py +++ b/plotly/validators/densitymap/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="densitymap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_lat.py b/plotly/validators/densitymap/_lat.py index 661ecd8801..3681cd2c5f 100644 --- a/plotly/validators/densitymap/_lat.py +++ b/plotly/validators/densitymap/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lat", parent_name="densitymap", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymap/_latsrc.py b/plotly/validators/densitymap/_latsrc.py index c529788ce0..5e23719549 100644 --- a/plotly/validators/densitymap/_latsrc.py +++ b/plotly/validators/densitymap/_latsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="latsrc", parent_name="densitymap", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_legend.py b/plotly/validators/densitymap/_legend.py index af6a2fa50f..7915fd7526 100644 --- a/plotly/validators/densitymap/_legend.py +++ b/plotly/validators/densitymap/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="densitymap", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/densitymap/_legendgroup.py b/plotly/validators/densitymap/_legendgroup.py index 20ded0e45e..2e1bac89f2 100644 --- a/plotly/validators/densitymap/_legendgroup.py +++ b/plotly/validators/densitymap/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="densitymap", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/_legendgrouptitle.py b/plotly/validators/densitymap/_legendgrouptitle.py index cf0424fed8..adbc1b70e0 100644 --- a/plotly/validators/densitymap/_legendgrouptitle.py +++ b/plotly/validators/densitymap/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="densitymap", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/densitymap/_legendrank.py b/plotly/validators/densitymap/_legendrank.py index 49c77ac745..db163f2ba5 100644 --- a/plotly/validators/densitymap/_legendrank.py +++ b/plotly/validators/densitymap/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="densitymap", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/_legendwidth.py b/plotly/validators/densitymap/_legendwidth.py index 7feb521cae..d82fa5fe45 100644 --- a/plotly/validators/densitymap/_legendwidth.py +++ b/plotly/validators/densitymap/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="densitymap", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/_lon.py b/plotly/validators/densitymap/_lon.py index efe517c5e7..a47ec22465 100644 --- a/plotly/validators/densitymap/_lon.py +++ b/plotly/validators/densitymap/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LonValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lon", parent_name="densitymap", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymap/_lonsrc.py b/plotly/validators/densitymap/_lonsrc.py index 11054034f3..184a75e27d 100644 --- a/plotly/validators/densitymap/_lonsrc.py +++ b/plotly/validators/densitymap/_lonsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LonsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lonsrc", parent_name="densitymap", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_meta.py b/plotly/validators/densitymap/_meta.py index dd3e68c27b..3febcec350 100644 --- a/plotly/validators/densitymap/_meta.py +++ b/plotly/validators/densitymap/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="densitymap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/densitymap/_metasrc.py b/plotly/validators/densitymap/_metasrc.py index 9865267ced..fa52384f59 100644 --- a/plotly/validators/densitymap/_metasrc.py +++ b/plotly/validators/densitymap/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="densitymap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_name.py b/plotly/validators/densitymap/_name.py index ef4f0cc26b..841daef3f6 100644 --- a/plotly/validators/densitymap/_name.py +++ b/plotly/validators/densitymap/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="densitymap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/_opacity.py b/plotly/validators/densitymap/_opacity.py index 087e4dc1e8..ea39d0f56d 100644 --- a/plotly/validators/densitymap/_opacity.py +++ b/plotly/validators/densitymap/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="densitymap", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/densitymap/_radius.py b/plotly/validators/densitymap/_radius.py index 3813194af9..c66e3db942 100644 --- a/plotly/validators/densitymap/_radius.py +++ b/plotly/validators/densitymap/_radius.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): +class RadiusValidator(_bv.NumberValidator): def __init__(self, plotly_name="radius", parent_name="densitymap", **kwargs): - super(RadiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/densitymap/_radiussrc.py b/plotly/validators/densitymap/_radiussrc.py index 67d4a956fd..d3ab6750cb 100644 --- a/plotly/validators/densitymap/_radiussrc.py +++ b/plotly/validators/densitymap/_radiussrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadiussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RadiussrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="radiussrc", parent_name="densitymap", **kwargs): - super(RadiussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_reversescale.py b/plotly/validators/densitymap/_reversescale.py index 0c19b8acc1..a945c76b63 100644 --- a/plotly/validators/densitymap/_reversescale.py +++ b/plotly/validators/densitymap/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="densitymap", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/densitymap/_showlegend.py b/plotly/validators/densitymap/_showlegend.py index 54e25741fe..93146989c3 100644 --- a/plotly/validators/densitymap/_showlegend.py +++ b/plotly/validators/densitymap/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="densitymap", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/_showscale.py b/plotly/validators/densitymap/_showscale.py index bc81449920..a5151b833a 100644 --- a/plotly/validators/densitymap/_showscale.py +++ b/plotly/validators/densitymap/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="densitymap", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymap/_stream.py b/plotly/validators/densitymap/_stream.py index 8e15d6df3c..5dcd817b64 100644 --- a/plotly/validators/densitymap/_stream.py +++ b/plotly/validators/densitymap/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="densitymap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/densitymap/_subplot.py b/plotly/validators/densitymap/_subplot.py index e07727d382..12b21891ee 100644 --- a/plotly/validators/densitymap/_subplot.py +++ b/plotly/validators/densitymap/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="densitymap", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "map"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/densitymap/_text.py b/plotly/validators/densitymap/_text.py index d077706f19..2caa33f33c 100644 --- a/plotly/validators/densitymap/_text.py +++ b/plotly/validators/densitymap/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="densitymap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/densitymap/_textsrc.py b/plotly/validators/densitymap/_textsrc.py index 8360be2ef3..e2107b1f67 100644 --- a/plotly/validators/densitymap/_textsrc.py +++ b/plotly/validators/densitymap/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="densitymap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_uid.py b/plotly/validators/densitymap/_uid.py index 5838e2b906..8e78bcc9f8 100644 --- a/plotly/validators/densitymap/_uid.py +++ b/plotly/validators/densitymap/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="densitymap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/densitymap/_uirevision.py b/plotly/validators/densitymap/_uirevision.py index 09644b9f3b..c8079775f7 100644 --- a/plotly/validators/densitymap/_uirevision.py +++ b/plotly/validators/densitymap/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="densitymap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/_visible.py b/plotly/validators/densitymap/_visible.py index aa7b0baa41..45355821ea 100644 --- a/plotly/validators/densitymap/_visible.py +++ b/plotly/validators/densitymap/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="densitymap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/densitymap/_z.py b/plotly/validators/densitymap/_z.py index d1425e8d8e..764233db17 100644 --- a/plotly/validators/densitymap/_z.py +++ b/plotly/validators/densitymap/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="densitymap", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymap/_zauto.py b/plotly/validators/densitymap/_zauto.py index 3e7aa4c368..20b7831dd6 100644 --- a/plotly/validators/densitymap/_zauto.py +++ b/plotly/validators/densitymap/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="densitymap", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/densitymap/_zmax.py b/plotly/validators/densitymap/_zmax.py index 3a1845d114..80193f5996 100644 --- a/plotly/validators/densitymap/_zmax.py +++ b/plotly/validators/densitymap/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="densitymap", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/densitymap/_zmid.py b/plotly/validators/densitymap/_zmid.py index 03412b87ae..df8f1bc09c 100644 --- a/plotly/validators/densitymap/_zmid.py +++ b/plotly/validators/densitymap/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="densitymap", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/densitymap/_zmin.py b/plotly/validators/densitymap/_zmin.py index b693157220..878f307eda 100644 --- a/plotly/validators/densitymap/_zmin.py +++ b/plotly/validators/densitymap/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="densitymap", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/densitymap/_zsrc.py b/plotly/validators/densitymap/_zsrc.py index 9a5cd92830..87953cbcba 100644 --- a/plotly/validators/densitymap/_zsrc.py +++ b/plotly/validators/densitymap/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="densitymap", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/__init__.py b/plotly/validators/densitymap/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/densitymap/colorbar/__init__.py +++ b/plotly/validators/densitymap/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/densitymap/colorbar/_bgcolor.py b/plotly/validators/densitymap/colorbar/_bgcolor.py index 474ebf7e6f..f84a302e67 100644 --- a/plotly/validators/densitymap/colorbar/_bgcolor.py +++ b/plotly/validators/densitymap/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="densitymap.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_bordercolor.py b/plotly/validators/densitymap/colorbar/_bordercolor.py index 6ed5052c28..0a49cc6530 100644 --- a/plotly/validators/densitymap/colorbar/_bordercolor.py +++ b/plotly/validators/densitymap/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="densitymap.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_borderwidth.py b/plotly/validators/densitymap/colorbar/_borderwidth.py index 7e7307e856..432f0fda20 100644 --- a/plotly/validators/densitymap/colorbar/_borderwidth.py +++ b/plotly/validators/densitymap/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="densitymap.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_dtick.py b/plotly/validators/densitymap/colorbar/_dtick.py index 9a44573873..4d4e45f10e 100644 --- a/plotly/validators/densitymap/colorbar/_dtick.py +++ b/plotly/validators/densitymap/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="densitymap.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_exponentformat.py b/plotly/validators/densitymap/colorbar/_exponentformat.py index 33744f718d..0e05bea81e 100644 --- a/plotly/validators/densitymap/colorbar/_exponentformat.py +++ b/plotly/validators/densitymap/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="densitymap.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_labelalias.py b/plotly/validators/densitymap/colorbar/_labelalias.py index e9cdf09b75..2c5ddba0c1 100644 --- a/plotly/validators/densitymap/colorbar/_labelalias.py +++ b/plotly/validators/densitymap/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="densitymap.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_len.py b/plotly/validators/densitymap/colorbar/_len.py index 881d5181d3..421e836185 100644 --- a/plotly/validators/densitymap/colorbar/_len.py +++ b/plotly/validators/densitymap/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="densitymap.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_lenmode.py b/plotly/validators/densitymap/colorbar/_lenmode.py index 8ef47c6161..0e14e7f71a 100644 --- a/plotly/validators/densitymap/colorbar/_lenmode.py +++ b/plotly/validators/densitymap/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="densitymap.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_minexponent.py b/plotly/validators/densitymap/colorbar/_minexponent.py index c42b183174..01605e814e 100644 --- a/plotly/validators/densitymap/colorbar/_minexponent.py +++ b/plotly/validators/densitymap/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="densitymap.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_nticks.py b/plotly/validators/densitymap/colorbar/_nticks.py index d57b3960b6..160f47fdfa 100644 --- a/plotly/validators/densitymap/colorbar/_nticks.py +++ b/plotly/validators/densitymap/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="densitymap.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_orientation.py b/plotly/validators/densitymap/colorbar/_orientation.py index 26a8e2bffc..71e46a3ae4 100644 --- a/plotly/validators/densitymap/colorbar/_orientation.py +++ b/plotly/validators/densitymap/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="densitymap.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_outlinecolor.py b/plotly/validators/densitymap/colorbar/_outlinecolor.py index 76c7824255..64d1b9e0d4 100644 --- a/plotly/validators/densitymap/colorbar/_outlinecolor.py +++ b/plotly/validators/densitymap/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="densitymap.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_outlinewidth.py b/plotly/validators/densitymap/colorbar/_outlinewidth.py index 916e443630..c52e64816d 100644 --- a/plotly/validators/densitymap/colorbar/_outlinewidth.py +++ b/plotly/validators/densitymap/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="densitymap.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_separatethousands.py b/plotly/validators/densitymap/colorbar/_separatethousands.py index 1b9f8889eb..95b3990bef 100644 --- a/plotly/validators/densitymap/colorbar/_separatethousands.py +++ b/plotly/validators/densitymap/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="densitymap.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_showexponent.py b/plotly/validators/densitymap/colorbar/_showexponent.py index 67ed532dbb..68e059617d 100644 --- a/plotly/validators/densitymap/colorbar/_showexponent.py +++ b/plotly/validators/densitymap/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="densitymap.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_showticklabels.py b/plotly/validators/densitymap/colorbar/_showticklabels.py index 37c40a7a02..c55dcb5deb 100644 --- a/plotly/validators/densitymap/colorbar/_showticklabels.py +++ b/plotly/validators/densitymap/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="densitymap.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_showtickprefix.py b/plotly/validators/densitymap/colorbar/_showtickprefix.py index 487e4e7c8f..66167fa389 100644 --- a/plotly/validators/densitymap/colorbar/_showtickprefix.py +++ b/plotly/validators/densitymap/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="densitymap.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_showticksuffix.py b/plotly/validators/densitymap/colorbar/_showticksuffix.py index e53b962bc9..b57f86337f 100644 --- a/plotly/validators/densitymap/colorbar/_showticksuffix.py +++ b/plotly/validators/densitymap/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="densitymap.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_thickness.py b/plotly/validators/densitymap/colorbar/_thickness.py index c2afb93dfd..53b540b297 100644 --- a/plotly/validators/densitymap/colorbar/_thickness.py +++ b/plotly/validators/densitymap/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="densitymap.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_thicknessmode.py b/plotly/validators/densitymap/colorbar/_thicknessmode.py index 1ab2bd4cba..134feba8a2 100644 --- a/plotly/validators/densitymap/colorbar/_thicknessmode.py +++ b/plotly/validators/densitymap/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="densitymap.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_tick0.py b/plotly/validators/densitymap/colorbar/_tick0.py index c3344c9a98..606d1f99ef 100644 --- a/plotly/validators/densitymap/colorbar/_tick0.py +++ b/plotly/validators/densitymap/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="densitymap.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_tickangle.py b/plotly/validators/densitymap/colorbar/_tickangle.py index 24be0c8fed..16c2d87e6f 100644 --- a/plotly/validators/densitymap/colorbar/_tickangle.py +++ b/plotly/validators/densitymap/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="densitymap.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_tickcolor.py b/plotly/validators/densitymap/colorbar/_tickcolor.py index 299312b593..1f53c75c9b 100644 --- a/plotly/validators/densitymap/colorbar/_tickcolor.py +++ b/plotly/validators/densitymap/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="densitymap.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_tickfont.py b/plotly/validators/densitymap/colorbar/_tickfont.py index b3814429fb..95ce8a3811 100644 --- a/plotly/validators/densitymap/colorbar/_tickfont.py +++ b/plotly/validators/densitymap/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="densitymap.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_tickformat.py b/plotly/validators/densitymap/colorbar/_tickformat.py index 8f6468d175..dda58d333c 100644 --- a/plotly/validators/densitymap/colorbar/_tickformat.py +++ b/plotly/validators/densitymap/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="densitymap.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_tickformatstopdefaults.py b/plotly/validators/densitymap/colorbar/_tickformatstopdefaults.py index 9f15487cc2..355d5e2df3 100644 --- a/plotly/validators/densitymap/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/densitymap/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="densitymap.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/densitymap/colorbar/_tickformatstops.py b/plotly/validators/densitymap/colorbar/_tickformatstops.py index 246540bd7a..468c07dd07 100644 --- a/plotly/validators/densitymap/colorbar/_tickformatstops.py +++ b/plotly/validators/densitymap/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="densitymap.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_ticklabeloverflow.py b/plotly/validators/densitymap/colorbar/_ticklabeloverflow.py index 8343e947d6..1cc06ac235 100644 --- a/plotly/validators/densitymap/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/densitymap/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="densitymap.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_ticklabelposition.py b/plotly/validators/densitymap/colorbar/_ticklabelposition.py index 4dafbd4dd1..5360c5e468 100644 --- a/plotly/validators/densitymap/colorbar/_ticklabelposition.py +++ b/plotly/validators/densitymap/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="densitymap.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymap/colorbar/_ticklabelstep.py b/plotly/validators/densitymap/colorbar/_ticklabelstep.py index bbc9831a01..1bd611ce4f 100644 --- a/plotly/validators/densitymap/colorbar/_ticklabelstep.py +++ b/plotly/validators/densitymap/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="densitymap.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_ticklen.py b/plotly/validators/densitymap/colorbar/_ticklen.py index 788f23f715..d7307c85e7 100644 --- a/plotly/validators/densitymap/colorbar/_ticklen.py +++ b/plotly/validators/densitymap/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="densitymap.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_tickmode.py b/plotly/validators/densitymap/colorbar/_tickmode.py index c367bdfd41..bbac54a513 100644 --- a/plotly/validators/densitymap/colorbar/_tickmode.py +++ b/plotly/validators/densitymap/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="densitymap.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/densitymap/colorbar/_tickprefix.py b/plotly/validators/densitymap/colorbar/_tickprefix.py index ec26278d17..86e68dd193 100644 --- a/plotly/validators/densitymap/colorbar/_tickprefix.py +++ b/plotly/validators/densitymap/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="densitymap.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_ticks.py b/plotly/validators/densitymap/colorbar/_ticks.py index 5285b1d292..e2426c30ca 100644 --- a/plotly/validators/densitymap/colorbar/_ticks.py +++ b/plotly/validators/densitymap/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="densitymap.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_ticksuffix.py b/plotly/validators/densitymap/colorbar/_ticksuffix.py index 0b0c4e7526..d87fdeb526 100644 --- a/plotly/validators/densitymap/colorbar/_ticksuffix.py +++ b/plotly/validators/densitymap/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="densitymap.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_ticktext.py b/plotly/validators/densitymap/colorbar/_ticktext.py index f0aeb9a37c..a85b4d2c63 100644 --- a/plotly/validators/densitymap/colorbar/_ticktext.py +++ b/plotly/validators/densitymap/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="densitymap.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_ticktextsrc.py b/plotly/validators/densitymap/colorbar/_ticktextsrc.py index c9de006369..633b7b9999 100644 --- a/plotly/validators/densitymap/colorbar/_ticktextsrc.py +++ b/plotly/validators/densitymap/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="densitymap.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_tickvals.py b/plotly/validators/densitymap/colorbar/_tickvals.py index f97c6b748d..fa47b8a784 100644 --- a/plotly/validators/densitymap/colorbar/_tickvals.py +++ b/plotly/validators/densitymap/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="densitymap.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_tickvalssrc.py b/plotly/validators/densitymap/colorbar/_tickvalssrc.py index 8fa1374b29..9bc3682be9 100644 --- a/plotly/validators/densitymap/colorbar/_tickvalssrc.py +++ b/plotly/validators/densitymap/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="densitymap.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_tickwidth.py b/plotly/validators/densitymap/colorbar/_tickwidth.py index 7e6611586a..26f6e73edd 100644 --- a/plotly/validators/densitymap/colorbar/_tickwidth.py +++ b/plotly/validators/densitymap/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="densitymap.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_title.py b/plotly/validators/densitymap/colorbar/_title.py index eced743943..69c640e39c 100644 --- a/plotly/validators/densitymap/colorbar/_title.py +++ b/plotly/validators/densitymap/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="densitymap.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_x.py b/plotly/validators/densitymap/colorbar/_x.py index 00862d02e3..a287e8703f 100644 --- a/plotly/validators/densitymap/colorbar/_x.py +++ b/plotly/validators/densitymap/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="densitymap.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_xanchor.py b/plotly/validators/densitymap/colorbar/_xanchor.py index edadd67920..ccfea4a29b 100644 --- a/plotly/validators/densitymap/colorbar/_xanchor.py +++ b/plotly/validators/densitymap/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="densitymap.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_xpad.py b/plotly/validators/densitymap/colorbar/_xpad.py index 7246fbc49e..f0fd2b919c 100644 --- a/plotly/validators/densitymap/colorbar/_xpad.py +++ b/plotly/validators/densitymap/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="densitymap.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_xref.py b/plotly/validators/densitymap/colorbar/_xref.py index 6c6ff5d826..48a540af89 100644 --- a/plotly/validators/densitymap/colorbar/_xref.py +++ b/plotly/validators/densitymap/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="densitymap.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_y.py b/plotly/validators/densitymap/colorbar/_y.py index 6572920295..3f3f79212d 100644 --- a/plotly/validators/densitymap/colorbar/_y.py +++ b/plotly/validators/densitymap/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="densitymap.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/_yanchor.py b/plotly/validators/densitymap/colorbar/_yanchor.py index 9699046c25..c455cad018 100644 --- a/plotly/validators/densitymap/colorbar/_yanchor.py +++ b/plotly/validators/densitymap/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="densitymap.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_ypad.py b/plotly/validators/densitymap/colorbar/_ypad.py index 6adf689286..0fe9d66ae8 100644 --- a/plotly/validators/densitymap/colorbar/_ypad.py +++ b/plotly/validators/densitymap/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="densitymap.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/_yref.py b/plotly/validators/densitymap/colorbar/_yref.py index 32367f3943..fe69cd76b1 100644 --- a/plotly/validators/densitymap/colorbar/_yref.py +++ b/plotly/validators/densitymap/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="densitymap.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/tickfont/__init__.py b/plotly/validators/densitymap/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/__init__.py +++ b/plotly/validators/densitymap/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymap/colorbar/tickfont/_color.py b/plotly/validators/densitymap/colorbar/tickfont/_color.py index d61f0e619b..02cc028ab4 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_color.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymap.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/tickfont/_family.py b/plotly/validators/densitymap/colorbar/tickfont/_family.py index bcc40f7e99..246eef01bf 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_family.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymap.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymap/colorbar/tickfont/_lineposition.py b/plotly/validators/densitymap/colorbar/tickfont/_lineposition.py index b50c31850c..a279c7d6d2 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/densitymap/colorbar/tickfont/_shadow.py b/plotly/validators/densitymap/colorbar/tickfont/_shadow.py index 816b4c10d3..bad1d45a6c 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_shadow.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymap.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/tickfont/_size.py b/plotly/validators/densitymap/colorbar/tickfont/_size.py index 0c52100daa..b9a75d629e 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_size.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymap.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/tickfont/_style.py b/plotly/validators/densitymap/colorbar/tickfont/_style.py index 4b5b2e5e0c..bcb6ffbbf9 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_style.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymap.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/tickfont/_textcase.py b/plotly/validators/densitymap/colorbar/tickfont/_textcase.py index b117fd97e3..9fe6b6e74b 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_textcase.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymap.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/tickfont/_variant.py b/plotly/validators/densitymap/colorbar/tickfont/_variant.py index 43d5429a7b..dee08c5fdb 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_variant.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymap.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymap/colorbar/tickfont/_weight.py b/plotly/validators/densitymap/colorbar/tickfont/_weight.py index bc52448f2e..65896fed82 100644 --- a/plotly/validators/densitymap/colorbar/tickfont/_weight.py +++ b/plotly/validators/densitymap/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymap.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/densitymap/colorbar/tickformatstop/__init__.py b/plotly/validators/densitymap/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/densitymap/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/densitymap/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/densitymap/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/densitymap/colorbar/tickformatstop/_dtickrange.py index c9e4d6fa50..765871e92b 100644 --- a/plotly/validators/densitymap/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/densitymap/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="densitymap.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/densitymap/colorbar/tickformatstop/_enabled.py b/plotly/validators/densitymap/colorbar/tickformatstop/_enabled.py index fe621aaec3..a2dc5f4057 100644 --- a/plotly/validators/densitymap/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/densitymap/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="densitymap.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/tickformatstop/_name.py b/plotly/validators/densitymap/colorbar/tickformatstop/_name.py index 14dce8d1a9..4f106e9182 100644 --- a/plotly/validators/densitymap/colorbar/tickformatstop/_name.py +++ b/plotly/validators/densitymap/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="densitymap.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/densitymap/colorbar/tickformatstop/_templateitemname.py index 5f4d3feea1..7c27120086 100644 --- a/plotly/validators/densitymap/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/densitymap/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="densitymap.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/tickformatstop/_value.py b/plotly/validators/densitymap/colorbar/tickformatstop/_value.py index c91b6ecfcc..b8431eb29a 100644 --- a/plotly/validators/densitymap/colorbar/tickformatstop/_value.py +++ b/plotly/validators/densitymap/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="densitymap.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/title/__init__.py b/plotly/validators/densitymap/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/densitymap/colorbar/title/__init__.py +++ b/plotly/validators/densitymap/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/densitymap/colorbar/title/_font.py b/plotly/validators/densitymap/colorbar/title/_font.py index 9cde88d8c4..101656ea42 100644 --- a/plotly/validators/densitymap/colorbar/title/_font.py +++ b/plotly/validators/densitymap/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymap.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/title/_side.py b/plotly/validators/densitymap/colorbar/title/_side.py index 73df2d1a16..ac771267a7 100644 --- a/plotly/validators/densitymap/colorbar/title/_side.py +++ b/plotly/validators/densitymap/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="densitymap.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/title/_text.py b/plotly/validators/densitymap/colorbar/title/_text.py index 753d2f41eb..e6ab2113d8 100644 --- a/plotly/validators/densitymap/colorbar/title/_text.py +++ b/plotly/validators/densitymap/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="densitymap.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/title/font/__init__.py b/plotly/validators/densitymap/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/densitymap/colorbar/title/font/__init__.py +++ b/plotly/validators/densitymap/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymap/colorbar/title/font/_color.py b/plotly/validators/densitymap/colorbar/title/font/_color.py index 4afb7138fe..fd8b01e660 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_color.py +++ b/plotly/validators/densitymap/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/title/font/_family.py b/plotly/validators/densitymap/colorbar/title/font/_family.py index 9251fc4f03..a06e3ae992 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_family.py +++ b/plotly/validators/densitymap/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymap/colorbar/title/font/_lineposition.py b/plotly/validators/densitymap/colorbar/title/font/_lineposition.py index ea261c1b14..968bfe687b 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_lineposition.py +++ b/plotly/validators/densitymap/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/densitymap/colorbar/title/font/_shadow.py b/plotly/validators/densitymap/colorbar/title/font/_shadow.py index 546dc2c25a..02fc2d1ff0 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_shadow.py +++ b/plotly/validators/densitymap/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymap/colorbar/title/font/_size.py b/plotly/validators/densitymap/colorbar/title/font/_size.py index f35c3053a9..10dfd6dcbb 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_size.py +++ b/plotly/validators/densitymap/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymap.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/title/font/_style.py b/plotly/validators/densitymap/colorbar/title/font/_style.py index aa7ede87d0..6760749e02 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_style.py +++ b/plotly/validators/densitymap/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/title/font/_textcase.py b/plotly/validators/densitymap/colorbar/title/font/_textcase.py index 84ac4e7be3..02ab98e09b 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_textcase.py +++ b/plotly/validators/densitymap/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/densitymap/colorbar/title/font/_variant.py b/plotly/validators/densitymap/colorbar/title/font/_variant.py index 2241dc14f5..8ca6ecd74c 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_variant.py +++ b/plotly/validators/densitymap/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymap/colorbar/title/font/_weight.py b/plotly/validators/densitymap/colorbar/title/font/_weight.py index a3d3468060..59d259c3d8 100644 --- a/plotly/validators/densitymap/colorbar/title/font/_weight.py +++ b/plotly/validators/densitymap/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymap.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/densitymap/hoverlabel/__init__.py b/plotly/validators/densitymap/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/densitymap/hoverlabel/__init__.py +++ b/plotly/validators/densitymap/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/densitymap/hoverlabel/_align.py b/plotly/validators/densitymap/hoverlabel/_align.py index 359e176743..b65444d614 100644 --- a/plotly/validators/densitymap/hoverlabel/_align.py +++ b/plotly/validators/densitymap/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="densitymap.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/densitymap/hoverlabel/_alignsrc.py b/plotly/validators/densitymap/hoverlabel/_alignsrc.py index aa540fe66e..1c6cb2150b 100644 --- a/plotly/validators/densitymap/hoverlabel/_alignsrc.py +++ b/plotly/validators/densitymap/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="densitymap.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/_bgcolor.py b/plotly/validators/densitymap/hoverlabel/_bgcolor.py index 01e692e74b..2fdde8c8bf 100644 --- a/plotly/validators/densitymap/hoverlabel/_bgcolor.py +++ b/plotly/validators/densitymap/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="densitymap.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymap/hoverlabel/_bgcolorsrc.py b/plotly/validators/densitymap/hoverlabel/_bgcolorsrc.py index 3fc15c1053..d2b8be2cbe 100644 --- a/plotly/validators/densitymap/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/densitymap/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="densitymap.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/_bordercolor.py b/plotly/validators/densitymap/hoverlabel/_bordercolor.py index 0e74815829..0cd37208d3 100644 --- a/plotly/validators/densitymap/hoverlabel/_bordercolor.py +++ b/plotly/validators/densitymap/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="densitymap.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymap/hoverlabel/_bordercolorsrc.py b/plotly/validators/densitymap/hoverlabel/_bordercolorsrc.py index 3a9b87e42b..702e57da1e 100644 --- a/plotly/validators/densitymap/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/densitymap/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="densitymap.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/_font.py b/plotly/validators/densitymap/hoverlabel/_font.py index 690ffd3388..e95bb3b346 100644 --- a/plotly/validators/densitymap/hoverlabel/_font.py +++ b/plotly/validators/densitymap/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymap.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/densitymap/hoverlabel/_namelength.py b/plotly/validators/densitymap/hoverlabel/_namelength.py index 3986a3c52f..5a8ace0723 100644 --- a/plotly/validators/densitymap/hoverlabel/_namelength.py +++ b/plotly/validators/densitymap/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="densitymap.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/densitymap/hoverlabel/_namelengthsrc.py b/plotly/validators/densitymap/hoverlabel/_namelengthsrc.py index 28e48464e3..f26a1fe3df 100644 --- a/plotly/validators/densitymap/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/densitymap/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="densitymap.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/__init__.py b/plotly/validators/densitymap/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/densitymap/hoverlabel/font/__init__.py +++ b/plotly/validators/densitymap/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymap/hoverlabel/font/_color.py b/plotly/validators/densitymap/hoverlabel/font/_color.py index 7ec0b1a0a9..7651d6fde5 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_color.py +++ b/plotly/validators/densitymap/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymap/hoverlabel/font/_colorsrc.py b/plotly/validators/densitymap/hoverlabel/font/_colorsrc.py index f91f30a5c6..16c7e5f037 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_family.py b/plotly/validators/densitymap/hoverlabel/font/_family.py index 778fe05497..71d1556655 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_family.py +++ b/plotly/validators/densitymap/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/densitymap/hoverlabel/font/_familysrc.py b/plotly/validators/densitymap/hoverlabel/font/_familysrc.py index e75bacb3de..f5d3f71265 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_familysrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_lineposition.py b/plotly/validators/densitymap/hoverlabel/font/_lineposition.py index ea43d328fe..e4c722dc37 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_lineposition.py +++ b/plotly/validators/densitymap/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/densitymap/hoverlabel/font/_linepositionsrc.py b/plotly/validators/densitymap/hoverlabel/font/_linepositionsrc.py index fa4ce56101..5ac596b500 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_shadow.py b/plotly/validators/densitymap/hoverlabel/font/_shadow.py index d640ac3414..a3103375df 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_shadow.py +++ b/plotly/validators/densitymap/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymap/hoverlabel/font/_shadowsrc.py b/plotly/validators/densitymap/hoverlabel/font/_shadowsrc.py index 62bdb504ee..9cb97a57f5 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_size.py b/plotly/validators/densitymap/hoverlabel/font/_size.py index 9c53691c1b..e5e859cc89 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_size.py +++ b/plotly/validators/densitymap/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/densitymap/hoverlabel/font/_sizesrc.py b/plotly/validators/densitymap/hoverlabel/font/_sizesrc.py index 6f223e4af5..b3dea22444 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_style.py b/plotly/validators/densitymap/hoverlabel/font/_style.py index 35d781b48f..71eb6a26d1 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_style.py +++ b/plotly/validators/densitymap/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/densitymap/hoverlabel/font/_stylesrc.py b/plotly/validators/densitymap/hoverlabel/font/_stylesrc.py index 4393cf9db1..0c2364b099 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_textcase.py b/plotly/validators/densitymap/hoverlabel/font/_textcase.py index 353e46d6a0..67366024e4 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_textcase.py +++ b/plotly/validators/densitymap/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/densitymap/hoverlabel/font/_textcasesrc.py b/plotly/validators/densitymap/hoverlabel/font/_textcasesrc.py index df358681b2..8ef3fc74d1 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_variant.py b/plotly/validators/densitymap/hoverlabel/font/_variant.py index 05d9e4c1dc..30e0187039 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_variant.py +++ b/plotly/validators/densitymap/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/densitymap/hoverlabel/font/_variantsrc.py b/plotly/validators/densitymap/hoverlabel/font/_variantsrc.py index 91cc995be3..60a811aa8d 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/hoverlabel/font/_weight.py b/plotly/validators/densitymap/hoverlabel/font/_weight.py index 2be30a42cc..5f540a9e78 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_weight.py +++ b/plotly/validators/densitymap/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymap.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/densitymap/hoverlabel/font/_weightsrc.py b/plotly/validators/densitymap/hoverlabel/font/_weightsrc.py index 7ca2aac513..8f06da39c3 100644 --- a/plotly/validators/densitymap/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/densitymap/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="densitymap.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymap/legendgrouptitle/__init__.py b/plotly/validators/densitymap/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/densitymap/legendgrouptitle/__init__.py +++ b/plotly/validators/densitymap/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/densitymap/legendgrouptitle/_font.py b/plotly/validators/densitymap/legendgrouptitle/_font.py index 5c7f7dcbbe..e9b4017881 100644 --- a/plotly/validators/densitymap/legendgrouptitle/_font.py +++ b/plotly/validators/densitymap/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymap.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/densitymap/legendgrouptitle/_text.py b/plotly/validators/densitymap/legendgrouptitle/_text.py index 4273c02211..2e59e356ee 100644 --- a/plotly/validators/densitymap/legendgrouptitle/_text.py +++ b/plotly/validators/densitymap/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="densitymap.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/legendgrouptitle/font/__init__.py b/plotly/validators/densitymap/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/__init__.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_color.py b/plotly/validators/densitymap/legendgrouptitle/font/_color.py index 0cc306f484..887d1f752a 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_color.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_family.py b/plotly/validators/densitymap/legendgrouptitle/font/_family.py index 1802968fd6..d55db32e82 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_family.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_lineposition.py b/plotly/validators/densitymap/legendgrouptitle/font/_lineposition.py index 79f1dae8f3..e120fb97a5 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_shadow.py b/plotly/validators/densitymap/legendgrouptitle/font/_shadow.py index 52b6e4823f..7ee14c1fd7 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_size.py b/plotly/validators/densitymap/legendgrouptitle/font/_size.py index 8af2043b59..c01fac287e 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_size.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_style.py b/plotly/validators/densitymap/legendgrouptitle/font/_style.py index 5501d3f784..a6872c8d76 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_style.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_textcase.py b/plotly/validators/densitymap/legendgrouptitle/font/_textcase.py index 07ae804b72..7ffb8bf38d 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_variant.py b/plotly/validators/densitymap/legendgrouptitle/font/_variant.py index 413ca16990..d717a123bb 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_variant.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymap/legendgrouptitle/font/_weight.py b/plotly/validators/densitymap/legendgrouptitle/font/_weight.py index d2d0117204..c924b4f669 100644 --- a/plotly/validators/densitymap/legendgrouptitle/font/_weight.py +++ b/plotly/validators/densitymap/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymap.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/densitymap/stream/__init__.py b/plotly/validators/densitymap/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/densitymap/stream/__init__.py +++ b/plotly/validators/densitymap/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/densitymap/stream/_maxpoints.py b/plotly/validators/densitymap/stream/_maxpoints.py index d7526879af..66e173fe9b 100644 --- a/plotly/validators/densitymap/stream/_maxpoints.py +++ b/plotly/validators/densitymap/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="densitymap.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/densitymap/stream/_token.py b/plotly/validators/densitymap/stream/_token.py index 4563462b95..c869e66109 100644 --- a/plotly/validators/densitymap/stream/_token.py +++ b/plotly/validators/densitymap/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="densitymap.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymapbox/__init__.py b/plotly/validators/densitymapbox/__init__.py index 20b2797e60..7ccb6f0042 100644 --- a/plotly/validators/densitymapbox/__init__.py +++ b/plotly/validators/densitymapbox/__init__.py @@ -1,107 +1,56 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._radiussrc import RadiussrcValidator - from ._radius import RadiusValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lonsrc import LonsrcValidator - from ._lon import LonValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._latsrc import LatsrcValidator - from ._lat import LatValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._below import BelowValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._radiussrc.RadiussrcValidator", - "._radius.RadiusValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lonsrc.LonsrcValidator", - "._lon.LonValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._latsrc.LatsrcValidator", - "._lat.LatValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._below.BelowValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._radiussrc.RadiussrcValidator", + "._radius.RadiusValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._below.BelowValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/densitymapbox/_autocolorscale.py b/plotly/validators/densitymapbox/_autocolorscale.py index cc0f8db697..86757a272f 100644 --- a/plotly/validators/densitymapbox/_autocolorscale.py +++ b/plotly/validators/densitymapbox/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="densitymapbox", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/densitymapbox/_below.py b/plotly/validators/densitymapbox/_below.py index 7dd09f3fb6..331ea252e0 100644 --- a/plotly/validators/densitymapbox/_below.py +++ b/plotly/validators/densitymapbox/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="densitymapbox", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_coloraxis.py b/plotly/validators/densitymapbox/_coloraxis.py index 73dfea234f..f41625dbaa 100644 --- a/plotly/validators/densitymapbox/_coloraxis.py +++ b/plotly/validators/densitymapbox/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="densitymapbox", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/densitymapbox/_colorbar.py b/plotly/validators/densitymapbox/_colorbar.py index 7bbd65717b..526f2078d0 100644 --- a/plotly/validators/densitymapbox/_colorbar.py +++ b/plotly/validators/densitymapbox/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="densitymapbox", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.density - mapbox.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.densitymapbox.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - densitymapbox.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.densitymapbox.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/_colorscale.py b/plotly/validators/densitymapbox/_colorscale.py index 5d7535f55d..c3af39a487 100644 --- a/plotly/validators/densitymapbox/_colorscale.py +++ b/plotly/validators/densitymapbox/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="densitymapbox", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/densitymapbox/_customdata.py b/plotly/validators/densitymapbox/_customdata.py index 274fc49055..6ea358cd30 100644 --- a/plotly/validators/densitymapbox/_customdata.py +++ b/plotly/validators/densitymapbox/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="densitymapbox", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_customdatasrc.py b/plotly/validators/densitymapbox/_customdatasrc.py index 61393d074b..5fbc69c5d0 100644 --- a/plotly/validators/densitymapbox/_customdatasrc.py +++ b/plotly/validators/densitymapbox/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="densitymapbox", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_hoverinfo.py b/plotly/validators/densitymapbox/_hoverinfo.py index 950a686ff0..01e621589d 100644 --- a/plotly/validators/densitymapbox/_hoverinfo.py +++ b/plotly/validators/densitymapbox/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="densitymapbox", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/densitymapbox/_hoverinfosrc.py b/plotly/validators/densitymapbox/_hoverinfosrc.py index 2ec6a83a2f..26bec99a6f 100644 --- a/plotly/validators/densitymapbox/_hoverinfosrc.py +++ b/plotly/validators/densitymapbox/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="densitymapbox", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_hoverlabel.py b/plotly/validators/densitymapbox/_hoverlabel.py index 80a44a2d72..2d69705f01 100644 --- a/plotly/validators/densitymapbox/_hoverlabel.py +++ b/plotly/validators/densitymapbox/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="densitymapbox", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/_hovertemplate.py b/plotly/validators/densitymapbox/_hovertemplate.py index 670a727a94..1e4ba4e819 100644 --- a/plotly/validators/densitymapbox/_hovertemplate.py +++ b/plotly/validators/densitymapbox/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="densitymapbox", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymapbox/_hovertemplatesrc.py b/plotly/validators/densitymapbox/_hovertemplatesrc.py index 7319e1fbd6..673b77d841 100644 --- a/plotly/validators/densitymapbox/_hovertemplatesrc.py +++ b/plotly/validators/densitymapbox/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="densitymapbox", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_hovertext.py b/plotly/validators/densitymapbox/_hovertext.py index 94c85df884..66d587fc40 100644 --- a/plotly/validators/densitymapbox/_hovertext.py +++ b/plotly/validators/densitymapbox/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="densitymapbox", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/densitymapbox/_hovertextsrc.py b/plotly/validators/densitymapbox/_hovertextsrc.py index f20201a7c8..1414544ed9 100644 --- a/plotly/validators/densitymapbox/_hovertextsrc.py +++ b/plotly/validators/densitymapbox/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="densitymapbox", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_ids.py b/plotly/validators/densitymapbox/_ids.py index d19a5317af..7addc24b50 100644 --- a/plotly/validators/densitymapbox/_ids.py +++ b/plotly/validators/densitymapbox/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="densitymapbox", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_idssrc.py b/plotly/validators/densitymapbox/_idssrc.py index 9c96bec1a0..52c060e7aa 100644 --- a/plotly/validators/densitymapbox/_idssrc.py +++ b/plotly/validators/densitymapbox/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="densitymapbox", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_lat.py b/plotly/validators/densitymapbox/_lat.py index 870fdd8cda..060cff495a 100644 --- a/plotly/validators/densitymapbox/_lat.py +++ b/plotly/validators/densitymapbox/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lat", parent_name="densitymapbox", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_latsrc.py b/plotly/validators/densitymapbox/_latsrc.py index ede2490b48..f7920a418c 100644 --- a/plotly/validators/densitymapbox/_latsrc.py +++ b/plotly/validators/densitymapbox/_latsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="latsrc", parent_name="densitymapbox", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_legend.py b/plotly/validators/densitymapbox/_legend.py index 16bb454f7b..fd1a99d301 100644 --- a/plotly/validators/densitymapbox/_legend.py +++ b/plotly/validators/densitymapbox/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="densitymapbox", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/densitymapbox/_legendgroup.py b/plotly/validators/densitymapbox/_legendgroup.py index 77d3e23edd..75fa18bf55 100644 --- a/plotly/validators/densitymapbox/_legendgroup.py +++ b/plotly/validators/densitymapbox/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="densitymapbox", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_legendgrouptitle.py b/plotly/validators/densitymapbox/_legendgrouptitle.py index e882330a10..c02cdbbd95 100644 --- a/plotly/validators/densitymapbox/_legendgrouptitle.py +++ b/plotly/validators/densitymapbox/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="densitymapbox", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/_legendrank.py b/plotly/validators/densitymapbox/_legendrank.py index 516ceabc88..70fe161f74 100644 --- a/plotly/validators/densitymapbox/_legendrank.py +++ b/plotly/validators/densitymapbox/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="densitymapbox", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_legendwidth.py b/plotly/validators/densitymapbox/_legendwidth.py index 83b4780333..87d43c1d3a 100644 --- a/plotly/validators/densitymapbox/_legendwidth.py +++ b/plotly/validators/densitymapbox/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="densitymapbox", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/_lon.py b/plotly/validators/densitymapbox/_lon.py index a0a05d0f82..bd3828c715 100644 --- a/plotly/validators/densitymapbox/_lon.py +++ b/plotly/validators/densitymapbox/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LonValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lon", parent_name="densitymapbox", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_lonsrc.py b/plotly/validators/densitymapbox/_lonsrc.py index 8036846101..30523e5fad 100644 --- a/plotly/validators/densitymapbox/_lonsrc.py +++ b/plotly/validators/densitymapbox/_lonsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LonsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lonsrc", parent_name="densitymapbox", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_meta.py b/plotly/validators/densitymapbox/_meta.py index 5921decaab..1a16a570df 100644 --- a/plotly/validators/densitymapbox/_meta.py +++ b/plotly/validators/densitymapbox/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="densitymapbox", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/densitymapbox/_metasrc.py b/plotly/validators/densitymapbox/_metasrc.py index efab519384..2a0e3794ef 100644 --- a/plotly/validators/densitymapbox/_metasrc.py +++ b/plotly/validators/densitymapbox/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="densitymapbox", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_name.py b/plotly/validators/densitymapbox/_name.py index 28577c0d0c..6877814c5e 100644 --- a/plotly/validators/densitymapbox/_name.py +++ b/plotly/validators/densitymapbox/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="densitymapbox", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_opacity.py b/plotly/validators/densitymapbox/_opacity.py index 2d1c529090..81674fece8 100644 --- a/plotly/validators/densitymapbox/_opacity.py +++ b/plotly/validators/densitymapbox/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="densitymapbox", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/densitymapbox/_radius.py b/plotly/validators/densitymapbox/_radius.py index 7ae95d91f0..1b05b5ab94 100644 --- a/plotly/validators/densitymapbox/_radius.py +++ b/plotly/validators/densitymapbox/_radius.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): +class RadiusValidator(_bv.NumberValidator): def __init__(self, plotly_name="radius", parent_name="densitymapbox", **kwargs): - super(RadiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/densitymapbox/_radiussrc.py b/plotly/validators/densitymapbox/_radiussrc.py index f459449272..ceebb368ab 100644 --- a/plotly/validators/densitymapbox/_radiussrc.py +++ b/plotly/validators/densitymapbox/_radiussrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadiussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RadiussrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="radiussrc", parent_name="densitymapbox", **kwargs): - super(RadiussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_reversescale.py b/plotly/validators/densitymapbox/_reversescale.py index d8d4b6f411..e3cd69eea8 100644 --- a/plotly/validators/densitymapbox/_reversescale.py +++ b/plotly/validators/densitymapbox/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="densitymapbox", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_showlegend.py b/plotly/validators/densitymapbox/_showlegend.py index e78a59ac7b..3acda8f414 100644 --- a/plotly/validators/densitymapbox/_showlegend.py +++ b/plotly/validators/densitymapbox/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="densitymapbox", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_showscale.py b/plotly/validators/densitymapbox/_showscale.py index 033a7f4fc3..5c2488a876 100644 --- a/plotly/validators/densitymapbox/_showscale.py +++ b/plotly/validators/densitymapbox/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="densitymapbox", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_stream.py b/plotly/validators/densitymapbox/_stream.py index d7a2abfa90..e872c0fa6a 100644 --- a/plotly/validators/densitymapbox/_stream.py +++ b/plotly/validators/densitymapbox/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="densitymapbox", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/_subplot.py b/plotly/validators/densitymapbox/_subplot.py index 42db8813e4..79370098cf 100644 --- a/plotly/validators/densitymapbox/_subplot.py +++ b/plotly/validators/densitymapbox/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="densitymapbox", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "mapbox"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/densitymapbox/_text.py b/plotly/validators/densitymapbox/_text.py index 2bcf5c6cee..d508dcace1 100644 --- a/plotly/validators/densitymapbox/_text.py +++ b/plotly/validators/densitymapbox/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="densitymapbox", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/densitymapbox/_textsrc.py b/plotly/validators/densitymapbox/_textsrc.py index 641eba0681..1ccdccc51c 100644 --- a/plotly/validators/densitymapbox/_textsrc.py +++ b/plotly/validators/densitymapbox/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="densitymapbox", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_uid.py b/plotly/validators/densitymapbox/_uid.py index afd1c30eff..4df09fb347 100644 --- a/plotly/validators/densitymapbox/_uid.py +++ b/plotly/validators/densitymapbox/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="densitymapbox", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_uirevision.py b/plotly/validators/densitymapbox/_uirevision.py index ed627de7bc..a82b73de7b 100644 --- a/plotly/validators/densitymapbox/_uirevision.py +++ b/plotly/validators/densitymapbox/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="densitymapbox", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_visible.py b/plotly/validators/densitymapbox/_visible.py index 915b04b8e2..29d3a3e13c 100644 --- a/plotly/validators/densitymapbox/_visible.py +++ b/plotly/validators/densitymapbox/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="densitymapbox", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/densitymapbox/_z.py b/plotly/validators/densitymapbox/_z.py index d2aa22219a..a41f06490a 100644 --- a/plotly/validators/densitymapbox/_z.py +++ b/plotly/validators/densitymapbox/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="densitymapbox", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/_zauto.py b/plotly/validators/densitymapbox/_zauto.py index e095394f99..fa29c8aa56 100644 --- a/plotly/validators/densitymapbox/_zauto.py +++ b/plotly/validators/densitymapbox/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="densitymapbox", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/densitymapbox/_zmax.py b/plotly/validators/densitymapbox/_zmax.py index ac4aaa28c0..9da242305d 100644 --- a/plotly/validators/densitymapbox/_zmax.py +++ b/plotly/validators/densitymapbox/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="densitymapbox", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/densitymapbox/_zmid.py b/plotly/validators/densitymapbox/_zmid.py index 394824e2c5..8510cd8516 100644 --- a/plotly/validators/densitymapbox/_zmid.py +++ b/plotly/validators/densitymapbox/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="densitymapbox", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/densitymapbox/_zmin.py b/plotly/validators/densitymapbox/_zmin.py index e95a5582ce..050fd4fee3 100644 --- a/plotly/validators/densitymapbox/_zmin.py +++ b/plotly/validators/densitymapbox/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="densitymapbox", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/densitymapbox/_zsrc.py b/plotly/validators/densitymapbox/_zsrc.py index d05f51ff27..1a07bcd3dc 100644 --- a/plotly/validators/densitymapbox/_zsrc.py +++ b/plotly/validators/densitymapbox/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="densitymapbox", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/__init__.py b/plotly/validators/densitymapbox/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/densitymapbox/colorbar/__init__.py +++ b/plotly/validators/densitymapbox/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/densitymapbox/colorbar/_bgcolor.py b/plotly/validators/densitymapbox/colorbar/_bgcolor.py index 38f9891808..a8f9faa306 100644 --- a/plotly/validators/densitymapbox/colorbar/_bgcolor.py +++ b/plotly/validators/densitymapbox/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="densitymapbox.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_bordercolor.py b/plotly/validators/densitymapbox/colorbar/_bordercolor.py index ca48a911c6..05612becd6 100644 --- a/plotly/validators/densitymapbox/colorbar/_bordercolor.py +++ b/plotly/validators/densitymapbox/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="densitymapbox.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_borderwidth.py b/plotly/validators/densitymapbox/colorbar/_borderwidth.py index a2bdeb9322..97ec224eb8 100644 --- a/plotly/validators/densitymapbox/colorbar/_borderwidth.py +++ b/plotly/validators/densitymapbox/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="densitymapbox.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_dtick.py b/plotly/validators/densitymapbox/colorbar/_dtick.py index c0339fdeb8..d00943a18b 100644 --- a/plotly/validators/densitymapbox/colorbar/_dtick.py +++ b/plotly/validators/densitymapbox/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="densitymapbox.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_exponentformat.py b/plotly/validators/densitymapbox/colorbar/_exponentformat.py index 447c583d69..2a0fd47b3b 100644 --- a/plotly/validators/densitymapbox/colorbar/_exponentformat.py +++ b/plotly/validators/densitymapbox/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="densitymapbox.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_labelalias.py b/plotly/validators/densitymapbox/colorbar/_labelalias.py index 49c84fa0fe..1daeba895b 100644 --- a/plotly/validators/densitymapbox/colorbar/_labelalias.py +++ b/plotly/validators/densitymapbox/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="densitymapbox.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_len.py b/plotly/validators/densitymapbox/colorbar/_len.py index 80a292f201..836333228b 100644 --- a/plotly/validators/densitymapbox/colorbar/_len.py +++ b/plotly/validators/densitymapbox/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="densitymapbox.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_lenmode.py b/plotly/validators/densitymapbox/colorbar/_lenmode.py index a6c5bcdcd5..fcbfd51ecd 100644 --- a/plotly/validators/densitymapbox/colorbar/_lenmode.py +++ b/plotly/validators/densitymapbox/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="densitymapbox.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_minexponent.py b/plotly/validators/densitymapbox/colorbar/_minexponent.py index 9cb34db3cf..14368d39b8 100644 --- a/plotly/validators/densitymapbox/colorbar/_minexponent.py +++ b/plotly/validators/densitymapbox/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="densitymapbox.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_nticks.py b/plotly/validators/densitymapbox/colorbar/_nticks.py index 792c2ae258..d1e17b1a45 100644 --- a/plotly/validators/densitymapbox/colorbar/_nticks.py +++ b/plotly/validators/densitymapbox/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="densitymapbox.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_orientation.py b/plotly/validators/densitymapbox/colorbar/_orientation.py index 6994d992b3..6d34fe76a9 100644 --- a/plotly/validators/densitymapbox/colorbar/_orientation.py +++ b/plotly/validators/densitymapbox/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="densitymapbox.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_outlinecolor.py b/plotly/validators/densitymapbox/colorbar/_outlinecolor.py index adb140cd1d..45191c43ba 100644 --- a/plotly/validators/densitymapbox/colorbar/_outlinecolor.py +++ b/plotly/validators/densitymapbox/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="densitymapbox.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_outlinewidth.py b/plotly/validators/densitymapbox/colorbar/_outlinewidth.py index 0c6f0a72b4..e2441a6276 100644 --- a/plotly/validators/densitymapbox/colorbar/_outlinewidth.py +++ b/plotly/validators/densitymapbox/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="densitymapbox.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_separatethousands.py b/plotly/validators/densitymapbox/colorbar/_separatethousands.py index 71a02998ae..83fe36e306 100644 --- a/plotly/validators/densitymapbox/colorbar/_separatethousands.py +++ b/plotly/validators/densitymapbox/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="densitymapbox.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_showexponent.py b/plotly/validators/densitymapbox/colorbar/_showexponent.py index 7f75a5b53c..0113427895 100644 --- a/plotly/validators/densitymapbox/colorbar/_showexponent.py +++ b/plotly/validators/densitymapbox/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="densitymapbox.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_showticklabels.py b/plotly/validators/densitymapbox/colorbar/_showticklabels.py index eb968b241b..957fae792d 100644 --- a/plotly/validators/densitymapbox/colorbar/_showticklabels.py +++ b/plotly/validators/densitymapbox/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="densitymapbox.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_showtickprefix.py b/plotly/validators/densitymapbox/colorbar/_showtickprefix.py index 12855ca20f..4a31fb7917 100644 --- a/plotly/validators/densitymapbox/colorbar/_showtickprefix.py +++ b/plotly/validators/densitymapbox/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="densitymapbox.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_showticksuffix.py b/plotly/validators/densitymapbox/colorbar/_showticksuffix.py index 6dde31ab69..d75ff0bc44 100644 --- a/plotly/validators/densitymapbox/colorbar/_showticksuffix.py +++ b/plotly/validators/densitymapbox/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="densitymapbox.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_thickness.py b/plotly/validators/densitymapbox/colorbar/_thickness.py index e843e66e5d..c947a2539c 100644 --- a/plotly/validators/densitymapbox/colorbar/_thickness.py +++ b/plotly/validators/densitymapbox/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="densitymapbox.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_thicknessmode.py b/plotly/validators/densitymapbox/colorbar/_thicknessmode.py index bf2f329664..0d50ea27bb 100644 --- a/plotly/validators/densitymapbox/colorbar/_thicknessmode.py +++ b/plotly/validators/densitymapbox/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="densitymapbox.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_tick0.py b/plotly/validators/densitymapbox/colorbar/_tick0.py index dfe2340a6d..e50231967a 100644 --- a/plotly/validators/densitymapbox/colorbar/_tick0.py +++ b/plotly/validators/densitymapbox/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="densitymapbox.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_tickangle.py b/plotly/validators/densitymapbox/colorbar/_tickangle.py index 19d4186963..71eef3cf86 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickangle.py +++ b/plotly/validators/densitymapbox/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_tickcolor.py b/plotly/validators/densitymapbox/colorbar/_tickcolor.py index b97e1d1134..da61e78c9e 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickcolor.py +++ b/plotly/validators/densitymapbox/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_tickfont.py b/plotly/validators/densitymapbox/colorbar/_tickfont.py index eda90788df..764f7ed671 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickfont.py +++ b/plotly/validators/densitymapbox/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_tickformat.py b/plotly/validators/densitymapbox/colorbar/_tickformat.py index 8acdd345f7..e0c213ed92 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickformat.py +++ b/plotly/validators/densitymapbox/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py b/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py index 81208ad347..079a0b4c42 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/densitymapbox/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="densitymapbox.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/densitymapbox/colorbar/_tickformatstops.py b/plotly/validators/densitymapbox/colorbar/_tickformatstops.py index 10da5cf9cc..f5a61c5c73 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickformatstops.py +++ b/plotly/validators/densitymapbox/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="densitymapbox.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_ticklabeloverflow.py b/plotly/validators/densitymapbox/colorbar/_ticklabeloverflow.py index 738c8f594e..201c6718c5 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/densitymapbox/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="densitymapbox.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_ticklabelposition.py b/plotly/validators/densitymapbox/colorbar/_ticklabelposition.py index ea380a2278..eceeba5f09 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticklabelposition.py +++ b/plotly/validators/densitymapbox/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="densitymapbox.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymapbox/colorbar/_ticklabelstep.py b/plotly/validators/densitymapbox/colorbar/_ticklabelstep.py index 1cacbd85f3..c566659614 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticklabelstep.py +++ b/plotly/validators/densitymapbox/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="densitymapbox.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_ticklen.py b/plotly/validators/densitymapbox/colorbar/_ticklen.py index d748c1574c..6add87e4f8 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticklen.py +++ b/plotly/validators/densitymapbox/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="densitymapbox.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_tickmode.py b/plotly/validators/densitymapbox/colorbar/_tickmode.py index 0a87945e60..c49cc1fe62 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickmode.py +++ b/plotly/validators/densitymapbox/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/densitymapbox/colorbar/_tickprefix.py b/plotly/validators/densitymapbox/colorbar/_tickprefix.py index 23919e22af..b76da31880 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickprefix.py +++ b/plotly/validators/densitymapbox/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_ticks.py b/plotly/validators/densitymapbox/colorbar/_ticks.py index 7d309de59d..f46c04323d 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticks.py +++ b/plotly/validators/densitymapbox/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="densitymapbox.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_ticksuffix.py b/plotly/validators/densitymapbox/colorbar/_ticksuffix.py index 9d7bd9a238..41a54ad0c6 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticksuffix.py +++ b/plotly/validators/densitymapbox/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="densitymapbox.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_ticktext.py b/plotly/validators/densitymapbox/colorbar/_ticktext.py index cbca06f74c..e15a8d36d8 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticktext.py +++ b/plotly/validators/densitymapbox/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="densitymapbox.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py b/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py index 0b0315550e..cf7ca3842b 100644 --- a/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py +++ b/plotly/validators/densitymapbox/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="densitymapbox.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_tickvals.py b/plotly/validators/densitymapbox/colorbar/_tickvals.py index 072534e43a..9e083c130e 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickvals.py +++ b/plotly/validators/densitymapbox/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py b/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py index 23f65191ff..cbb27b435e 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py +++ b/plotly/validators/densitymapbox/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_tickwidth.py b/plotly/validators/densitymapbox/colorbar/_tickwidth.py index 08f5254526..c0dbfce271 100644 --- a/plotly/validators/densitymapbox/colorbar/_tickwidth.py +++ b/plotly/validators/densitymapbox/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="densitymapbox.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_title.py b/plotly/validators/densitymapbox/colorbar/_title.py index f7b14ed2b4..e8fbcdc3c4 100644 --- a/plotly/validators/densitymapbox/colorbar/_title.py +++ b/plotly/validators/densitymapbox/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="densitymapbox.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_x.py b/plotly/validators/densitymapbox/colorbar/_x.py index ed1cd46aa2..18ce850bcd 100644 --- a/plotly/validators/densitymapbox/colorbar/_x.py +++ b/plotly/validators/densitymapbox/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="densitymapbox.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_xanchor.py b/plotly/validators/densitymapbox/colorbar/_xanchor.py index 24fa481d7e..8709929eac 100644 --- a/plotly/validators/densitymapbox/colorbar/_xanchor.py +++ b/plotly/validators/densitymapbox/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="densitymapbox.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_xpad.py b/plotly/validators/densitymapbox/colorbar/_xpad.py index c170e013a2..7b59770fdc 100644 --- a/plotly/validators/densitymapbox/colorbar/_xpad.py +++ b/plotly/validators/densitymapbox/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="densitymapbox.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_xref.py b/plotly/validators/densitymapbox/colorbar/_xref.py index faceafa65b..f5c2fe4b6c 100644 --- a/plotly/validators/densitymapbox/colorbar/_xref.py +++ b/plotly/validators/densitymapbox/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="densitymapbox.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_y.py b/plotly/validators/densitymapbox/colorbar/_y.py index 9f9c139d06..5ef839c65f 100644 --- a/plotly/validators/densitymapbox/colorbar/_y.py +++ b/plotly/validators/densitymapbox/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="densitymapbox.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/_yanchor.py b/plotly/validators/densitymapbox/colorbar/_yanchor.py index 1e3e73b813..f138bb782d 100644 --- a/plotly/validators/densitymapbox/colorbar/_yanchor.py +++ b/plotly/validators/densitymapbox/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="densitymapbox.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_ypad.py b/plotly/validators/densitymapbox/colorbar/_ypad.py index d8cd2ce40c..fdc4225520 100644 --- a/plotly/validators/densitymapbox/colorbar/_ypad.py +++ b/plotly/validators/densitymapbox/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="densitymapbox.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/_yref.py b/plotly/validators/densitymapbox/colorbar/_yref.py index c8072680f9..2ee0590b4a 100644 --- a/plotly/validators/densitymapbox/colorbar/_yref.py +++ b/plotly/validators/densitymapbox/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="densitymapbox.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py b/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_color.py b/plotly/validators/densitymapbox/colorbar/tickfont/_color.py index 1086ca7d84..13333b60e1 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_color.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_family.py b/plotly/validators/densitymapbox/colorbar/tickfont/_family.py index 1aa2c013a0..3f054cd0ce 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_family.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_lineposition.py b/plotly/validators/densitymapbox/colorbar/tickfont/_lineposition.py index 4a254bdafb..790c46c2e1 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_shadow.py b/plotly/validators/densitymapbox/colorbar/tickfont/_shadow.py index 8ec7d25c92..eabcd9ed5b 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_shadow.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_size.py b/plotly/validators/densitymapbox/colorbar/tickfont/_size.py index 9bbe27933d..fd830f1892 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_size.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_style.py b/plotly/validators/densitymapbox/colorbar/tickfont/_style.py index 36313413ab..d3f0d1af26 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_style.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_textcase.py b/plotly/validators/densitymapbox/colorbar/tickfont/_textcase.py index 0802a6dc63..3a93dff371 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_textcase.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_variant.py b/plotly/validators/densitymapbox/colorbar/tickfont/_variant.py index 3f52f1e1c6..1c8bf5a77f 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_variant.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymapbox/colorbar/tickfont/_weight.py b/plotly/validators/densitymapbox/colorbar/tickfont/_weight.py index 78a0a80b2a..513615abd8 100644 --- a/plotly/validators/densitymapbox/colorbar/tickfont/_weight.py +++ b/plotly/validators/densitymapbox/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymapbox.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py b/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/densitymapbox/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py index 35cac42d44..63c0f04bc1 100644 --- a/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/densitymapbox/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="densitymapbox.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py b/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py index a9401037fa..73aa71850d 100644 --- a/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/densitymapbox/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="densitymapbox.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py b/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py index 2219b97b16..e5fa0093f0 100644 --- a/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py +++ b/plotly/validators/densitymapbox/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="densitymapbox.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py index 827c5cce9d..5a4c7aa562 100644 --- a/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/densitymapbox/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="densitymapbox.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py b/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py index 31de4f49ef..ff2e3aebd2 100644 --- a/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py +++ b/plotly/validators/densitymapbox/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="densitymapbox.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/title/__init__.py b/plotly/validators/densitymapbox/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/densitymapbox/colorbar/title/__init__.py +++ b/plotly/validators/densitymapbox/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/densitymapbox/colorbar/title/_font.py b/plotly/validators/densitymapbox/colorbar/title/_font.py index e9c0275620..d382f4eaf9 100644 --- a/plotly/validators/densitymapbox/colorbar/title/_font.py +++ b/plotly/validators/densitymapbox/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymapbox.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/title/_side.py b/plotly/validators/densitymapbox/colorbar/title/_side.py index ea9f3b4d00..b790e456ba 100644 --- a/plotly/validators/densitymapbox/colorbar/title/_side.py +++ b/plotly/validators/densitymapbox/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="densitymapbox.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/title/_text.py b/plotly/validators/densitymapbox/colorbar/title/_text.py index c8ee982214..17fddbdd38 100644 --- a/plotly/validators/densitymapbox/colorbar/title/_text.py +++ b/plotly/validators/densitymapbox/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="densitymapbox.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/title/font/__init__.py b/plotly/validators/densitymapbox/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/__init__.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_color.py b/plotly/validators/densitymapbox/colorbar/title/font/_color.py index 48e65250ae..2a0ddf7407 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_color.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_family.py b/plotly/validators/densitymapbox/colorbar/title/font/_family.py index 71d52e9aae..818e71aae3 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_family.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_lineposition.py b/plotly/validators/densitymapbox/colorbar/title/font/_lineposition.py index a3ee0a98d4..a16b2dd43c 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_lineposition.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_shadow.py b/plotly/validators/densitymapbox/colorbar/title/font/_shadow.py index ce68c7b276..5ecba55d52 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_shadow.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_size.py b/plotly/validators/densitymapbox/colorbar/title/font/_size.py index fe3d46e3fa..99953f0e8e 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_size.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_style.py b/plotly/validators/densitymapbox/colorbar/title/font/_style.py index b43ed8f1e1..31e1a8f143 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_style.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_textcase.py b/plotly/validators/densitymapbox/colorbar/title/font/_textcase.py index f919f97e47..6bb53c0144 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_textcase.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_variant.py b/plotly/validators/densitymapbox/colorbar/title/font/_variant.py index bbc8d7c505..21d711c71f 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_variant.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymapbox/colorbar/title/font/_weight.py b/plotly/validators/densitymapbox/colorbar/title/font/_weight.py index cb807db589..8df45d948e 100644 --- a/plotly/validators/densitymapbox/colorbar/title/font/_weight.py +++ b/plotly/validators/densitymapbox/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymapbox.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/densitymapbox/hoverlabel/__init__.py b/plotly/validators/densitymapbox/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/densitymapbox/hoverlabel/__init__.py +++ b/plotly/validators/densitymapbox/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/densitymapbox/hoverlabel/_align.py b/plotly/validators/densitymapbox/hoverlabel/_align.py index a86abc49bf..11ffd94a2c 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_align.py +++ b/plotly/validators/densitymapbox/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="densitymapbox.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py b/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py index 10d7d4ec95..c7b5ed7ea2 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="densitymapbox.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py b/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py index 9edbe78340..e2598ba63c 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py +++ b/plotly/validators/densitymapbox/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="densitymapbox.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py b/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py index 87fcb8236f..2379d20a1e 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="densitymapbox.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py b/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py index b627047eec..0e5fdf555a 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py +++ b/plotly/validators/densitymapbox/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="densitymapbox.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py b/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py index ad5cbc6de2..e20f025cb6 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="densitymapbox.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/_font.py b/plotly/validators/densitymapbox/hoverlabel/_font.py index fc32d07df4..2130214a7f 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_font.py +++ b/plotly/validators/densitymapbox/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymapbox.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/hoverlabel/_namelength.py b/plotly/validators/densitymapbox/hoverlabel/_namelength.py index 9046eb5eb6..f3bd70ee7e 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_namelength.py +++ b/plotly/validators/densitymapbox/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="densitymapbox.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py b/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py index 7d3efc6452..2e5bf7cc36 100644 --- a/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="densitymapbox.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/__init__.py b/plotly/validators/densitymapbox/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/__init__.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_color.py b/plotly/validators/densitymapbox/hoverlabel/font/_color.py index 5e50473755..7fa9f4fc3f 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_color.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymapbox.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py index 7c416090ee..8b7075b6a2 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_family.py b/plotly/validators/densitymapbox/hoverlabel/font/_family.py index cec0b2dcc9..d1d445e331 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_family.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py index f9bcfa260b..154e51bc5b 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_lineposition.py b/plotly/validators/densitymapbox/hoverlabel/font/_lineposition.py index ff46063cff..c16cac9c08 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_lineposition.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_linepositionsrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_linepositionsrc.py index 27c7fe32b6..9ac99c81ad 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_shadow.py b/plotly/validators/densitymapbox/hoverlabel/font/_shadow.py index e2ab26b034..97d5d04074 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_shadow.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_shadowsrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_shadowsrc.py index f4990fa48c..5fb365293d 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_size.py b/plotly/validators/densitymapbox/hoverlabel/font/_size.py index 55ba87c47e..4501aa24a7 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_size.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymapbox.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py index 9fcdeecc1d..0d3541c6a1 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_style.py b/plotly/validators/densitymapbox/hoverlabel/font/_style.py index ac23a1cbac..76402823c0 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_style.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymapbox.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_stylesrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_stylesrc.py index 7cd8ec9777..5afda76369 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_textcase.py b/plotly/validators/densitymapbox/hoverlabel/font/_textcase.py index 8cbbbe016f..ef86af29a6 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_textcase.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_textcasesrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_textcasesrc.py index 82fa3546ce..8099a3fb28 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_variant.py b/plotly/validators/densitymapbox/hoverlabel/font/_variant.py index df60391d75..b78334a181 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_variant.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_variantsrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_variantsrc.py index 7a9a592faf..25ce65d77d 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_weight.py b/plotly/validators/densitymapbox/hoverlabel/font/_weight.py index 671055a7af..0013c5599b 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_weight.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/densitymapbox/hoverlabel/font/_weightsrc.py b/plotly/validators/densitymapbox/hoverlabel/font/_weightsrc.py index 3e70e0bc2f..8cb505febd 100644 --- a/plotly/validators/densitymapbox/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/densitymapbox/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="densitymapbox.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/legendgrouptitle/__init__.py b/plotly/validators/densitymapbox/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/__init__.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/densitymapbox/legendgrouptitle/_font.py b/plotly/validators/densitymapbox/legendgrouptitle/_font.py index a1ed90a8a7..4b4836d2c2 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/_font.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="densitymapbox.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/densitymapbox/legendgrouptitle/_text.py b/plotly/validators/densitymapbox/legendgrouptitle/_text.py index f213fc5a38..c92d04cf4f 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/_text.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="densitymapbox.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/__init__.py b/plotly/validators/densitymapbox/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/__init__.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_color.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_color.py index da9fe0d0af..09eae49d12 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_color.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_family.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_family.py index 5d00da65c0..b2428843cb 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_family.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_lineposition.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_lineposition.py index e1cc78ad78..d063d3539b 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_shadow.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_shadow.py index 018d8957f5..73917baf0f 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_size.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_size.py index 506317e98c..6628112121 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_size.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_style.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_style.py index 4c84ca3cee..f884a6ac53 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_style.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_textcase.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_textcase.py index fc05c6588a..5abb8bbd46 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_variant.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_variant.py index 234a13231b..bc2e26b221 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_variant.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/densitymapbox/legendgrouptitle/font/_weight.py b/plotly/validators/densitymapbox/legendgrouptitle/font/_weight.py index 14f58fdcbe..c5ed84cc69 100644 --- a/plotly/validators/densitymapbox/legendgrouptitle/font/_weight.py +++ b/plotly/validators/densitymapbox/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="densitymapbox.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/densitymapbox/stream/__init__.py b/plotly/validators/densitymapbox/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/densitymapbox/stream/__init__.py +++ b/plotly/validators/densitymapbox/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/densitymapbox/stream/_maxpoints.py b/plotly/validators/densitymapbox/stream/_maxpoints.py index c89d0c32d6..15b620b624 100644 --- a/plotly/validators/densitymapbox/stream/_maxpoints.py +++ b/plotly/validators/densitymapbox/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="densitymapbox.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/densitymapbox/stream/_token.py b/plotly/validators/densitymapbox/stream/_token.py index 3a14de6674..8cd875c60e 100644 --- a/plotly/validators/densitymapbox/stream/_token.py +++ b/plotly/validators/densitymapbox/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="densitymapbox.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/frame/__init__.py b/plotly/validators/frame/__init__.py index 447e302627..b7de62afa7 100644 --- a/plotly/validators/frame/__init__.py +++ b/plotly/validators/frame/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._traces import TracesValidator - from ._name import NameValidator - from ._layout import LayoutValidator - from ._group import GroupValidator - from ._data import DataValidator - from ._baseframe import BaseframeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._traces.TracesValidator", - "._name.NameValidator", - "._layout.LayoutValidator", - "._group.GroupValidator", - "._data.DataValidator", - "._baseframe.BaseframeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._traces.TracesValidator", + "._name.NameValidator", + "._layout.LayoutValidator", + "._group.GroupValidator", + "._data.DataValidator", + "._baseframe.BaseframeValidator", + ], +) diff --git a/plotly/validators/frame/_baseframe.py b/plotly/validators/frame/_baseframe.py index e205b0282b..558eeb8a5f 100644 --- a/plotly/validators/frame/_baseframe.py +++ b/plotly/validators/frame/_baseframe.py @@ -1,8 +1,6 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaseframeValidator(_plotly_utils.basevalidators.StringValidator): +class BaseframeValidator(_bv.StringValidator): def __init__(self, plotly_name="baseframe", parent_name="frame", **kwargs): - super(BaseframeValidator, self).__init__( - plotly_name=plotly_name, parent_name=parent_name, **kwargs - ) + super().__init__(plotly_name, parent_name, **kwargs) diff --git a/plotly/validators/frame/_data.py b/plotly/validators/frame/_data.py index b44c421387..df3fbf6a41 100644 --- a/plotly/validators/frame/_data.py +++ b/plotly/validators/frame/_data.py @@ -1,8 +1,6 @@ -import plotly.validators +import plotly.validators as _bv -class DataValidator(plotly.validators.DataValidator): +class DataValidator(_bv.DataValidator): def __init__(self, plotly_name="data", parent_name="frame", **kwargs): - super(DataValidator, self).__init__( - plotly_name=plotly_name, parent_name=parent_name, **kwargs - ) + super().__init__(plotly_name, parent_name, **kwargs) diff --git a/plotly/validators/frame/_group.py b/plotly/validators/frame/_group.py index f3885f16ae..9148b4a918 100644 --- a/plotly/validators/frame/_group.py +++ b/plotly/validators/frame/_group.py @@ -1,8 +1,6 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GroupValidator(_plotly_utils.basevalidators.StringValidator): +class GroupValidator(_bv.StringValidator): def __init__(self, plotly_name="group", parent_name="frame", **kwargs): - super(GroupValidator, self).__init__( - plotly_name=plotly_name, parent_name=parent_name, **kwargs - ) + super().__init__(plotly_name, parent_name, **kwargs) diff --git a/plotly/validators/frame/_layout.py b/plotly/validators/frame/_layout.py index 56ea4aa01e..abc210ba70 100644 --- a/plotly/validators/frame/_layout.py +++ b/plotly/validators/frame/_layout.py @@ -1,8 +1,6 @@ -import plotly.validators +import plotly.validators as _bv -class LayoutValidator(plotly.validators.LayoutValidator): +class LayoutValidator(_bv.LayoutValidator): def __init__(self, plotly_name="layout", parent_name="frame", **kwargs): - super(LayoutValidator, self).__init__( - plotly_name=plotly_name, parent_name=parent_name, **kwargs - ) + super().__init__(plotly_name, parent_name, **kwargs) diff --git a/plotly/validators/frame/_name.py b/plotly/validators/frame/_name.py index dbad612831..ae3ed1197b 100644 --- a/plotly/validators/frame/_name.py +++ b/plotly/validators/frame/_name.py @@ -1,8 +1,6 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="frame", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, parent_name=parent_name, **kwargs - ) + super().__init__(plotly_name, parent_name, **kwargs) diff --git a/plotly/validators/frame/_traces.py b/plotly/validators/frame/_traces.py index 62ab82eaa6..e05cb40185 100644 --- a/plotly/validators/frame/_traces.py +++ b/plotly/validators/frame/_traces.py @@ -1,8 +1,6 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracesValidator(_plotly_utils.basevalidators.AnyValidator): +class TracesValidator(_bv.AnyValidator): def __init__(self, plotly_name="traces", parent_name="frame", **kwargs): - super(TracesValidator, self).__init__( - plotly_name=plotly_name, parent_name=parent_name, **kwargs - ) + super().__init__(plotly_name, parent_name, **kwargs) diff --git a/plotly/validators/funnel/__init__.py b/plotly/validators/funnel/__init__.py index b1419916a7..dc46db3e25 100644 --- a/plotly/validators/funnel/__init__.py +++ b/plotly/validators/funnel/__init__.py @@ -1,145 +1,75 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetgroup import OffsetgroupValidator - from ._offset import OffsetValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._insidetextfont import InsidetextfontValidator - from ._insidetextanchor import InsidetextanchorValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._constraintext import ConstraintextValidator - from ._connector import ConnectorValidator - from ._cliponaxis import CliponaxisValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetgroup.OffsetgroupValidator", - "._offset.OffsetValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._insidetextfont.InsidetextfontValidator", - "._insidetextanchor.InsidetextanchorValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._constraintext.ConstraintextValidator", - "._connector.ConnectorValidator", - "._cliponaxis.CliponaxisValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._constraintext.ConstraintextValidator", + "._connector.ConnectorValidator", + "._cliponaxis.CliponaxisValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/funnel/_alignmentgroup.py b/plotly/validators/funnel/_alignmentgroup.py index 24d02b9cc4..f2b8d1aefe 100644 --- a/plotly/validators/funnel/_alignmentgroup.py +++ b/plotly/validators/funnel/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="funnel", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_cliponaxis.py b/plotly/validators/funnel/_cliponaxis.py index 782dd82532..f3808aeee0 100644 --- a/plotly/validators/funnel/_cliponaxis.py +++ b/plotly/validators/funnel/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="funnel", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/_connector.py b/plotly/validators/funnel/_connector.py index dcfae74a8e..ea8baac095 100644 --- a/plotly/validators/funnel/_connector.py +++ b/plotly/validators/funnel/_connector.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): +class ConnectorValidator(_bv.CompoundValidator): def __init__(self, plotly_name="connector", parent_name="funnel", **kwargs): - super(ConnectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Connector"), data_docs=kwargs.pop( "data_docs", """ - fillcolor - Sets the fill color. - line - :class:`plotly.graph_objects.funnel.connector.L - ine` instance or dict with compatible - properties - visible - Determines if connector regions and lines are - drawn. """, ), **kwargs, diff --git a/plotly/validators/funnel/_constraintext.py b/plotly/validators/funnel/_constraintext.py index b9c504172a..8ecf9129ce 100644 --- a/plotly/validators/funnel/_constraintext.py +++ b/plotly/validators/funnel/_constraintext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstraintextValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="constraintext", parent_name="funnel", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "both", "none"]), **kwargs, diff --git a/plotly/validators/funnel/_customdata.py b/plotly/validators/funnel/_customdata.py index 18d87b1b23..6a54f0a6a9 100644 --- a/plotly/validators/funnel/_customdata.py +++ b/plotly/validators/funnel/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="funnel", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_customdatasrc.py b/plotly/validators/funnel/_customdatasrc.py index b417537aa1..04fd2b4d64 100644 --- a/plotly/validators/funnel/_customdatasrc.py +++ b/plotly/validators/funnel/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="funnel", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_dx.py b/plotly/validators/funnel/_dx.py index f7eac3eabb..0324a6af09 100644 --- a/plotly/validators/funnel/_dx.py +++ b/plotly/validators/funnel/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="funnel", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_dy.py b/plotly/validators/funnel/_dy.py index 87e3db91f5..d303083523 100644 --- a/plotly/validators/funnel/_dy.py +++ b/plotly/validators/funnel/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="funnel", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_hoverinfo.py b/plotly/validators/funnel/_hoverinfo.py index c234a2398c..615be06984 100644 --- a/plotly/validators/funnel/_hoverinfo.py +++ b/plotly/validators/funnel/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="funnel", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/funnel/_hoverinfosrc.py b/plotly/validators/funnel/_hoverinfosrc.py index f7497e22ec..19d2d936be 100644 --- a/plotly/validators/funnel/_hoverinfosrc.py +++ b/plotly/validators/funnel/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="funnel", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_hoverlabel.py b/plotly/validators/funnel/_hoverlabel.py index 4ce89b79e7..913fe3a3b4 100644 --- a/plotly/validators/funnel/_hoverlabel.py +++ b/plotly/validators/funnel/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="funnel", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/funnel/_hovertemplate.py b/plotly/validators/funnel/_hovertemplate.py index 647fcbf654..60b0924bc4 100644 --- a/plotly/validators/funnel/_hovertemplate.py +++ b/plotly/validators/funnel/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="funnel", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnel/_hovertemplatesrc.py b/plotly/validators/funnel/_hovertemplatesrc.py index 4e797b08e5..019260e08a 100644 --- a/plotly/validators/funnel/_hovertemplatesrc.py +++ b/plotly/validators/funnel/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="funnel", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_hovertext.py b/plotly/validators/funnel/_hovertext.py index b08f4031db..1fef52848e 100644 --- a/plotly/validators/funnel/_hovertext.py +++ b/plotly/validators/funnel/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="funnel", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnel/_hovertextsrc.py b/plotly/validators/funnel/_hovertextsrc.py index 9b690df937..6f8d4f46ef 100644 --- a/plotly/validators/funnel/_hovertextsrc.py +++ b/plotly/validators/funnel/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="funnel", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_ids.py b/plotly/validators/funnel/_ids.py index ffda10bed5..792e75dfb0 100644 --- a/plotly/validators/funnel/_ids.py +++ b/plotly/validators/funnel/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="funnel", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_idssrc.py b/plotly/validators/funnel/_idssrc.py index 9cdfed9e49..7235622e08 100644 --- a/plotly/validators/funnel/_idssrc.py +++ b/plotly/validators/funnel/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="funnel", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_insidetextanchor.py b/plotly/validators/funnel/_insidetextanchor.py index 7902fe0e81..63bf6e8e5d 100644 --- a/plotly/validators/funnel/_insidetextanchor.py +++ b/plotly/validators/funnel/_insidetextanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class InsidetextanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="insidetextanchor", parent_name="funnel", **kwargs): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["end", "middle", "start"]), **kwargs, diff --git a/plotly/validators/funnel/_insidetextfont.py b/plotly/validators/funnel/_insidetextfont.py index f20bb91ac5..df1447e347 100644 --- a/plotly/validators/funnel/_insidetextfont.py +++ b/plotly/validators/funnel/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="funnel", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnel/_legend.py b/plotly/validators/funnel/_legend.py index 44b53d5a1c..287f22f7ed 100644 --- a/plotly/validators/funnel/_legend.py +++ b/plotly/validators/funnel/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="funnel", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnel/_legendgroup.py b/plotly/validators/funnel/_legendgroup.py index 6105b1693b..9c0d0e5b1f 100644 --- a/plotly/validators/funnel/_legendgroup.py +++ b/plotly/validators/funnel/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="funnel", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/_legendgrouptitle.py b/plotly/validators/funnel/_legendgrouptitle.py index c98e089a7e..62aea5b177 100644 --- a/plotly/validators/funnel/_legendgrouptitle.py +++ b/plotly/validators/funnel/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="funnel", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/funnel/_legendrank.py b/plotly/validators/funnel/_legendrank.py index 57202f2670..11b9465ba3 100644 --- a/plotly/validators/funnel/_legendrank.py +++ b/plotly/validators/funnel/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="funnel", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/_legendwidth.py b/plotly/validators/funnel/_legendwidth.py index fedb0ccf64..ce50a71431 100644 --- a/plotly/validators/funnel/_legendwidth.py +++ b/plotly/validators/funnel/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="funnel", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/_marker.py b/plotly/validators/funnel/_marker.py index daee497c33..30455c7939 100644 --- a/plotly/validators/funnel/_marker.py +++ b/plotly/validators/funnel/_marker.py @@ -1,110 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="funnel", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.funnel.marker.Colo - rBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.funnel.marker.Line - ` instance or dict with compatible properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/funnel/_meta.py b/plotly/validators/funnel/_meta.py index 5391c67330..55a7119686 100644 --- a/plotly/validators/funnel/_meta.py +++ b/plotly/validators/funnel/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="funnel", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnel/_metasrc.py b/plotly/validators/funnel/_metasrc.py index 816255d84b..3b5ca65094 100644 --- a/plotly/validators/funnel/_metasrc.py +++ b/plotly/validators/funnel/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="funnel", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_name.py b/plotly/validators/funnel/_name.py index bd6f7cd8b9..df8f201495 100644 --- a/plotly/validators/funnel/_name.py +++ b/plotly/validators/funnel/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="funnel", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/_offset.py b/plotly/validators/funnel/_offset.py index 32304632b4..c0c9314b13 100644 --- a/plotly/validators/funnel/_offset.py +++ b/plotly/validators/funnel/_offset.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__(self, plotly_name="offset", parent_name="funnel", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/funnel/_offsetgroup.py b/plotly/validators/funnel/_offsetgroup.py index fa7e6fe6fb..8cd393aa11 100644 --- a/plotly/validators/funnel/_offsetgroup.py +++ b/plotly/validators/funnel/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="funnel", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_opacity.py b/plotly/validators/funnel/_opacity.py index e55a8c6088..df8a800968 100644 --- a/plotly/validators/funnel/_opacity.py +++ b/plotly/validators/funnel/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="funnel", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnel/_orientation.py b/plotly/validators/funnel/_orientation.py index a2702c1bcb..89e5808c09 100644 --- a/plotly/validators/funnel/_orientation.py +++ b/plotly/validators/funnel/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="funnel", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/funnel/_outsidetextfont.py b/plotly/validators/funnel/_outsidetextfont.py index 809be87ae6..42f3369530 100644 --- a/plotly/validators/funnel/_outsidetextfont.py +++ b/plotly/validators/funnel/_outsidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="outsidetextfont", parent_name="funnel", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnel/_selectedpoints.py b/plotly/validators/funnel/_selectedpoints.py index f7e58cde44..70aaf18e88 100644 --- a/plotly/validators/funnel/_selectedpoints.py +++ b/plotly/validators/funnel/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="funnel", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_showlegend.py b/plotly/validators/funnel/_showlegend.py index d8decff8e3..34c551658e 100644 --- a/plotly/validators/funnel/_showlegend.py +++ b/plotly/validators/funnel/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="funnel", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/_stream.py b/plotly/validators/funnel/_stream.py index fc34904fda..4eadde7483 100644 --- a/plotly/validators/funnel/_stream.py +++ b/plotly/validators/funnel/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="funnel", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/funnel/_text.py b/plotly/validators/funnel/_text.py index 0cf076e98e..89544a43e0 100644 --- a/plotly/validators/funnel/_text.py +++ b/plotly/validators/funnel/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="funnel", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/funnel/_textangle.py b/plotly/validators/funnel/_textangle.py index 331e22077c..c9a878319c 100644 --- a/plotly/validators/funnel/_textangle.py +++ b/plotly/validators/funnel/_textangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="textangle", parent_name="funnel", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/_textfont.py b/plotly/validators/funnel/_textfont.py index 8b9e2dfaee..deec50381d 100644 --- a/plotly/validators/funnel/_textfont.py +++ b/plotly/validators/funnel/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="funnel", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnel/_textinfo.py b/plotly/validators/funnel/_textinfo.py index 7931d3e4bb..ef7c8b13f1 100644 --- a/plotly/validators/funnel/_textinfo.py +++ b/plotly/validators/funnel/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="funnel", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnel/_textposition.py b/plotly/validators/funnel/_textposition.py index 5c31777eaa..fb373582bc 100644 --- a/plotly/validators/funnel/_textposition.py +++ b/plotly/validators/funnel/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="funnel", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), diff --git a/plotly/validators/funnel/_textpositionsrc.py b/plotly/validators/funnel/_textpositionsrc.py index a6d94989d2..1845792b85 100644 --- a/plotly/validators/funnel/_textpositionsrc.py +++ b/plotly/validators/funnel/_textpositionsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textpositionsrc", parent_name="funnel", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_textsrc.py b/plotly/validators/funnel/_textsrc.py index 032c812700..818d7456e8 100644 --- a/plotly/validators/funnel/_textsrc.py +++ b/plotly/validators/funnel/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="funnel", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_texttemplate.py b/plotly/validators/funnel/_texttemplate.py index 3f5ea520be..6737c5faf9 100644 --- a/plotly/validators/funnel/_texttemplate.py +++ b/plotly/validators/funnel/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="funnel", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnel/_texttemplatesrc.py b/plotly/validators/funnel/_texttemplatesrc.py index 32f40e2baa..3440ca0a5e 100644 --- a/plotly/validators/funnel/_texttemplatesrc.py +++ b/plotly/validators/funnel/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="funnel", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_uid.py b/plotly/validators/funnel/_uid.py index 6658bc6823..c296bfaf1d 100644 --- a/plotly/validators/funnel/_uid.py +++ b/plotly/validators/funnel/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="funnel", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/_uirevision.py b/plotly/validators/funnel/_uirevision.py index 8a0c44d507..360aa73cd2 100644 --- a/plotly/validators/funnel/_uirevision.py +++ b/plotly/validators/funnel/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="funnel", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_visible.py b/plotly/validators/funnel/_visible.py index 4215a2cb63..80d80fee69 100644 --- a/plotly/validators/funnel/_visible.py +++ b/plotly/validators/funnel/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="funnel", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/funnel/_width.py b/plotly/validators/funnel/_width.py index e37747e15d..9b26193215 100644 --- a/plotly/validators/funnel/_width.py +++ b/plotly/validators/funnel/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="funnel", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnel/_x.py b/plotly/validators/funnel/_x.py index 096d75b61d..44f2f65823 100644 --- a/plotly/validators/funnel/_x.py +++ b/plotly/validators/funnel/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="funnel", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/funnel/_x0.py b/plotly/validators/funnel/_x0.py index 1210b81714..b2076173b5 100644 --- a/plotly/validators/funnel/_x0.py +++ b/plotly/validators/funnel/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="funnel", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/funnel/_xaxis.py b/plotly/validators/funnel/_xaxis.py index 25241092ec..ce8ccdd0e2 100644 --- a/plotly/validators/funnel/_xaxis.py +++ b/plotly/validators/funnel/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="funnel", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/funnel/_xhoverformat.py b/plotly/validators/funnel/_xhoverformat.py index cd454d0b86..d43bc2987c 100644 --- a/plotly/validators/funnel/_xhoverformat.py +++ b/plotly/validators/funnel/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="funnel", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_xperiod.py b/plotly/validators/funnel/_xperiod.py index ec89b5c743..86cbc88f02 100644 --- a/plotly/validators/funnel/_xperiod.py +++ b/plotly/validators/funnel/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="funnel", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_xperiod0.py b/plotly/validators/funnel/_xperiod0.py index 6a10271918..d1f7ba19c7 100644 --- a/plotly/validators/funnel/_xperiod0.py +++ b/plotly/validators/funnel/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="funnel", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_xperiodalignment.py b/plotly/validators/funnel/_xperiodalignment.py index 21e9bfff78..e48cd63e57 100644 --- a/plotly/validators/funnel/_xperiodalignment.py +++ b/plotly/validators/funnel/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="funnel", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/funnel/_xsrc.py b/plotly/validators/funnel/_xsrc.py index 6ea7e1691a..b7ba392892 100644 --- a/plotly/validators/funnel/_xsrc.py +++ b/plotly/validators/funnel/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="funnel", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_y.py b/plotly/validators/funnel/_y.py index ea1d2d34bb..17d74e27a3 100644 --- a/plotly/validators/funnel/_y.py +++ b/plotly/validators/funnel/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="funnel", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/funnel/_y0.py b/plotly/validators/funnel/_y0.py index eca2d44430..d85a238804 100644 --- a/plotly/validators/funnel/_y0.py +++ b/plotly/validators/funnel/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="funnel", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/funnel/_yaxis.py b/plotly/validators/funnel/_yaxis.py index 435f2f58d8..e6354b4f02 100644 --- a/plotly/validators/funnel/_yaxis.py +++ b/plotly/validators/funnel/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="funnel", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/funnel/_yhoverformat.py b/plotly/validators/funnel/_yhoverformat.py index b345b8fd2b..9142a18ed0 100644 --- a/plotly/validators/funnel/_yhoverformat.py +++ b/plotly/validators/funnel/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="funnel", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_yperiod.py b/plotly/validators/funnel/_yperiod.py index 4d4acd7015..1276863378 100644 --- a/plotly/validators/funnel/_yperiod.py +++ b/plotly/validators/funnel/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="funnel", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_yperiod0.py b/plotly/validators/funnel/_yperiod0.py index f385d9d406..e655d644ba 100644 --- a/plotly/validators/funnel/_yperiod0.py +++ b/plotly/validators/funnel/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="funnel", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/_yperiodalignment.py b/plotly/validators/funnel/_yperiodalignment.py index 426f9b735e..a275674c00 100644 --- a/plotly/validators/funnel/_yperiodalignment.py +++ b/plotly/validators/funnel/_yperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yperiodalignment", parent_name="funnel", **kwargs): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/funnel/_ysrc.py b/plotly/validators/funnel/_ysrc.py index d8b47119b8..7274117118 100644 --- a/plotly/validators/funnel/_ysrc.py +++ b/plotly/validators/funnel/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="funnel", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/_zorder.py b/plotly/validators/funnel/_zorder.py index 87ecc16c1a..9a69bba06c 100644 --- a/plotly/validators/funnel/_zorder.py +++ b/plotly/validators/funnel/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="funnel", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/connector/__init__.py b/plotly/validators/funnel/connector/__init__.py index bdf63f319c..2e910a4ea5 100644 --- a/plotly/validators/funnel/connector/__init__.py +++ b/plotly/validators/funnel/connector/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._line import LineValidator - from ._fillcolor import FillcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._line.LineValidator", - "._fillcolor.FillcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._line.LineValidator", + "._fillcolor.FillcolorValidator", + ], +) diff --git a/plotly/validators/funnel/connector/_fillcolor.py b/plotly/validators/funnel/connector/_fillcolor.py index 6ec434238c..6cbffb38e4 100644 --- a/plotly/validators/funnel/connector/_fillcolor.py +++ b/plotly/validators/funnel/connector/_fillcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fillcolor", parent_name="funnel.connector", **kwargs ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/connector/_line.py b/plotly/validators/funnel/connector/_line.py index f4a61501b0..de7c8d14bd 100644 --- a/plotly/validators/funnel/connector/_line.py +++ b/plotly/validators/funnel/connector/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="funnel.connector", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/funnel/connector/_visible.py b/plotly/validators/funnel/connector/_visible.py index 6210b0b1fe..8e1c0fd354 100644 --- a/plotly/validators/funnel/connector/_visible.py +++ b/plotly/validators/funnel/connector/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="funnel.connector", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/connector/line/__init__.py b/plotly/validators/funnel/connector/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/funnel/connector/line/__init__.py +++ b/plotly/validators/funnel/connector/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/funnel/connector/line/_color.py b/plotly/validators/funnel/connector/line/_color.py index 8f31ff90b7..720a178bfe 100644 --- a/plotly/validators/funnel/connector/line/_color.py +++ b/plotly/validators/funnel/connector/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.connector.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/connector/line/_dash.py b/plotly/validators/funnel/connector/line/_dash.py index ade52e5070..dc27a3559f 100644 --- a/plotly/validators/funnel/connector/line/_dash.py +++ b/plotly/validators/funnel/connector/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="funnel.connector.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/funnel/connector/line/_width.py b/plotly/validators/funnel/connector/line/_width.py index 3cf198a009..d8f1969a1b 100644 --- a/plotly/validators/funnel/connector/line/_width.py +++ b/plotly/validators/funnel/connector/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="funnel.connector.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/hoverlabel/__init__.py b/plotly/validators/funnel/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/funnel/hoverlabel/__init__.py +++ b/plotly/validators/funnel/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/funnel/hoverlabel/_align.py b/plotly/validators/funnel/hoverlabel/_align.py index d6b9395922..f0f9211dbc 100644 --- a/plotly/validators/funnel/hoverlabel/_align.py +++ b/plotly/validators/funnel/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="funnel.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/funnel/hoverlabel/_alignsrc.py b/plotly/validators/funnel/hoverlabel/_alignsrc.py index 5e6126824f..ce8e851803 100644 --- a/plotly/validators/funnel/hoverlabel/_alignsrc.py +++ b/plotly/validators/funnel/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="funnel.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/_bgcolor.py b/plotly/validators/funnel/hoverlabel/_bgcolor.py index f8d3cc5813..7db734ef89 100644 --- a/plotly/validators/funnel/hoverlabel/_bgcolor.py +++ b/plotly/validators/funnel/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="funnel.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py b/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py index 63595fc3d6..ad0b2fcb4c 100644 --- a/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/funnel/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="funnel.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/_bordercolor.py b/plotly/validators/funnel/hoverlabel/_bordercolor.py index 75fdace141..01dac2f90a 100644 --- a/plotly/validators/funnel/hoverlabel/_bordercolor.py +++ b/plotly/validators/funnel/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="funnel.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py b/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py index 2444253abf..be7300eb1b 100644 --- a/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/funnel/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="funnel.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/_font.py b/plotly/validators/funnel/hoverlabel/_font.py index e5ddeeb75d..4a25be336b 100644 --- a/plotly/validators/funnel/hoverlabel/_font.py +++ b/plotly/validators/funnel/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="funnel.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnel/hoverlabel/_namelength.py b/plotly/validators/funnel/hoverlabel/_namelength.py index fcd607c1bb..12ad6244b9 100644 --- a/plotly/validators/funnel/hoverlabel/_namelength.py +++ b/plotly/validators/funnel/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="funnel.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/funnel/hoverlabel/_namelengthsrc.py b/plotly/validators/funnel/hoverlabel/_namelengthsrc.py index e7373d4fad..4f6c928ac9 100644 --- a/plotly/validators/funnel/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/funnel/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="funnel.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/__init__.py b/plotly/validators/funnel/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnel/hoverlabel/font/__init__.py +++ b/plotly/validators/funnel/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/hoverlabel/font/_color.py b/plotly/validators/funnel/hoverlabel/font/_color.py index d01fb78fdd..ba096e0fd3 100644 --- a/plotly/validators/funnel/hoverlabel/font/_color.py +++ b/plotly/validators/funnel/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnel/hoverlabel/font/_colorsrc.py b/plotly/validators/funnel/hoverlabel/font/_colorsrc.py index 56910e140d..4aa959c4bd 100644 --- a/plotly/validators/funnel/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_family.py b/plotly/validators/funnel/hoverlabel/font/_family.py index af699127b7..e0770ce0d6 100644 --- a/plotly/validators/funnel/hoverlabel/font/_family.py +++ b/plotly/validators/funnel/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnel/hoverlabel/font/_familysrc.py b/plotly/validators/funnel/hoverlabel/font/_familysrc.py index 28c77ffa37..cedd32370f 100644 --- a/plotly/validators/funnel/hoverlabel/font/_familysrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_lineposition.py b/plotly/validators/funnel/hoverlabel/font/_lineposition.py index d2a8a3380e..cd909a5b3e 100644 --- a/plotly/validators/funnel/hoverlabel/font/_lineposition.py +++ b/plotly/validators/funnel/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnel/hoverlabel/font/_linepositionsrc.py b/plotly/validators/funnel/hoverlabel/font/_linepositionsrc.py index a1b1679e0a..cfb235a70f 100644 --- a/plotly/validators/funnel/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnel.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_shadow.py b/plotly/validators/funnel/hoverlabel/font/_shadow.py index b7db191e25..a6887d1ba7 100644 --- a/plotly/validators/funnel/hoverlabel/font/_shadow.py +++ b/plotly/validators/funnel/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnel.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnel/hoverlabel/font/_shadowsrc.py b/plotly/validators/funnel/hoverlabel/font/_shadowsrc.py index 9f85f9b20e..d3d99ed3bb 100644 --- a/plotly/validators/funnel/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_size.py b/plotly/validators/funnel/hoverlabel/font/_size.py index 08be9ea71e..96c9054e8d 100644 --- a/plotly/validators/funnel/hoverlabel/font/_size.py +++ b/plotly/validators/funnel/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnel.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnel/hoverlabel/font/_sizesrc.py b/plotly/validators/funnel/hoverlabel/font/_sizesrc.py index e3b66273fe..6130db4664 100644 --- a/plotly/validators/funnel/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_style.py b/plotly/validators/funnel/hoverlabel/font/_style.py index 5570714b63..1d6d96ce76 100644 --- a/plotly/validators/funnel/hoverlabel/font/_style.py +++ b/plotly/validators/funnel/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnel.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnel/hoverlabel/font/_stylesrc.py b/plotly/validators/funnel/hoverlabel/font/_stylesrc.py index 38a4f118cb..0047314aed 100644 --- a/plotly/validators/funnel/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_textcase.py b/plotly/validators/funnel/hoverlabel/font/_textcase.py index 877a61174f..b2579f886f 100644 --- a/plotly/validators/funnel/hoverlabel/font/_textcase.py +++ b/plotly/validators/funnel/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnel/hoverlabel/font/_textcasesrc.py b/plotly/validators/funnel/hoverlabel/font/_textcasesrc.py index b266fa6844..802d7d9a32 100644 --- a/plotly/validators/funnel/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_variant.py b/plotly/validators/funnel/hoverlabel/font/_variant.py index 3a201945aa..6565fde7e2 100644 --- a/plotly/validators/funnel/hoverlabel/font/_variant.py +++ b/plotly/validators/funnel/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/funnel/hoverlabel/font/_variantsrc.py b/plotly/validators/funnel/hoverlabel/font/_variantsrc.py index 4f3a4ad4fc..021d19c2f3 100644 --- a/plotly/validators/funnel/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/hoverlabel/font/_weight.py b/plotly/validators/funnel/hoverlabel/font/_weight.py index 60d07bead5..7af9c67f45 100644 --- a/plotly/validators/funnel/hoverlabel/font/_weight.py +++ b/plotly/validators/funnel/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnel.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnel/hoverlabel/font/_weightsrc.py b/plotly/validators/funnel/hoverlabel/font/_weightsrc.py index 37e4dd28b9..4954022ef1 100644 --- a/plotly/validators/funnel/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/funnel/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnel.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/__init__.py b/plotly/validators/funnel/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnel/insidetextfont/__init__.py +++ b/plotly/validators/funnel/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/insidetextfont/_color.py b/plotly/validators/funnel/insidetextfont/_color.py index 54d5e05583..51bf672c50 100644 --- a/plotly/validators/funnel/insidetextfont/_color.py +++ b/plotly/validators/funnel/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnel/insidetextfont/_colorsrc.py b/plotly/validators/funnel/insidetextfont/_colorsrc.py index 55ebdda24f..55fa2602be 100644 --- a/plotly/validators/funnel/insidetextfont/_colorsrc.py +++ b/plotly/validators/funnel/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnel.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_family.py b/plotly/validators/funnel/insidetextfont/_family.py index 3da355fd9e..38b99e7f27 100644 --- a/plotly/validators/funnel/insidetextfont/_family.py +++ b/plotly/validators/funnel/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnel/insidetextfont/_familysrc.py b/plotly/validators/funnel/insidetextfont/_familysrc.py index c93b3427c4..8a25bda300 100644 --- a/plotly/validators/funnel/insidetextfont/_familysrc.py +++ b/plotly/validators/funnel/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnel.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_lineposition.py b/plotly/validators/funnel/insidetextfont/_lineposition.py index 5b569e0ad8..3cea9d1b3c 100644 --- a/plotly/validators/funnel/insidetextfont/_lineposition.py +++ b/plotly/validators/funnel/insidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.insidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnel/insidetextfont/_linepositionsrc.py b/plotly/validators/funnel/insidetextfont/_linepositionsrc.py index fbcc2800d3..565a824cbb 100644 --- a/plotly/validators/funnel/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/funnel/insidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnel.insidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_shadow.py b/plotly/validators/funnel/insidetextfont/_shadow.py index 56cce12dd3..081162eddd 100644 --- a/plotly/validators/funnel/insidetextfont/_shadow.py +++ b/plotly/validators/funnel/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnel.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/funnel/insidetextfont/_shadowsrc.py b/plotly/validators/funnel/insidetextfont/_shadowsrc.py index 69d76bfa04..d458c11440 100644 --- a/plotly/validators/funnel/insidetextfont/_shadowsrc.py +++ b/plotly/validators/funnel/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnel.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_size.py b/plotly/validators/funnel/insidetextfont/_size.py index b9f387d7c9..a5bdeb2171 100644 --- a/plotly/validators/funnel/insidetextfont/_size.py +++ b/plotly/validators/funnel/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnel.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnel/insidetextfont/_sizesrc.py b/plotly/validators/funnel/insidetextfont/_sizesrc.py index 35d5184c53..d3f17ca380 100644 --- a/plotly/validators/funnel/insidetextfont/_sizesrc.py +++ b/plotly/validators/funnel/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnel.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_style.py b/plotly/validators/funnel/insidetextfont/_style.py index 0b37a49206..b23689ed56 100644 --- a/plotly/validators/funnel/insidetextfont/_style.py +++ b/plotly/validators/funnel/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnel.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnel/insidetextfont/_stylesrc.py b/plotly/validators/funnel/insidetextfont/_stylesrc.py index 17f24ed368..92a0593869 100644 --- a/plotly/validators/funnel/insidetextfont/_stylesrc.py +++ b/plotly/validators/funnel/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnel.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_textcase.py b/plotly/validators/funnel/insidetextfont/_textcase.py index aab0c482d5..d3cb588327 100644 --- a/plotly/validators/funnel/insidetextfont/_textcase.py +++ b/plotly/validators/funnel/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnel/insidetextfont/_textcasesrc.py b/plotly/validators/funnel/insidetextfont/_textcasesrc.py index 88c9e81d4c..a989cbc3c0 100644 --- a/plotly/validators/funnel/insidetextfont/_textcasesrc.py +++ b/plotly/validators/funnel/insidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnel.insidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_variant.py b/plotly/validators/funnel/insidetextfont/_variant.py index f6c8324854..33cbeeab51 100644 --- a/plotly/validators/funnel/insidetextfont/_variant.py +++ b/plotly/validators/funnel/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/funnel/insidetextfont/_variantsrc.py b/plotly/validators/funnel/insidetextfont/_variantsrc.py index b2351c3c84..0bb1201496 100644 --- a/plotly/validators/funnel/insidetextfont/_variantsrc.py +++ b/plotly/validators/funnel/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnel.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/insidetextfont/_weight.py b/plotly/validators/funnel/insidetextfont/_weight.py index 8af1deacd1..c3e3bc7b14 100644 --- a/plotly/validators/funnel/insidetextfont/_weight.py +++ b/plotly/validators/funnel/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnel.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnel/insidetextfont/_weightsrc.py b/plotly/validators/funnel/insidetextfont/_weightsrc.py index 39f6aa90f1..5d0b0b11a4 100644 --- a/plotly/validators/funnel/insidetextfont/_weightsrc.py +++ b/plotly/validators/funnel/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnel.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/legendgrouptitle/__init__.py b/plotly/validators/funnel/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/funnel/legendgrouptitle/__init__.py +++ b/plotly/validators/funnel/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/funnel/legendgrouptitle/_font.py b/plotly/validators/funnel/legendgrouptitle/_font.py index 0afba14bfa..435cb69e19 100644 --- a/plotly/validators/funnel/legendgrouptitle/_font.py +++ b/plotly/validators/funnel/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="funnel.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/funnel/legendgrouptitle/_text.py b/plotly/validators/funnel/legendgrouptitle/_text.py index 81e0e984c9..772b727970 100644 --- a/plotly/validators/funnel/legendgrouptitle/_text.py +++ b/plotly/validators/funnel/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="funnel.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/legendgrouptitle/font/__init__.py b/plotly/validators/funnel/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/__init__.py +++ b/plotly/validators/funnel/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/legendgrouptitle/font/_color.py b/plotly/validators/funnel/legendgrouptitle/font/_color.py index 23bffa398b..602528aaca 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_color.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/legendgrouptitle/font/_family.py b/plotly/validators/funnel/legendgrouptitle/font/_family.py index b206ee853d..baf973cb03 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_family.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/funnel/legendgrouptitle/font/_lineposition.py b/plotly/validators/funnel/legendgrouptitle/font/_lineposition.py index 38a7cbf4ac..3bbfadf2cc 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/funnel/legendgrouptitle/font/_shadow.py b/plotly/validators/funnel/legendgrouptitle/font/_shadow.py index dc1c429b40..1035a58004 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnel.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnel/legendgrouptitle/font/_size.py b/plotly/validators/funnel/legendgrouptitle/font/_size.py index 1f885ea446..f602d05ec2 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_size.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnel.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/funnel/legendgrouptitle/font/_style.py b/plotly/validators/funnel/legendgrouptitle/font/_style.py index 95a058837a..b531acd5a1 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_style.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnel.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/funnel/legendgrouptitle/font/_textcase.py b/plotly/validators/funnel/legendgrouptitle/font/_textcase.py index ea9f8d77d1..0ffbb93b22 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/funnel/legendgrouptitle/font/_variant.py b/plotly/validators/funnel/legendgrouptitle/font/_variant.py index 162184ef86..1a8eb566fa 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_variant.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/funnel/legendgrouptitle/font/_weight.py b/plotly/validators/funnel/legendgrouptitle/font/_weight.py index d6e67034b7..5e99c4ef0a 100644 --- a/plotly/validators/funnel/legendgrouptitle/font/_weight.py +++ b/plotly/validators/funnel/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnel.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/funnel/marker/__init__.py b/plotly/validators/funnel/marker/__init__.py index 045be1eae4..b6d36f3fe6 100644 --- a/plotly/validators/funnel/marker/__init__.py +++ b/plotly/validators/funnel/marker/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/funnel/marker/_autocolorscale.py b/plotly/validators/funnel/marker/_autocolorscale.py index 90588188d2..5977a2d95b 100644 --- a/plotly/validators/funnel/marker/_autocolorscale.py +++ b/plotly/validators/funnel/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="funnel.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/funnel/marker/_cauto.py b/plotly/validators/funnel/marker/_cauto.py index 5c442a6df5..07491b38df 100644 --- a/plotly/validators/funnel/marker/_cauto.py +++ b/plotly/validators/funnel/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="funnel.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/funnel/marker/_cmax.py b/plotly/validators/funnel/marker/_cmax.py index f8a81fe743..7d2292c8d9 100644 --- a/plotly/validators/funnel/marker/_cmax.py +++ b/plotly/validators/funnel/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="funnel.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/funnel/marker/_cmid.py b/plotly/validators/funnel/marker/_cmid.py index bdf42152e1..08fdec6859 100644 --- a/plotly/validators/funnel/marker/_cmid.py +++ b/plotly/validators/funnel/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="funnel.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/funnel/marker/_cmin.py b/plotly/validators/funnel/marker/_cmin.py index f6142665aa..9140ff4b72 100644 --- a/plotly/validators/funnel/marker/_cmin.py +++ b/plotly/validators/funnel/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="funnel.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/funnel/marker/_color.py b/plotly/validators/funnel/marker/_color.py index 3029a69495..c026b27e93 100644 --- a/plotly/validators/funnel/marker/_color.py +++ b/plotly/validators/funnel/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="funnel.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop("colorscale_path", "funnel.marker.colorscale"), diff --git a/plotly/validators/funnel/marker/_coloraxis.py b/plotly/validators/funnel/marker/_coloraxis.py index ec3f5445c7..884ca1a28b 100644 --- a/plotly/validators/funnel/marker/_coloraxis.py +++ b/plotly/validators/funnel/marker/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="funnel.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/funnel/marker/_colorbar.py b/plotly/validators/funnel/marker/_colorbar.py index 7a865fe874..fac6abd26a 100644 --- a/plotly/validators/funnel/marker/_colorbar.py +++ b/plotly/validators/funnel/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="funnel.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.funnel. - marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.funnel.marker.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - funnel.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.funnel.marker.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/funnel/marker/_colorscale.py b/plotly/validators/funnel/marker/_colorscale.py index c27a95d4ec..042da7a94a 100644 --- a/plotly/validators/funnel/marker/_colorscale.py +++ b/plotly/validators/funnel/marker/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="funnel.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/funnel/marker/_colorsrc.py b/plotly/validators/funnel/marker/_colorsrc.py index b47a0223f6..b25bdab31c 100644 --- a/plotly/validators/funnel/marker/_colorsrc.py +++ b/plotly/validators/funnel/marker/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="funnel.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/_line.py b/plotly/validators/funnel/marker/_line.py index 97a761091a..b04783c04a 100644 --- a/plotly/validators/funnel/marker/_line.py +++ b/plotly/validators/funnel/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="funnel.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/funnel/marker/_opacity.py b/plotly/validators/funnel/marker/_opacity.py index 4a64726077..fc22207abe 100644 --- a/plotly/validators/funnel/marker/_opacity.py +++ b/plotly/validators/funnel/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="funnel.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/funnel/marker/_opacitysrc.py b/plotly/validators/funnel/marker/_opacitysrc.py index 51d6af7fee..a773714679 100644 --- a/plotly/validators/funnel/marker/_opacitysrc.py +++ b/plotly/validators/funnel/marker/_opacitysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="opacitysrc", parent_name="funnel.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/_reversescale.py b/plotly/validators/funnel/marker/_reversescale.py index 81299ad36a..5e16bae85f 100644 --- a/plotly/validators/funnel/marker/_reversescale.py +++ b/plotly/validators/funnel/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="funnel.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/_showscale.py b/plotly/validators/funnel/marker/_showscale.py index acc10966dc..51bc571e69 100644 --- a/plotly/validators/funnel/marker/_showscale.py +++ b/plotly/validators/funnel/marker/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="funnel.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/__init__.py b/plotly/validators/funnel/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/funnel/marker/colorbar/__init__.py +++ b/plotly/validators/funnel/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/funnel/marker/colorbar/_bgcolor.py b/plotly/validators/funnel/marker/colorbar/_bgcolor.py index cf3b40be1b..58b380929a 100644 --- a/plotly/validators/funnel/marker/colorbar/_bgcolor.py +++ b/plotly/validators/funnel/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="funnel.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_bordercolor.py b/plotly/validators/funnel/marker/colorbar/_bordercolor.py index 8ae1ef4106..c4226ed9d7 100644 --- a/plotly/validators/funnel/marker/colorbar/_bordercolor.py +++ b/plotly/validators/funnel/marker/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="funnel.marker.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_borderwidth.py b/plotly/validators/funnel/marker/colorbar/_borderwidth.py index dc730dbc27..4ccd939465 100644 --- a/plotly/validators/funnel/marker/colorbar/_borderwidth.py +++ b/plotly/validators/funnel/marker/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="funnel.marker.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_dtick.py b/plotly/validators/funnel/marker/colorbar/_dtick.py index dc438e7f62..77c127a96e 100644 --- a/plotly/validators/funnel/marker/colorbar/_dtick.py +++ b/plotly/validators/funnel/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="funnel.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_exponentformat.py b/plotly/validators/funnel/marker/colorbar/_exponentformat.py index 024e71354f..ebb68d76d7 100644 --- a/plotly/validators/funnel/marker/colorbar/_exponentformat.py +++ b/plotly/validators/funnel/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="funnel.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_labelalias.py b/plotly/validators/funnel/marker/colorbar/_labelalias.py index f47cd56ad2..ca020a35eb 100644 --- a/plotly/validators/funnel/marker/colorbar/_labelalias.py +++ b/plotly/validators/funnel/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="funnel.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_len.py b/plotly/validators/funnel/marker/colorbar/_len.py index eccba11e00..b668abe831 100644 --- a/plotly/validators/funnel/marker/colorbar/_len.py +++ b/plotly/validators/funnel/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="funnel.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_lenmode.py b/plotly/validators/funnel/marker/colorbar/_lenmode.py index 184ff1f128..1933ef0674 100644 --- a/plotly/validators/funnel/marker/colorbar/_lenmode.py +++ b/plotly/validators/funnel/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="funnel.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_minexponent.py b/plotly/validators/funnel/marker/colorbar/_minexponent.py index 82b3361aee..9af6e79a19 100644 --- a/plotly/validators/funnel/marker/colorbar/_minexponent.py +++ b/plotly/validators/funnel/marker/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="funnel.marker.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_nticks.py b/plotly/validators/funnel/marker/colorbar/_nticks.py index 14ce7707f3..5c702a71e3 100644 --- a/plotly/validators/funnel/marker/colorbar/_nticks.py +++ b/plotly/validators/funnel/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="funnel.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_orientation.py b/plotly/validators/funnel/marker/colorbar/_orientation.py index 952e94ec4d..c5118f1327 100644 --- a/plotly/validators/funnel/marker/colorbar/_orientation.py +++ b/plotly/validators/funnel/marker/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="funnel.marker.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_outlinecolor.py b/plotly/validators/funnel/marker/colorbar/_outlinecolor.py index 0b5c42a8da..66fc067c4f 100644 --- a/plotly/validators/funnel/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/funnel/marker/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="funnel.marker.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_outlinewidth.py b/plotly/validators/funnel/marker/colorbar/_outlinewidth.py index 17ee0d297a..fcd0ad3958 100644 --- a/plotly/validators/funnel/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/funnel/marker/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="funnel.marker.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_separatethousands.py b/plotly/validators/funnel/marker/colorbar/_separatethousands.py index 2e8f44fb44..b913273bea 100644 --- a/plotly/validators/funnel/marker/colorbar/_separatethousands.py +++ b/plotly/validators/funnel/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="funnel.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_showexponent.py b/plotly/validators/funnel/marker/colorbar/_showexponent.py index 3a6669fea7..f9324e7ddc 100644 --- a/plotly/validators/funnel/marker/colorbar/_showexponent.py +++ b/plotly/validators/funnel/marker/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="funnel.marker.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_showticklabels.py b/plotly/validators/funnel/marker/colorbar/_showticklabels.py index 0197156bf3..a9a7356b29 100644 --- a/plotly/validators/funnel/marker/colorbar/_showticklabels.py +++ b/plotly/validators/funnel/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="funnel.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_showtickprefix.py b/plotly/validators/funnel/marker/colorbar/_showtickprefix.py index 625baf33c4..08e7c2b6b7 100644 --- a/plotly/validators/funnel/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/funnel/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="funnel.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_showticksuffix.py b/plotly/validators/funnel/marker/colorbar/_showticksuffix.py index 27ff0cbdd6..6fb7ee8e43 100644 --- a/plotly/validators/funnel/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/funnel/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="funnel.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_thickness.py b/plotly/validators/funnel/marker/colorbar/_thickness.py index 2722689fc8..a416669d51 100644 --- a/plotly/validators/funnel/marker/colorbar/_thickness.py +++ b/plotly/validators/funnel/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="funnel.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_thicknessmode.py b/plotly/validators/funnel/marker/colorbar/_thicknessmode.py index 404c653149..1d12640b95 100644 --- a/plotly/validators/funnel/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/funnel/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="funnel.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_tick0.py b/plotly/validators/funnel/marker/colorbar/_tick0.py index 99cfa5e2c8..70f52d6a8d 100644 --- a/plotly/validators/funnel/marker/colorbar/_tick0.py +++ b/plotly/validators/funnel/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="funnel.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_tickangle.py b/plotly/validators/funnel/marker/colorbar/_tickangle.py index f5c2de47a3..43cde061a3 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickangle.py +++ b/plotly/validators/funnel/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_tickcolor.py b/plotly/validators/funnel/marker/colorbar/_tickcolor.py index a403b39de5..df2552acb1 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickcolor.py +++ b/plotly/validators/funnel/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_tickfont.py b/plotly/validators/funnel/marker/colorbar/_tickfont.py index 53a8f4a905..7002df7446 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickfont.py +++ b/plotly/validators/funnel/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_tickformat.py b/plotly/validators/funnel/marker/colorbar/_tickformat.py index 72a1fba87a..680d058e4a 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickformat.py +++ b/plotly/validators/funnel/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py index 8dd34616b7..47298887eb 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/funnel/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="funnel.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/funnel/marker/colorbar/_tickformatstops.py b/plotly/validators/funnel/marker/colorbar/_tickformatstops.py index b8ecd5491e..a77e882c5b 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/funnel/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="funnel.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/funnel/marker/colorbar/_ticklabeloverflow.py index b8526c7be1..8308fcac62 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/funnel/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="funnel.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_ticklabelposition.py b/plotly/validators/funnel/marker/colorbar/_ticklabelposition.py index d713b83cca..6121f39960 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/funnel/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="funnel.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/funnel/marker/colorbar/_ticklabelstep.py b/plotly/validators/funnel/marker/colorbar/_ticklabelstep.py index 8353a9ce85..3619aeae10 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/funnel/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="funnel.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_ticklen.py b/plotly/validators/funnel/marker/colorbar/_ticklen.py index 0878e830fa..fe0453fe12 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticklen.py +++ b/plotly/validators/funnel/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="funnel.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_tickmode.py b/plotly/validators/funnel/marker/colorbar/_tickmode.py index d880beec0f..0fe7fbfc9f 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickmode.py +++ b/plotly/validators/funnel/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/funnel/marker/colorbar/_tickprefix.py b/plotly/validators/funnel/marker/colorbar/_tickprefix.py index faccff6e04..e154575141 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickprefix.py +++ b/plotly/validators/funnel/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_ticks.py b/plotly/validators/funnel/marker/colorbar/_ticks.py index 0d38fb6407..b0ea6fdbb1 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticks.py +++ b/plotly/validators/funnel/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="funnel.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_ticksuffix.py b/plotly/validators/funnel/marker/colorbar/_ticksuffix.py index 9dc395f0dc..aabd234cc1 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/funnel/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="funnel.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_ticktext.py b/plotly/validators/funnel/marker/colorbar/_ticktext.py index 44f7d1467f..98de9b7a91 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticktext.py +++ b/plotly/validators/funnel/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="funnel.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py b/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py index f112f01faa..67ef7cc918 100644 --- a/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/funnel/marker/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="funnel.marker.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_tickvals.py b/plotly/validators/funnel/marker/colorbar/_tickvals.py index a97f713b49..ce0b2a65da 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickvals.py +++ b/plotly/validators/funnel/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py b/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py index a88a0e4d00..cd50ef9da6 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/funnel/marker/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_tickwidth.py b/plotly/validators/funnel/marker/colorbar/_tickwidth.py index 3aeac08dad..9676928c3f 100644 --- a/plotly/validators/funnel/marker/colorbar/_tickwidth.py +++ b/plotly/validators/funnel/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="funnel.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_title.py b/plotly/validators/funnel/marker/colorbar/_title.py index 2ee3292cab..b659cbdc6b 100644 --- a/plotly/validators/funnel/marker/colorbar/_title.py +++ b/plotly/validators/funnel/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="funnel.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_x.py b/plotly/validators/funnel/marker/colorbar/_x.py index 9b672ee07d..8623a32c86 100644 --- a/plotly/validators/funnel/marker/colorbar/_x.py +++ b/plotly/validators/funnel/marker/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="funnel.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_xanchor.py b/plotly/validators/funnel/marker/colorbar/_xanchor.py index 360738a808..72f8b1575e 100644 --- a/plotly/validators/funnel/marker/colorbar/_xanchor.py +++ b/plotly/validators/funnel/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="funnel.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_xpad.py b/plotly/validators/funnel/marker/colorbar/_xpad.py index 4b9ac0239a..b5c6f79ada 100644 --- a/plotly/validators/funnel/marker/colorbar/_xpad.py +++ b/plotly/validators/funnel/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="funnel.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_xref.py b/plotly/validators/funnel/marker/colorbar/_xref.py index 31e43cc3d1..9df35d7dcc 100644 --- a/plotly/validators/funnel/marker/colorbar/_xref.py +++ b/plotly/validators/funnel/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="funnel.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_y.py b/plotly/validators/funnel/marker/colorbar/_y.py index 979316ea1a..8201f42f65 100644 --- a/plotly/validators/funnel/marker/colorbar/_y.py +++ b/plotly/validators/funnel/marker/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="funnel.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/_yanchor.py b/plotly/validators/funnel/marker/colorbar/_yanchor.py index 94d2be5eef..5c19832c9d 100644 --- a/plotly/validators/funnel/marker/colorbar/_yanchor.py +++ b/plotly/validators/funnel/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="funnel.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_ypad.py b/plotly/validators/funnel/marker/colorbar/_ypad.py index 532ffe1ca2..f332fbe51f 100644 --- a/plotly/validators/funnel/marker/colorbar/_ypad.py +++ b/plotly/validators/funnel/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="funnel.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/_yref.py b/plotly/validators/funnel/marker/colorbar/_yref.py index 7d37f1fc9a..4eb31fb28f 100644 --- a/plotly/validators/funnel/marker/colorbar/_yref.py +++ b/plotly/validators/funnel/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="funnel.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py b/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_color.py b/plotly/validators/funnel/marker/colorbar/tickfont/_color.py index 3e18885ee2..bcb6c021b3 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_family.py b/plotly/validators/funnel/marker/colorbar/tickfont/_family.py index c741d272aa..6ade3102f7 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/funnel/marker/colorbar/tickfont/_lineposition.py index 348d48e415..2a783c8691 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_shadow.py b/plotly/validators/funnel/marker/colorbar/tickfont/_shadow.py index 729e103009..f8e0e9df60 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_size.py b/plotly/validators/funnel/marker/colorbar/tickfont/_size.py index c3d5f1c98c..b81756226e 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_style.py b/plotly/validators/funnel/marker/colorbar/tickfont/_style.py index 15629ac8c0..87754c7bca 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_textcase.py b/plotly/validators/funnel/marker/colorbar/tickfont/_textcase.py index 40e50c764b..3ab91cc804 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_variant.py b/plotly/validators/funnel/marker/colorbar/tickfont/_variant.py index 7913c8cf42..23864dd1d6 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/funnel/marker/colorbar/tickfont/_weight.py b/plotly/validators/funnel/marker/colorbar/tickfont/_weight.py index 0576b165aa..605ad78395 100644 --- a/plotly/validators/funnel/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/funnel/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnel.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/funnel/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py index 61c42e1be3..3c2ff82b5f 100644 --- a/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/funnel/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="funnel.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py index e4bf249f88..a3a38cdeaa 100644 --- a/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/funnel/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="funnel.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py b/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py index d9c0cf9c9d..eb09381621 100644 --- a/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/funnel/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="funnel.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py index a61b9d7c6d..ff88047499 100644 --- a/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/funnel/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="funnel.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py b/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py index 4cf82f9c3c..7a83cadc38 100644 --- a/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/funnel/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="funnel.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/title/__init__.py b/plotly/validators/funnel/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/funnel/marker/colorbar/title/__init__.py +++ b/plotly/validators/funnel/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/funnel/marker/colorbar/title/_font.py b/plotly/validators/funnel/marker/colorbar/title/_font.py index 0edfce7cc8..8784a63105 100644 --- a/plotly/validators/funnel/marker/colorbar/title/_font.py +++ b/plotly/validators/funnel/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="funnel.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/title/_side.py b/plotly/validators/funnel/marker/colorbar/title/_side.py index 88bd1b7048..42c2e32d91 100644 --- a/plotly/validators/funnel/marker/colorbar/title/_side.py +++ b/plotly/validators/funnel/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="funnel.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/title/_text.py b/plotly/validators/funnel/marker/colorbar/title/_text.py index a1d2b0b227..fd34521c0e 100644 --- a/plotly/validators/funnel/marker/colorbar/title/_text.py +++ b/plotly/validators/funnel/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/title/font/__init__.py b/plotly/validators/funnel/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_color.py b/plotly/validators/funnel/marker/colorbar/title/font/_color.py index 520e1bccac..55c69c3280 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_color.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_family.py b/plotly/validators/funnel/marker/colorbar/title/font/_family.py index a2fa7c5ca7..ea903ff123 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_family.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_lineposition.py b/plotly/validators/funnel/marker/colorbar/title/font/_lineposition.py index 61f6a2ad88..c636ca3cd3 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_shadow.py b/plotly/validators/funnel/marker/colorbar/title/font/_shadow.py index cf675316f3..0eb0f4eaee 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_size.py b/plotly/validators/funnel/marker/colorbar/title/font/_size.py index 9f3f0cd058..0f5a10cd54 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_size.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_style.py b/plotly/validators/funnel/marker/colorbar/title/font/_style.py index 5def13e178..d4b1402adb 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_style.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_textcase.py b/plotly/validators/funnel/marker/colorbar/title/font/_textcase.py index 5d1e709181..296a7d4f81 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_variant.py b/plotly/validators/funnel/marker/colorbar/title/font/_variant.py index 820e405b6c..139ecdb2c0 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/funnel/marker/colorbar/title/font/_weight.py b/plotly/validators/funnel/marker/colorbar/title/font/_weight.py index 00ed3955db..1ace76c508 100644 --- a/plotly/validators/funnel/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/funnel/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnel.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/funnel/marker/line/__init__.py b/plotly/validators/funnel/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/funnel/marker/line/__init__.py +++ b/plotly/validators/funnel/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/funnel/marker/line/_autocolorscale.py b/plotly/validators/funnel/marker/line/_autocolorscale.py index f0cf3ef32d..6f9b0c608d 100644 --- a/plotly/validators/funnel/marker/line/_autocolorscale.py +++ b/plotly/validators/funnel/marker/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="funnel.marker.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/funnel/marker/line/_cauto.py b/plotly/validators/funnel/marker/line/_cauto.py index 45487fc401..f14e891b76 100644 --- a/plotly/validators/funnel/marker/line/_cauto.py +++ b/plotly/validators/funnel/marker/line/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="funnel.marker.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/funnel/marker/line/_cmax.py b/plotly/validators/funnel/marker/line/_cmax.py index 969f92ca90..78fe1c71e2 100644 --- a/plotly/validators/funnel/marker/line/_cmax.py +++ b/plotly/validators/funnel/marker/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="funnel.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/funnel/marker/line/_cmid.py b/plotly/validators/funnel/marker/line/_cmid.py index 6bd9de8dc9..b34d68929f 100644 --- a/plotly/validators/funnel/marker/line/_cmid.py +++ b/plotly/validators/funnel/marker/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="funnel.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/funnel/marker/line/_cmin.py b/plotly/validators/funnel/marker/line/_cmin.py index 14ae7c1b1c..ad6bdcac72 100644 --- a/plotly/validators/funnel/marker/line/_cmin.py +++ b/plotly/validators/funnel/marker/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="funnel.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/funnel/marker/line/_color.py b/plotly/validators/funnel/marker/line/_color.py index c446f36508..59306584e4 100644 --- a/plotly/validators/funnel/marker/line/_color.py +++ b/plotly/validators/funnel/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="funnel.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/funnel/marker/line/_coloraxis.py b/plotly/validators/funnel/marker/line/_coloraxis.py index a84f5bdfa0..59795070fb 100644 --- a/plotly/validators/funnel/marker/line/_coloraxis.py +++ b/plotly/validators/funnel/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="funnel.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/funnel/marker/line/_colorscale.py b/plotly/validators/funnel/marker/line/_colorscale.py index b8db389587..4991044ebc 100644 --- a/plotly/validators/funnel/marker/line/_colorscale.py +++ b/plotly/validators/funnel/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="funnel.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/funnel/marker/line/_colorsrc.py b/plotly/validators/funnel/marker/line/_colorsrc.py index ad567b8234..a7a9e1e9d0 100644 --- a/plotly/validators/funnel/marker/line/_colorsrc.py +++ b/plotly/validators/funnel/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnel.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/line/_reversescale.py b/plotly/validators/funnel/marker/line/_reversescale.py index ac8c98c1ca..2c7c081de6 100644 --- a/plotly/validators/funnel/marker/line/_reversescale.py +++ b/plotly/validators/funnel/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="funnel.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnel/marker/line/_width.py b/plotly/validators/funnel/marker/line/_width.py index 568e27ee01..631262ee65 100644 --- a/plotly/validators/funnel/marker/line/_width.py +++ b/plotly/validators/funnel/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="funnel.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnel/marker/line/_widthsrc.py b/plotly/validators/funnel/marker/line/_widthsrc.py index e71b6d17ab..a851ed9883 100644 --- a/plotly/validators/funnel/marker/line/_widthsrc.py +++ b/plotly/validators/funnel/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="funnel.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/__init__.py b/plotly/validators/funnel/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnel/outsidetextfont/__init__.py +++ b/plotly/validators/funnel/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/outsidetextfont/_color.py b/plotly/validators/funnel/outsidetextfont/_color.py index 0998f8d7c6..1cd9ed2be2 100644 --- a/plotly/validators/funnel/outsidetextfont/_color.py +++ b/plotly/validators/funnel/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnel.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnel/outsidetextfont/_colorsrc.py b/plotly/validators/funnel/outsidetextfont/_colorsrc.py index 8142f9c2c4..e3b7f4a0b9 100644 --- a/plotly/validators/funnel/outsidetextfont/_colorsrc.py +++ b/plotly/validators/funnel/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_family.py b/plotly/validators/funnel/outsidetextfont/_family.py index bee2f10a0f..251f962926 100644 --- a/plotly/validators/funnel/outsidetextfont/_family.py +++ b/plotly/validators/funnel/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnel.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnel/outsidetextfont/_familysrc.py b/plotly/validators/funnel/outsidetextfont/_familysrc.py index 3d8a4c52e0..cfbf4a876d 100644 --- a/plotly/validators/funnel/outsidetextfont/_familysrc.py +++ b/plotly/validators/funnel/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_lineposition.py b/plotly/validators/funnel/outsidetextfont/_lineposition.py index 030702141c..029499196a 100644 --- a/plotly/validators/funnel/outsidetextfont/_lineposition.py +++ b/plotly/validators/funnel/outsidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.outsidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnel/outsidetextfont/_linepositionsrc.py b/plotly/validators/funnel/outsidetextfont/_linepositionsrc.py index d9f2b8822c..052c629fcf 100644 --- a/plotly/validators/funnel/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/funnel/outsidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnel.outsidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_shadow.py b/plotly/validators/funnel/outsidetextfont/_shadow.py index 98a4c669ec..28610abd10 100644 --- a/plotly/validators/funnel/outsidetextfont/_shadow.py +++ b/plotly/validators/funnel/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnel.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/funnel/outsidetextfont/_shadowsrc.py b/plotly/validators/funnel/outsidetextfont/_shadowsrc.py index c1cc6ff2f0..17c5cd7265 100644 --- a/plotly/validators/funnel/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/funnel/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_size.py b/plotly/validators/funnel/outsidetextfont/_size.py index e538e65297..9a7c3b9a00 100644 --- a/plotly/validators/funnel/outsidetextfont/_size.py +++ b/plotly/validators/funnel/outsidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnel.outsidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnel/outsidetextfont/_sizesrc.py b/plotly/validators/funnel/outsidetextfont/_sizesrc.py index 7639401e67..2a534af381 100644 --- a/plotly/validators/funnel/outsidetextfont/_sizesrc.py +++ b/plotly/validators/funnel/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_style.py b/plotly/validators/funnel/outsidetextfont/_style.py index eb411ef6b3..b2b6389798 100644 --- a/plotly/validators/funnel/outsidetextfont/_style.py +++ b/plotly/validators/funnel/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnel.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnel/outsidetextfont/_stylesrc.py b/plotly/validators/funnel/outsidetextfont/_stylesrc.py index 14d845faf0..26177e397c 100644 --- a/plotly/validators/funnel/outsidetextfont/_stylesrc.py +++ b/plotly/validators/funnel/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_textcase.py b/plotly/validators/funnel/outsidetextfont/_textcase.py index 5172e37f64..347f732b9c 100644 --- a/plotly/validators/funnel/outsidetextfont/_textcase.py +++ b/plotly/validators/funnel/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnel.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnel/outsidetextfont/_textcasesrc.py b/plotly/validators/funnel/outsidetextfont/_textcasesrc.py index c128527009..d7c94e1656 100644 --- a/plotly/validators/funnel/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/funnel/outsidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_variant.py b/plotly/validators/funnel/outsidetextfont/_variant.py index dea131c72e..e6c5e7ecf3 100644 --- a/plotly/validators/funnel/outsidetextfont/_variant.py +++ b/plotly/validators/funnel/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnel.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/funnel/outsidetextfont/_variantsrc.py b/plotly/validators/funnel/outsidetextfont/_variantsrc.py index ac4a879d8b..50af853d5a 100644 --- a/plotly/validators/funnel/outsidetextfont/_variantsrc.py +++ b/plotly/validators/funnel/outsidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/outsidetextfont/_weight.py b/plotly/validators/funnel/outsidetextfont/_weight.py index e99e36c74b..005f351015 100644 --- a/plotly/validators/funnel/outsidetextfont/_weight.py +++ b/plotly/validators/funnel/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnel.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnel/outsidetextfont/_weightsrc.py b/plotly/validators/funnel/outsidetextfont/_weightsrc.py index 90c9a41c03..6141d107a7 100644 --- a/plotly/validators/funnel/outsidetextfont/_weightsrc.py +++ b/plotly/validators/funnel/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnel.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/stream/__init__.py b/plotly/validators/funnel/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/funnel/stream/__init__.py +++ b/plotly/validators/funnel/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/funnel/stream/_maxpoints.py b/plotly/validators/funnel/stream/_maxpoints.py index c7f45224b3..50035f327c 100644 --- a/plotly/validators/funnel/stream/_maxpoints.py +++ b/plotly/validators/funnel/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="funnel.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnel/stream/_token.py b/plotly/validators/funnel/stream/_token.py index b32b0c3893..a76fad42a8 100644 --- a/plotly/validators/funnel/stream/_token.py +++ b/plotly/validators/funnel/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="funnel.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/funnel/textfont/__init__.py b/plotly/validators/funnel/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnel/textfont/__init__.py +++ b/plotly/validators/funnel/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnel/textfont/_color.py b/plotly/validators/funnel/textfont/_color.py index 64fb753b22..0c2b702faf 100644 --- a/plotly/validators/funnel/textfont/_color.py +++ b/plotly/validators/funnel/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="funnel.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnel/textfont/_colorsrc.py b/plotly/validators/funnel/textfont/_colorsrc.py index b769ab0751..08cd0029ae 100644 --- a/plotly/validators/funnel/textfont/_colorsrc.py +++ b/plotly/validators/funnel/textfont/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="funnel.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_family.py b/plotly/validators/funnel/textfont/_family.py index 2465bce324..568c6a68b8 100644 --- a/plotly/validators/funnel/textfont/_family.py +++ b/plotly/validators/funnel/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="funnel.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnel/textfont/_familysrc.py b/plotly/validators/funnel/textfont/_familysrc.py index 2a4ceb17c6..2b67a9e95c 100644 --- a/plotly/validators/funnel/textfont/_familysrc.py +++ b/plotly/validators/funnel/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnel.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_lineposition.py b/plotly/validators/funnel/textfont/_lineposition.py index a1be521b61..269eefa740 100644 --- a/plotly/validators/funnel/textfont/_lineposition.py +++ b/plotly/validators/funnel/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnel.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnel/textfont/_linepositionsrc.py b/plotly/validators/funnel/textfont/_linepositionsrc.py index 737d1f4b9d..3f2e2f154a 100644 --- a/plotly/validators/funnel/textfont/_linepositionsrc.py +++ b/plotly/validators/funnel/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnel.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_shadow.py b/plotly/validators/funnel/textfont/_shadow.py index 7e9933e197..ea3bfebe38 100644 --- a/plotly/validators/funnel/textfont/_shadow.py +++ b/plotly/validators/funnel/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="funnel.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/funnel/textfont/_shadowsrc.py b/plotly/validators/funnel/textfont/_shadowsrc.py index 3cfa005091..5f2eba8ff2 100644 --- a/plotly/validators/funnel/textfont/_shadowsrc.py +++ b/plotly/validators/funnel/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnel.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_size.py b/plotly/validators/funnel/textfont/_size.py index 772b3630fc..87526fb00e 100644 --- a/plotly/validators/funnel/textfont/_size.py +++ b/plotly/validators/funnel/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="funnel.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnel/textfont/_sizesrc.py b/plotly/validators/funnel/textfont/_sizesrc.py index 7c36df75cd..742a5cc48e 100644 --- a/plotly/validators/funnel/textfont/_sizesrc.py +++ b/plotly/validators/funnel/textfont/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="funnel.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_style.py b/plotly/validators/funnel/textfont/_style.py index e22451a315..98708cb072 100644 --- a/plotly/validators/funnel/textfont/_style.py +++ b/plotly/validators/funnel/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="funnel.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnel/textfont/_stylesrc.py b/plotly/validators/funnel/textfont/_stylesrc.py index 6c3520feb4..daa122528d 100644 --- a/plotly/validators/funnel/textfont/_stylesrc.py +++ b/plotly/validators/funnel/textfont/_stylesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="stylesrc", parent_name="funnel.textfont", **kwargs): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_textcase.py b/plotly/validators/funnel/textfont/_textcase.py index 123806df8c..140fe8eda9 100644 --- a/plotly/validators/funnel/textfont/_textcase.py +++ b/plotly/validators/funnel/textfont/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="funnel.textfont", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnel/textfont/_textcasesrc.py b/plotly/validators/funnel/textfont/_textcasesrc.py index 478f7ee8a1..c142d7feac 100644 --- a/plotly/validators/funnel/textfont/_textcasesrc.py +++ b/plotly/validators/funnel/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnel.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_variant.py b/plotly/validators/funnel/textfont/_variant.py index b60eab533f..bc978104cc 100644 --- a/plotly/validators/funnel/textfont/_variant.py +++ b/plotly/validators/funnel/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="funnel.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/funnel/textfont/_variantsrc.py b/plotly/validators/funnel/textfont/_variantsrc.py index 836e6b54ec..51196d7728 100644 --- a/plotly/validators/funnel/textfont/_variantsrc.py +++ b/plotly/validators/funnel/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnel.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnel/textfont/_weight.py b/plotly/validators/funnel/textfont/_weight.py index 37317b1fb3..1d0636c558 100644 --- a/plotly/validators/funnel/textfont/_weight.py +++ b/plotly/validators/funnel/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="funnel.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnel/textfont/_weightsrc.py b/plotly/validators/funnel/textfont/_weightsrc.py index 244a18e443..93205f86c8 100644 --- a/plotly/validators/funnel/textfont/_weightsrc.py +++ b/plotly/validators/funnel/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnel.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/__init__.py b/plotly/validators/funnelarea/__init__.py index 4ddd3b6c1b..1619cfa1de 100644 --- a/plotly/validators/funnelarea/__init__.py +++ b/plotly/validators/funnelarea/__init__.py @@ -1,105 +1,55 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._title import TitleValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._scalegroup import ScalegroupValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._labelssrc import LabelssrcValidator - from ._labels import LabelsValidator - from ._label0 import Label0Validator - from ._insidetextfont import InsidetextfontValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._domain import DomainValidator - from ._dlabel import DlabelValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._baseratio import BaseratioValidator - from ._aspectratio import AspectratioValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._title.TitleValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._scalegroup.ScalegroupValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._labelssrc.LabelssrcValidator", - "._labels.LabelsValidator", - "._label0.Label0Validator", - "._insidetextfont.InsidetextfontValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._domain.DomainValidator", - "._dlabel.DlabelValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._baseratio.BaseratioValidator", - "._aspectratio.AspectratioValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._title.TitleValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._scalegroup.ScalegroupValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._label0.Label0Validator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._dlabel.DlabelValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._baseratio.BaseratioValidator", + "._aspectratio.AspectratioValidator", + ], +) diff --git a/plotly/validators/funnelarea/_aspectratio.py b/plotly/validators/funnelarea/_aspectratio.py index 9e73d8fe6b..0cdb65127e 100644 --- a/plotly/validators/funnelarea/_aspectratio.py +++ b/plotly/validators/funnelarea/_aspectratio.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AspectratioValidator(_plotly_utils.basevalidators.NumberValidator): +class AspectratioValidator(_bv.NumberValidator): def __init__(self, plotly_name="aspectratio", parent_name="funnelarea", **kwargs): - super(AspectratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnelarea/_baseratio.py b/plotly/validators/funnelarea/_baseratio.py index b5e5cd77c6..444c051fab 100644 --- a/plotly/validators/funnelarea/_baseratio.py +++ b/plotly/validators/funnelarea/_baseratio.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaseratioValidator(_plotly_utils.basevalidators.NumberValidator): +class BaseratioValidator(_bv.NumberValidator): def __init__(self, plotly_name="baseratio", parent_name="funnelarea", **kwargs): - super(BaseratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnelarea/_customdata.py b/plotly/validators/funnelarea/_customdata.py index 89e367d3cc..e159b600c1 100644 --- a/plotly/validators/funnelarea/_customdata.py +++ b/plotly/validators/funnelarea/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="funnelarea", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_customdatasrc.py b/plotly/validators/funnelarea/_customdatasrc.py index 90c1cd0144..b2430e6bbf 100644 --- a/plotly/validators/funnelarea/_customdatasrc.py +++ b/plotly/validators/funnelarea/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="funnelarea", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_dlabel.py b/plotly/validators/funnelarea/_dlabel.py index 64720732ae..203c636ed6 100644 --- a/plotly/validators/funnelarea/_dlabel.py +++ b/plotly/validators/funnelarea/_dlabel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DlabelValidator(_plotly_utils.basevalidators.NumberValidator): +class DlabelValidator(_bv.NumberValidator): def __init__(self, plotly_name="dlabel", parent_name="funnelarea", **kwargs): - super(DlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_domain.py b/plotly/validators/funnelarea/_domain.py index d917df0e55..5868e4e129 100644 --- a/plotly/validators/funnelarea/_domain.py +++ b/plotly/validators/funnelarea/_domain.py @@ -1,29 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="funnelarea", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this funnelarea - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this funnelarea trace - . - x - Sets the horizontal domain of this funnelarea - trace (in plot fraction). - y - Sets the vertical domain of this funnelarea - trace (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_hoverinfo.py b/plotly/validators/funnelarea/_hoverinfo.py index 8b783ab292..bc1984ced4 100644 --- a/plotly/validators/funnelarea/_hoverinfo.py +++ b/plotly/validators/funnelarea/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="funnelarea", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/funnelarea/_hoverinfosrc.py b/plotly/validators/funnelarea/_hoverinfosrc.py index 6a3413d1c1..4229b653ad 100644 --- a/plotly/validators/funnelarea/_hoverinfosrc.py +++ b/plotly/validators/funnelarea/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="funnelarea", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_hoverlabel.py b/plotly/validators/funnelarea/_hoverlabel.py index cf11b25b8d..f80946f833 100644 --- a/plotly/validators/funnelarea/_hoverlabel.py +++ b/plotly/validators/funnelarea/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="funnelarea", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_hovertemplate.py b/plotly/validators/funnelarea/_hovertemplate.py index 73248ecafc..7cd769101a 100644 --- a/plotly/validators/funnelarea/_hovertemplate.py +++ b/plotly/validators/funnelarea/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="funnelarea", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnelarea/_hovertemplatesrc.py b/plotly/validators/funnelarea/_hovertemplatesrc.py index c0d020c9ef..5d23ecc4ee 100644 --- a/plotly/validators/funnelarea/_hovertemplatesrc.py +++ b/plotly/validators/funnelarea/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="funnelarea", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_hovertext.py b/plotly/validators/funnelarea/_hovertext.py index 2efc97f9ee..ee19ac0169 100644 --- a/plotly/validators/funnelarea/_hovertext.py +++ b/plotly/validators/funnelarea/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="funnelarea", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnelarea/_hovertextsrc.py b/plotly/validators/funnelarea/_hovertextsrc.py index a068430d95..0e8cf7b6a6 100644 --- a/plotly/validators/funnelarea/_hovertextsrc.py +++ b/plotly/validators/funnelarea/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="funnelarea", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_ids.py b/plotly/validators/funnelarea/_ids.py index 11a8a5e357..980e0f168b 100644 --- a/plotly/validators/funnelarea/_ids.py +++ b/plotly/validators/funnelarea/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="funnelarea", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_idssrc.py b/plotly/validators/funnelarea/_idssrc.py index 5744d6e312..4cbf0d67c9 100644 --- a/plotly/validators/funnelarea/_idssrc.py +++ b/plotly/validators/funnelarea/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="funnelarea", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_insidetextfont.py b/plotly/validators/funnelarea/_insidetextfont.py index d134ea2389..68cb0f0f23 100644 --- a/plotly/validators/funnelarea/_insidetextfont.py +++ b/plotly/validators/funnelarea/_insidetextfont.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="insidetextfont", parent_name="funnelarea", **kwargs ): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_label0.py b/plotly/validators/funnelarea/_label0.py index b80fe58691..253ea18641 100644 --- a/plotly/validators/funnelarea/_label0.py +++ b/plotly/validators/funnelarea/_label0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Label0Validator(_plotly_utils.basevalidators.NumberValidator): +class Label0Validator(_bv.NumberValidator): def __init__(self, plotly_name="label0", parent_name="funnelarea", **kwargs): - super(Label0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_labels.py b/plotly/validators/funnelarea/_labels.py index 1f87a8e244..b9625be9d6 100644 --- a/plotly/validators/funnelarea/_labels.py +++ b/plotly/validators/funnelarea/_labels.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="labels", parent_name="funnelarea", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_labelssrc.py b/plotly/validators/funnelarea/_labelssrc.py index 97a19ca7b1..6cda2ed1c5 100644 --- a/plotly/validators/funnelarea/_labelssrc.py +++ b/plotly/validators/funnelarea/_labelssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelssrc", parent_name="funnelarea", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_legend.py b/plotly/validators/funnelarea/_legend.py index 37fdd82875..630a24b8e1 100644 --- a/plotly/validators/funnelarea/_legend.py +++ b/plotly/validators/funnelarea/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="funnelarea", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnelarea/_legendgroup.py b/plotly/validators/funnelarea/_legendgroup.py index 803912a5c6..2b3119a7fd 100644 --- a/plotly/validators/funnelarea/_legendgroup.py +++ b/plotly/validators/funnelarea/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="funnelarea", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_legendgrouptitle.py b/plotly/validators/funnelarea/_legendgrouptitle.py index 76e1d9f2ba..49ee5e4f95 100644 --- a/plotly/validators/funnelarea/_legendgrouptitle.py +++ b/plotly/validators/funnelarea/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="funnelarea", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_legendrank.py b/plotly/validators/funnelarea/_legendrank.py index ad96e7452e..fe653bd646 100644 --- a/plotly/validators/funnelarea/_legendrank.py +++ b/plotly/validators/funnelarea/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="funnelarea", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_legendwidth.py b/plotly/validators/funnelarea/_legendwidth.py index aa78b60db9..dcba58e0fd 100644 --- a/plotly/validators/funnelarea/_legendwidth.py +++ b/plotly/validators/funnelarea/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="funnelarea", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnelarea/_marker.py b/plotly/validators/funnelarea/_marker.py index 2b16a1057f..a710b9d662 100644 --- a/plotly/validators/funnelarea/_marker.py +++ b/plotly/validators/funnelarea/_marker.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="funnelarea", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.funnelarea.marker. - Line` instance or dict with compatible - properties - pattern - Sets the pattern within the marker. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_meta.py b/plotly/validators/funnelarea/_meta.py index 60b2314f3a..154eb2d8ee 100644 --- a/plotly/validators/funnelarea/_meta.py +++ b/plotly/validators/funnelarea/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="funnelarea", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/_metasrc.py b/plotly/validators/funnelarea/_metasrc.py index 79e0c7f693..9728534529 100644 --- a/plotly/validators/funnelarea/_metasrc.py +++ b/plotly/validators/funnelarea/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="funnelarea", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_name.py b/plotly/validators/funnelarea/_name.py index 380248af0f..13ec5fe2cc 100644 --- a/plotly/validators/funnelarea/_name.py +++ b/plotly/validators/funnelarea/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="funnelarea", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_opacity.py b/plotly/validators/funnelarea/_opacity.py index cdf7cbc019..985b148a46 100644 --- a/plotly/validators/funnelarea/_opacity.py +++ b/plotly/validators/funnelarea/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="funnelarea", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnelarea/_scalegroup.py b/plotly/validators/funnelarea/_scalegroup.py index 9bca001684..ddadb6db9c 100644 --- a/plotly/validators/funnelarea/_scalegroup.py +++ b/plotly/validators/funnelarea/_scalegroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): +class ScalegroupValidator(_bv.StringValidator): def __init__(self, plotly_name="scalegroup", parent_name="funnelarea", **kwargs): - super(ScalegroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_showlegend.py b/plotly/validators/funnelarea/_showlegend.py index e83bfc19a3..75df2cbf0a 100644 --- a/plotly/validators/funnelarea/_showlegend.py +++ b/plotly/validators/funnelarea/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="funnelarea", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_stream.py b/plotly/validators/funnelarea/_stream.py index a25d7caec0..7ca14293f1 100644 --- a/plotly/validators/funnelarea/_stream.py +++ b/plotly/validators/funnelarea/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="funnelarea", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_text.py b/plotly/validators/funnelarea/_text.py index 7e4d6b125b..5406c25a96 100644 --- a/plotly/validators/funnelarea/_text.py +++ b/plotly/validators/funnelarea/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="funnelarea", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_textfont.py b/plotly/validators/funnelarea/_textfont.py index 48dadda625..79096cd4ec 100644 --- a/plotly/validators/funnelarea/_textfont.py +++ b/plotly/validators/funnelarea/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="funnelarea", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_textinfo.py b/plotly/validators/funnelarea/_textinfo.py index db22bfe0fe..5a8b030f43 100644 --- a/plotly/validators/funnelarea/_textinfo.py +++ b/plotly/validators/funnelarea/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="funnelarea", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["label", "text", "value", "percent"]), diff --git a/plotly/validators/funnelarea/_textposition.py b/plotly/validators/funnelarea/_textposition.py index 9b36602566..66e04f110c 100644 --- a/plotly/validators/funnelarea/_textposition.py +++ b/plotly/validators/funnelarea/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="funnelarea", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["inside", "none"]), diff --git a/plotly/validators/funnelarea/_textpositionsrc.py b/plotly/validators/funnelarea/_textpositionsrc.py index 09e27c8241..299a02eee7 100644 --- a/plotly/validators/funnelarea/_textpositionsrc.py +++ b/plotly/validators/funnelarea/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="funnelarea", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_textsrc.py b/plotly/validators/funnelarea/_textsrc.py index 50afe541e8..0d861ac1e4 100644 --- a/plotly/validators/funnelarea/_textsrc.py +++ b/plotly/validators/funnelarea/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="funnelarea", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_texttemplate.py b/plotly/validators/funnelarea/_texttemplate.py index 396f193bc8..2beae60de8 100644 --- a/plotly/validators/funnelarea/_texttemplate.py +++ b/plotly/validators/funnelarea/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="funnelarea", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/_texttemplatesrc.py b/plotly/validators/funnelarea/_texttemplatesrc.py index e7dfebbd39..3a7d422a59 100644 --- a/plotly/validators/funnelarea/_texttemplatesrc.py +++ b/plotly/validators/funnelarea/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="funnelarea", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_title.py b/plotly/validators/funnelarea/_title.py index 7e29f56d03..0b77702c13 100644 --- a/plotly/validators/funnelarea/_title.py +++ b/plotly/validators/funnelarea/_title.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="funnelarea", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets the font used for `title`. - position - Specifies the location of the `title`. - text - Sets the title of the chart. If it is empty, no - title is displayed. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/_uid.py b/plotly/validators/funnelarea/_uid.py index 6376fa0424..05a47c64a0 100644 --- a/plotly/validators/funnelarea/_uid.py +++ b/plotly/validators/funnelarea/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="funnelarea", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_uirevision.py b/plotly/validators/funnelarea/_uirevision.py index 8dcdcdd5af..adee8d18db 100644 --- a/plotly/validators/funnelarea/_uirevision.py +++ b/plotly/validators/funnelarea/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="funnelarea", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_values.py b/plotly/validators/funnelarea/_values.py index 1ab9253273..ffe7f9e6a7 100644 --- a/plotly/validators/funnelarea/_values.py +++ b/plotly/validators/funnelarea/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="funnelarea", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_valuessrc.py b/plotly/validators/funnelarea/_valuessrc.py index 931c3e72f3..65ef8a2097 100644 --- a/plotly/validators/funnelarea/_valuessrc.py +++ b/plotly/validators/funnelarea/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="funnelarea", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/_visible.py b/plotly/validators/funnelarea/_visible.py index fdb9a4aafd..c02dbf090a 100644 --- a/plotly/validators/funnelarea/_visible.py +++ b/plotly/validators/funnelarea/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="funnelarea", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/funnelarea/domain/__init__.py b/plotly/validators/funnelarea/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/funnelarea/domain/__init__.py +++ b/plotly/validators/funnelarea/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/funnelarea/domain/_column.py b/plotly/validators/funnelarea/domain/_column.py index 00811ade79..7d24e0b66e 100644 --- a/plotly/validators/funnelarea/domain/_column.py +++ b/plotly/validators/funnelarea/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="funnelarea.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnelarea/domain/_row.py b/plotly/validators/funnelarea/domain/_row.py index c121867078..18bccebba0 100644 --- a/plotly/validators/funnelarea/domain/_row.py +++ b/plotly/validators/funnelarea/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="funnelarea.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/funnelarea/domain/_x.py b/plotly/validators/funnelarea/domain/_x.py index de33daa3bd..2fc2d1e253 100644 --- a/plotly/validators/funnelarea/domain/_x.py +++ b/plotly/validators/funnelarea/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="funnelarea.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/funnelarea/domain/_y.py b/plotly/validators/funnelarea/domain/_y.py index 80418d4449..f9c8b14f05 100644 --- a/plotly/validators/funnelarea/domain/_y.py +++ b/plotly/validators/funnelarea/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="funnelarea.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/funnelarea/hoverlabel/__init__.py b/plotly/validators/funnelarea/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/funnelarea/hoverlabel/__init__.py +++ b/plotly/validators/funnelarea/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/funnelarea/hoverlabel/_align.py b/plotly/validators/funnelarea/hoverlabel/_align.py index e76a054b53..f5168393d5 100644 --- a/plotly/validators/funnelarea/hoverlabel/_align.py +++ b/plotly/validators/funnelarea/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="funnelarea.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/funnelarea/hoverlabel/_alignsrc.py b/plotly/validators/funnelarea/hoverlabel/_alignsrc.py index 5426427997..405989a60f 100644 --- a/plotly/validators/funnelarea/hoverlabel/_alignsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="funnelarea.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/_bgcolor.py b/plotly/validators/funnelarea/hoverlabel/_bgcolor.py index 1b3a72edd4..2a32f06af1 100644 --- a/plotly/validators/funnelarea/hoverlabel/_bgcolor.py +++ b/plotly/validators/funnelarea/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="funnelarea.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py b/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py index a065507327..3c944a22ee 100644 --- a/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="funnelarea.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/_bordercolor.py b/plotly/validators/funnelarea/hoverlabel/_bordercolor.py index 27bdd3c9da..b42f014260 100644 --- a/plotly/validators/funnelarea/hoverlabel/_bordercolor.py +++ b/plotly/validators/funnelarea/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="funnelarea.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py b/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py index 8f815e9957..7acb87135b 100644 --- a/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="funnelarea.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/_font.py b/plotly/validators/funnelarea/hoverlabel/_font.py index 21f0c01b95..b35ff408e7 100644 --- a/plotly/validators/funnelarea/hoverlabel/_font.py +++ b/plotly/validators/funnelarea/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="funnelarea.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/hoverlabel/_namelength.py b/plotly/validators/funnelarea/hoverlabel/_namelength.py index c9721f4f20..0882239e4d 100644 --- a/plotly/validators/funnelarea/hoverlabel/_namelength.py +++ b/plotly/validators/funnelarea/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="funnelarea.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py b/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py index 67e3aaf540..f3c238ab3a 100644 --- a/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="funnelarea.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/__init__.py b/plotly/validators/funnelarea/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/__init__.py +++ b/plotly/validators/funnelarea/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_color.py b/plotly/validators/funnelarea/hoverlabel/font/_color.py index 05549ca1bc..bca1a72a61 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_color.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py b/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py index 1ab81da06c..697b02a6b0 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_family.py b/plotly/validators/funnelarea/hoverlabel/font/_family.py index e1ac6519c0..c2fbb6c1e3 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_family.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py b/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py index 19560648ab..92f8ab48fc 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_lineposition.py b/plotly/validators/funnelarea/hoverlabel/font/_lineposition.py index 105e43e346..f885125e3e 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_lineposition.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnelarea/hoverlabel/font/_linepositionsrc.py b/plotly/validators/funnelarea/hoverlabel/font/_linepositionsrc.py index 1cb80d6cbf..f4f0015a66 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_shadow.py b/plotly/validators/funnelarea/hoverlabel/font/_shadow.py index ae6d665c42..b93a379a70 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_shadow.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/funnelarea/hoverlabel/font/_shadowsrc.py b/plotly/validators/funnelarea/hoverlabel/font/_shadowsrc.py index a80ab1431c..fb0ce45d36 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_size.py b/plotly/validators/funnelarea/hoverlabel/font/_size.py index 1ff501f23a..763d776d53 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_size.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py b/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py index 7c24bad5aa..06c7f9f2c4 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_style.py b/plotly/validators/funnelarea/hoverlabel/font/_style.py index ee70b84d16..f4727a12ac 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_style.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnelarea/hoverlabel/font/_stylesrc.py b/plotly/validators/funnelarea/hoverlabel/font/_stylesrc.py index dada8fa5b7..7a33be3ead 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_textcase.py b/plotly/validators/funnelarea/hoverlabel/font/_textcase.py index f7fc3fa2c9..c0185af74d 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_textcase.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnelarea/hoverlabel/font/_textcasesrc.py b/plotly/validators/funnelarea/hoverlabel/font/_textcasesrc.py index 8f74f88bc8..89d541d011 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_variant.py b/plotly/validators/funnelarea/hoverlabel/font/_variant.py index ce63c66ac6..b669155b41 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_variant.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/funnelarea/hoverlabel/font/_variantsrc.py b/plotly/validators/funnelarea/hoverlabel/font/_variantsrc.py index 2291bba26f..1a6443ca7d 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/hoverlabel/font/_weight.py b/plotly/validators/funnelarea/hoverlabel/font/_weight.py index 79374274dc..7dd5667f81 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_weight.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnelarea.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnelarea/hoverlabel/font/_weightsrc.py b/plotly/validators/funnelarea/hoverlabel/font/_weightsrc.py index 30e8f48ac9..21d2a137cd 100644 --- a/plotly/validators/funnelarea/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/funnelarea/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnelarea.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/__init__.py b/plotly/validators/funnelarea/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnelarea/insidetextfont/__init__.py +++ b/plotly/validators/funnelarea/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnelarea/insidetextfont/_color.py b/plotly/validators/funnelarea/insidetextfont/_color.py index 42106fb6e3..9188a80261 100644 --- a/plotly/validators/funnelarea/insidetextfont/_color.py +++ b/plotly/validators/funnelarea/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnelarea.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/insidetextfont/_colorsrc.py b/plotly/validators/funnelarea/insidetextfont/_colorsrc.py index 30a351e8a2..776e9455de 100644 --- a/plotly/validators/funnelarea/insidetextfont/_colorsrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnelarea.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_family.py b/plotly/validators/funnelarea/insidetextfont/_family.py index 44f70c4d06..932f30c62a 100644 --- a/plotly/validators/funnelarea/insidetextfont/_family.py +++ b/plotly/validators/funnelarea/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnelarea.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnelarea/insidetextfont/_familysrc.py b/plotly/validators/funnelarea/insidetextfont/_familysrc.py index 324d584387..7023dc9be9 100644 --- a/plotly/validators/funnelarea/insidetextfont/_familysrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnelarea.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_lineposition.py b/plotly/validators/funnelarea/insidetextfont/_lineposition.py index c9e43e890b..1b0144fb6e 100644 --- a/plotly/validators/funnelarea/insidetextfont/_lineposition.py +++ b/plotly/validators/funnelarea/insidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnelarea.insidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnelarea/insidetextfont/_linepositionsrc.py b/plotly/validators/funnelarea/insidetextfont/_linepositionsrc.py index baa768531d..861147150d 100644 --- a/plotly/validators/funnelarea/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnelarea.insidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_shadow.py b/plotly/validators/funnelarea/insidetextfont/_shadow.py index b90b5689ca..cccd87039b 100644 --- a/plotly/validators/funnelarea/insidetextfont/_shadow.py +++ b/plotly/validators/funnelarea/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnelarea.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/insidetextfont/_shadowsrc.py b/plotly/validators/funnelarea/insidetextfont/_shadowsrc.py index 5871314e23..4073bdb3e8 100644 --- a/plotly/validators/funnelarea/insidetextfont/_shadowsrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnelarea.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_size.py b/plotly/validators/funnelarea/insidetextfont/_size.py index 39f0eee96f..39c3e33f0a 100644 --- a/plotly/validators/funnelarea/insidetextfont/_size.py +++ b/plotly/validators/funnelarea/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnelarea.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnelarea/insidetextfont/_sizesrc.py b/plotly/validators/funnelarea/insidetextfont/_sizesrc.py index 1691cb8ac7..550cf94217 100644 --- a/plotly/validators/funnelarea/insidetextfont/_sizesrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnelarea.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_style.py b/plotly/validators/funnelarea/insidetextfont/_style.py index 070573cbff..3744397924 100644 --- a/plotly/validators/funnelarea/insidetextfont/_style.py +++ b/plotly/validators/funnelarea/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnelarea.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnelarea/insidetextfont/_stylesrc.py b/plotly/validators/funnelarea/insidetextfont/_stylesrc.py index 6a48193da8..3d64ae8513 100644 --- a/plotly/validators/funnelarea/insidetextfont/_stylesrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnelarea.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_textcase.py b/plotly/validators/funnelarea/insidetextfont/_textcase.py index 3df78d5013..701400e5c9 100644 --- a/plotly/validators/funnelarea/insidetextfont/_textcase.py +++ b/plotly/validators/funnelarea/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnelarea.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnelarea/insidetextfont/_textcasesrc.py b/plotly/validators/funnelarea/insidetextfont/_textcasesrc.py index 7f9b1ac6bb..ea6da85568 100644 --- a/plotly/validators/funnelarea/insidetextfont/_textcasesrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnelarea.insidetextfont", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_variant.py b/plotly/validators/funnelarea/insidetextfont/_variant.py index 3489086ee1..0d8b39f63e 100644 --- a/plotly/validators/funnelarea/insidetextfont/_variant.py +++ b/plotly/validators/funnelarea/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnelarea.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/funnelarea/insidetextfont/_variantsrc.py b/plotly/validators/funnelarea/insidetextfont/_variantsrc.py index 1e6d6888a7..7d7ba38f5a 100644 --- a/plotly/validators/funnelarea/insidetextfont/_variantsrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnelarea.insidetextfont", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/insidetextfont/_weight.py b/plotly/validators/funnelarea/insidetextfont/_weight.py index 228c16104b..afda60e141 100644 --- a/plotly/validators/funnelarea/insidetextfont/_weight.py +++ b/plotly/validators/funnelarea/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnelarea.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnelarea/insidetextfont/_weightsrc.py b/plotly/validators/funnelarea/insidetextfont/_weightsrc.py index 681c29a7b5..22a829976a 100644 --- a/plotly/validators/funnelarea/insidetextfont/_weightsrc.py +++ b/plotly/validators/funnelarea/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnelarea.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/legendgrouptitle/__init__.py b/plotly/validators/funnelarea/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/__init__.py +++ b/plotly/validators/funnelarea/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/funnelarea/legendgrouptitle/_font.py b/plotly/validators/funnelarea/legendgrouptitle/_font.py index 8fde9255ae..c816d96706 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/_font.py +++ b/plotly/validators/funnelarea/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="funnelarea.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/legendgrouptitle/_text.py b/plotly/validators/funnelarea/legendgrouptitle/_text.py index 2dafda1dd1..871e0b64b8 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/_text.py +++ b/plotly/validators/funnelarea/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="funnelarea.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/__init__.py b/plotly/validators/funnelarea/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/__init__.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_color.py b/plotly/validators/funnelarea/legendgrouptitle/font/_color.py index 1f2f2d5800..98e98109dc 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_color.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_family.py b/plotly/validators/funnelarea/legendgrouptitle/font/_family.py index 3ef761def3..b6c779dd41 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_family.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_lineposition.py b/plotly/validators/funnelarea/legendgrouptitle/font/_lineposition.py index 3f1c48c5da..edae24f9a7 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_shadow.py b/plotly/validators/funnelarea/legendgrouptitle/font/_shadow.py index 1adcfd4f5e..2a712dc8a9 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_size.py b/plotly/validators/funnelarea/legendgrouptitle/font/_size.py index a9201d7bb5..8a612009f2 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_size.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_style.py b/plotly/validators/funnelarea/legendgrouptitle/font/_style.py index 87b7867717..cb4b6fb1a1 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_style.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_textcase.py b/plotly/validators/funnelarea/legendgrouptitle/font/_textcase.py index 9441590306..2d6f8011e9 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_variant.py b/plotly/validators/funnelarea/legendgrouptitle/font/_variant.py index dc3cdc9ea2..ddacd65897 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_variant.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/funnelarea/legendgrouptitle/font/_weight.py b/plotly/validators/funnelarea/legendgrouptitle/font/_weight.py index 6acf0c3792..64211a7dd0 100644 --- a/plotly/validators/funnelarea/legendgrouptitle/font/_weight.py +++ b/plotly/validators/funnelarea/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnelarea.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/funnelarea/marker/__init__.py b/plotly/validators/funnelarea/marker/__init__.py index aeae3564f6..22860e3333 100644 --- a/plotly/validators/funnelarea/marker/__init__.py +++ b/plotly/validators/funnelarea/marker/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._pattern import PatternValidator - from ._line import LineValidator - from ._colorssrc import ColorssrcValidator - from ._colors import ColorsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._pattern.PatternValidator", - "._line.LineValidator", - "._colorssrc.ColorssrcValidator", - "._colors.ColorsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._pattern.PatternValidator", + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colors.ColorsValidator", + ], +) diff --git a/plotly/validators/funnelarea/marker/_colors.py b/plotly/validators/funnelarea/marker/_colors.py index 1be1bc6623..c25f14241a 100644 --- a/plotly/validators/funnelarea/marker/_colors.py +++ b/plotly/validators/funnelarea/marker/_colors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="colors", parent_name="funnelarea.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/_colorssrc.py b/plotly/validators/funnelarea/marker/_colorssrc.py index 64022dce33..148598b005 100644 --- a/plotly/validators/funnelarea/marker/_colorssrc.py +++ b/plotly/validators/funnelarea/marker/_colorssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorssrc", parent_name="funnelarea.marker", **kwargs ): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/_line.py b/plotly/validators/funnelarea/marker/_line.py index b2319683f6..103026ec05 100644 --- a/plotly/validators/funnelarea/marker/_line.py +++ b/plotly/validators/funnelarea/marker/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="funnelarea.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/marker/_pattern.py b/plotly/validators/funnelarea/marker/_pattern.py index d6a29333eb..a72b512277 100644 --- a/plotly/validators/funnelarea/marker/_pattern.py +++ b/plotly/validators/funnelarea/marker/_pattern.py @@ -1,65 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__( self, plotly_name="pattern", parent_name="funnelarea.marker", **kwargs ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/marker/line/__init__.py b/plotly/validators/funnelarea/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/funnelarea/marker/line/__init__.py +++ b/plotly/validators/funnelarea/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnelarea/marker/line/_color.py b/plotly/validators/funnelarea/marker/line/_color.py index 823cc11d08..fe6396543e 100644 --- a/plotly/validators/funnelarea/marker/line/_color.py +++ b/plotly/validators/funnelarea/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnelarea.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnelarea/marker/line/_colorsrc.py b/plotly/validators/funnelarea/marker/line/_colorsrc.py index 8f19e8dbda..f724062bf8 100644 --- a/plotly/validators/funnelarea/marker/line/_colorsrc.py +++ b/plotly/validators/funnelarea/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnelarea.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/line/_width.py b/plotly/validators/funnelarea/marker/line/_width.py index 28a6655e5d..418c309d6a 100644 --- a/plotly/validators/funnelarea/marker/line/_width.py +++ b/plotly/validators/funnelarea/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="funnelarea.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnelarea/marker/line/_widthsrc.py b/plotly/validators/funnelarea/marker/line/_widthsrc.py index 0feac95b0c..3d2f98d28a 100644 --- a/plotly/validators/funnelarea/marker/line/_widthsrc.py +++ b/plotly/validators/funnelarea/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="funnelarea.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/pattern/__init__.py b/plotly/validators/funnelarea/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/funnelarea/marker/pattern/__init__.py +++ b/plotly/validators/funnelarea/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/funnelarea/marker/pattern/_bgcolor.py b/plotly/validators/funnelarea/marker/pattern/_bgcolor.py index 547b77925e..a6c8222db3 100644 --- a/plotly/validators/funnelarea/marker/pattern/_bgcolor.py +++ b/plotly/validators/funnelarea/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="funnelarea.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnelarea/marker/pattern/_bgcolorsrc.py b/plotly/validators/funnelarea/marker/pattern/_bgcolorsrc.py index 3a96862ac8..4bd383a89a 100644 --- a/plotly/validators/funnelarea/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/funnelarea/marker/pattern/_bgcolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="funnelarea.marker.pattern", **kwargs, ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/pattern/_fgcolor.py b/plotly/validators/funnelarea/marker/pattern/_fgcolor.py index 536a51eb75..0c91bb9ac2 100644 --- a/plotly/validators/funnelarea/marker/pattern/_fgcolor.py +++ b/plotly/validators/funnelarea/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="funnelarea.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/funnelarea/marker/pattern/_fgcolorsrc.py b/plotly/validators/funnelarea/marker/pattern/_fgcolorsrc.py index 1a4355f4a6..403d862262 100644 --- a/plotly/validators/funnelarea/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/funnelarea/marker/pattern/_fgcolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="funnelarea.marker.pattern", **kwargs, ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/pattern/_fgopacity.py b/plotly/validators/funnelarea/marker/pattern/_fgopacity.py index b868a89849..cc7f4e8b34 100644 --- a/plotly/validators/funnelarea/marker/pattern/_fgopacity.py +++ b/plotly/validators/funnelarea/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="funnelarea.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnelarea/marker/pattern/_fillmode.py b/plotly/validators/funnelarea/marker/pattern/_fillmode.py index 0cdbb4bea0..d6cfd60608 100644 --- a/plotly/validators/funnelarea/marker/pattern/_fillmode.py +++ b/plotly/validators/funnelarea/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="funnelarea.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/funnelarea/marker/pattern/_shape.py b/plotly/validators/funnelarea/marker/pattern/_shape.py index 326b04b7b3..5c5a323ae3 100644 --- a/plotly/validators/funnelarea/marker/pattern/_shape.py +++ b/plotly/validators/funnelarea/marker/pattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="funnelarea.marker.pattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/funnelarea/marker/pattern/_shapesrc.py b/plotly/validators/funnelarea/marker/pattern/_shapesrc.py index f23896ab79..b3256325ea 100644 --- a/plotly/validators/funnelarea/marker/pattern/_shapesrc.py +++ b/plotly/validators/funnelarea/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="funnelarea.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/pattern/_size.py b/plotly/validators/funnelarea/marker/pattern/_size.py index def633c999..7628f518a3 100644 --- a/plotly/validators/funnelarea/marker/pattern/_size.py +++ b/plotly/validators/funnelarea/marker/pattern/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnelarea.marker.pattern", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnelarea/marker/pattern/_sizesrc.py b/plotly/validators/funnelarea/marker/pattern/_sizesrc.py index 4320434910..67c8302162 100644 --- a/plotly/validators/funnelarea/marker/pattern/_sizesrc.py +++ b/plotly/validators/funnelarea/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnelarea.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/marker/pattern/_solidity.py b/plotly/validators/funnelarea/marker/pattern/_solidity.py index a7fff3113c..5b5bd868e1 100644 --- a/plotly/validators/funnelarea/marker/pattern/_solidity.py +++ b/plotly/validators/funnelarea/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="funnelarea.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/funnelarea/marker/pattern/_soliditysrc.py b/plotly/validators/funnelarea/marker/pattern/_soliditysrc.py index 9be2f5b253..9f4f57c477 100644 --- a/plotly/validators/funnelarea/marker/pattern/_soliditysrc.py +++ b/plotly/validators/funnelarea/marker/pattern/_soliditysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="funnelarea.marker.pattern", **kwargs, ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/stream/__init__.py b/plotly/validators/funnelarea/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/funnelarea/stream/__init__.py +++ b/plotly/validators/funnelarea/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/funnelarea/stream/_maxpoints.py b/plotly/validators/funnelarea/stream/_maxpoints.py index e081d5afb4..1ae9bd33bf 100644 --- a/plotly/validators/funnelarea/stream/_maxpoints.py +++ b/plotly/validators/funnelarea/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="funnelarea.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/funnelarea/stream/_token.py b/plotly/validators/funnelarea/stream/_token.py index 30192e4c76..e65336844b 100644 --- a/plotly/validators/funnelarea/stream/_token.py +++ b/plotly/validators/funnelarea/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="funnelarea.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/funnelarea/textfont/__init__.py b/plotly/validators/funnelarea/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnelarea/textfont/__init__.py +++ b/plotly/validators/funnelarea/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnelarea/textfont/_color.py b/plotly/validators/funnelarea/textfont/_color.py index 27778487a1..eef2a4ea6e 100644 --- a/plotly/validators/funnelarea/textfont/_color.py +++ b/plotly/validators/funnelarea/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnelarea.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/textfont/_colorsrc.py b/plotly/validators/funnelarea/textfont/_colorsrc.py index e1f75edf4d..aab0d55aaa 100644 --- a/plotly/validators/funnelarea/textfont/_colorsrc.py +++ b/plotly/validators/funnelarea/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnelarea.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_family.py b/plotly/validators/funnelarea/textfont/_family.py index 312a02d5ce..7225d9b386 100644 --- a/plotly/validators/funnelarea/textfont/_family.py +++ b/plotly/validators/funnelarea/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnelarea.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnelarea/textfont/_familysrc.py b/plotly/validators/funnelarea/textfont/_familysrc.py index ffaffc41f9..e928c24842 100644 --- a/plotly/validators/funnelarea/textfont/_familysrc.py +++ b/plotly/validators/funnelarea/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnelarea.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_lineposition.py b/plotly/validators/funnelarea/textfont/_lineposition.py index 0027d0a212..7ed4b7f073 100644 --- a/plotly/validators/funnelarea/textfont/_lineposition.py +++ b/plotly/validators/funnelarea/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnelarea.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnelarea/textfont/_linepositionsrc.py b/plotly/validators/funnelarea/textfont/_linepositionsrc.py index 031e35e51f..8d0dbe80a4 100644 --- a/plotly/validators/funnelarea/textfont/_linepositionsrc.py +++ b/plotly/validators/funnelarea/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnelarea.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_shadow.py b/plotly/validators/funnelarea/textfont/_shadow.py index a4865b260e..fee96f8f59 100644 --- a/plotly/validators/funnelarea/textfont/_shadow.py +++ b/plotly/validators/funnelarea/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnelarea.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/textfont/_shadowsrc.py b/plotly/validators/funnelarea/textfont/_shadowsrc.py index 51c2258f5a..1beb33b766 100644 --- a/plotly/validators/funnelarea/textfont/_shadowsrc.py +++ b/plotly/validators/funnelarea/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnelarea.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_size.py b/plotly/validators/funnelarea/textfont/_size.py index edfeb482de..9291fe8847 100644 --- a/plotly/validators/funnelarea/textfont/_size.py +++ b/plotly/validators/funnelarea/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="funnelarea.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnelarea/textfont/_sizesrc.py b/plotly/validators/funnelarea/textfont/_sizesrc.py index f3aded5297..6659c5883c 100644 --- a/plotly/validators/funnelarea/textfont/_sizesrc.py +++ b/plotly/validators/funnelarea/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnelarea.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_style.py b/plotly/validators/funnelarea/textfont/_style.py index 5ae4be1b43..465be23b36 100644 --- a/plotly/validators/funnelarea/textfont/_style.py +++ b/plotly/validators/funnelarea/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnelarea.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnelarea/textfont/_stylesrc.py b/plotly/validators/funnelarea/textfont/_stylesrc.py index c1e797cab4..91e3476168 100644 --- a/plotly/validators/funnelarea/textfont/_stylesrc.py +++ b/plotly/validators/funnelarea/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnelarea.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_textcase.py b/plotly/validators/funnelarea/textfont/_textcase.py index 9e85354e33..8b0f98e747 100644 --- a/plotly/validators/funnelarea/textfont/_textcase.py +++ b/plotly/validators/funnelarea/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnelarea.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnelarea/textfont/_textcasesrc.py b/plotly/validators/funnelarea/textfont/_textcasesrc.py index 79b3b6241e..cb75daafcf 100644 --- a/plotly/validators/funnelarea/textfont/_textcasesrc.py +++ b/plotly/validators/funnelarea/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnelarea.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_variant.py b/plotly/validators/funnelarea/textfont/_variant.py index 0138135319..56da451a4b 100644 --- a/plotly/validators/funnelarea/textfont/_variant.py +++ b/plotly/validators/funnelarea/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnelarea.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/funnelarea/textfont/_variantsrc.py b/plotly/validators/funnelarea/textfont/_variantsrc.py index 04e6af971d..059b3cb34b 100644 --- a/plotly/validators/funnelarea/textfont/_variantsrc.py +++ b/plotly/validators/funnelarea/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnelarea.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/textfont/_weight.py b/plotly/validators/funnelarea/textfont/_weight.py index 1d56af3ef4..88788aa4f0 100644 --- a/plotly/validators/funnelarea/textfont/_weight.py +++ b/plotly/validators/funnelarea/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnelarea.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnelarea/textfont/_weightsrc.py b/plotly/validators/funnelarea/textfont/_weightsrc.py index a41484018b..ea0d2424c8 100644 --- a/plotly/validators/funnelarea/textfont/_weightsrc.py +++ b/plotly/validators/funnelarea/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnelarea.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/__init__.py b/plotly/validators/funnelarea/title/__init__.py index bedd4ba176..8d5c91b29e 100644 --- a/plotly/validators/funnelarea/title/__init__.py +++ b/plotly/validators/funnelarea/title/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._position import PositionValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._text.TextValidator", - "._position.PositionValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._position.PositionValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/funnelarea/title/_font.py b/plotly/validators/funnelarea/title/_font.py index 64f90d2171..4168239fbd 100644 --- a/plotly/validators/funnelarea/title/_font.py +++ b/plotly/validators/funnelarea/title/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="funnelarea.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/funnelarea/title/_position.py b/plotly/validators/funnelarea/title/_position.py index 06067e6253..2c5f28f6be 100644 --- a/plotly/validators/funnelarea/title/_position.py +++ b/plotly/validators/funnelarea/title/_position.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="position", parent_name="funnelarea.title", **kwargs ): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top left", "top center", "top right"]), **kwargs, diff --git a/plotly/validators/funnelarea/title/_text.py b/plotly/validators/funnelarea/title/_text.py index 81bf53add0..8d9b296ceb 100644 --- a/plotly/validators/funnelarea/title/_text.py +++ b/plotly/validators/funnelarea/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="funnelarea.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/__init__.py b/plotly/validators/funnelarea/title/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/funnelarea/title/font/__init__.py +++ b/plotly/validators/funnelarea/title/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/funnelarea/title/font/_color.py b/plotly/validators/funnelarea/title/font/_color.py index 7a43ae8892..ce76e410fc 100644 --- a/plotly/validators/funnelarea/title/font/_color.py +++ b/plotly/validators/funnelarea/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="funnelarea.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/title/font/_colorsrc.py b/plotly/validators/funnelarea/title/font/_colorsrc.py index 568990ff41..342585163a 100644 --- a/plotly/validators/funnelarea/title/font/_colorsrc.py +++ b/plotly/validators/funnelarea/title/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="funnelarea.title.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_family.py b/plotly/validators/funnelarea/title/font/_family.py index 274b1b8b4c..662d699967 100644 --- a/plotly/validators/funnelarea/title/font/_family.py +++ b/plotly/validators/funnelarea/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="funnelarea.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/funnelarea/title/font/_familysrc.py b/plotly/validators/funnelarea/title/font/_familysrc.py index a8de565424..ab7966cad8 100644 --- a/plotly/validators/funnelarea/title/font/_familysrc.py +++ b/plotly/validators/funnelarea/title/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="funnelarea.title.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_lineposition.py b/plotly/validators/funnelarea/title/font/_lineposition.py index a8685c308a..6879823073 100644 --- a/plotly/validators/funnelarea/title/font/_lineposition.py +++ b/plotly/validators/funnelarea/title/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="funnelarea.title.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/funnelarea/title/font/_linepositionsrc.py b/plotly/validators/funnelarea/title/font/_linepositionsrc.py index 04a5f8c8e6..db6016717e 100644 --- a/plotly/validators/funnelarea/title/font/_linepositionsrc.py +++ b/plotly/validators/funnelarea/title/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="funnelarea.title.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_shadow.py b/plotly/validators/funnelarea/title/font/_shadow.py index 0707382023..fdcd5bcb86 100644 --- a/plotly/validators/funnelarea/title/font/_shadow.py +++ b/plotly/validators/funnelarea/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="funnelarea.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/funnelarea/title/font/_shadowsrc.py b/plotly/validators/funnelarea/title/font/_shadowsrc.py index 677b5ffb56..9eb7908a59 100644 --- a/plotly/validators/funnelarea/title/font/_shadowsrc.py +++ b/plotly/validators/funnelarea/title/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="funnelarea.title.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_size.py b/plotly/validators/funnelarea/title/font/_size.py index 230928b31b..cb3663a08b 100644 --- a/plotly/validators/funnelarea/title/font/_size.py +++ b/plotly/validators/funnelarea/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="funnelarea.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/funnelarea/title/font/_sizesrc.py b/plotly/validators/funnelarea/title/font/_sizesrc.py index cd20c2497f..4641a7d852 100644 --- a/plotly/validators/funnelarea/title/font/_sizesrc.py +++ b/plotly/validators/funnelarea/title/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="funnelarea.title.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_style.py b/plotly/validators/funnelarea/title/font/_style.py index a07f81f4d7..ec608078b9 100644 --- a/plotly/validators/funnelarea/title/font/_style.py +++ b/plotly/validators/funnelarea/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="funnelarea.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/funnelarea/title/font/_stylesrc.py b/plotly/validators/funnelarea/title/font/_stylesrc.py index 5aa07587db..ab11758081 100644 --- a/plotly/validators/funnelarea/title/font/_stylesrc.py +++ b/plotly/validators/funnelarea/title/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="funnelarea.title.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_textcase.py b/plotly/validators/funnelarea/title/font/_textcase.py index 0ba7eedf25..ed44eb56e5 100644 --- a/plotly/validators/funnelarea/title/font/_textcase.py +++ b/plotly/validators/funnelarea/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="funnelarea.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/funnelarea/title/font/_textcasesrc.py b/plotly/validators/funnelarea/title/font/_textcasesrc.py index c00d6aa727..ffca5e09b5 100644 --- a/plotly/validators/funnelarea/title/font/_textcasesrc.py +++ b/plotly/validators/funnelarea/title/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="funnelarea.title.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_variant.py b/plotly/validators/funnelarea/title/font/_variant.py index 11138193de..123225f3ec 100644 --- a/plotly/validators/funnelarea/title/font/_variant.py +++ b/plotly/validators/funnelarea/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="funnelarea.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/funnelarea/title/font/_variantsrc.py b/plotly/validators/funnelarea/title/font/_variantsrc.py index a22dbdc2e6..0f268e3bf0 100644 --- a/plotly/validators/funnelarea/title/font/_variantsrc.py +++ b/plotly/validators/funnelarea/title/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="funnelarea.title.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/funnelarea/title/font/_weight.py b/plotly/validators/funnelarea/title/font/_weight.py index b146cf917a..187a84e46b 100644 --- a/plotly/validators/funnelarea/title/font/_weight.py +++ b/plotly/validators/funnelarea/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="funnelarea.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/funnelarea/title/font/_weightsrc.py b/plotly/validators/funnelarea/title/font/_weightsrc.py index af8f1166a9..5756f1124f 100644 --- a/plotly/validators/funnelarea/title/font/_weightsrc.py +++ b/plotly/validators/funnelarea/title/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="funnelarea.title.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/__init__.py b/plotly/validators/heatmap/__init__.py index 5720a81de3..126790d7d6 100644 --- a/plotly/validators/heatmap/__init__.py +++ b/plotly/validators/heatmap/__init__.py @@ -1,155 +1,80 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zsmooth import ZsmoothValidator - from ._zorder import ZorderValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zhoverformat import ZhoverformatValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._ytype import YtypeValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._ygap import YgapValidator - from ._ycalendar import YcalendarValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xtype import XtypeValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xgap import XgapValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._transpose import TransposeValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverongaps import HoverongapsValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zsmooth.ZsmoothValidator", - "._zorder.ZorderValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zhoverformat.ZhoverformatValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._ytype.YtypeValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._ygap.YgapValidator", - "._ycalendar.YcalendarValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xtype.XtypeValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xgap.XgapValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._transpose.TransposeValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverongaps.HoverongapsValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zsmooth.ZsmoothValidator", + "._zorder.ZorderValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ytype.YtypeValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._ygap.YgapValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xtype.XtypeValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xgap.XgapValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._transpose.TransposeValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverongaps.HoverongapsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/heatmap/_autocolorscale.py b/plotly/validators/heatmap/_autocolorscale.py index d409d569b6..3fce3d2a4d 100644 --- a/plotly/validators/heatmap/_autocolorscale.py +++ b/plotly/validators/heatmap/_autocolorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="heatmap", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/heatmap/_coloraxis.py b/plotly/validators/heatmap/_coloraxis.py index dde36756fc..979a279c12 100644 --- a/plotly/validators/heatmap/_coloraxis.py +++ b/plotly/validators/heatmap/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="heatmap", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/heatmap/_colorbar.py b/plotly/validators/heatmap/_colorbar.py index e91fd0a6a0..087dcbd2f9 100644 --- a/plotly/validators/heatmap/_colorbar.py +++ b/plotly/validators/heatmap/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="heatmap", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.heatmap - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.heatmap.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of heatmap.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.heatmap.colorbar.T - itle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/heatmap/_colorscale.py b/plotly/validators/heatmap/_colorscale.py index f8e989e1cf..b5a5a07276 100644 --- a/plotly/validators/heatmap/_colorscale.py +++ b/plotly/validators/heatmap/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="heatmap", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/heatmap/_connectgaps.py b/plotly/validators/heatmap/_connectgaps.py index 3ba1dc5aa1..3bcd2f641b 100644 --- a/plotly/validators/heatmap/_connectgaps.py +++ b/plotly/validators/heatmap/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="heatmap", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_customdata.py b/plotly/validators/heatmap/_customdata.py index 0d87ce5ecb..c9dda576e6 100644 --- a/plotly/validators/heatmap/_customdata.py +++ b/plotly/validators/heatmap/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="heatmap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_customdatasrc.py b/plotly/validators/heatmap/_customdatasrc.py index 3e267577dd..5780bccb50 100644 --- a/plotly/validators/heatmap/_customdatasrc.py +++ b/plotly/validators/heatmap/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="heatmap", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_dx.py b/plotly/validators/heatmap/_dx.py index 7b0402c39f..17e83416c6 100644 --- a/plotly/validators/heatmap/_dx.py +++ b/plotly/validators/heatmap/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="heatmap", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_dy.py b/plotly/validators/heatmap/_dy.py index ccb42a16d7..94a4f56df2 100644 --- a/plotly/validators/heatmap/_dy.py +++ b/plotly/validators/heatmap/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="heatmap", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_hoverinfo.py b/plotly/validators/heatmap/_hoverinfo.py index 796ceb7b87..98974db6cd 100644 --- a/plotly/validators/heatmap/_hoverinfo.py +++ b/plotly/validators/heatmap/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="heatmap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/heatmap/_hoverinfosrc.py b/plotly/validators/heatmap/_hoverinfosrc.py index 338bbdb9cc..b058b09b7f 100644 --- a/plotly/validators/heatmap/_hoverinfosrc.py +++ b/plotly/validators/heatmap/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="heatmap", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_hoverlabel.py b/plotly/validators/heatmap/_hoverlabel.py index e2ca30fd2f..7b5b295e5c 100644 --- a/plotly/validators/heatmap/_hoverlabel.py +++ b/plotly/validators/heatmap/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="heatmap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/heatmap/_hoverongaps.py b/plotly/validators/heatmap/_hoverongaps.py index 94bd2a8604..91ba9dfed2 100644 --- a/plotly/validators/heatmap/_hoverongaps.py +++ b/plotly/validators/heatmap/_hoverongaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverongapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class HoverongapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="hoverongaps", parent_name="heatmap", **kwargs): - super(HoverongapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_hovertemplate.py b/plotly/validators/heatmap/_hovertemplate.py index 2a4ac2190b..f617fcab8f 100644 --- a/plotly/validators/heatmap/_hovertemplate.py +++ b/plotly/validators/heatmap/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="heatmap", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/heatmap/_hovertemplatesrc.py b/plotly/validators/heatmap/_hovertemplatesrc.py index 5cc143a451..d04abbfed5 100644 --- a/plotly/validators/heatmap/_hovertemplatesrc.py +++ b/plotly/validators/heatmap/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="heatmap", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_hovertext.py b/plotly/validators/heatmap/_hovertext.py index c1ac0bdf4f..5c52b9e357 100644 --- a/plotly/validators/heatmap/_hovertext.py +++ b/plotly/validators/heatmap/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HovertextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="hovertext", parent_name="heatmap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_hovertextsrc.py b/plotly/validators/heatmap/_hovertextsrc.py index b6e788a00c..0bb05f0b59 100644 --- a/plotly/validators/heatmap/_hovertextsrc.py +++ b/plotly/validators/heatmap/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="heatmap", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_ids.py b/plotly/validators/heatmap/_ids.py index b2dba315b1..644ddf34d8 100644 --- a/plotly/validators/heatmap/_ids.py +++ b/plotly/validators/heatmap/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="heatmap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_idssrc.py b/plotly/validators/heatmap/_idssrc.py index 9353997622..358dbd809f 100644 --- a/plotly/validators/heatmap/_idssrc.py +++ b/plotly/validators/heatmap/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="heatmap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_legend.py b/plotly/validators/heatmap/_legend.py index 0c177c920e..2ada53b52e 100644 --- a/plotly/validators/heatmap/_legend.py +++ b/plotly/validators/heatmap/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="heatmap", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/heatmap/_legendgroup.py b/plotly/validators/heatmap/_legendgroup.py index 8fb3207d64..3df5e48020 100644 --- a/plotly/validators/heatmap/_legendgroup.py +++ b/plotly/validators/heatmap/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="heatmap", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/_legendgrouptitle.py b/plotly/validators/heatmap/_legendgrouptitle.py index 080953fb82..7193570d93 100644 --- a/plotly/validators/heatmap/_legendgrouptitle.py +++ b/plotly/validators/heatmap/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="heatmap", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/heatmap/_legendrank.py b/plotly/validators/heatmap/_legendrank.py index 3b0333b2a2..1f1fab26dc 100644 --- a/plotly/validators/heatmap/_legendrank.py +++ b/plotly/validators/heatmap/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="heatmap", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/_legendwidth.py b/plotly/validators/heatmap/_legendwidth.py index 03c65f0038..343dfb9668 100644 --- a/plotly/validators/heatmap/_legendwidth.py +++ b/plotly/validators/heatmap/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="heatmap", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/_meta.py b/plotly/validators/heatmap/_meta.py index 1e7e7208ea..519d7e8302 100644 --- a/plotly/validators/heatmap/_meta.py +++ b/plotly/validators/heatmap/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="heatmap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/heatmap/_metasrc.py b/plotly/validators/heatmap/_metasrc.py index 5e07bb0a42..4b370730be 100644 --- a/plotly/validators/heatmap/_metasrc.py +++ b/plotly/validators/heatmap/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="heatmap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_name.py b/plotly/validators/heatmap/_name.py index 6a0a783a09..7fdf473264 100644 --- a/plotly/validators/heatmap/_name.py +++ b/plotly/validators/heatmap/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="heatmap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/_opacity.py b/plotly/validators/heatmap/_opacity.py index 172bf32c3d..52bb88c69f 100644 --- a/plotly/validators/heatmap/_opacity.py +++ b/plotly/validators/heatmap/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="heatmap", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/heatmap/_reversescale.py b/plotly/validators/heatmap/_reversescale.py index 645582738c..4d52e79fad 100644 --- a/plotly/validators/heatmap/_reversescale.py +++ b/plotly/validators/heatmap/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="heatmap", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/heatmap/_showlegend.py b/plotly/validators/heatmap/_showlegend.py index 4be0110caa..fac8bd3883 100644 --- a/plotly/validators/heatmap/_showlegend.py +++ b/plotly/validators/heatmap/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="heatmap", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/_showscale.py b/plotly/validators/heatmap/_showscale.py index 238784b899..14a876ff28 100644 --- a/plotly/validators/heatmap/_showscale.py +++ b/plotly/validators/heatmap/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="heatmap", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_stream.py b/plotly/validators/heatmap/_stream.py index 5b65c11bbf..a3aca24e91 100644 --- a/plotly/validators/heatmap/_stream.py +++ b/plotly/validators/heatmap/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="heatmap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/heatmap/_text.py b/plotly/validators/heatmap/_text.py index f65cdc8eb0..196c61611b 100644 --- a/plotly/validators/heatmap/_text.py +++ b/plotly/validators/heatmap/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="heatmap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_textfont.py b/plotly/validators/heatmap/_textfont.py index 7e1300945b..e5a6d420c6 100644 --- a/plotly/validators/heatmap/_textfont.py +++ b/plotly/validators/heatmap/_textfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="heatmap", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/heatmap/_textsrc.py b/plotly/validators/heatmap/_textsrc.py index 7504a623ae..022a5428ca 100644 --- a/plotly/validators/heatmap/_textsrc.py +++ b/plotly/validators/heatmap/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="heatmap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_texttemplate.py b/plotly/validators/heatmap/_texttemplate.py index e35d3490eb..73e69737ab 100644 --- a/plotly/validators/heatmap/_texttemplate.py +++ b/plotly/validators/heatmap/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="heatmap", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/heatmap/_transpose.py b/plotly/validators/heatmap/_transpose.py index 088bcbf394..393547b7b3 100644 --- a/plotly/validators/heatmap/_transpose.py +++ b/plotly/validators/heatmap/_transpose.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TransposeValidator(_plotly_utils.basevalidators.BooleanValidator): +class TransposeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="transpose", parent_name="heatmap", **kwargs): - super(TransposeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_uid.py b/plotly/validators/heatmap/_uid.py index 74539c3812..f38aa6be0f 100644 --- a/plotly/validators/heatmap/_uid.py +++ b/plotly/validators/heatmap/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="heatmap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/heatmap/_uirevision.py b/plotly/validators/heatmap/_uirevision.py index 5156312543..4064a8662f 100644 --- a/plotly/validators/heatmap/_uirevision.py +++ b/plotly/validators/heatmap/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="heatmap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_visible.py b/plotly/validators/heatmap/_visible.py index 0b0472cd8f..03cdd29400 100644 --- a/plotly/validators/heatmap/_visible.py +++ b/plotly/validators/heatmap/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="heatmap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/heatmap/_x.py b/plotly/validators/heatmap/_x.py index 71bc7cd592..f9d736055a 100644 --- a/plotly/validators/heatmap/_x.py +++ b/plotly/validators/heatmap/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="heatmap", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"xtype": "array"}), **kwargs, diff --git a/plotly/validators/heatmap/_x0.py b/plotly/validators/heatmap/_x0.py index 9e9df6fba3..73d3a12f14 100644 --- a/plotly/validators/heatmap/_x0.py +++ b/plotly/validators/heatmap/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="heatmap", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_xaxis.py b/plotly/validators/heatmap/_xaxis.py index cdbebdb249..b40ef87f36 100644 --- a/plotly/validators/heatmap/_xaxis.py +++ b/plotly/validators/heatmap/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="heatmap", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/heatmap/_xcalendar.py b/plotly/validators/heatmap/_xcalendar.py index 866cf54be1..c9e8db52b1 100644 --- a/plotly/validators/heatmap/_xcalendar.py +++ b/plotly/validators/heatmap/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="heatmap", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/_xgap.py b/plotly/validators/heatmap/_xgap.py index 734573ef99..26cc615f4b 100644 --- a/plotly/validators/heatmap/_xgap.py +++ b/plotly/validators/heatmap/_xgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XgapValidator(_plotly_utils.basevalidators.NumberValidator): +class XgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="xgap", parent_name="heatmap", **kwargs): - super(XgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/_xhoverformat.py b/plotly/validators/heatmap/_xhoverformat.py index 815c1bae4b..d8107ddba4 100644 --- a/plotly/validators/heatmap/_xhoverformat.py +++ b/plotly/validators/heatmap/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="heatmap", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_xperiod.py b/plotly/validators/heatmap/_xperiod.py index a408cfd8dd..2abfd8c56a 100644 --- a/plotly/validators/heatmap/_xperiod.py +++ b/plotly/validators/heatmap/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="heatmap", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_xperiod0.py b/plotly/validators/heatmap/_xperiod0.py index 2fb554304d..37ad17ecaf 100644 --- a/plotly/validators/heatmap/_xperiod0.py +++ b/plotly/validators/heatmap/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="heatmap", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_xperiodalignment.py b/plotly/validators/heatmap/_xperiodalignment.py index 129b29f1ea..90baf207c7 100644 --- a/plotly/validators/heatmap/_xperiodalignment.py +++ b/plotly/validators/heatmap/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="heatmap", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"xtype": "scaled"}), values=kwargs.pop("values", ["start", "middle", "end"]), diff --git a/plotly/validators/heatmap/_xsrc.py b/plotly/validators/heatmap/_xsrc.py index 2f296dfbda..fba4858ce5 100644 --- a/plotly/validators/heatmap/_xsrc.py +++ b/plotly/validators/heatmap/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="heatmap", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_xtype.py b/plotly/validators/heatmap/_xtype.py index 2e4ffbb350..632612db20 100644 --- a/plotly/validators/heatmap/_xtype.py +++ b/plotly/validators/heatmap/_xtype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XtypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xtype", parent_name="heatmap", **kwargs): - super(XtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["array", "scaled"]), **kwargs, diff --git a/plotly/validators/heatmap/_y.py b/plotly/validators/heatmap/_y.py index b666cd2c46..90f2019099 100644 --- a/plotly/validators/heatmap/_y.py +++ b/plotly/validators/heatmap/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="heatmap", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"ytype": "array"}), **kwargs, diff --git a/plotly/validators/heatmap/_y0.py b/plotly/validators/heatmap/_y0.py index 55aa5f4d1f..6042f994f4 100644 --- a/plotly/validators/heatmap/_y0.py +++ b/plotly/validators/heatmap/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="heatmap", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_yaxis.py b/plotly/validators/heatmap/_yaxis.py index 656429380e..75fb2932e5 100644 --- a/plotly/validators/heatmap/_yaxis.py +++ b/plotly/validators/heatmap/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="heatmap", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/heatmap/_ycalendar.py b/plotly/validators/heatmap/_ycalendar.py index 94f2802dba..b5cc2e3308 100644 --- a/plotly/validators/heatmap/_ycalendar.py +++ b/plotly/validators/heatmap/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="heatmap", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/_ygap.py b/plotly/validators/heatmap/_ygap.py index f5bf876087..d955a33afb 100644 --- a/plotly/validators/heatmap/_ygap.py +++ b/plotly/validators/heatmap/_ygap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YgapValidator(_plotly_utils.basevalidators.NumberValidator): +class YgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="ygap", parent_name="heatmap", **kwargs): - super(YgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/_yhoverformat.py b/plotly/validators/heatmap/_yhoverformat.py index c05ec60957..055896c517 100644 --- a/plotly/validators/heatmap/_yhoverformat.py +++ b/plotly/validators/heatmap/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="heatmap", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_yperiod.py b/plotly/validators/heatmap/_yperiod.py index 6496c7ed15..d503ba1561 100644 --- a/plotly/validators/heatmap/_yperiod.py +++ b/plotly/validators/heatmap/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="heatmap", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_yperiod0.py b/plotly/validators/heatmap/_yperiod0.py index 23b3b9f85d..8acd02c443 100644 --- a/plotly/validators/heatmap/_yperiod0.py +++ b/plotly/validators/heatmap/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="heatmap", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), **kwargs, diff --git a/plotly/validators/heatmap/_yperiodalignment.py b/plotly/validators/heatmap/_yperiodalignment.py index 046b687fa3..948a5182f2 100644 --- a/plotly/validators/heatmap/_yperiodalignment.py +++ b/plotly/validators/heatmap/_yperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yperiodalignment", parent_name="heatmap", **kwargs): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"ytype": "scaled"}), values=kwargs.pop("values", ["start", "middle", "end"]), diff --git a/plotly/validators/heatmap/_ysrc.py b/plotly/validators/heatmap/_ysrc.py index ca0e06f9fd..f1a279f43d 100644 --- a/plotly/validators/heatmap/_ysrc.py +++ b/plotly/validators/heatmap/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="heatmap", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_ytype.py b/plotly/validators/heatmap/_ytype.py index eb8724a780..bc2ff890f0 100644 --- a/plotly/validators/heatmap/_ytype.py +++ b/plotly/validators/heatmap/_ytype.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YtypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YtypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ytype", parent_name="heatmap", **kwargs): - super(YtypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["array", "scaled"]), **kwargs, diff --git a/plotly/validators/heatmap/_z.py b/plotly/validators/heatmap/_z.py index 96cf12216a..73b596dfa2 100644 --- a/plotly/validators/heatmap/_z.py +++ b/plotly/validators/heatmap/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="heatmap", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/heatmap/_zauto.py b/plotly/validators/heatmap/_zauto.py index f813e26ec2..afb0ee1df8 100644 --- a/plotly/validators/heatmap/_zauto.py +++ b/plotly/validators/heatmap/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="heatmap", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/heatmap/_zhoverformat.py b/plotly/validators/heatmap/_zhoverformat.py index bec2e7d576..1ad5eb3f21 100644 --- a/plotly/validators/heatmap/_zhoverformat.py +++ b/plotly/validators/heatmap/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="heatmap", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/_zmax.py b/plotly/validators/heatmap/_zmax.py index 3c5f008850..9f7b34de61 100644 --- a/plotly/validators/heatmap/_zmax.py +++ b/plotly/validators/heatmap/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="heatmap", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/heatmap/_zmid.py b/plotly/validators/heatmap/_zmid.py index 8c4d587d7a..7875e6fc21 100644 --- a/plotly/validators/heatmap/_zmid.py +++ b/plotly/validators/heatmap/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="heatmap", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/heatmap/_zmin.py b/plotly/validators/heatmap/_zmin.py index ccf2b54b74..731ffe55b5 100644 --- a/plotly/validators/heatmap/_zmin.py +++ b/plotly/validators/heatmap/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="heatmap", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/heatmap/_zorder.py b/plotly/validators/heatmap/_zorder.py index 5d7073a9d9..cdf9ba4756 100644 --- a/plotly/validators/heatmap/_zorder.py +++ b/plotly/validators/heatmap/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="heatmap", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/heatmap/_zsmooth.py b/plotly/validators/heatmap/_zsmooth.py index 8ddc3870db..57734e3d02 100644 --- a/plotly/validators/heatmap/_zsmooth.py +++ b/plotly/validators/heatmap/_zsmooth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ZsmoothValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="zsmooth", parent_name="heatmap", **kwargs): - super(ZsmoothValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fast", "best", False]), **kwargs, diff --git a/plotly/validators/heatmap/_zsrc.py b/plotly/validators/heatmap/_zsrc.py index a6f8c2076c..56618c13ba 100644 --- a/plotly/validators/heatmap/_zsrc.py +++ b/plotly/validators/heatmap/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="heatmap", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/__init__.py b/plotly/validators/heatmap/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/heatmap/colorbar/__init__.py +++ b/plotly/validators/heatmap/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/heatmap/colorbar/_bgcolor.py b/plotly/validators/heatmap/colorbar/_bgcolor.py index 1a4875e898..4671ade744 100644 --- a/plotly/validators/heatmap/colorbar/_bgcolor.py +++ b/plotly/validators/heatmap/colorbar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="heatmap.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_bordercolor.py b/plotly/validators/heatmap/colorbar/_bordercolor.py index 10cbf7f7dd..f90efa4ba2 100644 --- a/plotly/validators/heatmap/colorbar/_bordercolor.py +++ b/plotly/validators/heatmap/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="heatmap.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_borderwidth.py b/plotly/validators/heatmap/colorbar/_borderwidth.py index 2db34d2622..4e02e005dd 100644 --- a/plotly/validators/heatmap/colorbar/_borderwidth.py +++ b/plotly/validators/heatmap/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="heatmap.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_dtick.py b/plotly/validators/heatmap/colorbar/_dtick.py index 5eeff0d6fa..1e944fde7f 100644 --- a/plotly/validators/heatmap/colorbar/_dtick.py +++ b/plotly/validators/heatmap/colorbar/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="heatmap.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_exponentformat.py b/plotly/validators/heatmap/colorbar/_exponentformat.py index c4a12bd449..394fabbb54 100644 --- a/plotly/validators/heatmap/colorbar/_exponentformat.py +++ b/plotly/validators/heatmap/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="heatmap.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_labelalias.py b/plotly/validators/heatmap/colorbar/_labelalias.py index 24cc4b1b99..d2b79bc35b 100644 --- a/plotly/validators/heatmap/colorbar/_labelalias.py +++ b/plotly/validators/heatmap/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="heatmap.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_len.py b/plotly/validators/heatmap/colorbar/_len.py index b71715bf29..a6478901b0 100644 --- a/plotly/validators/heatmap/colorbar/_len.py +++ b/plotly/validators/heatmap/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="heatmap.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_lenmode.py b/plotly/validators/heatmap/colorbar/_lenmode.py index ee5e4db026..93a88a1c1a 100644 --- a/plotly/validators/heatmap/colorbar/_lenmode.py +++ b/plotly/validators/heatmap/colorbar/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="heatmap.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_minexponent.py b/plotly/validators/heatmap/colorbar/_minexponent.py index 930c56bc1f..dcc2dd214f 100644 --- a/plotly/validators/heatmap/colorbar/_minexponent.py +++ b/plotly/validators/heatmap/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="heatmap.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_nticks.py b/plotly/validators/heatmap/colorbar/_nticks.py index cbe572eb80..7b80c7ebdc 100644 --- a/plotly/validators/heatmap/colorbar/_nticks.py +++ b/plotly/validators/heatmap/colorbar/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="heatmap.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_orientation.py b/plotly/validators/heatmap/colorbar/_orientation.py index 362fe8c79e..92bc4e5a50 100644 --- a/plotly/validators/heatmap/colorbar/_orientation.py +++ b/plotly/validators/heatmap/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="heatmap.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_outlinecolor.py b/plotly/validators/heatmap/colorbar/_outlinecolor.py index d957fc59f9..b5b5450ac9 100644 --- a/plotly/validators/heatmap/colorbar/_outlinecolor.py +++ b/plotly/validators/heatmap/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="heatmap.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_outlinewidth.py b/plotly/validators/heatmap/colorbar/_outlinewidth.py index df12eb21c6..cde076bf5c 100644 --- a/plotly/validators/heatmap/colorbar/_outlinewidth.py +++ b/plotly/validators/heatmap/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="heatmap.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_separatethousands.py b/plotly/validators/heatmap/colorbar/_separatethousands.py index e18b90496f..f0983a2da2 100644 --- a/plotly/validators/heatmap/colorbar/_separatethousands.py +++ b/plotly/validators/heatmap/colorbar/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="heatmap.colorbar", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_showexponent.py b/plotly/validators/heatmap/colorbar/_showexponent.py index 9fa86c3e8a..09995cdba2 100644 --- a/plotly/validators/heatmap/colorbar/_showexponent.py +++ b/plotly/validators/heatmap/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="heatmap.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_showticklabels.py b/plotly/validators/heatmap/colorbar/_showticklabels.py index b0b604abbb..f9d83cff51 100644 --- a/plotly/validators/heatmap/colorbar/_showticklabels.py +++ b/plotly/validators/heatmap/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="heatmap.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_showtickprefix.py b/plotly/validators/heatmap/colorbar/_showtickprefix.py index 4761c74032..13c6621627 100644 --- a/plotly/validators/heatmap/colorbar/_showtickprefix.py +++ b/plotly/validators/heatmap/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="heatmap.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_showticksuffix.py b/plotly/validators/heatmap/colorbar/_showticksuffix.py index 684eb088e3..6c64a5c1ba 100644 --- a/plotly/validators/heatmap/colorbar/_showticksuffix.py +++ b/plotly/validators/heatmap/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="heatmap.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_thickness.py b/plotly/validators/heatmap/colorbar/_thickness.py index 0067804425..801b51ce82 100644 --- a/plotly/validators/heatmap/colorbar/_thickness.py +++ b/plotly/validators/heatmap/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="heatmap.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_thicknessmode.py b/plotly/validators/heatmap/colorbar/_thicknessmode.py index 4668f2de33..281c505966 100644 --- a/plotly/validators/heatmap/colorbar/_thicknessmode.py +++ b/plotly/validators/heatmap/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="heatmap.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_tick0.py b/plotly/validators/heatmap/colorbar/_tick0.py index 694c6f1dc3..bc078201b0 100644 --- a/plotly/validators/heatmap/colorbar/_tick0.py +++ b/plotly/validators/heatmap/colorbar/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="heatmap.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_tickangle.py b/plotly/validators/heatmap/colorbar/_tickangle.py index bf64969740..f4a27b0c52 100644 --- a/plotly/validators/heatmap/colorbar/_tickangle.py +++ b/plotly/validators/heatmap/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="heatmap.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_tickcolor.py b/plotly/validators/heatmap/colorbar/_tickcolor.py index fa6df4f9da..e53be67160 100644 --- a/plotly/validators/heatmap/colorbar/_tickcolor.py +++ b/plotly/validators/heatmap/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="heatmap.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_tickfont.py b/plotly/validators/heatmap/colorbar/_tickfont.py index 13c463f581..af2633bbcd 100644 --- a/plotly/validators/heatmap/colorbar/_tickfont.py +++ b/plotly/validators/heatmap/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="heatmap.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_tickformat.py b/plotly/validators/heatmap/colorbar/_tickformat.py index a572930300..2f7692e1cc 100644 --- a/plotly/validators/heatmap/colorbar/_tickformat.py +++ b/plotly/validators/heatmap/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="heatmap.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py b/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py index 498bb058a9..454c061ac5 100644 --- a/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/heatmap/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="heatmap.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/heatmap/colorbar/_tickformatstops.py b/plotly/validators/heatmap/colorbar/_tickformatstops.py index 69fce097d9..40f61ae67b 100644 --- a/plotly/validators/heatmap/colorbar/_tickformatstops.py +++ b/plotly/validators/heatmap/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="heatmap.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_ticklabeloverflow.py b/plotly/validators/heatmap/colorbar/_ticklabeloverflow.py index b91bdcfd31..b9637fa85d 100644 --- a/plotly/validators/heatmap/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/heatmap/colorbar/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="heatmap.colorbar", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_ticklabelposition.py b/plotly/validators/heatmap/colorbar/_ticklabelposition.py index cd8459256c..1594055b8d 100644 --- a/plotly/validators/heatmap/colorbar/_ticklabelposition.py +++ b/plotly/validators/heatmap/colorbar/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="heatmap.colorbar", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/colorbar/_ticklabelstep.py b/plotly/validators/heatmap/colorbar/_ticklabelstep.py index d7aea9e48f..6a363b8db9 100644 --- a/plotly/validators/heatmap/colorbar/_ticklabelstep.py +++ b/plotly/validators/heatmap/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="heatmap.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_ticklen.py b/plotly/validators/heatmap/colorbar/_ticklen.py index 289ce89008..1670bdb676 100644 --- a/plotly/validators/heatmap/colorbar/_ticklen.py +++ b/plotly/validators/heatmap/colorbar/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="heatmap.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_tickmode.py b/plotly/validators/heatmap/colorbar/_tickmode.py index cb6e9034eb..645a7f4f50 100644 --- a/plotly/validators/heatmap/colorbar/_tickmode.py +++ b/plotly/validators/heatmap/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="heatmap.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/heatmap/colorbar/_tickprefix.py b/plotly/validators/heatmap/colorbar/_tickprefix.py index 8899abd5c5..882831f1b8 100644 --- a/plotly/validators/heatmap/colorbar/_tickprefix.py +++ b/plotly/validators/heatmap/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="heatmap.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_ticks.py b/plotly/validators/heatmap/colorbar/_ticks.py index 42ae13ee9f..9d686ceb36 100644 --- a/plotly/validators/heatmap/colorbar/_ticks.py +++ b/plotly/validators/heatmap/colorbar/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="heatmap.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_ticksuffix.py b/plotly/validators/heatmap/colorbar/_ticksuffix.py index 7c57e9e6d3..640ba5df5e 100644 --- a/plotly/validators/heatmap/colorbar/_ticksuffix.py +++ b/plotly/validators/heatmap/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="heatmap.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_ticktext.py b/plotly/validators/heatmap/colorbar/_ticktext.py index 95b7c4a783..95ec0d73c8 100644 --- a/plotly/validators/heatmap/colorbar/_ticktext.py +++ b/plotly/validators/heatmap/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="heatmap.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_ticktextsrc.py b/plotly/validators/heatmap/colorbar/_ticktextsrc.py index 9e32ce793c..7378318db7 100644 --- a/plotly/validators/heatmap/colorbar/_ticktextsrc.py +++ b/plotly/validators/heatmap/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="heatmap.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_tickvals.py b/plotly/validators/heatmap/colorbar/_tickvals.py index ea1c42223b..178287bd14 100644 --- a/plotly/validators/heatmap/colorbar/_tickvals.py +++ b/plotly/validators/heatmap/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="heatmap.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_tickvalssrc.py b/plotly/validators/heatmap/colorbar/_tickvalssrc.py index d16a4ebf15..566902e854 100644 --- a/plotly/validators/heatmap/colorbar/_tickvalssrc.py +++ b/plotly/validators/heatmap/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="heatmap.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_tickwidth.py b/plotly/validators/heatmap/colorbar/_tickwidth.py index 00ec752d89..602112cc7a 100644 --- a/plotly/validators/heatmap/colorbar/_tickwidth.py +++ b/plotly/validators/heatmap/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="heatmap.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_title.py b/plotly/validators/heatmap/colorbar/_title.py index 0b21692cb2..95eb9108ec 100644 --- a/plotly/validators/heatmap/colorbar/_title.py +++ b/plotly/validators/heatmap/colorbar/_title.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="heatmap.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_x.py b/plotly/validators/heatmap/colorbar/_x.py index f2c9b03706..446d0dc308 100644 --- a/plotly/validators/heatmap/colorbar/_x.py +++ b/plotly/validators/heatmap/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="heatmap.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_xanchor.py b/plotly/validators/heatmap/colorbar/_xanchor.py index 127194a4de..b16a0676d3 100644 --- a/plotly/validators/heatmap/colorbar/_xanchor.py +++ b/plotly/validators/heatmap/colorbar/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="heatmap.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_xpad.py b/plotly/validators/heatmap/colorbar/_xpad.py index 55289d4726..7196a1a314 100644 --- a/plotly/validators/heatmap/colorbar/_xpad.py +++ b/plotly/validators/heatmap/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="heatmap.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_xref.py b/plotly/validators/heatmap/colorbar/_xref.py index 64f9e6079b..df4daabcb5 100644 --- a/plotly/validators/heatmap/colorbar/_xref.py +++ b/plotly/validators/heatmap/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="heatmap.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_y.py b/plotly/validators/heatmap/colorbar/_y.py index 673d41178c..0d2950c94b 100644 --- a/plotly/validators/heatmap/colorbar/_y.py +++ b/plotly/validators/heatmap/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="heatmap.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/_yanchor.py b/plotly/validators/heatmap/colorbar/_yanchor.py index de0c351cbc..34c8001ebe 100644 --- a/plotly/validators/heatmap/colorbar/_yanchor.py +++ b/plotly/validators/heatmap/colorbar/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="heatmap.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_ypad.py b/plotly/validators/heatmap/colorbar/_ypad.py index b2296fbbbe..e1ff5af2ca 100644 --- a/plotly/validators/heatmap/colorbar/_ypad.py +++ b/plotly/validators/heatmap/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="heatmap.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/_yref.py b/plotly/validators/heatmap/colorbar/_yref.py index 85b51bd7db..1a68e625d3 100644 --- a/plotly/validators/heatmap/colorbar/_yref.py +++ b/plotly/validators/heatmap/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="heatmap.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/tickfont/__init__.py b/plotly/validators/heatmap/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/__init__.py +++ b/plotly/validators/heatmap/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/heatmap/colorbar/tickfont/_color.py b/plotly/validators/heatmap/colorbar/tickfont/_color.py index 642169224b..a9b30838b8 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_color.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/tickfont/_family.py b/plotly/validators/heatmap/colorbar/tickfont/_family.py index 594fc7b5e7..d23efa5155 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_family.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/heatmap/colorbar/tickfont/_lineposition.py b/plotly/validators/heatmap/colorbar/tickfont/_lineposition.py index e8b801a4b7..df1ef56192 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="heatmap.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/heatmap/colorbar/tickfont/_shadow.py b/plotly/validators/heatmap/colorbar/tickfont/_shadow.py index 21173688ab..adad47fb7e 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_shadow.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/tickfont/_size.py b/plotly/validators/heatmap/colorbar/tickfont/_size.py index e23dac1c18..d48c875a7f 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_size.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/tickfont/_style.py b/plotly/validators/heatmap/colorbar/tickfont/_style.py index d502ab5499..e7d2648a3c 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_style.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/tickfont/_textcase.py b/plotly/validators/heatmap/colorbar/tickfont/_textcase.py index a5bc61581e..f0e8e1d45a 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_textcase.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/tickfont/_variant.py b/plotly/validators/heatmap/colorbar/tickfont/_variant.py index 05697d9ad5..83da533996 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_variant.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/colorbar/tickfont/_weight.py b/plotly/validators/heatmap/colorbar/tickfont/_weight.py index a8a92b7f1c..477f2bbadf 100644 --- a/plotly/validators/heatmap/colorbar/tickfont/_weight.py +++ b/plotly/validators/heatmap/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="heatmap.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py b/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/heatmap/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py index 053d1fbd0a..0f0311e853 100644 --- a/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/heatmap/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="heatmap.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py b/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py index efc8fa2efc..00742f437d 100644 --- a/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/heatmap/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="heatmap.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/tickformatstop/_name.py b/plotly/validators/heatmap/colorbar/tickformatstop/_name.py index 28aa5f798b..2c0401bdab 100644 --- a/plotly/validators/heatmap/colorbar/tickformatstop/_name.py +++ b/plotly/validators/heatmap/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="heatmap.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py index 7778d8636a..0f5529704f 100644 --- a/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/heatmap/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="heatmap.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/tickformatstop/_value.py b/plotly/validators/heatmap/colorbar/tickformatstop/_value.py index 2f8d10168b..26640b07e3 100644 --- a/plotly/validators/heatmap/colorbar/tickformatstop/_value.py +++ b/plotly/validators/heatmap/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="heatmap.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/title/__init__.py b/plotly/validators/heatmap/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/heatmap/colorbar/title/__init__.py +++ b/plotly/validators/heatmap/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/heatmap/colorbar/title/_font.py b/plotly/validators/heatmap/colorbar/title/_font.py index cd0bd44fb2..81ba921969 100644 --- a/plotly/validators/heatmap/colorbar/title/_font.py +++ b/plotly/validators/heatmap/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="heatmap.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/title/_side.py b/plotly/validators/heatmap/colorbar/title/_side.py index bb83bb8ab1..7bee7a4a4c 100644 --- a/plotly/validators/heatmap/colorbar/title/_side.py +++ b/plotly/validators/heatmap/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="heatmap.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/title/_text.py b/plotly/validators/heatmap/colorbar/title/_text.py index afabbf89a2..6dbd96eece 100644 --- a/plotly/validators/heatmap/colorbar/title/_text.py +++ b/plotly/validators/heatmap/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="heatmap.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/title/font/__init__.py b/plotly/validators/heatmap/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/heatmap/colorbar/title/font/__init__.py +++ b/plotly/validators/heatmap/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/heatmap/colorbar/title/font/_color.py b/plotly/validators/heatmap/colorbar/title/font/_color.py index 119469fb4c..56e5fa2521 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_color.py +++ b/plotly/validators/heatmap/colorbar/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/title/font/_family.py b/plotly/validators/heatmap/colorbar/title/font/_family.py index 77d065df68..47f0c33abc 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_family.py +++ b/plotly/validators/heatmap/colorbar/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/heatmap/colorbar/title/font/_lineposition.py b/plotly/validators/heatmap/colorbar/title/font/_lineposition.py index 955e17dda0..f7ef9e6b66 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_lineposition.py +++ b/plotly/validators/heatmap/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="heatmap.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/heatmap/colorbar/title/font/_shadow.py b/plotly/validators/heatmap/colorbar/title/font/_shadow.py index 438242738b..270482164a 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_shadow.py +++ b/plotly/validators/heatmap/colorbar/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/heatmap/colorbar/title/font/_size.py b/plotly/validators/heatmap/colorbar/title/font/_size.py index 10ab76a60f..89d3adeae1 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_size.py +++ b/plotly/validators/heatmap/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/title/font/_style.py b/plotly/validators/heatmap/colorbar/title/font/_style.py index b145300e11..d36fdad2fa 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_style.py +++ b/plotly/validators/heatmap/colorbar/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/title/font/_textcase.py b/plotly/validators/heatmap/colorbar/title/font/_textcase.py index 9338458da2..b897703350 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_textcase.py +++ b/plotly/validators/heatmap/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="heatmap.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/heatmap/colorbar/title/font/_variant.py b/plotly/validators/heatmap/colorbar/title/font/_variant.py index 107ada4548..0ba1527e2f 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_variant.py +++ b/plotly/validators/heatmap/colorbar/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/colorbar/title/font/_weight.py b/plotly/validators/heatmap/colorbar/title/font/_weight.py index c1c204c943..f356e541cf 100644 --- a/plotly/validators/heatmap/colorbar/title/font/_weight.py +++ b/plotly/validators/heatmap/colorbar/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="heatmap.colorbar.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/heatmap/hoverlabel/__init__.py b/plotly/validators/heatmap/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/heatmap/hoverlabel/__init__.py +++ b/plotly/validators/heatmap/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/heatmap/hoverlabel/_align.py b/plotly/validators/heatmap/hoverlabel/_align.py index 28d9abcb1b..28be96d6c4 100644 --- a/plotly/validators/heatmap/hoverlabel/_align.py +++ b/plotly/validators/heatmap/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="heatmap.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/heatmap/hoverlabel/_alignsrc.py b/plotly/validators/heatmap/hoverlabel/_alignsrc.py index 24a81636ea..2b784f8caf 100644 --- a/plotly/validators/heatmap/hoverlabel/_alignsrc.py +++ b/plotly/validators/heatmap/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="heatmap.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/_bgcolor.py b/plotly/validators/heatmap/hoverlabel/_bgcolor.py index c2d4ec23e2..4891392f76 100644 --- a/plotly/validators/heatmap/hoverlabel/_bgcolor.py +++ b/plotly/validators/heatmap/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="heatmap.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py b/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py index 016aec1f5d..9afdbd597e 100644 --- a/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/heatmap/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="heatmap.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/_bordercolor.py b/plotly/validators/heatmap/hoverlabel/_bordercolor.py index 3b383b9d26..5b3e9d6525 100644 --- a/plotly/validators/heatmap/hoverlabel/_bordercolor.py +++ b/plotly/validators/heatmap/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="heatmap.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py b/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py index 01a7fd4353..c4153d57f9 100644 --- a/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/heatmap/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="heatmap.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/_font.py b/plotly/validators/heatmap/hoverlabel/_font.py index a064b50033..ae5caa8d73 100644 --- a/plotly/validators/heatmap/hoverlabel/_font.py +++ b/plotly/validators/heatmap/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="heatmap.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/heatmap/hoverlabel/_namelength.py b/plotly/validators/heatmap/hoverlabel/_namelength.py index 193c8a215f..ce13b1b4a2 100644 --- a/plotly/validators/heatmap/hoverlabel/_namelength.py +++ b/plotly/validators/heatmap/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="heatmap.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py b/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py index d148b3a006..78a9c6f7af 100644 --- a/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/heatmap/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="heatmap.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/__init__.py b/plotly/validators/heatmap/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/heatmap/hoverlabel/font/__init__.py +++ b/plotly/validators/heatmap/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/heatmap/hoverlabel/font/_color.py b/plotly/validators/heatmap/hoverlabel/font/_color.py index 1a12954971..09ced8ec15 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_color.py +++ b/plotly/validators/heatmap/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py b/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py index c2c353777c..a6cb3b9bca 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_family.py b/plotly/validators/heatmap/hoverlabel/font/_family.py index 907171acbb..2d5f59b99c 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_family.py +++ b/plotly/validators/heatmap/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/heatmap/hoverlabel/font/_familysrc.py b/plotly/validators/heatmap/hoverlabel/font/_familysrc.py index 9e2744b00e..0a625e34c5 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_familysrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_lineposition.py b/plotly/validators/heatmap/hoverlabel/font/_lineposition.py index cf24fd5495..b79db7a610 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_lineposition.py +++ b/plotly/validators/heatmap/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="heatmap.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/heatmap/hoverlabel/font/_linepositionsrc.py b/plotly/validators/heatmap/hoverlabel/font/_linepositionsrc.py index 79d4b6e938..5299fe5309 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="heatmap.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_shadow.py b/plotly/validators/heatmap/hoverlabel/font/_shadow.py index 597bf9fa5b..0891946390 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_shadow.py +++ b/plotly/validators/heatmap/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/heatmap/hoverlabel/font/_shadowsrc.py b/plotly/validators/heatmap/hoverlabel/font/_shadowsrc.py index 6f666c8c73..2f79af2332 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_size.py b/plotly/validators/heatmap/hoverlabel/font/_size.py index dab25c2ba1..8379f239bc 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_size.py +++ b/plotly/validators/heatmap/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py b/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py index 0c5b97149a..a6fcc77d20 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_style.py b/plotly/validators/heatmap/hoverlabel/font/_style.py index 0ba2cb95b7..782714cf1d 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_style.py +++ b/plotly/validators/heatmap/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/heatmap/hoverlabel/font/_stylesrc.py b/plotly/validators/heatmap/hoverlabel/font/_stylesrc.py index beaa465b72..1383ed0f3b 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_textcase.py b/plotly/validators/heatmap/hoverlabel/font/_textcase.py index b774dc7da6..30748089ad 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_textcase.py +++ b/plotly/validators/heatmap/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/heatmap/hoverlabel/font/_textcasesrc.py b/plotly/validators/heatmap/hoverlabel/font/_textcasesrc.py index 41f253aaad..ee7c9fcd31 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_variant.py b/plotly/validators/heatmap/hoverlabel/font/_variant.py index 344321a2be..67a4901b66 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_variant.py +++ b/plotly/validators/heatmap/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/heatmap/hoverlabel/font/_variantsrc.py b/plotly/validators/heatmap/hoverlabel/font/_variantsrc.py index 6d3321a0e8..3b7454191a 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/hoverlabel/font/_weight.py b/plotly/validators/heatmap/hoverlabel/font/_weight.py index 8b29932a39..0f9f2143af 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_weight.py +++ b/plotly/validators/heatmap/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/heatmap/hoverlabel/font/_weightsrc.py b/plotly/validators/heatmap/hoverlabel/font/_weightsrc.py index 09f4179834..6342c282b7 100644 --- a/plotly/validators/heatmap/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/heatmap/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="heatmap.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/heatmap/legendgrouptitle/__init__.py b/plotly/validators/heatmap/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/heatmap/legendgrouptitle/__init__.py +++ b/plotly/validators/heatmap/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/heatmap/legendgrouptitle/_font.py b/plotly/validators/heatmap/legendgrouptitle/_font.py index 2b37aedda3..79afc680f8 100644 --- a/plotly/validators/heatmap/legendgrouptitle/_font.py +++ b/plotly/validators/heatmap/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="heatmap.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/heatmap/legendgrouptitle/_text.py b/plotly/validators/heatmap/legendgrouptitle/_text.py index dc447df7e8..10d91b8c90 100644 --- a/plotly/validators/heatmap/legendgrouptitle/_text.py +++ b/plotly/validators/heatmap/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="heatmap.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/legendgrouptitle/font/__init__.py b/plotly/validators/heatmap/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/__init__.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_color.py b/plotly/validators/heatmap/legendgrouptitle/font/_color.py index 992adc73b1..a4a6aa51b4 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_color.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="heatmap.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_family.py b/plotly/validators/heatmap/legendgrouptitle/font/_family.py index f0c10a5c55..8eda167091 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_family.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_lineposition.py b/plotly/validators/heatmap/legendgrouptitle/font/_lineposition.py index d4f13671a8..4989c785f4 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_shadow.py b/plotly/validators/heatmap/legendgrouptitle/font/_shadow.py index 49fa2063d1..937a451957 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_size.py b/plotly/validators/heatmap/legendgrouptitle/font/_size.py index 70b659bc1a..f31744972e 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_size.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="heatmap.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_style.py b/plotly/validators/heatmap/legendgrouptitle/font/_style.py index 5e0a310d61..d9e5febb94 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_style.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="heatmap.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_textcase.py b/plotly/validators/heatmap/legendgrouptitle/font/_textcase.py index 9733a530e7..262b0ff32a 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_variant.py b/plotly/validators/heatmap/legendgrouptitle/font/_variant.py index fadd24a102..6988487f24 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_variant.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/legendgrouptitle/font/_weight.py b/plotly/validators/heatmap/legendgrouptitle/font/_weight.py index 2009543af4..56143410c1 100644 --- a/plotly/validators/heatmap/legendgrouptitle/font/_weight.py +++ b/plotly/validators/heatmap/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="heatmap.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/heatmap/stream/__init__.py b/plotly/validators/heatmap/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/heatmap/stream/__init__.py +++ b/plotly/validators/heatmap/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/heatmap/stream/_maxpoints.py b/plotly/validators/heatmap/stream/_maxpoints.py index c5fa4e0d85..6c53171f7a 100644 --- a/plotly/validators/heatmap/stream/_maxpoints.py +++ b/plotly/validators/heatmap/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="heatmap.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/heatmap/stream/_token.py b/plotly/validators/heatmap/stream/_token.py index fb250b61f5..c589a8cd89 100644 --- a/plotly/validators/heatmap/stream/_token.py +++ b/plotly/validators/heatmap/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="heatmap.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/heatmap/textfont/__init__.py b/plotly/validators/heatmap/textfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/heatmap/textfont/__init__.py +++ b/plotly/validators/heatmap/textfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/heatmap/textfont/_color.py b/plotly/validators/heatmap/textfont/_color.py index 0b08a548a0..09381da985 100644 --- a/plotly/validators/heatmap/textfont/_color.py +++ b/plotly/validators/heatmap/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="heatmap.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/heatmap/textfont/_family.py b/plotly/validators/heatmap/textfont/_family.py index 09e7ca6bbd..2e7b45a329 100644 --- a/plotly/validators/heatmap/textfont/_family.py +++ b/plotly/validators/heatmap/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="heatmap.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/heatmap/textfont/_lineposition.py b/plotly/validators/heatmap/textfont/_lineposition.py index 384062e837..c7ee259e28 100644 --- a/plotly/validators/heatmap/textfont/_lineposition.py +++ b/plotly/validators/heatmap/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="heatmap.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/heatmap/textfont/_shadow.py b/plotly/validators/heatmap/textfont/_shadow.py index 0b9014fa2d..54f3756417 100644 --- a/plotly/validators/heatmap/textfont/_shadow.py +++ b/plotly/validators/heatmap/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="heatmap.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/heatmap/textfont/_size.py b/plotly/validators/heatmap/textfont/_size.py index b3612f44c7..273ff78085 100644 --- a/plotly/validators/heatmap/textfont/_size.py +++ b/plotly/validators/heatmap/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="heatmap.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/heatmap/textfont/_style.py b/plotly/validators/heatmap/textfont/_style.py index 7dda60a6e3..64e7bc8fb5 100644 --- a/plotly/validators/heatmap/textfont/_style.py +++ b/plotly/validators/heatmap/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="heatmap.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/heatmap/textfont/_textcase.py b/plotly/validators/heatmap/textfont/_textcase.py index 006b8c3354..87c4c4293d 100644 --- a/plotly/validators/heatmap/textfont/_textcase.py +++ b/plotly/validators/heatmap/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="heatmap.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/heatmap/textfont/_variant.py b/plotly/validators/heatmap/textfont/_variant.py index d1597573a9..c093674856 100644 --- a/plotly/validators/heatmap/textfont/_variant.py +++ b/plotly/validators/heatmap/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="heatmap.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/heatmap/textfont/_weight.py b/plotly/validators/heatmap/textfont/_weight.py index e37fc18d8e..118babe895 100644 --- a/plotly/validators/heatmap/textfont/_weight.py +++ b/plotly/validators/heatmap/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="heatmap.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/__init__.py b/plotly/validators/histogram/__init__.py index 7ed88f70d8..2e64a1d30d 100644 --- a/plotly/validators/histogram/__init__.py +++ b/plotly/validators/histogram/__init__.py @@ -1,145 +1,75 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._ybins import YbinsValidator - from ._yaxis import YaxisValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xbins import XbinsValidator - from ._xaxis import XaxisValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetgroup import OffsetgroupValidator - from ._nbinsy import NbinsyValidator - from ._nbinsx import NbinsxValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._insidetextfont import InsidetextfontValidator - from ._insidetextanchor import InsidetextanchorValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._histnorm import HistnormValidator - from ._histfunc import HistfuncValidator - from ._error_y import Error_YValidator - from ._error_x import Error_XValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._cumulative import CumulativeValidator - from ._constraintext import ConstraintextValidator - from ._cliponaxis import CliponaxisValidator - from ._bingroup import BingroupValidator - from ._autobiny import AutobinyValidator - from ._autobinx import AutobinxValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._ybins.YbinsValidator", - "._yaxis.YaxisValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xbins.XbinsValidator", - "._xaxis.XaxisValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetgroup.OffsetgroupValidator", - "._nbinsy.NbinsyValidator", - "._nbinsx.NbinsxValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._insidetextfont.InsidetextfontValidator", - "._insidetextanchor.InsidetextanchorValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._histnorm.HistnormValidator", - "._histfunc.HistfuncValidator", - "._error_y.Error_YValidator", - "._error_x.Error_XValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._cumulative.CumulativeValidator", - "._constraintext.ConstraintextValidator", - "._cliponaxis.CliponaxisValidator", - "._bingroup.BingroupValidator", - "._autobiny.AutobinyValidator", - "._autobinx.AutobinxValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._ybins.YbinsValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xbins.XbinsValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._nbinsy.NbinsyValidator", + "._nbinsx.NbinsxValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._histnorm.HistnormValidator", + "._histfunc.HistfuncValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._cumulative.CumulativeValidator", + "._constraintext.ConstraintextValidator", + "._cliponaxis.CliponaxisValidator", + "._bingroup.BingroupValidator", + "._autobiny.AutobinyValidator", + "._autobinx.AutobinxValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/histogram/_alignmentgroup.py b/plotly/validators/histogram/_alignmentgroup.py index 27c4eb8a45..8ee9b39ded 100644 --- a/plotly/validators/histogram/_alignmentgroup.py +++ b/plotly/validators/histogram/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="histogram", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_autobinx.py b/plotly/validators/histogram/_autobinx.py index 11088efda4..ff9aa49f25 100644 --- a/plotly/validators/histogram/_autobinx.py +++ b/plotly/validators/histogram/_autobinx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutobinxValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autobinx", parent_name="histogram", **kwargs): - super(AutobinxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_autobiny.py b/plotly/validators/histogram/_autobiny.py index 7778974909..85feb2b8f2 100644 --- a/plotly/validators/histogram/_autobiny.py +++ b/plotly/validators/histogram/_autobiny.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutobinyValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autobiny", parent_name="histogram", **kwargs): - super(AutobinyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_bingroup.py b/plotly/validators/histogram/_bingroup.py index ee6441560a..3eb2ddc34f 100644 --- a/plotly/validators/histogram/_bingroup.py +++ b/plotly/validators/histogram/_bingroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BingroupValidator(_plotly_utils.basevalidators.StringValidator): +class BingroupValidator(_bv.StringValidator): def __init__(self, plotly_name="bingroup", parent_name="histogram", **kwargs): - super(BingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_cliponaxis.py b/plotly/validators/histogram/_cliponaxis.py index e55fcfebf5..517ef9274f 100644 --- a/plotly/validators/histogram/_cliponaxis.py +++ b/plotly/validators/histogram/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="histogram", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/_constraintext.py b/plotly/validators/histogram/_constraintext.py index eb2230657b..c72af0b6b1 100644 --- a/plotly/validators/histogram/_constraintext.py +++ b/plotly/validators/histogram/_constraintext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstraintextValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="constraintext", parent_name="histogram", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "both", "none"]), **kwargs, diff --git a/plotly/validators/histogram/_cumulative.py b/plotly/validators/histogram/_cumulative.py index c115a5eb37..b9cf913ed5 100644 --- a/plotly/validators/histogram/_cumulative.py +++ b/plotly/validators/histogram/_cumulative.py @@ -1,41 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CumulativeValidator(_plotly_utils.basevalidators.CompoundValidator): +class CumulativeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="cumulative", parent_name="histogram", **kwargs): - super(CumulativeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Cumulative"), data_docs=kwargs.pop( "data_docs", """ - currentbin - Only applies if cumulative is enabled. Sets - whether the current bin is included, excluded, - or has half of its value included in the - current cumulative value. "include" is the - default for compatibility with various other - tools, however it introduces a half-bin bias to - the results. "exclude" makes the opposite half- - bin bias, and "half" removes it. - direction - Only applies if cumulative is enabled. If - "increasing" (default) we sum all prior bins, - so the result increases from left to right. If - "decreasing" we sum later bins so the result - decreases from left to right. - enabled - If true, display the cumulative distribution by - summing the binned values. Use the `direction` - and `centralbin` attributes to tune the - accumulation method. Note: in this mode, the - "density" `histnorm` settings behave the same - as their equivalents without "density": "" and - "density" both rise to the number of data - points, and "probability" and *probability - density* both rise to the number of sample - points. """, ), **kwargs, diff --git a/plotly/validators/histogram/_customdata.py b/plotly/validators/histogram/_customdata.py index 9485d6adce..2ff9190b41 100644 --- a/plotly/validators/histogram/_customdata.py +++ b/plotly/validators/histogram/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="histogram", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_customdatasrc.py b/plotly/validators/histogram/_customdatasrc.py index acda4a0253..e9b8a78eb6 100644 --- a/plotly/validators/histogram/_customdatasrc.py +++ b/plotly/validators/histogram/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="histogram", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_error_x.py b/plotly/validators/histogram/_error_x.py index d5644cc252..375ebf3a50 100644 --- a/plotly/validators/histogram/_error_x.py +++ b/plotly/validators/histogram/_error_x.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_x", parent_name="histogram", **kwargs): - super(Error_XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorX"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/histogram/_error_y.py b/plotly/validators/histogram/_error_y.py index 2d9da02b40..08c49991d1 100644 --- a/plotly/validators/histogram/_error_y.py +++ b/plotly/validators/histogram/_error_y.py @@ -1,70 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_y", parent_name="histogram", **kwargs): - super(Error_YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorY"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/histogram/_histfunc.py b/plotly/validators/histogram/_histfunc.py index 66a299b01b..aa6eff24ac 100644 --- a/plotly/validators/histogram/_histfunc.py +++ b/plotly/validators/histogram/_histfunc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HistfuncValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="histfunc", parent_name="histogram", **kwargs): - super(HistfuncValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), **kwargs, diff --git a/plotly/validators/histogram/_histnorm.py b/plotly/validators/histogram/_histnorm.py index 99a876d118..ab9c984e93 100644 --- a/plotly/validators/histogram/_histnorm.py +++ b/plotly/validators/histogram/_histnorm.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HistnormValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="histnorm", parent_name="histogram", **kwargs): - super(HistnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/_hoverinfo.py b/plotly/validators/histogram/_hoverinfo.py index 232193161c..170286a0f2 100644 --- a/plotly/validators/histogram/_hoverinfo.py +++ b/plotly/validators/histogram/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="histogram", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/histogram/_hoverinfosrc.py b/plotly/validators/histogram/_hoverinfosrc.py index 184fd7f8de..a617d9ed15 100644 --- a/plotly/validators/histogram/_hoverinfosrc.py +++ b/plotly/validators/histogram/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="histogram", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_hoverlabel.py b/plotly/validators/histogram/_hoverlabel.py index a22b12d2d4..d421ff0b30 100644 --- a/plotly/validators/histogram/_hoverlabel.py +++ b/plotly/validators/histogram/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="histogram", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/histogram/_hovertemplate.py b/plotly/validators/histogram/_hovertemplate.py index 0b96a0d866..db29ad5d5e 100644 --- a/plotly/validators/histogram/_hovertemplate.py +++ b/plotly/validators/histogram/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="histogram", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram/_hovertemplatesrc.py b/plotly/validators/histogram/_hovertemplatesrc.py index 1d9b17b812..7691d0295d 100644 --- a/plotly/validators/histogram/_hovertemplatesrc.py +++ b/plotly/validators/histogram/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="histogram", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_hovertext.py b/plotly/validators/histogram/_hovertext.py index b037f8a28c..a056467b7f 100644 --- a/plotly/validators/histogram/_hovertext.py +++ b/plotly/validators/histogram/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="histogram", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/histogram/_hovertextsrc.py b/plotly/validators/histogram/_hovertextsrc.py index fb62a1d5f1..415fcf2921 100644 --- a/plotly/validators/histogram/_hovertextsrc.py +++ b/plotly/validators/histogram/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="histogram", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_ids.py b/plotly/validators/histogram/_ids.py index a42a6f7466..5a20a7226d 100644 --- a/plotly/validators/histogram/_ids.py +++ b/plotly/validators/histogram/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="histogram", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_idssrc.py b/plotly/validators/histogram/_idssrc.py index df4507bc28..1536860d44 100644 --- a/plotly/validators/histogram/_idssrc.py +++ b/plotly/validators/histogram/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="histogram", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_insidetextanchor.py b/plotly/validators/histogram/_insidetextanchor.py index 5cb6886b1a..2f79ef8607 100644 --- a/plotly/validators/histogram/_insidetextanchor.py +++ b/plotly/validators/histogram/_insidetextanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class InsidetextanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="insidetextanchor", parent_name="histogram", **kwargs ): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["end", "middle", "start"]), **kwargs, diff --git a/plotly/validators/histogram/_insidetextfont.py b/plotly/validators/histogram/_insidetextfont.py index d04addde11..9f5b6e7d33 100644 --- a/plotly/validators/histogram/_insidetextfont.py +++ b/plotly/validators/histogram/_insidetextfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="histogram", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram/_legend.py b/plotly/validators/histogram/_legend.py index 557cfa633d..8b669f7071 100644 --- a/plotly/validators/histogram/_legend.py +++ b/plotly/validators/histogram/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="histogram", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/histogram/_legendgroup.py b/plotly/validators/histogram/_legendgroup.py index 314071039d..d9c2773f9b 100644 --- a/plotly/validators/histogram/_legendgroup.py +++ b/plotly/validators/histogram/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="histogram", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/_legendgrouptitle.py b/plotly/validators/histogram/_legendgrouptitle.py index bf61a8fa45..7e6edc140b 100644 --- a/plotly/validators/histogram/_legendgrouptitle.py +++ b/plotly/validators/histogram/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="histogram", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/histogram/_legendrank.py b/plotly/validators/histogram/_legendrank.py index adb41669c2..5690c853a0 100644 --- a/plotly/validators/histogram/_legendrank.py +++ b/plotly/validators/histogram/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="histogram", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/_legendwidth.py b/plotly/validators/histogram/_legendwidth.py index 16086cd84f..800ed7c56d 100644 --- a/plotly/validators/histogram/_legendwidth.py +++ b/plotly/validators/histogram/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="histogram", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/_marker.py b/plotly/validators/histogram/_marker.py index ac66136354..73a7bfe7d9 100644 --- a/plotly/validators/histogram/_marker.py +++ b/plotly/validators/histogram/_marker.py @@ -1,120 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="histogram", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.histogram.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - cornerradius - Sets the rounding of corners. May be an integer - number of pixels, or a percentage of bar width - (as a string ending in %). Defaults to - `layout.barcornerradius`. In stack or relative - barmode, the first trace to set cornerradius is - used for the whole stack. - line - :class:`plotly.graph_objects.histogram.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the opacity of the bars. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/histogram/_meta.py b/plotly/validators/histogram/_meta.py index f9c05de61b..db6aa388d7 100644 --- a/plotly/validators/histogram/_meta.py +++ b/plotly/validators/histogram/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="histogram", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/histogram/_metasrc.py b/plotly/validators/histogram/_metasrc.py index d0836bc0cf..c8425a094e 100644 --- a/plotly/validators/histogram/_metasrc.py +++ b/plotly/validators/histogram/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="histogram", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_name.py b/plotly/validators/histogram/_name.py index be3f53a874..7fa7b11db9 100644 --- a/plotly/validators/histogram/_name.py +++ b/plotly/validators/histogram/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="histogram", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/_nbinsx.py b/plotly/validators/histogram/_nbinsx.py index 45ce6fcd4b..20b24cce56 100644 --- a/plotly/validators/histogram/_nbinsx.py +++ b/plotly/validators/histogram/_nbinsx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): +class NbinsxValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nbinsx", parent_name="histogram", **kwargs): - super(NbinsxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/_nbinsy.py b/plotly/validators/histogram/_nbinsy.py index 96084ac0ba..3ed3b0b431 100644 --- a/plotly/validators/histogram/_nbinsy.py +++ b/plotly/validators/histogram/_nbinsy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): +class NbinsyValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nbinsy", parent_name="histogram", **kwargs): - super(NbinsyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/_offsetgroup.py b/plotly/validators/histogram/_offsetgroup.py index 2c7b971a76..8827395703 100644 --- a/plotly/validators/histogram/_offsetgroup.py +++ b/plotly/validators/histogram/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="histogram", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_opacity.py b/plotly/validators/histogram/_opacity.py index 9934131e2f..b7b352ef13 100644 --- a/plotly/validators/histogram/_opacity.py +++ b/plotly/validators/histogram/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="histogram", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/_orientation.py b/plotly/validators/histogram/_orientation.py index 1920c67548..b12a67db3a 100644 --- a/plotly/validators/histogram/_orientation.py +++ b/plotly/validators/histogram/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="histogram", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/histogram/_outsidetextfont.py b/plotly/validators/histogram/_outsidetextfont.py index e95603415b..e562b59bb1 100644 --- a/plotly/validators/histogram/_outsidetextfont.py +++ b/plotly/validators/histogram/_outsidetextfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="outsidetextfont", parent_name="histogram", **kwargs ): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram/_selected.py b/plotly/validators/histogram/_selected.py index 6c802ff43c..b4a398d193 100644 --- a/plotly/validators/histogram/_selected.py +++ b/plotly/validators/histogram/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="histogram", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.histogram.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.selected - .Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/histogram/_selectedpoints.py b/plotly/validators/histogram/_selectedpoints.py index fd6309fccd..f44c6700d2 100644 --- a/plotly/validators/histogram/_selectedpoints.py +++ b/plotly/validators/histogram/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="histogram", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/_showlegend.py b/plotly/validators/histogram/_showlegend.py index 4f3f91367a..62f65476f9 100644 --- a/plotly/validators/histogram/_showlegend.py +++ b/plotly/validators/histogram/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="histogram", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/_stream.py b/plotly/validators/histogram/_stream.py index 45c78b22d1..7ccbf9c7d4 100644 --- a/plotly/validators/histogram/_stream.py +++ b/plotly/validators/histogram/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="histogram", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/histogram/_text.py b/plotly/validators/histogram/_text.py index 0da4d138de..ec77e3377e 100644 --- a/plotly/validators/histogram/_text.py +++ b/plotly/validators/histogram/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="histogram", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/histogram/_textangle.py b/plotly/validators/histogram/_textangle.py index 2e983fc4f5..607c95ce1e 100644 --- a/plotly/validators/histogram/_textangle.py +++ b/plotly/validators/histogram/_textangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="textangle", parent_name="histogram", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/_textfont.py b/plotly/validators/histogram/_textfont.py index 55d1ffd59a..49983b8716 100644 --- a/plotly/validators/histogram/_textfont.py +++ b/plotly/validators/histogram/_textfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="histogram", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram/_textposition.py b/plotly/validators/histogram/_textposition.py index 1b4179823a..ab44d41452 100644 --- a/plotly/validators/histogram/_textposition.py +++ b/plotly/validators/histogram/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="histogram", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), diff --git a/plotly/validators/histogram/_textsrc.py b/plotly/validators/histogram/_textsrc.py index 2f7ff07638..815dc09f08 100644 --- a/plotly/validators/histogram/_textsrc.py +++ b/plotly/validators/histogram/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="histogram", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_texttemplate.py b/plotly/validators/histogram/_texttemplate.py index 474901b9a3..6e865f1079 100644 --- a/plotly/validators/histogram/_texttemplate.py +++ b/plotly/validators/histogram/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="histogram", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/_uid.py b/plotly/validators/histogram/_uid.py index fa1523cb91..821fd4ac9f 100644 --- a/plotly/validators/histogram/_uid.py +++ b/plotly/validators/histogram/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="histogram", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/_uirevision.py b/plotly/validators/histogram/_uirevision.py index 755eb564ec..3942b59ebe 100644 --- a/plotly/validators/histogram/_uirevision.py +++ b/plotly/validators/histogram/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="histogram", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_unselected.py b/plotly/validators/histogram/_unselected.py index a33fb45964..3dfbd9ef40 100644 --- a/plotly/validators/histogram/_unselected.py +++ b/plotly/validators/histogram/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="histogram", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.histogram.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.histogram.unselect - ed.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/histogram/_visible.py b/plotly/validators/histogram/_visible.py index 56276c6a6e..99bad5032f 100644 --- a/plotly/validators/histogram/_visible.py +++ b/plotly/validators/histogram/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="histogram", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/histogram/_x.py b/plotly/validators/histogram/_x.py index a753367563..a3c4968bdf 100644 --- a/plotly/validators/histogram/_x.py +++ b/plotly/validators/histogram/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="histogram", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/histogram/_xaxis.py b/plotly/validators/histogram/_xaxis.py index 34a9a5bf75..e268b4e49b 100644 --- a/plotly/validators/histogram/_xaxis.py +++ b/plotly/validators/histogram/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="histogram", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/histogram/_xbins.py b/plotly/validators/histogram/_xbins.py index ee4650aa01..5af9b525bc 100644 --- a/plotly/validators/histogram/_xbins.py +++ b/plotly/validators/histogram/_xbins.py @@ -1,59 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XbinsValidator(_plotly_utils.basevalidators.CompoundValidator): +class XbinsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="xbins", parent_name="histogram", **kwargs): - super(XbinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "XBins"), data_docs=kwargs.pop( "data_docs", """ - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. """, ), **kwargs, diff --git a/plotly/validators/histogram/_xcalendar.py b/plotly/validators/histogram/_xcalendar.py index 68ddbb6883..aa514ad353 100644 --- a/plotly/validators/histogram/_xcalendar.py +++ b/plotly/validators/histogram/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="histogram", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/_xhoverformat.py b/plotly/validators/histogram/_xhoverformat.py index 4fc5e8f7c1..fe94f81402 100644 --- a/plotly/validators/histogram/_xhoverformat.py +++ b/plotly/validators/histogram/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="histogram", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_xsrc.py b/plotly/validators/histogram/_xsrc.py index 3810b57bb9..04390f240b 100644 --- a/plotly/validators/histogram/_xsrc.py +++ b/plotly/validators/histogram/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="histogram", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_y.py b/plotly/validators/histogram/_y.py index fc812ec655..225962bfb6 100644 --- a/plotly/validators/histogram/_y.py +++ b/plotly/validators/histogram/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="histogram", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/histogram/_yaxis.py b/plotly/validators/histogram/_yaxis.py index 8232b6eaa1..afefb89e21 100644 --- a/plotly/validators/histogram/_yaxis.py +++ b/plotly/validators/histogram/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="histogram", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/histogram/_ybins.py b/plotly/validators/histogram/_ybins.py index 8dfab89361..d8ae2a947d 100644 --- a/plotly/validators/histogram/_ybins.py +++ b/plotly/validators/histogram/_ybins.py @@ -1,59 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YbinsValidator(_plotly_utils.basevalidators.CompoundValidator): +class YbinsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="ybins", parent_name="histogram", **kwargs): - super(YbinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "YBins"), data_docs=kwargs.pop( "data_docs", """ - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). If multiple non-overlaying histograms - share a subplot, the first explicit `size` is - used and all others discarded. If no `size` is - provided,the sample data from all traces is - combined to determine `size` as described - above. - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. If multiple non- - overlaying histograms share a subplot, the - first explicit `start` is used exactly and all - others are shifted down (if necessary) to - differ from that one by an integer number of - bins. """, ), **kwargs, diff --git a/plotly/validators/histogram/_ycalendar.py b/plotly/validators/histogram/_ycalendar.py index a0fc87678e..2dad45cfbe 100644 --- a/plotly/validators/histogram/_ycalendar.py +++ b/plotly/validators/histogram/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="histogram", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/_yhoverformat.py b/plotly/validators/histogram/_yhoverformat.py index c1666597bb..dd943055c2 100644 --- a/plotly/validators/histogram/_yhoverformat.py +++ b/plotly/validators/histogram/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="histogram", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_ysrc.py b/plotly/validators/histogram/_ysrc.py index 15ab69a3d3..9f652bacc7 100644 --- a/plotly/validators/histogram/_ysrc.py +++ b/plotly/validators/histogram/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="histogram", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/_zorder.py b/plotly/validators/histogram/_zorder.py index 5b68812efe..689dcc8997 100644 --- a/plotly/validators/histogram/_zorder.py +++ b/plotly/validators/histogram/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="histogram", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/cumulative/__init__.py b/plotly/validators/histogram/cumulative/__init__.py index f52e54bee6..b942b99f34 100644 --- a/plotly/validators/histogram/cumulative/__init__.py +++ b/plotly/validators/histogram/cumulative/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._enabled import EnabledValidator - from ._direction import DirectionValidator - from ._currentbin import CurrentbinValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._enabled.EnabledValidator", - "._direction.DirectionValidator", - "._currentbin.CurrentbinValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._enabled.EnabledValidator", + "._direction.DirectionValidator", + "._currentbin.CurrentbinValidator", + ], +) diff --git a/plotly/validators/histogram/cumulative/_currentbin.py b/plotly/validators/histogram/cumulative/_currentbin.py index a92e00a2fc..5b83c6e75b 100644 --- a/plotly/validators/histogram/cumulative/_currentbin.py +++ b/plotly/validators/histogram/cumulative/_currentbin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CurrentbinValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CurrentbinValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="currentbin", parent_name="histogram.cumulative", **kwargs ): - super(CurrentbinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["include", "exclude", "half"]), **kwargs, diff --git a/plotly/validators/histogram/cumulative/_direction.py b/plotly/validators/histogram/cumulative/_direction.py index 98bd3f0bb2..b145db2237 100644 --- a/plotly/validators/histogram/cumulative/_direction.py +++ b/plotly/validators/histogram/cumulative/_direction.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DirectionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="direction", parent_name="histogram.cumulative", **kwargs ): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["increasing", "decreasing"]), **kwargs, diff --git a/plotly/validators/histogram/cumulative/_enabled.py b/plotly/validators/histogram/cumulative/_enabled.py index da1332f001..3e18d179ba 100644 --- a/plotly/validators/histogram/cumulative/_enabled.py +++ b/plotly/validators/histogram/cumulative/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="histogram.cumulative", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/__init__.py b/plotly/validators/histogram/error_x/__init__.py index 2e3ce59d75..62838bdb73 100644 --- a/plotly/validators/histogram/error_x/__init__.py +++ b/plotly/validators/histogram/error_x/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._copy_ystyle import Copy_YstyleValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._copy_ystyle.Copy_YstyleValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/histogram/error_x/_array.py b/plotly/validators/histogram/error_x/_array.py index f3a99927f4..e2ee37f64b 100644 --- a/plotly/validators/histogram/error_x/_array.py +++ b/plotly/validators/histogram/error_x/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="histogram.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_arrayminus.py b/plotly/validators/histogram/error_x/_arrayminus.py index 79c95771d7..dcd426f203 100644 --- a/plotly/validators/histogram/error_x/_arrayminus.py +++ b/plotly/validators/histogram/error_x/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="histogram.error_x", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_arrayminussrc.py b/plotly/validators/histogram/error_x/_arrayminussrc.py index 5c64ce43e5..7a21ae2e39 100644 --- a/plotly/validators/histogram/error_x/_arrayminussrc.py +++ b/plotly/validators/histogram/error_x/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="histogram.error_x", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_arraysrc.py b/plotly/validators/histogram/error_x/_arraysrc.py index 1c778358bf..7fd43adb92 100644 --- a/plotly/validators/histogram/error_x/_arraysrc.py +++ b/plotly/validators/histogram/error_x/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="histogram.error_x", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_color.py b/plotly/validators/histogram/error_x/_color.py index 1a97c491e9..8eb5e14d98 100644 --- a/plotly/validators/histogram/error_x/_color.py +++ b/plotly/validators/histogram/error_x/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="histogram.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_copy_ystyle.py b/plotly/validators/histogram/error_x/_copy_ystyle.py index 43170703cb..1af89804c0 100644 --- a/plotly/validators/histogram/error_x/_copy_ystyle.py +++ b/plotly/validators/histogram/error_x/_copy_ystyle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): +class Copy_YstyleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="copy_ystyle", parent_name="histogram.error_x", **kwargs ): - super(Copy_YstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_symmetric.py b/plotly/validators/histogram/error_x/_symmetric.py index a32e0cfe53..119a2647f7 100644 --- a/plotly/validators/histogram/error_x/_symmetric.py +++ b/plotly/validators/histogram/error_x/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="histogram.error_x", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_thickness.py b/plotly/validators/histogram/error_x/_thickness.py index 45b8a95d2e..5f23930c18 100644 --- a/plotly/validators/histogram/error_x/_thickness.py +++ b/plotly/validators/histogram/error_x/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="histogram.error_x", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_x/_traceref.py b/plotly/validators/histogram/error_x/_traceref.py index fed262386a..589716f540 100644 --- a/plotly/validators/histogram/error_x/_traceref.py +++ b/plotly/validators/histogram/error_x/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="histogram.error_x", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_x/_tracerefminus.py b/plotly/validators/histogram/error_x/_tracerefminus.py index b0afe62fbb..29968c29d3 100644 --- a/plotly/validators/histogram/error_x/_tracerefminus.py +++ b/plotly/validators/histogram/error_x/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="histogram.error_x", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_x/_type.py b/plotly/validators/histogram/error_x/_type.py index 12941f186f..c6521c188f 100644 --- a/plotly/validators/histogram/error_x/_type.py +++ b/plotly/validators/histogram/error_x/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="histogram.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/histogram/error_x/_value.py b/plotly/validators/histogram/error_x/_value.py index ca63f9cfc5..6f335c8eef 100644 --- a/plotly/validators/histogram/error_x/_value.py +++ b/plotly/validators/histogram/error_x/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="histogram.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_x/_valueminus.py b/plotly/validators/histogram/error_x/_valueminus.py index 1cdc9c98f5..5f1d742981 100644 --- a/plotly/validators/histogram/error_x/_valueminus.py +++ b/plotly/validators/histogram/error_x/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="histogram.error_x", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_x/_visible.py b/plotly/validators/histogram/error_x/_visible.py index 609de7cacd..552e198999 100644 --- a/plotly/validators/histogram/error_x/_visible.py +++ b/plotly/validators/histogram/error_x/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="histogram.error_x", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_x/_width.py b/plotly/validators/histogram/error_x/_width.py index 7fa8d26d74..f37b500bc0 100644 --- a/plotly/validators/histogram/error_x/_width.py +++ b/plotly/validators/histogram/error_x/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="histogram.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_y/__init__.py b/plotly/validators/histogram/error_y/__init__.py index eff09cd6a0..ea49850d5f 100644 --- a/plotly/validators/histogram/error_y/__init__.py +++ b/plotly/validators/histogram/error_y/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/histogram/error_y/_array.py b/plotly/validators/histogram/error_y/_array.py index 7ced110a7d..542bde0a6b 100644 --- a/plotly/validators/histogram/error_y/_array.py +++ b/plotly/validators/histogram/error_y/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="histogram.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_arrayminus.py b/plotly/validators/histogram/error_y/_arrayminus.py index e6ec1f998e..36cb9b088f 100644 --- a/plotly/validators/histogram/error_y/_arrayminus.py +++ b/plotly/validators/histogram/error_y/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="histogram.error_y", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_arrayminussrc.py b/plotly/validators/histogram/error_y/_arrayminussrc.py index cc4c2e6883..f82dc9cf84 100644 --- a/plotly/validators/histogram/error_y/_arrayminussrc.py +++ b/plotly/validators/histogram/error_y/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="histogram.error_y", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_arraysrc.py b/plotly/validators/histogram/error_y/_arraysrc.py index a00ae7ae0b..5b8f0e54f7 100644 --- a/plotly/validators/histogram/error_y/_arraysrc.py +++ b/plotly/validators/histogram/error_y/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="histogram.error_y", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_color.py b/plotly/validators/histogram/error_y/_color.py index c04b181958..ff205d19cf 100644 --- a/plotly/validators/histogram/error_y/_color.py +++ b/plotly/validators/histogram/error_y/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="histogram.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_symmetric.py b/plotly/validators/histogram/error_y/_symmetric.py index 2b71b1b8e9..8bddee6318 100644 --- a/plotly/validators/histogram/error_y/_symmetric.py +++ b/plotly/validators/histogram/error_y/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="histogram.error_y", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_thickness.py b/plotly/validators/histogram/error_y/_thickness.py index c66e2aea1b..c9cee268f7 100644 --- a/plotly/validators/histogram/error_y/_thickness.py +++ b/plotly/validators/histogram/error_y/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="histogram.error_y", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_y/_traceref.py b/plotly/validators/histogram/error_y/_traceref.py index 30347a0c2f..28f15cbade 100644 --- a/plotly/validators/histogram/error_y/_traceref.py +++ b/plotly/validators/histogram/error_y/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="histogram.error_y", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_y/_tracerefminus.py b/plotly/validators/histogram/error_y/_tracerefminus.py index dfa53254ba..8ec08a9113 100644 --- a/plotly/validators/histogram/error_y/_tracerefminus.py +++ b/plotly/validators/histogram/error_y/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="histogram.error_y", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_y/_type.py b/plotly/validators/histogram/error_y/_type.py index 981ce78cf3..22e67df6e8 100644 --- a/plotly/validators/histogram/error_y/_type.py +++ b/plotly/validators/histogram/error_y/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="histogram.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/histogram/error_y/_value.py b/plotly/validators/histogram/error_y/_value.py index ea5d203f6b..b577d54415 100644 --- a/plotly/validators/histogram/error_y/_value.py +++ b/plotly/validators/histogram/error_y/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="histogram.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_y/_valueminus.py b/plotly/validators/histogram/error_y/_valueminus.py index b9f3fce22d..12125c878d 100644 --- a/plotly/validators/histogram/error_y/_valueminus.py +++ b/plotly/validators/histogram/error_y/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="histogram.error_y", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/error_y/_visible.py b/plotly/validators/histogram/error_y/_visible.py index 7abf56f772..41c17971d2 100644 --- a/plotly/validators/histogram/error_y/_visible.py +++ b/plotly/validators/histogram/error_y/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="histogram.error_y", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/error_y/_width.py b/plotly/validators/histogram/error_y/_width.py index df54bf2e38..055181e04d 100644 --- a/plotly/validators/histogram/error_y/_width.py +++ b/plotly/validators/histogram/error_y/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="histogram.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/hoverlabel/__init__.py b/plotly/validators/histogram/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/histogram/hoverlabel/__init__.py +++ b/plotly/validators/histogram/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/histogram/hoverlabel/_align.py b/plotly/validators/histogram/hoverlabel/_align.py index e3eab44ad1..c75f3e3d3b 100644 --- a/plotly/validators/histogram/hoverlabel/_align.py +++ b/plotly/validators/histogram/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="histogram.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/histogram/hoverlabel/_alignsrc.py b/plotly/validators/histogram/hoverlabel/_alignsrc.py index be4972f1be..5f2b817a91 100644 --- a/plotly/validators/histogram/hoverlabel/_alignsrc.py +++ b/plotly/validators/histogram/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="histogram.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/_bgcolor.py b/plotly/validators/histogram/hoverlabel/_bgcolor.py index 970712dca3..fe42827d24 100644 --- a/plotly/validators/histogram/hoverlabel/_bgcolor.py +++ b/plotly/validators/histogram/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py b/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py index cb4b4a33cd..7be3827928 100644 --- a/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/histogram/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="histogram.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/_bordercolor.py b/plotly/validators/histogram/hoverlabel/_bordercolor.py index 91c8eecf56..133a954ea2 100644 --- a/plotly/validators/histogram/hoverlabel/_bordercolor.py +++ b/plotly/validators/histogram/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py b/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py index c147e0c039..db5e3440f7 100644 --- a/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/histogram/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="histogram.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/_font.py b/plotly/validators/histogram/hoverlabel/_font.py index 156b767eb4..adf346e85b 100644 --- a/plotly/validators/histogram/hoverlabel/_font.py +++ b/plotly/validators/histogram/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/histogram/hoverlabel/_namelength.py b/plotly/validators/histogram/hoverlabel/_namelength.py index 39739ec870..9bbabf51b1 100644 --- a/plotly/validators/histogram/hoverlabel/_namelength.py +++ b/plotly/validators/histogram/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="histogram.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/histogram/hoverlabel/_namelengthsrc.py b/plotly/validators/histogram/hoverlabel/_namelengthsrc.py index 6c68132f5e..373e8cf74f 100644 --- a/plotly/validators/histogram/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/histogram/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="histogram.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/__init__.py b/plotly/validators/histogram/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/histogram/hoverlabel/font/__init__.py +++ b/plotly/validators/histogram/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/hoverlabel/font/_color.py b/plotly/validators/histogram/hoverlabel/font/_color.py index a03e7213de..e8b23e0277 100644 --- a/plotly/validators/histogram/hoverlabel/font/_color.py +++ b/plotly/validators/histogram/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram/hoverlabel/font/_colorsrc.py b/plotly/validators/histogram/hoverlabel/font/_colorsrc.py index 4961b371b9..b31332bea9 100644 --- a/plotly/validators/histogram/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_family.py b/plotly/validators/histogram/hoverlabel/font/_family.py index 5a549a0825..849280bdb1 100644 --- a/plotly/validators/histogram/hoverlabel/font/_family.py +++ b/plotly/validators/histogram/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/histogram/hoverlabel/font/_familysrc.py b/plotly/validators/histogram/hoverlabel/font/_familysrc.py index 15a31f6242..8f3e8dab80 100644 --- a/plotly/validators/histogram/hoverlabel/font/_familysrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="histogram.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_lineposition.py b/plotly/validators/histogram/hoverlabel/font/_lineposition.py index 0ee1ed5aff..5bfc431af1 100644 --- a/plotly/validators/histogram/hoverlabel/font/_lineposition.py +++ b/plotly/validators/histogram/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/histogram/hoverlabel/font/_linepositionsrc.py b/plotly/validators/histogram/hoverlabel/font/_linepositionsrc.py index 19216ea960..8495afd0c5 100644 --- a/plotly/validators/histogram/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="histogram.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_shadow.py b/plotly/validators/histogram/hoverlabel/font/_shadow.py index 3f0018ad62..92de47e74c 100644 --- a/plotly/validators/histogram/hoverlabel/font/_shadow.py +++ b/plotly/validators/histogram/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram/hoverlabel/font/_shadowsrc.py b/plotly/validators/histogram/hoverlabel/font/_shadowsrc.py index f964f045a0..d39ccc2b74 100644 --- a/plotly/validators/histogram/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="histogram.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_size.py b/plotly/validators/histogram/hoverlabel/font/_size.py index 22d23470bc..00560ab66e 100644 --- a/plotly/validators/histogram/hoverlabel/font/_size.py +++ b/plotly/validators/histogram/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/histogram/hoverlabel/font/_sizesrc.py b/plotly/validators/histogram/hoverlabel/font/_sizesrc.py index b0a9ccbcd3..56edfee590 100644 --- a/plotly/validators/histogram/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="histogram.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_style.py b/plotly/validators/histogram/hoverlabel/font/_style.py index 7581194024..0f8b28bdc3 100644 --- a/plotly/validators/histogram/hoverlabel/font/_style.py +++ b/plotly/validators/histogram/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/histogram/hoverlabel/font/_stylesrc.py b/plotly/validators/histogram/hoverlabel/font/_stylesrc.py index 58dc97505a..288d2694e5 100644 --- a/plotly/validators/histogram/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="histogram.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_textcase.py b/plotly/validators/histogram/hoverlabel/font/_textcase.py index 0f611cee98..d53d0560c3 100644 --- a/plotly/validators/histogram/hoverlabel/font/_textcase.py +++ b/plotly/validators/histogram/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/histogram/hoverlabel/font/_textcasesrc.py b/plotly/validators/histogram/hoverlabel/font/_textcasesrc.py index ea8a593855..f0daa7028e 100644 --- a/plotly/validators/histogram/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="histogram.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_variant.py b/plotly/validators/histogram/hoverlabel/font/_variant.py index 4f2ec3980b..49dc1c5104 100644 --- a/plotly/validators/histogram/hoverlabel/font/_variant.py +++ b/plotly/validators/histogram/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/histogram/hoverlabel/font/_variantsrc.py b/plotly/validators/histogram/hoverlabel/font/_variantsrc.py index 75de0e74c4..b50609ca7a 100644 --- a/plotly/validators/histogram/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="histogram.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/hoverlabel/font/_weight.py b/plotly/validators/histogram/hoverlabel/font/_weight.py index b34218884f..83eb9b27ec 100644 --- a/plotly/validators/histogram/hoverlabel/font/_weight.py +++ b/plotly/validators/histogram/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/histogram/hoverlabel/font/_weightsrc.py b/plotly/validators/histogram/hoverlabel/font/_weightsrc.py index 78cf8e9295..5f101ee3fd 100644 --- a/plotly/validators/histogram/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/histogram/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="histogram.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/insidetextfont/__init__.py b/plotly/validators/histogram/insidetextfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram/insidetextfont/__init__.py +++ b/plotly/validators/histogram/insidetextfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/insidetextfont/_color.py b/plotly/validators/histogram/insidetextfont/_color.py index 65030c2c47..6b7e4b5e40 100644 --- a/plotly/validators/histogram/insidetextfont/_color.py +++ b/plotly/validators/histogram/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/insidetextfont/_family.py b/plotly/validators/histogram/insidetextfont/_family.py index 8fbdd7688e..e99aedafc0 100644 --- a/plotly/validators/histogram/insidetextfont/_family.py +++ b/plotly/validators/histogram/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/insidetextfont/_lineposition.py b/plotly/validators/histogram/insidetextfont/_lineposition.py index df80a7b165..896d571121 100644 --- a/plotly/validators/histogram/insidetextfont/_lineposition.py +++ b/plotly/validators/histogram/insidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.insidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram/insidetextfont/_shadow.py b/plotly/validators/histogram/insidetextfont/_shadow.py index d62fc7a167..73e64ba777 100644 --- a/plotly/validators/histogram/insidetextfont/_shadow.py +++ b/plotly/validators/histogram/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/insidetextfont/_size.py b/plotly/validators/histogram/insidetextfont/_size.py index f65e369fcf..f99e4fb0c5 100644 --- a/plotly/validators/histogram/insidetextfont/_size.py +++ b/plotly/validators/histogram/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/insidetextfont/_style.py b/plotly/validators/histogram/insidetextfont/_style.py index 7d165c6f03..1384f6f2b3 100644 --- a/plotly/validators/histogram/insidetextfont/_style.py +++ b/plotly/validators/histogram/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram/insidetextfont/_textcase.py b/plotly/validators/histogram/insidetextfont/_textcase.py index 8ee95a7c70..1c4ea455d2 100644 --- a/plotly/validators/histogram/insidetextfont/_textcase.py +++ b/plotly/validators/histogram/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram/insidetextfont/_variant.py b/plotly/validators/histogram/insidetextfont/_variant.py index 67820554d4..a5dd0d8cb0 100644 --- a/plotly/validators/histogram/insidetextfont/_variant.py +++ b/plotly/validators/histogram/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/insidetextfont/_weight.py b/plotly/validators/histogram/insidetextfont/_weight.py index dc3db5cfd3..8e567e4903 100644 --- a/plotly/validators/histogram/insidetextfont/_weight.py +++ b/plotly/validators/histogram/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/legendgrouptitle/__init__.py b/plotly/validators/histogram/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/histogram/legendgrouptitle/__init__.py +++ b/plotly/validators/histogram/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/histogram/legendgrouptitle/_font.py b/plotly/validators/histogram/legendgrouptitle/_font.py index 20e6b44fc7..181da422f1 100644 --- a/plotly/validators/histogram/legendgrouptitle/_font.py +++ b/plotly/validators/histogram/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram/legendgrouptitle/_text.py b/plotly/validators/histogram/legendgrouptitle/_text.py index f009159a91..744ba12657 100644 --- a/plotly/validators/histogram/legendgrouptitle/_text.py +++ b/plotly/validators/histogram/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/legendgrouptitle/font/__init__.py b/plotly/validators/histogram/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/__init__.py +++ b/plotly/validators/histogram/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/legendgrouptitle/font/_color.py b/plotly/validators/histogram/legendgrouptitle/font/_color.py index e7081da9a7..93d9362d7f 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_color.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/legendgrouptitle/font/_family.py b/plotly/validators/histogram/legendgrouptitle/font/_family.py index 8bb67f6410..d8c2eb12dc 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_family.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/legendgrouptitle/font/_lineposition.py b/plotly/validators/histogram/legendgrouptitle/font/_lineposition.py index 3580ea8b24..25e500aad9 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram/legendgrouptitle/font/_shadow.py b/plotly/validators/histogram/legendgrouptitle/font/_shadow.py index 3b0745a9c9..36c683177e 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/legendgrouptitle/font/_size.py b/plotly/validators/histogram/legendgrouptitle/font/_size.py index de12a55d4f..b26d0f48e2 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_size.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/legendgrouptitle/font/_style.py b/plotly/validators/histogram/legendgrouptitle/font/_style.py index a430d7224b..2cbfbde2b9 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_style.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram/legendgrouptitle/font/_textcase.py b/plotly/validators/histogram/legendgrouptitle/font/_textcase.py index 8447fedbb6..e50bbadf8e 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram/legendgrouptitle/font/_variant.py b/plotly/validators/histogram/legendgrouptitle/font/_variant.py index b9fd87b9f1..0d05b4192c 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_variant.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/legendgrouptitle/font/_weight.py b/plotly/validators/histogram/legendgrouptitle/font/_weight.py index c3545dda76..50a1c3dc70 100644 --- a/plotly/validators/histogram/legendgrouptitle/font/_weight.py +++ b/plotly/validators/histogram/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/marker/__init__.py b/plotly/validators/histogram/marker/__init__.py index 8f8e3d4a93..69ad877d80 100644 --- a/plotly/validators/histogram/marker/__init__.py +++ b/plotly/validators/histogram/marker/__init__.py @@ -1,47 +1,26 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._pattern import PatternValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._cornerradius import CornerradiusValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._pattern.PatternValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._cornerradius.CornerradiusValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pattern.PatternValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._cornerradius.CornerradiusValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/histogram/marker/_autocolorscale.py b/plotly/validators/histogram/marker/_autocolorscale.py index 68fb055132..6fab0609aa 100644 --- a/plotly/validators/histogram/marker/_autocolorscale.py +++ b/plotly/validators/histogram/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="histogram.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram/marker/_cauto.py b/plotly/validators/histogram/marker/_cauto.py index 8141f7101f..24869e01f5 100644 --- a/plotly/validators/histogram/marker/_cauto.py +++ b/plotly/validators/histogram/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="histogram.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram/marker/_cmax.py b/plotly/validators/histogram/marker/_cmax.py index 7d95863085..880259b219 100644 --- a/plotly/validators/histogram/marker/_cmax.py +++ b/plotly/validators/histogram/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="histogram.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/histogram/marker/_cmid.py b/plotly/validators/histogram/marker/_cmid.py index df400126a9..d027d0fbff 100644 --- a/plotly/validators/histogram/marker/_cmid.py +++ b/plotly/validators/histogram/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="histogram.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram/marker/_cmin.py b/plotly/validators/histogram/marker/_cmin.py index 8fa8e64f9b..50ba097c1b 100644 --- a/plotly/validators/histogram/marker/_cmin.py +++ b/plotly/validators/histogram/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="histogram.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/histogram/marker/_color.py b/plotly/validators/histogram/marker/_color.py index 3243736e98..cc24c7f6c3 100644 --- a/plotly/validators/histogram/marker/_color.py +++ b/plotly/validators/histogram/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="histogram.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/histogram/marker/_coloraxis.py b/plotly/validators/histogram/marker/_coloraxis.py index f0c8f61b0d..517d7679b6 100644 --- a/plotly/validators/histogram/marker/_coloraxis.py +++ b/plotly/validators/histogram/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="histogram.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/histogram/marker/_colorbar.py b/plotly/validators/histogram/marker/_colorbar.py index a577dbd09a..5676159fff 100644 --- a/plotly/validators/histogram/marker/_colorbar.py +++ b/plotly/validators/histogram/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="histogram.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - histogram.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram.marker.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/_colorscale.py b/plotly/validators/histogram/marker/_colorscale.py index 2961c7c435..4a7e785608 100644 --- a/plotly/validators/histogram/marker/_colorscale.py +++ b/plotly/validators/histogram/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="histogram.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/histogram/marker/_colorsrc.py b/plotly/validators/histogram/marker/_colorsrc.py index 6e41a47510..5d0218d72c 100644 --- a/plotly/validators/histogram/marker/_colorsrc.py +++ b/plotly/validators/histogram/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/_cornerradius.py b/plotly/validators/histogram/marker/_cornerradius.py index 0a3f78d598..e29b25fd1c 100644 --- a/plotly/validators/histogram/marker/_cornerradius.py +++ b/plotly/validators/histogram/marker/_cornerradius.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CornerradiusValidator(_plotly_utils.basevalidators.AnyValidator): +class CornerradiusValidator(_bv.AnyValidator): def __init__( self, plotly_name="cornerradius", parent_name="histogram.marker", **kwargs ): - super(CornerradiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/_line.py b/plotly/validators/histogram/marker/_line.py index e5955f2126..8051865c71 100644 --- a/plotly/validators/histogram/marker/_line.py +++ b/plotly/validators/histogram/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="histogram.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/_opacity.py b/plotly/validators/histogram/marker/_opacity.py index 34ea49aea3..19ffbf08e5 100644 --- a/plotly/validators/histogram/marker/_opacity.py +++ b/plotly/validators/histogram/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="histogram.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/histogram/marker/_opacitysrc.py b/plotly/validators/histogram/marker/_opacitysrc.py index e3ed643073..c2a408fb89 100644 --- a/plotly/validators/histogram/marker/_opacitysrc.py +++ b/plotly/validators/histogram/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="histogram.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/_pattern.py b/plotly/validators/histogram/marker/_pattern.py index 43a97f8fba..7484223866 100644 --- a/plotly/validators/histogram/marker/_pattern.py +++ b/plotly/validators/histogram/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="histogram.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/_reversescale.py b/plotly/validators/histogram/marker/_reversescale.py index a5014da5ea..bc4f156ada 100644 --- a/plotly/validators/histogram/marker/_reversescale.py +++ b/plotly/validators/histogram/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="histogram.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/_showscale.py b/plotly/validators/histogram/marker/_showscale.py index 1009894e95..f0036ea928 100644 --- a/plotly/validators/histogram/marker/_showscale.py +++ b/plotly/validators/histogram/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="histogram.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/__init__.py b/plotly/validators/histogram/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/histogram/marker/colorbar/__init__.py +++ b/plotly/validators/histogram/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/histogram/marker/colorbar/_bgcolor.py b/plotly/validators/histogram/marker/colorbar/_bgcolor.py index 6aba6ba0df..7c1d888e1f 100644 --- a/plotly/validators/histogram/marker/colorbar/_bgcolor.py +++ b/plotly/validators/histogram/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_bordercolor.py b/plotly/validators/histogram/marker/colorbar/_bordercolor.py index 4e72238324..c059eff964 100644 --- a/plotly/validators/histogram/marker/colorbar/_bordercolor.py +++ b/plotly/validators/histogram/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_borderwidth.py b/plotly/validators/histogram/marker/colorbar/_borderwidth.py index c24de58539..97154b7fcf 100644 --- a/plotly/validators/histogram/marker/colorbar/_borderwidth.py +++ b/plotly/validators/histogram/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="histogram.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_dtick.py b/plotly/validators/histogram/marker/colorbar/_dtick.py index 79ecd42053..80928d2641 100644 --- a/plotly/validators/histogram/marker/colorbar/_dtick.py +++ b/plotly/validators/histogram/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="histogram.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_exponentformat.py b/plotly/validators/histogram/marker/colorbar/_exponentformat.py index 01a7f3d716..a2e5b0d907 100644 --- a/plotly/validators/histogram/marker/colorbar/_exponentformat.py +++ b/plotly/validators/histogram/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="histogram.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_labelalias.py b/plotly/validators/histogram/marker/colorbar/_labelalias.py index 86d92fd691..aae04d7c3a 100644 --- a/plotly/validators/histogram/marker/colorbar/_labelalias.py +++ b/plotly/validators/histogram/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="histogram.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_len.py b/plotly/validators/histogram/marker/colorbar/_len.py index 9362830690..54da073027 100644 --- a/plotly/validators/histogram/marker/colorbar/_len.py +++ b/plotly/validators/histogram/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="histogram.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_lenmode.py b/plotly/validators/histogram/marker/colorbar/_lenmode.py index 2f38eb782d..73fe92010b 100644 --- a/plotly/validators/histogram/marker/colorbar/_lenmode.py +++ b/plotly/validators/histogram/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="histogram.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_minexponent.py b/plotly/validators/histogram/marker/colorbar/_minexponent.py index 93a853a192..5164bb795c 100644 --- a/plotly/validators/histogram/marker/colorbar/_minexponent.py +++ b/plotly/validators/histogram/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="histogram.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_nticks.py b/plotly/validators/histogram/marker/colorbar/_nticks.py index f6c32ed4af..f0c7b251c2 100644 --- a/plotly/validators/histogram/marker/colorbar/_nticks.py +++ b/plotly/validators/histogram/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="histogram.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_orientation.py b/plotly/validators/histogram/marker/colorbar/_orientation.py index cf591da3e3..60eddd18eb 100644 --- a/plotly/validators/histogram/marker/colorbar/_orientation.py +++ b/plotly/validators/histogram/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="histogram.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_outlinecolor.py b/plotly/validators/histogram/marker/colorbar/_outlinecolor.py index 3a0b1638f1..431c2a2bdf 100644 --- a/plotly/validators/histogram/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/histogram/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="histogram.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_outlinewidth.py b/plotly/validators/histogram/marker/colorbar/_outlinewidth.py index 1642771bfe..e949f2376b 100644 --- a/plotly/validators/histogram/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/histogram/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="histogram.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_separatethousands.py b/plotly/validators/histogram/marker/colorbar/_separatethousands.py index 5ad11f5520..c5f2a2d5d3 100644 --- a/plotly/validators/histogram/marker/colorbar/_separatethousands.py +++ b/plotly/validators/histogram/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="histogram.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_showexponent.py b/plotly/validators/histogram/marker/colorbar/_showexponent.py index e1dd35719e..ca18b8feb1 100644 --- a/plotly/validators/histogram/marker/colorbar/_showexponent.py +++ b/plotly/validators/histogram/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="histogram.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_showticklabels.py b/plotly/validators/histogram/marker/colorbar/_showticklabels.py index 026869b4c5..0d16f995cb 100644 --- a/plotly/validators/histogram/marker/colorbar/_showticklabels.py +++ b/plotly/validators/histogram/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="histogram.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_showtickprefix.py b/plotly/validators/histogram/marker/colorbar/_showtickprefix.py index e0531787bd..8ceec0bff7 100644 --- a/plotly/validators/histogram/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/histogram/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="histogram.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_showticksuffix.py b/plotly/validators/histogram/marker/colorbar/_showticksuffix.py index e9e7c15b37..ee6d05c9d1 100644 --- a/plotly/validators/histogram/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/histogram/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="histogram.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_thickness.py b/plotly/validators/histogram/marker/colorbar/_thickness.py index 3233a5c479..649f5a530c 100644 --- a/plotly/validators/histogram/marker/colorbar/_thickness.py +++ b/plotly/validators/histogram/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="histogram.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_thicknessmode.py b/plotly/validators/histogram/marker/colorbar/_thicknessmode.py index fff31b535a..cbfc4f7b11 100644 --- a/plotly/validators/histogram/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/histogram/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="histogram.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_tick0.py b/plotly/validators/histogram/marker/colorbar/_tick0.py index 6c753f31e5..323f02ec63 100644 --- a/plotly/validators/histogram/marker/colorbar/_tick0.py +++ b/plotly/validators/histogram/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="histogram.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_tickangle.py b/plotly/validators/histogram/marker/colorbar/_tickangle.py index 7c849b9129..3c90fc4c20 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickangle.py +++ b/plotly/validators/histogram/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="histogram.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_tickcolor.py b/plotly/validators/histogram/marker/colorbar/_tickcolor.py index 37296b1450..6fd3b2d83a 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickcolor.py +++ b/plotly/validators/histogram/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="histogram.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_tickfont.py b/plotly/validators/histogram/marker/colorbar/_tickfont.py index 3bbb965b7d..c4af6a147e 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickfont.py +++ b/plotly/validators/histogram/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="histogram.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_tickformat.py b/plotly/validators/histogram/marker/colorbar/_tickformat.py index e81180fd5c..6cb4bc197d 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickformat.py +++ b/plotly/validators/histogram/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py index 11d46bb8c2..b926f10a9d 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/histogram/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/histogram/marker/colorbar/_tickformatstops.py b/plotly/validators/histogram/marker/colorbar/_tickformatstops.py index 18684c8937..1dc4320b17 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/histogram/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/histogram/marker/colorbar/_ticklabeloverflow.py index 6ee2168b4f..b6f9bff8f2 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/histogram/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_ticklabelposition.py b/plotly/validators/histogram/marker/colorbar/_ticklabelposition.py index 78f6bdbb20..4e57bc945d 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/histogram/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/marker/colorbar/_ticklabelstep.py b/plotly/validators/histogram/marker/colorbar/_ticklabelstep.py index fdc4cf7834..3525c2468b 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/histogram/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_ticklen.py b/plotly/validators/histogram/marker/colorbar/_ticklen.py index 500d1c5c49..0d149fafee 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticklen.py +++ b/plotly/validators/histogram/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="histogram.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_tickmode.py b/plotly/validators/histogram/marker/colorbar/_tickmode.py index a1fb75e110..2b6a6682bc 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickmode.py +++ b/plotly/validators/histogram/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="histogram.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/histogram/marker/colorbar/_tickprefix.py b/plotly/validators/histogram/marker/colorbar/_tickprefix.py index efb4618471..7ccbf9413f 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickprefix.py +++ b/plotly/validators/histogram/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_ticks.py b/plotly/validators/histogram/marker/colorbar/_ticks.py index 1ee66d7f17..3c8e10f381 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticks.py +++ b/plotly/validators/histogram/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="histogram.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_ticksuffix.py b/plotly/validators/histogram/marker/colorbar/_ticksuffix.py index a6bcb47182..ccca819551 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/histogram/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_ticktext.py b/plotly/validators/histogram/marker/colorbar/_ticktext.py index fe982ca9a1..c13700f342 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticktext.py +++ b/plotly/validators/histogram/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="histogram.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py b/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py index 5d1bf16d59..338723b044 100644 --- a/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/histogram/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_tickvals.py b/plotly/validators/histogram/marker/colorbar/_tickvals.py index 7c102071cd..7c1c8e159e 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickvals.py +++ b/plotly/validators/histogram/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="histogram.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py b/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py index 9a7a3d8b4f..2e709bd478 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/histogram/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="histogram.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_tickwidth.py b/plotly/validators/histogram/marker/colorbar/_tickwidth.py index ce97c24b44..bb39a249e2 100644 --- a/plotly/validators/histogram/marker/colorbar/_tickwidth.py +++ b/plotly/validators/histogram/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="histogram.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_title.py b/plotly/validators/histogram/marker/colorbar/_title.py index ff4d90bb88..a01003fc3d 100644 --- a/plotly/validators/histogram/marker/colorbar/_title.py +++ b/plotly/validators/histogram/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="histogram.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_x.py b/plotly/validators/histogram/marker/colorbar/_x.py index 1ae083e806..edfcaffe46 100644 --- a/plotly/validators/histogram/marker/colorbar/_x.py +++ b/plotly/validators/histogram/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="histogram.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_xanchor.py b/plotly/validators/histogram/marker/colorbar/_xanchor.py index b30c23ad4a..09f2c9c595 100644 --- a/plotly/validators/histogram/marker/colorbar/_xanchor.py +++ b/plotly/validators/histogram/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="histogram.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_xpad.py b/plotly/validators/histogram/marker/colorbar/_xpad.py index 1cdd5730e6..229d38eb7d 100644 --- a/plotly/validators/histogram/marker/colorbar/_xpad.py +++ b/plotly/validators/histogram/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="histogram.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_xref.py b/plotly/validators/histogram/marker/colorbar/_xref.py index 121a6d39bc..33848136e4 100644 --- a/plotly/validators/histogram/marker/colorbar/_xref.py +++ b/plotly/validators/histogram/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="histogram.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_y.py b/plotly/validators/histogram/marker/colorbar/_y.py index 86cc20a14d..338cb4823f 100644 --- a/plotly/validators/histogram/marker/colorbar/_y.py +++ b/plotly/validators/histogram/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="histogram.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/_yanchor.py b/plotly/validators/histogram/marker/colorbar/_yanchor.py index 6cad96e7dd..bc1f281b0d 100644 --- a/plotly/validators/histogram/marker/colorbar/_yanchor.py +++ b/plotly/validators/histogram/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="histogram.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_ypad.py b/plotly/validators/histogram/marker/colorbar/_ypad.py index 2ce4637ff3..dceb1817d0 100644 --- a/plotly/validators/histogram/marker/colorbar/_ypad.py +++ b/plotly/validators/histogram/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="histogram.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/_yref.py b/plotly/validators/histogram/marker/colorbar/_yref.py index 326e18fcf7..f47bd2b0a0 100644 --- a/plotly/validators/histogram/marker/colorbar/_yref.py +++ b/plotly/validators/histogram/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="histogram.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py b/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_color.py b/plotly/validators/histogram/marker/colorbar/tickfont/_color.py index 42749c2216..3a399196b9 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_family.py b/plotly/validators/histogram/marker/colorbar/tickfont/_family.py index e979eff363..0bd7bb1a7e 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/histogram/marker/colorbar/tickfont/_lineposition.py index e27d87485a..2c5199f647 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_shadow.py b/plotly/validators/histogram/marker/colorbar/tickfont/_shadow.py index 2b7ad4db19..0668127bde 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_size.py b/plotly/validators/histogram/marker/colorbar/tickfont/_size.py index b130357518..3165c072d1 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_style.py b/plotly/validators/histogram/marker/colorbar/tickfont/_style.py index 17b287fbde..67c1f10263 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_textcase.py b/plotly/validators/histogram/marker/colorbar/tickfont/_textcase.py index ba7d5420e0..6d5b9f0155 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_variant.py b/plotly/validators/histogram/marker/colorbar/tickfont/_variant.py index d560219779..2115d1d038 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/marker/colorbar/tickfont/_weight.py b/plotly/validators/histogram/marker/colorbar/tickfont/_weight.py index 9c41796a7e..0d84fb1e37 100644 --- a/plotly/validators/histogram/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/histogram/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/histogram/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py index 15521f2bff..d3e2d4b7d9 100644 --- a/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/histogram/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="histogram.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py index 5bea80fea3..e8415d15f8 100644 --- a/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/histogram/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="histogram.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py b/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py index b72006f0cb..67db9a869c 100644 --- a/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/histogram/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="histogram.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py index 55c0548d53..59389bd3ee 100644 --- a/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/histogram/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="histogram.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py b/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py index 489bb5cbfd..2ba49d8494 100644 --- a/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/histogram/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="histogram.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/title/__init__.py b/plotly/validators/histogram/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/histogram/marker/colorbar/title/__init__.py +++ b/plotly/validators/histogram/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/histogram/marker/colorbar/title/_font.py b/plotly/validators/histogram/marker/colorbar/title/_font.py index 11acf7f156..560543c586 100644 --- a/plotly/validators/histogram/marker/colorbar/title/_font.py +++ b/plotly/validators/histogram/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/title/_side.py b/plotly/validators/histogram/marker/colorbar/title/_side.py index f90500dece..726be9e149 100644 --- a/plotly/validators/histogram/marker/colorbar/title/_side.py +++ b/plotly/validators/histogram/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="histogram.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/title/_text.py b/plotly/validators/histogram/marker/colorbar/title/_text.py index ab21c95a6f..496279d7f0 100644 --- a/plotly/validators/histogram/marker/colorbar/title/_text.py +++ b/plotly/validators/histogram/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/title/font/__init__.py b/plotly/validators/histogram/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_color.py b/plotly/validators/histogram/marker/colorbar/title/font/_color.py index 28e8980318..bd0264c1bc 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_color.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_family.py b/plotly/validators/histogram/marker/colorbar/title/font/_family.py index 3a115abc1a..1619a4fa36 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_family.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_lineposition.py b/plotly/validators/histogram/marker/colorbar/title/font/_lineposition.py index 2be2591c29..f020359dea 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_shadow.py b/plotly/validators/histogram/marker/colorbar/title/font/_shadow.py index a1c596c3d5..160dc4c1b8 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_size.py b/plotly/validators/histogram/marker/colorbar/title/font/_size.py index fd2ee40971..c5f0d1187c 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_size.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_style.py b/plotly/validators/histogram/marker/colorbar/title/font/_style.py index 8af596ae23..04000a6f06 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_style.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_textcase.py b/plotly/validators/histogram/marker/colorbar/title/font/_textcase.py index ee190081ef..cc4b2b0280 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_variant.py b/plotly/validators/histogram/marker/colorbar/title/font/_variant.py index 4323c91a22..fb0d630a83 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/marker/colorbar/title/font/_weight.py b/plotly/validators/histogram/marker/colorbar/title/font/_weight.py index 2c3604bcd4..ee5a588ae3 100644 --- a/plotly/validators/histogram/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/histogram/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/marker/line/__init__.py b/plotly/validators/histogram/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/histogram/marker/line/__init__.py +++ b/plotly/validators/histogram/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/histogram/marker/line/_autocolorscale.py b/plotly/validators/histogram/marker/line/_autocolorscale.py index a147e26524..7fb5cf7f1c 100644 --- a/plotly/validators/histogram/marker/line/_autocolorscale.py +++ b/plotly/validators/histogram/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="histogram.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram/marker/line/_cauto.py b/plotly/validators/histogram/marker/line/_cauto.py index d497ce9c42..c3210c4c68 100644 --- a/plotly/validators/histogram/marker/line/_cauto.py +++ b/plotly/validators/histogram/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="histogram.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram/marker/line/_cmax.py b/plotly/validators/histogram/marker/line/_cmax.py index 45edc59ba5..36ff70e1c2 100644 --- a/plotly/validators/histogram/marker/line/_cmax.py +++ b/plotly/validators/histogram/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="histogram.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/histogram/marker/line/_cmid.py b/plotly/validators/histogram/marker/line/_cmid.py index c7b50aedfb..380fb3da4f 100644 --- a/plotly/validators/histogram/marker/line/_cmid.py +++ b/plotly/validators/histogram/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="histogram.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram/marker/line/_cmin.py b/plotly/validators/histogram/marker/line/_cmin.py index 23f42bef4b..8f8ea1810e 100644 --- a/plotly/validators/histogram/marker/line/_cmin.py +++ b/plotly/validators/histogram/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="histogram.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/histogram/marker/line/_color.py b/plotly/validators/histogram/marker/line/_color.py index cf1fc96290..c90905297f 100644 --- a/plotly/validators/histogram/marker/line/_color.py +++ b/plotly/validators/histogram/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/histogram/marker/line/_coloraxis.py b/plotly/validators/histogram/marker/line/_coloraxis.py index 59beeae23e..f536a64e60 100644 --- a/plotly/validators/histogram/marker/line/_coloraxis.py +++ b/plotly/validators/histogram/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="histogram.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/histogram/marker/line/_colorscale.py b/plotly/validators/histogram/marker/line/_colorscale.py index c87c8a454f..0ae960062a 100644 --- a/plotly/validators/histogram/marker/line/_colorscale.py +++ b/plotly/validators/histogram/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="histogram.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/histogram/marker/line/_colorsrc.py b/plotly/validators/histogram/marker/line/_colorsrc.py index cde815b6c8..0817d92ea1 100644 --- a/plotly/validators/histogram/marker/line/_colorsrc.py +++ b/plotly/validators/histogram/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/line/_reversescale.py b/plotly/validators/histogram/marker/line/_reversescale.py index 1aeee3928e..a065f46192 100644 --- a/plotly/validators/histogram/marker/line/_reversescale.py +++ b/plotly/validators/histogram/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="histogram.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/line/_width.py b/plotly/validators/histogram/marker/line/_width.py index 9c023e3377..1aa3256939 100644 --- a/plotly/validators/histogram/marker/line/_width.py +++ b/plotly/validators/histogram/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="histogram.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/marker/line/_widthsrc.py b/plotly/validators/histogram/marker/line/_widthsrc.py index b7adae7fd7..d5331df48a 100644 --- a/plotly/validators/histogram/marker/line/_widthsrc.py +++ b/plotly/validators/histogram/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="histogram.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/pattern/__init__.py b/plotly/validators/histogram/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/histogram/marker/pattern/__init__.py +++ b/plotly/validators/histogram/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/histogram/marker/pattern/_bgcolor.py b/plotly/validators/histogram/marker/pattern/_bgcolor.py index 010c1f523b..334af9e265 100644 --- a/plotly/validators/histogram/marker/pattern/_bgcolor.py +++ b/plotly/validators/histogram/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/histogram/marker/pattern/_bgcolorsrc.py b/plotly/validators/histogram/marker/pattern/_bgcolorsrc.py index c98dada28d..c75ff8f26a 100644 --- a/plotly/validators/histogram/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/histogram/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="histogram.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/pattern/_fgcolor.py b/plotly/validators/histogram/marker/pattern/_fgcolor.py index 2af5dbaf5f..e8562b0152 100644 --- a/plotly/validators/histogram/marker/pattern/_fgcolor.py +++ b/plotly/validators/histogram/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="histogram.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/histogram/marker/pattern/_fgcolorsrc.py b/plotly/validators/histogram/marker/pattern/_fgcolorsrc.py index 7e83af259c..f6fdedb2e7 100644 --- a/plotly/validators/histogram/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/histogram/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="histogram.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/pattern/_fgopacity.py b/plotly/validators/histogram/marker/pattern/_fgopacity.py index 2499e1ca68..628fcc2007 100644 --- a/plotly/validators/histogram/marker/pattern/_fgopacity.py +++ b/plotly/validators/histogram/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="histogram.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/marker/pattern/_fillmode.py b/plotly/validators/histogram/marker/pattern/_fillmode.py index d2cfbd3eb6..dd11d97e70 100644 --- a/plotly/validators/histogram/marker/pattern/_fillmode.py +++ b/plotly/validators/histogram/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="histogram.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/histogram/marker/pattern/_shape.py b/plotly/validators/histogram/marker/pattern/_shape.py index aec59060cf..4606664b16 100644 --- a/plotly/validators/histogram/marker/pattern/_shape.py +++ b/plotly/validators/histogram/marker/pattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="histogram.marker.pattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/histogram/marker/pattern/_shapesrc.py b/plotly/validators/histogram/marker/pattern/_shapesrc.py index b495e591de..c1a31a7449 100644 --- a/plotly/validators/histogram/marker/pattern/_shapesrc.py +++ b/plotly/validators/histogram/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="histogram.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/pattern/_size.py b/plotly/validators/histogram/marker/pattern/_size.py index 014fefb1e2..079d8828d5 100644 --- a/plotly/validators/histogram/marker/pattern/_size.py +++ b/plotly/validators/histogram/marker/pattern/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.marker.pattern", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/marker/pattern/_sizesrc.py b/plotly/validators/histogram/marker/pattern/_sizesrc.py index 45cf2b6e67..9edd4518ab 100644 --- a/plotly/validators/histogram/marker/pattern/_sizesrc.py +++ b/plotly/validators/histogram/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="histogram.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/marker/pattern/_solidity.py b/plotly/validators/histogram/marker/pattern/_solidity.py index 661200abbc..c834a24c7e 100644 --- a/plotly/validators/histogram/marker/pattern/_solidity.py +++ b/plotly/validators/histogram/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="histogram.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/histogram/marker/pattern/_soliditysrc.py b/plotly/validators/histogram/marker/pattern/_soliditysrc.py index 7834f6a024..3d2358fb3b 100644 --- a/plotly/validators/histogram/marker/pattern/_soliditysrc.py +++ b/plotly/validators/histogram/marker/pattern/_soliditysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="histogram.marker.pattern", **kwargs, ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram/outsidetextfont/__init__.py b/plotly/validators/histogram/outsidetextfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram/outsidetextfont/__init__.py +++ b/plotly/validators/histogram/outsidetextfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/outsidetextfont/_color.py b/plotly/validators/histogram/outsidetextfont/_color.py index 64dcf2bf93..50ed518f6f 100644 --- a/plotly/validators/histogram/outsidetextfont/_color.py +++ b/plotly/validators/histogram/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/outsidetextfont/_family.py b/plotly/validators/histogram/outsidetextfont/_family.py index 97dd74bb22..c6c3883661 100644 --- a/plotly/validators/histogram/outsidetextfont/_family.py +++ b/plotly/validators/histogram/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/outsidetextfont/_lineposition.py b/plotly/validators/histogram/outsidetextfont/_lineposition.py index b812a08038..84acc10bfd 100644 --- a/plotly/validators/histogram/outsidetextfont/_lineposition.py +++ b/plotly/validators/histogram/outsidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.outsidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram/outsidetextfont/_shadow.py b/plotly/validators/histogram/outsidetextfont/_shadow.py index cbbb6ffa1f..d4a6ac6ae2 100644 --- a/plotly/validators/histogram/outsidetextfont/_shadow.py +++ b/plotly/validators/histogram/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/outsidetextfont/_size.py b/plotly/validators/histogram/outsidetextfont/_size.py index b3f1ebe370..21372921b8 100644 --- a/plotly/validators/histogram/outsidetextfont/_size.py +++ b/plotly/validators/histogram/outsidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram.outsidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/outsidetextfont/_style.py b/plotly/validators/histogram/outsidetextfont/_style.py index ce5c3d095c..7c0231bd35 100644 --- a/plotly/validators/histogram/outsidetextfont/_style.py +++ b/plotly/validators/histogram/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram/outsidetextfont/_textcase.py b/plotly/validators/histogram/outsidetextfont/_textcase.py index b7a75a664c..ef0fd20c00 100644 --- a/plotly/validators/histogram/outsidetextfont/_textcase.py +++ b/plotly/validators/histogram/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram/outsidetextfont/_variant.py b/plotly/validators/histogram/outsidetextfont/_variant.py index 560eb88168..345a1830d5 100644 --- a/plotly/validators/histogram/outsidetextfont/_variant.py +++ b/plotly/validators/histogram/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/outsidetextfont/_weight.py b/plotly/validators/histogram/outsidetextfont/_weight.py index efa9f0b80d..4d9f828e46 100644 --- a/plotly/validators/histogram/outsidetextfont/_weight.py +++ b/plotly/validators/histogram/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/selected/__init__.py b/plotly/validators/histogram/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/histogram/selected/__init__.py +++ b/plotly/validators/histogram/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/histogram/selected/_marker.py b/plotly/validators/histogram/selected/_marker.py index 8d8dfd38c8..c6338bd42f 100644 --- a/plotly/validators/histogram/selected/_marker.py +++ b/plotly/validators/histogram/selected/_marker.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="histogram.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. """, ), **kwargs, diff --git a/plotly/validators/histogram/selected/_textfont.py b/plotly/validators/histogram/selected/_textfont.py index bd180f15d6..f8b85dbec9 100644 --- a/plotly/validators/histogram/selected/_textfont.py +++ b/plotly/validators/histogram/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="histogram.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/histogram/selected/marker/__init__.py b/plotly/validators/histogram/selected/marker/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/histogram/selected/marker/__init__.py +++ b/plotly/validators/histogram/selected/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/histogram/selected/marker/_color.py b/plotly/validators/histogram/selected/marker/_color.py index d3c03aacda..7583cb0969 100644 --- a/plotly/validators/histogram/selected/marker/_color.py +++ b/plotly/validators/histogram/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/selected/marker/_opacity.py b/plotly/validators/histogram/selected/marker/_opacity.py index 37fcec0d8d..e611375bcd 100644 --- a/plotly/validators/histogram/selected/marker/_opacity.py +++ b/plotly/validators/histogram/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="histogram.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/selected/textfont/__init__.py b/plotly/validators/histogram/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/histogram/selected/textfont/__init__.py +++ b/plotly/validators/histogram/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/histogram/selected/textfont/_color.py b/plotly/validators/histogram/selected/textfont/_color.py index 2cfd81581c..a295f9ec39 100644 --- a/plotly/validators/histogram/selected/textfont/_color.py +++ b/plotly/validators/histogram/selected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.selected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/stream/__init__.py b/plotly/validators/histogram/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/histogram/stream/__init__.py +++ b/plotly/validators/histogram/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/histogram/stream/_maxpoints.py b/plotly/validators/histogram/stream/_maxpoints.py index c40dfceca8..e8df75e5cb 100644 --- a/plotly/validators/histogram/stream/_maxpoints.py +++ b/plotly/validators/histogram/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="histogram.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/stream/_token.py b/plotly/validators/histogram/stream/_token.py index 4c735675ac..93cfdfc56a 100644 --- a/plotly/validators/histogram/stream/_token.py +++ b/plotly/validators/histogram/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="histogram.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/textfont/__init__.py b/plotly/validators/histogram/textfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram/textfont/__init__.py +++ b/plotly/validators/histogram/textfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram/textfont/_color.py b/plotly/validators/histogram/textfont/_color.py index 78a6943e61..6c5953e2df 100644 --- a/plotly/validators/histogram/textfont/_color.py +++ b/plotly/validators/histogram/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="histogram.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/textfont/_family.py b/plotly/validators/histogram/textfont/_family.py index 980d11de94..39c35ac7bf 100644 --- a/plotly/validators/histogram/textfont/_family.py +++ b/plotly/validators/histogram/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram/textfont/_lineposition.py b/plotly/validators/histogram/textfont/_lineposition.py index a432cf79f3..c012009d97 100644 --- a/plotly/validators/histogram/textfont/_lineposition.py +++ b/plotly/validators/histogram/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram/textfont/_shadow.py b/plotly/validators/histogram/textfont/_shadow.py index ee99540c46..d81c93483a 100644 --- a/plotly/validators/histogram/textfont/_shadow.py +++ b/plotly/validators/histogram/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram/textfont/_size.py b/plotly/validators/histogram/textfont/_size.py index 95f7d44160..a049e2a3fd 100644 --- a/plotly/validators/histogram/textfont/_size.py +++ b/plotly/validators/histogram/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="histogram.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram/textfont/_style.py b/plotly/validators/histogram/textfont/_style.py index 7ccec71375..4109361c58 100644 --- a/plotly/validators/histogram/textfont/_style.py +++ b/plotly/validators/histogram/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="histogram.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram/textfont/_textcase.py b/plotly/validators/histogram/textfont/_textcase.py index f9293cacf5..b0274196e2 100644 --- a/plotly/validators/histogram/textfont/_textcase.py +++ b/plotly/validators/histogram/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram/textfont/_variant.py b/plotly/validators/histogram/textfont/_variant.py index b036869f1b..6f5dd71694 100644 --- a/plotly/validators/histogram/textfont/_variant.py +++ b/plotly/validators/histogram/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram/textfont/_weight.py b/plotly/validators/histogram/textfont/_weight.py index daebfb1baf..34ed0cfa98 100644 --- a/plotly/validators/histogram/textfont/_weight.py +++ b/plotly/validators/histogram/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram/unselected/__init__.py b/plotly/validators/histogram/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/histogram/unselected/__init__.py +++ b/plotly/validators/histogram/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/histogram/unselected/_marker.py b/plotly/validators/histogram/unselected/_marker.py index 6e3faf7c3c..5d8863649a 100644 --- a/plotly/validators/histogram/unselected/_marker.py +++ b/plotly/validators/histogram/unselected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="histogram.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/histogram/unselected/_textfont.py b/plotly/validators/histogram/unselected/_textfont.py index 26537aacd6..9e00a36a3a 100644 --- a/plotly/validators/histogram/unselected/_textfont.py +++ b/plotly/validators/histogram/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="histogram.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/histogram/unselected/marker/__init__.py b/plotly/validators/histogram/unselected/marker/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/histogram/unselected/marker/__init__.py +++ b/plotly/validators/histogram/unselected/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/histogram/unselected/marker/_color.py b/plotly/validators/histogram/unselected/marker/_color.py index 1dfaa9e5ec..ce0870e3e5 100644 --- a/plotly/validators/histogram/unselected/marker/_color.py +++ b/plotly/validators/histogram/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/unselected/marker/_opacity.py b/plotly/validators/histogram/unselected/marker/_opacity.py index 3e2176bcd2..3c02f7af70 100644 --- a/plotly/validators/histogram/unselected/marker/_opacity.py +++ b/plotly/validators/histogram/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="histogram.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram/unselected/textfont/__init__.py b/plotly/validators/histogram/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/histogram/unselected/textfont/__init__.py +++ b/plotly/validators/histogram/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/histogram/unselected/textfont/_color.py b/plotly/validators/histogram/unselected/textfont/_color.py index 3e2c8d1676..a959a8eb7e 100644 --- a/plotly/validators/histogram/unselected/textfont/_color.py +++ b/plotly/validators/histogram/unselected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram.unselected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram/xbins/__init__.py b/plotly/validators/histogram/xbins/__init__.py index b7d1eaa9fc..462d290b54 100644 --- a/plotly/validators/histogram/xbins/__init__.py +++ b/plotly/validators/histogram/xbins/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._start import StartValidator - from ._size import SizeValidator - from ._end import EndValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], +) diff --git a/plotly/validators/histogram/xbins/_end.py b/plotly/validators/histogram/xbins/_end.py index dc0a8cc6a1..6c07ea9c9b 100644 --- a/plotly/validators/histogram/xbins/_end.py +++ b/plotly/validators/histogram/xbins/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.AnyValidator): +class EndValidator(_bv.AnyValidator): def __init__(self, plotly_name="end", parent_name="histogram.xbins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/xbins/_size.py b/plotly/validators/histogram/xbins/_size.py index 4382d51e28..6cbff50c1d 100644 --- a/plotly/validators/histogram/xbins/_size.py +++ b/plotly/validators/histogram/xbins/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): +class SizeValidator(_bv.AnyValidator): def __init__(self, plotly_name="size", parent_name="histogram.xbins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/xbins/_start.py b/plotly/validators/histogram/xbins/_start.py index 8092374521..03559e9410 100644 --- a/plotly/validators/histogram/xbins/_start.py +++ b/plotly/validators/histogram/xbins/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.AnyValidator): +class StartValidator(_bv.AnyValidator): def __init__(self, plotly_name="start", parent_name="histogram.xbins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/ybins/__init__.py b/plotly/validators/histogram/ybins/__init__.py index b7d1eaa9fc..462d290b54 100644 --- a/plotly/validators/histogram/ybins/__init__.py +++ b/plotly/validators/histogram/ybins/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._start import StartValidator - from ._size import SizeValidator - from ._end import EndValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], +) diff --git a/plotly/validators/histogram/ybins/_end.py b/plotly/validators/histogram/ybins/_end.py index d25968beeb..244010606d 100644 --- a/plotly/validators/histogram/ybins/_end.py +++ b/plotly/validators/histogram/ybins/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.AnyValidator): +class EndValidator(_bv.AnyValidator): def __init__(self, plotly_name="end", parent_name="histogram.ybins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/ybins/_size.py b/plotly/validators/histogram/ybins/_size.py index 6e27ccf638..f152665505 100644 --- a/plotly/validators/histogram/ybins/_size.py +++ b/plotly/validators/histogram/ybins/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): +class SizeValidator(_bv.AnyValidator): def __init__(self, plotly_name="size", parent_name="histogram.ybins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram/ybins/_start.py b/plotly/validators/histogram/ybins/_start.py index c84311c5b1..94547c09d6 100644 --- a/plotly/validators/histogram/ybins/_start.py +++ b/plotly/validators/histogram/ybins/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.AnyValidator): +class StartValidator(_bv.AnyValidator): def __init__(self, plotly_name="start", parent_name="histogram.ybins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/__init__.py b/plotly/validators/histogram2d/__init__.py index 8235426b27..89c9072f7c 100644 --- a/plotly/validators/histogram2d/__init__.py +++ b/plotly/validators/histogram2d/__init__.py @@ -1,139 +1,72 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zsmooth import ZsmoothValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zhoverformat import ZhoverformatValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._ygap import YgapValidator - from ._ycalendar import YcalendarValidator - from ._ybins import YbinsValidator - from ._ybingroup import YbingroupValidator - from ._yaxis import YaxisValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xgap import XgapValidator - from ._xcalendar import XcalendarValidator - from ._xbins import XbinsValidator - from ._xbingroup import XbingroupValidator - from ._xaxis import XaxisValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplate import TexttemplateValidator - from ._textfont import TextfontValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._nbinsy import NbinsyValidator - from ._nbinsx import NbinsxValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._histnorm import HistnormValidator - from ._histfunc import HistfuncValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._bingroup import BingroupValidator - from ._autocolorscale import AutocolorscaleValidator - from ._autobiny import AutobinyValidator - from ._autobinx import AutobinxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zsmooth.ZsmoothValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zhoverformat.ZhoverformatValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._ygap.YgapValidator", - "._ycalendar.YcalendarValidator", - "._ybins.YbinsValidator", - "._ybingroup.YbingroupValidator", - "._yaxis.YaxisValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xgap.XgapValidator", - "._xcalendar.XcalendarValidator", - "._xbins.XbinsValidator", - "._xbingroup.XbingroupValidator", - "._xaxis.XaxisValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplate.TexttemplateValidator", - "._textfont.TextfontValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._nbinsy.NbinsyValidator", - "._nbinsx.NbinsxValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._histnorm.HistnormValidator", - "._histfunc.HistfuncValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._bingroup.BingroupValidator", - "._autocolorscale.AutocolorscaleValidator", - "._autobiny.AutobinyValidator", - "._autobinx.AutobinxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zsmooth.ZsmoothValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._ygap.YgapValidator", + "._ycalendar.YcalendarValidator", + "._ybins.YbinsValidator", + "._ybingroup.YbingroupValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xgap.XgapValidator", + "._xcalendar.XcalendarValidator", + "._xbins.XbinsValidator", + "._xbingroup.XbingroupValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplate.TexttemplateValidator", + "._textfont.TextfontValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._nbinsy.NbinsyValidator", + "._nbinsx.NbinsxValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._histnorm.HistnormValidator", + "._histfunc.HistfuncValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._bingroup.BingroupValidator", + "._autocolorscale.AutocolorscaleValidator", + "._autobiny.AutobinyValidator", + "._autobinx.AutobinxValidator", + ], +) diff --git a/plotly/validators/histogram2d/_autobinx.py b/plotly/validators/histogram2d/_autobinx.py index cb23f36988..ada334e049 100644 --- a/plotly/validators/histogram2d/_autobinx.py +++ b/plotly/validators/histogram2d/_autobinx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutobinxValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autobinx", parent_name="histogram2d", **kwargs): - super(AutobinxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_autobiny.py b/plotly/validators/histogram2d/_autobiny.py index 3f27a73c55..a7c3dd2859 100644 --- a/plotly/validators/histogram2d/_autobiny.py +++ b/plotly/validators/histogram2d/_autobiny.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutobinyValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autobiny", parent_name="histogram2d", **kwargs): - super(AutobinyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_autocolorscale.py b/plotly/validators/histogram2d/_autocolorscale.py index 08ce9a1c1c..6bd3847217 100644 --- a/plotly/validators/histogram2d/_autocolorscale.py +++ b/plotly/validators/histogram2d/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="histogram2d", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2d/_bingroup.py b/plotly/validators/histogram2d/_bingroup.py index 0f1658fadd..1eadd6ee25 100644 --- a/plotly/validators/histogram2d/_bingroup.py +++ b/plotly/validators/histogram2d/_bingroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BingroupValidator(_plotly_utils.basevalidators.StringValidator): +class BingroupValidator(_bv.StringValidator): def __init__(self, plotly_name="bingroup", parent_name="histogram2d", **kwargs): - super(BingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_coloraxis.py b/plotly/validators/histogram2d/_coloraxis.py index 3752d352af..18628074d1 100644 --- a/plotly/validators/histogram2d/_coloraxis.py +++ b/plotly/validators/histogram2d/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="histogram2d", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/histogram2d/_colorbar.py b/plotly/validators/histogram2d/_colorbar.py index 34a6015929..4219a2f066 100644 --- a/plotly/validators/histogram2d/_colorbar.py +++ b/plotly/validators/histogram2d/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="histogram2d", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2d.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2d.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - histogram2d.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2d.colorb - ar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_colorscale.py b/plotly/validators/histogram2d/_colorscale.py index d67e8c17f7..799993034b 100644 --- a/plotly/validators/histogram2d/_colorscale.py +++ b/plotly/validators/histogram2d/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="histogram2d", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/histogram2d/_customdata.py b/plotly/validators/histogram2d/_customdata.py index 689d1d6778..104413a405 100644 --- a/plotly/validators/histogram2d/_customdata.py +++ b/plotly/validators/histogram2d/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="histogram2d", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_customdatasrc.py b/plotly/validators/histogram2d/_customdatasrc.py index a4ec9b0e80..0acf9d6ba7 100644 --- a/plotly/validators/histogram2d/_customdatasrc.py +++ b/plotly/validators/histogram2d/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="histogram2d", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_histfunc.py b/plotly/validators/histogram2d/_histfunc.py index f1b4fc06ef..afd15f4bc8 100644 --- a/plotly/validators/histogram2d/_histfunc.py +++ b/plotly/validators/histogram2d/_histfunc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HistfuncValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="histfunc", parent_name="histogram2d", **kwargs): - super(HistfuncValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), **kwargs, diff --git a/plotly/validators/histogram2d/_histnorm.py b/plotly/validators/histogram2d/_histnorm.py index 3632922d45..689f638280 100644 --- a/plotly/validators/histogram2d/_histnorm.py +++ b/plotly/validators/histogram2d/_histnorm.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HistnormValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="histnorm", parent_name="histogram2d", **kwargs): - super(HistnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/_hoverinfo.py b/plotly/validators/histogram2d/_hoverinfo.py index d813d25313..3c6065d120 100644 --- a/plotly/validators/histogram2d/_hoverinfo.py +++ b/plotly/validators/histogram2d/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="histogram2d", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/histogram2d/_hoverinfosrc.py b/plotly/validators/histogram2d/_hoverinfosrc.py index 7c93eb9702..c6c9a6da3e 100644 --- a/plotly/validators/histogram2d/_hoverinfosrc.py +++ b/plotly/validators/histogram2d/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="histogram2d", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_hoverlabel.py b/plotly/validators/histogram2d/_hoverlabel.py index 7aa44eec57..de460f33fd 100644 --- a/plotly/validators/histogram2d/_hoverlabel.py +++ b/plotly/validators/histogram2d/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="histogram2d", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_hovertemplate.py b/plotly/validators/histogram2d/_hovertemplate.py index 6a8dbdbd68..ab3523c6b4 100644 --- a/plotly/validators/histogram2d/_hovertemplate.py +++ b/plotly/validators/histogram2d/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="histogram2d", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2d/_hovertemplatesrc.py b/plotly/validators/histogram2d/_hovertemplatesrc.py index 23d374d6f8..e2b75fc0b4 100644 --- a/plotly/validators/histogram2d/_hovertemplatesrc.py +++ b/plotly/validators/histogram2d/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="histogram2d", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_ids.py b/plotly/validators/histogram2d/_ids.py index 6731217d87..d56b7d29df 100644 --- a/plotly/validators/histogram2d/_ids.py +++ b/plotly/validators/histogram2d/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="histogram2d", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_idssrc.py b/plotly/validators/histogram2d/_idssrc.py index 544a46eda9..a5802d100f 100644 --- a/plotly/validators/histogram2d/_idssrc.py +++ b/plotly/validators/histogram2d/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="histogram2d", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_legend.py b/plotly/validators/histogram2d/_legend.py index cfdc64740e..3955611eb5 100644 --- a/plotly/validators/histogram2d/_legend.py +++ b/plotly/validators/histogram2d/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="histogram2d", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/histogram2d/_legendgroup.py b/plotly/validators/histogram2d/_legendgroup.py index fa13e39d6f..34c5104320 100644 --- a/plotly/validators/histogram2d/_legendgroup.py +++ b/plotly/validators/histogram2d/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="histogram2d", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_legendgrouptitle.py b/plotly/validators/histogram2d/_legendgrouptitle.py index cfb798fac0..0ef933a84d 100644 --- a/plotly/validators/histogram2d/_legendgrouptitle.py +++ b/plotly/validators/histogram2d/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="histogram2d", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_legendrank.py b/plotly/validators/histogram2d/_legendrank.py index 0d6edf3a03..78a67e3df6 100644 --- a/plotly/validators/histogram2d/_legendrank.py +++ b/plotly/validators/histogram2d/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="histogram2d", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_legendwidth.py b/plotly/validators/histogram2d/_legendwidth.py index a130cb3840..34d70492df 100644 --- a/plotly/validators/histogram2d/_legendwidth.py +++ b/plotly/validators/histogram2d/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="histogram2d", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/_marker.py b/plotly/validators/histogram2d/_marker.py index d900e420cd..98feda98e6 100644 --- a/plotly/validators/histogram2d/_marker.py +++ b/plotly/validators/histogram2d/_marker.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="histogram2d", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_meta.py b/plotly/validators/histogram2d/_meta.py index e33212ed3c..310faf86c2 100644 --- a/plotly/validators/histogram2d/_meta.py +++ b/plotly/validators/histogram2d/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="histogram2d", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/histogram2d/_metasrc.py b/plotly/validators/histogram2d/_metasrc.py index 7607c3094d..e890c8d1fe 100644 --- a/plotly/validators/histogram2d/_metasrc.py +++ b/plotly/validators/histogram2d/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="histogram2d", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_name.py b/plotly/validators/histogram2d/_name.py index b29010853f..a4504ee843 100644 --- a/plotly/validators/histogram2d/_name.py +++ b/plotly/validators/histogram2d/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="histogram2d", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_nbinsx.py b/plotly/validators/histogram2d/_nbinsx.py index a3f712e272..919b5c62eb 100644 --- a/plotly/validators/histogram2d/_nbinsx.py +++ b/plotly/validators/histogram2d/_nbinsx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): +class NbinsxValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nbinsx", parent_name="histogram2d", **kwargs): - super(NbinsxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/_nbinsy.py b/plotly/validators/histogram2d/_nbinsy.py index 4fc5eb4110..153454592b 100644 --- a/plotly/validators/histogram2d/_nbinsy.py +++ b/plotly/validators/histogram2d/_nbinsy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): +class NbinsyValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nbinsy", parent_name="histogram2d", **kwargs): - super(NbinsyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/_opacity.py b/plotly/validators/histogram2d/_opacity.py index ec0df2d930..be221696c3 100644 --- a/plotly/validators/histogram2d/_opacity.py +++ b/plotly/validators/histogram2d/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="histogram2d", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram2d/_reversescale.py b/plotly/validators/histogram2d/_reversescale.py index 728062aa28..379b6e35f1 100644 --- a/plotly/validators/histogram2d/_reversescale.py +++ b/plotly/validators/histogram2d/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="histogram2d", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_showlegend.py b/plotly/validators/histogram2d/_showlegend.py index 3739c82b2d..a081e7d42d 100644 --- a/plotly/validators/histogram2d/_showlegend.py +++ b/plotly/validators/histogram2d/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="histogram2d", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_showscale.py b/plotly/validators/histogram2d/_showscale.py index ea737065f4..f68cdd4dec 100644 --- a/plotly/validators/histogram2d/_showscale.py +++ b/plotly/validators/histogram2d/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="histogram2d", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_stream.py b/plotly/validators/histogram2d/_stream.py index b5039d2d23..b0725a8b05 100644 --- a/plotly/validators/histogram2d/_stream.py +++ b/plotly/validators/histogram2d/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="histogram2d", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_textfont.py b/plotly/validators/histogram2d/_textfont.py index 12df3e7e3c..5d2ff66d67 100644 --- a/plotly/validators/histogram2d/_textfont.py +++ b/plotly/validators/histogram2d/_textfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="histogram2d", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_texttemplate.py b/plotly/validators/histogram2d/_texttemplate.py index 838ce48564..a601dd60d0 100644 --- a/plotly/validators/histogram2d/_texttemplate.py +++ b/plotly/validators/histogram2d/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="histogram2d", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_uid.py b/plotly/validators/histogram2d/_uid.py index cd718774ec..35784cdc6d 100644 --- a/plotly/validators/histogram2d/_uid.py +++ b/plotly/validators/histogram2d/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="histogram2d", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_uirevision.py b/plotly/validators/histogram2d/_uirevision.py index b44559694c..3768f23c6a 100644 --- a/plotly/validators/histogram2d/_uirevision.py +++ b/plotly/validators/histogram2d/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="histogram2d", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_visible.py b/plotly/validators/histogram2d/_visible.py index 9bd7327491..45015507ad 100644 --- a/plotly/validators/histogram2d/_visible.py +++ b/plotly/validators/histogram2d/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="histogram2d", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/histogram2d/_x.py b/plotly/validators/histogram2d/_x.py index bb41a430d0..1f294e4d51 100644 --- a/plotly/validators/histogram2d/_x.py +++ b/plotly/validators/histogram2d/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="histogram2d", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_xaxis.py b/plotly/validators/histogram2d/_xaxis.py index e7b2913f63..62cd51e234 100644 --- a/plotly/validators/histogram2d/_xaxis.py +++ b/plotly/validators/histogram2d/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="histogram2d", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/histogram2d/_xbingroup.py b/plotly/validators/histogram2d/_xbingroup.py index bcd1ac76dc..a05e1105e6 100644 --- a/plotly/validators/histogram2d/_xbingroup.py +++ b/plotly/validators/histogram2d/_xbingroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XbingroupValidator(_plotly_utils.basevalidators.StringValidator): +class XbingroupValidator(_bv.StringValidator): def __init__(self, plotly_name="xbingroup", parent_name="histogram2d", **kwargs): - super(XbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_xbins.py b/plotly/validators/histogram2d/_xbins.py index 6af103be43..59c640ffe3 100644 --- a/plotly/validators/histogram2d/_xbins.py +++ b/plotly/validators/histogram2d/_xbins.py @@ -1,49 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XbinsValidator(_plotly_utils.basevalidators.CompoundValidator): +class XbinsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="xbins", parent_name="histogram2d", **kwargs): - super(XbinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "XBins"), data_docs=kwargs.pop( "data_docs", """ - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_xcalendar.py b/plotly/validators/histogram2d/_xcalendar.py index 9e3688906b..34506390a8 100644 --- a/plotly/validators/histogram2d/_xcalendar.py +++ b/plotly/validators/histogram2d/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="histogram2d", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/_xgap.py b/plotly/validators/histogram2d/_xgap.py index 7b0306c629..2441f80ae9 100644 --- a/plotly/validators/histogram2d/_xgap.py +++ b/plotly/validators/histogram2d/_xgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XgapValidator(_plotly_utils.basevalidators.NumberValidator): +class XgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="xgap", parent_name="histogram2d", **kwargs): - super(XgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/_xhoverformat.py b/plotly/validators/histogram2d/_xhoverformat.py index 798a436176..45a26e90e4 100644 --- a/plotly/validators/histogram2d/_xhoverformat.py +++ b/plotly/validators/histogram2d/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="histogram2d", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_xsrc.py b/plotly/validators/histogram2d/_xsrc.py index 4b4d090f3a..624723bfda 100644 --- a/plotly/validators/histogram2d/_xsrc.py +++ b/plotly/validators/histogram2d/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="histogram2d", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_y.py b/plotly/validators/histogram2d/_y.py index 9fe7b86034..d8bae10c46 100644 --- a/plotly/validators/histogram2d/_y.py +++ b/plotly/validators/histogram2d/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="histogram2d", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_yaxis.py b/plotly/validators/histogram2d/_yaxis.py index f4d10f22b3..4cd41b2f3a 100644 --- a/plotly/validators/histogram2d/_yaxis.py +++ b/plotly/validators/histogram2d/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="histogram2d", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/histogram2d/_ybingroup.py b/plotly/validators/histogram2d/_ybingroup.py index 0c6a9ccdb0..11793794b1 100644 --- a/plotly/validators/histogram2d/_ybingroup.py +++ b/plotly/validators/histogram2d/_ybingroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YbingroupValidator(_plotly_utils.basevalidators.StringValidator): +class YbingroupValidator(_bv.StringValidator): def __init__(self, plotly_name="ybingroup", parent_name="histogram2d", **kwargs): - super(YbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_ybins.py b/plotly/validators/histogram2d/_ybins.py index bae9002224..6dc8d8ca13 100644 --- a/plotly/validators/histogram2d/_ybins.py +++ b/plotly/validators/histogram2d/_ybins.py @@ -1,49 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YbinsValidator(_plotly_utils.basevalidators.CompoundValidator): +class YbinsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="ybins", parent_name="histogram2d", **kwargs): - super(YbinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "YBins"), data_docs=kwargs.pop( "data_docs", """ - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/_ycalendar.py b/plotly/validators/histogram2d/_ycalendar.py index 8a84822bc4..ea32963c9b 100644 --- a/plotly/validators/histogram2d/_ycalendar.py +++ b/plotly/validators/histogram2d/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="histogram2d", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/_ygap.py b/plotly/validators/histogram2d/_ygap.py index ffea1ce013..85a2a87809 100644 --- a/plotly/validators/histogram2d/_ygap.py +++ b/plotly/validators/histogram2d/_ygap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YgapValidator(_plotly_utils.basevalidators.NumberValidator): +class YgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="ygap", parent_name="histogram2d", **kwargs): - super(YgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/_yhoverformat.py b/plotly/validators/histogram2d/_yhoverformat.py index 0b98b1b848..a08b7e7c62 100644 --- a/plotly/validators/histogram2d/_yhoverformat.py +++ b/plotly/validators/histogram2d/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="histogram2d", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_ysrc.py b/plotly/validators/histogram2d/_ysrc.py index 7ef42b4cd7..3553c78f29 100644 --- a/plotly/validators/histogram2d/_ysrc.py +++ b/plotly/validators/histogram2d/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="histogram2d", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_z.py b/plotly/validators/histogram2d/_z.py index 678ab9b59e..8cda958b25 100644 --- a/plotly/validators/histogram2d/_z.py +++ b/plotly/validators/histogram2d/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="histogram2d", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_zauto.py b/plotly/validators/histogram2d/_zauto.py index 80d5c0216e..7a11739e0d 100644 --- a/plotly/validators/histogram2d/_zauto.py +++ b/plotly/validators/histogram2d/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="histogram2d", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2d/_zhoverformat.py b/plotly/validators/histogram2d/_zhoverformat.py index abd76b38c5..25affceb7f 100644 --- a/plotly/validators/histogram2d/_zhoverformat.py +++ b/plotly/validators/histogram2d/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="histogram2d", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/_zmax.py b/plotly/validators/histogram2d/_zmax.py index ca7a15d814..06cbbd807c 100644 --- a/plotly/validators/histogram2d/_zmax.py +++ b/plotly/validators/histogram2d/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="histogram2d", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/histogram2d/_zmid.py b/plotly/validators/histogram2d/_zmid.py index 81ff840dd3..7f442661bc 100644 --- a/plotly/validators/histogram2d/_zmid.py +++ b/plotly/validators/histogram2d/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="histogram2d", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2d/_zmin.py b/plotly/validators/histogram2d/_zmin.py index 371b3b061d..625f83fee1 100644 --- a/plotly/validators/histogram2d/_zmin.py +++ b/plotly/validators/histogram2d/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="histogram2d", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/histogram2d/_zsmooth.py b/plotly/validators/histogram2d/_zsmooth.py index 8e14e722c9..ad7f44f0c8 100644 --- a/plotly/validators/histogram2d/_zsmooth.py +++ b/plotly/validators/histogram2d/_zsmooth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ZsmoothValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="zsmooth", parent_name="histogram2d", **kwargs): - super(ZsmoothValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fast", "best", False]), **kwargs, diff --git a/plotly/validators/histogram2d/_zsrc.py b/plotly/validators/histogram2d/_zsrc.py index 3a0287d50e..fe4bf5bd83 100644 --- a/plotly/validators/histogram2d/_zsrc.py +++ b/plotly/validators/histogram2d/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="histogram2d", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/__init__.py b/plotly/validators/histogram2d/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/histogram2d/colorbar/__init__.py +++ b/plotly/validators/histogram2d/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/histogram2d/colorbar/_bgcolor.py b/plotly/validators/histogram2d/colorbar/_bgcolor.py index f0a87bb376..c27e606e18 100644 --- a/plotly/validators/histogram2d/colorbar/_bgcolor.py +++ b/plotly/validators/histogram2d/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram2d.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_bordercolor.py b/plotly/validators/histogram2d/colorbar/_bordercolor.py index 9a31968347..23534c68e9 100644 --- a/plotly/validators/histogram2d/colorbar/_bordercolor.py +++ b/plotly/validators/histogram2d/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram2d.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_borderwidth.py b/plotly/validators/histogram2d/colorbar/_borderwidth.py index e084d1c396..804898e8e5 100644 --- a/plotly/validators/histogram2d/colorbar/_borderwidth.py +++ b/plotly/validators/histogram2d/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="histogram2d.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_dtick.py b/plotly/validators/histogram2d/colorbar/_dtick.py index fb54153501..c1b40e458c 100644 --- a/plotly/validators/histogram2d/colorbar/_dtick.py +++ b/plotly/validators/histogram2d/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="histogram2d.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_exponentformat.py b/plotly/validators/histogram2d/colorbar/_exponentformat.py index 5910c6b714..58a6198cda 100644 --- a/plotly/validators/histogram2d/colorbar/_exponentformat.py +++ b/plotly/validators/histogram2d/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="histogram2d.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_labelalias.py b/plotly/validators/histogram2d/colorbar/_labelalias.py index 05d6167f3a..2178c24627 100644 --- a/plotly/validators/histogram2d/colorbar/_labelalias.py +++ b/plotly/validators/histogram2d/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="histogram2d.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_len.py b/plotly/validators/histogram2d/colorbar/_len.py index 8474837c98..84404f3a42 100644 --- a/plotly/validators/histogram2d/colorbar/_len.py +++ b/plotly/validators/histogram2d/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="histogram2d.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_lenmode.py b/plotly/validators/histogram2d/colorbar/_lenmode.py index feb41d9a41..7495e85a54 100644 --- a/plotly/validators/histogram2d/colorbar/_lenmode.py +++ b/plotly/validators/histogram2d/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="histogram2d.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_minexponent.py b/plotly/validators/histogram2d/colorbar/_minexponent.py index 5fe6201e4c..0d736351dd 100644 --- a/plotly/validators/histogram2d/colorbar/_minexponent.py +++ b/plotly/validators/histogram2d/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="histogram2d.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_nticks.py b/plotly/validators/histogram2d/colorbar/_nticks.py index 0623df6811..2afba98f8c 100644 --- a/plotly/validators/histogram2d/colorbar/_nticks.py +++ b/plotly/validators/histogram2d/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="histogram2d.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_orientation.py b/plotly/validators/histogram2d/colorbar/_orientation.py index 513cf705f8..5e0fda398e 100644 --- a/plotly/validators/histogram2d/colorbar/_orientation.py +++ b/plotly/validators/histogram2d/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="histogram2d.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_outlinecolor.py b/plotly/validators/histogram2d/colorbar/_outlinecolor.py index 998ba3f3c1..5dda477f6e 100644 --- a/plotly/validators/histogram2d/colorbar/_outlinecolor.py +++ b/plotly/validators/histogram2d/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="histogram2d.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_outlinewidth.py b/plotly/validators/histogram2d/colorbar/_outlinewidth.py index f25a3af09b..2a8f4c48b5 100644 --- a/plotly/validators/histogram2d/colorbar/_outlinewidth.py +++ b/plotly/validators/histogram2d/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="histogram2d.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_separatethousands.py b/plotly/validators/histogram2d/colorbar/_separatethousands.py index 2047d92a70..d41bf50b6a 100644 --- a/plotly/validators/histogram2d/colorbar/_separatethousands.py +++ b/plotly/validators/histogram2d/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="histogram2d.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_showexponent.py b/plotly/validators/histogram2d/colorbar/_showexponent.py index e79cdc4635..5f445b2c8c 100644 --- a/plotly/validators/histogram2d/colorbar/_showexponent.py +++ b/plotly/validators/histogram2d/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="histogram2d.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_showticklabels.py b/plotly/validators/histogram2d/colorbar/_showticklabels.py index 001fd9e6e5..178e1d506e 100644 --- a/plotly/validators/histogram2d/colorbar/_showticklabels.py +++ b/plotly/validators/histogram2d/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="histogram2d.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_showtickprefix.py b/plotly/validators/histogram2d/colorbar/_showtickprefix.py index 632202293b..8543c747ad 100644 --- a/plotly/validators/histogram2d/colorbar/_showtickprefix.py +++ b/plotly/validators/histogram2d/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="histogram2d.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_showticksuffix.py b/plotly/validators/histogram2d/colorbar/_showticksuffix.py index a207879994..550fe24fbf 100644 --- a/plotly/validators/histogram2d/colorbar/_showticksuffix.py +++ b/plotly/validators/histogram2d/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="histogram2d.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_thickness.py b/plotly/validators/histogram2d/colorbar/_thickness.py index a05feaf35d..983c35d2b9 100644 --- a/plotly/validators/histogram2d/colorbar/_thickness.py +++ b/plotly/validators/histogram2d/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="histogram2d.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_thicknessmode.py b/plotly/validators/histogram2d/colorbar/_thicknessmode.py index 6fe782ed79..062f3a3cee 100644 --- a/plotly/validators/histogram2d/colorbar/_thicknessmode.py +++ b/plotly/validators/histogram2d/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="histogram2d.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_tick0.py b/plotly/validators/histogram2d/colorbar/_tick0.py index eb35bd6adb..a92de73894 100644 --- a/plotly/validators/histogram2d/colorbar/_tick0.py +++ b/plotly/validators/histogram2d/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="histogram2d.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_tickangle.py b/plotly/validators/histogram2d/colorbar/_tickangle.py index 7885371d7d..4965436742 100644 --- a/plotly/validators/histogram2d/colorbar/_tickangle.py +++ b/plotly/validators/histogram2d/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="histogram2d.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_tickcolor.py b/plotly/validators/histogram2d/colorbar/_tickcolor.py index 66d7df27ae..ad0432b6bb 100644 --- a/plotly/validators/histogram2d/colorbar/_tickcolor.py +++ b/plotly/validators/histogram2d/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="histogram2d.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_tickfont.py b/plotly/validators/histogram2d/colorbar/_tickfont.py index e83e136d26..e22cc6fc2b 100644 --- a/plotly/validators/histogram2d/colorbar/_tickfont.py +++ b/plotly/validators/histogram2d/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="histogram2d.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_tickformat.py b/plotly/validators/histogram2d/colorbar/_tickformat.py index 5e8f328001..580b1fa873 100644 --- a/plotly/validators/histogram2d/colorbar/_tickformat.py +++ b/plotly/validators/histogram2d/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="histogram2d.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py b/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py index 791798e180..eaa8dc219d 100644 --- a/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/histogram2d/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="histogram2d.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/histogram2d/colorbar/_tickformatstops.py b/plotly/validators/histogram2d/colorbar/_tickformatstops.py index 89aaad2f9b..b1ab9694da 100644 --- a/plotly/validators/histogram2d/colorbar/_tickformatstops.py +++ b/plotly/validators/histogram2d/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="histogram2d.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_ticklabeloverflow.py b/plotly/validators/histogram2d/colorbar/_ticklabeloverflow.py index 59bf93ad10..2f30ce777f 100644 --- a/plotly/validators/histogram2d/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/histogram2d/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="histogram2d.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_ticklabelposition.py b/plotly/validators/histogram2d/colorbar/_ticklabelposition.py index 8d2ea9f8a8..82a7fb6531 100644 --- a/plotly/validators/histogram2d/colorbar/_ticklabelposition.py +++ b/plotly/validators/histogram2d/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="histogram2d.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/colorbar/_ticklabelstep.py b/plotly/validators/histogram2d/colorbar/_ticklabelstep.py index 330bd84512..a19669c38c 100644 --- a/plotly/validators/histogram2d/colorbar/_ticklabelstep.py +++ b/plotly/validators/histogram2d/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="histogram2d.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_ticklen.py b/plotly/validators/histogram2d/colorbar/_ticklen.py index 9786c95877..c88db148ad 100644 --- a/plotly/validators/histogram2d/colorbar/_ticklen.py +++ b/plotly/validators/histogram2d/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="histogram2d.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_tickmode.py b/plotly/validators/histogram2d/colorbar/_tickmode.py index d116c1319e..5eda3cecdb 100644 --- a/plotly/validators/histogram2d/colorbar/_tickmode.py +++ b/plotly/validators/histogram2d/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="histogram2d.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/histogram2d/colorbar/_tickprefix.py b/plotly/validators/histogram2d/colorbar/_tickprefix.py index 050dcf8084..9da9ebd3ef 100644 --- a/plotly/validators/histogram2d/colorbar/_tickprefix.py +++ b/plotly/validators/histogram2d/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="histogram2d.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_ticks.py b/plotly/validators/histogram2d/colorbar/_ticks.py index a1a8190078..7d9adce10d 100644 --- a/plotly/validators/histogram2d/colorbar/_ticks.py +++ b/plotly/validators/histogram2d/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="histogram2d.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_ticksuffix.py b/plotly/validators/histogram2d/colorbar/_ticksuffix.py index ec5d26c8bd..70d2909f20 100644 --- a/plotly/validators/histogram2d/colorbar/_ticksuffix.py +++ b/plotly/validators/histogram2d/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="histogram2d.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_ticktext.py b/plotly/validators/histogram2d/colorbar/_ticktext.py index 32ab9761b2..413a094e8e 100644 --- a/plotly/validators/histogram2d/colorbar/_ticktext.py +++ b/plotly/validators/histogram2d/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="histogram2d.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_ticktextsrc.py b/plotly/validators/histogram2d/colorbar/_ticktextsrc.py index f8887ea4aa..a8d8e89cee 100644 --- a/plotly/validators/histogram2d/colorbar/_ticktextsrc.py +++ b/plotly/validators/histogram2d/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="histogram2d.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_tickvals.py b/plotly/validators/histogram2d/colorbar/_tickvals.py index 4e2cd510c0..0168732c9b 100644 --- a/plotly/validators/histogram2d/colorbar/_tickvals.py +++ b/plotly/validators/histogram2d/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="histogram2d.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_tickvalssrc.py b/plotly/validators/histogram2d/colorbar/_tickvalssrc.py index 5ebc3da408..855378a502 100644 --- a/plotly/validators/histogram2d/colorbar/_tickvalssrc.py +++ b/plotly/validators/histogram2d/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="histogram2d.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_tickwidth.py b/plotly/validators/histogram2d/colorbar/_tickwidth.py index c9e036cab3..df57fe26b1 100644 --- a/plotly/validators/histogram2d/colorbar/_tickwidth.py +++ b/plotly/validators/histogram2d/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="histogram2d.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_title.py b/plotly/validators/histogram2d/colorbar/_title.py index 60b9de3668..74165c514f 100644 --- a/plotly/validators/histogram2d/colorbar/_title.py +++ b/plotly/validators/histogram2d/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="histogram2d.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_x.py b/plotly/validators/histogram2d/colorbar/_x.py index 6997c4cc6a..977d73f48e 100644 --- a/plotly/validators/histogram2d/colorbar/_x.py +++ b/plotly/validators/histogram2d/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="histogram2d.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_xanchor.py b/plotly/validators/histogram2d/colorbar/_xanchor.py index a3044f64e9..28e3aa211f 100644 --- a/plotly/validators/histogram2d/colorbar/_xanchor.py +++ b/plotly/validators/histogram2d/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="histogram2d.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_xpad.py b/plotly/validators/histogram2d/colorbar/_xpad.py index 85a63d94eb..c1b93320de 100644 --- a/plotly/validators/histogram2d/colorbar/_xpad.py +++ b/plotly/validators/histogram2d/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="histogram2d.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_xref.py b/plotly/validators/histogram2d/colorbar/_xref.py index f4b00e2659..e51d5d7c94 100644 --- a/plotly/validators/histogram2d/colorbar/_xref.py +++ b/plotly/validators/histogram2d/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="histogram2d.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_y.py b/plotly/validators/histogram2d/colorbar/_y.py index 83a13511fc..abbead1d4e 100644 --- a/plotly/validators/histogram2d/colorbar/_y.py +++ b/plotly/validators/histogram2d/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="histogram2d.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/_yanchor.py b/plotly/validators/histogram2d/colorbar/_yanchor.py index 5cbf00a785..a2ffb86c6b 100644 --- a/plotly/validators/histogram2d/colorbar/_yanchor.py +++ b/plotly/validators/histogram2d/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="histogram2d.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_ypad.py b/plotly/validators/histogram2d/colorbar/_ypad.py index 8a9a5f4dd0..233319c4bd 100644 --- a/plotly/validators/histogram2d/colorbar/_ypad.py +++ b/plotly/validators/histogram2d/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="histogram2d.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/_yref.py b/plotly/validators/histogram2d/colorbar/_yref.py index aee34ed34a..c1b3207b14 100644 --- a/plotly/validators/histogram2d/colorbar/_yref.py +++ b/plotly/validators/histogram2d/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="histogram2d.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/tickfont/__init__.py b/plotly/validators/histogram2d/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/__init__.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_color.py b/plotly/validators/histogram2d/colorbar/tickfont/_color.py index d4a7790167..f965db67e6 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_color.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2d.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_family.py b/plotly/validators/histogram2d/colorbar/tickfont/_family.py index 5b1269e5b6..485b5cb158 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_family.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_lineposition.py b/plotly/validators/histogram2d/colorbar/tickfont/_lineposition.py index 73530d2f30..5ad1cc1945 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_shadow.py b/plotly/validators/histogram2d/colorbar/tickfont/_shadow.py index 5b542881e0..9b742d20de 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_shadow.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_size.py b/plotly/validators/histogram2d/colorbar/tickfont/_size.py index e483a9c3c0..dcc7489e75 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_size.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2d.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_style.py b/plotly/validators/histogram2d/colorbar/tickfont/_style.py index 4d90d50cee..4e8fa7cefa 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_style.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2d.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_textcase.py b/plotly/validators/histogram2d/colorbar/tickfont/_textcase.py index 94db851dad..32d8aaa862 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_textcase.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_variant.py b/plotly/validators/histogram2d/colorbar/tickfont/_variant.py index 0aa0295739..4a6984b586 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_variant.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/colorbar/tickfont/_weight.py b/plotly/validators/histogram2d/colorbar/tickfont/_weight.py index 5fed68a4ea..ba72f70b95 100644 --- a/plotly/validators/histogram2d/colorbar/tickfont/_weight.py +++ b/plotly/validators/histogram2d/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2d.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py b/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/histogram2d/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py index ec76e80138..d1ca24c991 100644 --- a/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/histogram2d/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="histogram2d.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py b/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py index ed777afe61..e5068cb6ac 100644 --- a/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/histogram2d/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="histogram2d.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py b/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py index 150140d81a..63188ba225 100644 --- a/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py +++ b/plotly/validators/histogram2d/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="histogram2d.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py index cd6bccc85a..f674cfac28 100644 --- a/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/histogram2d/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="histogram2d.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py b/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py index 5467103171..0b53b845ec 100644 --- a/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py +++ b/plotly/validators/histogram2d/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="histogram2d.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/title/__init__.py b/plotly/validators/histogram2d/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/histogram2d/colorbar/title/__init__.py +++ b/plotly/validators/histogram2d/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/histogram2d/colorbar/title/_font.py b/plotly/validators/histogram2d/colorbar/title/_font.py index 9e572b5c29..7ac98f5850 100644 --- a/plotly/validators/histogram2d/colorbar/title/_font.py +++ b/plotly/validators/histogram2d/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram2d.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/title/_side.py b/plotly/validators/histogram2d/colorbar/title/_side.py index 0fdd651d8f..b2e6d8b0d6 100644 --- a/plotly/validators/histogram2d/colorbar/title/_side.py +++ b/plotly/validators/histogram2d/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="histogram2d.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/title/_text.py b/plotly/validators/histogram2d/colorbar/title/_text.py index bb38d04089..74c844d1ba 100644 --- a/plotly/validators/histogram2d/colorbar/title/_text.py +++ b/plotly/validators/histogram2d/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram2d.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/title/font/__init__.py b/plotly/validators/histogram2d/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/__init__.py +++ b/plotly/validators/histogram2d/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2d/colorbar/title/font/_color.py b/plotly/validators/histogram2d/colorbar/title/font/_color.py index adbf815045..952b90f7ea 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_color.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/title/font/_family.py b/plotly/validators/histogram2d/colorbar/title/font/_family.py index 481e734cdf..579c076e94 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_family.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2d/colorbar/title/font/_lineposition.py b/plotly/validators/histogram2d/colorbar/title/font/_lineposition.py index 51c77bf485..16a8fb3d3c 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_lineposition.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2d/colorbar/title/font/_shadow.py b/plotly/validators/histogram2d/colorbar/title/font/_shadow.py index 9c02f88f5f..975e59514e 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_shadow.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2d/colorbar/title/font/_size.py b/plotly/validators/histogram2d/colorbar/title/font/_size.py index f3b8f096aa..8f84e40f3d 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_size.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/title/font/_style.py b/plotly/validators/histogram2d/colorbar/title/font/_style.py index 485df62c2d..4c20655acb 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_style.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/title/font/_textcase.py b/plotly/validators/histogram2d/colorbar/title/font/_textcase.py index aa8a93e54b..62eb2fe83f 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_textcase.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2d/colorbar/title/font/_variant.py b/plotly/validators/histogram2d/colorbar/title/font/_variant.py index e43caa77b5..17d86bbd5a 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_variant.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/colorbar/title/font/_weight.py b/plotly/validators/histogram2d/colorbar/title/font/_weight.py index cd0be71d83..bff6a3f3a5 100644 --- a/plotly/validators/histogram2d/colorbar/title/font/_weight.py +++ b/plotly/validators/histogram2d/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2d.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2d/hoverlabel/__init__.py b/plotly/validators/histogram2d/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/histogram2d/hoverlabel/__init__.py +++ b/plotly/validators/histogram2d/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/histogram2d/hoverlabel/_align.py b/plotly/validators/histogram2d/hoverlabel/_align.py index 0835eae278..16cbc27597 100644 --- a/plotly/validators/histogram2d/hoverlabel/_align.py +++ b/plotly/validators/histogram2d/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="histogram2d.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/histogram2d/hoverlabel/_alignsrc.py b/plotly/validators/histogram2d/hoverlabel/_alignsrc.py index 620c000a03..277e64c586 100644 --- a/plotly/validators/histogram2d/hoverlabel/_alignsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="histogram2d.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/_bgcolor.py b/plotly/validators/histogram2d/hoverlabel/_bgcolor.py index 650fc7feed..8dd16e7cbb 100644 --- a/plotly/validators/histogram2d/hoverlabel/_bgcolor.py +++ b/plotly/validators/histogram2d/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram2d.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py b/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py index ba1968736b..4f7cfa0630 100644 --- a/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="histogram2d.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/_bordercolor.py b/plotly/validators/histogram2d/hoverlabel/_bordercolor.py index 61a7bf3569..8afba3a7c6 100644 --- a/plotly/validators/histogram2d/hoverlabel/_bordercolor.py +++ b/plotly/validators/histogram2d/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram2d.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py b/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py index a50f207aaa..ccceed3073 100644 --- a/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="histogram2d.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/_font.py b/plotly/validators/histogram2d/hoverlabel/_font.py index 3884343668..78dcfbaf44 100644 --- a/plotly/validators/histogram2d/hoverlabel/_font.py +++ b/plotly/validators/histogram2d/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram2d.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/hoverlabel/_namelength.py b/plotly/validators/histogram2d/hoverlabel/_namelength.py index 594f84bdba..f72762af27 100644 --- a/plotly/validators/histogram2d/hoverlabel/_namelength.py +++ b/plotly/validators/histogram2d/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="histogram2d.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py b/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py index 34a7377c21..ecfdfb2807 100644 --- a/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="histogram2d.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/__init__.py b/plotly/validators/histogram2d/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/__init__.py +++ b/plotly/validators/histogram2d/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_color.py b/plotly/validators/histogram2d/hoverlabel/font/_color.py index 949acd6434..a942a554d6 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_color.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py b/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py index a0445246e5..2ae843e274 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_family.py b/plotly/validators/histogram2d/hoverlabel/font/_family.py index e6fbf3edd3..b4dc8822ab 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_family.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py b/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py index b46dbb18d0..fa772914d4 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_lineposition.py b/plotly/validators/histogram2d/hoverlabel/font/_lineposition.py index d5034992c5..7fa323d043 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_lineposition.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/histogram2d/hoverlabel/font/_linepositionsrc.py b/plotly/validators/histogram2d/hoverlabel/font/_linepositionsrc.py index 2770f28d01..130072ffaa 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_shadow.py b/plotly/validators/histogram2d/hoverlabel/font/_shadow.py index 0367d9e6ef..4418666743 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_shadow.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2d/hoverlabel/font/_shadowsrc.py b/plotly/validators/histogram2d/hoverlabel/font/_shadowsrc.py index e740248f25..af7c39eab2 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_size.py b/plotly/validators/histogram2d/hoverlabel/font/_size.py index e0a8fa850c..b41e1cb2ee 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_size.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py b/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py index 8b0e39b5f8..fe660e3fa5 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_style.py b/plotly/validators/histogram2d/hoverlabel/font/_style.py index 90547f9481..d5213262a3 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_style.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/histogram2d/hoverlabel/font/_stylesrc.py b/plotly/validators/histogram2d/hoverlabel/font/_stylesrc.py index 965271a064..d996d37674 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_textcase.py b/plotly/validators/histogram2d/hoverlabel/font/_textcase.py index aa12cfca73..9667e32383 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_textcase.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/histogram2d/hoverlabel/font/_textcasesrc.py b/plotly/validators/histogram2d/hoverlabel/font/_textcasesrc.py index c21e171941..f6db014da7 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_variant.py b/plotly/validators/histogram2d/hoverlabel/font/_variant.py index 55113c70da..536358771e 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_variant.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/histogram2d/hoverlabel/font/_variantsrc.py b/plotly/validators/histogram2d/hoverlabel/font/_variantsrc.py index ba586fd334..847def6b82 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/hoverlabel/font/_weight.py b/plotly/validators/histogram2d/hoverlabel/font/_weight.py index 304bc0c101..eda2720661 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_weight.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2d.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/histogram2d/hoverlabel/font/_weightsrc.py b/plotly/validators/histogram2d/hoverlabel/font/_weightsrc.py index 914b417288..5376a1426f 100644 --- a/plotly/validators/histogram2d/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/histogram2d/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="histogram2d.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/legendgrouptitle/__init__.py b/plotly/validators/histogram2d/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/__init__.py +++ b/plotly/validators/histogram2d/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/histogram2d/legendgrouptitle/_font.py b/plotly/validators/histogram2d/legendgrouptitle/_font.py index 0119c5dff9..14255cd4f1 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/_font.py +++ b/plotly/validators/histogram2d/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram2d.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2d/legendgrouptitle/_text.py b/plotly/validators/histogram2d/legendgrouptitle/_text.py index 3bcdcf9222..bc57ab6ea8 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/_text.py +++ b/plotly/validators/histogram2d/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram2d.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/__init__.py b/plotly/validators/histogram2d/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/__init__.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_color.py b/plotly/validators/histogram2d/legendgrouptitle/font/_color.py index 34facbaac6..b76736cf94 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_color.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_family.py b/plotly/validators/histogram2d/legendgrouptitle/font/_family.py index 5ca4464998..8f056905ad 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_family.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_lineposition.py b/plotly/validators/histogram2d/legendgrouptitle/font/_lineposition.py index 4f1a2196f3..2fe7ac4cab 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_shadow.py b/plotly/validators/histogram2d/legendgrouptitle/font/_shadow.py index 10174afeb6..0163b60c91 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_size.py b/plotly/validators/histogram2d/legendgrouptitle/font/_size.py index 774cb6d524..5e48583073 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_size.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_style.py b/plotly/validators/histogram2d/legendgrouptitle/font/_style.py index b9629b6daf..a7070907c0 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_style.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_textcase.py b/plotly/validators/histogram2d/legendgrouptitle/font/_textcase.py index c8f17735c8..fd00213d83 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_variant.py b/plotly/validators/histogram2d/legendgrouptitle/font/_variant.py index 990ff2b944..e57aecd252 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_variant.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/legendgrouptitle/font/_weight.py b/plotly/validators/histogram2d/legendgrouptitle/font/_weight.py index 73d70e10a2..f02e1ac819 100644 --- a/plotly/validators/histogram2d/legendgrouptitle/font/_weight.py +++ b/plotly/validators/histogram2d/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2d.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2d/marker/__init__.py b/plotly/validators/histogram2d/marker/__init__.py index 4ca11d9882..8cd95cefa3 100644 --- a/plotly/validators/histogram2d/marker/__init__.py +++ b/plotly/validators/histogram2d/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/histogram2d/marker/_color.py b/plotly/validators/histogram2d/marker/_color.py index 5912f433b1..849e511a0d 100644 --- a/plotly/validators/histogram2d/marker/_color.py +++ b/plotly/validators/histogram2d/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="color", parent_name="histogram2d.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/marker/_colorsrc.py b/plotly/validators/histogram2d/marker/_colorsrc.py index fce4f02357..e7126d6df7 100644 --- a/plotly/validators/histogram2d/marker/_colorsrc.py +++ b/plotly/validators/histogram2d/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram2d.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2d/stream/__init__.py b/plotly/validators/histogram2d/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/histogram2d/stream/__init__.py +++ b/plotly/validators/histogram2d/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/histogram2d/stream/_maxpoints.py b/plotly/validators/histogram2d/stream/_maxpoints.py index 6c0c9bbdb2..a7179b2295 100644 --- a/plotly/validators/histogram2d/stream/_maxpoints.py +++ b/plotly/validators/histogram2d/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="histogram2d.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram2d/stream/_token.py b/plotly/validators/histogram2d/stream/_token.py index 122e606bdd..0c1ba5d914 100644 --- a/plotly/validators/histogram2d/stream/_token.py +++ b/plotly/validators/histogram2d/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="histogram2d.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2d/textfont/__init__.py b/plotly/validators/histogram2d/textfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2d/textfont/__init__.py +++ b/plotly/validators/histogram2d/textfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2d/textfont/_color.py b/plotly/validators/histogram2d/textfont/_color.py index c2aadc151c..66034a306d 100644 --- a/plotly/validators/histogram2d/textfont/_color.py +++ b/plotly/validators/histogram2d/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2d.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2d/textfont/_family.py b/plotly/validators/histogram2d/textfont/_family.py index 9bb8d6ec15..0e1158c6d2 100644 --- a/plotly/validators/histogram2d/textfont/_family.py +++ b/plotly/validators/histogram2d/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2d.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2d/textfont/_lineposition.py b/plotly/validators/histogram2d/textfont/_lineposition.py index a0e31c3608..8938d0f61e 100644 --- a/plotly/validators/histogram2d/textfont/_lineposition.py +++ b/plotly/validators/histogram2d/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2d.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2d/textfont/_shadow.py b/plotly/validators/histogram2d/textfont/_shadow.py index 52ccc00399..0485545a44 100644 --- a/plotly/validators/histogram2d/textfont/_shadow.py +++ b/plotly/validators/histogram2d/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2d.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2d/textfont/_size.py b/plotly/validators/histogram2d/textfont/_size.py index 0de77110ee..dd0865244c 100644 --- a/plotly/validators/histogram2d/textfont/_size.py +++ b/plotly/validators/histogram2d/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2d.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2d/textfont/_style.py b/plotly/validators/histogram2d/textfont/_style.py index 346b6e65df..f0c2ac34dd 100644 --- a/plotly/validators/histogram2d/textfont/_style.py +++ b/plotly/validators/histogram2d/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2d.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2d/textfont/_textcase.py b/plotly/validators/histogram2d/textfont/_textcase.py index 50a8c7ff98..a39d794759 100644 --- a/plotly/validators/histogram2d/textfont/_textcase.py +++ b/plotly/validators/histogram2d/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2d.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2d/textfont/_variant.py b/plotly/validators/histogram2d/textfont/_variant.py index 77ccf67cf6..ea27c4b3c0 100644 --- a/plotly/validators/histogram2d/textfont/_variant.py +++ b/plotly/validators/histogram2d/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2d.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2d/textfont/_weight.py b/plotly/validators/histogram2d/textfont/_weight.py index 0a0d42d59d..f2da97ed1b 100644 --- a/plotly/validators/histogram2d/textfont/_weight.py +++ b/plotly/validators/histogram2d/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2d.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2d/xbins/__init__.py b/plotly/validators/histogram2d/xbins/__init__.py index b7d1eaa9fc..462d290b54 100644 --- a/plotly/validators/histogram2d/xbins/__init__.py +++ b/plotly/validators/histogram2d/xbins/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._start import StartValidator - from ._size import SizeValidator - from ._end import EndValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], +) diff --git a/plotly/validators/histogram2d/xbins/_end.py b/plotly/validators/histogram2d/xbins/_end.py index 3605572890..9e252cace5 100644 --- a/plotly/validators/histogram2d/xbins/_end.py +++ b/plotly/validators/histogram2d/xbins/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.AnyValidator): +class EndValidator(_bv.AnyValidator): def __init__(self, plotly_name="end", parent_name="histogram2d.xbins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/xbins/_size.py b/plotly/validators/histogram2d/xbins/_size.py index f6cbc59839..284ce684d7 100644 --- a/plotly/validators/histogram2d/xbins/_size.py +++ b/plotly/validators/histogram2d/xbins/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): +class SizeValidator(_bv.AnyValidator): def __init__(self, plotly_name="size", parent_name="histogram2d.xbins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/xbins/_start.py b/plotly/validators/histogram2d/xbins/_start.py index f28c3c4400..45bbe1f3f5 100644 --- a/plotly/validators/histogram2d/xbins/_start.py +++ b/plotly/validators/histogram2d/xbins/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.AnyValidator): +class StartValidator(_bv.AnyValidator): def __init__(self, plotly_name="start", parent_name="histogram2d.xbins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/ybins/__init__.py b/plotly/validators/histogram2d/ybins/__init__.py index b7d1eaa9fc..462d290b54 100644 --- a/plotly/validators/histogram2d/ybins/__init__.py +++ b/plotly/validators/histogram2d/ybins/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._start import StartValidator - from ._size import SizeValidator - from ._end import EndValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], +) diff --git a/plotly/validators/histogram2d/ybins/_end.py b/plotly/validators/histogram2d/ybins/_end.py index 5cdbc09981..467b7064a4 100644 --- a/plotly/validators/histogram2d/ybins/_end.py +++ b/plotly/validators/histogram2d/ybins/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.AnyValidator): +class EndValidator(_bv.AnyValidator): def __init__(self, plotly_name="end", parent_name="histogram2d.ybins", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/ybins/_size.py b/plotly/validators/histogram2d/ybins/_size.py index a3dcf7de19..ea03855246 100644 --- a/plotly/validators/histogram2d/ybins/_size.py +++ b/plotly/validators/histogram2d/ybins/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): +class SizeValidator(_bv.AnyValidator): def __init__(self, plotly_name="size", parent_name="histogram2d.ybins", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2d/ybins/_start.py b/plotly/validators/histogram2d/ybins/_start.py index 8d89ed43b9..5364f069d0 100644 --- a/plotly/validators/histogram2d/ybins/_start.py +++ b/plotly/validators/histogram2d/ybins/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.AnyValidator): +class StartValidator(_bv.AnyValidator): def __init__(self, plotly_name="start", parent_name="histogram2d.ybins", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/__init__.py b/plotly/validators/histogram2dcontour/__init__.py index 7d1e7b3dee..8baa4429cb 100644 --- a/plotly/validators/histogram2dcontour/__init__.py +++ b/plotly/validators/histogram2dcontour/__init__.py @@ -1,141 +1,73 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zmin import ZminValidator - from ._zmid import ZmidValidator - from ._zmax import ZmaxValidator - from ._zhoverformat import ZhoverformatValidator - from ._zauto import ZautoValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._ybins import YbinsValidator - from ._ybingroup import YbingroupValidator - from ._yaxis import YaxisValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xbins import XbinsValidator - from ._xbingroup import XbingroupValidator - from ._xaxis import XaxisValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplate import TexttemplateValidator - from ._textfont import TextfontValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._ncontours import NcontoursValidator - from ._nbinsy import NbinsyValidator - from ._nbinsx import NbinsxValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._histnorm import HistnormValidator - from ._histfunc import HistfuncValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contours import ContoursValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._bingroup import BingroupValidator - from ._autocontour import AutocontourValidator - from ._autocolorscale import AutocolorscaleValidator - from ._autobiny import AutobinyValidator - from ._autobinx import AutobinxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zmin.ZminValidator", - "._zmid.ZmidValidator", - "._zmax.ZmaxValidator", - "._zhoverformat.ZhoverformatValidator", - "._zauto.ZautoValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._ybins.YbinsValidator", - "._ybingroup.YbingroupValidator", - "._yaxis.YaxisValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xbins.XbinsValidator", - "._xbingroup.XbingroupValidator", - "._xaxis.XaxisValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplate.TexttemplateValidator", - "._textfont.TextfontValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._ncontours.NcontoursValidator", - "._nbinsy.NbinsyValidator", - "._nbinsx.NbinsxValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._histnorm.HistnormValidator", - "._histfunc.HistfuncValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contours.ContoursValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._bingroup.BingroupValidator", - "._autocontour.AutocontourValidator", - "._autocolorscale.AutocolorscaleValidator", - "._autobiny.AutobinyValidator", - "._autobinx.AutobinxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zmin.ZminValidator", + "._zmid.ZmidValidator", + "._zmax.ZmaxValidator", + "._zhoverformat.ZhoverformatValidator", + "._zauto.ZautoValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._ybins.YbinsValidator", + "._ybingroup.YbingroupValidator", + "._yaxis.YaxisValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xbins.XbinsValidator", + "._xbingroup.XbingroupValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplate.TexttemplateValidator", + "._textfont.TextfontValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._ncontours.NcontoursValidator", + "._nbinsy.NbinsyValidator", + "._nbinsx.NbinsxValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._histnorm.HistnormValidator", + "._histfunc.HistfuncValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._bingroup.BingroupValidator", + "._autocontour.AutocontourValidator", + "._autocolorscale.AutocolorscaleValidator", + "._autobiny.AutobinyValidator", + "._autobinx.AutobinxValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/_autobinx.py b/plotly/validators/histogram2dcontour/_autobinx.py index 3eb7e8c70c..e9376342a9 100644 --- a/plotly/validators/histogram2dcontour/_autobinx.py +++ b/plotly/validators/histogram2dcontour/_autobinx.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutobinxValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutobinxValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autobinx", parent_name="histogram2dcontour", **kwargs ): - super(AutobinxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_autobiny.py b/plotly/validators/histogram2dcontour/_autobiny.py index 0cd0b782c8..bd3fdbb23c 100644 --- a/plotly/validators/histogram2dcontour/_autobiny.py +++ b/plotly/validators/histogram2dcontour/_autobiny.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutobinyValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutobinyValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autobiny", parent_name="histogram2dcontour", **kwargs ): - super(AutobinyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_autocolorscale.py b/plotly/validators/histogram2dcontour/_autocolorscale.py index 49797c9838..df4db8111d 100644 --- a/plotly/validators/histogram2dcontour/_autocolorscale.py +++ b/plotly/validators/histogram2dcontour/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="histogram2dcontour", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_autocontour.py b/plotly/validators/histogram2dcontour/_autocontour.py index 7ce84ff074..11a8023eab 100644 --- a/plotly/validators/histogram2dcontour/_autocontour.py +++ b/plotly/validators/histogram2dcontour/_autocontour.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocontourValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocontourValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocontour", parent_name="histogram2dcontour", **kwargs ): - super(AutocontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_bingroup.py b/plotly/validators/histogram2dcontour/_bingroup.py index a4fc8cdd40..8b744dd473 100644 --- a/plotly/validators/histogram2dcontour/_bingroup.py +++ b/plotly/validators/histogram2dcontour/_bingroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BingroupValidator(_plotly_utils.basevalidators.StringValidator): +class BingroupValidator(_bv.StringValidator): def __init__( self, plotly_name="bingroup", parent_name="histogram2dcontour", **kwargs ): - super(BingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_coloraxis.py b/plotly/validators/histogram2dcontour/_coloraxis.py index 584ea1bf72..3b7be8ca16 100644 --- a/plotly/validators/histogram2dcontour/_coloraxis.py +++ b/plotly/validators/histogram2dcontour/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="histogram2dcontour", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/histogram2dcontour/_colorbar.py b/plotly/validators/histogram2dcontour/_colorbar.py index 06cb9d61f0..d91a48ad02 100644 --- a/plotly/validators/histogram2dcontour/_colorbar.py +++ b/plotly/validators/histogram2dcontour/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="histogram2dcontour", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.histogr - am2dcontour.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.histogram2dcontour.colorbar.tickformatstopdef - aults), sets the default property values to use - for elements of - histogram2dcontour.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.histogram2dcontour - .colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_colorscale.py b/plotly/validators/histogram2dcontour/_colorscale.py index a8409d4415..14c5cefa88 100644 --- a/plotly/validators/histogram2dcontour/_colorscale.py +++ b/plotly/validators/histogram2dcontour/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="histogram2dcontour", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_contours.py b/plotly/validators/histogram2dcontour/_contours.py index 1182263d56..381dfd1d0d 100644 --- a/plotly/validators/histogram2dcontour/_contours.py +++ b/plotly/validators/histogram2dcontour/_contours.py @@ -1,80 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContoursValidator(_bv.CompoundValidator): def __init__( self, plotly_name="contours", parent_name="histogram2dcontour", **kwargs ): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contours"), data_docs=kwargs.pop( "data_docs", """ - coloring - Determines the coloring method showing the - contour values. If "fill", coloring is done - evenly between each contour level If "heatmap", - a heatmap gradient coloring is applied between - each contour level. If "lines", coloring is - done on the contour lines. If "none", no - coloring is applied on this trace. - end - Sets the end contour level value. Must be more - than `contours.start` - labelfont - Sets the font used for labeling the contour - levels. The default color comes from the lines, - if shown. The default family and size come from - `layout.font`. - labelformat - Sets the contour label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - operation - Sets the constraint operation. "=" keeps - regions equal to `value` "<" and "<=" keep - regions less than `value` ">" and ">=" keep - regions greater than `value` "[]", "()", "[)", - and "(]" keep regions inside `value[0]` to - `value[1]` "][", ")(", "](", ")[" keep regions - outside `value[0]` to value[1]` Open vs. closed - intervals make no difference to constraint - display, but all versions are allowed for - consistency with filter transforms. - showlabels - Determines whether to label the contour lines - with their values. - showlines - Determines whether or not the contour lines are - drawn. Has an effect only if - `contours.coloring` is set to "fill". - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - type - If `levels`, the data is represented as a - contour plot with multiple levels displayed. If - `constraint`, the data is represented as - constraints with the invalid region shaded as - specified by the `operation` and `value` - parameters. - value - Sets the value or values of the constraint - boundary. When `operation` is set to one of the - comparison values (=,<,>=,>,<=) "value" is - expected to be a number. When `operation` is - set to one of the interval values - ([],(),[),(],][,)(,](,)[) "value" is expected - to be an array of two numbers where the first - is the lower bound and the second is the upper - bound. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_customdata.py b/plotly/validators/histogram2dcontour/_customdata.py index 4960619ec5..52426a2cde 100644 --- a/plotly/validators/histogram2dcontour/_customdata.py +++ b/plotly/validators/histogram2dcontour/_customdata.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="customdata", parent_name="histogram2dcontour", **kwargs ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_customdatasrc.py b/plotly/validators/histogram2dcontour/_customdatasrc.py index 065f9e3d26..809e950bc2 100644 --- a/plotly/validators/histogram2dcontour/_customdatasrc.py +++ b/plotly/validators/histogram2dcontour/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="histogram2dcontour", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_histfunc.py b/plotly/validators/histogram2dcontour/_histfunc.py index 3d75e617db..59e59c97b3 100644 --- a/plotly/validators/histogram2dcontour/_histfunc.py +++ b/plotly/validators/histogram2dcontour/_histfunc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistfuncValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HistfuncValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="histfunc", parent_name="histogram2dcontour", **kwargs ): - super(HistfuncValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["count", "sum", "avg", "min", "max"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_histnorm.py b/plotly/validators/histogram2dcontour/_histnorm.py index 4df5894945..621fe4aeff 100644 --- a/plotly/validators/histogram2dcontour/_histnorm.py +++ b/plotly/validators/histogram2dcontour/_histnorm.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HistnormValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="histnorm", parent_name="histogram2dcontour", **kwargs ): - super(HistnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/_hoverinfo.py b/plotly/validators/histogram2dcontour/_hoverinfo.py index ff85609cde..440e69f402 100644 --- a/plotly/validators/histogram2dcontour/_hoverinfo.py +++ b/plotly/validators/histogram2dcontour/_hoverinfo.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="hoverinfo", parent_name="histogram2dcontour", **kwargs ): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/histogram2dcontour/_hoverinfosrc.py b/plotly/validators/histogram2dcontour/_hoverinfosrc.py index 1fcc9b7ec5..deff99b68a 100644 --- a/plotly/validators/histogram2dcontour/_hoverinfosrc.py +++ b/plotly/validators/histogram2dcontour/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="histogram2dcontour", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_hoverlabel.py b/plotly/validators/histogram2dcontour/_hoverlabel.py index fb82b0af8d..b5a727aae8 100644 --- a/plotly/validators/histogram2dcontour/_hoverlabel.py +++ b/plotly/validators/histogram2dcontour/_hoverlabel.py @@ -1,52 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__( self, plotly_name="hoverlabel", parent_name="histogram2dcontour", **kwargs ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_hovertemplate.py b/plotly/validators/histogram2dcontour/_hovertemplate.py index 15af4c56a9..230294e302 100644 --- a/plotly/validators/histogram2dcontour/_hovertemplate.py +++ b/plotly/validators/histogram2dcontour/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="histogram2dcontour", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_hovertemplatesrc.py b/plotly/validators/histogram2dcontour/_hovertemplatesrc.py index 9c734b0c6a..2458b7e6af 100644 --- a/plotly/validators/histogram2dcontour/_hovertemplatesrc.py +++ b/plotly/validators/histogram2dcontour/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="histogram2dcontour", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_ids.py b/plotly/validators/histogram2dcontour/_ids.py index 23e73984eb..4bc65eabd7 100644 --- a/plotly/validators/histogram2dcontour/_ids.py +++ b/plotly/validators/histogram2dcontour/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="histogram2dcontour", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_idssrc.py b/plotly/validators/histogram2dcontour/_idssrc.py index bf8aa52876..85a4db840a 100644 --- a/plotly/validators/histogram2dcontour/_idssrc.py +++ b/plotly/validators/histogram2dcontour/_idssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="idssrc", parent_name="histogram2dcontour", **kwargs ): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_legend.py b/plotly/validators/histogram2dcontour/_legend.py index 1e1f9f1a92..5b76caface 100644 --- a/plotly/validators/histogram2dcontour/_legend.py +++ b/plotly/validators/histogram2dcontour/_legend.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="legend", parent_name="histogram2dcontour", **kwargs ): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_legendgroup.py b/plotly/validators/histogram2dcontour/_legendgroup.py index 63f68f7cac..de85fb2db4 100644 --- a/plotly/validators/histogram2dcontour/_legendgroup.py +++ b/plotly/validators/histogram2dcontour/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="histogram2dcontour", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_legendgrouptitle.py b/plotly/validators/histogram2dcontour/_legendgrouptitle.py index 81c5dfe8ba..43e216b977 100644 --- a/plotly/validators/histogram2dcontour/_legendgrouptitle.py +++ b/plotly/validators/histogram2dcontour/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="histogram2dcontour", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_legendrank.py b/plotly/validators/histogram2dcontour/_legendrank.py index 801f392245..11dd060f5d 100644 --- a/plotly/validators/histogram2dcontour/_legendrank.py +++ b/plotly/validators/histogram2dcontour/_legendrank.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendrank", parent_name="histogram2dcontour", **kwargs ): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_legendwidth.py b/plotly/validators/histogram2dcontour/_legendwidth.py index 0b2bf6d04f..6089d9671a 100644 --- a/plotly/validators/histogram2dcontour/_legendwidth.py +++ b/plotly/validators/histogram2dcontour/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="histogram2dcontour", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_line.py b/plotly/validators/histogram2dcontour/_line.py index ad9153df48..464e08596f 100644 --- a/plotly/validators/histogram2dcontour/_line.py +++ b/plotly/validators/histogram2dcontour/_line.py @@ -1,29 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="histogram2dcontour", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour level. Has no - effect if `contours.coloring` is set to - "lines". - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - smoothing - Sets the amount of smoothing for the contour - lines, where 0 corresponds to no smoothing. - width - Sets the contour line width in (in px) """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_marker.py b/plotly/validators/histogram2dcontour/_marker.py index 7c9d8312ce..36794c7f5c 100644 --- a/plotly/validators/histogram2dcontour/_marker.py +++ b/plotly/validators/histogram2dcontour/_marker.py @@ -1,22 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="histogram2dcontour", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the aggregation data. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_meta.py b/plotly/validators/histogram2dcontour/_meta.py index c938e355c4..4364d25db5 100644 --- a/plotly/validators/histogram2dcontour/_meta.py +++ b/plotly/validators/histogram2dcontour/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="histogram2dcontour", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_metasrc.py b/plotly/validators/histogram2dcontour/_metasrc.py index 88747de24f..451148243b 100644 --- a/plotly/validators/histogram2dcontour/_metasrc.py +++ b/plotly/validators/histogram2dcontour/_metasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="metasrc", parent_name="histogram2dcontour", **kwargs ): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_name.py b/plotly/validators/histogram2dcontour/_name.py index 0398fb9a97..201e0adf8c 100644 --- a/plotly/validators/histogram2dcontour/_name.py +++ b/plotly/validators/histogram2dcontour/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="histogram2dcontour", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_nbinsx.py b/plotly/validators/histogram2dcontour/_nbinsx.py index 7543e2e3af..b0bae2e3b5 100644 --- a/plotly/validators/histogram2dcontour/_nbinsx.py +++ b/plotly/validators/histogram2dcontour/_nbinsx.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NbinsxValidator(_plotly_utils.basevalidators.IntegerValidator): +class NbinsxValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nbinsx", parent_name="histogram2dcontour", **kwargs ): - super(NbinsxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_nbinsy.py b/plotly/validators/histogram2dcontour/_nbinsy.py index 4a75c91929..665b75d64e 100644 --- a/plotly/validators/histogram2dcontour/_nbinsy.py +++ b/plotly/validators/histogram2dcontour/_nbinsy.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NbinsyValidator(_plotly_utils.basevalidators.IntegerValidator): +class NbinsyValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nbinsy", parent_name="histogram2dcontour", **kwargs ): - super(NbinsyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_ncontours.py b/plotly/validators/histogram2dcontour/_ncontours.py index c2fcbcb96f..124d074ed4 100644 --- a/plotly/validators/histogram2dcontour/_ncontours.py +++ b/plotly/validators/histogram2dcontour/_ncontours.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NcontoursValidator(_plotly_utils.basevalidators.IntegerValidator): +class NcontoursValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ncontours", parent_name="histogram2dcontour", **kwargs ): - super(NcontoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_opacity.py b/plotly/validators/histogram2dcontour/_opacity.py index 6fbda555b7..db62178bb8 100644 --- a/plotly/validators/histogram2dcontour/_opacity.py +++ b/plotly/validators/histogram2dcontour/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="histogram2dcontour", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram2dcontour/_reversescale.py b/plotly/validators/histogram2dcontour/_reversescale.py index 655af2a40c..4f2dbe965f 100644 --- a/plotly/validators/histogram2dcontour/_reversescale.py +++ b/plotly/validators/histogram2dcontour/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="histogram2dcontour", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_showlegend.py b/plotly/validators/histogram2dcontour/_showlegend.py index 069834617d..b634066500 100644 --- a/plotly/validators/histogram2dcontour/_showlegend.py +++ b/plotly/validators/histogram2dcontour/_showlegend.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlegend", parent_name="histogram2dcontour", **kwargs ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_showscale.py b/plotly/validators/histogram2dcontour/_showscale.py index 2293e698c1..f826c8091d 100644 --- a/plotly/validators/histogram2dcontour/_showscale.py +++ b/plotly/validators/histogram2dcontour/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="histogram2dcontour", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_stream.py b/plotly/validators/histogram2dcontour/_stream.py index b2dd891e9d..67d2b591c3 100644 --- a/plotly/validators/histogram2dcontour/_stream.py +++ b/plotly/validators/histogram2dcontour/_stream.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__( self, plotly_name="stream", parent_name="histogram2dcontour", **kwargs ): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_textfont.py b/plotly/validators/histogram2dcontour/_textfont.py index bce613f760..c7bc649968 100644 --- a/plotly/validators/histogram2dcontour/_textfont.py +++ b/plotly/validators/histogram2dcontour/_textfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="histogram2dcontour", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_texttemplate.py b/plotly/validators/histogram2dcontour/_texttemplate.py index 08ef0f1ae6..249840e4f9 100644 --- a/plotly/validators/histogram2dcontour/_texttemplate.py +++ b/plotly/validators/histogram2dcontour/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="histogram2dcontour", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_uid.py b/plotly/validators/histogram2dcontour/_uid.py index 495927bbdb..4a6e98a051 100644 --- a/plotly/validators/histogram2dcontour/_uid.py +++ b/plotly/validators/histogram2dcontour/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="histogram2dcontour", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_uirevision.py b/plotly/validators/histogram2dcontour/_uirevision.py index 670b293b95..553b48f00c 100644 --- a/plotly/validators/histogram2dcontour/_uirevision.py +++ b/plotly/validators/histogram2dcontour/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="histogram2dcontour", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_visible.py b/plotly/validators/histogram2dcontour/_visible.py index d90e6689b0..78561d9fc1 100644 --- a/plotly/validators/histogram2dcontour/_visible.py +++ b/plotly/validators/histogram2dcontour/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="visible", parent_name="histogram2dcontour", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_x.py b/plotly/validators/histogram2dcontour/_x.py index af2872c3fb..f5cff0e3ce 100644 --- a/plotly/validators/histogram2dcontour/_x.py +++ b/plotly/validators/histogram2dcontour/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="histogram2dcontour", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_xaxis.py b/plotly/validators/histogram2dcontour/_xaxis.py index f56b2a51f8..440fa743a6 100644 --- a/plotly/validators/histogram2dcontour/_xaxis.py +++ b/plotly/validators/histogram2dcontour/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="histogram2dcontour", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_xbingroup.py b/plotly/validators/histogram2dcontour/_xbingroup.py index 94c501db71..c71cac0c84 100644 --- a/plotly/validators/histogram2dcontour/_xbingroup.py +++ b/plotly/validators/histogram2dcontour/_xbingroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XbingroupValidator(_plotly_utils.basevalidators.StringValidator): +class XbingroupValidator(_bv.StringValidator): def __init__( self, plotly_name="xbingroup", parent_name="histogram2dcontour", **kwargs ): - super(XbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_xbins.py b/plotly/validators/histogram2dcontour/_xbins.py index 7745097a82..bdab4410ec 100644 --- a/plotly/validators/histogram2dcontour/_xbins.py +++ b/plotly/validators/histogram2dcontour/_xbins.py @@ -1,49 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XbinsValidator(_plotly_utils.basevalidators.CompoundValidator): +class XbinsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="xbins", parent_name="histogram2dcontour", **kwargs): - super(XbinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "XBins"), data_docs=kwargs.pop( "data_docs", """ - end - Sets the end value for the x axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each x axis bin. Default - behavior: If `nbinsx` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsx` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the x axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_xcalendar.py b/plotly/validators/histogram2dcontour/_xcalendar.py index 5e273c2bf1..7df9c85afd 100644 --- a/plotly/validators/histogram2dcontour/_xcalendar.py +++ b/plotly/validators/histogram2dcontour/_xcalendar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xcalendar", parent_name="histogram2dcontour", **kwargs ): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/_xhoverformat.py b/plotly/validators/histogram2dcontour/_xhoverformat.py index 2cb01c0ae3..38fc49502e 100644 --- a/plotly/validators/histogram2dcontour/_xhoverformat.py +++ b/plotly/validators/histogram2dcontour/_xhoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="xhoverformat", parent_name="histogram2dcontour", **kwargs ): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_xsrc.py b/plotly/validators/histogram2dcontour/_xsrc.py index 806ffccc40..2629375063 100644 --- a/plotly/validators/histogram2dcontour/_xsrc.py +++ b/plotly/validators/histogram2dcontour/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="histogram2dcontour", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_y.py b/plotly/validators/histogram2dcontour/_y.py index 50b838aa1a..f3b82b9f02 100644 --- a/plotly/validators/histogram2dcontour/_y.py +++ b/plotly/validators/histogram2dcontour/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="histogram2dcontour", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_yaxis.py b/plotly/validators/histogram2dcontour/_yaxis.py index 7dd3160141..774d7aab14 100644 --- a/plotly/validators/histogram2dcontour/_yaxis.py +++ b/plotly/validators/histogram2dcontour/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="histogram2dcontour", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_ybingroup.py b/plotly/validators/histogram2dcontour/_ybingroup.py index fed45d3b54..74906662c0 100644 --- a/plotly/validators/histogram2dcontour/_ybingroup.py +++ b/plotly/validators/histogram2dcontour/_ybingroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YbingroupValidator(_plotly_utils.basevalidators.StringValidator): +class YbingroupValidator(_bv.StringValidator): def __init__( self, plotly_name="ybingroup", parent_name="histogram2dcontour", **kwargs ): - super(YbingroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_ybins.py b/plotly/validators/histogram2dcontour/_ybins.py index 1a02fe93c7..0251671f3a 100644 --- a/plotly/validators/histogram2dcontour/_ybins.py +++ b/plotly/validators/histogram2dcontour/_ybins.py @@ -1,49 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YbinsValidator(_plotly_utils.basevalidators.CompoundValidator): +class YbinsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="ybins", parent_name="histogram2dcontour", **kwargs): - super(YbinsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "YBins"), data_docs=kwargs.pop( "data_docs", """ - end - Sets the end value for the y axis bins. The - last bin may not end exactly at this value, we - increment the bin edge by `size` from `start` - until we reach or exceed `end`. Defaults to the - maximum data value. Like `start`, for dates use - a date string, and for category data `end` is - based on the category serial numbers. - size - Sets the size of each y axis bin. Default - behavior: If `nbinsy` is 0 or omitted, we - choose a nice round bin size such that the - number of bins is about the same as the typical - number of samples in each bin. If `nbinsy` is - provided, we choose a nice round bin size - giving no more than that many bins. For date - data, use milliseconds or "M" for months, as - in `axis.dtick`. For category data, the number - of categories to bin together (always defaults - to 1). - start - Sets the starting value for the y axis bins. - Defaults to the minimum data value, shifted - down if necessary to make nice round values and - to remove ambiguous bin edges. For example, if - most of the data is integers we shift the bin - edges 0.5 down, so a `size` of 5 would have a - default `start` of -0.5, so it is clear that - 0-4 are in the first bin, 5-9 in the second, - but continuous data gets a start of 0 and bins - [0,5), [5,10) etc. Dates behave similarly, and - `start` should be a date string. For category - data, `start` is based on the category serial - numbers, and defaults to -0.5. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_ycalendar.py b/plotly/validators/histogram2dcontour/_ycalendar.py index 9996d5695a..7539c41141 100644 --- a/plotly/validators/histogram2dcontour/_ycalendar.py +++ b/plotly/validators/histogram2dcontour/_ycalendar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ycalendar", parent_name="histogram2dcontour", **kwargs ): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/_yhoverformat.py b/plotly/validators/histogram2dcontour/_yhoverformat.py index 67112495ab..ec05e70771 100644 --- a/plotly/validators/histogram2dcontour/_yhoverformat.py +++ b/plotly/validators/histogram2dcontour/_yhoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="yhoverformat", parent_name="histogram2dcontour", **kwargs ): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_ysrc.py b/plotly/validators/histogram2dcontour/_ysrc.py index 9fcdc8fae1..3e7a03864b 100644 --- a/plotly/validators/histogram2dcontour/_ysrc.py +++ b/plotly/validators/histogram2dcontour/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="histogram2dcontour", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_z.py b/plotly/validators/histogram2dcontour/_z.py index 3a41d18a49..1dbcb1e03a 100644 --- a/plotly/validators/histogram2dcontour/_z.py +++ b/plotly/validators/histogram2dcontour/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="histogram2dcontour", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_zauto.py b/plotly/validators/histogram2dcontour/_zauto.py index 8fda664394..cb450b01bc 100644 --- a/plotly/validators/histogram2dcontour/_zauto.py +++ b/plotly/validators/histogram2dcontour/_zauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zauto", parent_name="histogram2dcontour", **kwargs): - super(ZautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_zhoverformat.py b/plotly/validators/histogram2dcontour/_zhoverformat.py index 6b3d8adfc6..f69816be97 100644 --- a/plotly/validators/histogram2dcontour/_zhoverformat.py +++ b/plotly/validators/histogram2dcontour/_zhoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="zhoverformat", parent_name="histogram2dcontour", **kwargs ): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/_zmax.py b/plotly/validators/histogram2dcontour/_zmax.py index 79c67a8e79..1a918a2562 100644 --- a/plotly/validators/histogram2dcontour/_zmax.py +++ b/plotly/validators/histogram2dcontour/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmax", parent_name="histogram2dcontour", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_zmid.py b/plotly/validators/histogram2dcontour/_zmid.py index a056af3ae0..8c9631ebf4 100644 --- a/plotly/validators/histogram2dcontour/_zmid.py +++ b/plotly/validators/histogram2dcontour/_zmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmidValidator(_plotly_utils.basevalidators.NumberValidator): +class ZmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmid", parent_name="histogram2dcontour", **kwargs): - super(ZmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_zmin.py b/plotly/validators/histogram2dcontour/_zmin.py index 2a3a2ce81d..5b2ae23c67 100644 --- a/plotly/validators/histogram2dcontour/_zmin.py +++ b/plotly/validators/histogram2dcontour/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.NumberValidator): +class ZminValidator(_bv.NumberValidator): def __init__(self, plotly_name="zmin", parent_name="histogram2dcontour", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"zauto": False}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/_zsrc.py b/plotly/validators/histogram2dcontour/_zsrc.py index d1855c72d5..910c5da3b5 100644 --- a/plotly/validators/histogram2dcontour/_zsrc.py +++ b/plotly/validators/histogram2dcontour/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="histogram2dcontour", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/__init__.py b/plotly/validators/histogram2dcontour/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/histogram2dcontour/colorbar/__init__.py +++ b/plotly/validators/histogram2dcontour/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py b/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py index 95d49ff775..f67de20bef 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py +++ b/plotly/validators/histogram2dcontour/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py b/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py index 50b4cf97c5..9b828c8de4 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py +++ b/plotly/validators/histogram2dcontour/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py b/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py index b54d0a8058..14d878957a 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py +++ b/plotly/validators/histogram2dcontour/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_dtick.py b/plotly/validators/histogram2dcontour/colorbar/_dtick.py index 2c610b27d9..cd13f2b5bb 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_dtick.py +++ b/plotly/validators/histogram2dcontour/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py b/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py index c4a96a3bd5..5ba77e2701 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py +++ b/plotly/validators/histogram2dcontour/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_labelalias.py b/plotly/validators/histogram2dcontour/colorbar/_labelalias.py index aa442c77b8..965bf130ce 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_labelalias.py +++ b/plotly/validators/histogram2dcontour/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_len.py b/plotly/validators/histogram2dcontour/colorbar/_len.py index 3c4123e283..a3845c220f 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_len.py +++ b/plotly/validators/histogram2dcontour/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_lenmode.py b/plotly/validators/histogram2dcontour/colorbar/_lenmode.py index 6c659632a2..a5330cb7eb 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_lenmode.py +++ b/plotly/validators/histogram2dcontour/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_minexponent.py b/plotly/validators/histogram2dcontour/colorbar/_minexponent.py index 0a5c794149..648f015658 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_minexponent.py +++ b/plotly/validators/histogram2dcontour/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_nticks.py b/plotly/validators/histogram2dcontour/colorbar/_nticks.py index fce86cc37d..706c73f3d5 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_nticks.py +++ b/plotly/validators/histogram2dcontour/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_orientation.py b/plotly/validators/histogram2dcontour/colorbar/_orientation.py index 8ef0b34cb7..770dbef175 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_orientation.py +++ b/plotly/validators/histogram2dcontour/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py b/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py index b96ba56555..24de54e880 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py +++ b/plotly/validators/histogram2dcontour/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py b/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py index 1985e080cc..33b8883d6c 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py +++ b/plotly/validators/histogram2dcontour/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py b/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py index 7875e0744b..ac6165337e 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py +++ b/plotly/validators/histogram2dcontour/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_showexponent.py b/plotly/validators/histogram2dcontour/colorbar/_showexponent.py index e431e525be..6eb6f8037c 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_showexponent.py +++ b/plotly/validators/histogram2dcontour/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py b/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py index ee049cbd19..d8cc5d7f0c 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py +++ b/plotly/validators/histogram2dcontour/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py b/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py index e5cb678ef7..7067d32fa9 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py +++ b/plotly/validators/histogram2dcontour/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py b/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py index 11d6953649..3c9d20f987 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py +++ b/plotly/validators/histogram2dcontour/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_thickness.py b/plotly/validators/histogram2dcontour/colorbar/_thickness.py index e6adb4c325..393c9185f1 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_thickness.py +++ b/plotly/validators/histogram2dcontour/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py b/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py index 04ab3199b9..2ffd011e33 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py +++ b/plotly/validators/histogram2dcontour/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_tick0.py b/plotly/validators/histogram2dcontour/colorbar/_tick0.py index bdd5b52e52..217aacfaf2 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tick0.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickangle.py b/plotly/validators/histogram2dcontour/colorbar/_tickangle.py index f30a39bf77..69b9cfe1ee 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickangle.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py b/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py index feb05b266c..1e9cb4a2c9 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickfont.py b/plotly/validators/histogram2dcontour/colorbar/_tickfont.py index 2b3a7aaebe..cf9b0127f9 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickfont.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickformat.py b/plotly/validators/histogram2dcontour/colorbar/_tickformat.py index b69fdb9751..7f6107dd29 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickformat.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py b/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py index d3405f6f90..b554c7b2b2 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py b/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py index 2079a1c387..e869dcb052 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticklabeloverflow.py b/plotly/validators/histogram2dcontour/colorbar/_ticklabeloverflow.py index df0268c9e9..787bdadcff 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticklabelposition.py b/plotly/validators/histogram2dcontour/colorbar/_ticklabelposition.py index 5364a62ae3..37c21e31db 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticklabelposition.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticklabelstep.py b/plotly/validators/histogram2dcontour/colorbar/_ticklabelstep.py index 26fcd63872..c5cf639c72 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticklabelstep.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticklen.py b/plotly/validators/histogram2dcontour/colorbar/_ticklen.py index d816084264..6ea5a62cba 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticklen.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickmode.py b/plotly/validators/histogram2dcontour/colorbar/_tickmode.py index 8c30621533..591941297e 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickmode.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py b/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py index c56a8cd526..1de100f538 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticks.py b/plotly/validators/histogram2dcontour/colorbar/_ticks.py index 309185d282..d7db00a467 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticks.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py b/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py index d3ae6c516f..7195272501 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticktext.py b/plotly/validators/histogram2dcontour/colorbar/_ticktext.py index b908a9493d..19322872fe 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticktext.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py b/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py index 22f635e758..4c2cc0d9d8 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickvals.py b/plotly/validators/histogram2dcontour/colorbar/_tickvals.py index f76bffc76d..1040f8a2d5 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickvals.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py b/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py index 2c4c5e6567..da4edb33f7 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py b/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py index 4b4ee7ba93..c1d78403df 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py +++ b/plotly/validators/histogram2dcontour/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="histogram2dcontour.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_title.py b/plotly/validators/histogram2dcontour/colorbar/_title.py index 949901c43d..8d3f9c475e 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_title.py +++ b/plotly/validators/histogram2dcontour/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_x.py b/plotly/validators/histogram2dcontour/colorbar/_x.py index 32739a520f..8f2f9fcc91 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_x.py +++ b/plotly/validators/histogram2dcontour/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_xanchor.py b/plotly/validators/histogram2dcontour/colorbar/_xanchor.py index 58c289d67d..e3d459a0e4 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_xanchor.py +++ b/plotly/validators/histogram2dcontour/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_xpad.py b/plotly/validators/histogram2dcontour/colorbar/_xpad.py index 7fd8e1824d..85bc088144 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_xpad.py +++ b/plotly/validators/histogram2dcontour/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_xref.py b/plotly/validators/histogram2dcontour/colorbar/_xref.py index 30126ea31f..84562071c6 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_xref.py +++ b/plotly/validators/histogram2dcontour/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_y.py b/plotly/validators/histogram2dcontour/colorbar/_y.py index 928b76151e..5b042c6a25 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_y.py +++ b/plotly/validators/histogram2dcontour/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/_yanchor.py b/plotly/validators/histogram2dcontour/colorbar/_yanchor.py index 930aa5f5f3..daa4a161fe 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_yanchor.py +++ b/plotly/validators/histogram2dcontour/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_ypad.py b/plotly/validators/histogram2dcontour/colorbar/_ypad.py index e4e589ebf4..6acc87fe97 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_ypad.py +++ b/plotly/validators/histogram2dcontour/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/_yref.py b/plotly/validators/histogram2dcontour/colorbar/_yref.py index bbba41592f..a6f77791c0 100644 --- a/plotly/validators/histogram2dcontour/colorbar/_yref.py +++ b/plotly/validators/histogram2dcontour/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="histogram2dcontour.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py index c2d3585d73..842f7b5e75 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py index 568cd364bd..fdee249017 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_lineposition.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_lineposition.py index 073e88744e..f0b735d661 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_shadow.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_shadow.py index a53dcfd601..85fb2bfa95 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_shadow.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py index c62b92684d..5cc2a9f54b 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_style.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_style.py index c182f9a94c..5af9de2541 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_style.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_textcase.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_textcase.py index 878250f7c4..2ee3ea7450 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_textcase.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_variant.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_variant.py index 083e546ea6..ede4d46d41 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_variant.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/colorbar/tickfont/_weight.py b/plotly/validators/histogram2dcontour/colorbar/tickfont/_weight.py index d02eeabc7f..81548da418 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickfont/_weight.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2dcontour.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py index 1171b8d271..703c64fe46 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="histogram2dcontour.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py index 744eb789c3..eaaaae2870 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="histogram2dcontour.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py index ca21308743..a4a45344c9 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="histogram2dcontour.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py index 7ef9776ffc..ce51441ec6 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="histogram2dcontour.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py index 17f8d15195..a03e68ec2f 100644 --- a/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py +++ b/plotly/validators/histogram2dcontour/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="histogram2dcontour.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/title/__init__.py b/plotly/validators/histogram2dcontour/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/__init__.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/histogram2dcontour/colorbar/title/_font.py b/plotly/validators/histogram2dcontour/colorbar/title/_font.py index 7d25603e28..e9fc796453 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/_font.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram2dcontour.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/title/_side.py b/plotly/validators/histogram2dcontour/colorbar/title/_side.py index 0348d814c6..c69806d6e1 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/_side.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="histogram2dcontour.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/title/_text.py b/plotly/validators/histogram2dcontour/colorbar/title/_text.py index 4d26f7909f..2afaaa14f0 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/_text.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram2dcontour.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py b/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py index 5cdc8228e1..fb2dc01949 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py index b14c67f621..37ccf79801 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_lineposition.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_lineposition.py index 0d59a59e10..3f436662b0 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_lineposition.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_shadow.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_shadow.py index 3599047d49..ee9ea870fc 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_shadow.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py index e675d03ade..75896e38ce 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_style.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_style.py index 1d31c21b8b..7d481e4c71 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_style.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_textcase.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_textcase.py index 97ae2550ff..7e5eeff641 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_textcase.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_variant.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_variant.py index 16bcb4bb06..44614fe166 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_variant.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/colorbar/title/font/_weight.py b/plotly/validators/histogram2dcontour/colorbar/title/font/_weight.py index 6768b94da5..fcc42a9177 100644 --- a/plotly/validators/histogram2dcontour/colorbar/title/font/_weight.py +++ b/plotly/validators/histogram2dcontour/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2dcontour.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2dcontour/contours/__init__.py b/plotly/validators/histogram2dcontour/contours/__init__.py index 0650ad574b..230a907cd7 100644 --- a/plotly/validators/histogram2dcontour/contours/__init__.py +++ b/plotly/validators/histogram2dcontour/contours/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._type import TypeValidator - from ._start import StartValidator - from ._size import SizeValidator - from ._showlines import ShowlinesValidator - from ._showlabels import ShowlabelsValidator - from ._operation import OperationValidator - from ._labelformat import LabelformatValidator - from ._labelfont import LabelfontValidator - from ._end import EndValidator - from ._coloring import ColoringValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._type.TypeValidator", - "._start.StartValidator", - "._size.SizeValidator", - "._showlines.ShowlinesValidator", - "._showlabels.ShowlabelsValidator", - "._operation.OperationValidator", - "._labelformat.LabelformatValidator", - "._labelfont.LabelfontValidator", - "._end.EndValidator", - "._coloring.ColoringValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._type.TypeValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._showlines.ShowlinesValidator", + "._showlabels.ShowlabelsValidator", + "._operation.OperationValidator", + "._labelformat.LabelformatValidator", + "._labelfont.LabelfontValidator", + "._end.EndValidator", + "._coloring.ColoringValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/contours/_coloring.py b/plotly/validators/histogram2dcontour/contours/_coloring.py index 54ed8cd3b1..fe4869709e 100644 --- a/plotly/validators/histogram2dcontour/contours/_coloring.py +++ b/plotly/validators/histogram2dcontour/contours/_coloring.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoringValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ColoringValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="coloring", parent_name="histogram2dcontour.contours", **kwargs, ): - super(ColoringValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fill", "heatmap", "lines", "none"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/_end.py b/plotly/validators/histogram2dcontour/contours/_end.py index e1f442fd65..1691cc9a26 100644 --- a/plotly/validators/histogram2dcontour/contours/_end.py +++ b/plotly/validators/histogram2dcontour/contours/_end.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.NumberValidator): +class EndValidator(_bv.NumberValidator): def __init__( self, plotly_name="end", parent_name="histogram2dcontour.contours", **kwargs ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/_labelfont.py b/plotly/validators/histogram2dcontour/contours/_labelfont.py index 744fe1c76a..55f611bc23 100644 --- a/plotly/validators/histogram2dcontour/contours/_labelfont.py +++ b/plotly/validators/histogram2dcontour/contours/_labelfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="labelfont", parent_name="histogram2dcontour.contours", **kwargs, ): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Labelfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/_labelformat.py b/plotly/validators/histogram2dcontour/contours/_labelformat.py index cd538b466f..fa7ba61244 100644 --- a/plotly/validators/histogram2dcontour/contours/_labelformat.py +++ b/plotly/validators/histogram2dcontour/contours/_labelformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelformatValidator(_plotly_utils.basevalidators.StringValidator): +class LabelformatValidator(_bv.StringValidator): def __init__( self, plotly_name="labelformat", parent_name="histogram2dcontour.contours", **kwargs, ): - super(LabelformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/contours/_operation.py b/plotly/validators/histogram2dcontour/contours/_operation.py index 8d373d56c6..f59351ad5d 100644 --- a/plotly/validators/histogram2dcontour/contours/_operation.py +++ b/plotly/validators/histogram2dcontour/contours/_operation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OperationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OperationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="operation", parent_name="histogram2dcontour.contours", **kwargs, ): - super(OperationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/contours/_showlabels.py b/plotly/validators/histogram2dcontour/contours/_showlabels.py index 6b6a4728d9..90c49a2c63 100644 --- a/plotly/validators/histogram2dcontour/contours/_showlabels.py +++ b/plotly/validators/histogram2dcontour/contours/_showlabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlabels", parent_name="histogram2dcontour.contours", **kwargs, ): - super(ShowlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/contours/_showlines.py b/plotly/validators/histogram2dcontour/contours/_showlines.py index a59ac2c939..cfdd675657 100644 --- a/plotly/validators/histogram2dcontour/contours/_showlines.py +++ b/plotly/validators/histogram2dcontour/contours/_showlines.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlinesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlinesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlines", parent_name="histogram2dcontour.contours", **kwargs, ): - super(ShowlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/contours/_size.py b/plotly/validators/histogram2dcontour/contours/_size.py index e65320a576..14469c5d70 100644 --- a/plotly/validators/histogram2dcontour/contours/_size.py +++ b/plotly/validators/histogram2dcontour/contours/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.contours", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram2dcontour/contours/_start.py b/plotly/validators/histogram2dcontour/contours/_start.py index 8e5814d029..b5c7bfc49a 100644 --- a/plotly/validators/histogram2dcontour/contours/_start.py +++ b/plotly/validators/histogram2dcontour/contours/_start.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__( self, plotly_name="start", parent_name="histogram2dcontour.contours", **kwargs ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autocontour": False}), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/_type.py b/plotly/validators/histogram2dcontour/contours/_type.py index af77dbcd1d..75b7f33989 100644 --- a/plotly/validators/histogram2dcontour/contours/_type.py +++ b/plotly/validators/histogram2dcontour/contours/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="histogram2dcontour.contours", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["levels", "constraint"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/_value.py b/plotly/validators/histogram2dcontour/contours/_value.py index 57ff6d7112..17b61ba415 100644 --- a/plotly/validators/histogram2dcontour/contours/_value.py +++ b/plotly/validators/histogram2dcontour/contours/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.AnyValidator): +class ValueValidator(_bv.AnyValidator): def __init__( self, plotly_name="value", parent_name="histogram2dcontour.contours", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py b/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_color.py b/plotly/validators/histogram2dcontour/contours/labelfont/_color.py index bca9ea117b..c05a17ea86 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_color.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_family.py b/plotly/validators/histogram2dcontour/contours/labelfont/_family.py index c8b1479a1c..f6bc019d25 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_family.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_lineposition.py b/plotly/validators/histogram2dcontour/contours/labelfont/_lineposition.py index 3106719094..36b70895fb 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_lineposition.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_shadow.py b/plotly/validators/histogram2dcontour/contours/labelfont/_shadow.py index 46972c6d7b..edb2a34208 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_shadow.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_size.py b/plotly/validators/histogram2dcontour/contours/labelfont/_size.py index ce940b730b..167d1edc7e 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_size.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_style.py b/plotly/validators/histogram2dcontour/contours/labelfont/_style.py index cc970a7b86..7c0a90d04a 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_style.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_textcase.py b/plotly/validators/histogram2dcontour/contours/labelfont/_textcase.py index 16d81388bd..e30991ee77 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_textcase.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_variant.py b/plotly/validators/histogram2dcontour/contours/labelfont/_variant.py index a415e21842..5f620659c4 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_variant.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/contours/labelfont/_weight.py b/plotly/validators/histogram2dcontour/contours/labelfont/_weight.py index f8a51cf5d7..8baada3524 100644 --- a/plotly/validators/histogram2dcontour/contours/labelfont/_weight.py +++ b/plotly/validators/histogram2dcontour/contours/labelfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2dcontour.contours.labelfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/__init__.py b/plotly/validators/histogram2dcontour/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/__init__.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_align.py b/plotly/validators/histogram2dcontour/hoverlabel/_align.py index a25814be13..8173b16af1 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_align.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="histogram2dcontour.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py index c08c292162..aa0047e287 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_alignsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py b/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py index 9d038b07e2..ef5e535357 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py index 9d8739dce6..856c3eef74 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_bgcolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py b/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py index 888a250b30..bb88ccf815 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py index 0375fe8add..fa29fb61d7 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_font.py b/plotly/validators/histogram2dcontour/hoverlabel/_font.py index eaa8b7c44f..85463fad04 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_font.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram2dcontour.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py b/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py index 106a50ed61..19c36b379b 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_namelength.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py index 85ec7879a5..7fad5e915f 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="histogram2dcontour.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py b/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py index 8b0e85a243..05b7794adb 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py index b2ed8e0489..77fe51c4f5 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py index 10d6bf49c9..e501b3817c 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py index 7199162a99..413fc3385f 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_lineposition.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_lineposition.py index e8357b95a4..dce8d7e5fa 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_lineposition.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_linepositionsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_linepositionsrc.py index 3e6c6c7f84..b600e5e528 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_shadow.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_shadow.py index 15faf7ca93..f67d7195d3 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_shadow.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_shadowsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_shadowsrc.py index 8615e65bec..d444788473 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py index 95c9a3d3b0..6690d5f266 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py index 4d4e06f5cb..986a2d2af4 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_style.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_style.py index 5ffd95b8e3..fbe7db3833 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_style.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_stylesrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_stylesrc.py index d4b10d0478..fb8e6dd7d1 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_textcase.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_textcase.py index c5327e3710..a493d16f8e 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_textcase.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_textcasesrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_textcasesrc.py index 404c7e07d8..dec54b5924 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_variant.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_variant.py index 9c548ca5e9..733aa8ef51 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_variant.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_variantsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_variantsrc.py index c35430443c..4e1c339097 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_weight.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_weight.py index b1051b8005..768c5ec6c3 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_weight.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/histogram2dcontour/hoverlabel/font/_weightsrc.py b/plotly/validators/histogram2dcontour/hoverlabel/font/_weightsrc.py index 576ffe9969..1eb9239d0c 100644 --- a/plotly/validators/histogram2dcontour/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/histogram2dcontour/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="histogram2dcontour.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/__init__.py b/plotly/validators/histogram2dcontour/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/__init__.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/_font.py b/plotly/validators/histogram2dcontour/legendgrouptitle/_font.py index 66f3160fcd..4e03235e5a 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/_font.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="histogram2dcontour.legendgrouptitle", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/_text.py b/plotly/validators/histogram2dcontour/legendgrouptitle/_text.py index f98edde90e..d4e5aa2ef6 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/_text.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="histogram2dcontour.legendgrouptitle", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/__init__.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/__init__.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_color.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_color.py index c9817b4100..054739dd89 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_color.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_family.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_family.py index a370fde0bd..5a470f583a 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_family.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_lineposition.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_lineposition.py index be7ec3591c..bcad457312 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_shadow.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_shadow.py index 51e17f92cb..36f6aca94d 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_size.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_size.py index 074a3e6ad6..549d5f7e98 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_size.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_style.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_style.py index 375a45ca7e..41d69a6342 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_style.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_textcase.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_textcase.py index 4bedfff0c1..701e9ef274 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_variant.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_variant.py index 64f8433bc7..933b44ffde 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_variant.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_weight.py b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_weight.py index a3953564ed..bb643b1bbb 100644 --- a/plotly/validators/histogram2dcontour/legendgrouptitle/font/_weight.py +++ b/plotly/validators/histogram2dcontour/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2dcontour.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2dcontour/line/__init__.py b/plotly/validators/histogram2dcontour/line/__init__.py index cc28ee67fe..13c597bfd2 100644 --- a/plotly/validators/histogram2dcontour/line/__init__.py +++ b/plotly/validators/histogram2dcontour/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._dash.DashValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/line/_color.py b/plotly/validators/histogram2dcontour/line/_color.py index 0c4b28138f..c847397a34 100644 --- a/plotly/validators/histogram2dcontour/line/_color.py +++ b/plotly/validators/histogram2dcontour/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style+colorbars"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/line/_dash.py b/plotly/validators/histogram2dcontour/line/_dash.py index 60b9f21e6c..4bfc080c8b 100644 --- a/plotly/validators/histogram2dcontour/line/_dash.py +++ b/plotly/validators/histogram2dcontour/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="histogram2dcontour.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/histogram2dcontour/line/_smoothing.py b/plotly/validators/histogram2dcontour/line/_smoothing.py index a0debfc1c9..cf2330b7e3 100644 --- a/plotly/validators/histogram2dcontour/line/_smoothing.py +++ b/plotly/validators/histogram2dcontour/line/_smoothing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="histogram2dcontour.line", **kwargs ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram2dcontour/line/_width.py b/plotly/validators/histogram2dcontour/line/_width.py index 594eca548b..e63274864f 100644 --- a/plotly/validators/histogram2dcontour/line/_width.py +++ b/plotly/validators/histogram2dcontour/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="histogram2dcontour.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style+colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/histogram2dcontour/marker/__init__.py b/plotly/validators/histogram2dcontour/marker/__init__.py index 4ca11d9882..8cd95cefa3 100644 --- a/plotly/validators/histogram2dcontour/marker/__init__.py +++ b/plotly/validators/histogram2dcontour/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/histogram2dcontour/marker/_color.py b/plotly/validators/histogram2dcontour/marker/_color.py index bba82a4482..6893e54612 100644 --- a/plotly/validators/histogram2dcontour/marker/_color.py +++ b/plotly/validators/histogram2dcontour/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/marker/_colorsrc.py b/plotly/validators/histogram2dcontour/marker/_colorsrc.py index 0e7ffcd0fd..1822751dc3 100644 --- a/plotly/validators/histogram2dcontour/marker/_colorsrc.py +++ b/plotly/validators/histogram2dcontour/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="histogram2dcontour.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/stream/__init__.py b/plotly/validators/histogram2dcontour/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/histogram2dcontour/stream/__init__.py +++ b/plotly/validators/histogram2dcontour/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/histogram2dcontour/stream/_maxpoints.py b/plotly/validators/histogram2dcontour/stream/_maxpoints.py index 926d100feb..43f59f2290 100644 --- a/plotly/validators/histogram2dcontour/stream/_maxpoints.py +++ b/plotly/validators/histogram2dcontour/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="histogram2dcontour.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/histogram2dcontour/stream/_token.py b/plotly/validators/histogram2dcontour/stream/_token.py index b82f5b454f..62f00997f7 100644 --- a/plotly/validators/histogram2dcontour/stream/_token.py +++ b/plotly/validators/histogram2dcontour/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="histogram2dcontour.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2dcontour/textfont/__init__.py b/plotly/validators/histogram2dcontour/textfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/histogram2dcontour/textfont/__init__.py +++ b/plotly/validators/histogram2dcontour/textfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/histogram2dcontour/textfont/_color.py b/plotly/validators/histogram2dcontour/textfont/_color.py index 5adfec84aa..24b3e5823e 100644 --- a/plotly/validators/histogram2dcontour/textfont/_color.py +++ b/plotly/validators/histogram2dcontour/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="histogram2dcontour.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/textfont/_family.py b/plotly/validators/histogram2dcontour/textfont/_family.py index d3998e1475..e685a6d1a7 100644 --- a/plotly/validators/histogram2dcontour/textfont/_family.py +++ b/plotly/validators/histogram2dcontour/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="histogram2dcontour.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/histogram2dcontour/textfont/_lineposition.py b/plotly/validators/histogram2dcontour/textfont/_lineposition.py index ddcb1cdaf2..805cc59a06 100644 --- a/plotly/validators/histogram2dcontour/textfont/_lineposition.py +++ b/plotly/validators/histogram2dcontour/textfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="histogram2dcontour.textfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/histogram2dcontour/textfont/_shadow.py b/plotly/validators/histogram2dcontour/textfont/_shadow.py index 1267012a85..89bea3fb87 100644 --- a/plotly/validators/histogram2dcontour/textfont/_shadow.py +++ b/plotly/validators/histogram2dcontour/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="histogram2dcontour.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/textfont/_size.py b/plotly/validators/histogram2dcontour/textfont/_size.py index dcfe222b16..fa8fe5226c 100644 --- a/plotly/validators/histogram2dcontour/textfont/_size.py +++ b/plotly/validators/histogram2dcontour/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/histogram2dcontour/textfont/_style.py b/plotly/validators/histogram2dcontour/textfont/_style.py index 8f88604a08..47cad6e198 100644 --- a/plotly/validators/histogram2dcontour/textfont/_style.py +++ b/plotly/validators/histogram2dcontour/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="histogram2dcontour.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/textfont/_textcase.py b/plotly/validators/histogram2dcontour/textfont/_textcase.py index fd76b5d543..ee6545ecef 100644 --- a/plotly/validators/histogram2dcontour/textfont/_textcase.py +++ b/plotly/validators/histogram2dcontour/textfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="histogram2dcontour.textfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/histogram2dcontour/textfont/_variant.py b/plotly/validators/histogram2dcontour/textfont/_variant.py index c2c45eab31..8e49cb4e5d 100644 --- a/plotly/validators/histogram2dcontour/textfont/_variant.py +++ b/plotly/validators/histogram2dcontour/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="histogram2dcontour.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/histogram2dcontour/textfont/_weight.py b/plotly/validators/histogram2dcontour/textfont/_weight.py index bd4bbc596b..c868a6d1fc 100644 --- a/plotly/validators/histogram2dcontour/textfont/_weight.py +++ b/plotly/validators/histogram2dcontour/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="histogram2dcontour.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/histogram2dcontour/xbins/__init__.py b/plotly/validators/histogram2dcontour/xbins/__init__.py index b7d1eaa9fc..462d290b54 100644 --- a/plotly/validators/histogram2dcontour/xbins/__init__.py +++ b/plotly/validators/histogram2dcontour/xbins/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._start import StartValidator - from ._size import SizeValidator - from ._end import EndValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], +) diff --git a/plotly/validators/histogram2dcontour/xbins/_end.py b/plotly/validators/histogram2dcontour/xbins/_end.py index 448d94fdf2..e262c8fec6 100644 --- a/plotly/validators/histogram2dcontour/xbins/_end.py +++ b/plotly/validators/histogram2dcontour/xbins/_end.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.AnyValidator): +class EndValidator(_bv.AnyValidator): def __init__( self, plotly_name="end", parent_name="histogram2dcontour.xbins", **kwargs ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/xbins/_size.py b/plotly/validators/histogram2dcontour/xbins/_size.py index 2706577768..4b1f8e093a 100644 --- a/plotly/validators/histogram2dcontour/xbins/_size.py +++ b/plotly/validators/histogram2dcontour/xbins/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): +class SizeValidator(_bv.AnyValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.xbins", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/xbins/_start.py b/plotly/validators/histogram2dcontour/xbins/_start.py index 8500104dd8..7596bb7dbb 100644 --- a/plotly/validators/histogram2dcontour/xbins/_start.py +++ b/plotly/validators/histogram2dcontour/xbins/_start.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.AnyValidator): +class StartValidator(_bv.AnyValidator): def __init__( self, plotly_name="start", parent_name="histogram2dcontour.xbins", **kwargs ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/ybins/__init__.py b/plotly/validators/histogram2dcontour/ybins/__init__.py index b7d1eaa9fc..462d290b54 100644 --- a/plotly/validators/histogram2dcontour/ybins/__init__.py +++ b/plotly/validators/histogram2dcontour/ybins/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._start import StartValidator - from ._size import SizeValidator - from ._end import EndValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._start.StartValidator", "._size.SizeValidator", "._end.EndValidator"], +) diff --git a/plotly/validators/histogram2dcontour/ybins/_end.py b/plotly/validators/histogram2dcontour/ybins/_end.py index cb79c4e967..01dbf54d40 100644 --- a/plotly/validators/histogram2dcontour/ybins/_end.py +++ b/plotly/validators/histogram2dcontour/ybins/_end.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.AnyValidator): +class EndValidator(_bv.AnyValidator): def __init__( self, plotly_name="end", parent_name="histogram2dcontour.ybins", **kwargs ): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/ybins/_size.py b/plotly/validators/histogram2dcontour/ybins/_size.py index e46d2ee4be..eac11371de 100644 --- a/plotly/validators/histogram2dcontour/ybins/_size.py +++ b/plotly/validators/histogram2dcontour/ybins/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.AnyValidator): +class SizeValidator(_bv.AnyValidator): def __init__( self, plotly_name="size", parent_name="histogram2dcontour.ybins", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/histogram2dcontour/ybins/_start.py b/plotly/validators/histogram2dcontour/ybins/_start.py index aec1ef1198..5790bd0699 100644 --- a/plotly/validators/histogram2dcontour/ybins/_start.py +++ b/plotly/validators/histogram2dcontour/ybins/_start.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.AnyValidator): +class StartValidator(_bv.AnyValidator): def __init__( self, plotly_name="start", parent_name="histogram2dcontour.ybins", **kwargs ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/__init__.py b/plotly/validators/icicle/__init__.py index 79272436ae..70d508b26c 100644 --- a/plotly/validators/icicle/__init__.py +++ b/plotly/validators/icicle/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._tiling import TilingValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textposition import TextpositionValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._sort import SortValidator - from ._root import RootValidator - from ._pathbar import PathbarValidator - from ._parentssrc import ParentssrcValidator - from ._parents import ParentsValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._maxdepth import MaxdepthValidator - from ._marker import MarkerValidator - from ._level import LevelValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._leaf import LeafValidator - from ._labelssrc import LabelssrcValidator - from ._labels import LabelsValidator - from ._insidetextfont import InsidetextfontValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._domain import DomainValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._count import CountValidator - from ._branchvalues import BranchvaluesValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._tiling.TilingValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textposition.TextpositionValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._sort.SortValidator", - "._root.RootValidator", - "._pathbar.PathbarValidator", - "._parentssrc.ParentssrcValidator", - "._parents.ParentsValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._maxdepth.MaxdepthValidator", - "._marker.MarkerValidator", - "._level.LevelValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._leaf.LeafValidator", - "._labelssrc.LabelssrcValidator", - "._labels.LabelsValidator", - "._insidetextfont.InsidetextfontValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._domain.DomainValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._count.CountValidator", - "._branchvalues.BranchvaluesValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tiling.TilingValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sort.SortValidator", + "._root.RootValidator", + "._pathbar.PathbarValidator", + "._parentssrc.ParentssrcValidator", + "._parents.ParentsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdepth.MaxdepthValidator", + "._marker.MarkerValidator", + "._level.LevelValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._leaf.LeafValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._count.CountValidator", + "._branchvalues.BranchvaluesValidator", + ], +) diff --git a/plotly/validators/icicle/_branchvalues.py b/plotly/validators/icicle/_branchvalues.py index 968fe564e2..3ff0a4a7dd 100644 --- a/plotly/validators/icicle/_branchvalues.py +++ b/plotly/validators/icicle/_branchvalues.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BranchvaluesValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="branchvalues", parent_name="icicle", **kwargs): - super(BranchvaluesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["remainder", "total"]), **kwargs, diff --git a/plotly/validators/icicle/_count.py b/plotly/validators/icicle/_count.py index 4a373aae2f..fcf1253397 100644 --- a/plotly/validators/icicle/_count.py +++ b/plotly/validators/icicle/_count.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): +class CountValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="count", parent_name="icicle", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), flags=kwargs.pop("flags", ["branches", "leaves"]), **kwargs, diff --git a/plotly/validators/icicle/_customdata.py b/plotly/validators/icicle/_customdata.py index 38e83f4066..89eb9ad6d3 100644 --- a/plotly/validators/icicle/_customdata.py +++ b/plotly/validators/icicle/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="icicle", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/_customdatasrc.py b/plotly/validators/icicle/_customdatasrc.py index 1a5c9483af..504cc55064 100644 --- a/plotly/validators/icicle/_customdatasrc.py +++ b/plotly/validators/icicle/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="icicle", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_domain.py b/plotly/validators/icicle/_domain.py index b8ec63a531..fe878eacef 100644 --- a/plotly/validators/icicle/_domain.py +++ b/plotly/validators/icicle/_domain.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="icicle", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this icicle trace . - row - If there is a layout grid, use the domain for - this row in the grid for this icicle trace . - x - Sets the horizontal domain of this icicle trace - (in plot fraction). - y - Sets the vertical domain of this icicle trace - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/icicle/_hoverinfo.py b/plotly/validators/icicle/_hoverinfo.py index 7e5ad16fb0..c2f72fef2b 100644 --- a/plotly/validators/icicle/_hoverinfo.py +++ b/plotly/validators/icicle/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="icicle", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/icicle/_hoverinfosrc.py b/plotly/validators/icicle/_hoverinfosrc.py index 8fa7f82b21..4ea49218c2 100644 --- a/plotly/validators/icicle/_hoverinfosrc.py +++ b/plotly/validators/icicle/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="icicle", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_hoverlabel.py b/plotly/validators/icicle/_hoverlabel.py index 26ba3000d6..db2e760626 100644 --- a/plotly/validators/icicle/_hoverlabel.py +++ b/plotly/validators/icicle/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="icicle", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/icicle/_hovertemplate.py b/plotly/validators/icicle/_hovertemplate.py index b08efb5705..53c0083104 100644 --- a/plotly/validators/icicle/_hovertemplate.py +++ b/plotly/validators/icicle/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="icicle", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/icicle/_hovertemplatesrc.py b/plotly/validators/icicle/_hovertemplatesrc.py index 70914d05c5..5530e71b66 100644 --- a/plotly/validators/icicle/_hovertemplatesrc.py +++ b/plotly/validators/icicle/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="icicle", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_hovertext.py b/plotly/validators/icicle/_hovertext.py index e4df546f2f..d529dff5db 100644 --- a/plotly/validators/icicle/_hovertext.py +++ b/plotly/validators/icicle/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="icicle", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/icicle/_hovertextsrc.py b/plotly/validators/icicle/_hovertextsrc.py index 470e10ff58..6ab41fa82b 100644 --- a/plotly/validators/icicle/_hovertextsrc.py +++ b/plotly/validators/icicle/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="icicle", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_ids.py b/plotly/validators/icicle/_ids.py index 125d9b3e74..366425d6f3 100644 --- a/plotly/validators/icicle/_ids.py +++ b/plotly/validators/icicle/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="icicle", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/icicle/_idssrc.py b/plotly/validators/icicle/_idssrc.py index 011b43e641..09d63ef1de 100644 --- a/plotly/validators/icicle/_idssrc.py +++ b/plotly/validators/icicle/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="icicle", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_insidetextfont.py b/plotly/validators/icicle/_insidetextfont.py index bd41fb5661..da4171b285 100644 --- a/plotly/validators/icicle/_insidetextfont.py +++ b/plotly/validators/icicle/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="icicle", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/icicle/_labels.py b/plotly/validators/icicle/_labels.py index bc9a637d2e..4ce0160d48 100644 --- a/plotly/validators/icicle/_labels.py +++ b/plotly/validators/icicle/_labels.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="labels", parent_name="icicle", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/_labelssrc.py b/plotly/validators/icicle/_labelssrc.py index 42a5e13dbf..be6a018eef 100644 --- a/plotly/validators/icicle/_labelssrc.py +++ b/plotly/validators/icicle/_labelssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelssrc", parent_name="icicle", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_leaf.py b/plotly/validators/icicle/_leaf.py index 0095d5d8fa..caeb7d5041 100644 --- a/plotly/validators/icicle/_leaf.py +++ b/plotly/validators/icicle/_leaf.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LeafValidator(_plotly_utils.basevalidators.CompoundValidator): +class LeafValidator(_bv.CompoundValidator): def __init__(self, plotly_name="leaf", parent_name="icicle", **kwargs): - super(LeafValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Leaf"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the opacity of the leaves. With colorscale - it is defaulted to 1; otherwise it is defaulted - to 0.7 """, ), **kwargs, diff --git a/plotly/validators/icicle/_legend.py b/plotly/validators/icicle/_legend.py index b8c5a78fc5..0199e6fca3 100644 --- a/plotly/validators/icicle/_legend.py +++ b/plotly/validators/icicle/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="icicle", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/icicle/_legendgrouptitle.py b/plotly/validators/icicle/_legendgrouptitle.py index dbbcda45fd..c9c95290d3 100644 --- a/plotly/validators/icicle/_legendgrouptitle.py +++ b/plotly/validators/icicle/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="icicle", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/icicle/_legendrank.py b/plotly/validators/icicle/_legendrank.py index 28ccd9e480..e9f5a588f3 100644 --- a/plotly/validators/icicle/_legendrank.py +++ b/plotly/validators/icicle/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="icicle", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/icicle/_legendwidth.py b/plotly/validators/icicle/_legendwidth.py index 8b9da9ea86..94873f1ffa 100644 --- a/plotly/validators/icicle/_legendwidth.py +++ b/plotly/validators/icicle/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="icicle", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/_level.py b/plotly/validators/icicle/_level.py index 2802f86d0a..fd5881357a 100644 --- a/plotly/validators/icicle/_level.py +++ b/plotly/validators/icicle/_level.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LevelValidator(_plotly_utils.basevalidators.AnyValidator): +class LevelValidator(_bv.AnyValidator): def __init__(self, plotly_name="level", parent_name="icicle", **kwargs): - super(LevelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/_marker.py b/plotly/validators/icicle/_marker.py index 90db168ee0..db29208067 100644 --- a/plotly/validators/icicle/_marker.py +++ b/plotly/validators/icicle/_marker.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="icicle", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colors is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colors is - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colors is set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.icicle.marker.Colo - rBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colors is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.icicle.marker.Line - ` instance or dict with compatible properties - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if colors is set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colors is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/icicle/_maxdepth.py b/plotly/validators/icicle/_maxdepth.py index 2cefe681ed..d28a038d1f 100644 --- a/plotly/validators/icicle/_maxdepth.py +++ b/plotly/validators/icicle/_maxdepth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): +class MaxdepthValidator(_bv.IntegerValidator): def __init__(self, plotly_name="maxdepth", parent_name="icicle", **kwargs): - super(MaxdepthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/icicle/_meta.py b/plotly/validators/icicle/_meta.py index 5b867d1db0..de076911ac 100644 --- a/plotly/validators/icicle/_meta.py +++ b/plotly/validators/icicle/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="icicle", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/_metasrc.py b/plotly/validators/icicle/_metasrc.py index 737cc3ccc5..220805c749 100644 --- a/plotly/validators/icicle/_metasrc.py +++ b/plotly/validators/icicle/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="icicle", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_name.py b/plotly/validators/icicle/_name.py index 6334bf65ef..16982ed967 100644 --- a/plotly/validators/icicle/_name.py +++ b/plotly/validators/icicle/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="icicle", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/icicle/_opacity.py b/plotly/validators/icicle/_opacity.py index c3544f53f6..3fa708b85d 100644 --- a/plotly/validators/icicle/_opacity.py +++ b/plotly/validators/icicle/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="icicle", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/icicle/_outsidetextfont.py b/plotly/validators/icicle/_outsidetextfont.py index 63d9997ba6..df8b1da36e 100644 --- a/plotly/validators/icicle/_outsidetextfont.py +++ b/plotly/validators/icicle/_outsidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="outsidetextfont", parent_name="icicle", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/icicle/_parents.py b/plotly/validators/icicle/_parents.py index be70659c25..7d4d08cddb 100644 --- a/plotly/validators/icicle/_parents.py +++ b/plotly/validators/icicle/_parents.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ParentsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="parents", parent_name="icicle", **kwargs): - super(ParentsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/_parentssrc.py b/plotly/validators/icicle/_parentssrc.py index 720e9f98ce..b15fdf693c 100644 --- a/plotly/validators/icicle/_parentssrc.py +++ b/plotly/validators/icicle/_parentssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ParentssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="parentssrc", parent_name="icicle", **kwargs): - super(ParentssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_pathbar.py b/plotly/validators/icicle/_pathbar.py index 9226a642ea..2d69fdbaf6 100644 --- a/plotly/validators/icicle/_pathbar.py +++ b/plotly/validators/icicle/_pathbar.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PathbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class PathbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pathbar", parent_name="icicle", **kwargs): - super(PathbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pathbar"), data_docs=kwargs.pop( "data_docs", """ - edgeshape - Determines which shape is used for edges - between `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used - with 3 pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. - outside the trace `domain` and with one pixel - gap. """, ), **kwargs, diff --git a/plotly/validators/icicle/_root.py b/plotly/validators/icicle/_root.py index b2340ade38..1d1f259506 100644 --- a/plotly/validators/icicle/_root.py +++ b/plotly/validators/icicle/_root.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RootValidator(_plotly_utils.basevalidators.CompoundValidator): +class RootValidator(_bv.CompoundValidator): def __init__(self, plotly_name="root", parent_name="icicle", **kwargs): - super(RootValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Root"), data_docs=kwargs.pop( "data_docs", """ - color - sets the color of the root node for a - sunburst/treemap/icicle trace. this has no - effect when a colorscale is used to set the - markers. """, ), **kwargs, diff --git a/plotly/validators/icicle/_sort.py b/plotly/validators/icicle/_sort.py index d36c5b3f44..faf02f0f6d 100644 --- a/plotly/validators/icicle/_sort.py +++ b/plotly/validators/icicle/_sort.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SortValidator(_plotly_utils.basevalidators.BooleanValidator): +class SortValidator(_bv.BooleanValidator): def __init__(self, plotly_name="sort", parent_name="icicle", **kwargs): - super(SortValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/_stream.py b/plotly/validators/icicle/_stream.py index c7d0a34583..7e174fc79a 100644 --- a/plotly/validators/icicle/_stream.py +++ b/plotly/validators/icicle/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="icicle", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/icicle/_text.py b/plotly/validators/icicle/_text.py index 44665148ff..62dd850a91 100644 --- a/plotly/validators/icicle/_text.py +++ b/plotly/validators/icicle/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="icicle", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/icicle/_textfont.py b/plotly/validators/icicle/_textfont.py index 847bb34e2d..cb5aac9d28 100644 --- a/plotly/validators/icicle/_textfont.py +++ b/plotly/validators/icicle/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="icicle", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/icicle/_textinfo.py b/plotly/validators/icicle/_textinfo.py index fdbe0aa5c2..6efe97cd94 100644 --- a/plotly/validators/icicle/_textinfo.py +++ b/plotly/validators/icicle/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="icicle", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop( diff --git a/plotly/validators/icicle/_textposition.py b/plotly/validators/icicle/_textposition.py index 4e43bc2d43..d5c1394f6f 100644 --- a/plotly/validators/icicle/_textposition.py +++ b/plotly/validators/icicle/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="icicle", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/icicle/_textsrc.py b/plotly/validators/icicle/_textsrc.py index 2e6eb192a3..ff09c728b0 100644 --- a/plotly/validators/icicle/_textsrc.py +++ b/plotly/validators/icicle/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="icicle", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_texttemplate.py b/plotly/validators/icicle/_texttemplate.py index 634aac3569..0f3c39582a 100644 --- a/plotly/validators/icicle/_texttemplate.py +++ b/plotly/validators/icicle/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="icicle", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/_texttemplatesrc.py b/plotly/validators/icicle/_texttemplatesrc.py index c04e414e4e..1ce831d4b8 100644 --- a/plotly/validators/icicle/_texttemplatesrc.py +++ b/plotly/validators/icicle/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="icicle", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_tiling.py b/plotly/validators/icicle/_tiling.py index bbc219f304..cf173b4d6a 100644 --- a/plotly/validators/icicle/_tiling.py +++ b/plotly/validators/icicle/_tiling.py @@ -1,32 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TilingValidator(_plotly_utils.basevalidators.CompoundValidator): +class TilingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tiling", parent_name="icicle", **kwargs): - super(TilingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tiling"), data_docs=kwargs.pop( "data_docs", """ - flip - Determines if the positions obtained from - solver are flipped on each axis. - orientation - When set in conjunction with `tiling.flip`, - determines on which side the root nodes are - drawn in the chart. If `tiling.orientation` is - "v" and `tiling.flip` is "", the root nodes - appear at the top. If `tiling.orientation` is - "v" and `tiling.flip` is "y", the root nodes - appear at the bottom. If `tiling.orientation` - is "h" and `tiling.flip` is "", the root nodes - appear at the left. If `tiling.orientation` is - "h" and `tiling.flip` is "x", the root nodes - appear at the right. - pad - Sets the inner padding (in px). """, ), **kwargs, diff --git a/plotly/validators/icicle/_uid.py b/plotly/validators/icicle/_uid.py index 656afd5f6a..1e8cbbb25e 100644 --- a/plotly/validators/icicle/_uid.py +++ b/plotly/validators/icicle/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="icicle", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/_uirevision.py b/plotly/validators/icicle/_uirevision.py index 80a2c1ead8..4ff1ecb18e 100644 --- a/plotly/validators/icicle/_uirevision.py +++ b/plotly/validators/icicle/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="icicle", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_values.py b/plotly/validators/icicle/_values.py index 954bfa69f8..2ce3255718 100644 --- a/plotly/validators/icicle/_values.py +++ b/plotly/validators/icicle/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="icicle", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/_valuessrc.py b/plotly/validators/icicle/_valuessrc.py index 6e08694e5a..73861ab60d 100644 --- a/plotly/validators/icicle/_valuessrc.py +++ b/plotly/validators/icicle/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="icicle", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/_visible.py b/plotly/validators/icicle/_visible.py index 6c3426313e..6de97d346f 100644 --- a/plotly/validators/icicle/_visible.py +++ b/plotly/validators/icicle/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="icicle", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/icicle/domain/__init__.py b/plotly/validators/icicle/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/icicle/domain/__init__.py +++ b/plotly/validators/icicle/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/icicle/domain/_column.py b/plotly/validators/icicle/domain/_column.py index a839364030..a585aac95b 100644 --- a/plotly/validators/icicle/domain/_column.py +++ b/plotly/validators/icicle/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="icicle.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/domain/_row.py b/plotly/validators/icicle/domain/_row.py index bd0c6ed5b6..e52c9bcc64 100644 --- a/plotly/validators/icicle/domain/_row.py +++ b/plotly/validators/icicle/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="icicle.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/domain/_x.py b/plotly/validators/icicle/domain/_x.py index 296d3c5630..b5484bff73 100644 --- a/plotly/validators/icicle/domain/_x.py +++ b/plotly/validators/icicle/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="icicle.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/icicle/domain/_y.py b/plotly/validators/icicle/domain/_y.py index 7f1b2716c3..f451f8551b 100644 --- a/plotly/validators/icicle/domain/_y.py +++ b/plotly/validators/icicle/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="icicle.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/icicle/hoverlabel/__init__.py b/plotly/validators/icicle/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/icicle/hoverlabel/__init__.py +++ b/plotly/validators/icicle/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/icicle/hoverlabel/_align.py b/plotly/validators/icicle/hoverlabel/_align.py index 90bd15fc2b..ad676f76b9 100644 --- a/plotly/validators/icicle/hoverlabel/_align.py +++ b/plotly/validators/icicle/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="icicle.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/icicle/hoverlabel/_alignsrc.py b/plotly/validators/icicle/hoverlabel/_alignsrc.py index 68a205a02e..291d7776c9 100644 --- a/plotly/validators/icicle/hoverlabel/_alignsrc.py +++ b/plotly/validators/icicle/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="icicle.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/_bgcolor.py b/plotly/validators/icicle/hoverlabel/_bgcolor.py index f335219b97..5067127582 100644 --- a/plotly/validators/icicle/hoverlabel/_bgcolor.py +++ b/plotly/validators/icicle/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="icicle.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/icicle/hoverlabel/_bgcolorsrc.py b/plotly/validators/icicle/hoverlabel/_bgcolorsrc.py index 8e8ea94a61..1037538a79 100644 --- a/plotly/validators/icicle/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/icicle/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="icicle.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/_bordercolor.py b/plotly/validators/icicle/hoverlabel/_bordercolor.py index 4fa9517db9..4dd6fe5646 100644 --- a/plotly/validators/icicle/hoverlabel/_bordercolor.py +++ b/plotly/validators/icicle/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="icicle.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/icicle/hoverlabel/_bordercolorsrc.py b/plotly/validators/icicle/hoverlabel/_bordercolorsrc.py index 8930e8627d..4133b03ae6 100644 --- a/plotly/validators/icicle/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/icicle/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="icicle.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/_font.py b/plotly/validators/icicle/hoverlabel/_font.py index b79b24df03..a2252efa95 100644 --- a/plotly/validators/icicle/hoverlabel/_font.py +++ b/plotly/validators/icicle/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="icicle.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/icicle/hoverlabel/_namelength.py b/plotly/validators/icicle/hoverlabel/_namelength.py index e6b1dc6ab8..cd1561f680 100644 --- a/plotly/validators/icicle/hoverlabel/_namelength.py +++ b/plotly/validators/icicle/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="icicle.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/icicle/hoverlabel/_namelengthsrc.py b/plotly/validators/icicle/hoverlabel/_namelengthsrc.py index 3e62c3f977..10adc0a7e9 100644 --- a/plotly/validators/icicle/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/icicle/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="icicle.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/__init__.py b/plotly/validators/icicle/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/icicle/hoverlabel/font/__init__.py +++ b/plotly/validators/icicle/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/hoverlabel/font/_color.py b/plotly/validators/icicle/hoverlabel/font/_color.py index f60ca7a3fd..d49947711b 100644 --- a/plotly/validators/icicle/hoverlabel/font/_color.py +++ b/plotly/validators/icicle/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/icicle/hoverlabel/font/_colorsrc.py b/plotly/validators/icicle/hoverlabel/font/_colorsrc.py index 7d39e7e48f..d377d1c268 100644 --- a/plotly/validators/icicle/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_family.py b/plotly/validators/icicle/hoverlabel/font/_family.py index a0b8904360..2738ae2bba 100644 --- a/plotly/validators/icicle/hoverlabel/font/_family.py +++ b/plotly/validators/icicle/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/icicle/hoverlabel/font/_familysrc.py b/plotly/validators/icicle/hoverlabel/font/_familysrc.py index 3c61be6ebf..392f30317c 100644 --- a/plotly/validators/icicle/hoverlabel/font/_familysrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_lineposition.py b/plotly/validators/icicle/hoverlabel/font/_lineposition.py index ecd666c229..ae6fbb8efb 100644 --- a/plotly/validators/icicle/hoverlabel/font/_lineposition.py +++ b/plotly/validators/icicle/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/icicle/hoverlabel/font/_linepositionsrc.py b/plotly/validators/icicle/hoverlabel/font/_linepositionsrc.py index b56f2f3584..cde05cebe4 100644 --- a/plotly/validators/icicle/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="icicle.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_shadow.py b/plotly/validators/icicle/hoverlabel/font/_shadow.py index b23e767466..4d324fd577 100644 --- a/plotly/validators/icicle/hoverlabel/font/_shadow.py +++ b/plotly/validators/icicle/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/icicle/hoverlabel/font/_shadowsrc.py b/plotly/validators/icicle/hoverlabel/font/_shadowsrc.py index d3e09a94a8..cc852d5b89 100644 --- a/plotly/validators/icicle/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_size.py b/plotly/validators/icicle/hoverlabel/font/_size.py index bee8eb002b..dfa82b32d5 100644 --- a/plotly/validators/icicle/hoverlabel/font/_size.py +++ b/plotly/validators/icicle/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/icicle/hoverlabel/font/_sizesrc.py b/plotly/validators/icicle/hoverlabel/font/_sizesrc.py index e7c578a166..ffa1643f48 100644 --- a/plotly/validators/icicle/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_style.py b/plotly/validators/icicle/hoverlabel/font/_style.py index eb28637394..77f87ef957 100644 --- a/plotly/validators/icicle/hoverlabel/font/_style.py +++ b/plotly/validators/icicle/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/icicle/hoverlabel/font/_stylesrc.py b/plotly/validators/icicle/hoverlabel/font/_stylesrc.py index f7cab2c950..5b6a133c6d 100644 --- a/plotly/validators/icicle/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_textcase.py b/plotly/validators/icicle/hoverlabel/font/_textcase.py index 481acec083..269f6b1b87 100644 --- a/plotly/validators/icicle/hoverlabel/font/_textcase.py +++ b/plotly/validators/icicle/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/icicle/hoverlabel/font/_textcasesrc.py b/plotly/validators/icicle/hoverlabel/font/_textcasesrc.py index 777202dac6..bbc058439c 100644 --- a/plotly/validators/icicle/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_variant.py b/plotly/validators/icicle/hoverlabel/font/_variant.py index e9065a94e5..9625906f26 100644 --- a/plotly/validators/icicle/hoverlabel/font/_variant.py +++ b/plotly/validators/icicle/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/icicle/hoverlabel/font/_variantsrc.py b/plotly/validators/icicle/hoverlabel/font/_variantsrc.py index 603f8b038d..db2da3110d 100644 --- a/plotly/validators/icicle/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/hoverlabel/font/_weight.py b/plotly/validators/icicle/hoverlabel/font/_weight.py index 822c80c59b..79208e8fb3 100644 --- a/plotly/validators/icicle/hoverlabel/font/_weight.py +++ b/plotly/validators/icicle/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/icicle/hoverlabel/font/_weightsrc.py b/plotly/validators/icicle/hoverlabel/font/_weightsrc.py index 0f8b457f84..9b3258f30e 100644 --- a/plotly/validators/icicle/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/icicle/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="icicle.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/__init__.py b/plotly/validators/icicle/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/icicle/insidetextfont/__init__.py +++ b/plotly/validators/icicle/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/insidetextfont/_color.py b/plotly/validators/icicle/insidetextfont/_color.py index baddd1252f..81697aca7d 100644 --- a/plotly/validators/icicle/insidetextfont/_color.py +++ b/plotly/validators/icicle/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/insidetextfont/_colorsrc.py b/plotly/validators/icicle/insidetextfont/_colorsrc.py index 7ca2f56a06..afdd3d0a16 100644 --- a/plotly/validators/icicle/insidetextfont/_colorsrc.py +++ b/plotly/validators/icicle/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="icicle.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_family.py b/plotly/validators/icicle/insidetextfont/_family.py index d8db490147..4acb790f6e 100644 --- a/plotly/validators/icicle/insidetextfont/_family.py +++ b/plotly/validators/icicle/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/icicle/insidetextfont/_familysrc.py b/plotly/validators/icicle/insidetextfont/_familysrc.py index d2abfa9dd9..9b9bb60920 100644 --- a/plotly/validators/icicle/insidetextfont/_familysrc.py +++ b/plotly/validators/icicle/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="icicle.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_lineposition.py b/plotly/validators/icicle/insidetextfont/_lineposition.py index 929cd431e1..d0af76220c 100644 --- a/plotly/validators/icicle/insidetextfont/_lineposition.py +++ b/plotly/validators/icicle/insidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.insidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/icicle/insidetextfont/_linepositionsrc.py b/plotly/validators/icicle/insidetextfont/_linepositionsrc.py index 13af6771e0..138b647385 100644 --- a/plotly/validators/icicle/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/icicle/insidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="icicle.insidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_shadow.py b/plotly/validators/icicle/insidetextfont/_shadow.py index f8713dc7cb..083163fa99 100644 --- a/plotly/validators/icicle/insidetextfont/_shadow.py +++ b/plotly/validators/icicle/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/insidetextfont/_shadowsrc.py b/plotly/validators/icicle/insidetextfont/_shadowsrc.py index e335de9973..7dfbcf1a2e 100644 --- a/plotly/validators/icicle/insidetextfont/_shadowsrc.py +++ b/plotly/validators/icicle/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="icicle.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_size.py b/plotly/validators/icicle/insidetextfont/_size.py index 97f7b7382f..e7ceb3a3b9 100644 --- a/plotly/validators/icicle/insidetextfont/_size.py +++ b/plotly/validators/icicle/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/icicle/insidetextfont/_sizesrc.py b/plotly/validators/icicle/insidetextfont/_sizesrc.py index 3086ee58cd..a2a2ba6d23 100644 --- a/plotly/validators/icicle/insidetextfont/_sizesrc.py +++ b/plotly/validators/icicle/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="icicle.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_style.py b/plotly/validators/icicle/insidetextfont/_style.py index a5ffb8d286..5d4af5311d 100644 --- a/plotly/validators/icicle/insidetextfont/_style.py +++ b/plotly/validators/icicle/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/icicle/insidetextfont/_stylesrc.py b/plotly/validators/icicle/insidetextfont/_stylesrc.py index 7cc5d4ba77..2d1634ee48 100644 --- a/plotly/validators/icicle/insidetextfont/_stylesrc.py +++ b/plotly/validators/icicle/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="icicle.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_textcase.py b/plotly/validators/icicle/insidetextfont/_textcase.py index 607800001e..0b20fe4762 100644 --- a/plotly/validators/icicle/insidetextfont/_textcase.py +++ b/plotly/validators/icicle/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/icicle/insidetextfont/_textcasesrc.py b/plotly/validators/icicle/insidetextfont/_textcasesrc.py index 7d79d95844..697dbe0ffb 100644 --- a/plotly/validators/icicle/insidetextfont/_textcasesrc.py +++ b/plotly/validators/icicle/insidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="icicle.insidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_variant.py b/plotly/validators/icicle/insidetextfont/_variant.py index 75702c481e..08741a13a5 100644 --- a/plotly/validators/icicle/insidetextfont/_variant.py +++ b/plotly/validators/icicle/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/icicle/insidetextfont/_variantsrc.py b/plotly/validators/icicle/insidetextfont/_variantsrc.py index e45a0c09c1..5627e9e2d5 100644 --- a/plotly/validators/icicle/insidetextfont/_variantsrc.py +++ b/plotly/validators/icicle/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="icicle.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/insidetextfont/_weight.py b/plotly/validators/icicle/insidetextfont/_weight.py index 564d564ff2..ecbf26eaf8 100644 --- a/plotly/validators/icicle/insidetextfont/_weight.py +++ b/plotly/validators/icicle/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/icicle/insidetextfont/_weightsrc.py b/plotly/validators/icicle/insidetextfont/_weightsrc.py index 1436d068f0..54ab836913 100644 --- a/plotly/validators/icicle/insidetextfont/_weightsrc.py +++ b/plotly/validators/icicle/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="icicle.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/leaf/__init__.py b/plotly/validators/icicle/leaf/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/icicle/leaf/__init__.py +++ b/plotly/validators/icicle/leaf/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/icicle/leaf/_opacity.py b/plotly/validators/icicle/leaf/_opacity.py index 9e0b45cb74..78ebcd252d 100644 --- a/plotly/validators/icicle/leaf/_opacity.py +++ b/plotly/validators/icicle/leaf/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="icicle.leaf", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/icicle/legendgrouptitle/__init__.py b/plotly/validators/icicle/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/icicle/legendgrouptitle/__init__.py +++ b/plotly/validators/icicle/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/icicle/legendgrouptitle/_font.py b/plotly/validators/icicle/legendgrouptitle/_font.py index 95ebba7f5c..3ad2201315 100644 --- a/plotly/validators/icicle/legendgrouptitle/_font.py +++ b/plotly/validators/icicle/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="icicle.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/icicle/legendgrouptitle/_text.py b/plotly/validators/icicle/legendgrouptitle/_text.py index 4d1711fa80..35be2b6830 100644 --- a/plotly/validators/icicle/legendgrouptitle/_text.py +++ b/plotly/validators/icicle/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="icicle.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/icicle/legendgrouptitle/font/__init__.py b/plotly/validators/icicle/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/__init__.py +++ b/plotly/validators/icicle/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/legendgrouptitle/font/_color.py b/plotly/validators/icicle/legendgrouptitle/font/_color.py index 7ba3447ebc..729902b847 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_color.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/icicle/legendgrouptitle/font/_family.py b/plotly/validators/icicle/legendgrouptitle/font/_family.py index f091b18b4a..f161a742d4 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_family.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/icicle/legendgrouptitle/font/_lineposition.py b/plotly/validators/icicle/legendgrouptitle/font/_lineposition.py index bb06b9ea2e..2586b70872 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/icicle/legendgrouptitle/font/_shadow.py b/plotly/validators/icicle/legendgrouptitle/font/_shadow.py index 12c7d21e5c..f2861895d4 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/icicle/legendgrouptitle/font/_size.py b/plotly/validators/icicle/legendgrouptitle/font/_size.py index 99b3d827e2..8cfb4b7f5a 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_size.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/icicle/legendgrouptitle/font/_style.py b/plotly/validators/icicle/legendgrouptitle/font/_style.py index 4885ec8af0..2c28a43555 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_style.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/icicle/legendgrouptitle/font/_textcase.py b/plotly/validators/icicle/legendgrouptitle/font/_textcase.py index 23a1348ad3..81c386490d 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/icicle/legendgrouptitle/font/_variant.py b/plotly/validators/icicle/legendgrouptitle/font/_variant.py index f9f7870629..8185e39e2d 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_variant.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/icicle/legendgrouptitle/font/_weight.py b/plotly/validators/icicle/legendgrouptitle/font/_weight.py index 0d5c3f8f44..6575be22bf 100644 --- a/plotly/validators/icicle/legendgrouptitle/font/_weight.py +++ b/plotly/validators/icicle/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/icicle/marker/__init__.py b/plotly/validators/icicle/marker/__init__.py index e04f18cc55..a739102172 100644 --- a/plotly/validators/icicle/marker/__init__.py +++ b/plotly/validators/icicle/marker/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._pattern import PatternValidator - from ._line import LineValidator - from ._colorssrc import ColorssrcValidator - from ._colorscale import ColorscaleValidator - from ._colors import ColorsValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._pattern.PatternValidator", - "._line.LineValidator", - "._colorssrc.ColorssrcValidator", - "._colorscale.ColorscaleValidator", - "._colors.ColorsValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pattern.PatternValidator", + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colorscale.ColorscaleValidator", + "._colors.ColorsValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/icicle/marker/_autocolorscale.py b/plotly/validators/icicle/marker/_autocolorscale.py index fbda823fd5..a193fe4b2c 100644 --- a/plotly/validators/icicle/marker/_autocolorscale.py +++ b/plotly/validators/icicle/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="icicle.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/icicle/marker/_cauto.py b/plotly/validators/icicle/marker/_cauto.py index 0d8e75843d..9de6861e10 100644 --- a/plotly/validators/icicle/marker/_cauto.py +++ b/plotly/validators/icicle/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="icicle.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/icicle/marker/_cmax.py b/plotly/validators/icicle/marker/_cmax.py index 34f0f483ce..f4816edd7e 100644 --- a/plotly/validators/icicle/marker/_cmax.py +++ b/plotly/validators/icicle/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="icicle.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/icicle/marker/_cmid.py b/plotly/validators/icicle/marker/_cmid.py index 6e1d2a2fa2..30d15cbdac 100644 --- a/plotly/validators/icicle/marker/_cmid.py +++ b/plotly/validators/icicle/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="icicle.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/icicle/marker/_cmin.py b/plotly/validators/icicle/marker/_cmin.py index 6adff68d91..0ec4949e44 100644 --- a/plotly/validators/icicle/marker/_cmin.py +++ b/plotly/validators/icicle/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="icicle.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/icicle/marker/_coloraxis.py b/plotly/validators/icicle/marker/_coloraxis.py index df64c293f4..498d497dbe 100644 --- a/plotly/validators/icicle/marker/_coloraxis.py +++ b/plotly/validators/icicle/marker/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="icicle.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/icicle/marker/_colorbar.py b/plotly/validators/icicle/marker/_colorbar.py index d2eb2afe7c..afbabdf036 100644 --- a/plotly/validators/icicle/marker/_colorbar.py +++ b/plotly/validators/icicle/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="icicle.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.icicle. - marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.icicle.marker.colorbar.tickformatstopdefaults - ), sets the default property values to use for - elements of - icicle.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.icicle.marker.colo - rbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/_colors.py b/plotly/validators/icicle/marker/_colors.py index 88126c233a..f0e429a0ef 100644 --- a/plotly/validators/icicle/marker/_colors.py +++ b/plotly/validators/icicle/marker/_colors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="colors", parent_name="icicle.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/_colorscale.py b/plotly/validators/icicle/marker/_colorscale.py index 0613df37d7..6bbcd2a2fd 100644 --- a/plotly/validators/icicle/marker/_colorscale.py +++ b/plotly/validators/icicle/marker/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="icicle.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/icicle/marker/_colorssrc.py b/plotly/validators/icicle/marker/_colorssrc.py index 2e3dd48567..0f85412431 100644 --- a/plotly/validators/icicle/marker/_colorssrc.py +++ b/plotly/validators/icicle/marker/_colorssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorssrc", parent_name="icicle.marker", **kwargs): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/_line.py b/plotly/validators/icicle/marker/_line.py index d8214e5693..e58df59c8d 100644 --- a/plotly/validators/icicle/marker/_line.py +++ b/plotly/validators/icicle/marker/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="icicle.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/_pattern.py b/plotly/validators/icicle/marker/_pattern.py index 7012c43eb3..bb602fb66b 100644 --- a/plotly/validators/icicle/marker/_pattern.py +++ b/plotly/validators/icicle/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="icicle.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/_reversescale.py b/plotly/validators/icicle/marker/_reversescale.py index c1ebc8e1cd..f4ae838557 100644 --- a/plotly/validators/icicle/marker/_reversescale.py +++ b/plotly/validators/icicle/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="icicle.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/_showscale.py b/plotly/validators/icicle/marker/_showscale.py index c8f6effec0..50fc5bd75d 100644 --- a/plotly/validators/icicle/marker/_showscale.py +++ b/plotly/validators/icicle/marker/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="icicle.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/__init__.py b/plotly/validators/icicle/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/icicle/marker/colorbar/__init__.py +++ b/plotly/validators/icicle/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/icicle/marker/colorbar/_bgcolor.py b/plotly/validators/icicle/marker/colorbar/_bgcolor.py index fa9f5783b2..3162e15bdf 100644 --- a/plotly/validators/icicle/marker/colorbar/_bgcolor.py +++ b/plotly/validators/icicle/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="icicle.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_bordercolor.py b/plotly/validators/icicle/marker/colorbar/_bordercolor.py index 1da5ce7de5..c4d9c298c2 100644 --- a/plotly/validators/icicle/marker/colorbar/_bordercolor.py +++ b/plotly/validators/icicle/marker/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="icicle.marker.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_borderwidth.py b/plotly/validators/icicle/marker/colorbar/_borderwidth.py index db62d8b423..4713bf97bb 100644 --- a/plotly/validators/icicle/marker/colorbar/_borderwidth.py +++ b/plotly/validators/icicle/marker/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="icicle.marker.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_dtick.py b/plotly/validators/icicle/marker/colorbar/_dtick.py index 7d546f422b..4ad9b4c929 100644 --- a/plotly/validators/icicle/marker/colorbar/_dtick.py +++ b/plotly/validators/icicle/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="icicle.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_exponentformat.py b/plotly/validators/icicle/marker/colorbar/_exponentformat.py index e605ed8825..fb05e403ed 100644 --- a/plotly/validators/icicle/marker/colorbar/_exponentformat.py +++ b/plotly/validators/icicle/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="icicle.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_labelalias.py b/plotly/validators/icicle/marker/colorbar/_labelalias.py index 0e22588ca3..ce251c1baa 100644 --- a/plotly/validators/icicle/marker/colorbar/_labelalias.py +++ b/plotly/validators/icicle/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="icicle.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_len.py b/plotly/validators/icicle/marker/colorbar/_len.py index 2741afb765..a513c4a081 100644 --- a/plotly/validators/icicle/marker/colorbar/_len.py +++ b/plotly/validators/icicle/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="icicle.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_lenmode.py b/plotly/validators/icicle/marker/colorbar/_lenmode.py index e36b8704a5..540dcce27d 100644 --- a/plotly/validators/icicle/marker/colorbar/_lenmode.py +++ b/plotly/validators/icicle/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="icicle.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_minexponent.py b/plotly/validators/icicle/marker/colorbar/_minexponent.py index 5b104b90a6..53afc61b58 100644 --- a/plotly/validators/icicle/marker/colorbar/_minexponent.py +++ b/plotly/validators/icicle/marker/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="icicle.marker.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_nticks.py b/plotly/validators/icicle/marker/colorbar/_nticks.py index 1db940d834..46b982bd10 100644 --- a/plotly/validators/icicle/marker/colorbar/_nticks.py +++ b/plotly/validators/icicle/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="icicle.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_orientation.py b/plotly/validators/icicle/marker/colorbar/_orientation.py index f692ef4c9d..4161e85137 100644 --- a/plotly/validators/icicle/marker/colorbar/_orientation.py +++ b/plotly/validators/icicle/marker/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="icicle.marker.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_outlinecolor.py b/plotly/validators/icicle/marker/colorbar/_outlinecolor.py index 230aa641fe..92a47e884d 100644 --- a/plotly/validators/icicle/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/icicle/marker/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="icicle.marker.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_outlinewidth.py b/plotly/validators/icicle/marker/colorbar/_outlinewidth.py index 422cd26db5..05518f6b40 100644 --- a/plotly/validators/icicle/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/icicle/marker/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="icicle.marker.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_separatethousands.py b/plotly/validators/icicle/marker/colorbar/_separatethousands.py index aaece5240f..9ed684576b 100644 --- a/plotly/validators/icicle/marker/colorbar/_separatethousands.py +++ b/plotly/validators/icicle/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="icicle.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_showexponent.py b/plotly/validators/icicle/marker/colorbar/_showexponent.py index d7be46bd1b..364be31d9e 100644 --- a/plotly/validators/icicle/marker/colorbar/_showexponent.py +++ b/plotly/validators/icicle/marker/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="icicle.marker.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_showticklabels.py b/plotly/validators/icicle/marker/colorbar/_showticklabels.py index 6283fafe5b..b915359606 100644 --- a/plotly/validators/icicle/marker/colorbar/_showticklabels.py +++ b/plotly/validators/icicle/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="icicle.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_showtickprefix.py b/plotly/validators/icicle/marker/colorbar/_showtickprefix.py index c52591689c..6e4581888f 100644 --- a/plotly/validators/icicle/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/icicle/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="icicle.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_showticksuffix.py b/plotly/validators/icicle/marker/colorbar/_showticksuffix.py index f89842776f..cb55fc1ed5 100644 --- a/plotly/validators/icicle/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/icicle/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="icicle.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_thickness.py b/plotly/validators/icicle/marker/colorbar/_thickness.py index 5f2d68ec6a..f1d503afe5 100644 --- a/plotly/validators/icicle/marker/colorbar/_thickness.py +++ b/plotly/validators/icicle/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="icicle.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_thicknessmode.py b/plotly/validators/icicle/marker/colorbar/_thicknessmode.py index 63d79127e7..308f72b384 100644 --- a/plotly/validators/icicle/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/icicle/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="icicle.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_tick0.py b/plotly/validators/icicle/marker/colorbar/_tick0.py index 445f4d6829..8288900568 100644 --- a/plotly/validators/icicle/marker/colorbar/_tick0.py +++ b/plotly/validators/icicle/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="icicle.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_tickangle.py b/plotly/validators/icicle/marker/colorbar/_tickangle.py index f7209bcc24..1518c57d2b 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickangle.py +++ b/plotly/validators/icicle/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_tickcolor.py b/plotly/validators/icicle/marker/colorbar/_tickcolor.py index 16b55ff9d8..e56feed365 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickcolor.py +++ b/plotly/validators/icicle/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_tickfont.py b/plotly/validators/icicle/marker/colorbar/_tickfont.py index e5aecba726..fdac1664d4 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickfont.py +++ b/plotly/validators/icicle/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_tickformat.py b/plotly/validators/icicle/marker/colorbar/_tickformat.py index b847759445..ae9089fde5 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickformat.py +++ b/plotly/validators/icicle/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/icicle/marker/colorbar/_tickformatstopdefaults.py index 197c5cc571..121750a0a5 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/icicle/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="icicle.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/icicle/marker/colorbar/_tickformatstops.py b/plotly/validators/icicle/marker/colorbar/_tickformatstops.py index 445c5a27b2..5c168ad0e2 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/icicle/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="icicle.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/icicle/marker/colorbar/_ticklabeloverflow.py index be916f41a1..db40a00272 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/icicle/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="icicle.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_ticklabelposition.py b/plotly/validators/icicle/marker/colorbar/_ticklabelposition.py index 1cec6e94eb..86d53f8d0e 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/icicle/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="icicle.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/icicle/marker/colorbar/_ticklabelstep.py b/plotly/validators/icicle/marker/colorbar/_ticklabelstep.py index 797ca3d141..eeb644dd84 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/icicle/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="icicle.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_ticklen.py b/plotly/validators/icicle/marker/colorbar/_ticklen.py index c0554e8a2b..5c9d6f7ae8 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticklen.py +++ b/plotly/validators/icicle/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="icicle.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_tickmode.py b/plotly/validators/icicle/marker/colorbar/_tickmode.py index 903047f698..fb700a32d4 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickmode.py +++ b/plotly/validators/icicle/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/icicle/marker/colorbar/_tickprefix.py b/plotly/validators/icicle/marker/colorbar/_tickprefix.py index e767a51254..6757616984 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickprefix.py +++ b/plotly/validators/icicle/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_ticks.py b/plotly/validators/icicle/marker/colorbar/_ticks.py index 18b78bc930..87b95833b3 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticks.py +++ b/plotly/validators/icicle/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="icicle.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_ticksuffix.py b/plotly/validators/icicle/marker/colorbar/_ticksuffix.py index 34a95ece97..6e2c3eae90 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/icicle/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="icicle.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_ticktext.py b/plotly/validators/icicle/marker/colorbar/_ticktext.py index b52c764e66..bcea3a8133 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticktext.py +++ b/plotly/validators/icicle/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="icicle.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_ticktextsrc.py b/plotly/validators/icicle/marker/colorbar/_ticktextsrc.py index 2ffed91054..fb3b71364e 100644 --- a/plotly/validators/icicle/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/icicle/marker/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="icicle.marker.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_tickvals.py b/plotly/validators/icicle/marker/colorbar/_tickvals.py index 78abd1be59..3139089632 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickvals.py +++ b/plotly/validators/icicle/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_tickvalssrc.py b/plotly/validators/icicle/marker/colorbar/_tickvalssrc.py index dfebf55f40..454bae081b 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/icicle/marker/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_tickwidth.py b/plotly/validators/icicle/marker/colorbar/_tickwidth.py index 5b62b4f0b2..64e67d754d 100644 --- a/plotly/validators/icicle/marker/colorbar/_tickwidth.py +++ b/plotly/validators/icicle/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="icicle.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_title.py b/plotly/validators/icicle/marker/colorbar/_title.py index 7c843601ad..31d8635f4b 100644 --- a/plotly/validators/icicle/marker/colorbar/_title.py +++ b/plotly/validators/icicle/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="icicle.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_x.py b/plotly/validators/icicle/marker/colorbar/_x.py index b6785a4d3a..cd019f6479 100644 --- a/plotly/validators/icicle/marker/colorbar/_x.py +++ b/plotly/validators/icicle/marker/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="icicle.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_xanchor.py b/plotly/validators/icicle/marker/colorbar/_xanchor.py index 87db6a8759..75ebf6f6bd 100644 --- a/plotly/validators/icicle/marker/colorbar/_xanchor.py +++ b/plotly/validators/icicle/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="icicle.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_xpad.py b/plotly/validators/icicle/marker/colorbar/_xpad.py index a7b622b57b..91b32c7f39 100644 --- a/plotly/validators/icicle/marker/colorbar/_xpad.py +++ b/plotly/validators/icicle/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="icicle.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_xref.py b/plotly/validators/icicle/marker/colorbar/_xref.py index a38099956a..42968cd668 100644 --- a/plotly/validators/icicle/marker/colorbar/_xref.py +++ b/plotly/validators/icicle/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="icicle.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_y.py b/plotly/validators/icicle/marker/colorbar/_y.py index 4c0182ae49..12d8787fc5 100644 --- a/plotly/validators/icicle/marker/colorbar/_y.py +++ b/plotly/validators/icicle/marker/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="icicle.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/_yanchor.py b/plotly/validators/icicle/marker/colorbar/_yanchor.py index a6183bd8cb..0b079a81d9 100644 --- a/plotly/validators/icicle/marker/colorbar/_yanchor.py +++ b/plotly/validators/icicle/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="icicle.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_ypad.py b/plotly/validators/icicle/marker/colorbar/_ypad.py index d9cd5245fd..ede2ef1b12 100644 --- a/plotly/validators/icicle/marker/colorbar/_ypad.py +++ b/plotly/validators/icicle/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="icicle.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/_yref.py b/plotly/validators/icicle/marker/colorbar/_yref.py index 386ff0d380..45cbeb9ddd 100644 --- a/plotly/validators/icicle/marker/colorbar/_yref.py +++ b/plotly/validators/icicle/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="icicle.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/__init__.py b/plotly/validators/icicle/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_color.py b/plotly/validators/icicle/marker/colorbar/tickfont/_color.py index d443183a5b..a7de6c806d 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_family.py b/plotly/validators/icicle/marker/colorbar/tickfont/_family.py index 6fed1a7824..bec7835f89 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/icicle/marker/colorbar/tickfont/_lineposition.py index 299c09df74..afd1e097dd 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_shadow.py b/plotly/validators/icicle/marker/colorbar/tickfont/_shadow.py index 009eacd553..2bd43e0c7f 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_size.py b/plotly/validators/icicle/marker/colorbar/tickfont/_size.py index 04e6a0eec0..e144a54d0f 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_style.py b/plotly/validators/icicle/marker/colorbar/tickfont/_style.py index 7c0750eb39..c6973abae3 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_textcase.py b/plotly/validators/icicle/marker/colorbar/tickfont/_textcase.py index cc25281e4d..91155c41e5 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_variant.py b/plotly/validators/icicle/marker/colorbar/tickfont/_variant.py index 8bbb85255a..0af22d7949 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/icicle/marker/colorbar/tickfont/_weight.py b/plotly/validators/icicle/marker/colorbar/tickfont/_weight.py index 2c26c2dd78..d5e3b11cc1 100644 --- a/plotly/validators/icicle/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/icicle/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/icicle/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/icicle/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/icicle/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/icicle/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/icicle/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/icicle/marker/colorbar/tickformatstop/_dtickrange.py index 57d8ad3b08..8fd12e001a 100644 --- a/plotly/validators/icicle/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/icicle/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="icicle.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/icicle/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/icicle/marker/colorbar/tickformatstop/_enabled.py index 9e59dced6c..e53bfca909 100644 --- a/plotly/validators/icicle/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/icicle/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="icicle.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/tickformatstop/_name.py b/plotly/validators/icicle/marker/colorbar/tickformatstop/_name.py index 1cdad308db..b765848786 100644 --- a/plotly/validators/icicle/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/icicle/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="icicle.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/icicle/marker/colorbar/tickformatstop/_templateitemname.py index 1fabf12e9e..4f057084dc 100644 --- a/plotly/validators/icicle/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/icicle/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="icicle.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/tickformatstop/_value.py b/plotly/validators/icicle/marker/colorbar/tickformatstop/_value.py index 884c5d4acb..4a5b87bc7e 100644 --- a/plotly/validators/icicle/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/icicle/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="icicle.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/title/__init__.py b/plotly/validators/icicle/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/icicle/marker/colorbar/title/__init__.py +++ b/plotly/validators/icicle/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/icicle/marker/colorbar/title/_font.py b/plotly/validators/icicle/marker/colorbar/title/_font.py index 5d21f53fa4..9fa0ce765b 100644 --- a/plotly/validators/icicle/marker/colorbar/title/_font.py +++ b/plotly/validators/icicle/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="icicle.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/title/_side.py b/plotly/validators/icicle/marker/colorbar/title/_side.py index 1abdac5d20..520c884879 100644 --- a/plotly/validators/icicle/marker/colorbar/title/_side.py +++ b/plotly/validators/icicle/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="icicle.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/title/_text.py b/plotly/validators/icicle/marker/colorbar/title/_text.py index 7740a24f93..a53cd89287 100644 --- a/plotly/validators/icicle/marker/colorbar/title/_text.py +++ b/plotly/validators/icicle/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="icicle.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/title/font/__init__.py b/plotly/validators/icicle/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_color.py b/plotly/validators/icicle/marker/colorbar/title/font/_color.py index 01f4bbf3b6..d8ff123de8 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_color.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_family.py b/plotly/validators/icicle/marker/colorbar/title/font/_family.py index cc0616510f..98cf6f85f4 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_family.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_lineposition.py b/plotly/validators/icicle/marker/colorbar/title/font/_lineposition.py index 85803587af..bdb03d77fa 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_shadow.py b/plotly/validators/icicle/marker/colorbar/title/font/_shadow.py index 6ddc7cef5e..ae3051b129 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_size.py b/plotly/validators/icicle/marker/colorbar/title/font/_size.py index f8e6e0bf8e..8d1e8edef5 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_size.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_style.py b/plotly/validators/icicle/marker/colorbar/title/font/_style.py index 7a9f9b5a26..5c9f41cc49 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_style.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_textcase.py b/plotly/validators/icicle/marker/colorbar/title/font/_textcase.py index 13d933911e..c7abbc670b 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_variant.py b/plotly/validators/icicle/marker/colorbar/title/font/_variant.py index 715af89e21..68ff4d149e 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/icicle/marker/colorbar/title/font/_weight.py b/plotly/validators/icicle/marker/colorbar/title/font/_weight.py index 2e2036b9e0..4f0a92c9a4 100644 --- a/plotly/validators/icicle/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/icicle/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/icicle/marker/line/__init__.py b/plotly/validators/icicle/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/icicle/marker/line/__init__.py +++ b/plotly/validators/icicle/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/marker/line/_color.py b/plotly/validators/icicle/marker/line/_color.py index 843330469a..d30dc08ae1 100644 --- a/plotly/validators/icicle/marker/line/_color.py +++ b/plotly/validators/icicle/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="icicle.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/icicle/marker/line/_colorsrc.py b/plotly/validators/icicle/marker/line/_colorsrc.py index 7acea6a22e..0246ce97f0 100644 --- a/plotly/validators/icicle/marker/line/_colorsrc.py +++ b/plotly/validators/icicle/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="icicle.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/line/_width.py b/plotly/validators/icicle/marker/line/_width.py index e191ed688a..37fa36a5c8 100644 --- a/plotly/validators/icicle/marker/line/_width.py +++ b/plotly/validators/icicle/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="icicle.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/icicle/marker/line/_widthsrc.py b/plotly/validators/icicle/marker/line/_widthsrc.py index fd5cce9896..8ee65bc7d8 100644 --- a/plotly/validators/icicle/marker/line/_widthsrc.py +++ b/plotly/validators/icicle/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="icicle.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/pattern/__init__.py b/plotly/validators/icicle/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/icicle/marker/pattern/__init__.py +++ b/plotly/validators/icicle/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/icicle/marker/pattern/_bgcolor.py b/plotly/validators/icicle/marker/pattern/_bgcolor.py index 52bf7209a5..94bdb02724 100644 --- a/plotly/validators/icicle/marker/pattern/_bgcolor.py +++ b/plotly/validators/icicle/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="icicle.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/icicle/marker/pattern/_bgcolorsrc.py b/plotly/validators/icicle/marker/pattern/_bgcolorsrc.py index fc5488453b..ddf0152b05 100644 --- a/plotly/validators/icicle/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/icicle/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="icicle.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/pattern/_fgcolor.py b/plotly/validators/icicle/marker/pattern/_fgcolor.py index afe0c597b6..4eb2b5f812 100644 --- a/plotly/validators/icicle/marker/pattern/_fgcolor.py +++ b/plotly/validators/icicle/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="icicle.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/icicle/marker/pattern/_fgcolorsrc.py b/plotly/validators/icicle/marker/pattern/_fgcolorsrc.py index 8a8763ab18..cbcbdf0787 100644 --- a/plotly/validators/icicle/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/icicle/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="icicle.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/pattern/_fgopacity.py b/plotly/validators/icicle/marker/pattern/_fgopacity.py index c1fe328450..39b128224f 100644 --- a/plotly/validators/icicle/marker/pattern/_fgopacity.py +++ b/plotly/validators/icicle/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="icicle.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/icicle/marker/pattern/_fillmode.py b/plotly/validators/icicle/marker/pattern/_fillmode.py index 891ad6586a..b3caf4e6c3 100644 --- a/plotly/validators/icicle/marker/pattern/_fillmode.py +++ b/plotly/validators/icicle/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="icicle.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/icicle/marker/pattern/_shape.py b/plotly/validators/icicle/marker/pattern/_shape.py index 0a37785fe0..d7fd14bb93 100644 --- a/plotly/validators/icicle/marker/pattern/_shape.py +++ b/plotly/validators/icicle/marker/pattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="icicle.marker.pattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/icicle/marker/pattern/_shapesrc.py b/plotly/validators/icicle/marker/pattern/_shapesrc.py index 708ee5a323..507a427c86 100644 --- a/plotly/validators/icicle/marker/pattern/_shapesrc.py +++ b/plotly/validators/icicle/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="icicle.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/pattern/_size.py b/plotly/validators/icicle/marker/pattern/_size.py index 97d803323d..83f482267f 100644 --- a/plotly/validators/icicle/marker/pattern/_size.py +++ b/plotly/validators/icicle/marker/pattern/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.marker.pattern", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/icicle/marker/pattern/_sizesrc.py b/plotly/validators/icicle/marker/pattern/_sizesrc.py index ef87676910..f78c6a26b4 100644 --- a/plotly/validators/icicle/marker/pattern/_sizesrc.py +++ b/plotly/validators/icicle/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="icicle.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/marker/pattern/_solidity.py b/plotly/validators/icicle/marker/pattern/_solidity.py index 4b7dc62454..8c8ee2f645 100644 --- a/plotly/validators/icicle/marker/pattern/_solidity.py +++ b/plotly/validators/icicle/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="icicle.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/icicle/marker/pattern/_soliditysrc.py b/plotly/validators/icicle/marker/pattern/_soliditysrc.py index caf94f84f9..61341b68fb 100644 --- a/plotly/validators/icicle/marker/pattern/_soliditysrc.py +++ b/plotly/validators/icicle/marker/pattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="icicle.marker.pattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/__init__.py b/plotly/validators/icicle/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/icicle/outsidetextfont/__init__.py +++ b/plotly/validators/icicle/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/outsidetextfont/_color.py b/plotly/validators/icicle/outsidetextfont/_color.py index 37ae1a4336..1cd640e03e 100644 --- a/plotly/validators/icicle/outsidetextfont/_color.py +++ b/plotly/validators/icicle/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/outsidetextfont/_colorsrc.py b/plotly/validators/icicle/outsidetextfont/_colorsrc.py index fd77cab371..0c54f0509a 100644 --- a/plotly/validators/icicle/outsidetextfont/_colorsrc.py +++ b/plotly/validators/icicle/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_family.py b/plotly/validators/icicle/outsidetextfont/_family.py index c8ba28e6ce..755cef78f3 100644 --- a/plotly/validators/icicle/outsidetextfont/_family.py +++ b/plotly/validators/icicle/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/icicle/outsidetextfont/_familysrc.py b/plotly/validators/icicle/outsidetextfont/_familysrc.py index f7b81cae63..aea5011fa4 100644 --- a/plotly/validators/icicle/outsidetextfont/_familysrc.py +++ b/plotly/validators/icicle/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_lineposition.py b/plotly/validators/icicle/outsidetextfont/_lineposition.py index 5123b343d2..3de26d1d75 100644 --- a/plotly/validators/icicle/outsidetextfont/_lineposition.py +++ b/plotly/validators/icicle/outsidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.outsidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/icicle/outsidetextfont/_linepositionsrc.py b/plotly/validators/icicle/outsidetextfont/_linepositionsrc.py index 263608b4cb..4a19f2cf69 100644 --- a/plotly/validators/icicle/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/icicle/outsidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="icicle.outsidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_shadow.py b/plotly/validators/icicle/outsidetextfont/_shadow.py index c8bbfa24bf..3da1f264bc 100644 --- a/plotly/validators/icicle/outsidetextfont/_shadow.py +++ b/plotly/validators/icicle/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/outsidetextfont/_shadowsrc.py b/plotly/validators/icicle/outsidetextfont/_shadowsrc.py index 2dddd9c2ee..632c28f1ea 100644 --- a/plotly/validators/icicle/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/icicle/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_size.py b/plotly/validators/icicle/outsidetextfont/_size.py index 6ab4657ec2..b5c08653e6 100644 --- a/plotly/validators/icicle/outsidetextfont/_size.py +++ b/plotly/validators/icicle/outsidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.outsidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/icicle/outsidetextfont/_sizesrc.py b/plotly/validators/icicle/outsidetextfont/_sizesrc.py index 130257818b..7d5ee5c3e8 100644 --- a/plotly/validators/icicle/outsidetextfont/_sizesrc.py +++ b/plotly/validators/icicle/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_style.py b/plotly/validators/icicle/outsidetextfont/_style.py index 2f06a6f7b0..8e2351902c 100644 --- a/plotly/validators/icicle/outsidetextfont/_style.py +++ b/plotly/validators/icicle/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/icicle/outsidetextfont/_stylesrc.py b/plotly/validators/icicle/outsidetextfont/_stylesrc.py index 8e56130ee8..9f2e150362 100644 --- a/plotly/validators/icicle/outsidetextfont/_stylesrc.py +++ b/plotly/validators/icicle/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_textcase.py b/plotly/validators/icicle/outsidetextfont/_textcase.py index 2f452ad98c..f394bde1e9 100644 --- a/plotly/validators/icicle/outsidetextfont/_textcase.py +++ b/plotly/validators/icicle/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/icicle/outsidetextfont/_textcasesrc.py b/plotly/validators/icicle/outsidetextfont/_textcasesrc.py index 188b0ae2da..4fe0386416 100644 --- a/plotly/validators/icicle/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/icicle/outsidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_variant.py b/plotly/validators/icicle/outsidetextfont/_variant.py index 6665931eb3..dd33512646 100644 --- a/plotly/validators/icicle/outsidetextfont/_variant.py +++ b/plotly/validators/icicle/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/icicle/outsidetextfont/_variantsrc.py b/plotly/validators/icicle/outsidetextfont/_variantsrc.py index d66f62842b..f37574c864 100644 --- a/plotly/validators/icicle/outsidetextfont/_variantsrc.py +++ b/plotly/validators/icicle/outsidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/outsidetextfont/_weight.py b/plotly/validators/icicle/outsidetextfont/_weight.py index ed8c7f9915..097843e085 100644 --- a/plotly/validators/icicle/outsidetextfont/_weight.py +++ b/plotly/validators/icicle/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/icicle/outsidetextfont/_weightsrc.py b/plotly/validators/icicle/outsidetextfont/_weightsrc.py index 0f20507881..d50644ea73 100644 --- a/plotly/validators/icicle/outsidetextfont/_weightsrc.py +++ b/plotly/validators/icicle/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="icicle.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/__init__.py b/plotly/validators/icicle/pathbar/__init__.py index fce05faf91..7b4da4ccad 100644 --- a/plotly/validators/icicle/pathbar/__init__.py +++ b/plotly/validators/icicle/pathbar/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._thickness import ThicknessValidator - from ._textfont import TextfontValidator - from ._side import SideValidator - from ._edgeshape import EdgeshapeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._thickness.ThicknessValidator", - "._textfont.TextfontValidator", - "._side.SideValidator", - "._edgeshape.EdgeshapeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._thickness.ThicknessValidator", + "._textfont.TextfontValidator", + "._side.SideValidator", + "._edgeshape.EdgeshapeValidator", + ], +) diff --git a/plotly/validators/icicle/pathbar/_edgeshape.py b/plotly/validators/icicle/pathbar/_edgeshape.py index d02e2f9bfb..975271672e 100644 --- a/plotly/validators/icicle/pathbar/_edgeshape.py +++ b/plotly/validators/icicle/pathbar/_edgeshape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EdgeshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class EdgeshapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="edgeshape", parent_name="icicle.pathbar", **kwargs): - super(EdgeshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [">", "<", "|", "/", "\\"]), **kwargs, diff --git a/plotly/validators/icicle/pathbar/_side.py b/plotly/validators/icicle/pathbar/_side.py index b095adbdb9..51ddb64d5e 100644 --- a/plotly/validators/icicle/pathbar/_side.py +++ b/plotly/validators/icicle/pathbar/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="icicle.pathbar", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom"]), **kwargs, diff --git a/plotly/validators/icicle/pathbar/_textfont.py b/plotly/validators/icicle/pathbar/_textfont.py index b21c0850b1..7b2b4d7b86 100644 --- a/plotly/validators/icicle/pathbar/_textfont.py +++ b/plotly/validators/icicle/pathbar/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="icicle.pathbar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/icicle/pathbar/_thickness.py b/plotly/validators/icicle/pathbar/_thickness.py index b5f221b2af..5cb4bfb539 100644 --- a/plotly/validators/icicle/pathbar/_thickness.py +++ b/plotly/validators/icicle/pathbar/_thickness.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__(self, plotly_name="thickness", parent_name="icicle.pathbar", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 12), **kwargs, diff --git a/plotly/validators/icicle/pathbar/_visible.py b/plotly/validators/icicle/pathbar/_visible.py index ada8813be2..1fd9aa4a8f 100644 --- a/plotly/validators/icicle/pathbar/_visible.py +++ b/plotly/validators/icicle/pathbar/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="icicle.pathbar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/__init__.py b/plotly/validators/icicle/pathbar/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/icicle/pathbar/textfont/__init__.py +++ b/plotly/validators/icicle/pathbar/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/pathbar/textfont/_color.py b/plotly/validators/icicle/pathbar/textfont/_color.py index bb2bedf181..c8129f583a 100644 --- a/plotly/validators/icicle/pathbar/textfont/_color.py +++ b/plotly/validators/icicle/pathbar/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="icicle.pathbar.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/pathbar/textfont/_colorsrc.py b/plotly/validators/icicle/pathbar/textfont/_colorsrc.py index a0ed0ccb79..875e241857 100644 --- a/plotly/validators/icicle/pathbar/textfont/_colorsrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_family.py b/plotly/validators/icicle/pathbar/textfont/_family.py index 5d7765f18a..108b7443df 100644 --- a/plotly/validators/icicle/pathbar/textfont/_family.py +++ b/plotly/validators/icicle/pathbar/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="icicle.pathbar.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/icicle/pathbar/textfont/_familysrc.py b/plotly/validators/icicle/pathbar/textfont/_familysrc.py index 5c79630722..7a7f24b83f 100644 --- a/plotly/validators/icicle/pathbar/textfont/_familysrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_lineposition.py b/plotly/validators/icicle/pathbar/textfont/_lineposition.py index f1e7f7b06c..bb67988ac6 100644 --- a/plotly/validators/icicle/pathbar/textfont/_lineposition.py +++ b/plotly/validators/icicle/pathbar/textfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.pathbar.textfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/icicle/pathbar/textfont/_linepositionsrc.py b/plotly/validators/icicle/pathbar/textfont/_linepositionsrc.py index 4aa154ed12..220e1337d1 100644 --- a/plotly/validators/icicle/pathbar/textfont/_linepositionsrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="icicle.pathbar.textfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_shadow.py b/plotly/validators/icicle/pathbar/textfont/_shadow.py index f50fb8d077..296e66496e 100644 --- a/plotly/validators/icicle/pathbar/textfont/_shadow.py +++ b/plotly/validators/icicle/pathbar/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="icicle.pathbar.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/pathbar/textfont/_shadowsrc.py b/plotly/validators/icicle/pathbar/textfont/_shadowsrc.py index 2b088b57e0..e98be0b568 100644 --- a/plotly/validators/icicle/pathbar/textfont/_shadowsrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_size.py b/plotly/validators/icicle/pathbar/textfont/_size.py index 4274a380a3..8024c11fe0 100644 --- a/plotly/validators/icicle/pathbar/textfont/_size.py +++ b/plotly/validators/icicle/pathbar/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="icicle.pathbar.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/icicle/pathbar/textfont/_sizesrc.py b/plotly/validators/icicle/pathbar/textfont/_sizesrc.py index 1602cbf797..96a1cfb949 100644 --- a/plotly/validators/icicle/pathbar/textfont/_sizesrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_style.py b/plotly/validators/icicle/pathbar/textfont/_style.py index f63ad2b558..8175b35113 100644 --- a/plotly/validators/icicle/pathbar/textfont/_style.py +++ b/plotly/validators/icicle/pathbar/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="icicle.pathbar.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/icicle/pathbar/textfont/_stylesrc.py b/plotly/validators/icicle/pathbar/textfont/_stylesrc.py index 4b7dd89d4a..fb8c2f7aaa 100644 --- a/plotly/validators/icicle/pathbar/textfont/_stylesrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_textcase.py b/plotly/validators/icicle/pathbar/textfont/_textcase.py index 37b1002cc4..44f8da48f4 100644 --- a/plotly/validators/icicle/pathbar/textfont/_textcase.py +++ b/plotly/validators/icicle/pathbar/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="icicle.pathbar.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/icicle/pathbar/textfont/_textcasesrc.py b/plotly/validators/icicle/pathbar/textfont/_textcasesrc.py index 41e0ba85d7..049718338c 100644 --- a/plotly/validators/icicle/pathbar/textfont/_textcasesrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_variant.py b/plotly/validators/icicle/pathbar/textfont/_variant.py index 79dddab9c7..98134866ae 100644 --- a/plotly/validators/icicle/pathbar/textfont/_variant.py +++ b/plotly/validators/icicle/pathbar/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="icicle.pathbar.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/icicle/pathbar/textfont/_variantsrc.py b/plotly/validators/icicle/pathbar/textfont/_variantsrc.py index c9fa845ff8..94c37f7c04 100644 --- a/plotly/validators/icicle/pathbar/textfont/_variantsrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/pathbar/textfont/_weight.py b/plotly/validators/icicle/pathbar/textfont/_weight.py index 820ef39d42..fdd7ba93bc 100644 --- a/plotly/validators/icicle/pathbar/textfont/_weight.py +++ b/plotly/validators/icicle/pathbar/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="icicle.pathbar.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/icicle/pathbar/textfont/_weightsrc.py b/plotly/validators/icicle/pathbar/textfont/_weightsrc.py index 8f3a40df64..38664c1667 100644 --- a/plotly/validators/icicle/pathbar/textfont/_weightsrc.py +++ b/plotly/validators/icicle/pathbar/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="icicle.pathbar.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/root/__init__.py b/plotly/validators/icicle/root/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/icicle/root/__init__.py +++ b/plotly/validators/icicle/root/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/icicle/root/_color.py b/plotly/validators/icicle/root/_color.py index 5089205ea8..d9dfb54208 100644 --- a/plotly/validators/icicle/root/_color.py +++ b/plotly/validators/icicle/root/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="icicle.root", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/icicle/stream/__init__.py b/plotly/validators/icicle/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/icicle/stream/__init__.py +++ b/plotly/validators/icicle/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/icicle/stream/_maxpoints.py b/plotly/validators/icicle/stream/_maxpoints.py index b7e615cfee..130799faa6 100644 --- a/plotly/validators/icicle/stream/_maxpoints.py +++ b/plotly/validators/icicle/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="icicle.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/icicle/stream/_token.py b/plotly/validators/icicle/stream/_token.py index 8f8cec7f6b..9db36da4e4 100644 --- a/plotly/validators/icicle/stream/_token.py +++ b/plotly/validators/icicle/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="icicle.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/icicle/textfont/__init__.py b/plotly/validators/icicle/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/icicle/textfont/__init__.py +++ b/plotly/validators/icicle/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/icicle/textfont/_color.py b/plotly/validators/icicle/textfont/_color.py index a41dcffa29..aebca2048e 100644 --- a/plotly/validators/icicle/textfont/_color.py +++ b/plotly/validators/icicle/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="icicle.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/textfont/_colorsrc.py b/plotly/validators/icicle/textfont/_colorsrc.py index 453b043253..5f856eab1b 100644 --- a/plotly/validators/icicle/textfont/_colorsrc.py +++ b/plotly/validators/icicle/textfont/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="icicle.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_family.py b/plotly/validators/icicle/textfont/_family.py index c91ba6fc2c..44fd3717c8 100644 --- a/plotly/validators/icicle/textfont/_family.py +++ b/plotly/validators/icicle/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="icicle.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/icicle/textfont/_familysrc.py b/plotly/validators/icicle/textfont/_familysrc.py index 212a684cc5..4d058884aa 100644 --- a/plotly/validators/icicle/textfont/_familysrc.py +++ b/plotly/validators/icicle/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="icicle.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_lineposition.py b/plotly/validators/icicle/textfont/_lineposition.py index b51f6fe39d..68f10ddc68 100644 --- a/plotly/validators/icicle/textfont/_lineposition.py +++ b/plotly/validators/icicle/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="icicle.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/icicle/textfont/_linepositionsrc.py b/plotly/validators/icicle/textfont/_linepositionsrc.py index 94f77c6d28..ac5f3fbd2b 100644 --- a/plotly/validators/icicle/textfont/_linepositionsrc.py +++ b/plotly/validators/icicle/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="icicle.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_shadow.py b/plotly/validators/icicle/textfont/_shadow.py index d47e60f6c1..2bf5a90441 100644 --- a/plotly/validators/icicle/textfont/_shadow.py +++ b/plotly/validators/icicle/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="icicle.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/icicle/textfont/_shadowsrc.py b/plotly/validators/icicle/textfont/_shadowsrc.py index 2aa75ffa78..7467e5e53c 100644 --- a/plotly/validators/icicle/textfont/_shadowsrc.py +++ b/plotly/validators/icicle/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="icicle.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_size.py b/plotly/validators/icicle/textfont/_size.py index 96844a1cf4..b1c9d59442 100644 --- a/plotly/validators/icicle/textfont/_size.py +++ b/plotly/validators/icicle/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="icicle.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/icicle/textfont/_sizesrc.py b/plotly/validators/icicle/textfont/_sizesrc.py index e69fea923e..1b8018da5e 100644 --- a/plotly/validators/icicle/textfont/_sizesrc.py +++ b/plotly/validators/icicle/textfont/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="icicle.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_style.py b/plotly/validators/icicle/textfont/_style.py index 83e706a6d7..2c822a4ba3 100644 --- a/plotly/validators/icicle/textfont/_style.py +++ b/plotly/validators/icicle/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="icicle.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/icicle/textfont/_stylesrc.py b/plotly/validators/icicle/textfont/_stylesrc.py index 3e2916f4ae..65e56d52f6 100644 --- a/plotly/validators/icicle/textfont/_stylesrc.py +++ b/plotly/validators/icicle/textfont/_stylesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="stylesrc", parent_name="icicle.textfont", **kwargs): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_textcase.py b/plotly/validators/icicle/textfont/_textcase.py index 55b2d24e75..ee7e8bad42 100644 --- a/plotly/validators/icicle/textfont/_textcase.py +++ b/plotly/validators/icicle/textfont/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="icicle.textfont", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/icicle/textfont/_textcasesrc.py b/plotly/validators/icicle/textfont/_textcasesrc.py index fb00ea8478..d3569e47ed 100644 --- a/plotly/validators/icicle/textfont/_textcasesrc.py +++ b/plotly/validators/icicle/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="icicle.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_variant.py b/plotly/validators/icicle/textfont/_variant.py index 0de22cb7bf..021a20976a 100644 --- a/plotly/validators/icicle/textfont/_variant.py +++ b/plotly/validators/icicle/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="icicle.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/icicle/textfont/_variantsrc.py b/plotly/validators/icicle/textfont/_variantsrc.py index 946220bac7..d29e985317 100644 --- a/plotly/validators/icicle/textfont/_variantsrc.py +++ b/plotly/validators/icicle/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="icicle.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/textfont/_weight.py b/plotly/validators/icicle/textfont/_weight.py index 642361804c..0c965f1914 100644 --- a/plotly/validators/icicle/textfont/_weight.py +++ b/plotly/validators/icicle/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="icicle.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/icicle/textfont/_weightsrc.py b/plotly/validators/icicle/textfont/_weightsrc.py index 6f09aa36bd..86d3487520 100644 --- a/plotly/validators/icicle/textfont/_weightsrc.py +++ b/plotly/validators/icicle/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="icicle.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/icicle/tiling/__init__.py b/plotly/validators/icicle/tiling/__init__.py index 4f869feaed..8bd48751b6 100644 --- a/plotly/validators/icicle/tiling/__init__.py +++ b/plotly/validators/icicle/tiling/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._pad import PadValidator - from ._orientation import OrientationValidator - from ._flip import FlipValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._pad.PadValidator", - "._orientation.OrientationValidator", - "._flip.FlipValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._pad.PadValidator", + "._orientation.OrientationValidator", + "._flip.FlipValidator", + ], +) diff --git a/plotly/validators/icicle/tiling/_flip.py b/plotly/validators/icicle/tiling/_flip.py index f9b2026fb2..3fc7260fa8 100644 --- a/plotly/validators/icicle/tiling/_flip.py +++ b/plotly/validators/icicle/tiling/_flip.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FlipValidator(_plotly_utils.basevalidators.FlaglistValidator): +class FlipValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="flip", parent_name="icicle.tiling", **kwargs): - super(FlipValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), flags=kwargs.pop("flags", ["x", "y"]), **kwargs, diff --git a/plotly/validators/icicle/tiling/_orientation.py b/plotly/validators/icicle/tiling/_orientation.py index e454023163..fe393edeac 100644 --- a/plotly/validators/icicle/tiling/_orientation.py +++ b/plotly/validators/icicle/tiling/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="icicle.tiling", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/icicle/tiling/_pad.py b/plotly/validators/icicle/tiling/_pad.py index bfe18bbda4..cc57c673c2 100644 --- a/plotly/validators/icicle/tiling/_pad.py +++ b/plotly/validators/icicle/tiling/_pad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.NumberValidator): +class PadValidator(_bv.NumberValidator): def __init__(self, plotly_name="pad", parent_name="icicle.tiling", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/image/__init__.py b/plotly/validators/image/__init__.py index e56bc098b0..0d1c67fb45 100644 --- a/plotly/validators/image/__init__.py +++ b/plotly/validators/image/__init__.py @@ -1,91 +1,48 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zsmooth import ZsmoothValidator - from ._zorder import ZorderValidator - from ._zmin import ZminValidator - from ._zmax import ZmaxValidator - from ._z import ZValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._source import SourceValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colormodel import ColormodelValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zsmooth.ZsmoothValidator", - "._zorder.ZorderValidator", - "._zmin.ZminValidator", - "._zmax.ZmaxValidator", - "._z.ZValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._source.SourceValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colormodel.ColormodelValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zsmooth.ZsmoothValidator", + "._zorder.ZorderValidator", + "._zmin.ZminValidator", + "._zmax.ZmaxValidator", + "._z.ZValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._source.SourceValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colormodel.ColormodelValidator", + ], +) diff --git a/plotly/validators/image/_colormodel.py b/plotly/validators/image/_colormodel.py index ce4b3f203b..9d8611cc44 100644 --- a/plotly/validators/image/_colormodel.py +++ b/plotly/validators/image/_colormodel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColormodelValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ColormodelValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="colormodel", parent_name="image", **kwargs): - super(ColormodelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["rgb", "rgba", "rgba256", "hsl", "hsla"]), **kwargs, diff --git a/plotly/validators/image/_customdata.py b/plotly/validators/image/_customdata.py index ecd1dd6a37..257e03c20b 100644 --- a/plotly/validators/image/_customdata.py +++ b/plotly/validators/image/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="image", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/image/_customdatasrc.py b/plotly/validators/image/_customdatasrc.py index 0de35968d3..c52890c3de 100644 --- a/plotly/validators/image/_customdatasrc.py +++ b/plotly/validators/image/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="image", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_dx.py b/plotly/validators/image/_dx.py index eb330f7564..cd3e890e31 100644 --- a/plotly/validators/image/_dx.py +++ b/plotly/validators/image/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="image", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/image/_dy.py b/plotly/validators/image/_dy.py index ee1ba0f312..3ed6234700 100644 --- a/plotly/validators/image/_dy.py +++ b/plotly/validators/image/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="image", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/image/_hoverinfo.py b/plotly/validators/image/_hoverinfo.py index 229fdce0b2..a8f95845bc 100644 --- a/plotly/validators/image/_hoverinfo.py +++ b/plotly/validators/image/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="image", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/image/_hoverinfosrc.py b/plotly/validators/image/_hoverinfosrc.py index d468124fa5..1b6d2f086f 100644 --- a/plotly/validators/image/_hoverinfosrc.py +++ b/plotly/validators/image/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="image", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_hoverlabel.py b/plotly/validators/image/_hoverlabel.py index d4303b0fb0..91045fc68d 100644 --- a/plotly/validators/image/_hoverlabel.py +++ b/plotly/validators/image/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="image", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/image/_hovertemplate.py b/plotly/validators/image/_hovertemplate.py index 805f42f793..d405bd56c7 100644 --- a/plotly/validators/image/_hovertemplate.py +++ b/plotly/validators/image/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="image", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/image/_hovertemplatesrc.py b/plotly/validators/image/_hovertemplatesrc.py index a806a49058..4e9f594042 100644 --- a/plotly/validators/image/_hovertemplatesrc.py +++ b/plotly/validators/image/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="image", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_hovertext.py b/plotly/validators/image/_hovertext.py index 1e051b5c7d..5e22e20911 100644 --- a/plotly/validators/image/_hovertext.py +++ b/plotly/validators/image/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HovertextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="hovertext", parent_name="image", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/image/_hovertextsrc.py b/plotly/validators/image/_hovertextsrc.py index 81d167166a..8af5c6a79c 100644 --- a/plotly/validators/image/_hovertextsrc.py +++ b/plotly/validators/image/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="image", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_ids.py b/plotly/validators/image/_ids.py index 205d2432b8..dcb75c263b 100644 --- a/plotly/validators/image/_ids.py +++ b/plotly/validators/image/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="image", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/image/_idssrc.py b/plotly/validators/image/_idssrc.py index 8f8b95453e..2a86a317e4 100644 --- a/plotly/validators/image/_idssrc.py +++ b/plotly/validators/image/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="image", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_legend.py b/plotly/validators/image/_legend.py index d4903e4636..3047131b8e 100644 --- a/plotly/validators/image/_legend.py +++ b/plotly/validators/image/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="image", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/image/_legendgrouptitle.py b/plotly/validators/image/_legendgrouptitle.py index b23db50bbf..a99d6f966e 100644 --- a/plotly/validators/image/_legendgrouptitle.py +++ b/plotly/validators/image/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="image", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/image/_legendrank.py b/plotly/validators/image/_legendrank.py index 140a29c88a..8ce2c4c991 100644 --- a/plotly/validators/image/_legendrank.py +++ b/plotly/validators/image/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="image", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/image/_legendwidth.py b/plotly/validators/image/_legendwidth.py index df31504b92..c61c741dcc 100644 --- a/plotly/validators/image/_legendwidth.py +++ b/plotly/validators/image/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="image", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/image/_meta.py b/plotly/validators/image/_meta.py index f2ec344898..a108d6262f 100644 --- a/plotly/validators/image/_meta.py +++ b/plotly/validators/image/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="image", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/image/_metasrc.py b/plotly/validators/image/_metasrc.py index adfc138067..9dedb9bf61 100644 --- a/plotly/validators/image/_metasrc.py +++ b/plotly/validators/image/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="image", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_name.py b/plotly/validators/image/_name.py index 73e0942482..4b276cdc4b 100644 --- a/plotly/validators/image/_name.py +++ b/plotly/validators/image/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="image", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/image/_opacity.py b/plotly/validators/image/_opacity.py index b778eb62e0..2b9125ca32 100644 --- a/plotly/validators/image/_opacity.py +++ b/plotly/validators/image/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="image", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/image/_source.py b/plotly/validators/image/_source.py index 9c9452ce92..475cd55685 100644 --- a/plotly/validators/image/_source.py +++ b/plotly/validators/image/_source.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceValidator(_plotly_utils.basevalidators.StringValidator): +class SourceValidator(_bv.StringValidator): def __init__(self, plotly_name="source", parent_name="image", **kwargs): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/image/_stream.py b/plotly/validators/image/_stream.py index 3eea736a52..60e3c4035f 100644 --- a/plotly/validators/image/_stream.py +++ b/plotly/validators/image/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="image", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/image/_text.py b/plotly/validators/image/_text.py index 1284e51b08..aebea387b0 100644 --- a/plotly/validators/image/_text.py +++ b/plotly/validators/image/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="image", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/image/_textsrc.py b/plotly/validators/image/_textsrc.py index 7ab20d743e..2ec893fb1b 100644 --- a/plotly/validators/image/_textsrc.py +++ b/plotly/validators/image/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="image", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_uid.py b/plotly/validators/image/_uid.py index f42fbc7a92..c77183043c 100644 --- a/plotly/validators/image/_uid.py +++ b/plotly/validators/image/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="image", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/image/_uirevision.py b/plotly/validators/image/_uirevision.py index e5575632f7..5df2909b88 100644 --- a/plotly/validators/image/_uirevision.py +++ b/plotly/validators/image/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="image", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/_visible.py b/plotly/validators/image/_visible.py index 09cdf9dbad..ed6da8bc5b 100644 --- a/plotly/validators/image/_visible.py +++ b/plotly/validators/image/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="image", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/image/_x0.py b/plotly/validators/image/_x0.py index 9fbba18292..538b703461 100644 --- a/plotly/validators/image/_x0.py +++ b/plotly/validators/image/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="image", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/image/_xaxis.py b/plotly/validators/image/_xaxis.py index 3b8f1df417..8ed13ab57a 100644 --- a/plotly/validators/image/_xaxis.py +++ b/plotly/validators/image/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="image", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/image/_y0.py b/plotly/validators/image/_y0.py index ea01998f58..a8519eafa4 100644 --- a/plotly/validators/image/_y0.py +++ b/plotly/validators/image/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="image", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/image/_yaxis.py b/plotly/validators/image/_yaxis.py index c02f75357f..e498421fc1 100644 --- a/plotly/validators/image/_yaxis.py +++ b/plotly/validators/image/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="image", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/image/_z.py b/plotly/validators/image/_z.py index 29e8b848a0..9f190cf4b1 100644 --- a/plotly/validators/image/_z.py +++ b/plotly/validators/image/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="image", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/image/_zmax.py b/plotly/validators/image/_zmax.py index fae4d527c9..293b7e8959 100644 --- a/plotly/validators/image/_zmax.py +++ b/plotly/validators/image/_zmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZmaxValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ZmaxValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="zmax", parent_name="image", **kwargs): - super(ZmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/image/_zmin.py b/plotly/validators/image/_zmin.py index 74b1f08e76..f95056dd14 100644 --- a/plotly/validators/image/_zmin.py +++ b/plotly/validators/image/_zmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZminValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ZminValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="zmin", parent_name="image", **kwargs): - super(ZminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/image/_zorder.py b/plotly/validators/image/_zorder.py index 23b5197a42..b0bba7f960 100644 --- a/plotly/validators/image/_zorder.py +++ b/plotly/validators/image/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="image", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/image/_zsmooth.py b/plotly/validators/image/_zsmooth.py index 92c4067cb4..a63f2fdc69 100644 --- a/plotly/validators/image/_zsmooth.py +++ b/plotly/validators/image/_zsmooth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsmoothValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ZsmoothValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="zsmooth", parent_name="image", **kwargs): - super(ZsmoothValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["fast", False]), **kwargs, diff --git a/plotly/validators/image/_zsrc.py b/plotly/validators/image/_zsrc.py index 4b66aea195..d98dd530c9 100644 --- a/plotly/validators/image/_zsrc.py +++ b/plotly/validators/image/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="image", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/__init__.py b/plotly/validators/image/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/image/hoverlabel/__init__.py +++ b/plotly/validators/image/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/image/hoverlabel/_align.py b/plotly/validators/image/hoverlabel/_align.py index 610815f031..d4fec389bf 100644 --- a/plotly/validators/image/hoverlabel/_align.py +++ b/plotly/validators/image/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="image.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/image/hoverlabel/_alignsrc.py b/plotly/validators/image/hoverlabel/_alignsrc.py index a5ad4b4a0f..de422b7732 100644 --- a/plotly/validators/image/hoverlabel/_alignsrc.py +++ b/plotly/validators/image/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="image.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/_bgcolor.py b/plotly/validators/image/hoverlabel/_bgcolor.py index 9b075ea55e..0477c15a23 100644 --- a/plotly/validators/image/hoverlabel/_bgcolor.py +++ b/plotly/validators/image/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="image.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/image/hoverlabel/_bgcolorsrc.py b/plotly/validators/image/hoverlabel/_bgcolorsrc.py index 582f981418..2dad0f57d4 100644 --- a/plotly/validators/image/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/image/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="image.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/_bordercolor.py b/plotly/validators/image/hoverlabel/_bordercolor.py index 7674e229f6..0219208064 100644 --- a/plotly/validators/image/hoverlabel/_bordercolor.py +++ b/plotly/validators/image/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="image.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/image/hoverlabel/_bordercolorsrc.py b/plotly/validators/image/hoverlabel/_bordercolorsrc.py index 9d02b6d170..8dfb806d97 100644 --- a/plotly/validators/image/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/image/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="image.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/_font.py b/plotly/validators/image/hoverlabel/_font.py index 8f485eb78f..52caafd395 100644 --- a/plotly/validators/image/hoverlabel/_font.py +++ b/plotly/validators/image/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="image.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/image/hoverlabel/_namelength.py b/plotly/validators/image/hoverlabel/_namelength.py index 490a3605e6..f9c6c413b3 100644 --- a/plotly/validators/image/hoverlabel/_namelength.py +++ b/plotly/validators/image/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="image.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/image/hoverlabel/_namelengthsrc.py b/plotly/validators/image/hoverlabel/_namelengthsrc.py index bf91c77268..3551ba71c7 100644 --- a/plotly/validators/image/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/image/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="image.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/__init__.py b/plotly/validators/image/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/image/hoverlabel/font/__init__.py +++ b/plotly/validators/image/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/image/hoverlabel/font/_color.py b/plotly/validators/image/hoverlabel/font/_color.py index 216851ea98..416342a6f2 100644 --- a/plotly/validators/image/hoverlabel/font/_color.py +++ b/plotly/validators/image/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="image.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/image/hoverlabel/font/_colorsrc.py b/plotly/validators/image/hoverlabel/font/_colorsrc.py index 5ee3e5ca75..573ad636ef 100644 --- a/plotly/validators/image/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/image/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="image.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_family.py b/plotly/validators/image/hoverlabel/font/_family.py index 61dfba3c1e..adcbc0452c 100644 --- a/plotly/validators/image/hoverlabel/font/_family.py +++ b/plotly/validators/image/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="image.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/image/hoverlabel/font/_familysrc.py b/plotly/validators/image/hoverlabel/font/_familysrc.py index 58a132c923..74ac9240aa 100644 --- a/plotly/validators/image/hoverlabel/font/_familysrc.py +++ b/plotly/validators/image/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="image.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_lineposition.py b/plotly/validators/image/hoverlabel/font/_lineposition.py index 4cfd9bc318..b5cacbfdf3 100644 --- a/plotly/validators/image/hoverlabel/font/_lineposition.py +++ b/plotly/validators/image/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="image.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/image/hoverlabel/font/_linepositionsrc.py b/plotly/validators/image/hoverlabel/font/_linepositionsrc.py index 8d2fbb35c8..19d9685969 100644 --- a/plotly/validators/image/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/image/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="image.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_shadow.py b/plotly/validators/image/hoverlabel/font/_shadow.py index bc58e55e5d..ef6a2f66b3 100644 --- a/plotly/validators/image/hoverlabel/font/_shadow.py +++ b/plotly/validators/image/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="image.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/image/hoverlabel/font/_shadowsrc.py b/plotly/validators/image/hoverlabel/font/_shadowsrc.py index ee5d7cf858..485653b35d 100644 --- a/plotly/validators/image/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/image/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="image.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_size.py b/plotly/validators/image/hoverlabel/font/_size.py index 62fd27c78f..7bcbcc59b3 100644 --- a/plotly/validators/image/hoverlabel/font/_size.py +++ b/plotly/validators/image/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="image.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/image/hoverlabel/font/_sizesrc.py b/plotly/validators/image/hoverlabel/font/_sizesrc.py index 3a3a98e4d9..52009d9248 100644 --- a/plotly/validators/image/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/image/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="image.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_style.py b/plotly/validators/image/hoverlabel/font/_style.py index c2890fe9b4..2c3eb8b2eb 100644 --- a/plotly/validators/image/hoverlabel/font/_style.py +++ b/plotly/validators/image/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="image.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/image/hoverlabel/font/_stylesrc.py b/plotly/validators/image/hoverlabel/font/_stylesrc.py index e2aae20e54..b99b9206e2 100644 --- a/plotly/validators/image/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/image/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="image.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_textcase.py b/plotly/validators/image/hoverlabel/font/_textcase.py index e23ad408fc..8032e18955 100644 --- a/plotly/validators/image/hoverlabel/font/_textcase.py +++ b/plotly/validators/image/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="image.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/image/hoverlabel/font/_textcasesrc.py b/plotly/validators/image/hoverlabel/font/_textcasesrc.py index 8d88d3c108..42d255bbe7 100644 --- a/plotly/validators/image/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/image/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="image.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_variant.py b/plotly/validators/image/hoverlabel/font/_variant.py index f64f8dfeed..d2675da8c8 100644 --- a/plotly/validators/image/hoverlabel/font/_variant.py +++ b/plotly/validators/image/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="image.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/image/hoverlabel/font/_variantsrc.py b/plotly/validators/image/hoverlabel/font/_variantsrc.py index fe48df2c5b..da42930a86 100644 --- a/plotly/validators/image/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/image/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="image.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/hoverlabel/font/_weight.py b/plotly/validators/image/hoverlabel/font/_weight.py index b259a84d3e..b7e65d3328 100644 --- a/plotly/validators/image/hoverlabel/font/_weight.py +++ b/plotly/validators/image/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="image.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/image/hoverlabel/font/_weightsrc.py b/plotly/validators/image/hoverlabel/font/_weightsrc.py index a2d7e50fcb..fc55c48281 100644 --- a/plotly/validators/image/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/image/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="image.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/image/legendgrouptitle/__init__.py b/plotly/validators/image/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/image/legendgrouptitle/__init__.py +++ b/plotly/validators/image/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/image/legendgrouptitle/_font.py b/plotly/validators/image/legendgrouptitle/_font.py index e8534f56e1..c2876ad803 100644 --- a/plotly/validators/image/legendgrouptitle/_font.py +++ b/plotly/validators/image/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="image.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/image/legendgrouptitle/_text.py b/plotly/validators/image/legendgrouptitle/_text.py index 8d156380c8..3221b428dd 100644 --- a/plotly/validators/image/legendgrouptitle/_text.py +++ b/plotly/validators/image/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="image.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/image/legendgrouptitle/font/__init__.py b/plotly/validators/image/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/image/legendgrouptitle/font/__init__.py +++ b/plotly/validators/image/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/image/legendgrouptitle/font/_color.py b/plotly/validators/image/legendgrouptitle/font/_color.py index 2696eb652a..c2db30a3cf 100644 --- a/plotly/validators/image/legendgrouptitle/font/_color.py +++ b/plotly/validators/image/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="image.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/image/legendgrouptitle/font/_family.py b/plotly/validators/image/legendgrouptitle/font/_family.py index 8157c0ef7d..c3c70eab8c 100644 --- a/plotly/validators/image/legendgrouptitle/font/_family.py +++ b/plotly/validators/image/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="image.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/image/legendgrouptitle/font/_lineposition.py b/plotly/validators/image/legendgrouptitle/font/_lineposition.py index df4d11807b..06c9f9b99d 100644 --- a/plotly/validators/image/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/image/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="image.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/image/legendgrouptitle/font/_shadow.py b/plotly/validators/image/legendgrouptitle/font/_shadow.py index 45ea5f2207..dac191ae61 100644 --- a/plotly/validators/image/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/image/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="image.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/image/legendgrouptitle/font/_size.py b/plotly/validators/image/legendgrouptitle/font/_size.py index 0703f95a46..be84d603d3 100644 --- a/plotly/validators/image/legendgrouptitle/font/_size.py +++ b/plotly/validators/image/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="image.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/image/legendgrouptitle/font/_style.py b/plotly/validators/image/legendgrouptitle/font/_style.py index e3c31735cb..bd417573d5 100644 --- a/plotly/validators/image/legendgrouptitle/font/_style.py +++ b/plotly/validators/image/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="image.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/image/legendgrouptitle/font/_textcase.py b/plotly/validators/image/legendgrouptitle/font/_textcase.py index 8d6cafc286..b8ceb550c3 100644 --- a/plotly/validators/image/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/image/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="image.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/image/legendgrouptitle/font/_variant.py b/plotly/validators/image/legendgrouptitle/font/_variant.py index eb2ead66cb..3bdff74bc0 100644 --- a/plotly/validators/image/legendgrouptitle/font/_variant.py +++ b/plotly/validators/image/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="image.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/image/legendgrouptitle/font/_weight.py b/plotly/validators/image/legendgrouptitle/font/_weight.py index 2e4979dfd2..bd5e9e7fb5 100644 --- a/plotly/validators/image/legendgrouptitle/font/_weight.py +++ b/plotly/validators/image/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="image.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/image/stream/__init__.py b/plotly/validators/image/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/image/stream/__init__.py +++ b/plotly/validators/image/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/image/stream/_maxpoints.py b/plotly/validators/image/stream/_maxpoints.py index 0c54096930..b70a287af0 100644 --- a/plotly/validators/image/stream/_maxpoints.py +++ b/plotly/validators/image/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="image.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/image/stream/_token.py b/plotly/validators/image/stream/_token.py index 02bc8c921f..0121e4058a 100644 --- a/plotly/validators/image/stream/_token.py +++ b/plotly/validators/image/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="image.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/__init__.py b/plotly/validators/indicator/__init__.py index 90a3d4d166..f07d13e69b 100644 --- a/plotly/validators/indicator/__init__.py +++ b/plotly/validators/indicator/__init__.py @@ -1,59 +1,32 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._value import ValueValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._title import TitleValidator - from ._stream import StreamValidator - from ._number import NumberValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._gauge import GaugeValidator - from ._domain import DomainValidator - from ._delta import DeltaValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._value.ValueValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._title.TitleValidator", - "._stream.StreamValidator", - "._number.NumberValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._gauge.GaugeValidator", - "._domain.DomainValidator", - "._delta.DeltaValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._value.ValueValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._title.TitleValidator", + "._stream.StreamValidator", + "._number.NumberValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._gauge.GaugeValidator", + "._domain.DomainValidator", + "._delta.DeltaValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/indicator/_align.py b/plotly/validators/indicator/_align.py index 76d5d5d91f..6e0b681641 100644 --- a/plotly/validators/indicator/_align.py +++ b/plotly/validators/indicator/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="indicator", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/indicator/_customdata.py b/plotly/validators/indicator/_customdata.py index 80c3f00a18..8355d2c1f7 100644 --- a/plotly/validators/indicator/_customdata.py +++ b/plotly/validators/indicator/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="indicator", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/indicator/_customdatasrc.py b/plotly/validators/indicator/_customdatasrc.py index 109d43a7d5..74e166d0e6 100644 --- a/plotly/validators/indicator/_customdatasrc.py +++ b/plotly/validators/indicator/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="indicator", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/_delta.py b/plotly/validators/indicator/_delta.py index 862991d7e9..b54dcf164b 100644 --- a/plotly/validators/indicator/_delta.py +++ b/plotly/validators/indicator/_delta.py @@ -1,43 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DeltaValidator(_plotly_utils.basevalidators.CompoundValidator): +class DeltaValidator(_bv.CompoundValidator): def __init__(self, plotly_name="delta", parent_name="indicator", **kwargs): - super(DeltaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Delta"), data_docs=kwargs.pop( "data_docs", """ - decreasing - :class:`plotly.graph_objects.indicator.delta.De - creasing` instance or dict with compatible - properties - font - Set the font used to display the delta - increasing - :class:`plotly.graph_objects.indicator.delta.In - creasing` instance or dict with compatible - properties - position - Sets the position of delta with respect to the - number. - prefix - Sets a prefix appearing before the delta. - reference - Sets the reference value to compute the delta. - By default, it is set to the current value. - relative - Show relative change - suffix - Sets a suffix appearing next to the delta. - valueformat - Sets the value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. """, ), **kwargs, diff --git a/plotly/validators/indicator/_domain.py b/plotly/validators/indicator/_domain.py index 17176c77a1..3c245efed5 100644 --- a/plotly/validators/indicator/_domain.py +++ b/plotly/validators/indicator/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="indicator", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this indicator - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this indicator trace . - x - Sets the horizontal domain of this indicator - trace (in plot fraction). - y - Sets the vertical domain of this indicator - trace (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/indicator/_gauge.py b/plotly/validators/indicator/_gauge.py index e4fa182556..2b32d98b18 100644 --- a/plotly/validators/indicator/_gauge.py +++ b/plotly/validators/indicator/_gauge.py @@ -1,43 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GaugeValidator(_plotly_utils.basevalidators.CompoundValidator): +class GaugeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="gauge", parent_name="indicator", **kwargs): - super(GaugeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gauge"), data_docs=kwargs.pop( "data_docs", """ - axis - :class:`plotly.graph_objects.indicator.gauge.Ax - is` instance or dict with compatible properties - bar - Set the appearance of the gauge's value - bgcolor - Sets the gauge background color. - bordercolor - Sets the color of the border enclosing the - gauge. - borderwidth - Sets the width (in px) of the border enclosing - the gauge. - shape - Set the shape of the gauge - steps - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.Step` instances or dicts with - compatible properties - stepdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.stepdefaults), sets the - default property values to use for elements of - indicator.gauge.steps - threshold - :class:`plotly.graph_objects.indicator.gauge.Th - reshold` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/indicator/_ids.py b/plotly/validators/indicator/_ids.py index 0f01b273e7..52451ef293 100644 --- a/plotly/validators/indicator/_ids.py +++ b/plotly/validators/indicator/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="indicator", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/indicator/_idssrc.py b/plotly/validators/indicator/_idssrc.py index 86dad78e34..7b2a9f2451 100644 --- a/plotly/validators/indicator/_idssrc.py +++ b/plotly/validators/indicator/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="indicator", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/_legend.py b/plotly/validators/indicator/_legend.py index a55efc9276..5ad64ed405 100644 --- a/plotly/validators/indicator/_legend.py +++ b/plotly/validators/indicator/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="indicator", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/indicator/_legendgrouptitle.py b/plotly/validators/indicator/_legendgrouptitle.py index e2017eecdd..89c34992bc 100644 --- a/plotly/validators/indicator/_legendgrouptitle.py +++ b/plotly/validators/indicator/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="indicator", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/indicator/_legendrank.py b/plotly/validators/indicator/_legendrank.py index f3cd8624a5..8268cc6311 100644 --- a/plotly/validators/indicator/_legendrank.py +++ b/plotly/validators/indicator/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="indicator", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/indicator/_legendwidth.py b/plotly/validators/indicator/_legendwidth.py index 8ba5cf5597..aba5dd493e 100644 --- a/plotly/validators/indicator/_legendwidth.py +++ b/plotly/validators/indicator/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="indicator", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/_meta.py b/plotly/validators/indicator/_meta.py index 66d76dcac7..f35ba6c30d 100644 --- a/plotly/validators/indicator/_meta.py +++ b/plotly/validators/indicator/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="indicator", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/indicator/_metasrc.py b/plotly/validators/indicator/_metasrc.py index 5888c0041a..ce12fe3006 100644 --- a/plotly/validators/indicator/_metasrc.py +++ b/plotly/validators/indicator/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="indicator", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/_mode.py b/plotly/validators/indicator/_mode.py index a0f43ffe86..de003b4391 100644 --- a/plotly/validators/indicator/_mode.py +++ b/plotly/validators/indicator/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="indicator", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), flags=kwargs.pop("flags", ["number", "delta", "gauge"]), **kwargs, diff --git a/plotly/validators/indicator/_name.py b/plotly/validators/indicator/_name.py index fd8d9bb99d..f7c39d36cd 100644 --- a/plotly/validators/indicator/_name.py +++ b/plotly/validators/indicator/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="indicator", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/indicator/_number.py b/plotly/validators/indicator/_number.py index 90fe36dc52..fdd5dff734 100644 --- a/plotly/validators/indicator/_number.py +++ b/plotly/validators/indicator/_number.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NumberValidator(_plotly_utils.basevalidators.CompoundValidator): +class NumberValidator(_bv.CompoundValidator): def __init__(self, plotly_name="number", parent_name="indicator", **kwargs): - super(NumberValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Number"), data_docs=kwargs.pop( "data_docs", """ - font - Set the font used to display main number - prefix - Sets a prefix appearing before the number. - suffix - Sets a suffix appearing next to the number. - valueformat - Sets the value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. """, ), **kwargs, diff --git a/plotly/validators/indicator/_stream.py b/plotly/validators/indicator/_stream.py index 01be5fca95..24b2aae6af 100644 --- a/plotly/validators/indicator/_stream.py +++ b/plotly/validators/indicator/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="indicator", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/indicator/_title.py b/plotly/validators/indicator/_title.py index 8e9035b508..5983b59d54 100644 --- a/plotly/validators/indicator/_title.py +++ b/plotly/validators/indicator/_title.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="indicator", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the title. It - defaults to `center` except for bullet charts - for which it defaults to right. - font - Set the font used to display the title - text - Sets the title of this indicator. """, ), **kwargs, diff --git a/plotly/validators/indicator/_uid.py b/plotly/validators/indicator/_uid.py index 9342efd493..48fee26c35 100644 --- a/plotly/validators/indicator/_uid.py +++ b/plotly/validators/indicator/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="indicator", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/indicator/_uirevision.py b/plotly/validators/indicator/_uirevision.py index 16339b86b7..4f2b4cd671 100644 --- a/plotly/validators/indicator/_uirevision.py +++ b/plotly/validators/indicator/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="indicator", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/_value.py b/plotly/validators/indicator/_value.py index d79b7c77a9..b5a38a3806 100644 --- a/plotly/validators/indicator/_value.py +++ b/plotly/validators/indicator/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="indicator", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/indicator/_visible.py b/plotly/validators/indicator/_visible.py index 77227c33eb..3cf93496fd 100644 --- a/plotly/validators/indicator/_visible.py +++ b/plotly/validators/indicator/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="indicator", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/indicator/delta/__init__.py b/plotly/validators/indicator/delta/__init__.py index 9bebaaaa0c..f1436aa0e3 100644 --- a/plotly/validators/indicator/delta/__init__.py +++ b/plotly/validators/indicator/delta/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._valueformat import ValueformatValidator - from ._suffix import SuffixValidator - from ._relative import RelativeValidator - from ._reference import ReferenceValidator - from ._prefix import PrefixValidator - from ._position import PositionValidator - from ._increasing import IncreasingValidator - from ._font import FontValidator - from ._decreasing import DecreasingValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._valueformat.ValueformatValidator", - "._suffix.SuffixValidator", - "._relative.RelativeValidator", - "._reference.ReferenceValidator", - "._prefix.PrefixValidator", - "._position.PositionValidator", - "._increasing.IncreasingValidator", - "._font.FontValidator", - "._decreasing.DecreasingValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valueformat.ValueformatValidator", + "._suffix.SuffixValidator", + "._relative.RelativeValidator", + "._reference.ReferenceValidator", + "._prefix.PrefixValidator", + "._position.PositionValidator", + "._increasing.IncreasingValidator", + "._font.FontValidator", + "._decreasing.DecreasingValidator", + ], +) diff --git a/plotly/validators/indicator/delta/_decreasing.py b/plotly/validators/indicator/delta/_decreasing.py index c2baecca40..ae4f401ff8 100644 --- a/plotly/validators/indicator/delta/_decreasing.py +++ b/plotly/validators/indicator/delta/_decreasing.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class DecreasingValidator(_bv.CompoundValidator): def __init__( self, plotly_name="decreasing", parent_name="indicator.delta", **kwargs ): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Decreasing"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value """, ), **kwargs, diff --git a/plotly/validators/indicator/delta/_font.py b/plotly/validators/indicator/delta/_font.py index a2a7e1d715..0455dfa15e 100644 --- a/plotly/validators/indicator/delta/_font.py +++ b/plotly/validators/indicator/delta/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="indicator.delta", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/indicator/delta/_increasing.py b/plotly/validators/indicator/delta/_increasing.py index fc3b13122c..e34c59104c 100644 --- a/plotly/validators/indicator/delta/_increasing.py +++ b/plotly/validators/indicator/delta/_increasing.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class IncreasingValidator(_bv.CompoundValidator): def __init__( self, plotly_name="increasing", parent_name="indicator.delta", **kwargs ): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Increasing"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color for increasing value. - symbol - Sets the symbol to display for increasing value """, ), **kwargs, diff --git a/plotly/validators/indicator/delta/_position.py b/plotly/validators/indicator/delta/_position.py index a37de70313..5c22e8781d 100644 --- a/plotly/validators/indicator/delta/_position.py +++ b/plotly/validators/indicator/delta/_position.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="position", parent_name="indicator.delta", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom", "left", "right"]), **kwargs, diff --git a/plotly/validators/indicator/delta/_prefix.py b/plotly/validators/indicator/delta/_prefix.py index 601ce8f1b7..e43a432615 100644 --- a/plotly/validators/indicator/delta/_prefix.py +++ b/plotly/validators/indicator/delta/_prefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): +class PrefixValidator(_bv.StringValidator): def __init__(self, plotly_name="prefix", parent_name="indicator.delta", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/_reference.py b/plotly/validators/indicator/delta/_reference.py index 4bc253380f..b7209b9fba 100644 --- a/plotly/validators/indicator/delta/_reference.py +++ b/plotly/validators/indicator/delta/_reference.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReferenceValidator(_plotly_utils.basevalidators.NumberValidator): +class ReferenceValidator(_bv.NumberValidator): def __init__( self, plotly_name="reference", parent_name="indicator.delta", **kwargs ): - super(ReferenceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/_relative.py b/plotly/validators/indicator/delta/_relative.py index 534a5dc810..e9ed371899 100644 --- a/plotly/validators/indicator/delta/_relative.py +++ b/plotly/validators/indicator/delta/_relative.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RelativeValidator(_plotly_utils.basevalidators.BooleanValidator): +class RelativeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="relative", parent_name="indicator.delta", **kwargs): - super(RelativeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/_suffix.py b/plotly/validators/indicator/delta/_suffix.py index 90ad0a757f..8a904b7ddd 100644 --- a/plotly/validators/indicator/delta/_suffix.py +++ b/plotly/validators/indicator/delta/_suffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): +class SuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="suffix", parent_name="indicator.delta", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/_valueformat.py b/plotly/validators/indicator/delta/_valueformat.py index d23a941cd2..9225dfc5a1 100644 --- a/plotly/validators/indicator/delta/_valueformat.py +++ b/plotly/validators/indicator/delta/_valueformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): +class ValueformatValidator(_bv.StringValidator): def __init__( self, plotly_name="valueformat", parent_name="indicator.delta", **kwargs ): - super(ValueformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/decreasing/__init__.py b/plotly/validators/indicator/delta/decreasing/__init__.py index e2312c03a8..11541c453a 100644 --- a/plotly/validators/indicator/delta/decreasing/__init__.py +++ b/plotly/validators/indicator/delta/decreasing/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbol import SymbolValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/indicator/delta/decreasing/_color.py b/plotly/validators/indicator/delta/decreasing/_color.py index 90bc36a46d..7c1428507d 100644 --- a/plotly/validators/indicator/delta/decreasing/_color.py +++ b/plotly/validators/indicator/delta/decreasing/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.delta.decreasing", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/decreasing/_symbol.py b/plotly/validators/indicator/delta/decreasing/_symbol.py index f5d6c14f10..3635817c97 100644 --- a/plotly/validators/indicator/delta/decreasing/_symbol.py +++ b/plotly/validators/indicator/delta/decreasing/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): +class SymbolValidator(_bv.StringValidator): def __init__( self, plotly_name="symbol", parent_name="indicator.delta.decreasing", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/font/__init__.py b/plotly/validators/indicator/delta/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/indicator/delta/font/__init__.py +++ b/plotly/validators/indicator/delta/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/delta/font/_color.py b/plotly/validators/indicator/delta/font/_color.py index b825f2272a..4419ea667f 100644 --- a/plotly/validators/indicator/delta/font/_color.py +++ b/plotly/validators/indicator/delta/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.delta.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/font/_family.py b/plotly/validators/indicator/delta/font/_family.py index 2f73188c28..b3535d5800 100644 --- a/plotly/validators/indicator/delta/font/_family.py +++ b/plotly/validators/indicator/delta/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="indicator.delta.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/delta/font/_lineposition.py b/plotly/validators/indicator/delta/font/_lineposition.py index 92c21001fb..969975c663 100644 --- a/plotly/validators/indicator/delta/font/_lineposition.py +++ b/plotly/validators/indicator/delta/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="indicator.delta.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/indicator/delta/font/_shadow.py b/plotly/validators/indicator/delta/font/_shadow.py index 2f7b0ccb78..f887a3cd9b 100644 --- a/plotly/validators/indicator/delta/font/_shadow.py +++ b/plotly/validators/indicator/delta/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="indicator.delta.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/font/_size.py b/plotly/validators/indicator/delta/font/_size.py index f156627591..1180e7e7ba 100644 --- a/plotly/validators/indicator/delta/font/_size.py +++ b/plotly/validators/indicator/delta/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="indicator.delta.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/indicator/delta/font/_style.py b/plotly/validators/indicator/delta/font/_style.py index 9f64971dd7..e05ed50814 100644 --- a/plotly/validators/indicator/delta/font/_style.py +++ b/plotly/validators/indicator/delta/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="indicator.delta.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/indicator/delta/font/_textcase.py b/plotly/validators/indicator/delta/font/_textcase.py index 07ea1edc78..81c495e5dd 100644 --- a/plotly/validators/indicator/delta/font/_textcase.py +++ b/plotly/validators/indicator/delta/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="indicator.delta.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/indicator/delta/font/_variant.py b/plotly/validators/indicator/delta/font/_variant.py index 01822ce5d8..6aab9ab9a4 100644 --- a/plotly/validators/indicator/delta/font/_variant.py +++ b/plotly/validators/indicator/delta/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="indicator.delta.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/indicator/delta/font/_weight.py b/plotly/validators/indicator/delta/font/_weight.py index 6bf4e46a63..30bbd29680 100644 --- a/plotly/validators/indicator/delta/font/_weight.py +++ b/plotly/validators/indicator/delta/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="indicator.delta.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/indicator/delta/increasing/__init__.py b/plotly/validators/indicator/delta/increasing/__init__.py index e2312c03a8..11541c453a 100644 --- a/plotly/validators/indicator/delta/increasing/__init__.py +++ b/plotly/validators/indicator/delta/increasing/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbol import SymbolValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._symbol.SymbolValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/indicator/delta/increasing/_color.py b/plotly/validators/indicator/delta/increasing/_color.py index c150f3d5fa..08e7fd5ee0 100644 --- a/plotly/validators/indicator/delta/increasing/_color.py +++ b/plotly/validators/indicator/delta/increasing/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.delta.increasing", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/delta/increasing/_symbol.py b/plotly/validators/indicator/delta/increasing/_symbol.py index 5d87a0dcea..f02aa14225 100644 --- a/plotly/validators/indicator/delta/increasing/_symbol.py +++ b/plotly/validators/indicator/delta/increasing/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): +class SymbolValidator(_bv.StringValidator): def __init__( self, plotly_name="symbol", parent_name="indicator.delta.increasing", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/domain/__init__.py b/plotly/validators/indicator/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/indicator/domain/__init__.py +++ b/plotly/validators/indicator/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/indicator/domain/_column.py b/plotly/validators/indicator/domain/_column.py index 1112db9257..3fa713d600 100644 --- a/plotly/validators/indicator/domain/_column.py +++ b/plotly/validators/indicator/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="indicator.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/domain/_row.py b/plotly/validators/indicator/domain/_row.py index 1c89a2da3b..f3b78a16d1 100644 --- a/plotly/validators/indicator/domain/_row.py +++ b/plotly/validators/indicator/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="indicator.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/domain/_x.py b/plotly/validators/indicator/domain/_x.py index 5e771be80c..1ae978febd 100644 --- a/plotly/validators/indicator/domain/_x.py +++ b/plotly/validators/indicator/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="indicator.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/indicator/domain/_y.py b/plotly/validators/indicator/domain/_y.py index b77921c0ff..25abc877d3 100644 --- a/plotly/validators/indicator/domain/_y.py +++ b/plotly/validators/indicator/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="indicator.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/indicator/gauge/__init__.py b/plotly/validators/indicator/gauge/__init__.py index b2ca780c72..ba2d397e89 100644 --- a/plotly/validators/indicator/gauge/__init__.py +++ b/plotly/validators/indicator/gauge/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._threshold import ThresholdValidator - from ._stepdefaults import StepdefaultsValidator - from ._steps import StepsValidator - from ._shape import ShapeValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._bar import BarValidator - from ._axis import AxisValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._threshold.ThresholdValidator", - "._stepdefaults.StepdefaultsValidator", - "._steps.StepsValidator", - "._shape.ShapeValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._bar.BarValidator", - "._axis.AxisValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._threshold.ThresholdValidator", + "._stepdefaults.StepdefaultsValidator", + "._steps.StepsValidator", + "._shape.ShapeValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._bar.BarValidator", + "._axis.AxisValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/_axis.py b/plotly/validators/indicator/gauge/_axis.py index d81d4d5738..a878729132 100644 --- a/plotly/validators/indicator/gauge/_axis.py +++ b/plotly/validators/indicator/gauge/_axis.py @@ -1,192 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class AxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="axis", parent_name="indicator.gauge", **kwargs): - super(AxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Axis"), data_docs=kwargs.pop( "data_docs", """ - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.indicat - or.gauge.axis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.indicator.gauge.axis.tickformatstopdefaults), - sets the default property values to use for - elements of - indicator.gauge.axis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/_bar.py b/plotly/validators/indicator/gauge/_bar.py index 5ed1d86569..536fc4f4e4 100644 --- a/plotly/validators/indicator/gauge/_bar.py +++ b/plotly/validators/indicator/gauge/_bar.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarValidator(_plotly_utils.basevalidators.CompoundValidator): +class BarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="bar", parent_name="indicator.gauge", **kwargs): - super(BarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Bar"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.ba - r.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/_bgcolor.py b/plotly/validators/indicator/gauge/_bgcolor.py index 5e304a40c3..ce8a54d01e 100644 --- a/plotly/validators/indicator/gauge/_bgcolor.py +++ b/plotly/validators/indicator/gauge/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="indicator.gauge", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/_bordercolor.py b/plotly/validators/indicator/gauge/_bordercolor.py index d144f14926..3bd624a02d 100644 --- a/plotly/validators/indicator/gauge/_bordercolor.py +++ b/plotly/validators/indicator/gauge/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="indicator.gauge", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/_borderwidth.py b/plotly/validators/indicator/gauge/_borderwidth.py index ab0db6fddb..5f40702d7c 100644 --- a/plotly/validators/indicator/gauge/_borderwidth.py +++ b/plotly/validators/indicator/gauge/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="indicator.gauge", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/_shape.py b/plotly/validators/indicator/gauge/_shape.py index 60110e6c67..5e41cc364b 100644 --- a/plotly/validators/indicator/gauge/_shape.py +++ b/plotly/validators/indicator/gauge/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="indicator.gauge", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["angular", "bullet"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/_stepdefaults.py b/plotly/validators/indicator/gauge/_stepdefaults.py index 00e2ef40eb..7d659618bf 100644 --- a/plotly/validators/indicator/gauge/_stepdefaults.py +++ b/plotly/validators/indicator/gauge/_stepdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class StepdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="stepdefaults", parent_name="indicator.gauge", **kwargs ): - super(StepdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Step"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/indicator/gauge/_steps.py b/plotly/validators/indicator/gauge/_steps.py index 6d07e6323a..179cd47afc 100644 --- a/plotly/validators/indicator/gauge/_steps.py +++ b/plotly/validators/indicator/gauge/_steps.py @@ -1,47 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class StepsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="steps", parent_name="indicator.gauge", **kwargs): - super(StepsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Step"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the background color of the arc. - line - :class:`plotly.graph_objects.indicator.gauge.st - ep.Line` instance or dict with compatible - properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - Sets the range of this axis. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - thickness - Sets the thickness of the bar as a fraction of - the total thickness of the gauge. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/_threshold.py b/plotly/validators/indicator/gauge/_threshold.py index cfc2e2cadd..7148423346 100644 --- a/plotly/validators/indicator/gauge/_threshold.py +++ b/plotly/validators/indicator/gauge/_threshold.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThresholdValidator(_plotly_utils.basevalidators.CompoundValidator): +class ThresholdValidator(_bv.CompoundValidator): def __init__( self, plotly_name="threshold", parent_name="indicator.gauge", **kwargs ): - super(ThresholdValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Threshold"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.indicator.gauge.th - reshold.Line` instance or dict with compatible - properties - thickness - Sets the thickness of the threshold line as a - fraction of the thickness of the gauge. - value - Sets a treshold value drawn as a line. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/__init__.py b/plotly/validators/indicator/gauge/axis/__init__.py index 554168e778..147a295cdd 100644 --- a/plotly/validators/indicator/gauge/axis/__init__.py +++ b/plotly/validators/indicator/gauge/axis/__init__.py @@ -1,73 +1,39 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/axis/_dtick.py b/plotly/validators/indicator/gauge/axis/_dtick.py index decdabfbe1..95253e3fe6 100644 --- a/plotly/validators/indicator/gauge/axis/_dtick.py +++ b/plotly/validators/indicator/gauge/axis/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="indicator.gauge.axis", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_exponentformat.py b/plotly/validators/indicator/gauge/axis/_exponentformat.py index c26d5196a7..c800689b06 100644 --- a/plotly/validators/indicator/gauge/axis/_exponentformat.py +++ b/plotly/validators/indicator/gauge/axis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="indicator.gauge.axis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_labelalias.py b/plotly/validators/indicator/gauge/axis/_labelalias.py index aab9a6e089..66381875ef 100644 --- a/plotly/validators/indicator/gauge/axis/_labelalias.py +++ b/plotly/validators/indicator/gauge/axis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="indicator.gauge.axis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_minexponent.py b/plotly/validators/indicator/gauge/axis/_minexponent.py index d796b052bc..7a3906c8c8 100644 --- a/plotly/validators/indicator/gauge/axis/_minexponent.py +++ b/plotly/validators/indicator/gauge/axis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="indicator.gauge.axis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_nticks.py b/plotly/validators/indicator/gauge/axis/_nticks.py index 5509e221b3..488162e5ed 100644 --- a/plotly/validators/indicator/gauge/axis/_nticks.py +++ b/plotly/validators/indicator/gauge/axis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="indicator.gauge.axis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_range.py b/plotly/validators/indicator/gauge/axis/_range.py index 8057a29297..122aa7b660 100644 --- a/plotly/validators/indicator/gauge/axis/_range.py +++ b/plotly/validators/indicator/gauge/axis/_range.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="indicator.gauge.axis", **kwargs ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/indicator/gauge/axis/_separatethousands.py b/plotly/validators/indicator/gauge/axis/_separatethousands.py index db9727b37b..20384f6717 100644 --- a/plotly/validators/indicator/gauge/axis/_separatethousands.py +++ b/plotly/validators/indicator/gauge/axis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="indicator.gauge.axis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_showexponent.py b/plotly/validators/indicator/gauge/axis/_showexponent.py index 17c5f93394..179451b14d 100644 --- a/plotly/validators/indicator/gauge/axis/_showexponent.py +++ b/plotly/validators/indicator/gauge/axis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="indicator.gauge.axis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_showticklabels.py b/plotly/validators/indicator/gauge/axis/_showticklabels.py index 68a4c7fb7e..8c2c5b5e5f 100644 --- a/plotly/validators/indicator/gauge/axis/_showticklabels.py +++ b/plotly/validators/indicator/gauge/axis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="indicator.gauge.axis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_showtickprefix.py b/plotly/validators/indicator/gauge/axis/_showtickprefix.py index 18889438b7..e74582bc7f 100644 --- a/plotly/validators/indicator/gauge/axis/_showtickprefix.py +++ b/plotly/validators/indicator/gauge/axis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="indicator.gauge.axis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_showticksuffix.py b/plotly/validators/indicator/gauge/axis/_showticksuffix.py index caa97329ef..ea6a77eb35 100644 --- a/plotly/validators/indicator/gauge/axis/_showticksuffix.py +++ b/plotly/validators/indicator/gauge/axis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="indicator.gauge.axis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_tick0.py b/plotly/validators/indicator/gauge/axis/_tick0.py index fc0b226efa..900e8e69b2 100644 --- a/plotly/validators/indicator/gauge/axis/_tick0.py +++ b/plotly/validators/indicator/gauge/axis/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="indicator.gauge.axis", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_tickangle.py b/plotly/validators/indicator/gauge/axis/_tickangle.py index e86cf08856..e9d4c81b25 100644 --- a/plotly/validators/indicator/gauge/axis/_tickangle.py +++ b/plotly/validators/indicator/gauge/axis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="indicator.gauge.axis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_tickcolor.py b/plotly/validators/indicator/gauge/axis/_tickcolor.py index 4f26040b15..1458ec0248 100644 --- a/plotly/validators/indicator/gauge/axis/_tickcolor.py +++ b/plotly/validators/indicator/gauge/axis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="indicator.gauge.axis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_tickfont.py b/plotly/validators/indicator/gauge/axis/_tickfont.py index e2528f191f..3217746ff7 100644 --- a/plotly/validators/indicator/gauge/axis/_tickfont.py +++ b/plotly/validators/indicator/gauge/axis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="indicator.gauge.axis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_tickformat.py b/plotly/validators/indicator/gauge/axis/_tickformat.py index 87a58520ce..abc5ca5929 100644 --- a/plotly/validators/indicator/gauge/axis/_tickformat.py +++ b/plotly/validators/indicator/gauge/axis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="indicator.gauge.axis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py b/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py index 0274dda9f6..9b0ec55f89 100644 --- a/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py +++ b/plotly/validators/indicator/gauge/axis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="indicator.gauge.axis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/indicator/gauge/axis/_tickformatstops.py b/plotly/validators/indicator/gauge/axis/_tickformatstops.py index 00c37c95d1..efa5737ca0 100644 --- a/plotly/validators/indicator/gauge/axis/_tickformatstops.py +++ b/plotly/validators/indicator/gauge/axis/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="indicator.gauge.axis", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_ticklabelstep.py b/plotly/validators/indicator/gauge/axis/_ticklabelstep.py index 738d952274..bcd39aaf50 100644 --- a/plotly/validators/indicator/gauge/axis/_ticklabelstep.py +++ b/plotly/validators/indicator/gauge/axis/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="indicator.gauge.axis", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_ticklen.py b/plotly/validators/indicator/gauge/axis/_ticklen.py index 9cdd810b6d..075e1f2fc7 100644 --- a/plotly/validators/indicator/gauge/axis/_ticklen.py +++ b/plotly/validators/indicator/gauge/axis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="indicator.gauge.axis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_tickmode.py b/plotly/validators/indicator/gauge/axis/_tickmode.py index ace070625d..10e0358656 100644 --- a/plotly/validators/indicator/gauge/axis/_tickmode.py +++ b/plotly/validators/indicator/gauge/axis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="indicator.gauge.axis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/indicator/gauge/axis/_tickprefix.py b/plotly/validators/indicator/gauge/axis/_tickprefix.py index f99899527b..07621a9f87 100644 --- a/plotly/validators/indicator/gauge/axis/_tickprefix.py +++ b/plotly/validators/indicator/gauge/axis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="indicator.gauge.axis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_ticks.py b/plotly/validators/indicator/gauge/axis/_ticks.py index 22373848db..4b705ce9a2 100644 --- a/plotly/validators/indicator/gauge/axis/_ticks.py +++ b/plotly/validators/indicator/gauge/axis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="indicator.gauge.axis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_ticksuffix.py b/plotly/validators/indicator/gauge/axis/_ticksuffix.py index 1bae8a6385..947e8df195 100644 --- a/plotly/validators/indicator/gauge/axis/_ticksuffix.py +++ b/plotly/validators/indicator/gauge/axis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="indicator.gauge.axis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_ticktext.py b/plotly/validators/indicator/gauge/axis/_ticktext.py index b402e70d35..53c14a8c1f 100644 --- a/plotly/validators/indicator/gauge/axis/_ticktext.py +++ b/plotly/validators/indicator/gauge/axis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="indicator.gauge.axis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_ticktextsrc.py b/plotly/validators/indicator/gauge/axis/_ticktextsrc.py index d348972c4a..e28c09eb9c 100644 --- a/plotly/validators/indicator/gauge/axis/_ticktextsrc.py +++ b/plotly/validators/indicator/gauge/axis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="indicator.gauge.axis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_tickvals.py b/plotly/validators/indicator/gauge/axis/_tickvals.py index 15e8556242..37c5c79765 100644 --- a/plotly/validators/indicator/gauge/axis/_tickvals.py +++ b/plotly/validators/indicator/gauge/axis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="indicator.gauge.axis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_tickvalssrc.py b/plotly/validators/indicator/gauge/axis/_tickvalssrc.py index ef788fc7c2..7097119a81 100644 --- a/plotly/validators/indicator/gauge/axis/_tickvalssrc.py +++ b/plotly/validators/indicator/gauge/axis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="indicator.gauge.axis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/_tickwidth.py b/plotly/validators/indicator/gauge/axis/_tickwidth.py index 4d555dd1ff..00d1033f50 100644 --- a/plotly/validators/indicator/gauge/axis/_tickwidth.py +++ b/plotly/validators/indicator/gauge/axis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="indicator.gauge.axis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/_visible.py b/plotly/validators/indicator/gauge/axis/_visible.py index e75752dbb9..cb11023750 100644 --- a/plotly/validators/indicator/gauge/axis/_visible.py +++ b/plotly/validators/indicator/gauge/axis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="indicator.gauge.axis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/tickfont/__init__.py b/plotly/validators/indicator/gauge/axis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/__init__.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_color.py b/plotly/validators/indicator/gauge/axis/tickfont/_color.py index 9291f977e2..803564faa7 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_color.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.gauge.axis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_family.py b/plotly/validators/indicator/gauge/axis/tickfont/_family.py index 17f25a48de..ee4fdd9942 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_family.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_lineposition.py b/plotly/validators/indicator/gauge/axis/tickfont/_lineposition.py index ce371f547a..a2ea40be1b 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_lineposition.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_shadow.py b/plotly/validators/indicator/gauge/axis/tickfont/_shadow.py index a317867028..8ea4b7ac47 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_shadow.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_size.py b/plotly/validators/indicator/gauge/axis/tickfont/_size.py index 275683c98d..672ae11dab 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_size.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="indicator.gauge.axis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_style.py b/plotly/validators/indicator/gauge/axis/tickfont/_style.py index a60e6796f7..7972a982a8 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_style.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="indicator.gauge.axis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_textcase.py b/plotly/validators/indicator/gauge/axis/tickfont/_textcase.py index 8ac77c157b..428128ff64 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_textcase.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_variant.py b/plotly/validators/indicator/gauge/axis/tickfont/_variant.py index 4641b91340..5bfe50d449 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_variant.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/indicator/gauge/axis/tickfont/_weight.py b/plotly/validators/indicator/gauge/axis/tickfont/_weight.py index ebf42acd76..22b735b6d6 100644 --- a/plotly/validators/indicator/gauge/axis/tickfont/_weight.py +++ b/plotly/validators/indicator/gauge/axis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="indicator.gauge.axis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py b/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py +++ b/plotly/validators/indicator/gauge/axis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py b/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py index 230b1bbbd8..3c024fb4c6 100644 --- a/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py +++ b/plotly/validators/indicator/gauge/axis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="indicator.gauge.axis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py b/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py index fb83790712..badf58bbda 100644 --- a/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py +++ b/plotly/validators/indicator/gauge/axis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="indicator.gauge.axis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py b/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py index 9ebc67748a..5630bdcb00 100644 --- a/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py +++ b/plotly/validators/indicator/gauge/axis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="indicator.gauge.axis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py b/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py index 94e75aaad8..1b42580e54 100644 --- a/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py +++ b/plotly/validators/indicator/gauge/axis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="indicator.gauge.axis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py b/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py index 358d253261..ebeb62961b 100644 --- a/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py +++ b/plotly/validators/indicator/gauge/axis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="indicator.gauge.axis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/bar/__init__.py b/plotly/validators/indicator/gauge/bar/__init__.py index d49f1c0e78..f8b2d9b6a9 100644 --- a/plotly/validators/indicator/gauge/bar/__init__.py +++ b/plotly/validators/indicator/gauge/bar/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._thickness import ThicknessValidator - from ._line import LineValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._thickness.ThicknessValidator", - "._line.LineValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._thickness.ThicknessValidator", + "._line.LineValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/bar/_color.py b/plotly/validators/indicator/gauge/bar/_color.py index 7ef5dc50a0..c02f3a109e 100644 --- a/plotly/validators/indicator/gauge/bar/_color.py +++ b/plotly/validators/indicator/gauge/bar/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.gauge.bar", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/bar/_line.py b/plotly/validators/indicator/gauge/bar/_line.py index c061659a2b..6e2696b390 100644 --- a/plotly/validators/indicator/gauge/bar/_line.py +++ b/plotly/validators/indicator/gauge/bar/_line.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="indicator.gauge.bar", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/bar/_thickness.py b/plotly/validators/indicator/gauge/bar/_thickness.py index 18105f94e7..bb887a1ece 100644 --- a/plotly/validators/indicator/gauge/bar/_thickness.py +++ b/plotly/validators/indicator/gauge/bar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="indicator.gauge.bar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/indicator/gauge/bar/line/__init__.py b/plotly/validators/indicator/gauge/bar/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/indicator/gauge/bar/line/__init__.py +++ b/plotly/validators/indicator/gauge/bar/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/indicator/gauge/bar/line/_color.py b/plotly/validators/indicator/gauge/bar/line/_color.py index a788fec002..88fd2c1af1 100644 --- a/plotly/validators/indicator/gauge/bar/line/_color.py +++ b/plotly/validators/indicator/gauge/bar/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.gauge.bar.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/bar/line/_width.py b/plotly/validators/indicator/gauge/bar/line/_width.py index 6361135257..739f681d71 100644 --- a/plotly/validators/indicator/gauge/bar/line/_width.py +++ b/plotly/validators/indicator/gauge/bar/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="indicator.gauge.bar.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/step/__init__.py b/plotly/validators/indicator/gauge/step/__init__.py index 4ea4b3e46b..0ee1a4cb9b 100644 --- a/plotly/validators/indicator/gauge/step/__init__.py +++ b/plotly/validators/indicator/gauge/step/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._thickness import ThicknessValidator - from ._templateitemname import TemplateitemnameValidator - from ._range import RangeValidator - from ._name import NameValidator - from ._line import LineValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._thickness.ThicknessValidator", - "._templateitemname.TemplateitemnameValidator", - "._range.RangeValidator", - "._name.NameValidator", - "._line.LineValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._thickness.ThicknessValidator", + "._templateitemname.TemplateitemnameValidator", + "._range.RangeValidator", + "._name.NameValidator", + "._line.LineValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/step/_color.py b/plotly/validators/indicator/gauge/step/_color.py index 07a6a1b08a..9d45a6b256 100644 --- a/plotly/validators/indicator/gauge/step/_color.py +++ b/plotly/validators/indicator/gauge/step/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.gauge.step", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/step/_line.py b/plotly/validators/indicator/gauge/step/_line.py index eab5f39b72..967f5921c3 100644 --- a/plotly/validators/indicator/gauge/step/_line.py +++ b/plotly/validators/indicator/gauge/step/_line.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="indicator.gauge.step", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. - width - Sets the width (in px) of the line enclosing - each sector. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/step/_name.py b/plotly/validators/indicator/gauge/step/_name.py index e623ed5f22..9c743d3fec 100644 --- a/plotly/validators/indicator/gauge/step/_name.py +++ b/plotly/validators/indicator/gauge/step/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="indicator.gauge.step", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/step/_range.py b/plotly/validators/indicator/gauge/step/_range.py index 73b09a0727..352c621f26 100644 --- a/plotly/validators/indicator/gauge/step/_range.py +++ b/plotly/validators/indicator/gauge/step/_range.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="indicator.gauge.step", **kwargs ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/indicator/gauge/step/_templateitemname.py b/plotly/validators/indicator/gauge/step/_templateitemname.py index aca6a8521e..22ce91db6b 100644 --- a/plotly/validators/indicator/gauge/step/_templateitemname.py +++ b/plotly/validators/indicator/gauge/step/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="indicator.gauge.step", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/step/_thickness.py b/plotly/validators/indicator/gauge/step/_thickness.py index e7e46e1e55..f07febd829 100644 --- a/plotly/validators/indicator/gauge/step/_thickness.py +++ b/plotly/validators/indicator/gauge/step/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="indicator.gauge.step", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/indicator/gauge/step/line/__init__.py b/plotly/validators/indicator/gauge/step/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/indicator/gauge/step/line/__init__.py +++ b/plotly/validators/indicator/gauge/step/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/indicator/gauge/step/line/_color.py b/plotly/validators/indicator/gauge/step/line/_color.py index bb537d2d91..0c076c41ac 100644 --- a/plotly/validators/indicator/gauge/step/line/_color.py +++ b/plotly/validators/indicator/gauge/step/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.gauge.step.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/step/line/_width.py b/plotly/validators/indicator/gauge/step/line/_width.py index 6821f137ca..9e1635ca39 100644 --- a/plotly/validators/indicator/gauge/step/line/_width.py +++ b/plotly/validators/indicator/gauge/step/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="indicator.gauge.step.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/gauge/threshold/__init__.py b/plotly/validators/indicator/gauge/threshold/__init__.py index b4226aa920..cc27740011 100644 --- a/plotly/validators/indicator/gauge/threshold/__init__.py +++ b/plotly/validators/indicator/gauge/threshold/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._thickness import ThicknessValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._thickness.ThicknessValidator", - "._line.LineValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._thickness.ThicknessValidator", + "._line.LineValidator", + ], +) diff --git a/plotly/validators/indicator/gauge/threshold/_line.py b/plotly/validators/indicator/gauge/threshold/_line.py index b74f966e66..075bd6b368 100644 --- a/plotly/validators/indicator/gauge/threshold/_line.py +++ b/plotly/validators/indicator/gauge/threshold/_line.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="indicator.gauge.threshold", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the threshold line. - width - Sets the width (in px) of the threshold line. """, ), **kwargs, diff --git a/plotly/validators/indicator/gauge/threshold/_thickness.py b/plotly/validators/indicator/gauge/threshold/_thickness.py index 8cd0c85f16..df54631d81 100644 --- a/plotly/validators/indicator/gauge/threshold/_thickness.py +++ b/plotly/validators/indicator/gauge/threshold/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="indicator.gauge.threshold", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/indicator/gauge/threshold/_value.py b/plotly/validators/indicator/gauge/threshold/_value.py index 3e8f0725ff..f045145266 100644 --- a/plotly/validators/indicator/gauge/threshold/_value.py +++ b/plotly/validators/indicator/gauge/threshold/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__( self, plotly_name="value", parent_name="indicator.gauge.threshold", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/threshold/line/__init__.py b/plotly/validators/indicator/gauge/threshold/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/indicator/gauge/threshold/line/__init__.py +++ b/plotly/validators/indicator/gauge/threshold/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/indicator/gauge/threshold/line/_color.py b/plotly/validators/indicator/gauge/threshold/line/_color.py index a282a267e4..d393a53ac2 100644 --- a/plotly/validators/indicator/gauge/threshold/line/_color.py +++ b/plotly/validators/indicator/gauge/threshold/line/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.gauge.threshold.line", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/gauge/threshold/line/_width.py b/plotly/validators/indicator/gauge/threshold/line/_width.py index 4cee92e2f2..784bbfb210 100644 --- a/plotly/validators/indicator/gauge/threshold/line/_width.py +++ b/plotly/validators/indicator/gauge/threshold/line/_width.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="indicator.gauge.threshold.line", **kwargs, ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/indicator/legendgrouptitle/__init__.py b/plotly/validators/indicator/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/indicator/legendgrouptitle/__init__.py +++ b/plotly/validators/indicator/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/indicator/legendgrouptitle/_font.py b/plotly/validators/indicator/legendgrouptitle/_font.py index d8a35a9ebe..3445d350ac 100644 --- a/plotly/validators/indicator/legendgrouptitle/_font.py +++ b/plotly/validators/indicator/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="indicator.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/indicator/legendgrouptitle/_text.py b/plotly/validators/indicator/legendgrouptitle/_text.py index c15a520ec0..df673b11ba 100644 --- a/plotly/validators/indicator/legendgrouptitle/_text.py +++ b/plotly/validators/indicator/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="indicator.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/indicator/legendgrouptitle/font/__init__.py b/plotly/validators/indicator/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/__init__.py +++ b/plotly/validators/indicator/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/legendgrouptitle/font/_color.py b/plotly/validators/indicator/legendgrouptitle/font/_color.py index cdfe36d120..97f8a7878e 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_color.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/indicator/legendgrouptitle/font/_family.py b/plotly/validators/indicator/legendgrouptitle/font/_family.py index e79283a1c6..3fadc266c4 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_family.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/legendgrouptitle/font/_lineposition.py b/plotly/validators/indicator/legendgrouptitle/font/_lineposition.py index 1961bd099d..bcde9eb973 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/indicator/legendgrouptitle/font/_shadow.py b/plotly/validators/indicator/legendgrouptitle/font/_shadow.py index bfd657a904..894517bf11 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/indicator/legendgrouptitle/font/_size.py b/plotly/validators/indicator/legendgrouptitle/font/_size.py index 5107c5e49d..378363d52f 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_size.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/indicator/legendgrouptitle/font/_style.py b/plotly/validators/indicator/legendgrouptitle/font/_style.py index b10b1a3093..c0950712e9 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_style.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/indicator/legendgrouptitle/font/_textcase.py b/plotly/validators/indicator/legendgrouptitle/font/_textcase.py index 62e5359f9d..9cfc379845 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/indicator/legendgrouptitle/font/_variant.py b/plotly/validators/indicator/legendgrouptitle/font/_variant.py index 78f07d0c18..dbad73493e 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_variant.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/indicator/legendgrouptitle/font/_weight.py b/plotly/validators/indicator/legendgrouptitle/font/_weight.py index 0baef648da..95e60f8e7d 100644 --- a/plotly/validators/indicator/legendgrouptitle/font/_weight.py +++ b/plotly/validators/indicator/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="indicator.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/indicator/number/__init__.py b/plotly/validators/indicator/number/__init__.py index 71d6d13a5c..42a8aaf880 100644 --- a/plotly/validators/indicator/number/__init__.py +++ b/plotly/validators/indicator/number/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._valueformat import ValueformatValidator - from ._suffix import SuffixValidator - from ._prefix import PrefixValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._valueformat.ValueformatValidator", - "._suffix.SuffixValidator", - "._prefix.PrefixValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valueformat.ValueformatValidator", + "._suffix.SuffixValidator", + "._prefix.PrefixValidator", + "._font.FontValidator", + ], +) diff --git a/plotly/validators/indicator/number/_font.py b/plotly/validators/indicator/number/_font.py index 9fdac9e9e1..04dbf1c378 100644 --- a/plotly/validators/indicator/number/_font.py +++ b/plotly/validators/indicator/number/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="indicator.number", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/indicator/number/_prefix.py b/plotly/validators/indicator/number/_prefix.py index bb69a19643..cb735f4dcc 100644 --- a/plotly/validators/indicator/number/_prefix.py +++ b/plotly/validators/indicator/number/_prefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): +class PrefixValidator(_bv.StringValidator): def __init__(self, plotly_name="prefix", parent_name="indicator.number", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/number/_suffix.py b/plotly/validators/indicator/number/_suffix.py index 4fae10d2a1..f6e6cdfd82 100644 --- a/plotly/validators/indicator/number/_suffix.py +++ b/plotly/validators/indicator/number/_suffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): +class SuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="suffix", parent_name="indicator.number", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/number/_valueformat.py b/plotly/validators/indicator/number/_valueformat.py index 515081c0ed..d8fed9dc4a 100644 --- a/plotly/validators/indicator/number/_valueformat.py +++ b/plotly/validators/indicator/number/_valueformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): +class ValueformatValidator(_bv.StringValidator): def __init__( self, plotly_name="valueformat", parent_name="indicator.number", **kwargs ): - super(ValueformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/number/font/__init__.py b/plotly/validators/indicator/number/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/indicator/number/font/__init__.py +++ b/plotly/validators/indicator/number/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/number/font/_color.py b/plotly/validators/indicator/number/font/_color.py index 8cf7419750..3f30bcaa84 100644 --- a/plotly/validators/indicator/number/font/_color.py +++ b/plotly/validators/indicator/number/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.number.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/number/font/_family.py b/plotly/validators/indicator/number/font/_family.py index fbe1dc647f..061eb21eb0 100644 --- a/plotly/validators/indicator/number/font/_family.py +++ b/plotly/validators/indicator/number/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="indicator.number.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/number/font/_lineposition.py b/plotly/validators/indicator/number/font/_lineposition.py index b133a52ee1..30dbc7d0da 100644 --- a/plotly/validators/indicator/number/font/_lineposition.py +++ b/plotly/validators/indicator/number/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="indicator.number.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/indicator/number/font/_shadow.py b/plotly/validators/indicator/number/font/_shadow.py index 86aa8f5243..3289a5496d 100644 --- a/plotly/validators/indicator/number/font/_shadow.py +++ b/plotly/validators/indicator/number/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="indicator.number.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/number/font/_size.py b/plotly/validators/indicator/number/font/_size.py index 8fb3432c10..1d3af42ecf 100644 --- a/plotly/validators/indicator/number/font/_size.py +++ b/plotly/validators/indicator/number/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="indicator.number.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/indicator/number/font/_style.py b/plotly/validators/indicator/number/font/_style.py index 3c136a1d1f..a028274d1b 100644 --- a/plotly/validators/indicator/number/font/_style.py +++ b/plotly/validators/indicator/number/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="indicator.number.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/indicator/number/font/_textcase.py b/plotly/validators/indicator/number/font/_textcase.py index d18b488a31..bd912c639f 100644 --- a/plotly/validators/indicator/number/font/_textcase.py +++ b/plotly/validators/indicator/number/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="indicator.number.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/indicator/number/font/_variant.py b/plotly/validators/indicator/number/font/_variant.py index df178ef46d..82c58f2f53 100644 --- a/plotly/validators/indicator/number/font/_variant.py +++ b/plotly/validators/indicator/number/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="indicator.number.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/indicator/number/font/_weight.py b/plotly/validators/indicator/number/font/_weight.py index c5eb1c518b..0cd38264b6 100644 --- a/plotly/validators/indicator/number/font/_weight.py +++ b/plotly/validators/indicator/number/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="indicator.number.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/indicator/stream/__init__.py b/plotly/validators/indicator/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/indicator/stream/__init__.py +++ b/plotly/validators/indicator/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/indicator/stream/_maxpoints.py b/plotly/validators/indicator/stream/_maxpoints.py index 8430bd7bb8..03e94b59b2 100644 --- a/plotly/validators/indicator/stream/_maxpoints.py +++ b/plotly/validators/indicator/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="indicator.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/indicator/stream/_token.py b/plotly/validators/indicator/stream/_token.py index c75b7c0df5..3e5c28fd11 100644 --- a/plotly/validators/indicator/stream/_token.py +++ b/plotly/validators/indicator/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="indicator.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/title/__init__.py b/plotly/validators/indicator/title/__init__.py index 2415e03514..2f547f8106 100644 --- a/plotly/validators/indicator/title/__init__.py +++ b/plotly/validators/indicator/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._font.FontValidator", "._align.AlignValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._font.FontValidator", "._align.AlignValidator"], +) diff --git a/plotly/validators/indicator/title/_align.py b/plotly/validators/indicator/title/_align.py index 545a4f2971..49a4d1aa76 100644 --- a/plotly/validators/indicator/title/_align.py +++ b/plotly/validators/indicator/title/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="indicator.title", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/indicator/title/_font.py b/plotly/validators/indicator/title/_font.py index dae939ba31..f511c6ffae 100644 --- a/plotly/validators/indicator/title/_font.py +++ b/plotly/validators/indicator/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="indicator.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/indicator/title/_text.py b/plotly/validators/indicator/title/_text.py index 7cdba51386..6c33f25ad0 100644 --- a/plotly/validators/indicator/title/_text.py +++ b/plotly/validators/indicator/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="indicator.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/title/font/__init__.py b/plotly/validators/indicator/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/indicator/title/font/__init__.py +++ b/plotly/validators/indicator/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/indicator/title/font/_color.py b/plotly/validators/indicator/title/font/_color.py index c67e216f7f..2b08ac88a2 100644 --- a/plotly/validators/indicator/title/font/_color.py +++ b/plotly/validators/indicator/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="indicator.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/title/font/_family.py b/plotly/validators/indicator/title/font/_family.py index 163ebae27d..6ad4f72195 100644 --- a/plotly/validators/indicator/title/font/_family.py +++ b/plotly/validators/indicator/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="indicator.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/indicator/title/font/_lineposition.py b/plotly/validators/indicator/title/font/_lineposition.py index 0f2ff92eb3..8be0804a54 100644 --- a/plotly/validators/indicator/title/font/_lineposition.py +++ b/plotly/validators/indicator/title/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="indicator.title.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/indicator/title/font/_shadow.py b/plotly/validators/indicator/title/font/_shadow.py index 3feaab0117..e5955a8cae 100644 --- a/plotly/validators/indicator/title/font/_shadow.py +++ b/plotly/validators/indicator/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="indicator.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/indicator/title/font/_size.py b/plotly/validators/indicator/title/font/_size.py index 6e357fcd7c..2aec19de30 100644 --- a/plotly/validators/indicator/title/font/_size.py +++ b/plotly/validators/indicator/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="indicator.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/indicator/title/font/_style.py b/plotly/validators/indicator/title/font/_style.py index d1cc28d28b..83aa748d4c 100644 --- a/plotly/validators/indicator/title/font/_style.py +++ b/plotly/validators/indicator/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="indicator.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/indicator/title/font/_textcase.py b/plotly/validators/indicator/title/font/_textcase.py index 73572b246b..adccc3a048 100644 --- a/plotly/validators/indicator/title/font/_textcase.py +++ b/plotly/validators/indicator/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="indicator.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/indicator/title/font/_variant.py b/plotly/validators/indicator/title/font/_variant.py index ef35334e1d..fe44942b1a 100644 --- a/plotly/validators/indicator/title/font/_variant.py +++ b/plotly/validators/indicator/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="indicator.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/indicator/title/font/_weight.py b/plotly/validators/indicator/title/font/_weight.py index 8b944428f2..b08aa49f69 100644 --- a/plotly/validators/indicator/title/font/_weight.py +++ b/plotly/validators/indicator/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="indicator.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/isosurface/__init__.py b/plotly/validators/isosurface/__init__.py index e65b327ed4..d4a21a5cc1 100644 --- a/plotly/validators/isosurface/__init__.py +++ b/plotly/validators/isosurface/__init__.py @@ -1,133 +1,69 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._valuesrc import ValuesrcValidator - from ._valuehoverformat import ValuehoverformatValidator - from ._value import ValueValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._surface import SurfaceValidator - from ._stream import StreamValidator - from ._spaceframe import SpaceframeValidator - from ._slices import SlicesValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lightposition import LightpositionValidator - from ._lighting import LightingValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._isomin import IsominValidator - from ._isomax import IsomaxValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._flatshading import FlatshadingValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contour import ContourValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._caps import CapsValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._valuesrc.ValuesrcValidator", - "._valuehoverformat.ValuehoverformatValidator", - "._value.ValueValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._surface.SurfaceValidator", - "._stream.StreamValidator", - "._spaceframe.SpaceframeValidator", - "._slices.SlicesValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lightposition.LightpositionValidator", - "._lighting.LightingValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._isomin.IsominValidator", - "._isomax.IsomaxValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._flatshading.FlatshadingValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contour.ContourValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._caps.CapsValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._valuesrc.ValuesrcValidator", + "._valuehoverformat.ValuehoverformatValidator", + "._value.ValueValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._surface.SurfaceValidator", + "._stream.StreamValidator", + "._spaceframe.SpaceframeValidator", + "._slices.SlicesValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._isomin.IsominValidator", + "._isomax.IsomaxValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._flatshading.FlatshadingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contour.ContourValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._caps.CapsValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/isosurface/_autocolorscale.py b/plotly/validators/isosurface/_autocolorscale.py index 686c15e377..b6b8b68df4 100644 --- a/plotly/validators/isosurface/_autocolorscale.py +++ b/plotly/validators/isosurface/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="isosurface", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/isosurface/_caps.py b/plotly/validators/isosurface/_caps.py index 07fe8ec96e..542380a8c5 100644 --- a/plotly/validators/isosurface/_caps.py +++ b/plotly/validators/isosurface/_caps.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CapsValidator(_plotly_utils.basevalidators.CompoundValidator): +class CapsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="caps", parent_name="isosurface", **kwargs): - super(CapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Caps"), data_docs=kwargs.pop( "data_docs", """ - x - :class:`plotly.graph_objects.isosurface.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.caps.Z` - instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/isosurface/_cauto.py b/plotly/validators/isosurface/_cauto.py index bc66c13d4f..46f5e0ded0 100644 --- a/plotly/validators/isosurface/_cauto.py +++ b/plotly/validators/isosurface/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="isosurface", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/isosurface/_cmax.py b/plotly/validators/isosurface/_cmax.py index 568c5ca3ca..fe5fb6d443 100644 --- a/plotly/validators/isosurface/_cmax.py +++ b/plotly/validators/isosurface/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="isosurface", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/isosurface/_cmid.py b/plotly/validators/isosurface/_cmid.py index 37614c7207..59a20626ca 100644 --- a/plotly/validators/isosurface/_cmid.py +++ b/plotly/validators/isosurface/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="isosurface", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/isosurface/_cmin.py b/plotly/validators/isosurface/_cmin.py index 632d1cc77a..5220883407 100644 --- a/plotly/validators/isosurface/_cmin.py +++ b/plotly/validators/isosurface/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="isosurface", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/isosurface/_coloraxis.py b/plotly/validators/isosurface/_coloraxis.py index caab0b08ce..49139e6097 100644 --- a/plotly/validators/isosurface/_coloraxis.py +++ b/plotly/validators/isosurface/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="isosurface", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/isosurface/_colorbar.py b/plotly/validators/isosurface/_colorbar.py index 308bc26626..344077d8a0 100644 --- a/plotly/validators/isosurface/_colorbar.py +++ b/plotly/validators/isosurface/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="isosurface", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.isosurf - ace.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.isosurface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of isosurface.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.isosurface.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_colorscale.py b/plotly/validators/isosurface/_colorscale.py index 78a3ea6eb2..6b214cc51a 100644 --- a/plotly/validators/isosurface/_colorscale.py +++ b/plotly/validators/isosurface/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="isosurface", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/isosurface/_contour.py b/plotly/validators/isosurface/_contour.py index 28143a0042..0c3650ddee 100644 --- a/plotly/validators/isosurface/_contour.py +++ b/plotly/validators/isosurface/_contour.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContourValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contour", parent_name="isosurface", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contour"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_customdata.py b/plotly/validators/isosurface/_customdata.py index 5b35ceba52..52a7a47df8 100644 --- a/plotly/validators/isosurface/_customdata.py +++ b/plotly/validators/isosurface/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="isosurface", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_customdatasrc.py b/plotly/validators/isosurface/_customdatasrc.py index 2fbdc561fd..0f1d7741b2 100644 --- a/plotly/validators/isosurface/_customdatasrc.py +++ b/plotly/validators/isosurface/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="isosurface", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_flatshading.py b/plotly/validators/isosurface/_flatshading.py index 80f2cdf155..87d4762ad1 100644 --- a/plotly/validators/isosurface/_flatshading.py +++ b/plotly/validators/isosurface/_flatshading.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): +class FlatshadingValidator(_bv.BooleanValidator): def __init__(self, plotly_name="flatshading", parent_name="isosurface", **kwargs): - super(FlatshadingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_hoverinfo.py b/plotly/validators/isosurface/_hoverinfo.py index 8719d50190..3557ee3699 100644 --- a/plotly/validators/isosurface/_hoverinfo.py +++ b/plotly/validators/isosurface/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="isosurface", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/isosurface/_hoverinfosrc.py b/plotly/validators/isosurface/_hoverinfosrc.py index 0a9d4e8586..26f39f3a38 100644 --- a/plotly/validators/isosurface/_hoverinfosrc.py +++ b/plotly/validators/isosurface/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="isosurface", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_hoverlabel.py b/plotly/validators/isosurface/_hoverlabel.py index c989c094de..f27be795d8 100644 --- a/plotly/validators/isosurface/_hoverlabel.py +++ b/plotly/validators/isosurface/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="isosurface", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_hovertemplate.py b/plotly/validators/isosurface/_hovertemplate.py index a2c86e5797..5068e7a3b4 100644 --- a/plotly/validators/isosurface/_hovertemplate.py +++ b/plotly/validators/isosurface/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="isosurface", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/isosurface/_hovertemplatesrc.py b/plotly/validators/isosurface/_hovertemplatesrc.py index b6ab21f95c..23e5f8892d 100644 --- a/plotly/validators/isosurface/_hovertemplatesrc.py +++ b/plotly/validators/isosurface/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="isosurface", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_hovertext.py b/plotly/validators/isosurface/_hovertext.py index 5cc216bb61..c070877cda 100644 --- a/plotly/validators/isosurface/_hovertext.py +++ b/plotly/validators/isosurface/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="isosurface", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/isosurface/_hovertextsrc.py b/plotly/validators/isosurface/_hovertextsrc.py index a224087a63..dab4fb36dc 100644 --- a/plotly/validators/isosurface/_hovertextsrc.py +++ b/plotly/validators/isosurface/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="isosurface", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_ids.py b/plotly/validators/isosurface/_ids.py index de1ddf41f0..70f332778c 100644 --- a/plotly/validators/isosurface/_ids.py +++ b/plotly/validators/isosurface/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="isosurface", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_idssrc.py b/plotly/validators/isosurface/_idssrc.py index 52e7dfb43b..194429b98d 100644 --- a/plotly/validators/isosurface/_idssrc.py +++ b/plotly/validators/isosurface/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="isosurface", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_isomax.py b/plotly/validators/isosurface/_isomax.py index 7dee7a3ea7..8a95085477 100644 --- a/plotly/validators/isosurface/_isomax.py +++ b/plotly/validators/isosurface/_isomax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsomaxValidator(_plotly_utils.basevalidators.NumberValidator): +class IsomaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="isomax", parent_name="isosurface", **kwargs): - super(IsomaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_isomin.py b/plotly/validators/isosurface/_isomin.py index bba82c1a75..b5573bb945 100644 --- a/plotly/validators/isosurface/_isomin.py +++ b/plotly/validators/isosurface/_isomin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsominValidator(_plotly_utils.basevalidators.NumberValidator): +class IsominValidator(_bv.NumberValidator): def __init__(self, plotly_name="isomin", parent_name="isosurface", **kwargs): - super(IsominValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_legend.py b/plotly/validators/isosurface/_legend.py index 69eaf600cc..c3f935f52d 100644 --- a/plotly/validators/isosurface/_legend.py +++ b/plotly/validators/isosurface/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="isosurface", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/isosurface/_legendgroup.py b/plotly/validators/isosurface/_legendgroup.py index 8704eb5551..67f49d714f 100644 --- a/plotly/validators/isosurface/_legendgroup.py +++ b/plotly/validators/isosurface/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="isosurface", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/isosurface/_legendgrouptitle.py b/plotly/validators/isosurface/_legendgrouptitle.py index a9c333a6ce..944deded82 100644 --- a/plotly/validators/isosurface/_legendgrouptitle.py +++ b/plotly/validators/isosurface/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="isosurface", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_legendrank.py b/plotly/validators/isosurface/_legendrank.py index d5e2b93fba..e20859b4cd 100644 --- a/plotly/validators/isosurface/_legendrank.py +++ b/plotly/validators/isosurface/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="isosurface", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/isosurface/_legendwidth.py b/plotly/validators/isosurface/_legendwidth.py index 75a5ef3610..ccb8c439d5 100644 --- a/plotly/validators/isosurface/_legendwidth.py +++ b/plotly/validators/isosurface/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="isosurface", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/_lighting.py b/plotly/validators/isosurface/_lighting.py index eae8c8af9c..c9bf12f575 100644 --- a/plotly/validators/isosurface/_lighting.py +++ b/plotly/validators/isosurface/_lighting.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lighting", parent_name="isosurface", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lighting"), data_docs=kwargs.pop( "data_docs", """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_lightposition.py b/plotly/validators/isosurface/_lightposition.py index 137f73e995..4e410ccc61 100644 --- a/plotly/validators/isosurface/_lightposition.py +++ b/plotly/validators/isosurface/_lightposition.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightpositionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="isosurface", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lightposition"), data_docs=kwargs.pop( "data_docs", """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_meta.py b/plotly/validators/isosurface/_meta.py index 61cd93168b..5f680ae4c6 100644 --- a/plotly/validators/isosurface/_meta.py +++ b/plotly/validators/isosurface/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="isosurface", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/isosurface/_metasrc.py b/plotly/validators/isosurface/_metasrc.py index efd28bc88e..f475be4432 100644 --- a/plotly/validators/isosurface/_metasrc.py +++ b/plotly/validators/isosurface/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="isosurface", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_name.py b/plotly/validators/isosurface/_name.py index fe4b74f234..dc7d883f00 100644 --- a/plotly/validators/isosurface/_name.py +++ b/plotly/validators/isosurface/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="isosurface", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/isosurface/_opacity.py b/plotly/validators/isosurface/_opacity.py index a3357c3ab9..7a6e2dfd8a 100644 --- a/plotly/validators/isosurface/_opacity.py +++ b/plotly/validators/isosurface/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="isosurface", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/_reversescale.py b/plotly/validators/isosurface/_reversescale.py index ba4e9f4778..59dd0e44fb 100644 --- a/plotly/validators/isosurface/_reversescale.py +++ b/plotly/validators/isosurface/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="isosurface", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_scene.py b/plotly/validators/isosurface/_scene.py index 557a93c119..b3453e12e5 100644 --- a/plotly/validators/isosurface/_scene.py +++ b/plotly/validators/isosurface/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="isosurface", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/isosurface/_showlegend.py b/plotly/validators/isosurface/_showlegend.py index 732a6aebde..74e4014d52 100644 --- a/plotly/validators/isosurface/_showlegend.py +++ b/plotly/validators/isosurface/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="isosurface", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_showscale.py b/plotly/validators/isosurface/_showscale.py index 0765d54743..16cd8179c4 100644 --- a/plotly/validators/isosurface/_showscale.py +++ b/plotly/validators/isosurface/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="isosurface", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_slices.py b/plotly/validators/isosurface/_slices.py index 3c025551c7..813eba0ad0 100644 --- a/plotly/validators/isosurface/_slices.py +++ b/plotly/validators/isosurface/_slices.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SlicesValidator(_plotly_utils.basevalidators.CompoundValidator): +class SlicesValidator(_bv.CompoundValidator): def __init__(self, plotly_name="slices", parent_name="isosurface", **kwargs): - super(SlicesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Slices"), data_docs=kwargs.pop( "data_docs", """ - x - :class:`plotly.graph_objects.isosurface.slices. - X` instance or dict with compatible properties - y - :class:`plotly.graph_objects.isosurface.slices. - Y` instance or dict with compatible properties - z - :class:`plotly.graph_objects.isosurface.slices. - Z` instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/isosurface/_spaceframe.py b/plotly/validators/isosurface/_spaceframe.py index c2b61256cf..6b9bfcfb8c 100644 --- a/plotly/validators/isosurface/_spaceframe.py +++ b/plotly/validators/isosurface/_spaceframe.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpaceframeValidator(_plotly_utils.basevalidators.CompoundValidator): +class SpaceframeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="spaceframe", parent_name="isosurface", **kwargs): - super(SpaceframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Spaceframe"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 0.15 - meaning that only 15% of the area of every - faces of tetras would be shaded. Applying a - greater `fill` ratio would allow the creation - of stronger elements or could be sued to have - entirely closed areas (in case of using 1). - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_stream.py b/plotly/validators/isosurface/_stream.py index 1bfc1cc59b..6409e75459 100644 --- a/plotly/validators/isosurface/_stream.py +++ b/plotly/validators/isosurface/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="isosurface", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_surface.py b/plotly/validators/isosurface/_surface.py index 08d062c60f..e1f3fe4c02 100644 --- a/plotly/validators/isosurface/_surface.py +++ b/plotly/validators/isosurface/_surface.py @@ -1,41 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): +class SurfaceValidator(_bv.CompoundValidator): def __init__(self, plotly_name="surface", parent_name="isosurface", **kwargs): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Surface"), data_docs=kwargs.pop( "data_docs", """ - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. """, ), **kwargs, diff --git a/plotly/validators/isosurface/_text.py b/plotly/validators/isosurface/_text.py index f73fb65f23..7f840e8075 100644 --- a/plotly/validators/isosurface/_text.py +++ b/plotly/validators/isosurface/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="isosurface", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/isosurface/_textsrc.py b/plotly/validators/isosurface/_textsrc.py index d0325563a3..1dd528c20c 100644 --- a/plotly/validators/isosurface/_textsrc.py +++ b/plotly/validators/isosurface/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="isosurface", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_uid.py b/plotly/validators/isosurface/_uid.py index 4d658b251f..fbe5b7f336 100644 --- a/plotly/validators/isosurface/_uid.py +++ b/plotly/validators/isosurface/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="isosurface", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/isosurface/_uirevision.py b/plotly/validators/isosurface/_uirevision.py index f14eeb8d5e..1e3989359b 100644 --- a/plotly/validators/isosurface/_uirevision.py +++ b/plotly/validators/isosurface/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="isosurface", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_value.py b/plotly/validators/isosurface/_value.py index 29cf0c762c..441ef66f03 100644 --- a/plotly/validators/isosurface/_value.py +++ b/plotly/validators/isosurface/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValueValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="value", parent_name="isosurface", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/isosurface/_valuehoverformat.py b/plotly/validators/isosurface/_valuehoverformat.py index 40fa68323e..04f8e1fec9 100644 --- a/plotly/validators/isosurface/_valuehoverformat.py +++ b/plotly/validators/isosurface/_valuehoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuehoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ValuehoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="valuehoverformat", parent_name="isosurface", **kwargs ): - super(ValuehoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_valuesrc.py b/plotly/validators/isosurface/_valuesrc.py index bd7d644326..49272f14b9 100644 --- a/plotly/validators/isosurface/_valuesrc.py +++ b/plotly/validators/isosurface/_valuesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuesrc", parent_name="isosurface", **kwargs): - super(ValuesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_visible.py b/plotly/validators/isosurface/_visible.py index ccd55ca21c..a7259c7a65 100644 --- a/plotly/validators/isosurface/_visible.py +++ b/plotly/validators/isosurface/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="isosurface", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/isosurface/_x.py b/plotly/validators/isosurface/_x.py index 66a5bfb1e7..389f147b36 100644 --- a/plotly/validators/isosurface/_x.py +++ b/plotly/validators/isosurface/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="isosurface", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/isosurface/_xhoverformat.py b/plotly/validators/isosurface/_xhoverformat.py index e9c582a63b..1927f1d585 100644 --- a/plotly/validators/isosurface/_xhoverformat.py +++ b/plotly/validators/isosurface/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="isosurface", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_xsrc.py b/plotly/validators/isosurface/_xsrc.py index 5819e093df..044ffc90b3 100644 --- a/plotly/validators/isosurface/_xsrc.py +++ b/plotly/validators/isosurface/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="isosurface", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_y.py b/plotly/validators/isosurface/_y.py index fe6da9d205..482d0d16b3 100644 --- a/plotly/validators/isosurface/_y.py +++ b/plotly/validators/isosurface/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="isosurface", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/isosurface/_yhoverformat.py b/plotly/validators/isosurface/_yhoverformat.py index fbaddb3c55..74388bfebc 100644 --- a/plotly/validators/isosurface/_yhoverformat.py +++ b/plotly/validators/isosurface/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="isosurface", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_ysrc.py b/plotly/validators/isosurface/_ysrc.py index a5c397ff24..d6e35b547d 100644 --- a/plotly/validators/isosurface/_ysrc.py +++ b/plotly/validators/isosurface/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="isosurface", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/_z.py b/plotly/validators/isosurface/_z.py index 4ce511af59..55f6999b5a 100644 --- a/plotly/validators/isosurface/_z.py +++ b/plotly/validators/isosurface/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="isosurface", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/isosurface/_zhoverformat.py b/plotly/validators/isosurface/_zhoverformat.py index df244a1628..90b11e14b5 100644 --- a/plotly/validators/isosurface/_zhoverformat.py +++ b/plotly/validators/isosurface/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="isosurface", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/_zsrc.py b/plotly/validators/isosurface/_zsrc.py index 67371e5e03..c9eba73ee1 100644 --- a/plotly/validators/isosurface/_zsrc.py +++ b/plotly/validators/isosurface/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="isosurface", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/caps/__init__.py b/plotly/validators/isosurface/caps/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/isosurface/caps/__init__.py +++ b/plotly/validators/isosurface/caps/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/isosurface/caps/_x.py b/plotly/validators/isosurface/caps/_x.py index 8198fdb6bd..9851351533 100644 --- a/plotly/validators/isosurface/caps/_x.py +++ b/plotly/validators/isosurface/caps/_x.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.CompoundValidator): +class XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="x", parent_name="isosurface.caps", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "X"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. """, ), **kwargs, diff --git a/plotly/validators/isosurface/caps/_y.py b/plotly/validators/isosurface/caps/_y.py index d7170d8a81..e9d6b97023 100644 --- a/plotly/validators/isosurface/caps/_y.py +++ b/plotly/validators/isosurface/caps/_y.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.CompoundValidator): +class YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="y", parent_name="isosurface.caps", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. """, ), **kwargs, diff --git a/plotly/validators/isosurface/caps/_z.py b/plotly/validators/isosurface/caps/_z.py index c8686ce94c..da6f73efb5 100644 --- a/plotly/validators/isosurface/caps/_z.py +++ b/plotly/validators/isosurface/caps/_z.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="z", parent_name="isosurface.caps", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Z"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. """, ), **kwargs, diff --git a/plotly/validators/isosurface/caps/x/__init__.py b/plotly/validators/isosurface/caps/x/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/isosurface/caps/x/__init__.py +++ b/plotly/validators/isosurface/caps/x/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/isosurface/caps/x/_fill.py b/plotly/validators/isosurface/caps/x/_fill.py index 781a4f0295..c59993bd95 100644 --- a/plotly/validators/isosurface/caps/x/_fill.py +++ b/plotly/validators/isosurface/caps/x/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.caps.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/caps/x/_show.py b/plotly/validators/isosurface/caps/x/_show.py index 805d9f701a..dd11ee61dc 100644 --- a/plotly/validators/isosurface/caps/x/_show.py +++ b/plotly/validators/isosurface/caps/x/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.caps.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/caps/y/__init__.py b/plotly/validators/isosurface/caps/y/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/isosurface/caps/y/__init__.py +++ b/plotly/validators/isosurface/caps/y/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/isosurface/caps/y/_fill.py b/plotly/validators/isosurface/caps/y/_fill.py index de6bd3d0ed..a9224a5c15 100644 --- a/plotly/validators/isosurface/caps/y/_fill.py +++ b/plotly/validators/isosurface/caps/y/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.caps.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/caps/y/_show.py b/plotly/validators/isosurface/caps/y/_show.py index 915e9c0dd5..8dbc69e8d8 100644 --- a/plotly/validators/isosurface/caps/y/_show.py +++ b/plotly/validators/isosurface/caps/y/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.caps.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/caps/z/__init__.py b/plotly/validators/isosurface/caps/z/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/isosurface/caps/z/__init__.py +++ b/plotly/validators/isosurface/caps/z/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/isosurface/caps/z/_fill.py b/plotly/validators/isosurface/caps/z/_fill.py index fc27fbf0cd..462007f140 100644 --- a/plotly/validators/isosurface/caps/z/_fill.py +++ b/plotly/validators/isosurface/caps/z/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.caps.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/caps/z/_show.py b/plotly/validators/isosurface/caps/z/_show.py index a11bad0749..8eebf79e76 100644 --- a/plotly/validators/isosurface/caps/z/_show.py +++ b/plotly/validators/isosurface/caps/z/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.caps.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/__init__.py b/plotly/validators/isosurface/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/isosurface/colorbar/__init__.py +++ b/plotly/validators/isosurface/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/isosurface/colorbar/_bgcolor.py b/plotly/validators/isosurface/colorbar/_bgcolor.py index 12839101b7..856748629d 100644 --- a/plotly/validators/isosurface/colorbar/_bgcolor.py +++ b/plotly/validators/isosurface/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="isosurface.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_bordercolor.py b/plotly/validators/isosurface/colorbar/_bordercolor.py index ee0eb2c64f..b71943e5a2 100644 --- a/plotly/validators/isosurface/colorbar/_bordercolor.py +++ b/plotly/validators/isosurface/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="isosurface.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_borderwidth.py b/plotly/validators/isosurface/colorbar/_borderwidth.py index ff13aa4c8e..cc4f7a79a4 100644 --- a/plotly/validators/isosurface/colorbar/_borderwidth.py +++ b/plotly/validators/isosurface/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="isosurface.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_dtick.py b/plotly/validators/isosurface/colorbar/_dtick.py index fe1ddcc448..e5c64d6b58 100644 --- a/plotly/validators/isosurface/colorbar/_dtick.py +++ b/plotly/validators/isosurface/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="isosurface.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_exponentformat.py b/plotly/validators/isosurface/colorbar/_exponentformat.py index ade598e008..95ae7e72c5 100644 --- a/plotly/validators/isosurface/colorbar/_exponentformat.py +++ b/plotly/validators/isosurface/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="isosurface.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_labelalias.py b/plotly/validators/isosurface/colorbar/_labelalias.py index d46f34db7f..71cd66777f 100644 --- a/plotly/validators/isosurface/colorbar/_labelalias.py +++ b/plotly/validators/isosurface/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="isosurface.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_len.py b/plotly/validators/isosurface/colorbar/_len.py index 490ddd9b80..6aef7e635f 100644 --- a/plotly/validators/isosurface/colorbar/_len.py +++ b/plotly/validators/isosurface/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="isosurface.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_lenmode.py b/plotly/validators/isosurface/colorbar/_lenmode.py index d730027927..23d10b0313 100644 --- a/plotly/validators/isosurface/colorbar/_lenmode.py +++ b/plotly/validators/isosurface/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="isosurface.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_minexponent.py b/plotly/validators/isosurface/colorbar/_minexponent.py index 6631cbd2f8..01d1b59737 100644 --- a/plotly/validators/isosurface/colorbar/_minexponent.py +++ b/plotly/validators/isosurface/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="isosurface.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_nticks.py b/plotly/validators/isosurface/colorbar/_nticks.py index 064c7398c4..e08b51d6ab 100644 --- a/plotly/validators/isosurface/colorbar/_nticks.py +++ b/plotly/validators/isosurface/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="isosurface.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_orientation.py b/plotly/validators/isosurface/colorbar/_orientation.py index 7ac5b2a5c7..5757c5a404 100644 --- a/plotly/validators/isosurface/colorbar/_orientation.py +++ b/plotly/validators/isosurface/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="isosurface.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_outlinecolor.py b/plotly/validators/isosurface/colorbar/_outlinecolor.py index ed8afb3d1e..056d94dc4e 100644 --- a/plotly/validators/isosurface/colorbar/_outlinecolor.py +++ b/plotly/validators/isosurface/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="isosurface.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_outlinewidth.py b/plotly/validators/isosurface/colorbar/_outlinewidth.py index 9c0f9d2b4e..701fbf8b78 100644 --- a/plotly/validators/isosurface/colorbar/_outlinewidth.py +++ b/plotly/validators/isosurface/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="isosurface.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_separatethousands.py b/plotly/validators/isosurface/colorbar/_separatethousands.py index 678b166d5a..72edc5849f 100644 --- a/plotly/validators/isosurface/colorbar/_separatethousands.py +++ b/plotly/validators/isosurface/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="isosurface.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_showexponent.py b/plotly/validators/isosurface/colorbar/_showexponent.py index be2c309525..a2cfb925c8 100644 --- a/plotly/validators/isosurface/colorbar/_showexponent.py +++ b/plotly/validators/isosurface/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="isosurface.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_showticklabels.py b/plotly/validators/isosurface/colorbar/_showticklabels.py index 925c960bd6..285363b4bf 100644 --- a/plotly/validators/isosurface/colorbar/_showticklabels.py +++ b/plotly/validators/isosurface/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="isosurface.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_showtickprefix.py b/plotly/validators/isosurface/colorbar/_showtickprefix.py index 6cc99117a4..b2c8a455c9 100644 --- a/plotly/validators/isosurface/colorbar/_showtickprefix.py +++ b/plotly/validators/isosurface/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="isosurface.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_showticksuffix.py b/plotly/validators/isosurface/colorbar/_showticksuffix.py index 7109e451d7..4f150df159 100644 --- a/plotly/validators/isosurface/colorbar/_showticksuffix.py +++ b/plotly/validators/isosurface/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="isosurface.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_thickness.py b/plotly/validators/isosurface/colorbar/_thickness.py index 6ba0e6ade7..3441d09031 100644 --- a/plotly/validators/isosurface/colorbar/_thickness.py +++ b/plotly/validators/isosurface/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="isosurface.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_thicknessmode.py b/plotly/validators/isosurface/colorbar/_thicknessmode.py index 4bc32e792a..dc05946e8e 100644 --- a/plotly/validators/isosurface/colorbar/_thicknessmode.py +++ b/plotly/validators/isosurface/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="isosurface.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_tick0.py b/plotly/validators/isosurface/colorbar/_tick0.py index 4a70dc1c2d..ae7aff88f1 100644 --- a/plotly/validators/isosurface/colorbar/_tick0.py +++ b/plotly/validators/isosurface/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="isosurface.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_tickangle.py b/plotly/validators/isosurface/colorbar/_tickangle.py index fe94f6a460..2170e730ee 100644 --- a/plotly/validators/isosurface/colorbar/_tickangle.py +++ b/plotly/validators/isosurface/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="isosurface.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_tickcolor.py b/plotly/validators/isosurface/colorbar/_tickcolor.py index c33938164a..6a32643e8b 100644 --- a/plotly/validators/isosurface/colorbar/_tickcolor.py +++ b/plotly/validators/isosurface/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="isosurface.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_tickfont.py b/plotly/validators/isosurface/colorbar/_tickfont.py index d91d332bcb..ee23f79cd7 100644 --- a/plotly/validators/isosurface/colorbar/_tickfont.py +++ b/plotly/validators/isosurface/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="isosurface.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_tickformat.py b/plotly/validators/isosurface/colorbar/_tickformat.py index 00544818ac..45d8133565 100644 --- a/plotly/validators/isosurface/colorbar/_tickformat.py +++ b/plotly/validators/isosurface/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="isosurface.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py b/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py index c71e74ec3c..a91a84e237 100644 --- a/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/isosurface/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="isosurface.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/isosurface/colorbar/_tickformatstops.py b/plotly/validators/isosurface/colorbar/_tickformatstops.py index 3e762bafd3..9572e3e18f 100644 --- a/plotly/validators/isosurface/colorbar/_tickformatstops.py +++ b/plotly/validators/isosurface/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="isosurface.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_ticklabeloverflow.py b/plotly/validators/isosurface/colorbar/_ticklabeloverflow.py index 1842e01a13..4f8455e897 100644 --- a/plotly/validators/isosurface/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/isosurface/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="isosurface.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_ticklabelposition.py b/plotly/validators/isosurface/colorbar/_ticklabelposition.py index fc066d230a..04b05711f5 100644 --- a/plotly/validators/isosurface/colorbar/_ticklabelposition.py +++ b/plotly/validators/isosurface/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="isosurface.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/isosurface/colorbar/_ticklabelstep.py b/plotly/validators/isosurface/colorbar/_ticklabelstep.py index 75c9c5a954..4f16da7136 100644 --- a/plotly/validators/isosurface/colorbar/_ticklabelstep.py +++ b/plotly/validators/isosurface/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="isosurface.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_ticklen.py b/plotly/validators/isosurface/colorbar/_ticklen.py index 2184e2a050..e0a86d9e0d 100644 --- a/plotly/validators/isosurface/colorbar/_ticklen.py +++ b/plotly/validators/isosurface/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="isosurface.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_tickmode.py b/plotly/validators/isosurface/colorbar/_tickmode.py index 69b9d4e3a8..9ec6a19c24 100644 --- a/plotly/validators/isosurface/colorbar/_tickmode.py +++ b/plotly/validators/isosurface/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="isosurface.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/isosurface/colorbar/_tickprefix.py b/plotly/validators/isosurface/colorbar/_tickprefix.py index f9d7379bf5..b2e439b367 100644 --- a/plotly/validators/isosurface/colorbar/_tickprefix.py +++ b/plotly/validators/isosurface/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="isosurface.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_ticks.py b/plotly/validators/isosurface/colorbar/_ticks.py index 16ecb76fa5..f4acacd4d2 100644 --- a/plotly/validators/isosurface/colorbar/_ticks.py +++ b/plotly/validators/isosurface/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="isosurface.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_ticksuffix.py b/plotly/validators/isosurface/colorbar/_ticksuffix.py index 4554864e8a..67b807c649 100644 --- a/plotly/validators/isosurface/colorbar/_ticksuffix.py +++ b/plotly/validators/isosurface/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="isosurface.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_ticktext.py b/plotly/validators/isosurface/colorbar/_ticktext.py index 250dbeab45..dbcab5493d 100644 --- a/plotly/validators/isosurface/colorbar/_ticktext.py +++ b/plotly/validators/isosurface/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="isosurface.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_ticktextsrc.py b/plotly/validators/isosurface/colorbar/_ticktextsrc.py index ce0c8497fa..ebcc713f04 100644 --- a/plotly/validators/isosurface/colorbar/_ticktextsrc.py +++ b/plotly/validators/isosurface/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="isosurface.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_tickvals.py b/plotly/validators/isosurface/colorbar/_tickvals.py index a6a08c6e96..40d2a06765 100644 --- a/plotly/validators/isosurface/colorbar/_tickvals.py +++ b/plotly/validators/isosurface/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="isosurface.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_tickvalssrc.py b/plotly/validators/isosurface/colorbar/_tickvalssrc.py index bb2e3de192..ccd412a6f7 100644 --- a/plotly/validators/isosurface/colorbar/_tickvalssrc.py +++ b/plotly/validators/isosurface/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="isosurface.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_tickwidth.py b/plotly/validators/isosurface/colorbar/_tickwidth.py index 47aa8841b1..0860d3f942 100644 --- a/plotly/validators/isosurface/colorbar/_tickwidth.py +++ b/plotly/validators/isosurface/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="isosurface.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_title.py b/plotly/validators/isosurface/colorbar/_title.py index 5bfe607ada..f73fabe036 100644 --- a/plotly/validators/isosurface/colorbar/_title.py +++ b/plotly/validators/isosurface/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="isosurface.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_x.py b/plotly/validators/isosurface/colorbar/_x.py index 8b179ab3dd..5cb996747f 100644 --- a/plotly/validators/isosurface/colorbar/_x.py +++ b/plotly/validators/isosurface/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="isosurface.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_xanchor.py b/plotly/validators/isosurface/colorbar/_xanchor.py index aa12efc655..02b29182b5 100644 --- a/plotly/validators/isosurface/colorbar/_xanchor.py +++ b/plotly/validators/isosurface/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="isosurface.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_xpad.py b/plotly/validators/isosurface/colorbar/_xpad.py index d658784b20..67c61fa50c 100644 --- a/plotly/validators/isosurface/colorbar/_xpad.py +++ b/plotly/validators/isosurface/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="isosurface.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_xref.py b/plotly/validators/isosurface/colorbar/_xref.py index 50a8039549..b6cdda067c 100644 --- a/plotly/validators/isosurface/colorbar/_xref.py +++ b/plotly/validators/isosurface/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="isosurface.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_y.py b/plotly/validators/isosurface/colorbar/_y.py index 89917799b8..b20601fc58 100644 --- a/plotly/validators/isosurface/colorbar/_y.py +++ b/plotly/validators/isosurface/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="isosurface.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/_yanchor.py b/plotly/validators/isosurface/colorbar/_yanchor.py index 1f6e9f4ed2..45cf74d8f4 100644 --- a/plotly/validators/isosurface/colorbar/_yanchor.py +++ b/plotly/validators/isosurface/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="isosurface.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_ypad.py b/plotly/validators/isosurface/colorbar/_ypad.py index e16a5e1716..7c1b3343d2 100644 --- a/plotly/validators/isosurface/colorbar/_ypad.py +++ b/plotly/validators/isosurface/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="isosurface.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/_yref.py b/plotly/validators/isosurface/colorbar/_yref.py index c3ac45bcea..4291a28fe9 100644 --- a/plotly/validators/isosurface/colorbar/_yref.py +++ b/plotly/validators/isosurface/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="isosurface.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/tickfont/__init__.py b/plotly/validators/isosurface/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/__init__.py +++ b/plotly/validators/isosurface/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/isosurface/colorbar/tickfont/_color.py b/plotly/validators/isosurface/colorbar/tickfont/_color.py index 8d13e02e49..93f6ba422d 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_color.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="isosurface.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/tickfont/_family.py b/plotly/validators/isosurface/colorbar/tickfont/_family.py index 079b523e2d..babec53f07 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_family.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="isosurface.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/isosurface/colorbar/tickfont/_lineposition.py b/plotly/validators/isosurface/colorbar/tickfont/_lineposition.py index 97cdbfce00..5ead1f4022 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="isosurface.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/isosurface/colorbar/tickfont/_shadow.py b/plotly/validators/isosurface/colorbar/tickfont/_shadow.py index 915ea8f303..05cb1391f2 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_shadow.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="isosurface.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/tickfont/_size.py b/plotly/validators/isosurface/colorbar/tickfont/_size.py index 86a99b3264..91afc8d2fd 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_size.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="isosurface.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/tickfont/_style.py b/plotly/validators/isosurface/colorbar/tickfont/_style.py index d9bc71c583..530bf5bd56 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_style.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="isosurface.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/tickfont/_textcase.py b/plotly/validators/isosurface/colorbar/tickfont/_textcase.py index 320d1399b7..8e6835d1c3 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_textcase.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="isosurface.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/tickfont/_variant.py b/plotly/validators/isosurface/colorbar/tickfont/_variant.py index 8a8b7474b6..a21897dfff 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_variant.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="isosurface.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/isosurface/colorbar/tickfont/_weight.py b/plotly/validators/isosurface/colorbar/tickfont/_weight.py index a34034b85b..ceb3ee6eb9 100644 --- a/plotly/validators/isosurface/colorbar/tickfont/_weight.py +++ b/plotly/validators/isosurface/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="isosurface.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py b/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/isosurface/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py index 34d317c972..f7e4aa45a8 100644 --- a/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/isosurface/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="isosurface.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py b/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py index 3c2767c136..d0dd1de37a 100644 --- a/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/isosurface/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="isosurface.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/tickformatstop/_name.py b/plotly/validators/isosurface/colorbar/tickformatstop/_name.py index 7cb1a1ade4..e9856b9d7f 100644 --- a/plotly/validators/isosurface/colorbar/tickformatstop/_name.py +++ b/plotly/validators/isosurface/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="isosurface.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py index 7a74cc7853..1659c4defa 100644 --- a/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/isosurface/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="isosurface.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/tickformatstop/_value.py b/plotly/validators/isosurface/colorbar/tickformatstop/_value.py index 222f89d5ec..5cc8c7d47f 100644 --- a/plotly/validators/isosurface/colorbar/tickformatstop/_value.py +++ b/plotly/validators/isosurface/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="isosurface.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/title/__init__.py b/plotly/validators/isosurface/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/isosurface/colorbar/title/__init__.py +++ b/plotly/validators/isosurface/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/isosurface/colorbar/title/_font.py b/plotly/validators/isosurface/colorbar/title/_font.py index 759f740178..0c007be4a0 100644 --- a/plotly/validators/isosurface/colorbar/title/_font.py +++ b/plotly/validators/isosurface/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="isosurface.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/title/_side.py b/plotly/validators/isosurface/colorbar/title/_side.py index 8cfcc05f77..ca9e13071a 100644 --- a/plotly/validators/isosurface/colorbar/title/_side.py +++ b/plotly/validators/isosurface/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="isosurface.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/title/_text.py b/plotly/validators/isosurface/colorbar/title/_text.py index b5e31c825d..e58bfb0791 100644 --- a/plotly/validators/isosurface/colorbar/title/_text.py +++ b/plotly/validators/isosurface/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="isosurface.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/title/font/__init__.py b/plotly/validators/isosurface/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/isosurface/colorbar/title/font/__init__.py +++ b/plotly/validators/isosurface/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/isosurface/colorbar/title/font/_color.py b/plotly/validators/isosurface/colorbar/title/font/_color.py index b8e0bdcbbe..0e7f7029c6 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_color.py +++ b/plotly/validators/isosurface/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/title/font/_family.py b/plotly/validators/isosurface/colorbar/title/font/_family.py index bcd91e31ce..c0bf454831 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_family.py +++ b/plotly/validators/isosurface/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/isosurface/colorbar/title/font/_lineposition.py b/plotly/validators/isosurface/colorbar/title/font/_lineposition.py index 5c7f0b0ae0..09e90c645b 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_lineposition.py +++ b/plotly/validators/isosurface/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/isosurface/colorbar/title/font/_shadow.py b/plotly/validators/isosurface/colorbar/title/font/_shadow.py index aec6dbfa5d..3bf0461f4c 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_shadow.py +++ b/plotly/validators/isosurface/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/colorbar/title/font/_size.py b/plotly/validators/isosurface/colorbar/title/font/_size.py index 907a7330a8..360a1c3ca4 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_size.py +++ b/plotly/validators/isosurface/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="isosurface.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/title/font/_style.py b/plotly/validators/isosurface/colorbar/title/font/_style.py index cb07396553..66b0d356e9 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_style.py +++ b/plotly/validators/isosurface/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/title/font/_textcase.py b/plotly/validators/isosurface/colorbar/title/font/_textcase.py index 8390b016ef..c1aa70a8de 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_textcase.py +++ b/plotly/validators/isosurface/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/isosurface/colorbar/title/font/_variant.py b/plotly/validators/isosurface/colorbar/title/font/_variant.py index 145beb6c09..ea289e6808 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_variant.py +++ b/plotly/validators/isosurface/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/isosurface/colorbar/title/font/_weight.py b/plotly/validators/isosurface/colorbar/title/font/_weight.py index be31c72fdf..886d7a4f47 100644 --- a/plotly/validators/isosurface/colorbar/title/font/_weight.py +++ b/plotly/validators/isosurface/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="isosurface.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/isosurface/contour/__init__.py b/plotly/validators/isosurface/contour/__init__.py index 8d51b1d4c0..1a1cc3031d 100644 --- a/plotly/validators/isosurface/contour/__init__.py +++ b/plotly/validators/isosurface/contour/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._show import ShowValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/isosurface/contour/_color.py b/plotly/validators/isosurface/contour/_color.py index 3f9a0d2b02..1865f27e28 100644 --- a/plotly/validators/isosurface/contour/_color.py +++ b/plotly/validators/isosurface/contour/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="isosurface.contour", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/contour/_show.py b/plotly/validators/isosurface/contour/_show.py index 83f5f03238..d45c697303 100644 --- a/plotly/validators/isosurface/contour/_show.py +++ b/plotly/validators/isosurface/contour/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.contour", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/contour/_width.py b/plotly/validators/isosurface/contour/_width.py index 25fb355393..17e003ada8 100644 --- a/plotly/validators/isosurface/contour/_width.py +++ b/plotly/validators/isosurface/contour/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="isosurface.contour", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/isosurface/hoverlabel/__init__.py b/plotly/validators/isosurface/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/isosurface/hoverlabel/__init__.py +++ b/plotly/validators/isosurface/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/isosurface/hoverlabel/_align.py b/plotly/validators/isosurface/hoverlabel/_align.py index f0a83aea24..9de845abfc 100644 --- a/plotly/validators/isosurface/hoverlabel/_align.py +++ b/plotly/validators/isosurface/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="isosurface.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/isosurface/hoverlabel/_alignsrc.py b/plotly/validators/isosurface/hoverlabel/_alignsrc.py index 0526ae5812..0418763c9b 100644 --- a/plotly/validators/isosurface/hoverlabel/_alignsrc.py +++ b/plotly/validators/isosurface/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="isosurface.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/_bgcolor.py b/plotly/validators/isosurface/hoverlabel/_bgcolor.py index 8b14404b70..664405cf0c 100644 --- a/plotly/validators/isosurface/hoverlabel/_bgcolor.py +++ b/plotly/validators/isosurface/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="isosurface.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py b/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py index 7e25e8204e..132158411c 100644 --- a/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/isosurface/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="isosurface.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/_bordercolor.py b/plotly/validators/isosurface/hoverlabel/_bordercolor.py index d4ae2f3a29..75cd59daca 100644 --- a/plotly/validators/isosurface/hoverlabel/_bordercolor.py +++ b/plotly/validators/isosurface/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="isosurface.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py b/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py index e20a1ad263..efbfd37946 100644 --- a/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/isosurface/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="isosurface.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/_font.py b/plotly/validators/isosurface/hoverlabel/_font.py index 78c1669f43..ffcf1c6279 100644 --- a/plotly/validators/isosurface/hoverlabel/_font.py +++ b/plotly/validators/isosurface/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="isosurface.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/isosurface/hoverlabel/_namelength.py b/plotly/validators/isosurface/hoverlabel/_namelength.py index 323275ac2c..0b9ec7333b 100644 --- a/plotly/validators/isosurface/hoverlabel/_namelength.py +++ b/plotly/validators/isosurface/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="isosurface.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py b/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py index 7c1b841e66..c4a9be45aa 100644 --- a/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/isosurface/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="isosurface.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/__init__.py b/plotly/validators/isosurface/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/isosurface/hoverlabel/font/__init__.py +++ b/plotly/validators/isosurface/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/isosurface/hoverlabel/font/_color.py b/plotly/validators/isosurface/hoverlabel/font/_color.py index 13c97e43f6..50987feb38 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_color.py +++ b/plotly/validators/isosurface/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py b/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py index 22e383016e..a1c3f424c0 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_family.py b/plotly/validators/isosurface/hoverlabel/font/_family.py index 92b86e472d..006b059c83 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_family.py +++ b/plotly/validators/isosurface/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/isosurface/hoverlabel/font/_familysrc.py b/plotly/validators/isosurface/hoverlabel/font/_familysrc.py index 60d2a9da02..b315aaa1ae 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_familysrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_lineposition.py b/plotly/validators/isosurface/hoverlabel/font/_lineposition.py index 12b9a00b1b..9f26e3e750 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_lineposition.py +++ b/plotly/validators/isosurface/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/isosurface/hoverlabel/font/_linepositionsrc.py b/plotly/validators/isosurface/hoverlabel/font/_linepositionsrc.py index 05cb314faf..368b730eaf 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_shadow.py b/plotly/validators/isosurface/hoverlabel/font/_shadow.py index 5b58bff5bf..89851643b7 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_shadow.py +++ b/plotly/validators/isosurface/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/isosurface/hoverlabel/font/_shadowsrc.py b/plotly/validators/isosurface/hoverlabel/font/_shadowsrc.py index ea5c1fb46f..02d4908823 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_size.py b/plotly/validators/isosurface/hoverlabel/font/_size.py index 230cfcb294..c1981ce1c5 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_size.py +++ b/plotly/validators/isosurface/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py b/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py index 8243bf3848..726348e293 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_style.py b/plotly/validators/isosurface/hoverlabel/font/_style.py index d07435309e..969f1dfb75 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_style.py +++ b/plotly/validators/isosurface/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/isosurface/hoverlabel/font/_stylesrc.py b/plotly/validators/isosurface/hoverlabel/font/_stylesrc.py index ac3b371a0d..4334e80829 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_textcase.py b/plotly/validators/isosurface/hoverlabel/font/_textcase.py index e7820807c0..730537515a 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_textcase.py +++ b/plotly/validators/isosurface/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/isosurface/hoverlabel/font/_textcasesrc.py b/plotly/validators/isosurface/hoverlabel/font/_textcasesrc.py index 4eaee2c5e1..7b633ea4dc 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_variant.py b/plotly/validators/isosurface/hoverlabel/font/_variant.py index 406b55cd01..50307683fb 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_variant.py +++ b/plotly/validators/isosurface/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/isosurface/hoverlabel/font/_variantsrc.py b/plotly/validators/isosurface/hoverlabel/font/_variantsrc.py index 5ab8e74a74..32580b0f7d 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/hoverlabel/font/_weight.py b/plotly/validators/isosurface/hoverlabel/font/_weight.py index b7b0567143..f42ba09916 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_weight.py +++ b/plotly/validators/isosurface/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="isosurface.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/isosurface/hoverlabel/font/_weightsrc.py b/plotly/validators/isosurface/hoverlabel/font/_weightsrc.py index 30f0346643..fd85792f16 100644 --- a/plotly/validators/isosurface/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/isosurface/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="isosurface.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/legendgrouptitle/__init__.py b/plotly/validators/isosurface/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/isosurface/legendgrouptitle/__init__.py +++ b/plotly/validators/isosurface/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/isosurface/legendgrouptitle/_font.py b/plotly/validators/isosurface/legendgrouptitle/_font.py index 9b4948699c..2b174c4a33 100644 --- a/plotly/validators/isosurface/legendgrouptitle/_font.py +++ b/plotly/validators/isosurface/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="isosurface.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/isosurface/legendgrouptitle/_text.py b/plotly/validators/isosurface/legendgrouptitle/_text.py index a865475e8a..d3427e95a1 100644 --- a/plotly/validators/isosurface/legendgrouptitle/_text.py +++ b/plotly/validators/isosurface/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="isosurface.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/isosurface/legendgrouptitle/font/__init__.py b/plotly/validators/isosurface/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/__init__.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_color.py b/plotly/validators/isosurface/legendgrouptitle/font/_color.py index 29f40601ca..c3c2709e67 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_color.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_family.py b/plotly/validators/isosurface/legendgrouptitle/font/_family.py index d3120f2951..08bc7cc45e 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_family.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_lineposition.py b/plotly/validators/isosurface/legendgrouptitle/font/_lineposition.py index 71bec95894..9f86f03663 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_shadow.py b/plotly/validators/isosurface/legendgrouptitle/font/_shadow.py index d4090d6b39..ff453ab17f 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_size.py b/plotly/validators/isosurface/legendgrouptitle/font/_size.py index b5cb7d56c1..879dcec8cb 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_size.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_style.py b/plotly/validators/isosurface/legendgrouptitle/font/_style.py index 033844ce08..1eeae30e72 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_style.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_textcase.py b/plotly/validators/isosurface/legendgrouptitle/font/_textcase.py index 611ae1638e..27f1f38218 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_variant.py b/plotly/validators/isosurface/legendgrouptitle/font/_variant.py index b9521f4e3a..aa5381eab8 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_variant.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/isosurface/legendgrouptitle/font/_weight.py b/plotly/validators/isosurface/legendgrouptitle/font/_weight.py index 221e1eb26e..e468149d3f 100644 --- a/plotly/validators/isosurface/legendgrouptitle/font/_weight.py +++ b/plotly/validators/isosurface/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="isosurface.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/isosurface/lighting/__init__.py b/plotly/validators/isosurface/lighting/__init__.py index 028351f35d..1f11e1b86f 100644 --- a/plotly/validators/isosurface/lighting/__init__.py +++ b/plotly/validators/isosurface/lighting/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._vertexnormalsepsilon import VertexnormalsepsilonValidator - from ._specular import SpecularValidator - from ._roughness import RoughnessValidator - from ._fresnel import FresnelValidator - from ._facenormalsepsilon import FacenormalsepsilonValidator - from ._diffuse import DiffuseValidator - from ._ambient import AmbientValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._vertexnormalsepsilon.VertexnormalsepsilonValidator", - "._specular.SpecularValidator", - "._roughness.RoughnessValidator", - "._fresnel.FresnelValidator", - "._facenormalsepsilon.FacenormalsepsilonValidator", - "._diffuse.DiffuseValidator", - "._ambient.AmbientValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], +) diff --git a/plotly/validators/isosurface/lighting/_ambient.py b/plotly/validators/isosurface/lighting/_ambient.py index e32860e3c8..9908588e68 100644 --- a/plotly/validators/isosurface/lighting/_ambient.py +++ b/plotly/validators/isosurface/lighting/_ambient.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): +class AmbientValidator(_bv.NumberValidator): def __init__( self, plotly_name="ambient", parent_name="isosurface.lighting", **kwargs ): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lighting/_diffuse.py b/plotly/validators/isosurface/lighting/_diffuse.py index 028cf17308..74d9a4ae5f 100644 --- a/plotly/validators/isosurface/lighting/_diffuse.py +++ b/plotly/validators/isosurface/lighting/_diffuse.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): +class DiffuseValidator(_bv.NumberValidator): def __init__( self, plotly_name="diffuse", parent_name="isosurface.lighting", **kwargs ): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lighting/_facenormalsepsilon.py b/plotly/validators/isosurface/lighting/_facenormalsepsilon.py index 6d7ab99334..03a076fc3d 100644 --- a/plotly/validators/isosurface/lighting/_facenormalsepsilon.py +++ b/plotly/validators/isosurface/lighting/_facenormalsepsilon.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class FacenormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="facenormalsepsilon", parent_name="isosurface.lighting", **kwargs, ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lighting/_fresnel.py b/plotly/validators/isosurface/lighting/_fresnel.py index c2a060819c..3bf5eb02d8 100644 --- a/plotly/validators/isosurface/lighting/_fresnel.py +++ b/plotly/validators/isosurface/lighting/_fresnel.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): +class FresnelValidator(_bv.NumberValidator): def __init__( self, plotly_name="fresnel", parent_name="isosurface.lighting", **kwargs ): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lighting/_roughness.py b/plotly/validators/isosurface/lighting/_roughness.py index c16be5b024..e2ebeadecc 100644 --- a/plotly/validators/isosurface/lighting/_roughness.py +++ b/plotly/validators/isosurface/lighting/_roughness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): +class RoughnessValidator(_bv.NumberValidator): def __init__( self, plotly_name="roughness", parent_name="isosurface.lighting", **kwargs ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lighting/_specular.py b/plotly/validators/isosurface/lighting/_specular.py index 3be95354f8..e123d72006 100644 --- a/plotly/validators/isosurface/lighting/_specular.py +++ b/plotly/validators/isosurface/lighting/_specular.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): +class SpecularValidator(_bv.NumberValidator): def __init__( self, plotly_name="specular", parent_name="isosurface.lighting", **kwargs ): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py b/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py index f7f5bff8ed..274b63d3a0 100644 --- a/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py +++ b/plotly/validators/isosurface/lighting/_vertexnormalsepsilon.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class VertexnormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="vertexnormalsepsilon", parent_name="isosurface.lighting", **kwargs, ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/lightposition/__init__.py b/plotly/validators/isosurface/lightposition/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/isosurface/lightposition/__init__.py +++ b/plotly/validators/isosurface/lightposition/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/isosurface/lightposition/_x.py b/plotly/validators/isosurface/lightposition/_x.py index 3eec1900cb..9edb39f3da 100644 --- a/plotly/validators/isosurface/lightposition/_x.py +++ b/plotly/validators/isosurface/lightposition/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="isosurface.lightposition", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/isosurface/lightposition/_y.py b/plotly/validators/isosurface/lightposition/_y.py index 8ca85fac83..da540f42e5 100644 --- a/plotly/validators/isosurface/lightposition/_y.py +++ b/plotly/validators/isosurface/lightposition/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="isosurface.lightposition", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/isosurface/lightposition/_z.py b/plotly/validators/isosurface/lightposition/_z.py index f710d8153f..813c7ca193 100644 --- a/plotly/validators/isosurface/lightposition/_z.py +++ b/plotly/validators/isosurface/lightposition/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__( self, plotly_name="z", parent_name="isosurface.lightposition", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/isosurface/slices/__init__.py b/plotly/validators/isosurface/slices/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/isosurface/slices/__init__.py +++ b/plotly/validators/isosurface/slices/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/isosurface/slices/_x.py b/plotly/validators/isosurface/slices/_x.py index 421db138ed..82b0e11280 100644 --- a/plotly/validators/isosurface/slices/_x.py +++ b/plotly/validators/isosurface/slices/_x.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.CompoundValidator): +class XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="x", parent_name="isosurface.slices", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "X"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the x dimension are drawn. """, ), **kwargs, diff --git a/plotly/validators/isosurface/slices/_y.py b/plotly/validators/isosurface/slices/_y.py index e9b11ffccf..b892d1529e 100644 --- a/plotly/validators/isosurface/slices/_y.py +++ b/plotly/validators/isosurface/slices/_y.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.CompoundValidator): +class YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="y", parent_name="isosurface.slices", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the y dimension are drawn. """, ), **kwargs, diff --git a/plotly/validators/isosurface/slices/_z.py b/plotly/validators/isosurface/slices/_z.py index 30570eb74a..b3a57b1897 100644 --- a/plotly/validators/isosurface/slices/_z.py +++ b/plotly/validators/isosurface/slices/_z.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="z", parent_name="isosurface.slices", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Z"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the z dimension are drawn. """, ), **kwargs, diff --git a/plotly/validators/isosurface/slices/x/__init__.py b/plotly/validators/isosurface/slices/x/__init__.py index 9085068fff..69805fd611 100644 --- a/plotly/validators/isosurface/slices/x/__init__.py +++ b/plotly/validators/isosurface/slices/x/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._fill.FillValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], +) diff --git a/plotly/validators/isosurface/slices/x/_fill.py b/plotly/validators/isosurface/slices/x/_fill.py index 282b628ec6..fddbdb69b2 100644 --- a/plotly/validators/isosurface/slices/x/_fill.py +++ b/plotly/validators/isosurface/slices/x/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.slices.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/slices/x/_locations.py b/plotly/validators/isosurface/slices/x/_locations.py index f33fa6b197..edc17c9a22 100644 --- a/plotly/validators/isosurface/slices/x/_locations.py +++ b/plotly/validators/isosurface/slices/x/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="isosurface.slices.x", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/x/_locationssrc.py b/plotly/validators/isosurface/slices/x/_locationssrc.py index 0f617948ea..7c7cf11e86 100644 --- a/plotly/validators/isosurface/slices/x/_locationssrc.py +++ b/plotly/validators/isosurface/slices/x/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="isosurface.slices.x", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/x/_show.py b/plotly/validators/isosurface/slices/x/_show.py index 0cc53bd036..3a1657c2e4 100644 --- a/plotly/validators/isosurface/slices/x/_show.py +++ b/plotly/validators/isosurface/slices/x/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.slices.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/y/__init__.py b/plotly/validators/isosurface/slices/y/__init__.py index 9085068fff..69805fd611 100644 --- a/plotly/validators/isosurface/slices/y/__init__.py +++ b/plotly/validators/isosurface/slices/y/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._fill.FillValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], +) diff --git a/plotly/validators/isosurface/slices/y/_fill.py b/plotly/validators/isosurface/slices/y/_fill.py index dda09cd2f3..8fe2b671ca 100644 --- a/plotly/validators/isosurface/slices/y/_fill.py +++ b/plotly/validators/isosurface/slices/y/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.slices.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/slices/y/_locations.py b/plotly/validators/isosurface/slices/y/_locations.py index 10442d9986..f5c4f8e336 100644 --- a/plotly/validators/isosurface/slices/y/_locations.py +++ b/plotly/validators/isosurface/slices/y/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="isosurface.slices.y", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/y/_locationssrc.py b/plotly/validators/isosurface/slices/y/_locationssrc.py index e8e07c5e1b..9489ddfd95 100644 --- a/plotly/validators/isosurface/slices/y/_locationssrc.py +++ b/plotly/validators/isosurface/slices/y/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="isosurface.slices.y", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/y/_show.py b/plotly/validators/isosurface/slices/y/_show.py index 1167857455..09b1fc2f96 100644 --- a/plotly/validators/isosurface/slices/y/_show.py +++ b/plotly/validators/isosurface/slices/y/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.slices.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/z/__init__.py b/plotly/validators/isosurface/slices/z/__init__.py index 9085068fff..69805fd611 100644 --- a/plotly/validators/isosurface/slices/z/__init__.py +++ b/plotly/validators/isosurface/slices/z/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._fill.FillValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], +) diff --git a/plotly/validators/isosurface/slices/z/_fill.py b/plotly/validators/isosurface/slices/z/_fill.py index 0600dd88cc..c1acb452ef 100644 --- a/plotly/validators/isosurface/slices/z/_fill.py +++ b/plotly/validators/isosurface/slices/z/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.slices.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/slices/z/_locations.py b/plotly/validators/isosurface/slices/z/_locations.py index bbca13acd3..c7beda4514 100644 --- a/plotly/validators/isosurface/slices/z/_locations.py +++ b/plotly/validators/isosurface/slices/z/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="isosurface.slices.z", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/z/_locationssrc.py b/plotly/validators/isosurface/slices/z/_locationssrc.py index 47ebf367e1..b5ee8f428e 100644 --- a/plotly/validators/isosurface/slices/z/_locationssrc.py +++ b/plotly/validators/isosurface/slices/z/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="isosurface.slices.z", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/isosurface/slices/z/_show.py b/plotly/validators/isosurface/slices/z/_show.py index f15fdefeea..d4ad2acbfe 100644 --- a/plotly/validators/isosurface/slices/z/_show.py +++ b/plotly/validators/isosurface/slices/z/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.slices.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/spaceframe/__init__.py b/plotly/validators/isosurface/spaceframe/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/isosurface/spaceframe/__init__.py +++ b/plotly/validators/isosurface/spaceframe/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/isosurface/spaceframe/_fill.py b/plotly/validators/isosurface/spaceframe/_fill.py index 47d03f2068..adcebe73a2 100644 --- a/plotly/validators/isosurface/spaceframe/_fill.py +++ b/plotly/validators/isosurface/spaceframe/_fill.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__( self, plotly_name="fill", parent_name="isosurface.spaceframe", **kwargs ): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/spaceframe/_show.py b/plotly/validators/isosurface/spaceframe/_show.py index 9c279bb5cb..c8c96d3d53 100644 --- a/plotly/validators/isosurface/spaceframe/_show.py +++ b/plotly/validators/isosurface/spaceframe/_show.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__( self, plotly_name="show", parent_name="isosurface.spaceframe", **kwargs ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/isosurface/stream/__init__.py b/plotly/validators/isosurface/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/isosurface/stream/__init__.py +++ b/plotly/validators/isosurface/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/isosurface/stream/_maxpoints.py b/plotly/validators/isosurface/stream/_maxpoints.py index a5bb60c939..0a4f329bac 100644 --- a/plotly/validators/isosurface/stream/_maxpoints.py +++ b/plotly/validators/isosurface/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="isosurface.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/stream/_token.py b/plotly/validators/isosurface/stream/_token.py index 89752f51f0..3d31743f1f 100644 --- a/plotly/validators/isosurface/stream/_token.py +++ b/plotly/validators/isosurface/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="isosurface.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/isosurface/surface/__init__.py b/plotly/validators/isosurface/surface/__init__.py index 79e3ea4c55..e200f4835e 100644 --- a/plotly/validators/isosurface/surface/__init__.py +++ b/plotly/validators/isosurface/surface/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._pattern import PatternValidator - from ._fill import FillValidator - from ._count import CountValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._pattern.PatternValidator", - "._fill.FillValidator", - "._count.CountValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._pattern.PatternValidator", + "._fill.FillValidator", + "._count.CountValidator", + ], +) diff --git a/plotly/validators/isosurface/surface/_count.py b/plotly/validators/isosurface/surface/_count.py index 91ccaf4ca7..1b16621baa 100644 --- a/plotly/validators/isosurface/surface/_count.py +++ b/plotly/validators/isosurface/surface/_count.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountValidator(_plotly_utils.basevalidators.IntegerValidator): +class CountValidator(_bv.IntegerValidator): def __init__(self, plotly_name="count", parent_name="isosurface.surface", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/isosurface/surface/_fill.py b/plotly/validators/isosurface/surface/_fill.py index f010167913..b5e71ebe00 100644 --- a/plotly/validators/isosurface/surface/_fill.py +++ b/plotly/validators/isosurface/surface/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="isosurface.surface", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/isosurface/surface/_pattern.py b/plotly/validators/isosurface/surface/_pattern.py index 40bdeed86d..3d193e79ad 100644 --- a/plotly/validators/isosurface/surface/_pattern.py +++ b/plotly/validators/isosurface/surface/_pattern.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): +class PatternValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="pattern", parent_name="isosurface.surface", **kwargs ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "odd", "even"]), flags=kwargs.pop("flags", ["A", "B", "C", "D", "E"]), diff --git a/plotly/validators/isosurface/surface/_show.py b/plotly/validators/isosurface/surface/_show.py index 618fc2f502..a8ec0cae14 100644 --- a/plotly/validators/isosurface/surface/_show.py +++ b/plotly/validators/isosurface/surface/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="isosurface.surface", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/__init__.py b/plotly/validators/layout/__init__.py index fb12452751..7391b7923c 100644 --- a/plotly/validators/layout/__init__.py +++ b/plotly/validators/layout/__init__.py @@ -1,203 +1,104 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yaxis import YaxisValidator - from ._xaxis import XaxisValidator - from ._width import WidthValidator - from ._waterfallmode import WaterfallmodeValidator - from ._waterfallgroupgap import WaterfallgroupgapValidator - from ._waterfallgap import WaterfallgapValidator - from ._violinmode import ViolinmodeValidator - from ._violingroupgap import ViolingroupgapValidator - from ._violingap import ViolingapValidator - from ._updatemenudefaults import UpdatemenudefaultsValidator - from ._updatemenus import UpdatemenusValidator - from ._uniformtext import UniformtextValidator - from ._uirevision import UirevisionValidator - from ._treemapcolorway import TreemapcolorwayValidator - from ._transition import TransitionValidator - from ._title import TitleValidator - from ._ternary import TernaryValidator - from ._template import TemplateValidator - from ._sunburstcolorway import SunburstcolorwayValidator - from ._spikedistance import SpikedistanceValidator - from ._smith import SmithValidator - from ._sliderdefaults import SliderdefaultsValidator - from ._sliders import SlidersValidator - from ._showlegend import ShowlegendValidator - from ._shapedefaults import ShapedefaultsValidator - from ._shapes import ShapesValidator - from ._separators import SeparatorsValidator - from ._selectiondefaults import SelectiondefaultsValidator - from ._selections import SelectionsValidator - from ._selectionrevision import SelectionrevisionValidator - from ._selectdirection import SelectdirectionValidator - from ._scene import SceneValidator - from ._scattermode import ScattermodeValidator - from ._scattergap import ScattergapValidator - from ._polar import PolarValidator - from ._plot_bgcolor import Plot_BgcolorValidator - from ._piecolorway import PiecolorwayValidator - from ._paper_bgcolor import Paper_BgcolorValidator - from ._newshape import NewshapeValidator - from ._newselection import NewselectionValidator - from ._modebar import ModebarValidator - from ._minreducedwidth import MinreducedwidthValidator - from ._minreducedheight import MinreducedheightValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._margin import MarginValidator - from ._mapbox import MapboxValidator - from ._map import MapValidator - from ._legend import LegendValidator - from ._imagedefaults import ImagedefaultsValidator - from ._images import ImagesValidator - from ._iciclecolorway import IciclecolorwayValidator - from ._hoversubplots import HoversubplotsValidator - from ._hovermode import HovermodeValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverdistance import HoverdistanceValidator - from ._hidesources import HidesourcesValidator - from ._hiddenlabelssrc import HiddenlabelssrcValidator - from ._hiddenlabels import HiddenlabelsValidator - from ._height import HeightValidator - from ._grid import GridValidator - from ._geo import GeoValidator - from ._funnelmode import FunnelmodeValidator - from ._funnelgroupgap import FunnelgroupgapValidator - from ._funnelgap import FunnelgapValidator - from ._funnelareacolorway import FunnelareacolorwayValidator - from ._font import FontValidator - from ._extendtreemapcolors import ExtendtreemapcolorsValidator - from ._extendsunburstcolors import ExtendsunburstcolorsValidator - from ._extendpiecolors import ExtendpiecolorsValidator - from ._extendiciclecolors import ExtendiciclecolorsValidator - from ._extendfunnelareacolors import ExtendfunnelareacolorsValidator - from ._editrevision import EditrevisionValidator - from ._dragmode import DragmodeValidator - from ._datarevision import DatarevisionValidator - from ._computed import ComputedValidator - from ._colorway import ColorwayValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._clickmode import ClickmodeValidator - from ._calendar import CalendarValidator - from ._boxmode import BoxmodeValidator - from ._boxgroupgap import BoxgroupgapValidator - from ._boxgap import BoxgapValidator - from ._barnorm import BarnormValidator - from ._barmode import BarmodeValidator - from ._bargroupgap import BargroupgapValidator - from ._bargap import BargapValidator - from ._barcornerradius import BarcornerradiusValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autosize import AutosizeValidator - from ._annotationdefaults import AnnotationdefaultsValidator - from ._annotations import AnnotationsValidator - from ._activeshape import ActiveshapeValidator - from ._activeselection import ActiveselectionValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yaxis.YaxisValidator", - "._xaxis.XaxisValidator", - "._width.WidthValidator", - "._waterfallmode.WaterfallmodeValidator", - "._waterfallgroupgap.WaterfallgroupgapValidator", - "._waterfallgap.WaterfallgapValidator", - "._violinmode.ViolinmodeValidator", - "._violingroupgap.ViolingroupgapValidator", - "._violingap.ViolingapValidator", - "._updatemenudefaults.UpdatemenudefaultsValidator", - "._updatemenus.UpdatemenusValidator", - "._uniformtext.UniformtextValidator", - "._uirevision.UirevisionValidator", - "._treemapcolorway.TreemapcolorwayValidator", - "._transition.TransitionValidator", - "._title.TitleValidator", - "._ternary.TernaryValidator", - "._template.TemplateValidator", - "._sunburstcolorway.SunburstcolorwayValidator", - "._spikedistance.SpikedistanceValidator", - "._smith.SmithValidator", - "._sliderdefaults.SliderdefaultsValidator", - "._sliders.SlidersValidator", - "._showlegend.ShowlegendValidator", - "._shapedefaults.ShapedefaultsValidator", - "._shapes.ShapesValidator", - "._separators.SeparatorsValidator", - "._selectiondefaults.SelectiondefaultsValidator", - "._selections.SelectionsValidator", - "._selectionrevision.SelectionrevisionValidator", - "._selectdirection.SelectdirectionValidator", - "._scene.SceneValidator", - "._scattermode.ScattermodeValidator", - "._scattergap.ScattergapValidator", - "._polar.PolarValidator", - "._plot_bgcolor.Plot_BgcolorValidator", - "._piecolorway.PiecolorwayValidator", - "._paper_bgcolor.Paper_BgcolorValidator", - "._newshape.NewshapeValidator", - "._newselection.NewselectionValidator", - "._modebar.ModebarValidator", - "._minreducedwidth.MinreducedwidthValidator", - "._minreducedheight.MinreducedheightValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._margin.MarginValidator", - "._mapbox.MapboxValidator", - "._map.MapValidator", - "._legend.LegendValidator", - "._imagedefaults.ImagedefaultsValidator", - "._images.ImagesValidator", - "._iciclecolorway.IciclecolorwayValidator", - "._hoversubplots.HoversubplotsValidator", - "._hovermode.HovermodeValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverdistance.HoverdistanceValidator", - "._hidesources.HidesourcesValidator", - "._hiddenlabelssrc.HiddenlabelssrcValidator", - "._hiddenlabels.HiddenlabelsValidator", - "._height.HeightValidator", - "._grid.GridValidator", - "._geo.GeoValidator", - "._funnelmode.FunnelmodeValidator", - "._funnelgroupgap.FunnelgroupgapValidator", - "._funnelgap.FunnelgapValidator", - "._funnelareacolorway.FunnelareacolorwayValidator", - "._font.FontValidator", - "._extendtreemapcolors.ExtendtreemapcolorsValidator", - "._extendsunburstcolors.ExtendsunburstcolorsValidator", - "._extendpiecolors.ExtendpiecolorsValidator", - "._extendiciclecolors.ExtendiciclecolorsValidator", - "._extendfunnelareacolors.ExtendfunnelareacolorsValidator", - "._editrevision.EditrevisionValidator", - "._dragmode.DragmodeValidator", - "._datarevision.DatarevisionValidator", - "._computed.ComputedValidator", - "._colorway.ColorwayValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._clickmode.ClickmodeValidator", - "._calendar.CalendarValidator", - "._boxmode.BoxmodeValidator", - "._boxgroupgap.BoxgroupgapValidator", - "._boxgap.BoxgapValidator", - "._barnorm.BarnormValidator", - "._barmode.BarmodeValidator", - "._bargroupgap.BargroupgapValidator", - "._bargap.BargapValidator", - "._barcornerradius.BarcornerradiusValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autosize.AutosizeValidator", - "._annotationdefaults.AnnotationdefaultsValidator", - "._annotations.AnnotationsValidator", - "._activeshape.ActiveshapeValidator", - "._activeselection.ActiveselectionValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._width.WidthValidator", + "._waterfallmode.WaterfallmodeValidator", + "._waterfallgroupgap.WaterfallgroupgapValidator", + "._waterfallgap.WaterfallgapValidator", + "._violinmode.ViolinmodeValidator", + "._violingroupgap.ViolingroupgapValidator", + "._violingap.ViolingapValidator", + "._updatemenudefaults.UpdatemenudefaultsValidator", + "._updatemenus.UpdatemenusValidator", + "._uniformtext.UniformtextValidator", + "._uirevision.UirevisionValidator", + "._treemapcolorway.TreemapcolorwayValidator", + "._transition.TransitionValidator", + "._title.TitleValidator", + "._ternary.TernaryValidator", + "._template.TemplateValidator", + "._sunburstcolorway.SunburstcolorwayValidator", + "._spikedistance.SpikedistanceValidator", + "._smith.SmithValidator", + "._sliderdefaults.SliderdefaultsValidator", + "._sliders.SlidersValidator", + "._showlegend.ShowlegendValidator", + "._shapedefaults.ShapedefaultsValidator", + "._shapes.ShapesValidator", + "._separators.SeparatorsValidator", + "._selectiondefaults.SelectiondefaultsValidator", + "._selections.SelectionsValidator", + "._selectionrevision.SelectionrevisionValidator", + "._selectdirection.SelectdirectionValidator", + "._scene.SceneValidator", + "._scattermode.ScattermodeValidator", + "._scattergap.ScattergapValidator", + "._polar.PolarValidator", + "._plot_bgcolor.Plot_BgcolorValidator", + "._piecolorway.PiecolorwayValidator", + "._paper_bgcolor.Paper_BgcolorValidator", + "._newshape.NewshapeValidator", + "._newselection.NewselectionValidator", + "._modebar.ModebarValidator", + "._minreducedwidth.MinreducedwidthValidator", + "._minreducedheight.MinreducedheightValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._margin.MarginValidator", + "._mapbox.MapboxValidator", + "._map.MapValidator", + "._legend.LegendValidator", + "._imagedefaults.ImagedefaultsValidator", + "._images.ImagesValidator", + "._iciclecolorway.IciclecolorwayValidator", + "._hoversubplots.HoversubplotsValidator", + "._hovermode.HovermodeValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverdistance.HoverdistanceValidator", + "._hidesources.HidesourcesValidator", + "._hiddenlabelssrc.HiddenlabelssrcValidator", + "._hiddenlabels.HiddenlabelsValidator", + "._height.HeightValidator", + "._grid.GridValidator", + "._geo.GeoValidator", + "._funnelmode.FunnelmodeValidator", + "._funnelgroupgap.FunnelgroupgapValidator", + "._funnelgap.FunnelgapValidator", + "._funnelareacolorway.FunnelareacolorwayValidator", + "._font.FontValidator", + "._extendtreemapcolors.ExtendtreemapcolorsValidator", + "._extendsunburstcolors.ExtendsunburstcolorsValidator", + "._extendpiecolors.ExtendpiecolorsValidator", + "._extendiciclecolors.ExtendiciclecolorsValidator", + "._extendfunnelareacolors.ExtendfunnelareacolorsValidator", + "._editrevision.EditrevisionValidator", + "._dragmode.DragmodeValidator", + "._datarevision.DatarevisionValidator", + "._computed.ComputedValidator", + "._colorway.ColorwayValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._clickmode.ClickmodeValidator", + "._calendar.CalendarValidator", + "._boxmode.BoxmodeValidator", + "._boxgroupgap.BoxgroupgapValidator", + "._boxgap.BoxgapValidator", + "._barnorm.BarnormValidator", + "._barmode.BarmodeValidator", + "._bargroupgap.BargroupgapValidator", + "._bargap.BargapValidator", + "._barcornerradius.BarcornerradiusValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autosize.AutosizeValidator", + "._annotationdefaults.AnnotationdefaultsValidator", + "._annotations.AnnotationsValidator", + "._activeshape.ActiveshapeValidator", + "._activeselection.ActiveselectionValidator", + ], +) diff --git a/plotly/validators/layout/_activeselection.py b/plotly/validators/layout/_activeselection.py index e09766089e..27e829ef7f 100644 --- a/plotly/validators/layout/_activeselection.py +++ b/plotly/validators/layout/_activeselection.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActiveselectionValidator(_plotly_utils.basevalidators.CompoundValidator): +class ActiveselectionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="activeselection", parent_name="layout", **kwargs): - super(ActiveselectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Activeselection"), data_docs=kwargs.pop( "data_docs", """ - fillcolor - Sets the color filling the active selection' - interior. - opacity - Sets the opacity of the active selection. """, ), **kwargs, diff --git a/plotly/validators/layout/_activeshape.py b/plotly/validators/layout/_activeshape.py index fb763065f6..ff7996d992 100644 --- a/plotly/validators/layout/_activeshape.py +++ b/plotly/validators/layout/_activeshape.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActiveshapeValidator(_plotly_utils.basevalidators.CompoundValidator): +class ActiveshapeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="activeshape", parent_name="layout", **kwargs): - super(ActiveshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Activeshape"), data_docs=kwargs.pop( "data_docs", """ - fillcolor - Sets the color filling the active shape' - interior. - opacity - Sets the opacity of the active shape. """, ), **kwargs, diff --git a/plotly/validators/layout/_annotationdefaults.py b/plotly/validators/layout/_annotationdefaults.py index b59ff513fe..fa0dcfc019 100644 --- a/plotly/validators/layout/_annotationdefaults.py +++ b/plotly/validators/layout/_annotationdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnnotationdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AnnotationdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="annotationdefaults", parent_name="layout", **kwargs ): - super(AnnotationdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Annotation"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/_annotations.py b/plotly/validators/layout/_annotations.py index 7e5f116bea..4e112d58a4 100644 --- a/plotly/validators/layout/_annotations.py +++ b/plotly/validators/layout/_annotations.py @@ -1,332 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class AnnotationsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="annotations", parent_name="layout", **kwargs): - super(AnnotationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Annotation"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head. If `axref` is `pixel`, a - positive (negative) component corresponds to an - arrow pointing from right to left (left to - right). If `axref` is not `pixel` and is - exactly the same as `xref`, this is an absolute - value on that axis, like `x`, specified in the - same coordinates as `xref`. - axref - Indicates in what coordinates the tail of the - annotation (ax,ay) is specified. If set to a x - axis id (e.g. "x" or "x2"), the `x` position - refers to a x coordinate. If set to "paper", - the `x` position refers to the distance from - the left of the plotting area in normalized - coordinates where 0 (1) corresponds to the left - (right). If set to a x axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the left of the domain of that axis: e.g., *x2 - domain* refers to the domain of the second x - axis and a x position of 0.5 refers to the - point between the left and the right of the - domain of the second x axis. In order for - absolute positioning of the arrow to work, - "axref" must be exactly the same as "xref", - otherwise "axref" will revert to "pixel" - (explained next). For relative positioning, - "axref" can be set to "pixel", in which case - the "ax" value is specified in pixels relative - to "x". Absolute positioning is useful for - trendline annotations which should continue to - indicate the correct trend when zoomed. - Relative positioning is useful for specifying - the text offset for an annotated point. - ay - Sets the y component of the arrow tail about - the arrow head. If `ayref` is `pixel`, a - positive (negative) component corresponds to an - arrow pointing from bottom to top (top to - bottom). If `ayref` is not `pixel` and is - exactly the same as `yref`, this is an absolute - value on that axis, like `y`, specified in the - same coordinates as `yref`. - ayref - Indicates in what coordinates the tail of the - annotation (ax,ay) is specified. If set to a y - axis id (e.g. "y" or "y2"), the `y` position - refers to a y coordinate. If set to "paper", - the `y` position refers to the distance from - the bottom of the plotting area in normalized - coordinates where 0 (1) corresponds to the - bottom (top). If set to a y axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the bottom of the domain of that axis: e.g., - *y2 domain* refers to the domain of the second - y axis and a y position of 0.5 refers to the - point between the bottom and the top of the - domain of the second y axis. In order for - absolute positioning of the arrow to work, - "ayref" must be exactly the same as "yref", - otherwise "ayref" will revert to "pixel" - (explained next). For relative positioning, - "ayref" can be set to "pixel", in which case - the "ay" value is specified in pixels relative - to "y". Absolute positioning is useful for - trendline annotations which should continue to - indicate the correct trend when zoomed. - Relative positioning is useful for specifying - the text offset for an annotated point. - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - clicktoshow - Makes this annotation respond to clicks on the - plot. If you click a data point that exactly - matches the `x` and `y` values of this - annotation, and it is hidden (visible: false), - it will appear. In "onoff" mode, you must click - the same point again to make it disappear, so - if you click multiple points, you can show - multiple annotations. In "onout" mode, a click - anywhere else in the plot (on another data - point or not) will hide this annotation. If you - need to show/hide this annotation in response - to different `x` or `y` values, you can set - `xclick` and/or `yclick`. This is useful for - example to label the side of a bar. To label - markers though, `standoff` is preferred over - `xclick` and `yclick`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.annotation. - Hoverlabel` instance or dict with compatible - properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , , , are - also supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xclick - Toggle this annotation when clicking a data - point whose `x` value is `xclick` rather than - the annotation's `x` value. - xref - Sets the annotation's x coordinate axis. If set - to a x axis id (e.g. "x" or "x2"), the `x` - position refers to a x coordinate. If set to - "paper", the `x` position refers to the - distance from the left of the plotting area in - normalized coordinates where 0 (1) corresponds - to the left (right). If set to a x axis ID - followed by "domain" (separated by a space), - the position behaves like for "paper", but - refers to the distance in fractions of the - domain length from the left of the domain of - that axis: e.g., *x2 domain* refers to the - domain of the second x axis and a x position - of 0.5 refers to the point between the left and - the right of the domain of the second x axis. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yclick - Toggle this annotation when clicking a data - point whose `y` value is `yclick` rather than - the annotation's `y` value. - yref - Sets the annotation's y coordinate axis. If set - to a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y coordinate. If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). If set to a y - axis ID followed by "domain" (separated by a - space), the position behaves like for "paper", - but refers to the distance in fractions of the - domain length from the bottom of the domain of - that axis: e.g., *y2 domain* refers to the - domain of the second y axis and a y position - of 0.5 refers to the point between the bottom - and the top of the domain of the second y axis. - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. """, ), **kwargs, diff --git a/plotly/validators/layout/_autosize.py b/plotly/validators/layout/_autosize.py index 0897b950ba..c3829d924e 100644 --- a/plotly/validators/layout/_autosize.py +++ b/plotly/validators/layout/_autosize.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutosizeValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutosizeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autosize", parent_name="layout", **kwargs): - super(AutosizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_autotypenumbers.py b/plotly/validators/layout/_autotypenumbers.py index ac7a53076e..fbb3ae69b1 100644 --- a/plotly/validators/layout/_autotypenumbers.py +++ b/plotly/validators/layout/_autotypenumbers.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="autotypenumbers", parent_name="layout", **kwargs): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/_barcornerradius.py b/plotly/validators/layout/_barcornerradius.py index acbc51ecb9..df58f4cf51 100644 --- a/plotly/validators/layout/_barcornerradius.py +++ b/plotly/validators/layout/_barcornerradius.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarcornerradiusValidator(_plotly_utils.basevalidators.AnyValidator): +class BarcornerradiusValidator(_bv.AnyValidator): def __init__(self, plotly_name="barcornerradius", parent_name="layout", **kwargs): - super(BarcornerradiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_bargap.py b/plotly/validators/layout/_bargap.py index bcf276e67c..1361e5eab8 100644 --- a/plotly/validators/layout/_bargap.py +++ b/plotly/validators/layout/_bargap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BargapValidator(_plotly_utils.basevalidators.NumberValidator): +class BargapValidator(_bv.NumberValidator): def __init__(self, plotly_name="bargap", parent_name="layout", **kwargs): - super(BargapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_bargroupgap.py b/plotly/validators/layout/_bargroupgap.py index 544b1a4787..2c2d34907b 100644 --- a/plotly/validators/layout/_bargroupgap.py +++ b/plotly/validators/layout/_bargroupgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BargroupgapValidator(_plotly_utils.basevalidators.NumberValidator): +class BargroupgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="bargroupgap", parent_name="layout", **kwargs): - super(BargroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_barmode.py b/plotly/validators/layout/_barmode.py index ec8d5a91d9..404a74d289 100644 --- a/plotly/validators/layout/_barmode.py +++ b/plotly/validators/layout/_barmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BarmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="barmode", parent_name="layout", **kwargs): - super(BarmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["stack", "group", "overlay", "relative"]), **kwargs, diff --git a/plotly/validators/layout/_barnorm.py b/plotly/validators/layout/_barnorm.py index 2a0c7cd8d1..278f4996ac 100644 --- a/plotly/validators/layout/_barnorm.py +++ b/plotly/validators/layout/_barnorm.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BarnormValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="barnorm", parent_name="layout", **kwargs): - super(BarnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["", "fraction", "percent"]), **kwargs, diff --git a/plotly/validators/layout/_boxgap.py b/plotly/validators/layout/_boxgap.py index d4ea0ab1ac..d9ab928e6c 100644 --- a/plotly/validators/layout/_boxgap.py +++ b/plotly/validators/layout/_boxgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxgapValidator(_plotly_utils.basevalidators.NumberValidator): +class BoxgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="boxgap", parent_name="layout", **kwargs): - super(BoxgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_boxgroupgap.py b/plotly/validators/layout/_boxgroupgap.py index 6500cca927..5c69e379b4 100644 --- a/plotly/validators/layout/_boxgroupgap.py +++ b/plotly/validators/layout/_boxgroupgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): +class BoxgroupgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="boxgroupgap", parent_name="layout", **kwargs): - super(BoxgroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_boxmode.py b/plotly/validators/layout/_boxmode.py index 26869cedbc..471dfbf399 100644 --- a/plotly/validators/layout/_boxmode.py +++ b/plotly/validators/layout/_boxmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BoxmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="boxmode", parent_name="layout", **kwargs): - super(BoxmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["group", "overlay"]), **kwargs, diff --git a/plotly/validators/layout/_calendar.py b/plotly/validators/layout/_calendar.py index 39135ef290..54dfa2b5cb 100644 --- a/plotly/validators/layout/_calendar.py +++ b/plotly/validators/layout/_calendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="calendar", parent_name="layout", **kwargs): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/_clickmode.py b/plotly/validators/layout/_clickmode.py index 153253fbbe..ae17f6fa99 100644 --- a/plotly/validators/layout/_clickmode.py +++ b/plotly/validators/layout/_clickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClickmodeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ClickmodeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="clickmode", parent_name="layout", **kwargs): - super(ClickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["event", "select"]), diff --git a/plotly/validators/layout/_coloraxis.py b/plotly/validators/layout/_coloraxis.py index 7be380042f..4b0f1d5a96 100644 --- a/plotly/validators/layout/_coloraxis.py +++ b/plotly/validators/layout/_coloraxis.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColoraxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="coloraxis", parent_name="layout", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Coloraxis"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `colorscale`. In case - `colorscale` is unspecified or `autocolorscale` - is true, the default palette will be chosen - according to whether numbers in the `color` - array are all positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - corresponding trace color array(s)) or the - bounds set in `cmin` and `cmax` Defaults to - `false` when `cmin` and `cmax` are set by the - user. - cmax - Sets the upper bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmin` must be - set as well. - cmid - Sets the mid-point of the color domain by - scaling `cmin` and/or `cmax` to be equidistant - to this point. Value should have the same units - as corresponding trace color array(s). Has no - effect when `cauto` is `false`. - cmin - Sets the lower bound of the color domain. Value - should have the same units as corresponding - trace color array(s) and if set, `cmax` must be - set as well. - colorbar - :class:`plotly.graph_objects.layout.coloraxis.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - reversescale - Reverses the color mapping if true. If true, - `cmin` will correspond to the last color in the - array and `cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. """, ), **kwargs, diff --git a/plotly/validators/layout/_colorscale.py b/plotly/validators/layout/_colorscale.py index 0c3e143eee..f501535b88 100644 --- a/plotly/validators/layout/_colorscale.py +++ b/plotly/validators/layout/_colorscale.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorscaleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorscale", parent_name="layout", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Colorscale"), data_docs=kwargs.pop( "data_docs", """ - diverging - Sets the default diverging colorscale. Note - that `autocolorscale` must be true for this - attribute to work. - sequential - Sets the default sequential colorscale for - positive values. Note that `autocolorscale` - must be true for this attribute to work. - sequentialminus - Sets the default sequential colorscale for - negative values. Note that `autocolorscale` - must be true for this attribute to work. """, ), **kwargs, diff --git a/plotly/validators/layout/_colorway.py b/plotly/validators/layout/_colorway.py index 89fd6a8a9d..bc66c8096b 100644 --- a/plotly/validators/layout/_colorway.py +++ b/plotly/validators/layout/_colorway.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): +class ColorwayValidator(_bv.ColorlistValidator): def __init__(self, plotly_name="colorway", parent_name="layout", **kwargs): - super(ColorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_computed.py b/plotly/validators/layout/_computed.py index cee970dac4..0380873f0e 100644 --- a/plotly/validators/layout/_computed.py +++ b/plotly/validators/layout/_computed.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ComputedValidator(_plotly_utils.basevalidators.AnyValidator): +class ComputedValidator(_bv.AnyValidator): def __init__(self, plotly_name="computed", parent_name="layout", **kwargs): - super(ComputedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_datarevision.py b/plotly/validators/layout/_datarevision.py index bc845a2fe7..19ba4fc6bd 100644 --- a/plotly/validators/layout/_datarevision.py +++ b/plotly/validators/layout/_datarevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DatarevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class DatarevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="datarevision", parent_name="layout", **kwargs): - super(DatarevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_dragmode.py b/plotly/validators/layout/_dragmode.py index f959154921..1edfaf59de 100644 --- a/plotly/validators/layout/_dragmode.py +++ b/plotly/validators/layout/_dragmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DragmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DragmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="dragmode", parent_name="layout", **kwargs): - super(DragmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/_editrevision.py b/plotly/validators/layout/_editrevision.py index 81cb7aff05..1a7527712c 100644 --- a/plotly/validators/layout/_editrevision.py +++ b/plotly/validators/layout/_editrevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EditrevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class EditrevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="editrevision", parent_name="layout", **kwargs): - super(EditrevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_extendfunnelareacolors.py b/plotly/validators/layout/_extendfunnelareacolors.py index e5d5d8980d..bda8ccc3fb 100644 --- a/plotly/validators/layout/_extendfunnelareacolors.py +++ b/plotly/validators/layout/_extendfunnelareacolors.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExtendfunnelareacolorsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExtendfunnelareacolorsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="extendfunnelareacolors", parent_name="layout", **kwargs ): - super(ExtendfunnelareacolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_extendiciclecolors.py b/plotly/validators/layout/_extendiciclecolors.py index 47f634c2c0..96f234db03 100644 --- a/plotly/validators/layout/_extendiciclecolors.py +++ b/plotly/validators/layout/_extendiciclecolors.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExtendiciclecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExtendiciclecolorsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="extendiciclecolors", parent_name="layout", **kwargs ): - super(ExtendiciclecolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_extendpiecolors.py b/plotly/validators/layout/_extendpiecolors.py index 0a227c3ec7..bd11c95418 100644 --- a/plotly/validators/layout/_extendpiecolors.py +++ b/plotly/validators/layout/_extendpiecolors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExtendpiecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExtendpiecolorsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="extendpiecolors", parent_name="layout", **kwargs): - super(ExtendpiecolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_extendsunburstcolors.py b/plotly/validators/layout/_extendsunburstcolors.py index bd85813f7f..b472df0858 100644 --- a/plotly/validators/layout/_extendsunburstcolors.py +++ b/plotly/validators/layout/_extendsunburstcolors.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExtendsunburstcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExtendsunburstcolorsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="extendsunburstcolors", parent_name="layout", **kwargs ): - super(ExtendsunburstcolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_extendtreemapcolors.py b/plotly/validators/layout/_extendtreemapcolors.py index e9b22af1d5..fffdfee48a 100644 --- a/plotly/validators/layout/_extendtreemapcolors.py +++ b/plotly/validators/layout/_extendtreemapcolors.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExtendtreemapcolorsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExtendtreemapcolorsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="extendtreemapcolors", parent_name="layout", **kwargs ): - super(ExtendtreemapcolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_font.py b/plotly/validators/layout/_font.py index 835e0ba5ae..20da6d6b74 100644 --- a/plotly/validators/layout/_font.py +++ b/plotly/validators/layout/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/_funnelareacolorway.py b/plotly/validators/layout/_funnelareacolorway.py index 9c588aa277..ac15424e70 100644 --- a/plotly/validators/layout/_funnelareacolorway.py +++ b/plotly/validators/layout/_funnelareacolorway.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelareacolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): +class FunnelareacolorwayValidator(_bv.ColorlistValidator): def __init__( self, plotly_name="funnelareacolorway", parent_name="layout", **kwargs ): - super(FunnelareacolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_funnelgap.py b/plotly/validators/layout/_funnelgap.py index 679d46923b..40d618496f 100644 --- a/plotly/validators/layout/_funnelgap.py +++ b/plotly/validators/layout/_funnelgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelgapValidator(_plotly_utils.basevalidators.NumberValidator): +class FunnelgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="funnelgap", parent_name="layout", **kwargs): - super(FunnelgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_funnelgroupgap.py b/plotly/validators/layout/_funnelgroupgap.py index a2e4d32d29..bf7d180dc8 100644 --- a/plotly/validators/layout/_funnelgroupgap.py +++ b/plotly/validators/layout/_funnelgroupgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): +class FunnelgroupgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="funnelgroupgap", parent_name="layout", **kwargs): - super(FunnelgroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_funnelmode.py b/plotly/validators/layout/_funnelmode.py index 1805cb89ca..65b978a596 100644 --- a/plotly/validators/layout/_funnelmode.py +++ b/plotly/validators/layout/_funnelmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FunnelmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="funnelmode", parent_name="layout", **kwargs): - super(FunnelmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["stack", "group", "overlay"]), **kwargs, diff --git a/plotly/validators/layout/_geo.py b/plotly/validators/layout/_geo.py index fe0e3cbbf6..0000c4dd32 100644 --- a/plotly/validators/layout/_geo.py +++ b/plotly/validators/layout/_geo.py @@ -1,113 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeoValidator(_plotly_utils.basevalidators.CompoundValidator): +class GeoValidator(_bv.CompoundValidator): def __init__(self, plotly_name="geo", parent_name="layout", **kwargs): - super(GeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Geo"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Set the background color of the map - center - :class:`plotly.graph_objects.layout.geo.Center` - instance or dict with compatible properties - coastlinecolor - Sets the coastline color. - coastlinewidth - Sets the coastline stroke width (in px). - countrycolor - Sets line color of the country boundaries. - countrywidth - Sets line width (in px) of the country - boundaries. - domain - :class:`plotly.graph_objects.layout.geo.Domain` - instance or dict with compatible properties - fitbounds - Determines if this subplot's view settings are - auto-computed to fit trace data. On scoped - maps, setting `fitbounds` leads to `center.lon` - and `center.lat` getting auto-filled. On maps - with a non-clipped projection, setting - `fitbounds` leads to `center.lon`, - `center.lat`, and `projection.rotation.lon` - getting auto-filled. On maps with a clipped - projection, setting `fitbounds` leads to - `center.lon`, `center.lat`, - `projection.rotation.lon`, - `projection.rotation.lat`, `lonaxis.range` and - `lataxis.range` getting auto-filled. If - "locations", only the trace's visible locations - are considered in the `fitbounds` computations. - If "geojson", the entire trace input `geojson` - (if provided) is considered in the `fitbounds` - computations, Defaults to False. - framecolor - Sets the color the frame. - framewidth - Sets the stroke width (in px) of the frame. - lakecolor - Sets the color of the lakes. - landcolor - Sets the land mass color. - lataxis - :class:`plotly.graph_objects.layout.geo.Lataxis - ` instance or dict with compatible properties - lonaxis - :class:`plotly.graph_objects.layout.geo.Lonaxis - ` instance or dict with compatible properties - oceancolor - Sets the ocean color - projection - :class:`plotly.graph_objects.layout.geo.Project - ion` instance or dict with compatible - properties - resolution - Sets the resolution of the base layers. The - values have units of km/mm e.g. 110 corresponds - to a scale ratio of 1:110,000,000. - rivercolor - Sets color of the rivers. - riverwidth - Sets the stroke width (in px) of the rivers. - scope - Set the scope of the map. - showcoastlines - Sets whether or not the coastlines are drawn. - showcountries - Sets whether or not country boundaries are - drawn. - showframe - Sets whether or not a frame is drawn around the - map. - showlakes - Sets whether or not lakes are drawn. - showland - Sets whether or not land masses are filled in - color. - showocean - Sets whether or not oceans are filled in color. - showrivers - Sets whether or not rivers are drawn. - showsubunits - Sets whether or not boundaries of subunits - within countries (e.g. states, provinces) are - drawn. - subunitcolor - Sets the color of the subunits boundaries. - subunitwidth - Sets the stroke width (in px) of the subunits - boundaries. - uirevision - Controls persistence of user-driven changes in - the view (projection and center). Defaults to - `layout.uirevision`. - visible - Sets the default visibility of the base layers. """, ), **kwargs, diff --git a/plotly/validators/layout/_grid.py b/plotly/validators/layout/_grid.py index 5b1212a94e..4be0a3b3bb 100644 --- a/plotly/validators/layout/_grid.py +++ b/plotly/validators/layout/_grid.py @@ -1,94 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridValidator(_plotly_utils.basevalidators.CompoundValidator): +class GridValidator(_bv.CompoundValidator): def __init__(self, plotly_name="grid", parent_name="layout", **kwargs): - super(GridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Grid"), data_docs=kwargs.pop( "data_docs", """ - columns - The number of columns in the grid. If you - provide a 2D `subplots` array, the length of - its longest row is used as the default. If you - give an `xaxes` array, its length is used as - the default. But it's also possible to have a - different length, if you want to leave a row at - the end for non-cartesian subplots. - domain - :class:`plotly.graph_objects.layout.grid.Domain - ` instance or dict with compatible properties - pattern - If no `subplots`, `xaxes`, or `yaxes` are given - but we do have `rows` and `columns`, we can - generate defaults using consecutive axis IDs, - in two ways: "coupled" gives one x axis per - column and one y axis per row. "independent" - uses a new xy pair for each cell, left-to-right - across each row then iterating rows according - to `roworder`. - roworder - Is the first row the top or the bottom? Note - that columns are always enumerated from left to - right. - rows - The number of rows in the grid. If you provide - a 2D `subplots` array or a `yaxes` array, its - length is used as the default. But it's also - possible to have a different length, if you - want to leave a row at the end for non- - cartesian subplots. - subplots - Used for freeform grids, where some axes may be - shared across subplots but others are not. Each - entry should be a cartesian subplot id, like - "xy" or "x3y2", or "" to leave that cell empty. - You may reuse x axes within the same column, - and y axes within the same row. Non-cartesian - subplots and traces that support `domain` can - place themselves in this grid separately using - the `gridcell` attribute. - xaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an x axis id like "x", "x2", etc., or - "" to not put an x axis in that column. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `yaxes` - is present, will generate consecutive IDs. - xgap - Horizontal space between grid cells, expressed - as a fraction of the total width available to - one cell. Defaults to 0.1 for coupled-axes - grids and 0.2 for independent grids. - xside - Sets where the x axis labels and titles go. - "bottom" means the very bottom of the grid. - "bottom plot" is the lowest plot that each x - axis is used in. "top" and "top plot" are - similar. - yaxes - Used with `yaxes` when the x and y axes are - shared across columns and rows. Each entry - should be an y axis id like "y", "y2", etc., or - "" to not put a y axis in that row. Entries - other than "" must be unique. Ignored if - `subplots` is present. If missing but `xaxes` - is present, will generate consecutive IDs. - ygap - Vertical space between grid cells, expressed as - a fraction of the total height available to one - cell. Defaults to 0.1 for coupled-axes grids - and 0.3 for independent grids. - yside - Sets where the y axis labels and titles go. - "left" means the very left edge of the grid. - *left plot* is the leftmost plot that each y - axis is used in. "right" and *right plot* are - similar. """, ), **kwargs, diff --git a/plotly/validators/layout/_height.py b/plotly/validators/layout/_height.py index d92c4b5b6a..8d8b2be125 100644 --- a/plotly/validators/layout/_height.py +++ b/plotly/validators/layout/_height.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): +class HeightValidator(_bv.NumberValidator): def __init__(self, plotly_name="height", parent_name="layout", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 10), **kwargs, diff --git a/plotly/validators/layout/_hiddenlabels.py b/plotly/validators/layout/_hiddenlabels.py index f557d87045..fbe511453f 100644 --- a/plotly/validators/layout/_hiddenlabels.py +++ b/plotly/validators/layout/_hiddenlabels.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HiddenlabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HiddenlabelsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="hiddenlabels", parent_name="layout", **kwargs): - super(HiddenlabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_hiddenlabelssrc.py b/plotly/validators/layout/_hiddenlabelssrc.py index 413365e0b1..e05e370f8e 100644 --- a/plotly/validators/layout/_hiddenlabelssrc.py +++ b/plotly/validators/layout/_hiddenlabelssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HiddenlabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HiddenlabelssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hiddenlabelssrc", parent_name="layout", **kwargs): - super(HiddenlabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_hidesources.py b/plotly/validators/layout/_hidesources.py index 1166c15e0c..798ed94c12 100644 --- a/plotly/validators/layout/_hidesources.py +++ b/plotly/validators/layout/_hidesources.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HidesourcesValidator(_plotly_utils.basevalidators.BooleanValidator): +class HidesourcesValidator(_bv.BooleanValidator): def __init__(self, plotly_name="hidesources", parent_name="layout", **kwargs): - super(HidesourcesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/_hoverdistance.py b/plotly/validators/layout/_hoverdistance.py index 98224c0d74..1426f07bef 100644 --- a/plotly/validators/layout/_hoverdistance.py +++ b/plotly/validators/layout/_hoverdistance.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverdistanceValidator(_plotly_utils.basevalidators.IntegerValidator): +class HoverdistanceValidator(_bv.IntegerValidator): def __init__(self, plotly_name="hoverdistance", parent_name="layout", **kwargs): - super(HoverdistanceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), **kwargs, diff --git a/plotly/validators/layout/_hoverlabel.py b/plotly/validators/layout/_hoverlabel.py index 08a04e69d7..0b132a567f 100644 --- a/plotly/validators/layout/_hoverlabel.py +++ b/plotly/validators/layout/_hoverlabel.py @@ -1,42 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="layout", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - bgcolor - Sets the background color of all hover labels - on graph - bordercolor - Sets the border color of all hover labels on - graph. - font - Sets the default hover label font used by all - traces on the graph. - grouptitlefont - Sets the font for group titles in hover - (unified modes). Defaults to `hoverlabel.font`. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. """, ), **kwargs, diff --git a/plotly/validators/layout/_hovermode.py b/plotly/validators/layout/_hovermode.py index 33a84ecc6d..f8fcf95608 100644 --- a/plotly/validators/layout/_hovermode.py +++ b/plotly/validators/layout/_hovermode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HovermodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="hovermode", parent_name="layout", **kwargs): - super(HovermodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), values=kwargs.pop( "values", ["x", "y", "closest", False, "x unified", "y unified"] diff --git a/plotly/validators/layout/_hoversubplots.py b/plotly/validators/layout/_hoversubplots.py index 1290fff33e..9f161af50e 100644 --- a/plotly/validators/layout/_hoversubplots.py +++ b/plotly/validators/layout/_hoversubplots.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoversubplotsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HoversubplotsValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="hoversubplots", parent_name="layout", **kwargs): - super(HoversubplotsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["single", "overlaying", "axis"]), **kwargs, diff --git a/plotly/validators/layout/_iciclecolorway.py b/plotly/validators/layout/_iciclecolorway.py index 1c720184da..dfbf4e3e7c 100644 --- a/plotly/validators/layout/_iciclecolorway.py +++ b/plotly/validators/layout/_iciclecolorway.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IciclecolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): +class IciclecolorwayValidator(_bv.ColorlistValidator): def __init__(self, plotly_name="iciclecolorway", parent_name="layout", **kwargs): - super(IciclecolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_imagedefaults.py b/plotly/validators/layout/_imagedefaults.py index 0ffc4b4b55..6fb82f8958 100644 --- a/plotly/validators/layout/_imagedefaults.py +++ b/plotly/validators/layout/_imagedefaults.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImagedefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ImagedefaultsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="imagedefaults", parent_name="layout", **kwargs): - super(ImagedefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Image"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/_images.py b/plotly/validators/layout/_images.py index 055c4fc7f5..a41823163d 100644 --- a/plotly/validators/layout/_images.py +++ b/plotly/validators/layout/_images.py @@ -1,112 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImagesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ImagesValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="images", parent_name="layout", **kwargs): - super(ImagesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Image"), data_docs=kwargs.pop( "data_docs", """ - layer - Specifies whether images are drawn below or - above traces. When `xref` and `yref` are both - set to `paper`, image is drawn below the entire - plot area. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the image. - sizex - Sets the image container size horizontally. The - image will be sized based on the `position` - value. When `xref` is set to `paper`, units are - sized relative to the plot width. When `xref` - ends with ` domain`, units are sized relative - to the axis width. - sizey - Sets the image container size vertically. The - image will be sized based on the `position` - value. When `yref` is set to `paper`, units are - sized relative to the plot height. When `yref` - ends with ` domain`, units are sized relative - to the axis height. - sizing - Specifies which dimension of the image to - constrain. - source - Specifies the URL of the image to be used. The - URL must be accessible from the domain where - the plot code is run, and can be either - relative or absolute. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this image is - visible. - x - Sets the image's x position. When `xref` is set - to `paper`, units are sized relative to the - plot height. See `xref` for more info - xanchor - Sets the anchor for the x position - xref - Sets the images's x coordinate axis. If set to - a x axis id (e.g. "x" or "x2"), the `x` - position refers to a x coordinate. If set to - "paper", the `x` position refers to the - distance from the left of the plotting area in - normalized coordinates where 0 (1) corresponds - to the left (right). If set to a x axis ID - followed by "domain" (separated by a space), - the position behaves like for "paper", but - refers to the distance in fractions of the - domain length from the left of the domain of - that axis: e.g., *x2 domain* refers to the - domain of the second x axis and a x position - of 0.5 refers to the point between the left and - the right of the domain of the second x axis. - y - Sets the image's y position. When `yref` is set - to `paper`, units are sized relative to the - plot height. See `yref` for more info - yanchor - Sets the anchor for the y position. - yref - Sets the images's y coordinate axis. If set to - a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y coordinate. If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). If set to a y - axis ID followed by "domain" (separated by a - space), the position behaves like for "paper", - but refers to the distance in fractions of the - domain length from the bottom of the domain of - that axis: e.g., *y2 domain* refers to the - domain of the second y axis and a y position - of 0.5 refers to the point between the bottom - and the top of the domain of the second y axis. """, ), **kwargs, diff --git a/plotly/validators/layout/_legend.py b/plotly/validators/layout/_legend.py index ef5f28c294..ea28f4e4c7 100644 --- a/plotly/validators/layout/_legend.py +++ b/plotly/validators/layout/_legend.py @@ -1,144 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legend", parent_name="layout", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legend"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the legend background color. Defaults to - `layout.paper_bgcolor`. - bordercolor - Sets the color of the border enclosing the - legend. - borderwidth - Sets the width (in px) of the border enclosing - the legend. - entrywidth - Sets the width (in px or fraction) of the - legend. Use 0 to size the entry based on the - text width, when `entrywidthmode` is set to - "pixels". - entrywidthmode - Determines what entrywidth means. - font - Sets the font used to text the legend items. - groupclick - Determines the behavior on legend group item - click. "toggleitem" toggles the visibility of - the individual item clicked on the graph. - "togglegroup" toggles the visibility of all - items in the same legendgroup as the item - clicked on the graph. - grouptitlefont - Sets the font for group titles in legend. - Defaults to `legend.font` with its size - increased about 10%. - indentation - Sets the indentation (in px) of the legend - entries. - itemclick - Determines the behavior on legend item click. - "toggle" toggles the visibility of the item - clicked on the graph. "toggleothers" makes the - clicked item the sole visible item on the - graph. False disables legend item click - interactions. - itemdoubleclick - Determines the behavior on legend item double- - click. "toggle" toggles the visibility of the - item clicked on the graph. "toggleothers" makes - the clicked item the sole visible item on the - graph. False disables legend item double-click - interactions. - itemsizing - Determines if the legend items symbols scale - with their corresponding "trace" attributes or - remain "constant" independent of the symbol - size on the graph. - itemwidth - Sets the width (in px) of the legend item - symbols (the part other than the title.text). - orientation - Sets the orientation of the legend. - title - :class:`plotly.graph_objects.layout.legend.Titl - e` instance or dict with compatible properties - tracegroupgap - Sets the amount of vertical space (in px) - between legend groups. - traceorder - Determines the order at which the legend items - are displayed. If "normal", the items are - displayed top-to-bottom in the same order as - the input data. If "reversed", the items are - displayed in the opposite order as "normal". If - "grouped", the items are displayed in groups - (when a trace `legendgroup` is provided). if - "grouped+reversed", the items are displayed in - the opposite order as "grouped". - uirevision - Controls persistence of legend-driven changes - in trace and pie label visibility. Defaults to - `layout.uirevision`. - valign - Sets the vertical alignment of the symbols with - respect to their associated text. - visible - Determines whether or not this legend is - visible. - x - Sets the x position with respect to `xref` (in - normalized coordinates) of the legend. When - `xref` is "paper", defaults to 1.02 for - vertical legends and defaults to 0 for - horizontal legends. When `xref` is "container", - defaults to 1 for vertical legends and defaults - to 0 for horizontal legends. Must be between 0 - and 1 if `xref` is "container". and between - "-2" and 3 if `xref` is "paper". - xanchor - Sets the legend's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the legend. - Value "auto" anchors legends to the right for - `x` values greater than or equal to 2/3, - anchors legends to the left for `x` values less - than or equal to 1/3 and anchors legends with - respect to their center otherwise. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` (in - normalized coordinates) of the legend. When - `yref` is "paper", defaults to 1 for vertical - legends, defaults to "-0.1" for horizontal - legends on graphs w/o range sliders and - defaults to 1.1 for horizontal legends on graph - with one or multiple range sliders. When `yref` - is "container", defaults to 1. Must be between - 0 and 1 if `yref` is "container" and between - "-2" and 3 if `yref` is "paper". - yanchor - Sets the legend's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the legend. Value - "auto" anchors legends at their bottom for `y` - values less than or equal to 1/3, anchors - legends to at their top for `y` values greater - than or equal to 2/3 and anchors legends with - respect to their middle otherwise. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/layout/_map.py b/plotly/validators/layout/_map.py index e3f463c622..78f50136e1 100644 --- a/plotly/validators/layout/_map.py +++ b/plotly/validators/layout/_map.py @@ -1,68 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MapValidator(_plotly_utils.basevalidators.CompoundValidator): +class MapValidator(_bv.CompoundValidator): def __init__(self, plotly_name="map", parent_name="layout", **kwargs): - super(MapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Map"), data_docs=kwargs.pop( "data_docs", """ - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (map.bearing). - bounds - :class:`plotly.graph_objects.layout.map.Bounds` - instance or dict with compatible properties - center - :class:`plotly.graph_objects.layout.map.Center` - instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.map.Domain` - instance or dict with compatible properties - layers - A tuple of - :class:`plotly.graph_objects.layout.map.Layer` - instances or dicts with compatible properties - layerdefaults - When used in a template (as - layout.template.layout.map.layerdefaults), sets - the default property values to use for elements - of layout.map.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (map.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.map.layers`. These layers can be - defined either explicitly as a Map Style object - which can contain multiple layer definitions - that load data from any public or private Tile - Map Service (TMS or XYZ) or Web Map Service - (WMS) or implicitly by using one of the built- - in style objects which use WMSes or by using a - custom style URL Map Style objects are of the - form described in the MapLibre GL JS - documentation available at - https://maplibre.org/maplibre-style-spec/ The - built-in plotly.js styles objects are: basic, - carto-darkmatter, carto-darkmatter-nolabels, - carto-positron, carto-positron-nolabels, carto- - voyager, carto-voyager-nolabels, dark, light, - open-street-map, outdoors, satellite, - satellite-streets, streets, white-bg. - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (map.zoom). """, ), **kwargs, diff --git a/plotly/validators/layout/_mapbox.py b/plotly/validators/layout/_mapbox.py index ff98a1c3bb..b8cccad99b 100644 --- a/plotly/validators/layout/_mapbox.py +++ b/plotly/validators/layout/_mapbox.py @@ -1,84 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MapboxValidator(_plotly_utils.basevalidators.CompoundValidator): +class MapboxValidator(_bv.CompoundValidator): def __init__(self, plotly_name="mapbox", parent_name="layout", **kwargs): - super(MapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Mapbox"), data_docs=kwargs.pop( "data_docs", """ - accesstoken - Sets the mapbox access token to be used for - this mapbox map. Alternatively, the mapbox - access token can be set in the configuration - options under `mapboxAccessToken`. Note that - accessToken are only required when `style` (e.g - with values : basic, streets, outdoors, light, - dark, satellite, satellite-streets ) and/or a - layout layer references the Mapbox server. - bearing - Sets the bearing angle of the map in degrees - counter-clockwise from North (mapbox.bearing). - bounds - :class:`plotly.graph_objects.layout.mapbox.Boun - ds` instance or dict with compatible properties - center - :class:`plotly.graph_objects.layout.mapbox.Cent - er` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.mapbox.Doma - in` instance or dict with compatible properties - layers - A tuple of :class:`plotly.graph_objects.layout. - mapbox.Layer` instances or dicts with - compatible properties - layerdefaults - When used in a template (as - layout.template.layout.mapbox.layerdefaults), - sets the default property values to use for - elements of layout.mapbox.layers - pitch - Sets the pitch angle of the map (in degrees, - where 0 means perpendicular to the surface of - the map) (mapbox.pitch). - style - Defines the map layers that are rendered by - default below the trace layers defined in - `data`, which are themselves by default - rendered below the layers defined in - `layout.mapbox.layers`. These layers can be - defined either explicitly as a Mapbox Style - object which can contain multiple layer - definitions that load data from any public or - private Tile Map Service (TMS or XYZ) or Web - Map Service (WMS) or implicitly by using one of - the built-in style objects which use WMSes - which do not require any access tokens, or by - using a default Mapbox style or custom Mapbox - style URL, both of which require a Mapbox - access token Note that Mapbox access token can - be set in the `accesstoken` attribute or in the - `mapboxAccessToken` config option. Mapbox - Style objects are of the form described in the - Mapbox GL JS documentation available at - https://docs.mapbox.com/mapbox-gl-js/style-spec - The built-in plotly.js styles objects are: - carto-darkmatter, carto-positron, open-street- - map, stamen-terrain, stamen-toner, stamen- - watercolor, white-bg The built-in Mapbox - styles are: basic, streets, outdoors, light, - dark, satellite, satellite-streets Mapbox - style URLs are of the form: - mapbox://mapbox.mapbox-- - uirevision - Controls persistence of user-driven changes in - the view: `center`, `zoom`, `bearing`, `pitch`. - Defaults to `layout.uirevision`. - zoom - Sets the zoom level of the map (mapbox.zoom). """, ), **kwargs, diff --git a/plotly/validators/layout/_margin.py b/plotly/validators/layout/_margin.py index 5ca23ec7d9..19cd6bdaff 100644 --- a/plotly/validators/layout/_margin.py +++ b/plotly/validators/layout/_margin.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarginValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarginValidator(_bv.CompoundValidator): def __init__(self, plotly_name="margin", parent_name="layout", **kwargs): - super(MarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Margin"), data_docs=kwargs.pop( "data_docs", """ - autoexpand - Turns on/off margin expansion computations. - Legends, colorbars, updatemenus, sliders, axis - rangeselector and rangeslider are allowed to - push the margins by defaults. - b - Sets the bottom margin (in px). - l - Sets the left margin (in px). - pad - Sets the amount of padding (in px) between the - plotting area and the axis lines - r - Sets the right margin (in px). - t - Sets the top margin (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/_meta.py b/plotly/validators/layout/_meta.py index ce409d8281..8f8d68ae51 100644 --- a/plotly/validators/layout/_meta.py +++ b/plotly/validators/layout/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="layout", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/layout/_metasrc.py b/plotly/validators/layout/_metasrc.py index 95410b4d54..e298942b28 100644 --- a/plotly/validators/layout/_metasrc.py +++ b/plotly/validators/layout/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="layout", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_minreducedheight.py b/plotly/validators/layout/_minreducedheight.py index 3381ac82eb..f463849a28 100644 --- a/plotly/validators/layout/_minreducedheight.py +++ b/plotly/validators/layout/_minreducedheight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinreducedheightValidator(_plotly_utils.basevalidators.NumberValidator): +class MinreducedheightValidator(_bv.NumberValidator): def __init__(self, plotly_name="minreducedheight", parent_name="layout", **kwargs): - super(MinreducedheightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 2), **kwargs, diff --git a/plotly/validators/layout/_minreducedwidth.py b/plotly/validators/layout/_minreducedwidth.py index 0618ff740d..31c990e1e5 100644 --- a/plotly/validators/layout/_minreducedwidth.py +++ b/plotly/validators/layout/_minreducedwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinreducedwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class MinreducedwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="minreducedwidth", parent_name="layout", **kwargs): - super(MinreducedwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 2), **kwargs, diff --git a/plotly/validators/layout/_modebar.py b/plotly/validators/layout/_modebar.py index 9c50eaa668..2fc69079c8 100644 --- a/plotly/validators/layout/_modebar.py +++ b/plotly/validators/layout/_modebar.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModebarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ModebarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="modebar", parent_name="layout", **kwargs): - super(ModebarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Modebar"), data_docs=kwargs.pop( "data_docs", """ - activecolor - Sets the color of the active or hovered on - icons in the modebar. - add - Determines which predefined modebar buttons to - add. Please note that these buttons will only - be shown if they are compatible with all trace - types used in a graph. Similar to - `config.modeBarButtonsToAdd` option. This may - include "v1hovermode", "hoverclosest", - "hovercompare", "togglehover", - "togglespikelines", "drawline", "drawopenpath", - "drawclosedpath", "drawcircle", "drawrect", - "eraseshape". - addsrc - Sets the source reference on Chart Studio Cloud - for `add`. - bgcolor - Sets the background color of the modebar. - color - Sets the color of the icons in the modebar. - orientation - Sets the orientation of the modebar. - remove - Determines which predefined modebar buttons to - remove. Similar to - `config.modeBarButtonsToRemove` option. This - may include "autoScale2d", "autoscale", - "editInChartStudio", "editinchartstudio", - "hoverCompareCartesian", "hovercompare", - "lasso", "lasso2d", "orbitRotation", - "orbitrotation", "pan", "pan2d", "pan3d", - "reset", "resetCameraDefault3d", - "resetCameraLastSave3d", "resetGeo", - "resetSankeyGroup", "resetScale2d", - "resetViewMap", "resetViewMapbox", - "resetViews", "resetcameradefault", - "resetcameralastsave", "resetsankeygroup", - "resetscale", "resetview", "resetviews", - "select", "select2d", "sendDataToCloud", - "senddatatocloud", "tableRotation", - "tablerotation", "toImage", "toggleHover", - "toggleSpikelines", "togglehover", - "togglespikelines", "toimage", "zoom", - "zoom2d", "zoom3d", "zoomIn2d", "zoomInGeo", - "zoomInMap", "zoomInMapbox", "zoomOut2d", - "zoomOutGeo", "zoomOutMap", "zoomOutMapbox", - "zoomin", "zoomout". - removesrc - Sets the source reference on Chart Studio Cloud - for `remove`. - uirevision - Controls persistence of user-driven changes - related to the modebar, including `hovermode`, - `dragmode`, and `showspikes` at both the root - level and inside subplots. Defaults to - `layout.uirevision`. """, ), **kwargs, diff --git a/plotly/validators/layout/_newselection.py b/plotly/validators/layout/_newselection.py index 01b0ac441b..c0cfc33888 100644 --- a/plotly/validators/layout/_newselection.py +++ b/plotly/validators/layout/_newselection.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NewselectionValidator(_plotly_utils.basevalidators.CompoundValidator): +class NewselectionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="newselection", parent_name="layout", **kwargs): - super(NewselectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Newselection"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.layout.newselectio - n.Line` instance or dict with compatible - properties - mode - Describes how a new selection is created. If - `immediate`, a new selection is created after - first mouse up. If `gradual`, a new selection - is not created after first mouse. By adding to - and subtracting from the initial selection, - this option allows declaring extra outlines of - the selection. """, ), **kwargs, diff --git a/plotly/validators/layout/_newshape.py b/plotly/validators/layout/_newshape.py index 9e5690f9e2..d20ed3226c 100644 --- a/plotly/validators/layout/_newshape.py +++ b/plotly/validators/layout/_newshape.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NewshapeValidator(_plotly_utils.basevalidators.CompoundValidator): +class NewshapeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="newshape", parent_name="layout", **kwargs): - super(NewshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Newshape"), data_docs=kwargs.pop( "data_docs", """ - drawdirection - When `dragmode` is set to "drawrect", - "drawline" or "drawcircle" this limits the drag - to be horizontal, vertical or diagonal. Using - "diagonal" there is no limit e.g. in drawing - lines in any direction. "ortho" limits the draw - to be either horizontal or vertical. - "horizontal" allows horizontal extend. - "vertical" allows vertical extend. - fillcolor - Sets the color filling new shapes' interior. - Please note that if using a fillcolor with - alpha greater than half, drag inside the active - shape starts moving the shape underneath, - otherwise a new shape could be started over. - fillrule - Determines the path's interior. For more info - please visit https://developer.mozilla.org/en- - US/docs/Web/SVG/Attribute/fill-rule - label - :class:`plotly.graph_objects.layout.newshape.La - bel` instance or dict with compatible - properties - layer - Specifies whether new shapes are drawn below - gridlines ("below"), between gridlines and - traces ("between") or above traces ("above"). - legend - Sets the reference to a legend to show new - shape in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for new shape. Traces and - shapes part of the same legend group hide/show - at the same time when toggling legend items. - legendgrouptitle - :class:`plotly.graph_objects.layout.newshape.Le - gendgrouptitle` instance or dict with - compatible properties - legendrank - Sets the legend rank for new shape. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. - legendwidth - Sets the width (in px or fraction) of the - legend for new shape. - line - :class:`plotly.graph_objects.layout.newshape.Li - ne` instance or dict with compatible properties - name - Sets new shape name. The name appears as the - legend item. - opacity - Sets the opacity of new shapes. - showlegend - Determines whether or not new shape is shown in - the legend. - visible - Determines whether or not new shape is visible. - If "legendonly", the shape is not drawn, but - can appear as a legend item (provided that the - legend itself is visible). """, ), **kwargs, diff --git a/plotly/validators/layout/_paper_bgcolor.py b/plotly/validators/layout/_paper_bgcolor.py index cd94a97fd0..4404892c38 100644 --- a/plotly/validators/layout/_paper_bgcolor.py +++ b/plotly/validators/layout/_paper_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Paper_BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class Paper_BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="paper_bgcolor", parent_name="layout", **kwargs): - super(Paper_BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/_piecolorway.py b/plotly/validators/layout/_piecolorway.py index cdfe8a9101..dcbfd2519e 100644 --- a/plotly/validators/layout/_piecolorway.py +++ b/plotly/validators/layout/_piecolorway.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PiecolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): +class PiecolorwayValidator(_bv.ColorlistValidator): def __init__(self, plotly_name="piecolorway", parent_name="layout", **kwargs): - super(PiecolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_plot_bgcolor.py b/plotly/validators/layout/_plot_bgcolor.py index 7bda1ca3c4..167eae18e5 100644 --- a/plotly/validators/layout/_plot_bgcolor.py +++ b/plotly/validators/layout/_plot_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Plot_BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class Plot_BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="plot_bgcolor", parent_name="layout", **kwargs): - super(Plot_BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/_polar.py b/plotly/validators/layout/_polar.py index f399743ac6..1473ce623a 100644 --- a/plotly/validators/layout/_polar.py +++ b/plotly/validators/layout/_polar.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PolarValidator(_plotly_utils.basevalidators.CompoundValidator): +class PolarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="polar", parent_name="layout", **kwargs): - super(PolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Polar"), data_docs=kwargs.pop( "data_docs", """ - angularaxis - :class:`plotly.graph_objects.layout.polar.Angul - arAxis` instance or dict with compatible - properties - bargap - Sets the gap between bars of adjacent location - coordinates. Values are unitless, they - represent fractions of the minimum difference - in bar positions in the data. - barmode - Determines how bars at the same location - coordinate are displayed on the graph. With - "stack", the bars are stacked on top of one - another With "overlay", the bars are plotted - over one another, you might need to reduce - "opacity" to see multiple bars. - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.polar.Domai - n` instance or dict with compatible properties - gridshape - Determines if the radial axis grid lines and - angular axis line are drawn as "circular" - sectors or as "linear" (polygon) sectors. Has - an effect only when the angular axis has `type` - "category". Note that `radialaxis.angle` is - snapped to the angle of the closest vertex when - `gridshape` is "circular" (so that radial axis - scale is the same as the data scale). - hole - Sets the fraction of the radius to cut out of - the polar subplot. - radialaxis - :class:`plotly.graph_objects.layout.polar.Radia - lAxis` instance or dict with compatible - properties - sector - Sets angular span of this polar subplot with - two angles (in degrees). Sector are assumed to - be spanned in the counterclockwise direction - with 0 corresponding to rightmost limit of the - polar subplot. - uirevision - Controls persistence of user-driven changes in - axis attributes, if not overridden in the - individual axes. Defaults to - `layout.uirevision`. """, ), **kwargs, diff --git a/plotly/validators/layout/_scattergap.py b/plotly/validators/layout/_scattergap.py index 27689459b8..d09a79d6bc 100644 --- a/plotly/validators/layout/_scattergap.py +++ b/plotly/validators/layout/_scattergap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattergapValidator(_plotly_utils.basevalidators.NumberValidator): +class ScattergapValidator(_bv.NumberValidator): def __init__(self, plotly_name="scattergap", parent_name="layout", **kwargs): - super(ScattergapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_scattermode.py b/plotly/validators/layout/_scattermode.py index c747a3ceef..89d7d0bc14 100644 --- a/plotly/validators/layout/_scattermode.py +++ b/plotly/validators/layout/_scattermode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ScattermodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="scattermode", parent_name="layout", **kwargs): - super(ScattermodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["group", "overlay"]), **kwargs, diff --git a/plotly/validators/layout/_scene.py b/plotly/validators/layout/_scene.py index 8b28a08365..3bf684c72c 100644 --- a/plotly/validators/layout/_scene.py +++ b/plotly/validators/layout/_scene.py @@ -1,66 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.CompoundValidator): +class SceneValidator(_bv.CompoundValidator): def __init__(self, plotly_name="scene", parent_name="layout", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scene"), data_docs=kwargs.pop( "data_docs", """ - annotations - A tuple of :class:`plotly.graph_objects.layout. - scene.Annotation` instances or dicts with - compatible properties - annotationdefaults - When used in a template (as layout.template.lay - out.scene.annotationdefaults), sets the default - property values to use for elements of - layout.scene.annotations - aspectmode - If "cube", this scene's axes are drawn as a - cube, regardless of the axes' ranges. If - "data", this scene's axes are drawn in - proportion with the axes' ranges. If "manual", - this scene's axes are drawn in proportion with - the input of "aspectratio" (the default - behavior if "aspectratio" is provided). If - "auto", this scene's axes are drawn using the - results of "data" except when one axis is more - than four times the size of the two others, - where in that case the results of "cube" are - used. - aspectratio - Sets this scene's axis aspectratio. - bgcolor - - camera - :class:`plotly.graph_objects.layout.scene.Camer - a` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.scene.Domai - n` instance or dict with compatible properties - dragmode - Determines the mode of drag interactions for - this scene. - hovermode - Determines the mode of hover interactions for - this scene. - uirevision - Controls persistence of user-driven changes in - camera attributes. Defaults to - `layout.uirevision`. - xaxis - :class:`plotly.graph_objects.layout.scene.XAxis - ` instance or dict with compatible properties - yaxis - :class:`plotly.graph_objects.layout.scene.YAxis - ` instance or dict with compatible properties - zaxis - :class:`plotly.graph_objects.layout.scene.ZAxis - ` instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/layout/_selectdirection.py b/plotly/validators/layout/_selectdirection.py index 09a76e79bf..52fc4243c6 100644 --- a/plotly/validators/layout/_selectdirection.py +++ b/plotly/validators/layout/_selectdirection.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectdirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SelectdirectionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="selectdirection", parent_name="layout", **kwargs): - super(SelectdirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["h", "v", "d", "any"]), **kwargs, diff --git a/plotly/validators/layout/_selectiondefaults.py b/plotly/validators/layout/_selectiondefaults.py index fb2db11d1f..7c9f36a394 100644 --- a/plotly/validators/layout/_selectiondefaults.py +++ b/plotly/validators/layout/_selectiondefaults.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectiondefaultsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selectiondefaults", parent_name="layout", **kwargs): - super(SelectiondefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selection"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/_selectionrevision.py b/plotly/validators/layout/_selectionrevision.py index bfde6745e9..2d592671ac 100644 --- a/plotly/validators/layout/_selectionrevision.py +++ b/plotly/validators/layout/_selectionrevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectionrevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectionrevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectionrevision", parent_name="layout", **kwargs): - super(SelectionrevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_selections.py b/plotly/validators/layout/_selections.py index 6fcb510637..28b360f529 100644 --- a/plotly/validators/layout/_selections.py +++ b/plotly/validators/layout/_selections.py @@ -1,92 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class SelectionsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="selections", parent_name="layout", **kwargs): - super(SelectionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selection"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.layout.selection.L - ine` instance or dict with compatible - properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the selection. - path - For `type` "path" - a valid SVG path similar to - `shapes.path` in data coordinates. Allowed - segments are: M, L and Z. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the selection type to be drawn. If - "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`) and - (`x0`,`y1`). If "path", draw a custom SVG path - using `path`. - x0 - Sets the selection's starting x position. - x1 - Sets the selection's end x position. - xref - Sets the selection's x coordinate axis. If set - to a x axis id (e.g. "x" or "x2"), the `x` - position refers to a x coordinate. If set to - "paper", the `x` position refers to the - distance from the left of the plotting area in - normalized coordinates where 0 (1) corresponds - to the left (right). If set to a x axis ID - followed by "domain" (separated by a space), - the position behaves like for "paper", but - refers to the distance in fractions of the - domain length from the left of the domain of - that axis: e.g., *x2 domain* refers to the - domain of the second x axis and a x position - of 0.5 refers to the point between the left and - the right of the domain of the second x axis. - y0 - Sets the selection's starting y position. - y1 - Sets the selection's end y position. - yref - Sets the selection's x coordinate axis. If set - to a y axis id (e.g. "y" or "y2"), the `y` - position refers to a y coordinate. If set to - "paper", the `y` position refers to the - distance from the bottom of the plotting area - in normalized coordinates where 0 (1) - corresponds to the bottom (top). If set to a y - axis ID followed by "domain" (separated by a - space), the position behaves like for "paper", - but refers to the distance in fractions of the - domain length from the bottom of the domain of - that axis: e.g., *y2 domain* refers to the - domain of the second y axis and a y position - of 0.5 refers to the point between the bottom - and the top of the domain of the second y axis. """, ), **kwargs, diff --git a/plotly/validators/layout/_separators.py b/plotly/validators/layout/_separators.py index beccb46197..6be5ea14ee 100644 --- a/plotly/validators/layout/_separators.py +++ b/plotly/validators/layout/_separators.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatorsValidator(_plotly_utils.basevalidators.StringValidator): +class SeparatorsValidator(_bv.StringValidator): def __init__(self, plotly_name="separators", parent_name="layout", **kwargs): - super(SeparatorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/_shapedefaults.py b/plotly/validators/layout/_shapedefaults.py index 12dd9c1c3a..8994849b0f 100644 --- a/plotly/validators/layout/_shapedefaults.py +++ b/plotly/validators/layout/_shapedefaults.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapedefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ShapedefaultsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="shapedefaults", parent_name="layout", **kwargs): - super(ShapedefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Shape"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/_shapes.py b/plotly/validators/layout/_shapes.py index 8c6ef3cf92..b48eb99b01 100644 --- a/plotly/validators/layout/_shapes.py +++ b/plotly/validators/layout/_shapes.py @@ -1,249 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ShapesValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="shapes", parent_name="layout", **kwargs): - super(ShapesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Shape"), data_docs=kwargs.pop( "data_docs", """ - editable - Determines whether the shape could be activated - for edit or not. Has no effect when the older - editable shapes mode is enabled via - `config.editable` or - `config.edits.shapePosition`. - fillcolor - Sets the color filling the shape's interior. - Only applies to closed shapes. - fillrule - Determines which regions of complex paths - constitute the interior. For more info please - visit https://developer.mozilla.org/en- - US/docs/Web/SVG/Attribute/fill-rule - label - :class:`plotly.graph_objects.layout.shape.Label - ` instance or dict with compatible properties - layer - Specifies whether shapes are drawn below - gridlines ("below"), between gridlines and - traces ("between") or above traces ("above"). - legend - Sets the reference to a legend to show this - shape in. References to these legends are - "legend", "legend2", "legend3", etc. Settings - for these legends are set in the layout, under - `layout.legend`, `layout.legend2`, etc. - legendgroup - Sets the legend group for this shape. Traces - and shapes part of the same legend group - hide/show at the same time when toggling legend - items. - legendgrouptitle - :class:`plotly.graph_objects.layout.shape.Legen - dgrouptitle` instance or dict with compatible - properties - legendrank - Sets the legend rank for this shape. Items and - groups with smaller ranks are presented on - top/left side while with "reversed" - `legend.traceorder` they are on bottom/right - side. The default legendrank is 1000, so that - you can use ranks less than 1000 to place - certain items before all unranked items, and - ranks greater than 1000 to go after all - unranked items. When having unranked or equal - rank items shapes would be displayed after - traces i.e. according to their order in data - and layout. - legendwidth - Sets the width (in px or fraction) of the - legend for this shape. - line - :class:`plotly.graph_objects.layout.shape.Line` - instance or dict with compatible properties - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the shape. - path - For `type` "path" - a valid SVG path with the - pixel values replaced by data values in - `xsizemode`/`ysizemode` being "scaled" and - taken unmodified as pixels relative to - `xanchor` and `yanchor` in case of "pixel" size - mode. There are a few restrictions / quirks - only absolute instructions, not relative. So - the allowed segments are: M, L, H, V, Q, C, T, - S, and Z arcs (A) are not allowed because - radius rx and ry are relative. In the future we - could consider supporting relative commands, - but we would have to decide on how to handle - date and log axes. Note that even as is, Q and - C Bezier paths that are smooth on linear axes - may not be smooth on log, and vice versa. no - chained "polybezier" commands - specify the - segment type for each one. On category axes, - values are numbers scaled to the serial numbers - of categories because using the categories - themselves there would be no way to describe - fractional positions On data axes: because - space and T are both normal components of path - strings, we can't use either to separate date - from time parts. Therefore we'll use underscore - for this purpose: 2015-02-21_13:45:56.789 - showlegend - Determines whether or not this shape is shown - in the legend. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Specifies the shape type to be drawn. If - "line", a line is drawn from (`x0`,`y0`) to - (`x1`,`y1`) with respect to the axes' sizing - mode. If "circle", a circle is drawn from - ((`x0`+`x1`)/2, (`y0`+`y1`)/2)) with radius - (|(`x0`+`x1`)/2 - `x0`|, |(`y0`+`y1`)/2 - -`y0`)|) with respect to the axes' sizing mode. - If "rect", a rectangle is drawn linking - (`x0`,`y0`), (`x1`,`y0`), (`x1`,`y1`), - (`x0`,`y1`), (`x0`,`y0`) with respect to the - axes' sizing mode. If "path", draw a custom SVG - path using `path`. with respect to the axes' - sizing mode. - visible - Determines whether or not this shape is - visible. If "legendonly", the shape is not - drawn, but can appear as a legend item - (provided that the legend itself is visible). - x0 - Sets the shape's starting x position. See - `type` and `xsizemode` for more info. - x0shift - Shifts `x0` away from the center of the - category when `xref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - x1 - Sets the shape's end x position. See `type` and - `xsizemode` for more info. - x1shift - Shifts `x1` away from the center of the - category when `xref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - xanchor - Only relevant in conjunction with `xsizemode` - set to "pixel". Specifies the anchor point on - the x axis to which `x0`, `x1` and x - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `xsizemode` - not set to "pixel". - xref - Sets the shape's x coordinate axis. If set to a - x axis id (e.g. "x" or "x2"), the `x` position - refers to a x coordinate. If set to "paper", - the `x` position refers to the distance from - the left of the plotting area in normalized - coordinates where 0 (1) corresponds to the left - (right). If set to a x axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the left of the domain of that axis: e.g., *x2 - domain* refers to the domain of the second x - axis and a x position of 0.5 refers to the - point between the left and the right of the - domain of the second x axis. - xsizemode - Sets the shapes's sizing mode along the x axis. - If set to "scaled", `x0`, `x1` and x - coordinates within `path` refer to data values - on the x axis or a fraction of the plot area's - width (`xref` set to "paper"). If set to - "pixel", `xanchor` specifies the x position in - terms of data or plot fraction but `x0`, `x1` - and x coordinates within `path` are pixels - relative to `xanchor`. This way, the shape can - have a fixed width while maintaining a position - relative to data or plot fraction. - y0 - Sets the shape's starting y position. See - `type` and `ysizemode` for more info. - y0shift - Shifts `y0` away from the center of the - category when `yref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - y1 - Sets the shape's end y position. See `type` and - `ysizemode` for more info. - y1shift - Shifts `y1` away from the center of the - category when `yref` is a "category" or - "multicategory" axis. -0.5 corresponds to the - start of the category and 0.5 corresponds to - the end of the category. - yanchor - Only relevant in conjunction with `ysizemode` - set to "pixel". Specifies the anchor point on - the y axis to which `y0`, `y1` and y - coordinates within `path` are relative to. E.g. - useful to attach a pixel sized shape to a - certain data value. No effect when `ysizemode` - not set to "pixel". - yref - Sets the shape's y coordinate axis. If set to a - y axis id (e.g. "y" or "y2"), the `y` position - refers to a y coordinate. If set to "paper", - the `y` position refers to the distance from - the bottom of the plotting area in normalized - coordinates where 0 (1) corresponds to the - bottom (top). If set to a y axis ID followed by - "domain" (separated by a space), the position - behaves like for "paper", but refers to the - distance in fractions of the domain length from - the bottom of the domain of that axis: e.g., - *y2 domain* refers to the domain of the second - y axis and a y position of 0.5 refers to the - point between the bottom and the top of the - domain of the second y axis. - ysizemode - Sets the shapes's sizing mode along the y axis. - If set to "scaled", `y0`, `y1` and y - coordinates within `path` refer to data values - on the y axis or a fraction of the plot area's - height (`yref` set to "paper"). If set to - "pixel", `yanchor` specifies the y position in - terms of data or plot fraction but `y0`, `y1` - and y coordinates within `path` are pixels - relative to `yanchor`. This way, the shape can - have a fixed height while maintaining a - position relative to data or plot fraction. """, ), **kwargs, diff --git a/plotly/validators/layout/_showlegend.py b/plotly/validators/layout/_showlegend.py index 61285e2e1f..4d6af5bd91 100644 --- a/plotly/validators/layout/_showlegend.py +++ b/plotly/validators/layout/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="layout", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/_sliderdefaults.py b/plotly/validators/layout/_sliderdefaults.py index 46ff054d94..28136f0402 100644 --- a/plotly/validators/layout/_sliderdefaults.py +++ b/plotly/validators/layout/_sliderdefaults.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SliderdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class SliderdefaultsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="sliderdefaults", parent_name="layout", **kwargs): - super(SliderdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Slider"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/_sliders.py b/plotly/validators/layout/_sliders.py index c43ae5f32c..ee73b51d26 100644 --- a/plotly/validators/layout/_sliders.py +++ b/plotly/validators/layout/_sliders.py @@ -1,109 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SlidersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class SlidersValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="sliders", parent_name="layout", **kwargs): - super(SlidersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Slider"), data_docs=kwargs.pop( "data_docs", """ - active - Determines which button (by index starting from - 0) is considered active. - activebgcolor - Sets the background color of the slider grip - while dragging. - bgcolor - Sets the background color of the slider. - bordercolor - Sets the color of the border enclosing the - slider. - borderwidth - Sets the width (in px) of the border enclosing - the slider. - currentvalue - :class:`plotly.graph_objects.layout.slider.Curr - entvalue` instance or dict with compatible - properties - font - Sets the font of the slider step labels. - len - Sets the length of the slider This measure - excludes the padding of both ends. That is, the - slider's length is this length minus the - padding on both ends. - lenmode - Determines whether this slider length is set in - units of plot "fraction" or in *pixels. Use - `len` to set the value. - minorticklen - Sets the length in pixels of minor step tick - marks - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Set the padding of the slider component along - each side. - steps - A tuple of :class:`plotly.graph_objects.layout. - slider.Step` instances or dicts with compatible - properties - stepdefaults - When used in a template (as - layout.template.layout.slider.stepdefaults), - sets the default property values to use for - elements of layout.slider.steps - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickcolor - Sets the color of the border enclosing the - slider. - ticklen - Sets the length in pixels of step tick marks - tickwidth - Sets the tick width (in px). - transition - :class:`plotly.graph_objects.layout.slider.Tran - sition` instance or dict with compatible - properties - visible - Determines whether or not the slider is - visible. - x - Sets the x position (in normalized coordinates) - of the slider. - xanchor - Sets the slider's horizontal position anchor. - This anchor binds the `x` position to the - "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the slider. - yanchor - Sets the slider's vertical position anchor This - anchor binds the `y` position to the "top", - "middle" or "bottom" of the range selector. """, ), **kwargs, diff --git a/plotly/validators/layout/_smith.py b/plotly/validators/layout/_smith.py index b2a1aa5e80..669972dfe2 100644 --- a/plotly/validators/layout/_smith.py +++ b/plotly/validators/layout/_smith.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmithValidator(_plotly_utils.basevalidators.CompoundValidator): +class SmithValidator(_bv.CompoundValidator): def __init__(self, plotly_name="smith", parent_name="layout", **kwargs): - super(SmithValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Smith"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Set the background color of the subplot - domain - :class:`plotly.graph_objects.layout.smith.Domai - n` instance or dict with compatible properties - imaginaryaxis - :class:`plotly.graph_objects.layout.smith.Imagi - naryaxis` instance or dict with compatible - properties - realaxis - :class:`plotly.graph_objects.layout.smith.Reala - xis` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/layout/_spikedistance.py b/plotly/validators/layout/_spikedistance.py index 41158dde8c..f6cc08171f 100644 --- a/plotly/validators/layout/_spikedistance.py +++ b/plotly/validators/layout/_spikedistance.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikedistanceValidator(_plotly_utils.basevalidators.IntegerValidator): +class SpikedistanceValidator(_bv.IntegerValidator): def __init__(self, plotly_name="spikedistance", parent_name="layout", **kwargs): - super(SpikedistanceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), **kwargs, diff --git a/plotly/validators/layout/_sunburstcolorway.py b/plotly/validators/layout/_sunburstcolorway.py index b0cc21ddb9..bafe573cee 100644 --- a/plotly/validators/layout/_sunburstcolorway.py +++ b/plotly/validators/layout/_sunburstcolorway.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SunburstcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): +class SunburstcolorwayValidator(_bv.ColorlistValidator): def __init__(self, plotly_name="sunburstcolorway", parent_name="layout", **kwargs): - super(SunburstcolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_template.py b/plotly/validators/layout/_template.py index 3f612073dd..ce94644826 100644 --- a/plotly/validators/layout/_template.py +++ b/plotly/validators/layout/_template.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateValidator(_plotly_utils.basevalidators.BaseTemplateValidator): +class TemplateValidator(_bv.BaseTemplateValidator): def __init__(self, plotly_name="template", parent_name="layout", **kwargs): - super(TemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Template"), data_docs=kwargs.pop( "data_docs", """ - data - :class:`plotly.graph_objects.layout.template.Da - ta` instance or dict with compatible properties - layout - :class:`plotly.graph_objects.Layout` instance - or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/layout/_ternary.py b/plotly/validators/layout/_ternary.py index 4be51c5256..54dde65922 100644 --- a/plotly/validators/layout/_ternary.py +++ b/plotly/validators/layout/_ternary.py @@ -1,38 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TernaryValidator(_plotly_utils.basevalidators.CompoundValidator): +class TernaryValidator(_bv.CompoundValidator): def __init__(self, plotly_name="ternary", parent_name="layout", **kwargs): - super(TernaryValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Ternary"), data_docs=kwargs.pop( "data_docs", """ - aaxis - :class:`plotly.graph_objects.layout.ternary.Aax - is` instance or dict with compatible properties - baxis - :class:`plotly.graph_objects.layout.ternary.Bax - is` instance or dict with compatible properties - bgcolor - Set the background color of the subplot - caxis - :class:`plotly.graph_objects.layout.ternary.Cax - is` instance or dict with compatible properties - domain - :class:`plotly.graph_objects.layout.ternary.Dom - ain` instance or dict with compatible - properties - sum - The number each triplet should sum to, and the - maximum range of each axis - uirevision - Controls persistence of user-driven changes in - axis `min` and `title`, if not overridden in - the individual axes. Defaults to - `layout.uirevision`. """, ), **kwargs, diff --git a/plotly/validators/layout/_title.py b/plotly/validators/layout/_title.py index 6dc1b258d3..a0d1a0b791 100644 --- a/plotly/validators/layout/_title.py +++ b/plotly/validators/layout/_title.py @@ -1,82 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - automargin - Determines whether the title can automatically - push the figure margins. If `yref='paper'` then - the margin will expand to ensure that the title - doesn’t overlap with the edges of the - container. If `yref='container'` then the - margins will ensure that the title doesn’t - overlap with the plot area, tick labels, and - axis titles. If `automargin=true` and the - margins need to be expanded, then y will be set - to a default 1 and yanchor will be set to an - appropriate default to ensure that minimal - margin space is needed. Note that when - `yref='paper'`, only 1 or 0 are allowed y - values. Invalid values will be reset to the - default 1. - font - Sets the title font. - pad - Sets the padding of the title. Each padding - value only applies when the corresponding - `xanchor`/`yanchor` value is set accordingly. - E.g. for left padding to take effect, `xanchor` - must be set to "left". The same rule applies if - `xanchor`/`yanchor` is determined - automatically. Padding is muted if the - respective anchor value is "middle*/*center". - subtitle - :class:`plotly.graph_objects.layout.title.Subti - tle` instance or dict with compatible - properties - text - Sets the plot's title. - x - Sets the x position with respect to `xref` in - normalized coordinates from 0 (left) to 1 - (right). - xanchor - Sets the title's horizontal alignment with - respect to its x position. "left" means that - the title starts at x, "right" means that the - title ends at x and "center" means that the - title's center is at x. "auto" divides `xref` - by three and calculates the `xanchor` value - automatically based on the value of `x`. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` in - normalized coordinates from 0 (bottom) to 1 - (top). "auto" places the baseline of the title - onto the vertical center of the top margin. - yanchor - Sets the title's vertical alignment with - respect to its y position. "top" means that the - title's cap line is at y, "bottom" means that - the title's baseline is at y and "middle" means - that the title's midline is at y. "auto" - divides `yref` by three and calculates the - `yanchor` value automatically based on the - value of `y`. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/layout/_transition.py b/plotly/validators/layout/_transition.py index edc2c1a673..df5220e81f 100644 --- a/plotly/validators/layout/_transition.py +++ b/plotly/validators/layout/_transition.py @@ -1,25 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): +class TransitionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="transition", parent_name="layout", **kwargs): - super(TransitionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Transition"), data_docs=kwargs.pop( "data_docs", """ - duration - The duration of the transition, in - milliseconds. If equal to zero, updates are - synchronous. - easing - The easing function used for the transition - ordering - Determines whether the figure's layout or - traces smoothly transitions during updates that - make both traces and layout change. """, ), **kwargs, diff --git a/plotly/validators/layout/_treemapcolorway.py b/plotly/validators/layout/_treemapcolorway.py index 1567bd2e6f..1e600f21f1 100644 --- a/plotly/validators/layout/_treemapcolorway.py +++ b/plotly/validators/layout/_treemapcolorway.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TreemapcolorwayValidator(_plotly_utils.basevalidators.ColorlistValidator): +class TreemapcolorwayValidator(_bv.ColorlistValidator): def __init__(self, plotly_name="treemapcolorway", parent_name="layout", **kwargs): - super(TreemapcolorwayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/_uirevision.py b/plotly/validators/layout/_uirevision.py index 0677a49b85..867b6e777f 100644 --- a/plotly/validators/layout/_uirevision.py +++ b/plotly/validators/layout/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/_uniformtext.py b/plotly/validators/layout/_uniformtext.py index e768a0c7a0..4cbdd666a2 100644 --- a/plotly/validators/layout/_uniformtext.py +++ b/plotly/validators/layout/_uniformtext.py @@ -1,29 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UniformtextValidator(_plotly_utils.basevalidators.CompoundValidator): +class UniformtextValidator(_bv.CompoundValidator): def __init__(self, plotly_name="uniformtext", parent_name="layout", **kwargs): - super(UniformtextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Uniformtext"), data_docs=kwargs.pop( "data_docs", """ - minsize - Sets the minimum text size between traces of - the same type. - mode - Determines how the font size for various text - elements are uniformed between each trace type. - If the computed text sizes were smaller than - the minimum size defined by - `uniformtext.minsize` using "hide" option hides - the text; and using "show" option shows the - text without further downscaling. Please note - that if the size defined by `minsize` is - greater than the font size defined by trace, - then the `minsize` is used. """, ), **kwargs, diff --git a/plotly/validators/layout/_updatemenudefaults.py b/plotly/validators/layout/_updatemenudefaults.py index 065656e861..c8eb2b58da 100644 --- a/plotly/validators/layout/_updatemenudefaults.py +++ b/plotly/validators/layout/_updatemenudefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UpdatemenudefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class UpdatemenudefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="updatemenudefaults", parent_name="layout", **kwargs ): - super(UpdatemenudefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Updatemenu"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/_updatemenus.py b/plotly/validators/layout/_updatemenus.py index dab9febd51..cde5131157 100644 --- a/plotly/validators/layout/_updatemenus.py +++ b/plotly/validators/layout/_updatemenus.py @@ -1,94 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UpdatemenusValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class UpdatemenusValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="updatemenus", parent_name="layout", **kwargs): - super(UpdatemenusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Updatemenu"), data_docs=kwargs.pop( "data_docs", """ - active - Determines which button (by index starting from - 0) is considered active. - bgcolor - Sets the background color of the update menu - buttons. - bordercolor - Sets the color of the border enclosing the - update menu. - borderwidth - Sets the width (in px) of the border enclosing - the update menu. - buttons - A tuple of :class:`plotly.graph_objects.layout. - updatemenu.Button` instances or dicts with - compatible properties - buttondefaults - When used in a template (as layout.template.lay - out.updatemenu.buttondefaults), sets the - default property values to use for elements of - layout.updatemenu.buttons - direction - Determines the direction in which the buttons - are laid out, whether in a dropdown menu or a - row/column of buttons. For `left` and `up`, the - buttons will still appear in left-to-right or - top-to-bottom order respectively. - font - Sets the font of the update menu button text. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pad - Sets the padding around the buttons or dropdown - menu. - showactive - Highlights active dropdown item or active - button if true. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Determines whether the buttons are accessible - via a dropdown menu or whether the buttons are - stacked horizontally or vertically - visible - Determines whether or not the update menu is - visible. - x - Sets the x position (in normalized coordinates) - of the update menu. - xanchor - Sets the update menu's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the update menu. - yanchor - Sets the update menu's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the range - selector. """, ), **kwargs, diff --git a/plotly/validators/layout/_violingap.py b/plotly/validators/layout/_violingap.py index 37a395cd4d..089c8f66a2 100644 --- a/plotly/validators/layout/_violingap.py +++ b/plotly/validators/layout/_violingap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ViolingapValidator(_plotly_utils.basevalidators.NumberValidator): +class ViolingapValidator(_bv.NumberValidator): def __init__(self, plotly_name="violingap", parent_name="layout", **kwargs): - super(ViolingapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_violingroupgap.py b/plotly/validators/layout/_violingroupgap.py index b56c26657e..ba9e0c351b 100644 --- a/plotly/validators/layout/_violingroupgap.py +++ b/plotly/validators/layout/_violingroupgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ViolingroupgapValidator(_plotly_utils.basevalidators.NumberValidator): +class ViolingroupgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="violingroupgap", parent_name="layout", **kwargs): - super(ViolingroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_violinmode.py b/plotly/validators/layout/_violinmode.py index 78c2824d39..1a83c92957 100644 --- a/plotly/validators/layout/_violinmode.py +++ b/plotly/validators/layout/_violinmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ViolinmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ViolinmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="violinmode", parent_name="layout", **kwargs): - super(ViolinmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["group", "overlay"]), **kwargs, diff --git a/plotly/validators/layout/_waterfallgap.py b/plotly/validators/layout/_waterfallgap.py index 42f8259505..ceaa956d44 100644 --- a/plotly/validators/layout/_waterfallgap.py +++ b/plotly/validators/layout/_waterfallgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WaterfallgapValidator(_plotly_utils.basevalidators.NumberValidator): +class WaterfallgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="waterfallgap", parent_name="layout", **kwargs): - super(WaterfallgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_waterfallgroupgap.py b/plotly/validators/layout/_waterfallgroupgap.py index 7cbeb7b121..7e1e0b46bf 100644 --- a/plotly/validators/layout/_waterfallgroupgap.py +++ b/plotly/validators/layout/_waterfallgroupgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WaterfallgroupgapValidator(_plotly_utils.basevalidators.NumberValidator): +class WaterfallgroupgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="waterfallgroupgap", parent_name="layout", **kwargs): - super(WaterfallgroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/_waterfallmode.py b/plotly/validators/layout/_waterfallmode.py index 6c590f2d41..30e27f7cf9 100644 --- a/plotly/validators/layout/_waterfallmode.py +++ b/plotly/validators/layout/_waterfallmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WaterfallmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class WaterfallmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="waterfallmode", parent_name="layout", **kwargs): - super(WaterfallmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["group", "overlay"]), **kwargs, diff --git a/plotly/validators/layout/_width.py b/plotly/validators/layout/_width.py index cf15a2e8c9..efaa9cbc67 100644 --- a/plotly/validators/layout/_width.py +++ b/plotly/validators/layout/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="layout", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 10), **kwargs, diff --git a/plotly/validators/layout/_xaxis.py b/plotly/validators/layout/_xaxis.py index 23e776bf0a..3c69a04d85 100644 --- a/plotly/validators/layout/_xaxis.py +++ b/plotly/validators/layout/_xaxis.py @@ -1,584 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class XaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="xaxis", parent_name="layout", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "XAxis"), data_docs=kwargs.pop( "data_docs", """ - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.xaxis.Autor - angeoptions` instance or dict with compatible - properties - autotickangles - When `tickangle` is set to "auto", it will be - set to the first angle in this array that is - large enough to prevent label overlap. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range", or by - decreasing the "domain". Default is "domain" - for axes containing image traces, "range" - otherwise. - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - insiderange - Could be used to set the desired inside range - of this axis (excluding the labels) when - `ticklabelposition` of the anchored axis has - "inside". Not implemented for axes with `type` - "log". This would be ignored when `range` is - provided. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - minor - :class:`plotly.graph_objects.layout.xaxis.Minor - ` instance or dict with compatible properties - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.xaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.xaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - rangeselector - :class:`plotly.graph_objects.layout.xaxis.Range - selector` instance or dict with compatible - properties - rangeslider - :class:`plotly.graph_objects.layout.xaxis.Range - slider` instance or dict with compatible - properties - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - Setting `false` allows to remove a default - constraint (occasionally, you may need to - prevent a default `scaleanchor` constraint from - being applied, eg. when having an image trace - `yaxis: {scaleanchor: "x"}` is set - automatically in order for pixels to be - rendered as squares, setting `yaxis: - {scaleanchor: false}` allows to remove the - constraint). - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - xaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.xaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.xaxis.tickformatstops - ticklabelindex - Only for axes with `type` "date" or "linear". - Instead of drawing the major tick label, draw - the label for the minor tick that is n - positions away from the major tick. E.g. to - always draw the label for the minor tick before - each major tick, choose `ticklabelindex` -1. - This is useful for date axes with - `ticklabelmode` "period" if you want to label - the period that ends with each major tick - instead of the period that begins there. - ticklabelindexsrc - Sets the source reference on Chart Studio Cloud - for `ticklabelindex`. - ticklabelmode - Determines where tick labels are drawn with - respect to their corresponding ticks and grid - lines. Only has an effect for axes of `type` - "date" When set to "period", tick labels are - drawn in the middle of the period between - ticks. - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. Otherwise on - "category" and "multicategory" axes the default - is "allow". In other cases the default is *hide - past div*. - ticklabelposition - Determines where tick labels are drawn with - respect to the axis Please note that top or - bottom has no effect on x axes or when - `ticklabelmode` is set to "period". Similarly - left or right has no effect on y axes or when - `ticklabelmode` is set to "period". Has no - effect on "multicategory" axes or when - `tickson` is set to "boundaries". When used on - axes linked by `matches` or `scaleanchor`, no - extra padding for inside labels would be added - by autorange, so that the scales could match. - ticklabelshift - Shifts the tick labels by the specified number - of pixels in parallel to the axis. Positive - values move the labels in the positive - direction of the axis. - ticklabelstandoff - Sets the standoff distance (in px) between the - axis tick labels and their default position. A - positive `ticklabelstandoff` moves the labels - farther away from the plot area if - `ticklabelposition` is "outside", and deeper - into the plot area if `ticklabelposition` is - "inside". A negative `ticklabelstandoff` works - in the opposite direction, moving outside ticks - towards the plot area and inside ticks towards - the outside. If the negative value is large - enough, inside ticks can even end up outside - and vice versa. - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). If "sync", the number of ticks will - sync with the overlayed axis set by - `overlaying` property. - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.xaxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. """, ), **kwargs, diff --git a/plotly/validators/layout/_yaxis.py b/plotly/validators/layout/_yaxis.py index 6715092795..79d6bbac53 100644 --- a/plotly/validators/layout/_yaxis.py +++ b/plotly/validators/layout/_yaxis.py @@ -1,595 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class YaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="yaxis", parent_name="layout", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "YAxis"), data_docs=kwargs.pop( "data_docs", """ - anchor - If set to an opposite-letter axis id (e.g. - `x2`, `y`), this axis is bound to the - corresponding opposite-letter axis. If set to - "free", this axis' position is determined by - `position`. - automargin - Determines whether long tick labels - automatically grow the figure margins. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.yaxis.Autor - angeoptions` instance or dict with compatible - properties - autoshift - Automatically reposition the axis to avoid - overlap with other axes with the same - `overlaying` value. This repositioning will - account for any `shift` amount applied to other - axes on the same side with `autoshift` is set - to true. Only has an effect if `anchor` is set - to "free". - autotickangles - When `tickangle` is set to "auto", it will be - set to the first angle in this array that is - large enough to prevent label overlap. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - constrain - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines how that - happens: by increasing the "range", or by - decreasing the "domain". Default is "domain" - for axes containing image traces, "range" - otherwise. - constraintoward - If this axis needs to be compressed (either due - to its own `scaleanchor` and `scaleratio` or - those of the other axis), determines which - direction we push the originally specified plot - area. Options are "left", "center" (default), - and "right" for x axes, and "top", "middle" - (default), and "bottom" for y axes. - dividercolor - Sets the color of the dividers Only has an - effect on "multicategory" axes. - dividerwidth - Sets the width (in px) of the dividers Only has - an effect on "multicategory" axes. - domain - Sets the domain of this axis (in plot - fraction). - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - fixedrange - Determines whether or not this axis is zoom- - able. If true, then zoom is disabled. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - insiderange - Could be used to set the desired inside range - of this axis (excluding the labels) when - `ticklabelposition` of the anchored axis has - "inside". Not implemented for axes with `type` - "log". This would be ignored when `range` is - provided. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - matches - If set to another axis id (e.g. `x2`, `y`), the - range of this axis will match the range of the - corresponding axis in data-coordinates space. - Moreover, matching axes share auto-range - values, category lists and histogram auto-bins. - Note that setting axes simultaneously in both a - `scaleanchor` and a `matches` constraint is - currently forbidden. Moreover, note that - matching axes must have the same `type`. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - minor - :class:`plotly.graph_objects.layout.yaxis.Minor - ` instance or dict with compatible properties - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - overlaying - If set a same-letter axis id, this axis is - overlaid on top of the corresponding same- - letter axis, with traces and axes visible for - both axes. If False, this axis does not overlay - any same-letter axes. In this case, for axes - with overlapping domains only the highest- - numbered axis will be visible. - position - Sets the position of this axis in the plotting - space (in normalized coordinates). Only has an - effect if `anchor` is set to "free". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangebreaks - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Rangebreak` instances or dicts with - compatible properties - rangebreakdefaults - When used in a template (as layout.template.lay - out.yaxis.rangebreakdefaults), sets the default - property values to use for elements of - layout.yaxis.rangebreaks - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - scaleanchor - If set to another axis id (e.g. `x2`, `y`), the - range of this axis changes together with the - range of the corresponding axis such that the - scale of pixels per unit is in a constant - ratio. Both axes are still zoomable, but when - you zoom one, the other will zoom the same - amount, keeping a fixed midpoint. `constrain` - and `constraintoward` determine how we enforce - the constraint. You can chain these, ie `yaxis: - {scaleanchor: *x*}, xaxis2: {scaleanchor: *y*}` - but you can only link axes of the same `type`. - The linked axis can have the opposite letter - (to constrain the aspect ratio) or the same - letter (to match scales across subplots). Loops - (`yaxis: {scaleanchor: *x*}, xaxis: - {scaleanchor: *y*}` or longer) are redundant - and the last constraint encountered will be - ignored to avoid possible inconsistent - constraints via `scaleratio`. Note that setting - axes simultaneously in both a `scaleanchor` and - a `matches` constraint is currently forbidden. - Setting `false` allows to remove a default - constraint (occasionally, you may need to - prevent a default `scaleanchor` constraint from - being applied, eg. when having an image trace - `yaxis: {scaleanchor: "x"}` is set - automatically in order for pixels to be - rendered as squares, setting `yaxis: - {scaleanchor: false}` allows to remove the - constraint). - scaleratio - If this axis is linked to another by - `scaleanchor`, this determines the pixel to - unit scale ratio. For example, if this value is - 10, then every unit on this axis spans 10 times - the number of pixels as a unit on the linked - axis. Use this for example to create an - elevation profile where the vertical scale is - exaggerated a fixed amount with respect to the - horizontal. - separatethousands - If "true", even 4-digit integers are separated - shift - Moves the axis a given number of pixels from - where it would have been otherwise. Accepts - both positive and negative values, which will - shift the axis either right or left, - respectively. If `autoshift` is set to true, - then this defaults to a padding of -3 if `side` - is set to "left". and defaults to +3 if `side` - is set to "right". Defaults to 0 if `autoshift` - is set to false. Only has an effect if `anchor` - is set to "free". - showdividers - Determines whether or not a dividers are drawn - between the category levels of this axis. Only - has an effect on "multicategory" axes. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Determines whether or not spikes (aka - droplines) are drawn for this axis. Note: This - only takes affect when hovermode = closest - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines whether a x (y) axis is positioned - at the "bottom" ("left") or "top" ("right") of - the plotting area. - spikecolor - Sets the spike color. If undefined, will use - the series color - spikedash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - spikemode - Determines the drawing mode for the spike line - If "toaxis", the line is drawn from the data - point to the axis the series is plotted on. If - "across", the line is drawn across the entire - plot area, and supercedes "toaxis". If - "marker", then a marker dot is drawn on the - axis the series is plotted on - spikesnap - Determines whether spikelines are stuck to the - cursor or to the closest datapoints. - spikethickness - Sets the width (in px) of the zero line. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - yaxis.Tickformatstop` instances or dicts with - compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.yaxis.tickformatstopdefaults), sets the - default property values to use for elements of - layout.yaxis.tickformatstops - ticklabelindex - Only for axes with `type` "date" or "linear". - Instead of drawing the major tick label, draw - the label for the minor tick that is n - positions away from the major tick. E.g. to - always draw the label for the minor tick before - each major tick, choose `ticklabelindex` -1. - This is useful for date axes with - `ticklabelmode` "period" if you want to label - the period that ends with each major tick - instead of the period that begins there. - ticklabelindexsrc - Sets the source reference on Chart Studio Cloud - for `ticklabelindex`. - ticklabelmode - Determines where tick labels are drawn with - respect to their corresponding ticks and grid - lines. Only has an effect for axes of `type` - "date" When set to "period", tick labels are - drawn in the middle of the period between - ticks. - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. Otherwise on - "category" and "multicategory" axes the default - is "allow". In other cases the default is *hide - past div*. - ticklabelposition - Determines where tick labels are drawn with - respect to the axis Please note that top or - bottom has no effect on x axes or when - `ticklabelmode` is set to "period". Similarly - left or right has no effect on y axes or when - `ticklabelmode` is set to "period". Has no - effect on "multicategory" axes or when - `tickson` is set to "boundaries". When used on - axes linked by `matches` or `scaleanchor`, no - extra padding for inside labels would be added - by autorange, so that the scales could match. - ticklabelshift - Shifts the tick labels by the specified number - of pixels in parallel to the axis. Positive - values move the labels in the positive - direction of the axis. - ticklabelstandoff - Sets the standoff distance (in px) between the - axis tick labels and their default position. A - positive `ticklabelstandoff` moves the labels - farther away from the plot area if - `ticklabelposition` is "outside", and deeper - into the plot area if `ticklabelposition` is - "inside". A negative `ticklabelstandoff` works - in the opposite direction, moving outside ticks - towards the plot area and inside ticks towards - the outside. If the negative value is large - enough, inside ticks can even end up outside - and vice versa. - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). If "sync", the number of ticks will - sync with the overlayed axis set by - `overlaying` property. - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickson - Determines where ticks and grid lines are drawn - with respect to their corresponding tick - labels. Only has an effect for axes of `type` - "category" or "multicategory". When set to - "boundaries", ticks and grid lines are drawn - half a category to the left/bottom of labels. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.yaxis.Title - ` instance or dict with compatible properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, and `title` if in - `editable: true` configuration. Defaults to - `layout.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. """, ), **kwargs, diff --git a/plotly/validators/layout/activeselection/__init__.py b/plotly/validators/layout/activeselection/__init__.py index 37b66700cd..77d0d42f57 100644 --- a/plotly/validators/layout/activeselection/__init__.py +++ b/plotly/validators/layout/activeselection/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._fillcolor import FillcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._fillcolor.FillcolorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._fillcolor.FillcolorValidator"] +) diff --git a/plotly/validators/layout/activeselection/_fillcolor.py b/plotly/validators/layout/activeselection/_fillcolor.py index 8e67e61522..0f1a3153f7 100644 --- a/plotly/validators/layout/activeselection/_fillcolor.py +++ b/plotly/validators/layout/activeselection/_fillcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fillcolor", parent_name="layout.activeselection", **kwargs ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/activeselection/_opacity.py b/plotly/validators/layout/activeselection/_opacity.py index 14f50b9a60..8e8fc738da 100644 --- a/plotly/validators/layout/activeselection/_opacity.py +++ b/plotly/validators/layout/activeselection/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="layout.activeselection", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/activeshape/__init__.py b/plotly/validators/layout/activeshape/__init__.py index 37b66700cd..77d0d42f57 100644 --- a/plotly/validators/layout/activeshape/__init__.py +++ b/plotly/validators/layout/activeshape/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._fillcolor import FillcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._fillcolor.FillcolorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._fillcolor.FillcolorValidator"] +) diff --git a/plotly/validators/layout/activeshape/_fillcolor.py b/plotly/validators/layout/activeshape/_fillcolor.py index 4f95513188..31f66a15bd 100644 --- a/plotly/validators/layout/activeshape/_fillcolor.py +++ b/plotly/validators/layout/activeshape/_fillcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fillcolor", parent_name="layout.activeshape", **kwargs ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/activeshape/_opacity.py b/plotly/validators/layout/activeshape/_opacity.py index ad2b9f45e0..8e405f11f6 100644 --- a/plotly/validators/layout/activeshape/_opacity.py +++ b/plotly/validators/layout/activeshape/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="layout.activeshape", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/annotation/__init__.py b/plotly/validators/layout/annotation/__init__.py index 90ee50de9b..2e288b849b 100644 --- a/plotly/validators/layout/annotation/__init__.py +++ b/plotly/validators/layout/annotation/__init__.py @@ -1,99 +1,52 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yshift import YshiftValidator - from ._yref import YrefValidator - from ._yclick import YclickValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xshift import XshiftValidator - from ._xref import XrefValidator - from ._xclick import XclickValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valign import ValignValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._templateitemname import TemplateitemnameValidator - from ._startstandoff import StartstandoffValidator - from ._startarrowsize import StartarrowsizeValidator - from ._startarrowhead import StartarrowheadValidator - from ._standoff import StandoffValidator - from ._showarrow import ShowarrowValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._hovertext import HovertextValidator - from ._hoverlabel import HoverlabelValidator - from ._height import HeightValidator - from ._font import FontValidator - from ._clicktoshow import ClicktoshowValidator - from ._captureevents import CaptureeventsValidator - from ._borderwidth import BorderwidthValidator - from ._borderpad import BorderpadValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._ayref import AyrefValidator - from ._ay import AyValidator - from ._axref import AxrefValidator - from ._ax import AxValidator - from ._arrowwidth import ArrowwidthValidator - from ._arrowsize import ArrowsizeValidator - from ._arrowside import ArrowsideValidator - from ._arrowhead import ArrowheadValidator - from ._arrowcolor import ArrowcolorValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yshift.YshiftValidator", - "._yref.YrefValidator", - "._yclick.YclickValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xshift.XshiftValidator", - "._xref.XrefValidator", - "._xclick.XclickValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valign.ValignValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._templateitemname.TemplateitemnameValidator", - "._startstandoff.StartstandoffValidator", - "._startarrowsize.StartarrowsizeValidator", - "._startarrowhead.StartarrowheadValidator", - "._standoff.StandoffValidator", - "._showarrow.ShowarrowValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._hovertext.HovertextValidator", - "._hoverlabel.HoverlabelValidator", - "._height.HeightValidator", - "._font.FontValidator", - "._clicktoshow.ClicktoshowValidator", - "._captureevents.CaptureeventsValidator", - "._borderwidth.BorderwidthValidator", - "._borderpad.BorderpadValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._ayref.AyrefValidator", - "._ay.AyValidator", - "._axref.AxrefValidator", - "._ax.AxValidator", - "._arrowwidth.ArrowwidthValidator", - "._arrowsize.ArrowsizeValidator", - "._arrowside.ArrowsideValidator", - "._arrowhead.ArrowheadValidator", - "._arrowcolor.ArrowcolorValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yshift.YshiftValidator", + "._yref.YrefValidator", + "._yclick.YclickValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xshift.XshiftValidator", + "._xref.XrefValidator", + "._xclick.XclickValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valign.ValignValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._templateitemname.TemplateitemnameValidator", + "._startstandoff.StartstandoffValidator", + "._startarrowsize.StartarrowsizeValidator", + "._startarrowhead.StartarrowheadValidator", + "._standoff.StandoffValidator", + "._showarrow.ShowarrowValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._height.HeightValidator", + "._font.FontValidator", + "._clicktoshow.ClicktoshowValidator", + "._captureevents.CaptureeventsValidator", + "._borderwidth.BorderwidthValidator", + "._borderpad.BorderpadValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._ayref.AyrefValidator", + "._ay.AyValidator", + "._axref.AxrefValidator", + "._ax.AxValidator", + "._arrowwidth.ArrowwidthValidator", + "._arrowsize.ArrowsizeValidator", + "._arrowside.ArrowsideValidator", + "._arrowhead.ArrowheadValidator", + "._arrowcolor.ArrowcolorValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/layout/annotation/_align.py b/plotly/validators/layout/annotation/_align.py index bf4ea98e0f..13d8aec175 100644 --- a/plotly/validators/layout/annotation/_align.py +++ b/plotly/validators/layout/annotation/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="layout.annotation", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/annotation/_arrowcolor.py b/plotly/validators/layout/annotation/_arrowcolor.py index 0b487baa3f..fa518f6fd9 100644 --- a/plotly/validators/layout/annotation/_arrowcolor.py +++ b/plotly/validators/layout/annotation/_arrowcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ArrowcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="arrowcolor", parent_name="layout.annotation", **kwargs ): - super(ArrowcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_arrowhead.py b/plotly/validators/layout/annotation/_arrowhead.py index 188277f593..7bbe8b9bdb 100644 --- a/plotly/validators/layout/annotation/_arrowhead.py +++ b/plotly/validators/layout/annotation/_arrowhead.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): +class ArrowheadValidator(_bv.IntegerValidator): def __init__( self, plotly_name="arrowhead", parent_name="layout.annotation", **kwargs ): - super(ArrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 8), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/annotation/_arrowside.py b/plotly/validators/layout/annotation/_arrowside.py index 7c7e70acce..5aa89eadcc 100644 --- a/plotly/validators/layout/annotation/_arrowside.py +++ b/plotly/validators/layout/annotation/_arrowside.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowsideValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ArrowsideValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="arrowside", parent_name="layout.annotation", **kwargs ): - super(ArrowsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["end", "start"]), diff --git a/plotly/validators/layout/annotation/_arrowsize.py b/plotly/validators/layout/annotation/_arrowsize.py index ebcc95dd49..aae9d33b94 100644 --- a/plotly/validators/layout/annotation/_arrowsize.py +++ b/plotly/validators/layout/annotation/_arrowsize.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class ArrowsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="arrowsize", parent_name="layout.annotation", **kwargs ): - super(ArrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0.3), **kwargs, diff --git a/plotly/validators/layout/annotation/_arrowwidth.py b/plotly/validators/layout/annotation/_arrowwidth.py index 729910c2ec..f79f35b9f9 100644 --- a/plotly/validators/layout/annotation/_arrowwidth.py +++ b/plotly/validators/layout/annotation/_arrowwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ArrowwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="arrowwidth", parent_name="layout.annotation", **kwargs ): - super(ArrowwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0.1), **kwargs, diff --git a/plotly/validators/layout/annotation/_ax.py b/plotly/validators/layout/annotation/_ax.py index 7497764224..314928eb0a 100644 --- a/plotly/validators/layout/annotation/_ax.py +++ b/plotly/validators/layout/annotation/_ax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AxValidator(_plotly_utils.basevalidators.AnyValidator): +class AxValidator(_bv.AnyValidator): def __init__(self, plotly_name="ax", parent_name="layout.annotation", **kwargs): - super(AxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_axref.py b/plotly/validators/layout/annotation/_axref.py index de39b7d7d8..1d6e8079c7 100644 --- a/plotly/validators/layout/annotation/_axref.py +++ b/plotly/validators/layout/annotation/_axref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AxrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AxrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="axref", parent_name="layout.annotation", **kwargs): - super(AxrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["pixel", "/^x([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/annotation/_ay.py b/plotly/validators/layout/annotation/_ay.py index 02c00c73a3..4d4b9751e8 100644 --- a/plotly/validators/layout/annotation/_ay.py +++ b/plotly/validators/layout/annotation/_ay.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AyValidator(_plotly_utils.basevalidators.AnyValidator): +class AyValidator(_bv.AnyValidator): def __init__(self, plotly_name="ay", parent_name="layout.annotation", **kwargs): - super(AyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_ayref.py b/plotly/validators/layout/annotation/_ayref.py index d4c33be477..5170bf8ed9 100644 --- a/plotly/validators/layout/annotation/_ayref.py +++ b/plotly/validators/layout/annotation/_ayref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AyrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AyrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ayref", parent_name="layout.annotation", **kwargs): - super(AyrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["pixel", "/^y([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/annotation/_bgcolor.py b/plotly/validators/layout/annotation/_bgcolor.py index 8c6be8b00d..c654a1f20b 100644 --- a/plotly/validators/layout/annotation/_bgcolor.py +++ b/plotly/validators/layout/annotation/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.annotation", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_bordercolor.py b/plotly/validators/layout/annotation/_bordercolor.py index 2ac75856c2..a051168144 100644 --- a/plotly/validators/layout/annotation/_bordercolor.py +++ b/plotly/validators/layout/annotation/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.annotation", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_borderpad.py b/plotly/validators/layout/annotation/_borderpad.py index 1e18407114..b2a18657f4 100644 --- a/plotly/validators/layout/annotation/_borderpad.py +++ b/plotly/validators/layout/annotation/_borderpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderpadValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderpad", parent_name="layout.annotation", **kwargs ): - super(BorderpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/annotation/_borderwidth.py b/plotly/validators/layout/annotation/_borderwidth.py index 0773f095a4..1ecd625f7c 100644 --- a/plotly/validators/layout/annotation/_borderwidth.py +++ b/plotly/validators/layout/annotation/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.annotation", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/annotation/_captureevents.py b/plotly/validators/layout/annotation/_captureevents.py index aa77f28a6b..6f39100c79 100644 --- a/plotly/validators/layout/annotation/_captureevents.py +++ b/plotly/validators/layout/annotation/_captureevents.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CaptureeventsValidator(_plotly_utils.basevalidators.BooleanValidator): +class CaptureeventsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="captureevents", parent_name="layout.annotation", **kwargs ): - super(CaptureeventsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_clicktoshow.py b/plotly/validators/layout/annotation/_clicktoshow.py index 37af812844..9d2d204bbd 100644 --- a/plotly/validators/layout/annotation/_clicktoshow.py +++ b/plotly/validators/layout/annotation/_clicktoshow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClicktoshowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ClicktoshowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="clicktoshow", parent_name="layout.annotation", **kwargs ): - super(ClicktoshowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", [False, "onoff", "onout"]), **kwargs, diff --git a/plotly/validators/layout/annotation/_font.py b/plotly/validators/layout/annotation/_font.py index f06709a007..142b4c7cc7 100644 --- a/plotly/validators/layout/annotation/_font.py +++ b/plotly/validators/layout/annotation/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.annotation", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/annotation/_height.py b/plotly/validators/layout/annotation/_height.py index 1d7a111266..65b0ac7770 100644 --- a/plotly/validators/layout/annotation/_height.py +++ b/plotly/validators/layout/annotation/_height.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): +class HeightValidator(_bv.NumberValidator): def __init__(self, plotly_name="height", parent_name="layout.annotation", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/annotation/_hoverlabel.py b/plotly/validators/layout/annotation/_hoverlabel.py index 16b3a6f03a..bab08cd2a4 100644 --- a/plotly/validators/layout/annotation/_hoverlabel.py +++ b/plotly/validators/layout/annotation/_hoverlabel.py @@ -1,29 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__( self, plotly_name="hoverlabel", parent_name="layout.annotation", **kwargs ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. """, ), **kwargs, diff --git a/plotly/validators/layout/annotation/_hovertext.py b/plotly/validators/layout/annotation/_hovertext.py index 8c6fe8f11d..47725630c9 100644 --- a/plotly/validators/layout/annotation/_hovertext.py +++ b/plotly/validators/layout/annotation/_hovertext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertext", parent_name="layout.annotation", **kwargs ): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_name.py b/plotly/validators/layout/annotation/_name.py index ccb18eb54a..654e7cb8e4 100644 --- a/plotly/validators/layout/annotation/_name.py +++ b/plotly/validators/layout/annotation/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.annotation", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_opacity.py b/plotly/validators/layout/annotation/_opacity.py index dc9ef44fad..596a8d0291 100644 --- a/plotly/validators/layout/annotation/_opacity.py +++ b/plotly/validators/layout/annotation/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="layout.annotation", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/annotation/_showarrow.py b/plotly/validators/layout/annotation/_showarrow.py index fa99cd1d51..4229b3cf48 100644 --- a/plotly/validators/layout/annotation/_showarrow.py +++ b/plotly/validators/layout/annotation/_showarrow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowarrowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowarrowValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showarrow", parent_name="layout.annotation", **kwargs ): - super(ShowarrowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_standoff.py b/plotly/validators/layout/annotation/_standoff.py index 13a8cbafe2..356f40236e 100644 --- a/plotly/validators/layout/annotation/_standoff.py +++ b/plotly/validators/layout/annotation/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="layout.annotation", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/annotation/_startarrowhead.py b/plotly/validators/layout/annotation/_startarrowhead.py index b9502005ee..6bcdca0dc8 100644 --- a/plotly/validators/layout/annotation/_startarrowhead.py +++ b/plotly/validators/layout/annotation/_startarrowhead.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): +class StartarrowheadValidator(_bv.IntegerValidator): def __init__( self, plotly_name="startarrowhead", parent_name="layout.annotation", **kwargs ): - super(StartarrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 8), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/annotation/_startarrowsize.py b/plotly/validators/layout/annotation/_startarrowsize.py index f8b88b2a15..84f68cd8b9 100644 --- a/plotly/validators/layout/annotation/_startarrowsize.py +++ b/plotly/validators/layout/annotation/_startarrowsize.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartarrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class StartarrowsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="startarrowsize", parent_name="layout.annotation", **kwargs ): - super(StartarrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0.3), **kwargs, diff --git a/plotly/validators/layout/annotation/_startstandoff.py b/plotly/validators/layout/annotation/_startstandoff.py index 3e894bdd6a..d216265664 100644 --- a/plotly/validators/layout/annotation/_startstandoff.py +++ b/plotly/validators/layout/annotation/_startstandoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartstandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StartstandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="startstandoff", parent_name="layout.annotation", **kwargs ): - super(StartstandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/annotation/_templateitemname.py b/plotly/validators/layout/annotation/_templateitemname.py index 83557b1f3e..d11094265c 100644 --- a/plotly/validators/layout/annotation/_templateitemname.py +++ b/plotly/validators/layout/annotation/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.annotation", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_text.py b/plotly/validators/layout/annotation/_text.py index aaedee4c4d..f06c2dc9ad 100644 --- a/plotly/validators/layout/annotation/_text.py +++ b/plotly/validators/layout/annotation/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.annotation", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_textangle.py b/plotly/validators/layout/annotation/_textangle.py index 3a35577dbf..0d43c9c2e4 100644 --- a/plotly/validators/layout/annotation/_textangle.py +++ b/plotly/validators/layout/annotation/_textangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="textangle", parent_name="layout.annotation", **kwargs ): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_valign.py b/plotly/validators/layout/annotation/_valign.py index 5514eac395..a420cb11ec 100644 --- a/plotly/validators/layout/annotation/_valign.py +++ b/plotly/validators/layout/annotation/_valign.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ValignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="valign", parent_name="layout.annotation", **kwargs): - super(ValignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/annotation/_visible.py b/plotly/validators/layout/annotation/_visible.py index f83bc5e532..d4cd13104f 100644 --- a/plotly/validators/layout/annotation/_visible.py +++ b/plotly/validators/layout/annotation/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.annotation", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_width.py b/plotly/validators/layout/annotation/_width.py index 358bf63318..f8e7593e27 100644 --- a/plotly/validators/layout/annotation/_width.py +++ b/plotly/validators/layout/annotation/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="layout.annotation", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/annotation/_x.py b/plotly/validators/layout/annotation/_x.py index 1d82b6c8d2..665d5fca1c 100644 --- a/plotly/validators/layout/annotation/_x.py +++ b/plotly/validators/layout/annotation/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.AnyValidator): +class XValidator(_bv.AnyValidator): def __init__(self, plotly_name="x", parent_name="layout.annotation", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_xanchor.py b/plotly/validators/layout/annotation/_xanchor.py index bb70ca0dca..b88d00d523 100644 --- a/plotly/validators/layout/annotation/_xanchor.py +++ b/plotly/validators/layout/annotation/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.annotation", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/annotation/_xclick.py b/plotly/validators/layout/annotation/_xclick.py index 826617e60a..a12a045c5c 100644 --- a/plotly/validators/layout/annotation/_xclick.py +++ b/plotly/validators/layout/annotation/_xclick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XclickValidator(_plotly_utils.basevalidators.AnyValidator): +class XclickValidator(_bv.AnyValidator): def __init__(self, plotly_name="xclick", parent_name="layout.annotation", **kwargs): - super(XclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_xref.py b/plotly/validators/layout/annotation/_xref.py index 896c495c54..380610ba6f 100644 --- a/plotly/validators/layout/annotation/_xref.py +++ b/plotly/validators/layout/annotation/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="layout.annotation", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["paper", "/^x([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/annotation/_xshift.py b/plotly/validators/layout/annotation/_xshift.py index 6f85b00d51..8eabbe79ee 100644 --- a/plotly/validators/layout/annotation/_xshift.py +++ b/plotly/validators/layout/annotation/_xshift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XshiftValidator(_plotly_utils.basevalidators.NumberValidator): +class XshiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="xshift", parent_name="layout.annotation", **kwargs): - super(XshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_y.py b/plotly/validators/layout/annotation/_y.py index 3071eecb09..72ca50aa00 100644 --- a/plotly/validators/layout/annotation/_y.py +++ b/plotly/validators/layout/annotation/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.AnyValidator): +class YValidator(_bv.AnyValidator): def __init__(self, plotly_name="y", parent_name="layout.annotation", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_yanchor.py b/plotly/validators/layout/annotation/_yanchor.py index 6946236c6d..bea808e3fe 100644 --- a/plotly/validators/layout/annotation/_yanchor.py +++ b/plotly/validators/layout/annotation/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.annotation", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/annotation/_yclick.py b/plotly/validators/layout/annotation/_yclick.py index 5847be553b..8814487a89 100644 --- a/plotly/validators/layout/annotation/_yclick.py +++ b/plotly/validators/layout/annotation/_yclick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YclickValidator(_plotly_utils.basevalidators.AnyValidator): +class YclickValidator(_bv.AnyValidator): def __init__(self, plotly_name="yclick", parent_name="layout.annotation", **kwargs): - super(YclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/_yref.py b/plotly/validators/layout/annotation/_yref.py index c3bc11f50c..3a1130251b 100644 --- a/plotly/validators/layout/annotation/_yref.py +++ b/plotly/validators/layout/annotation/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="layout.annotation", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["paper", "/^y([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/annotation/_yshift.py b/plotly/validators/layout/annotation/_yshift.py index 5633cad759..ed06b95b69 100644 --- a/plotly/validators/layout/annotation/_yshift.py +++ b/plotly/validators/layout/annotation/_yshift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YshiftValidator(_plotly_utils.basevalidators.NumberValidator): +class YshiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="yshift", parent_name="layout.annotation", **kwargs): - super(YshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/font/__init__.py b/plotly/validators/layout/annotation/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/annotation/font/__init__.py +++ b/plotly/validators/layout/annotation/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/annotation/font/_color.py b/plotly/validators/layout/annotation/font/_color.py index 409571e129..5886c2c6b2 100644 --- a/plotly/validators/layout/annotation/font/_color.py +++ b/plotly/validators/layout/annotation/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.annotation.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/font/_family.py b/plotly/validators/layout/annotation/font/_family.py index 6001c7bd83..ae70514c6a 100644 --- a/plotly/validators/layout/annotation/font/_family.py +++ b/plotly/validators/layout/annotation/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.annotation.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/annotation/font/_lineposition.py b/plotly/validators/layout/annotation/font/_lineposition.py index 656c5c46ff..669b36cc4d 100644 --- a/plotly/validators/layout/annotation/font/_lineposition.py +++ b/plotly/validators/layout/annotation/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.annotation.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/annotation/font/_shadow.py b/plotly/validators/layout/annotation/font/_shadow.py index 783969d914..802fa2ff7b 100644 --- a/plotly/validators/layout/annotation/font/_shadow.py +++ b/plotly/validators/layout/annotation/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.annotation.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/font/_size.py b/plotly/validators/layout/annotation/font/_size.py index 6e94ac765b..5370b7f3b2 100644 --- a/plotly/validators/layout/annotation/font/_size.py +++ b/plotly/validators/layout/annotation/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.annotation.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/annotation/font/_style.py b/plotly/validators/layout/annotation/font/_style.py index abfca46cae..4844c70d52 100644 --- a/plotly/validators/layout/annotation/font/_style.py +++ b/plotly/validators/layout/annotation/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.annotation.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/annotation/font/_textcase.py b/plotly/validators/layout/annotation/font/_textcase.py index 934898ae29..8cb86ef9dc 100644 --- a/plotly/validators/layout/annotation/font/_textcase.py +++ b/plotly/validators/layout/annotation/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.annotation.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/annotation/font/_variant.py b/plotly/validators/layout/annotation/font/_variant.py index 3c517a2702..1f33750280 100644 --- a/plotly/validators/layout/annotation/font/_variant.py +++ b/plotly/validators/layout/annotation/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.annotation.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/annotation/font/_weight.py b/plotly/validators/layout/annotation/font/_weight.py index 151d4bedf0..7ebdb5742b 100644 --- a/plotly/validators/layout/annotation/font/_weight.py +++ b/plotly/validators/layout/annotation/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.annotation.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/annotation/hoverlabel/__init__.py b/plotly/validators/layout/annotation/hoverlabel/__init__.py index 6cd9f4b93c..040f0045eb 100644 --- a/plotly/validators/layout/annotation/hoverlabel/__init__.py +++ b/plotly/validators/layout/annotation/hoverlabel/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import FontValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._font.FontValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._font.FontValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py b/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py index 373a810251..1ec116beca 100644 --- a/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py +++ b/plotly/validators/layout/annotation/hoverlabel/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.annotation.hoverlabel", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py b/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py index da22b67cfd..8cb5b00dbf 100644 --- a/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py +++ b/plotly/validators/layout/annotation/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.annotation.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/hoverlabel/_font.py b/plotly/validators/layout/annotation/hoverlabel/_font.py index 0b5a79b269..e754a49888 100644 --- a/plotly/validators/layout/annotation/hoverlabel/_font.py +++ b/plotly/validators/layout/annotation/hoverlabel/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.annotation.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/annotation/hoverlabel/font/__init__.py b/plotly/validators/layout/annotation/hoverlabel/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/__init__.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_color.py b/plotly/validators/layout/annotation/hoverlabel/font/_color.py index 92982d1fdd..5ddd879947 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_color.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_family.py b/plotly/validators/layout/annotation/hoverlabel/font/_family.py index fbdb47316f..63b8454fcb 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_family.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_lineposition.py b/plotly/validators/layout/annotation/hoverlabel/font/_lineposition.py index e7bc5d6e8c..15f6849469 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_lineposition.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_shadow.py b/plotly/validators/layout/annotation/hoverlabel/font/_shadow.py index 8b64dbce11..93b6ac6a1c 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_shadow.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_size.py b/plotly/validators/layout/annotation/hoverlabel/font/_size.py index 0cc11a116b..d5ee3b74b2 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_size.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_style.py b/plotly/validators/layout/annotation/hoverlabel/font/_style.py index 461e09731d..2e41a35ae1 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_style.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_textcase.py b/plotly/validators/layout/annotation/hoverlabel/font/_textcase.py index 15539adb97..59ffbd0d65 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_textcase.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_variant.py b/plotly/validators/layout/annotation/hoverlabel/font/_variant.py index 518a3d7c82..4d0de4df95 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_variant.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/annotation/hoverlabel/font/_weight.py b/plotly/validators/layout/annotation/hoverlabel/font/_weight.py index 5756b4ebf7..d1baa8eb61 100644 --- a/plotly/validators/layout/annotation/hoverlabel/font/_weight.py +++ b/plotly/validators/layout/annotation/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.annotation.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/coloraxis/__init__.py b/plotly/validators/layout/coloraxis/__init__.py index e57f36a239..946b642b29 100644 --- a/plotly/validators/layout/coloraxis/__init__.py +++ b/plotly/validators/layout/coloraxis/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/layout/coloraxis/_autocolorscale.py b/plotly/validators/layout/coloraxis/_autocolorscale.py index bcf71ba8d5..aa37acdc57 100644 --- a/plotly/validators/layout/coloraxis/_autocolorscale.py +++ b/plotly/validators/layout/coloraxis/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="layout.coloraxis", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_cauto.py b/plotly/validators/layout/coloraxis/_cauto.py index 23b9c287e7..4aec0f0214 100644 --- a/plotly/validators/layout/coloraxis/_cauto.py +++ b/plotly/validators/layout/coloraxis/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="layout.coloraxis", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_cmax.py b/plotly/validators/layout/coloraxis/_cmax.py index c2bcb20ab9..56f771c7fa 100644 --- a/plotly/validators/layout/coloraxis/_cmax.py +++ b/plotly/validators/layout/coloraxis/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="layout.coloraxis", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_cmid.py b/plotly/validators/layout/coloraxis/_cmid.py index f5781ececf..ada4b41fa1 100644 --- a/plotly/validators/layout/coloraxis/_cmid.py +++ b/plotly/validators/layout/coloraxis/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="layout.coloraxis", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_cmin.py b/plotly/validators/layout/coloraxis/_cmin.py index b6eafec3cd..185b9d8549 100644 --- a/plotly/validators/layout/coloraxis/_cmin.py +++ b/plotly/validators/layout/coloraxis/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="layout.coloraxis", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_colorbar.py b/plotly/validators/layout/coloraxis/_colorbar.py index c28a1b46e5..e7dff75b9b 100644 --- a/plotly/validators/layout/coloraxis/_colorbar.py +++ b/plotly/validators/layout/coloraxis/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="layout.coloraxis", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - coloraxis.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.coloraxis.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.coloraxis.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.coloraxis.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_colorscale.py b/plotly/validators/layout/coloraxis/_colorscale.py index 2b63ea2745..deaddf87c0 100644 --- a/plotly/validators/layout/coloraxis/_colorscale.py +++ b/plotly/validators/layout/coloraxis/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="layout.coloraxis", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/_reversescale.py b/plotly/validators/layout/coloraxis/_reversescale.py index 96df8c8a4a..0c3805236a 100644 --- a/plotly/validators/layout/coloraxis/_reversescale.py +++ b/plotly/validators/layout/coloraxis/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="layout.coloraxis", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/_showscale.py b/plotly/validators/layout/coloraxis/_showscale.py index a9f6d61484..daf969e20f 100644 --- a/plotly/validators/layout/coloraxis/_showscale.py +++ b/plotly/validators/layout/coloraxis/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="layout.coloraxis", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/__init__.py b/plotly/validators/layout/coloraxis/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/layout/coloraxis/colorbar/__init__.py +++ b/plotly/validators/layout/coloraxis/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py b/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py index 188c3d3de0..0ffec9559b 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py +++ b/plotly/validators/layout/coloraxis/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py b/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py index ebe09f30c9..5aab81324e 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py +++ b/plotly/validators/layout/coloraxis/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py b/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py index ab646d5a7d..2bbffda99a 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py +++ b/plotly/validators/layout/coloraxis/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_dtick.py b/plotly/validators/layout/coloraxis/colorbar/_dtick.py index 2d3eed267f..bd78326d08 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_dtick.py +++ b/plotly/validators/layout/coloraxis/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py b/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py index 7c3014c3a2..6d971c2ea2 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py +++ b/plotly/validators/layout/coloraxis/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_labelalias.py b/plotly/validators/layout/coloraxis/colorbar/_labelalias.py index 0250c30ead..c69125cd72 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_labelalias.py +++ b/plotly/validators/layout/coloraxis/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_len.py b/plotly/validators/layout/coloraxis/colorbar/_len.py index 47d33e019e..d323f45df9 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_len.py +++ b/plotly/validators/layout/coloraxis/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_lenmode.py b/plotly/validators/layout/coloraxis/colorbar/_lenmode.py index b3dcc3d8db..654483b060 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_lenmode.py +++ b/plotly/validators/layout/coloraxis/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_minexponent.py b/plotly/validators/layout/coloraxis/colorbar/_minexponent.py index 156d547ed2..a7e819b4b3 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_minexponent.py +++ b/plotly/validators/layout/coloraxis/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_nticks.py b/plotly/validators/layout/coloraxis/colorbar/_nticks.py index e8744d0b06..12ffa93cad 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_nticks.py +++ b/plotly/validators/layout/coloraxis/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_orientation.py b/plotly/validators/layout/coloraxis/colorbar/_orientation.py index ce6cb0b275..d33d6953e4 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_orientation.py +++ b/plotly/validators/layout/coloraxis/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py b/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py index c60f84bac3..3f9f27f3d3 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py +++ b/plotly/validators/layout/coloraxis/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py b/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py index 2cbe62b9ed..181de4ccd3 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py +++ b/plotly/validators/layout/coloraxis/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py b/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py index ff136db6fa..98d6bf689c 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py +++ b/plotly/validators/layout/coloraxis/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_showexponent.py b/plotly/validators/layout/coloraxis/colorbar/_showexponent.py index 9f5ff8f531..454291d6d7 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_showexponent.py +++ b/plotly/validators/layout/coloraxis/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py b/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py index 29f9fef5f0..2e8d29ae9d 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py +++ b/plotly/validators/layout/coloraxis/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py b/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py index be9f6d1c94..8f54713bd7 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py +++ b/plotly/validators/layout/coloraxis/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py b/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py index 59b1fd2309..fb7f43da80 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py +++ b/plotly/validators/layout/coloraxis/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_thickness.py b/plotly/validators/layout/coloraxis/colorbar/_thickness.py index f48cb2da55..4a2a728d6d 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_thickness.py +++ b/plotly/validators/layout/coloraxis/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py b/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py index c6a034cee8..6038638c39 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py +++ b/plotly/validators/layout/coloraxis/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_tick0.py b/plotly/validators/layout/coloraxis/colorbar/_tick0.py index f00c88e071..72cf0044b0 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tick0.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickangle.py b/plotly/validators/layout/coloraxis/colorbar/_tickangle.py index 740fd8519a..65c9b17b8c 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickangle.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py b/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py index a579d1a06d..9a8362c72f 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickfont.py b/plotly/validators/layout/coloraxis/colorbar/_tickfont.py index a4fac6d169..180126cc5c 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickfont.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickformat.py b/plotly/validators/layout/coloraxis/colorbar/_tickformat.py index 057ae7d58b..eaeed26797 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickformat.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py b/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py index 3fb52d55bb..29ae262b65 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py b/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py index 69d05ce8d2..d2b1e3c9ab 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticklabeloverflow.py b/plotly/validators/layout/coloraxis/colorbar/_ticklabeloverflow.py index 5c053cca06..af2d367c00 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticklabelposition.py b/plotly/validators/layout/coloraxis/colorbar/_ticklabelposition.py index 7535e3c569..1dc523d173 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticklabelposition.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticklabelstep.py b/plotly/validators/layout/coloraxis/colorbar/_ticklabelstep.py index 85793a7c25..1532eaa49f 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticklabelstep.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticklen.py b/plotly/validators/layout/coloraxis/colorbar/_ticklen.py index 9c24fe27a3..2269240ba7 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticklen.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickmode.py b/plotly/validators/layout/coloraxis/colorbar/_tickmode.py index 627b524fac..cd211eab8f 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickmode.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py b/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py index 3edd785f38..1eef9cc18e 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticks.py b/plotly/validators/layout/coloraxis/colorbar/_ticks.py index ea778433c9..7748651971 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticks.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py b/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py index 33c59f3359..e870ed17fe 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticktext.py b/plotly/validators/layout/coloraxis/colorbar/_ticktext.py index 39fee4e683..fc783cf854 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticktext.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py b/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py index 12f014e7c3..bebc4b76d6 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickvals.py b/plotly/validators/layout/coloraxis/colorbar/_tickvals.py index a500ceaf5d..69f35626b5 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickvals.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py b/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py index a9fdc51ba9..8a58df5e75 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.coloraxis.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py b/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py index c6c3ded55d..d5f37d64cb 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py +++ b/plotly/validators/layout/coloraxis/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_title.py b/plotly/validators/layout/coloraxis/colorbar/_title.py index 3ca73b4fda..fd7019f14b 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_title.py +++ b/plotly/validators/layout/coloraxis/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_x.py b/plotly/validators/layout/coloraxis/colorbar/_x.py index 01a5e482e3..eb3af4f20a 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_x.py +++ b/plotly/validators/layout/coloraxis/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_xanchor.py b/plotly/validators/layout/coloraxis/colorbar/_xanchor.py index e30cc1360b..d04d95ce4c 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_xanchor.py +++ b/plotly/validators/layout/coloraxis/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_xpad.py b/plotly/validators/layout/coloraxis/colorbar/_xpad.py index 40cc17aa6c..e7628cebde 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_xpad.py +++ b/plotly/validators/layout/coloraxis/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_xref.py b/plotly/validators/layout/coloraxis/colorbar/_xref.py index 20a974d404..24576f9578 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_xref.py +++ b/plotly/validators/layout/coloraxis/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_y.py b/plotly/validators/layout/coloraxis/colorbar/_y.py index dac427570e..5e81e2aa8f 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_y.py +++ b/plotly/validators/layout/coloraxis/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/_yanchor.py b/plotly/validators/layout/coloraxis/colorbar/_yanchor.py index ed62f5b79e..d5a9a47e48 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_yanchor.py +++ b/plotly/validators/layout/coloraxis/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_ypad.py b/plotly/validators/layout/coloraxis/colorbar/_ypad.py index 91503b65a9..a077b8194b 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_ypad.py +++ b/plotly/validators/layout/coloraxis/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/_yref.py b/plotly/validators/layout/coloraxis/colorbar/_yref.py index 4658e3192a..38ab98672d 100644 --- a/plotly/validators/layout/coloraxis/colorbar/_yref.py +++ b/plotly/validators/layout/coloraxis/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="layout.coloraxis.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py index a64965b5d1..8f660ba26b 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py index 1bae4b07e6..29e4d996a5 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_lineposition.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_lineposition.py index 0bc2c9d5ec..5d5efa99b6 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_shadow.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_shadow.py index 9e90678410..4899186bb1 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_shadow.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py index ec171d779e..fc90e8977b 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_style.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_style.py index dcdc693b6b..cd510bf941 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_style.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_textcase.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_textcase.py index a840820b25..867632a4df 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_textcase.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_variant.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_variant.py index 4fd7f272ff..507c031e57 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_variant.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/coloraxis/colorbar/tickfont/_weight.py b/plotly/validators/layout/coloraxis/colorbar/tickfont/_weight.py index 6ae7d06a8a..8d8ccf0f85 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickfont/_weight.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.coloraxis.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py index 2cf86f2d1a..864779d27d 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py index 6365599c92..4f9e400e76 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py index 162d2b737e..9f875679ad 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py index c8dce4f290..36cbc2391f 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py index 7f0823c50a..8b8e2ff1c5 100644 --- a/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py +++ b/plotly/validators/layout/coloraxis/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.coloraxis.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/title/__init__.py b/plotly/validators/layout/coloraxis/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/__init__.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/layout/coloraxis/colorbar/title/_font.py b/plotly/validators/layout/coloraxis/colorbar/title/_font.py index 79acbc62bf..0f2bec3257 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/_font.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.coloraxis.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/title/_side.py b/plotly/validators/layout/coloraxis/colorbar/title/_side.py index 699631ad2a..c878fb44a4 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/_side.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="layout.coloraxis.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/title/_text.py b/plotly/validators/layout/coloraxis/colorbar/title/_text.py index 3b8b567de4..8044234eb0 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/_text.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.coloraxis.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py b/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py index 93ecf4aa6f..aad268a3d0 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py index fd6e197c8c..1b3745f187 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_lineposition.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_lineposition.py index 051e294861..38e3295dce 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_lineposition.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_shadow.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_shadow.py index 973908cb77..04a42837e0 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_shadow.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py index af2e516d1c..ca50ffe767 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_style.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_style.py index ef325872cf..bca27676b5 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_style.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_textcase.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_textcase.py index 2eb7dcdc5b..e08f39c28e 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_textcase.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_variant.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_variant.py index 0e5eda9436..86d6a3183c 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_variant.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/coloraxis/colorbar/title/font/_weight.py b/plotly/validators/layout/coloraxis/colorbar/title/font/_weight.py index 8479b72b15..e42b21f3c4 100644 --- a/plotly/validators/layout/coloraxis/colorbar/title/font/_weight.py +++ b/plotly/validators/layout/coloraxis/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.coloraxis.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/colorscale/__init__.py b/plotly/validators/layout/colorscale/__init__.py index 0dc4e7ac68..7d22f8a813 100644 --- a/plotly/validators/layout/colorscale/__init__.py +++ b/plotly/validators/layout/colorscale/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._sequentialminus import SequentialminusValidator - from ._sequential import SequentialValidator - from ._diverging import DivergingValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._sequentialminus.SequentialminusValidator", - "._sequential.SequentialValidator", - "._diverging.DivergingValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._sequentialminus.SequentialminusValidator", + "._sequential.SequentialValidator", + "._diverging.DivergingValidator", + ], +) diff --git a/plotly/validators/layout/colorscale/_diverging.py b/plotly/validators/layout/colorscale/_diverging.py index 8a9805d9c5..074d7001fc 100644 --- a/plotly/validators/layout/colorscale/_diverging.py +++ b/plotly/validators/layout/colorscale/_diverging.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DivergingValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class DivergingValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="diverging", parent_name="layout.colorscale", **kwargs ): - super(DivergingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/colorscale/_sequential.py b/plotly/validators/layout/colorscale/_sequential.py index ba8d9270e4..8910128a97 100644 --- a/plotly/validators/layout/colorscale/_sequential.py +++ b/plotly/validators/layout/colorscale/_sequential.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SequentialValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class SequentialValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="sequential", parent_name="layout.colorscale", **kwargs ): - super(SequentialValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/colorscale/_sequentialminus.py b/plotly/validators/layout/colorscale/_sequentialminus.py index 4073f1f243..80f72c08dd 100644 --- a/plotly/validators/layout/colorscale/_sequentialminus.py +++ b/plotly/validators/layout/colorscale/_sequentialminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SequentialminusValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class SequentialminusValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="sequentialminus", parent_name="layout.colorscale", **kwargs ): - super(SequentialminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/font/__init__.py b/plotly/validators/layout/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/font/__init__.py +++ b/plotly/validators/layout/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/font/_color.py b/plotly/validators/layout/font/_color.py index f87c0076db..095e9e8485 100644 --- a/plotly/validators/layout/font/_color.py +++ b/plotly/validators/layout/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/font/_family.py b/plotly/validators/layout/font/_family.py index 970915a20d..e51c3d76c4 100644 --- a/plotly/validators/layout/font/_family.py +++ b/plotly/validators/layout/font/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="layout.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/font/_lineposition.py b/plotly/validators/layout/font/_lineposition.py index 66b4ef6a22..2f6e69d985 100644 --- a/plotly/validators/layout/font/_lineposition.py +++ b/plotly/validators/layout/font/_lineposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="lineposition", parent_name="layout.font", **kwargs): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/font/_shadow.py b/plotly/validators/layout/font/_shadow.py index 071b7d6cb1..186a3d94e6 100644 --- a/plotly/validators/layout/font/_shadow.py +++ b/plotly/validators/layout/font/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="layout.font", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/font/_size.py b/plotly/validators/layout/font/_size.py index 95aef67596..0e2d7e7431 100644 --- a/plotly/validators/layout/font/_size.py +++ b/plotly/validators/layout/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="layout.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/font/_style.py b/plotly/validators/layout/font/_style.py index 31bf495a6a..24c2e4ebbb 100644 --- a/plotly/validators/layout/font/_style.py +++ b/plotly/validators/layout/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="layout.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/font/_textcase.py b/plotly/validators/layout/font/_textcase.py index 5fbe55abe5..d23cbeb662 100644 --- a/plotly/validators/layout/font/_textcase.py +++ b/plotly/validators/layout/font/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="layout.font", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/font/_variant.py b/plotly/validators/layout/font/_variant.py index 6b3951e9b6..5010823683 100644 --- a/plotly/validators/layout/font/_variant.py +++ b/plotly/validators/layout/font/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="layout.font", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/font/_weight.py b/plotly/validators/layout/font/_weight.py index a6a8351def..fd3b2c1478 100644 --- a/plotly/validators/layout/font/_weight.py +++ b/plotly/validators/layout/font/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="layout.font", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/geo/__init__.py b/plotly/validators/layout/geo/__init__.py index ea8ac8b2d9..d43faed81e 100644 --- a/plotly/validators/layout/geo/__init__.py +++ b/plotly/validators/layout/geo/__init__.py @@ -1,77 +1,41 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._subunitwidth import SubunitwidthValidator - from ._subunitcolor import SubunitcolorValidator - from ._showsubunits import ShowsubunitsValidator - from ._showrivers import ShowriversValidator - from ._showocean import ShowoceanValidator - from ._showland import ShowlandValidator - from ._showlakes import ShowlakesValidator - from ._showframe import ShowframeValidator - from ._showcountries import ShowcountriesValidator - from ._showcoastlines import ShowcoastlinesValidator - from ._scope import ScopeValidator - from ._riverwidth import RiverwidthValidator - from ._rivercolor import RivercolorValidator - from ._resolution import ResolutionValidator - from ._projection import ProjectionValidator - from ._oceancolor import OceancolorValidator - from ._lonaxis import LonaxisValidator - from ._lataxis import LataxisValidator - from ._landcolor import LandcolorValidator - from ._lakecolor import LakecolorValidator - from ._framewidth import FramewidthValidator - from ._framecolor import FramecolorValidator - from ._fitbounds import FitboundsValidator - from ._domain import DomainValidator - from ._countrywidth import CountrywidthValidator - from ._countrycolor import CountrycolorValidator - from ._coastlinewidth import CoastlinewidthValidator - from ._coastlinecolor import CoastlinecolorValidator - from ._center import CenterValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._subunitwidth.SubunitwidthValidator", - "._subunitcolor.SubunitcolorValidator", - "._showsubunits.ShowsubunitsValidator", - "._showrivers.ShowriversValidator", - "._showocean.ShowoceanValidator", - "._showland.ShowlandValidator", - "._showlakes.ShowlakesValidator", - "._showframe.ShowframeValidator", - "._showcountries.ShowcountriesValidator", - "._showcoastlines.ShowcoastlinesValidator", - "._scope.ScopeValidator", - "._riverwidth.RiverwidthValidator", - "._rivercolor.RivercolorValidator", - "._resolution.ResolutionValidator", - "._projection.ProjectionValidator", - "._oceancolor.OceancolorValidator", - "._lonaxis.LonaxisValidator", - "._lataxis.LataxisValidator", - "._landcolor.LandcolorValidator", - "._lakecolor.LakecolorValidator", - "._framewidth.FramewidthValidator", - "._framecolor.FramecolorValidator", - "._fitbounds.FitboundsValidator", - "._domain.DomainValidator", - "._countrywidth.CountrywidthValidator", - "._countrycolor.CountrycolorValidator", - "._coastlinewidth.CoastlinewidthValidator", - "._coastlinecolor.CoastlinecolorValidator", - "._center.CenterValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._subunitwidth.SubunitwidthValidator", + "._subunitcolor.SubunitcolorValidator", + "._showsubunits.ShowsubunitsValidator", + "._showrivers.ShowriversValidator", + "._showocean.ShowoceanValidator", + "._showland.ShowlandValidator", + "._showlakes.ShowlakesValidator", + "._showframe.ShowframeValidator", + "._showcountries.ShowcountriesValidator", + "._showcoastlines.ShowcoastlinesValidator", + "._scope.ScopeValidator", + "._riverwidth.RiverwidthValidator", + "._rivercolor.RivercolorValidator", + "._resolution.ResolutionValidator", + "._projection.ProjectionValidator", + "._oceancolor.OceancolorValidator", + "._lonaxis.LonaxisValidator", + "._lataxis.LataxisValidator", + "._landcolor.LandcolorValidator", + "._lakecolor.LakecolorValidator", + "._framewidth.FramewidthValidator", + "._framecolor.FramecolorValidator", + "._fitbounds.FitboundsValidator", + "._domain.DomainValidator", + "._countrywidth.CountrywidthValidator", + "._countrycolor.CountrycolorValidator", + "._coastlinewidth.CoastlinewidthValidator", + "._coastlinecolor.CoastlinecolorValidator", + "._center.CenterValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/layout/geo/_bgcolor.py b/plotly/validators/layout/geo/_bgcolor.py index bbbbfdae4b..5fff58c8dd 100644 --- a/plotly/validators/layout/geo/_bgcolor.py +++ b/plotly/validators/layout/geo/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.geo", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_center.py b/plotly/validators/layout/geo/_center.py index a1b4c1a7d5..c9339e9294 100644 --- a/plotly/validators/layout/geo/_center.py +++ b/plotly/validators/layout/geo/_center.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): +class CenterValidator(_bv.CompoundValidator): def __init__(self, plotly_name="center", parent_name="layout.geo", **kwargs): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Center"), data_docs=kwargs.pop( "data_docs", """ - lat - Sets the latitude of the map's center. For all - projection types, the map's latitude center - lies at the middle of the latitude range by - default. - lon - Sets the longitude of the map's center. By - default, the map's longitude center lies at the - middle of the longitude range for scoped - projection and above `projection.rotation.lon` - otherwise. """, ), **kwargs, diff --git a/plotly/validators/layout/geo/_coastlinecolor.py b/plotly/validators/layout/geo/_coastlinecolor.py index 6d1faff5c2..3e7bfcefaa 100644 --- a/plotly/validators/layout/geo/_coastlinecolor.py +++ b/plotly/validators/layout/geo/_coastlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CoastlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class CoastlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="coastlinecolor", parent_name="layout.geo", **kwargs ): - super(CoastlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_coastlinewidth.py b/plotly/validators/layout/geo/_coastlinewidth.py index 95aa959d9d..922b1cf415 100644 --- a/plotly/validators/layout/geo/_coastlinewidth.py +++ b/plotly/validators/layout/geo/_coastlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CoastlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class CoastlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="coastlinewidth", parent_name="layout.geo", **kwargs ): - super(CoastlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/_countrycolor.py b/plotly/validators/layout/geo/_countrycolor.py index c91927d26b..be8b322ef3 100644 --- a/plotly/validators/layout/geo/_countrycolor.py +++ b/plotly/validators/layout/geo/_countrycolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountrycolorValidator(_plotly_utils.basevalidators.ColorValidator): +class CountrycolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="countrycolor", parent_name="layout.geo", **kwargs): - super(CountrycolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_countrywidth.py b/plotly/validators/layout/geo/_countrywidth.py index 7c38cbfaef..96c546ae1c 100644 --- a/plotly/validators/layout/geo/_countrywidth.py +++ b/plotly/validators/layout/geo/_countrywidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountrywidthValidator(_plotly_utils.basevalidators.NumberValidator): +class CountrywidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="countrywidth", parent_name="layout.geo", **kwargs): - super(CountrywidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/_domain.py b/plotly/validators/layout/geo/_domain.py index df58813b03..1fc455a1be 100644 --- a/plotly/validators/layout/geo/_domain.py +++ b/plotly/validators/layout/geo/_domain.py @@ -1,41 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.geo", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - row - If there is a layout grid, use the domain for - this row in the grid for this geo subplot . - Note that geo subplots are constrained by - domain. In general, when `projection.scale` is - set to 1. a map will fit either its x or y - domain, but not both. - x - Sets the horizontal domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. - y - Sets the vertical domain of this geo subplot - (in plot fraction). Note that geo subplots are - constrained by domain. In general, when - `projection.scale` is set to 1. a map will fit - either its x or y domain, but not both. """, ), **kwargs, diff --git a/plotly/validators/layout/geo/_fitbounds.py b/plotly/validators/layout/geo/_fitbounds.py index ef1818e081..02a43a5dc7 100644 --- a/plotly/validators/layout/geo/_fitbounds.py +++ b/plotly/validators/layout/geo/_fitbounds.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FitboundsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FitboundsValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fitbounds", parent_name="layout.geo", **kwargs): - super(FitboundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [False, "locations", "geojson"]), **kwargs, diff --git a/plotly/validators/layout/geo/_framecolor.py b/plotly/validators/layout/geo/_framecolor.py index f3331d3812..8db711f645 100644 --- a/plotly/validators/layout/geo/_framecolor.py +++ b/plotly/validators/layout/geo/_framecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FramecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FramecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="framecolor", parent_name="layout.geo", **kwargs): - super(FramecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_framewidth.py b/plotly/validators/layout/geo/_framewidth.py index a4ce655cfd..1db63a3d00 100644 --- a/plotly/validators/layout/geo/_framewidth.py +++ b/plotly/validators/layout/geo/_framewidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FramewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class FramewidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="framewidth", parent_name="layout.geo", **kwargs): - super(FramewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/_lakecolor.py b/plotly/validators/layout/geo/_lakecolor.py index 56233fe280..f49f797ec9 100644 --- a/plotly/validators/layout/geo/_lakecolor.py +++ b/plotly/validators/layout/geo/_lakecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LakecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LakecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="lakecolor", parent_name="layout.geo", **kwargs): - super(LakecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_landcolor.py b/plotly/validators/layout/geo/_landcolor.py index b68020a939..d995de828e 100644 --- a/plotly/validators/layout/geo/_landcolor.py +++ b/plotly/validators/layout/geo/_landcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LandcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LandcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="landcolor", parent_name="layout.geo", **kwargs): - super(LandcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_lataxis.py b/plotly/validators/layout/geo/_lataxis.py index 62bf9dcabb..fc611cebd3 100644 --- a/plotly/validators/layout/geo/_lataxis.py +++ b/plotly/validators/layout/geo/_lataxis.py @@ -1,36 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LataxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class LataxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lataxis", parent_name="layout.geo", **kwargs): - super(LataxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lataxis"), data_docs=kwargs.pop( "data_docs", """ - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. """, ), **kwargs, diff --git a/plotly/validators/layout/geo/_lonaxis.py b/plotly/validators/layout/geo/_lonaxis.py index 3960585148..03a509eb91 100644 --- a/plotly/validators/layout/geo/_lonaxis.py +++ b/plotly/validators/layout/geo/_lonaxis.py @@ -1,36 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class LonaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lonaxis", parent_name="layout.geo", **kwargs): - super(LonaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lonaxis"), data_docs=kwargs.pop( "data_docs", """ - dtick - Sets the graticule's longitude/latitude tick - step. - gridcolor - Sets the graticule's stroke color. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the graticule's stroke width (in px). - range - Sets the range of this axis (in degrees), sets - the map's clipped coordinates. - showgrid - Sets whether or not graticule are shown on the - map. - tick0 - Sets the graticule's starting tick - longitude/latitude. """, ), **kwargs, diff --git a/plotly/validators/layout/geo/_oceancolor.py b/plotly/validators/layout/geo/_oceancolor.py index 7974ec166a..f6383e0332 100644 --- a/plotly/validators/layout/geo/_oceancolor.py +++ b/plotly/validators/layout/geo/_oceancolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OceancolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OceancolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="oceancolor", parent_name="layout.geo", **kwargs): - super(OceancolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_projection.py b/plotly/validators/layout/geo/_projection.py index 15b33161d2..40219f94d8 100644 --- a/plotly/validators/layout/geo/_projection.py +++ b/plotly/validators/layout/geo/_projection.py @@ -1,37 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): +class ProjectionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="projection", parent_name="layout.geo", **kwargs): - super(ProjectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Projection"), data_docs=kwargs.pop( "data_docs", """ - distance - For satellite projection type only. Sets the - distance from the center of the sphere to the - point of view as a proportion of the sphere’s - radius. - parallels - For conic projection types only. Sets the - parallels (tangent, secant) where the cone - intersects the sphere. - rotation - :class:`plotly.graph_objects.layout.geo.project - ion.Rotation` instance or dict with compatible - properties - scale - Zooms in or out on the map view. A scale of 1 - corresponds to the largest zoom level that fits - the map's lon and lat ranges. - tilt - For satellite projection type only. Sets the - tilt angle of perspective projection. - type - Sets the projection type. """, ), **kwargs, diff --git a/plotly/validators/layout/geo/_resolution.py b/plotly/validators/layout/geo/_resolution.py index 6ff86ee31c..06c883b16d 100644 --- a/plotly/validators/layout/geo/_resolution.py +++ b/plotly/validators/layout/geo/_resolution.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ResolutionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ResolutionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="resolution", parent_name="layout.geo", **kwargs): - super(ResolutionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, coerce_number=kwargs.pop("coerce_number", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [110, 50]), diff --git a/plotly/validators/layout/geo/_rivercolor.py b/plotly/validators/layout/geo/_rivercolor.py index 5ffa39be77..70781730c7 100644 --- a/plotly/validators/layout/geo/_rivercolor.py +++ b/plotly/validators/layout/geo/_rivercolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RivercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class RivercolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="rivercolor", parent_name="layout.geo", **kwargs): - super(RivercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_riverwidth.py b/plotly/validators/layout/geo/_riverwidth.py index acd9af0b00..b204d5e83d 100644 --- a/plotly/validators/layout/geo/_riverwidth.py +++ b/plotly/validators/layout/geo/_riverwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RiverwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class RiverwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="riverwidth", parent_name="layout.geo", **kwargs): - super(RiverwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/_scope.py b/plotly/validators/layout/geo/_scope.py index d5aacbbc09..e2777a073f 100644 --- a/plotly/validators/layout/geo/_scope.py +++ b/plotly/validators/layout/geo/_scope.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScopeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ScopeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="scope", parent_name="layout.geo", **kwargs): - super(ScopeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/geo/_showcoastlines.py b/plotly/validators/layout/geo/_showcoastlines.py index e5d31bb944..241a18bd72 100644 --- a/plotly/validators/layout/geo/_showcoastlines.py +++ b/plotly/validators/layout/geo/_showcoastlines.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowcoastlinesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowcoastlinesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showcoastlines", parent_name="layout.geo", **kwargs ): - super(ShowcoastlinesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showcountries.py b/plotly/validators/layout/geo/_showcountries.py index bfdc83352c..803500cd59 100644 --- a/plotly/validators/layout/geo/_showcountries.py +++ b/plotly/validators/layout/geo/_showcountries.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowcountriesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowcountriesValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showcountries", parent_name="layout.geo", **kwargs): - super(ShowcountriesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showframe.py b/plotly/validators/layout/geo/_showframe.py index f2f44e0f5f..e9b37ede00 100644 --- a/plotly/validators/layout/geo/_showframe.py +++ b/plotly/validators/layout/geo/_showframe.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowframeValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowframeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showframe", parent_name="layout.geo", **kwargs): - super(ShowframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showlakes.py b/plotly/validators/layout/geo/_showlakes.py index b1a8040f9e..adfacb8adc 100644 --- a/plotly/validators/layout/geo/_showlakes.py +++ b/plotly/validators/layout/geo/_showlakes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlakesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlakesValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlakes", parent_name="layout.geo", **kwargs): - super(ShowlakesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showland.py b/plotly/validators/layout/geo/_showland.py index 8009059037..dabe5f0572 100644 --- a/plotly/validators/layout/geo/_showland.py +++ b/plotly/validators/layout/geo/_showland.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlandValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlandValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showland", parent_name="layout.geo", **kwargs): - super(ShowlandValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showocean.py b/plotly/validators/layout/geo/_showocean.py index 081de792d7..ab1828b7a3 100644 --- a/plotly/validators/layout/geo/_showocean.py +++ b/plotly/validators/layout/geo/_showocean.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowoceanValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowoceanValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showocean", parent_name="layout.geo", **kwargs): - super(ShowoceanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showrivers.py b/plotly/validators/layout/geo/_showrivers.py index 08c9784050..41cfaba473 100644 --- a/plotly/validators/layout/geo/_showrivers.py +++ b/plotly/validators/layout/geo/_showrivers.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowriversValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowriversValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showrivers", parent_name="layout.geo", **kwargs): - super(ShowriversValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_showsubunits.py b/plotly/validators/layout/geo/_showsubunits.py index 39cba4814d..2ce5b852a7 100644 --- a/plotly/validators/layout/geo/_showsubunits.py +++ b/plotly/validators/layout/geo/_showsubunits.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowsubunitsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowsubunitsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showsubunits", parent_name="layout.geo", **kwargs): - super(ShowsubunitsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_subunitcolor.py b/plotly/validators/layout/geo/_subunitcolor.py index e64fd03262..4685fa5fb6 100644 --- a/plotly/validators/layout/geo/_subunitcolor.py +++ b/plotly/validators/layout/geo/_subunitcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubunitcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SubunitcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="subunitcolor", parent_name="layout.geo", **kwargs): - super(SubunitcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_subunitwidth.py b/plotly/validators/layout/geo/_subunitwidth.py index 4d8d6bbb5e..564cfeee73 100644 --- a/plotly/validators/layout/geo/_subunitwidth.py +++ b/plotly/validators/layout/geo/_subunitwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubunitwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class SubunitwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="subunitwidth", parent_name="layout.geo", **kwargs): - super(SubunitwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/_uirevision.py b/plotly/validators/layout/geo/_uirevision.py index 754857b676..4a7251713a 100644 --- a/plotly/validators/layout/geo/_uirevision.py +++ b/plotly/validators/layout/geo/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.geo", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/geo/_visible.py b/plotly/validators/layout/geo/_visible.py index 8acac3fc86..222c4e4f89 100644 --- a/plotly/validators/layout/geo/_visible.py +++ b/plotly/validators/layout/geo/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.geo", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/center/__init__.py b/plotly/validators/layout/geo/center/__init__.py index a723b74f14..bd95067321 100644 --- a/plotly/validators/layout/geo/center/__init__.py +++ b/plotly/validators/layout/geo/center/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._lon import LonValidator - from ._lat import LatValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] +) diff --git a/plotly/validators/layout/geo/center/_lat.py b/plotly/validators/layout/geo/center/_lat.py index 76d14714da..14af3e0111 100644 --- a/plotly/validators/layout/geo/center/_lat.py +++ b/plotly/validators/layout/geo/center/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.NumberValidator): +class LatValidator(_bv.NumberValidator): def __init__(self, plotly_name="lat", parent_name="layout.geo.center", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/center/_lon.py b/plotly/validators/layout/geo/center/_lon.py index c1259a67e3..730d9e0dd8 100644 --- a/plotly/validators/layout/geo/center/_lon.py +++ b/plotly/validators/layout/geo/center/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.NumberValidator): +class LonValidator(_bv.NumberValidator): def __init__(self, plotly_name="lon", parent_name="layout.geo.center", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/domain/__init__.py b/plotly/validators/layout/geo/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/geo/domain/__init__.py +++ b/plotly/validators/layout/geo/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/geo/domain/_column.py b/plotly/validators/layout/geo/domain/_column.py index 45ad71318b..3680221cec 100644 --- a/plotly/validators/layout/geo/domain/_column.py +++ b/plotly/validators/layout/geo/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="layout.geo.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/domain/_row.py b/plotly/validators/layout/geo/domain/_row.py index 5bc43e3012..b068be5138 100644 --- a/plotly/validators/layout/geo/domain/_row.py +++ b/plotly/validators/layout/geo/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.geo.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/domain/_x.py b/plotly/validators/layout/geo/domain/_x.py index 97151916ae..75960fcc62 100644 --- a/plotly/validators/layout/geo/domain/_x.py +++ b/plotly/validators/layout/geo/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.geo.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/geo/domain/_y.py b/plotly/validators/layout/geo/domain/_y.py index a3533b1182..5ad449bdcf 100644 --- a/plotly/validators/layout/geo/domain/_y.py +++ b/plotly/validators/layout/geo/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.geo.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/geo/lataxis/__init__.py b/plotly/validators/layout/geo/lataxis/__init__.py index 307a63cc3f..35af96359d 100644 --- a/plotly/validators/layout/geo/lataxis/__init__.py +++ b/plotly/validators/layout/geo/lataxis/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tick0 import Tick0Validator - from ._showgrid import ShowgridValidator - from ._range import RangeValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._dtick import DtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._tick0.Tick0Validator", - "._showgrid.ShowgridValidator", - "._range.RangeValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._dtick.DtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._tick0.Tick0Validator", + "._showgrid.ShowgridValidator", + "._range.RangeValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._dtick.DtickValidator", + ], +) diff --git a/plotly/validators/layout/geo/lataxis/_dtick.py b/plotly/validators/layout/geo/lataxis/_dtick.py index 7fe49b8944..f308bc8527 100644 --- a/plotly/validators/layout/geo/lataxis/_dtick.py +++ b/plotly/validators/layout/geo/lataxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): +class DtickValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtick", parent_name="layout.geo.lataxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lataxis/_gridcolor.py b/plotly/validators/layout/geo/lataxis/_gridcolor.py index 7af73629f7..113983065e 100644 --- a/plotly/validators/layout/geo/lataxis/_gridcolor.py +++ b/plotly/validators/layout/geo/lataxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.geo.lataxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lataxis/_griddash.py b/plotly/validators/layout/geo/lataxis/_griddash.py index 848516d989..eeef3d3f21 100644 --- a/plotly/validators/layout/geo/lataxis/_griddash.py +++ b/plotly/validators/layout/geo/lataxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.geo.lataxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/geo/lataxis/_gridwidth.py b/plotly/validators/layout/geo/lataxis/_gridwidth.py index e686c82904..bb5528e801 100644 --- a/plotly/validators/layout/geo/lataxis/_gridwidth.py +++ b/plotly/validators/layout/geo/lataxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.geo.lataxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/lataxis/_range.py b/plotly/validators/layout/geo/lataxis/_range.py index e3e76958ec..cf88978bff 100644 --- a/plotly/validators/layout/geo/lataxis/_range.py +++ b/plotly/validators/layout/geo/lataxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.geo.lataxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/geo/lataxis/_showgrid.py b/plotly/validators/layout/geo/lataxis/_showgrid.py index 965108e52c..7f520d9b55 100644 --- a/plotly/validators/layout/geo/lataxis/_showgrid.py +++ b/plotly/validators/layout/geo/lataxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.geo.lataxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lataxis/_tick0.py b/plotly/validators/layout/geo/lataxis/_tick0.py index 04003f8808..ef4729180a 100644 --- a/plotly/validators/layout/geo/lataxis/_tick0.py +++ b/plotly/validators/layout/geo/lataxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): +class Tick0Validator(_bv.NumberValidator): def __init__(self, plotly_name="tick0", parent_name="layout.geo.lataxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lonaxis/__init__.py b/plotly/validators/layout/geo/lonaxis/__init__.py index 307a63cc3f..35af96359d 100644 --- a/plotly/validators/layout/geo/lonaxis/__init__.py +++ b/plotly/validators/layout/geo/lonaxis/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tick0 import Tick0Validator - from ._showgrid import ShowgridValidator - from ._range import RangeValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._dtick import DtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._tick0.Tick0Validator", - "._showgrid.ShowgridValidator", - "._range.RangeValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._dtick.DtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._tick0.Tick0Validator", + "._showgrid.ShowgridValidator", + "._range.RangeValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._dtick.DtickValidator", + ], +) diff --git a/plotly/validators/layout/geo/lonaxis/_dtick.py b/plotly/validators/layout/geo/lonaxis/_dtick.py index a252a49784..bd1e9ff0b2 100644 --- a/plotly/validators/layout/geo/lonaxis/_dtick.py +++ b/plotly/validators/layout/geo/lonaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.NumberValidator): +class DtickValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtick", parent_name="layout.geo.lonaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lonaxis/_gridcolor.py b/plotly/validators/layout/geo/lonaxis/_gridcolor.py index d520608ebc..84c118ec6f 100644 --- a/plotly/validators/layout/geo/lonaxis/_gridcolor.py +++ b/plotly/validators/layout/geo/lonaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.geo.lonaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lonaxis/_griddash.py b/plotly/validators/layout/geo/lonaxis/_griddash.py index daad35c60f..b5ecaa3117 100644 --- a/plotly/validators/layout/geo/lonaxis/_griddash.py +++ b/plotly/validators/layout/geo/lonaxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.geo.lonaxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/geo/lonaxis/_gridwidth.py b/plotly/validators/layout/geo/lonaxis/_gridwidth.py index 46e718d98b..7f1cba404f 100644 --- a/plotly/validators/layout/geo/lonaxis/_gridwidth.py +++ b/plotly/validators/layout/geo/lonaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.geo.lonaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/lonaxis/_range.py b/plotly/validators/layout/geo/lonaxis/_range.py index 4a8612f87d..158a615015 100644 --- a/plotly/validators/layout/geo/lonaxis/_range.py +++ b/plotly/validators/layout/geo/lonaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.geo.lonaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/geo/lonaxis/_showgrid.py b/plotly/validators/layout/geo/lonaxis/_showgrid.py index 0d8a64316a..5cc5aeb4ba 100644 --- a/plotly/validators/layout/geo/lonaxis/_showgrid.py +++ b/plotly/validators/layout/geo/lonaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.geo.lonaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/lonaxis/_tick0.py b/plotly/validators/layout/geo/lonaxis/_tick0.py index 0f255e017a..5babb81891 100644 --- a/plotly/validators/layout/geo/lonaxis/_tick0.py +++ b/plotly/validators/layout/geo/lonaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.NumberValidator): +class Tick0Validator(_bv.NumberValidator): def __init__(self, plotly_name="tick0", parent_name="layout.geo.lonaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/projection/__init__.py b/plotly/validators/layout/geo/projection/__init__.py index eae069ecb7..0aa5447203 100644 --- a/plotly/validators/layout/geo/projection/__init__.py +++ b/plotly/validators/layout/geo/projection/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._type import TypeValidator - from ._tilt import TiltValidator - from ._scale import ScaleValidator - from ._rotation import RotationValidator - from ._parallels import ParallelsValidator - from ._distance import DistanceValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._type.TypeValidator", - "._tilt.TiltValidator", - "._scale.ScaleValidator", - "._rotation.RotationValidator", - "._parallels.ParallelsValidator", - "._distance.DistanceValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._tilt.TiltValidator", + "._scale.ScaleValidator", + "._rotation.RotationValidator", + "._parallels.ParallelsValidator", + "._distance.DistanceValidator", + ], +) diff --git a/plotly/validators/layout/geo/projection/_distance.py b/plotly/validators/layout/geo/projection/_distance.py index 7b5b3e92b7..2fa78f42e4 100644 --- a/plotly/validators/layout/geo/projection/_distance.py +++ b/plotly/validators/layout/geo/projection/_distance.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DistanceValidator(_plotly_utils.basevalidators.NumberValidator): +class DistanceValidator(_bv.NumberValidator): def __init__( self, plotly_name="distance", parent_name="layout.geo.projection", **kwargs ): - super(DistanceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1.001), **kwargs, diff --git a/plotly/validators/layout/geo/projection/_parallels.py b/plotly/validators/layout/geo/projection/_parallels.py index 675136532c..ba28c5c9cf 100644 --- a/plotly/validators/layout/geo/projection/_parallels.py +++ b/plotly/validators/layout/geo/projection/_parallels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParallelsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ParallelsValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="parallels", parent_name="layout.geo.projection", **kwargs ): - super(ParallelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/geo/projection/_rotation.py b/plotly/validators/layout/geo/projection/_rotation.py index 551dc6426e..0f6da54f9a 100644 --- a/plotly/validators/layout/geo/projection/_rotation.py +++ b/plotly/validators/layout/geo/projection/_rotation.py @@ -1,27 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RotationValidator(_plotly_utils.basevalidators.CompoundValidator): +class RotationValidator(_bv.CompoundValidator): def __init__( self, plotly_name="rotation", parent_name="layout.geo.projection", **kwargs ): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rotation"), data_docs=kwargs.pop( "data_docs", """ - lat - Rotates the map along meridians (in degrees - North). - lon - Rotates the map along parallels (in degrees - East). Defaults to the center of the - `lonaxis.range` values. - roll - Roll the map (in degrees) For example, a roll - of 180 makes the map appear upside down. """, ), **kwargs, diff --git a/plotly/validators/layout/geo/projection/_scale.py b/plotly/validators/layout/geo/projection/_scale.py index f6b6dfda7b..5072aa333e 100644 --- a/plotly/validators/layout/geo/projection/_scale.py +++ b/plotly/validators/layout/geo/projection/_scale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): +class ScaleValidator(_bv.NumberValidator): def __init__( self, plotly_name="scale", parent_name="layout.geo.projection", **kwargs ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/geo/projection/_tilt.py b/plotly/validators/layout/geo/projection/_tilt.py index 7683108329..5e8db96b07 100644 --- a/plotly/validators/layout/geo/projection/_tilt.py +++ b/plotly/validators/layout/geo/projection/_tilt.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TiltValidator(_plotly_utils.basevalidators.NumberValidator): +class TiltValidator(_bv.NumberValidator): def __init__( self, plotly_name="tilt", parent_name="layout.geo.projection", **kwargs ): - super(TiltValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/projection/_type.py b/plotly/validators/layout/geo/projection/_type.py index 14a3aa5956..e40685b7c5 100644 --- a/plotly/validators/layout/geo/projection/_type.py +++ b/plotly/validators/layout/geo/projection/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="layout.geo.projection", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/geo/projection/rotation/__init__.py b/plotly/validators/layout/geo/projection/rotation/__init__.py index 2d51bf3599..731481deed 100644 --- a/plotly/validators/layout/geo/projection/rotation/__init__.py +++ b/plotly/validators/layout/geo/projection/rotation/__init__.py @@ -1,15 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._roll import RollValidator - from ._lon import LonValidator - from ._lat import LatValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._roll.RollValidator", "._lon.LonValidator", "._lat.LatValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._roll.RollValidator", "._lon.LonValidator", "._lat.LatValidator"] +) diff --git a/plotly/validators/layout/geo/projection/rotation/_lat.py b/plotly/validators/layout/geo/projection/rotation/_lat.py index c15cd42f3a..961ee6aa8d 100644 --- a/plotly/validators/layout/geo/projection/rotation/_lat.py +++ b/plotly/validators/layout/geo/projection/rotation/_lat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.NumberValidator): +class LatValidator(_bv.NumberValidator): def __init__( self, plotly_name="lat", parent_name="layout.geo.projection.rotation", **kwargs ): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/projection/rotation/_lon.py b/plotly/validators/layout/geo/projection/rotation/_lon.py index 4973ac5a87..e665ddd185 100644 --- a/plotly/validators/layout/geo/projection/rotation/_lon.py +++ b/plotly/validators/layout/geo/projection/rotation/_lon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.NumberValidator): +class LonValidator(_bv.NumberValidator): def __init__( self, plotly_name="lon", parent_name="layout.geo.projection.rotation", **kwargs ): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/geo/projection/rotation/_roll.py b/plotly/validators/layout/geo/projection/rotation/_roll.py index 03d2dc05f1..b91746abaf 100644 --- a/plotly/validators/layout/geo/projection/rotation/_roll.py +++ b/plotly/validators/layout/geo/projection/rotation/_roll.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RollValidator(_plotly_utils.basevalidators.NumberValidator): +class RollValidator(_bv.NumberValidator): def __init__( self, plotly_name="roll", parent_name="layout.geo.projection.rotation", **kwargs ): - super(RollValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/grid/__init__.py b/plotly/validators/layout/grid/__init__.py index 2557633ade..87f0927e7d 100644 --- a/plotly/validators/layout/grid/__init__.py +++ b/plotly/validators/layout/grid/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yside import YsideValidator - from ._ygap import YgapValidator - from ._yaxes import YaxesValidator - from ._xside import XsideValidator - from ._xgap import XgapValidator - from ._xaxes import XaxesValidator - from ._subplots import SubplotsValidator - from ._rows import RowsValidator - from ._roworder import RoworderValidator - from ._pattern import PatternValidator - from ._domain import DomainValidator - from ._columns import ColumnsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yside.YsideValidator", - "._ygap.YgapValidator", - "._yaxes.YaxesValidator", - "._xside.XsideValidator", - "._xgap.XgapValidator", - "._xaxes.XaxesValidator", - "._subplots.SubplotsValidator", - "._rows.RowsValidator", - "._roworder.RoworderValidator", - "._pattern.PatternValidator", - "._domain.DomainValidator", - "._columns.ColumnsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yside.YsideValidator", + "._ygap.YgapValidator", + "._yaxes.YaxesValidator", + "._xside.XsideValidator", + "._xgap.XgapValidator", + "._xaxes.XaxesValidator", + "._subplots.SubplotsValidator", + "._rows.RowsValidator", + "._roworder.RoworderValidator", + "._pattern.PatternValidator", + "._domain.DomainValidator", + "._columns.ColumnsValidator", + ], +) diff --git a/plotly/validators/layout/grid/_columns.py b/plotly/validators/layout/grid/_columns.py index b569c8c048..ef98ec70f8 100644 --- a/plotly/validators/layout/grid/_columns.py +++ b/plotly/validators/layout/grid/_columns.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnsValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnsValidator(_bv.IntegerValidator): def __init__(self, plotly_name="columns", parent_name="layout.grid", **kwargs): - super(ColumnsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/grid/_domain.py b/plotly/validators/layout/grid/_domain.py index 522a53309c..d7358a9869 100644 --- a/plotly/validators/layout/grid/_domain.py +++ b/plotly/validators/layout/grid/_domain.py @@ -1,25 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.grid", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - x - Sets the horizontal domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. - y - Sets the vertical domain of this grid subplot - (in plot fraction). The first and last cells - end exactly at the domain edges, with no grout - around the edges. """, ), **kwargs, diff --git a/plotly/validators/layout/grid/_pattern.py b/plotly/validators/layout/grid/_pattern.py index ee91ab4d5c..3ae35f26e5 100644 --- a/plotly/validators/layout/grid/_pattern.py +++ b/plotly/validators/layout/grid/_pattern.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PatternValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="pattern", parent_name="layout.grid", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["independent", "coupled"]), **kwargs, diff --git a/plotly/validators/layout/grid/_roworder.py b/plotly/validators/layout/grid/_roworder.py index 7bd6a4c282..0d6a2ac29d 100644 --- a/plotly/validators/layout/grid/_roworder.py +++ b/plotly/validators/layout/grid/_roworder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoworderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RoworderValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="roworder", parent_name="layout.grid", **kwargs): - super(RoworderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top to bottom", "bottom to top"]), **kwargs, diff --git a/plotly/validators/layout/grid/_rows.py b/plotly/validators/layout/grid/_rows.py index 0341d1b78b..773c4f94f4 100644 --- a/plotly/validators/layout/grid/_rows.py +++ b/plotly/validators/layout/grid/_rows.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowsValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowsValidator(_bv.IntegerValidator): def __init__(self, plotly_name="rows", parent_name="layout.grid", **kwargs): - super(RowsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/grid/_subplots.py b/plotly/validators/layout/grid/_subplots.py index a8a98f6aec..73b2ae110b 100644 --- a/plotly/validators/layout/grid/_subplots.py +++ b/plotly/validators/layout/grid/_subplots.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class SubplotsValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="subplots", parent_name="layout.grid", **kwargs): - super(SubplotsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dimensions=kwargs.pop("dimensions", 2), edit_type=kwargs.pop("edit_type", "plot"), free_length=kwargs.pop("free_length", True), diff --git a/plotly/validators/layout/grid/_xaxes.py b/plotly/validators/layout/grid/_xaxes.py index dc4d9ce9a0..11f0ab55c1 100644 --- a/plotly/validators/layout/grid/_xaxes.py +++ b/plotly/validators/layout/grid/_xaxes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XaxesValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="xaxes", parent_name="layout.grid", **kwargs): - super(XaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/layout/grid/_xgap.py b/plotly/validators/layout/grid/_xgap.py index ef5d0a1caa..e39a2dbd34 100644 --- a/plotly/validators/layout/grid/_xgap.py +++ b/plotly/validators/layout/grid/_xgap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XgapValidator(_plotly_utils.basevalidators.NumberValidator): +class XgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="xgap", parent_name="layout.grid", **kwargs): - super(XgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/grid/_xside.py b/plotly/validators/layout/grid/_xside.py index ec94ce1a4f..fc92bad819 100644 --- a/plotly/validators/layout/grid/_xside.py +++ b/plotly/validators/layout/grid/_xside.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XsideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xside", parent_name="layout.grid", **kwargs): - super(XsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["bottom", "bottom plot", "top plot", "top"]), **kwargs, diff --git a/plotly/validators/layout/grid/_yaxes.py b/plotly/validators/layout/grid/_yaxes.py index 8c91b5c496..6998c61e60 100644 --- a/plotly/validators/layout/grid/_yaxes.py +++ b/plotly/validators/layout/grid/_yaxes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YaxesValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="yaxes", parent_name="layout.grid", **kwargs): - super(YaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/layout/grid/_ygap.py b/plotly/validators/layout/grid/_ygap.py index 968020d814..bc60b2c210 100644 --- a/plotly/validators/layout/grid/_ygap.py +++ b/plotly/validators/layout/grid/_ygap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YgapValidator(_plotly_utils.basevalidators.NumberValidator): +class YgapValidator(_bv.NumberValidator): def __init__(self, plotly_name="ygap", parent_name="layout.grid", **kwargs): - super(YgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/grid/_yside.py b/plotly/validators/layout/grid/_yside.py index bdf59a4e6a..a9f1c7a957 100644 --- a/plotly/validators/layout/grid/_yside.py +++ b/plotly/validators/layout/grid/_yside.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YsideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yside", parent_name="layout.grid", **kwargs): - super(YsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["left", "left plot", "right plot", "right"]), **kwargs, diff --git a/plotly/validators/layout/grid/domain/__init__.py b/plotly/validators/layout/grid/domain/__init__.py index 6b63513634..29cce5a77b 100644 --- a/plotly/validators/layout/grid/domain/__init__.py +++ b/plotly/validators/layout/grid/domain/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/layout/grid/domain/_x.py b/plotly/validators/layout/grid/domain/_x.py index 8811913051..035c163814 100644 --- a/plotly/validators/layout/grid/domain/_x.py +++ b/plotly/validators/layout/grid/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.grid.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/grid/domain/_y.py b/plotly/validators/layout/grid/domain/_y.py index c03f5a032c..203c85f246 100644 --- a/plotly/validators/layout/grid/domain/_y.py +++ b/plotly/validators/layout/grid/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.grid.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/hoverlabel/__init__.py b/plotly/validators/layout/hoverlabel/__init__.py index 1d84805b7f..039fdeadc7 100644 --- a/plotly/validators/layout/hoverlabel/__init__.py +++ b/plotly/validators/layout/hoverlabel/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelength import NamelengthValidator - from ._grouptitlefont import GrouptitlefontValidator - from ._font import FontValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelength.NamelengthValidator", - "._grouptitlefont.GrouptitlefontValidator", - "._font.FontValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelength.NamelengthValidator", + "._grouptitlefont.GrouptitlefontValidator", + "._font.FontValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/layout/hoverlabel/_align.py b/plotly/validators/layout/hoverlabel/_align.py index f11bfaf783..e1df1706b3 100644 --- a/plotly/validators/layout/hoverlabel/_align.py +++ b/plotly/validators/layout/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="layout.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/_bgcolor.py b/plotly/validators/layout/hoverlabel/_bgcolor.py index 2075a389cc..fdff5b43e0 100644 --- a/plotly/validators/layout/hoverlabel/_bgcolor.py +++ b/plotly/validators/layout/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/hoverlabel/_bordercolor.py b/plotly/validators/layout/hoverlabel/_bordercolor.py index b07470a90c..2867dbd8a6 100644 --- a/plotly/validators/layout/hoverlabel/_bordercolor.py +++ b/plotly/validators/layout/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/hoverlabel/_font.py b/plotly/validators/layout/hoverlabel/_font.py index 7461f3e978..0c3f191a9e 100644 --- a/plotly/validators/layout/hoverlabel/_font.py +++ b/plotly/validators/layout/hoverlabel/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/_grouptitlefont.py b/plotly/validators/layout/hoverlabel/_grouptitlefont.py index bc9cf9f867..0ff3cecc8e 100644 --- a/plotly/validators/layout/hoverlabel/_grouptitlefont.py +++ b/plotly/validators/layout/hoverlabel/_grouptitlefont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GrouptitlefontValidator(_plotly_utils.basevalidators.CompoundValidator): +class GrouptitlefontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="grouptitlefont", parent_name="layout.hoverlabel", **kwargs ): - super(GrouptitlefontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Grouptitlefont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/_namelength.py b/plotly/validators/layout/hoverlabel/_namelength.py index 04a545415a..1e164e89bb 100644 --- a/plotly/validators/layout/hoverlabel/_namelength.py +++ b/plotly/validators/layout/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="layout.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/font/__init__.py b/plotly/validators/layout/hoverlabel/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/hoverlabel/font/__init__.py +++ b/plotly/validators/layout/hoverlabel/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/hoverlabel/font/_color.py b/plotly/validators/layout/hoverlabel/font/_color.py index e72d921a12..f674740da9 100644 --- a/plotly/validators/layout/hoverlabel/font/_color.py +++ b/plotly/validators/layout/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/hoverlabel/font/_family.py b/plotly/validators/layout/hoverlabel/font/_family.py index 7d65ed6605..7225dc4c46 100644 --- a/plotly/validators/layout/hoverlabel/font/_family.py +++ b/plotly/validators/layout/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/hoverlabel/font/_lineposition.py b/plotly/validators/layout/hoverlabel/font/_lineposition.py index fd25fa9663..f791a88cf7 100644 --- a/plotly/validators/layout/hoverlabel/font/_lineposition.py +++ b/plotly/validators/layout/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/hoverlabel/font/_shadow.py b/plotly/validators/layout/hoverlabel/font/_shadow.py index 1ab11432f4..68402d1d91 100644 --- a/plotly/validators/layout/hoverlabel/font/_shadow.py +++ b/plotly/validators/layout/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/hoverlabel/font/_size.py b/plotly/validators/layout/hoverlabel/font/_size.py index 02f4523cc1..3bcd205eb7 100644 --- a/plotly/validators/layout/hoverlabel/font/_size.py +++ b/plotly/validators/layout/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/font/_style.py b/plotly/validators/layout/hoverlabel/font/_style.py index 4d3c30dc9e..995140d045 100644 --- a/plotly/validators/layout/hoverlabel/font/_style.py +++ b/plotly/validators/layout/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/font/_textcase.py b/plotly/validators/layout/hoverlabel/font/_textcase.py index 8c03a9e5c0..e2693ed59c 100644 --- a/plotly/validators/layout/hoverlabel/font/_textcase.py +++ b/plotly/validators/layout/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/font/_variant.py b/plotly/validators/layout/hoverlabel/font/_variant.py index 4ce5cd733e..a3b2c4d4c7 100644 --- a/plotly/validators/layout/hoverlabel/font/_variant.py +++ b/plotly/validators/layout/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/hoverlabel/font/_weight.py b/plotly/validators/layout/hoverlabel/font/_weight.py index ed8f9ffa4b..8681024390 100644 --- a/plotly/validators/layout/hoverlabel/font/_weight.py +++ b/plotly/validators/layout/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/__init__.py b/plotly/validators/layout/hoverlabel/grouptitlefont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/__init__.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_color.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_color.py index c04bbbeb00..46a042ac53 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_color.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_family.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_family.py index 1b70369225..ab663bad5b 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_family.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_lineposition.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_lineposition.py index a865819c51..56088726f0 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_lineposition.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_shadow.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_shadow.py index ed31049ffa..66e529a29e 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_shadow.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_size.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_size.py index 6b2d3454ee..d2b1c6ebb4 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_size.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_style.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_style.py index 4f943802c9..aa18364768 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_style.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_textcase.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_textcase.py index 70046ab18e..8b021b61c9 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_textcase.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_variant.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_variant.py index 22f8d75e81..6b7f7865bc 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_variant.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/hoverlabel/grouptitlefont/_weight.py b/plotly/validators/layout/hoverlabel/grouptitlefont/_weight.py index 133812836f..ef9aa5a452 100644 --- a/plotly/validators/layout/hoverlabel/grouptitlefont/_weight.py +++ b/plotly/validators/layout/hoverlabel/grouptitlefont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.hoverlabel.grouptitlefont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/image/__init__.py b/plotly/validators/layout/image/__init__.py index 2adb6f6695..3049d482d7 100644 --- a/plotly/validators/layout/image/__init__.py +++ b/plotly/validators/layout/image/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._templateitemname import TemplateitemnameValidator - from ._source import SourceValidator - from ._sizing import SizingValidator - from ._sizey import SizeyValidator - from ._sizex import SizexValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._layer import LayerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._templateitemname.TemplateitemnameValidator", - "._source.SourceValidator", - "._sizing.SizingValidator", - "._sizey.SizeyValidator", - "._sizex.SizexValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._layer.LayerValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._templateitemname.TemplateitemnameValidator", + "._source.SourceValidator", + "._sizing.SizingValidator", + "._sizey.SizeyValidator", + "._sizex.SizexValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._layer.LayerValidator", + ], +) diff --git a/plotly/validators/layout/image/_layer.py b/plotly/validators/layout/image/_layer.py index d36dfb8b44..76353c8526 100644 --- a/plotly/validators/layout/image/_layer.py +++ b/plotly/validators/layout/image/_layer.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="layer", parent_name="layout.image", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["below", "above"]), **kwargs, diff --git a/plotly/validators/layout/image/_name.py b/plotly/validators/layout/image/_name.py index a641345064..2c96417921 100644 --- a/plotly/validators/layout/image/_name.py +++ b/plotly/validators/layout/image/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.image", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/image/_opacity.py b/plotly/validators/layout/image/_opacity.py index 56c53e237c..37662c157c 100644 --- a/plotly/validators/layout/image/_opacity.py +++ b/plotly/validators/layout/image/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="layout.image", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/image/_sizex.py b/plotly/validators/layout/image/_sizex.py index f0f2be30ce..6b6f65e411 100644 --- a/plotly/validators/layout/image/_sizex.py +++ b/plotly/validators/layout/image/_sizex.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizexValidator(_plotly_utils.basevalidators.NumberValidator): +class SizexValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizex", parent_name="layout.image", **kwargs): - super(SizexValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/image/_sizey.py b/plotly/validators/layout/image/_sizey.py index 66d6ea2f8b..28629011de 100644 --- a/plotly/validators/layout/image/_sizey.py +++ b/plotly/validators/layout/image/_sizey.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeyValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeyValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizey", parent_name="layout.image", **kwargs): - super(SizeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/image/_sizing.py b/plotly/validators/layout/image/_sizing.py index 8d51ec7bc8..b883710b12 100644 --- a/plotly/validators/layout/image/_sizing.py +++ b/plotly/validators/layout/image/_sizing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizingValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="sizing", parent_name="layout.image", **kwargs): - super(SizingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["fill", "contain", "stretch"]), **kwargs, diff --git a/plotly/validators/layout/image/_source.py b/plotly/validators/layout/image/_source.py index 8157544de1..da9e115643 100644 --- a/plotly/validators/layout/image/_source.py +++ b/plotly/validators/layout/image/_source.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceValidator(_plotly_utils.basevalidators.ImageUriValidator): +class SourceValidator(_bv.ImageUriValidator): def __init__(self, plotly_name="source", parent_name="layout.image", **kwargs): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/image/_templateitemname.py b/plotly/validators/layout/image/_templateitemname.py index 4ac45d2087..6e31318820 100644 --- a/plotly/validators/layout/image/_templateitemname.py +++ b/plotly/validators/layout/image/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.image", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/image/_visible.py b/plotly/validators/layout/image/_visible.py index 8132fc0ebc..6d02cd8f9d 100644 --- a/plotly/validators/layout/image/_visible.py +++ b/plotly/validators/layout/image/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.image", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/image/_x.py b/plotly/validators/layout/image/_x.py index 20ae64db88..d859917007 100644 --- a/plotly/validators/layout/image/_x.py +++ b/plotly/validators/layout/image/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.AnyValidator): +class XValidator(_bv.AnyValidator): def __init__(self, plotly_name="x", parent_name="layout.image", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/image/_xanchor.py b/plotly/validators/layout/image/_xanchor.py index d7f787e510..c36c9eae5d 100644 --- a/plotly/validators/layout/image/_xanchor.py +++ b/plotly/validators/layout/image/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="layout.image", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/image/_xref.py b/plotly/validators/layout/image/_xref.py index a12b526c76..433e4a1db4 100644 --- a/plotly/validators/layout/image/_xref.py +++ b/plotly/validators/layout/image/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="layout.image", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["paper", "/^x([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/image/_y.py b/plotly/validators/layout/image/_y.py index 18cd74f774..abbabc2c2e 100644 --- a/plotly/validators/layout/image/_y.py +++ b/plotly/validators/layout/image/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.AnyValidator): +class YValidator(_bv.AnyValidator): def __init__(self, plotly_name="y", parent_name="layout.image", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/image/_yanchor.py b/plotly/validators/layout/image/_yanchor.py index 181a1edb8a..d168f0d579 100644 --- a/plotly/validators/layout/image/_yanchor.py +++ b/plotly/validators/layout/image/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="layout.image", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/image/_yref.py b/plotly/validators/layout/image/_yref.py index aa2b8ecc60..ec95831a36 100644 --- a/plotly/validators/layout/image/_yref.py +++ b/plotly/validators/layout/image/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="layout.image", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["paper", "/^y([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/legend/__init__.py b/plotly/validators/layout/legend/__init__.py index 64c39fe494..1dd1380432 100644 --- a/plotly/validators/layout/legend/__init__.py +++ b/plotly/validators/layout/legend/__init__.py @@ -1,65 +1,35 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._valign import ValignValidator - from ._uirevision import UirevisionValidator - from ._traceorder import TraceorderValidator - from ._tracegroupgap import TracegroupgapValidator - from ._title import TitleValidator - from ._orientation import OrientationValidator - from ._itemwidth import ItemwidthValidator - from ._itemsizing import ItemsizingValidator - from ._itemdoubleclick import ItemdoubleclickValidator - from ._itemclick import ItemclickValidator - from ._indentation import IndentationValidator - from ._grouptitlefont import GrouptitlefontValidator - from ._groupclick import GroupclickValidator - from ._font import FontValidator - from ._entrywidthmode import EntrywidthmodeValidator - from ._entrywidth import EntrywidthValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._valign.ValignValidator", - "._uirevision.UirevisionValidator", - "._traceorder.TraceorderValidator", - "._tracegroupgap.TracegroupgapValidator", - "._title.TitleValidator", - "._orientation.OrientationValidator", - "._itemwidth.ItemwidthValidator", - "._itemsizing.ItemsizingValidator", - "._itemdoubleclick.ItemdoubleclickValidator", - "._itemclick.ItemclickValidator", - "._indentation.IndentationValidator", - "._grouptitlefont.GrouptitlefontValidator", - "._groupclick.GroupclickValidator", - "._font.FontValidator", - "._entrywidthmode.EntrywidthmodeValidator", - "._entrywidth.EntrywidthValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._valign.ValignValidator", + "._uirevision.UirevisionValidator", + "._traceorder.TraceorderValidator", + "._tracegroupgap.TracegroupgapValidator", + "._title.TitleValidator", + "._orientation.OrientationValidator", + "._itemwidth.ItemwidthValidator", + "._itemsizing.ItemsizingValidator", + "._itemdoubleclick.ItemdoubleclickValidator", + "._itemclick.ItemclickValidator", + "._indentation.IndentationValidator", + "._grouptitlefont.GrouptitlefontValidator", + "._groupclick.GroupclickValidator", + "._font.FontValidator", + "._entrywidthmode.EntrywidthmodeValidator", + "._entrywidth.EntrywidthValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/layout/legend/_bgcolor.py b/plotly/validators/layout/legend/_bgcolor.py index 3f4eb5149a..b7391c9f07 100644 --- a/plotly/validators/layout/legend/_bgcolor.py +++ b/plotly/validators/layout/legend/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.legend", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/_bordercolor.py b/plotly/validators/layout/legend/_bordercolor.py index f9073070c0..8d9d94da75 100644 --- a/plotly/validators/layout/legend/_bordercolor.py +++ b/plotly/validators/layout/legend/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.legend", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/_borderwidth.py b/plotly/validators/layout/legend/_borderwidth.py index a77aa60099..81086cf669 100644 --- a/plotly/validators/layout/legend/_borderwidth.py +++ b/plotly/validators/layout/legend/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.legend", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/legend/_entrywidth.py b/plotly/validators/layout/legend/_entrywidth.py index 32ca023fe5..892a838176 100644 --- a/plotly/validators/layout/legend/_entrywidth.py +++ b/plotly/validators/layout/legend/_entrywidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EntrywidthValidator(_plotly_utils.basevalidators.NumberValidator): +class EntrywidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="entrywidth", parent_name="layout.legend", **kwargs): - super(EntrywidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/legend/_entrywidthmode.py b/plotly/validators/layout/legend/_entrywidthmode.py index ed2cf8476a..b256f79bce 100644 --- a/plotly/validators/layout/legend/_entrywidthmode.py +++ b/plotly/validators/layout/legend/_entrywidthmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EntrywidthmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class EntrywidthmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="entrywidthmode", parent_name="layout.legend", **kwargs ): - super(EntrywidthmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/layout/legend/_font.py b/plotly/validators/layout/legend/_font.py index 9ca1d9e5e4..114f3ca58e 100644 --- a/plotly/validators/layout/legend/_font.py +++ b/plotly/validators/layout/legend/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.legend", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/legend/_groupclick.py b/plotly/validators/layout/legend/_groupclick.py index 2ff9c0b622..e2d46b4665 100644 --- a/plotly/validators/layout/legend/_groupclick.py +++ b/plotly/validators/layout/legend/_groupclick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GroupclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class GroupclickValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="groupclick", parent_name="layout.legend", **kwargs): - super(GroupclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["toggleitem", "togglegroup"]), **kwargs, diff --git a/plotly/validators/layout/legend/_grouptitlefont.py b/plotly/validators/layout/legend/_grouptitlefont.py index 6cfee9e7ac..6ff1de3130 100644 --- a/plotly/validators/layout/legend/_grouptitlefont.py +++ b/plotly/validators/layout/legend/_grouptitlefont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GrouptitlefontValidator(_plotly_utils.basevalidators.CompoundValidator): +class GrouptitlefontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="grouptitlefont", parent_name="layout.legend", **kwargs ): - super(GrouptitlefontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Grouptitlefont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/legend/_indentation.py b/plotly/validators/layout/legend/_indentation.py index c5244eafbd..d304dc1796 100644 --- a/plotly/validators/layout/legend/_indentation.py +++ b/plotly/validators/layout/legend/_indentation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IndentationValidator(_plotly_utils.basevalidators.NumberValidator): +class IndentationValidator(_bv.NumberValidator): def __init__( self, plotly_name="indentation", parent_name="layout.legend", **kwargs ): - super(IndentationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", -15), **kwargs, diff --git a/plotly/validators/layout/legend/_itemclick.py b/plotly/validators/layout/legend/_itemclick.py index 107b0fda93..9abe435369 100644 --- a/plotly/validators/layout/legend/_itemclick.py +++ b/plotly/validators/layout/legend/_itemclick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ItemclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ItemclickValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="itemclick", parent_name="layout.legend", **kwargs): - super(ItemclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["toggle", "toggleothers", False]), **kwargs, diff --git a/plotly/validators/layout/legend/_itemdoubleclick.py b/plotly/validators/layout/legend/_itemdoubleclick.py index db1c42d0f5..f9abecf204 100644 --- a/plotly/validators/layout/legend/_itemdoubleclick.py +++ b/plotly/validators/layout/legend/_itemdoubleclick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ItemdoubleclickValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ItemdoubleclickValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="itemdoubleclick", parent_name="layout.legend", **kwargs ): - super(ItemdoubleclickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["toggle", "toggleothers", False]), **kwargs, diff --git a/plotly/validators/layout/legend/_itemsizing.py b/plotly/validators/layout/legend/_itemsizing.py index 6242230263..118019c65b 100644 --- a/plotly/validators/layout/legend/_itemsizing.py +++ b/plotly/validators/layout/legend/_itemsizing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ItemsizingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ItemsizingValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="itemsizing", parent_name="layout.legend", **kwargs): - super(ItemsizingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["trace", "constant"]), **kwargs, diff --git a/plotly/validators/layout/legend/_itemwidth.py b/plotly/validators/layout/legend/_itemwidth.py index 126c374267..18d81ecd3c 100644 --- a/plotly/validators/layout/legend/_itemwidth.py +++ b/plotly/validators/layout/legend/_itemwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ItemwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ItemwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="itemwidth", parent_name="layout.legend", **kwargs): - super(ItemwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 30), **kwargs, diff --git a/plotly/validators/layout/legend/_orientation.py b/plotly/validators/layout/legend/_orientation.py index 9cbb38bdf2..60c6789907 100644 --- a/plotly/validators/layout/legend/_orientation.py +++ b/plotly/validators/layout/legend/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="layout.legend", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/layout/legend/_title.py b/plotly/validators/layout/legend/_title.py index 25dc83b365..612a2ac890 100644 --- a/plotly/validators/layout/legend/_title.py +++ b/plotly/validators/layout/legend/_title.py @@ -1,29 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout.legend", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend's title font. Defaults to - `legend.font` with its size increased about - 20%. - side - Determines the location of legend's title with - respect to the legend items. Defaulted to "top" - with `orientation` is "h". Defaulted to "left" - with `orientation` is "v". The *top left* - options could be used to expand top center and - top right are for horizontal alignment legend - area in both x and y sides. - text - Sets the title of the legend. """, ), **kwargs, diff --git a/plotly/validators/layout/legend/_tracegroupgap.py b/plotly/validators/layout/legend/_tracegroupgap.py index f3f59779b6..ed649ba35f 100644 --- a/plotly/validators/layout/legend/_tracegroupgap.py +++ b/plotly/validators/layout/legend/_tracegroupgap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracegroupgapValidator(_plotly_utils.basevalidators.NumberValidator): +class TracegroupgapValidator(_bv.NumberValidator): def __init__( self, plotly_name="tracegroupgap", parent_name="layout.legend", **kwargs ): - super(TracegroupgapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/legend/_traceorder.py b/plotly/validators/layout/legend/_traceorder.py index 96968fcb53..f6899a364d 100644 --- a/plotly/validators/layout/legend/_traceorder.py +++ b/plotly/validators/layout/legend/_traceorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TraceorderValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TraceorderValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="traceorder", parent_name="layout.legend", **kwargs): - super(TraceorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["normal"]), flags=kwargs.pop("flags", ["reversed", "grouped"]), diff --git a/plotly/validators/layout/legend/_uirevision.py b/plotly/validators/layout/legend/_uirevision.py index a6f374e4e2..528157f970 100644 --- a/plotly/validators/layout/legend/_uirevision.py +++ b/plotly/validators/layout/legend/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.legend", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/legend/_valign.py b/plotly/validators/layout/legend/_valign.py index 34d2225f69..c41458bc9e 100644 --- a/plotly/validators/layout/legend/_valign.py +++ b/plotly/validators/layout/legend/_valign.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ValignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="valign", parent_name="layout.legend", **kwargs): - super(ValignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/legend/_visible.py b/plotly/validators/layout/legend/_visible.py index 59485f0dff..122b3d5ef9 100644 --- a/plotly/validators/layout/legend/_visible.py +++ b/plotly/validators/layout/legend/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.legend", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/_x.py b/plotly/validators/layout/legend/_x.py index 42aa1996ff..8eb3727f50 100644 --- a/plotly/validators/layout/legend/_x.py +++ b/plotly/validators/layout/legend/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="layout.legend", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/_xanchor.py b/plotly/validators/layout/legend/_xanchor.py index b56cc4642e..8c417a205f 100644 --- a/plotly/validators/layout/legend/_xanchor.py +++ b/plotly/validators/layout/legend/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="layout.legend", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/legend/_xref.py b/plotly/validators/layout/legend/_xref.py index 5536db69b1..0ce5f8f74d 100644 --- a/plotly/validators/layout/legend/_xref.py +++ b/plotly/validators/layout/legend/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="layout.legend", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/layout/legend/_y.py b/plotly/validators/layout/legend/_y.py index 4dc8d92a6f..1f24157da4 100644 --- a/plotly/validators/layout/legend/_y.py +++ b/plotly/validators/layout/legend/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="layout.legend", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/_yanchor.py b/plotly/validators/layout/legend/_yanchor.py index b1ba732517..236202a655 100644 --- a/plotly/validators/layout/legend/_yanchor.py +++ b/plotly/validators/layout/legend/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="layout.legend", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/legend/_yref.py b/plotly/validators/layout/legend/_yref.py index 2ab188db86..871c63ca3b 100644 --- a/plotly/validators/layout/legend/_yref.py +++ b/plotly/validators/layout/legend/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="layout.legend", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/layout/legend/font/__init__.py b/plotly/validators/layout/legend/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/legend/font/__init__.py +++ b/plotly/validators/layout/legend/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/legend/font/_color.py b/plotly/validators/layout/legend/font/_color.py index ea6a68fee0..d1ffc5c771 100644 --- a/plotly/validators/layout/legend/font/_color.py +++ b/plotly/validators/layout/legend/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.legend.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/font/_family.py b/plotly/validators/layout/legend/font/_family.py index 210f8ab8f5..9a30339d8f 100644 --- a/plotly/validators/layout/legend/font/_family.py +++ b/plotly/validators/layout/legend/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.legend.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/legend/font/_lineposition.py b/plotly/validators/layout/legend/font/_lineposition.py index fae2867de4..57e5a7b7b3 100644 --- a/plotly/validators/layout/legend/font/_lineposition.py +++ b/plotly/validators/layout/legend/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.legend.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/legend/font/_shadow.py b/plotly/validators/layout/legend/font/_shadow.py index 9294bd2b12..038123f608 100644 --- a/plotly/validators/layout/legend/font/_shadow.py +++ b/plotly/validators/layout/legend/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.legend.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/font/_size.py b/plotly/validators/layout/legend/font/_size.py index 01966d9353..557953a6ad 100644 --- a/plotly/validators/layout/legend/font/_size.py +++ b/plotly/validators/layout/legend/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="layout.legend.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/legend/font/_style.py b/plotly/validators/layout/legend/font/_style.py index efc057b483..099e209daf 100644 --- a/plotly/validators/layout/legend/font/_style.py +++ b/plotly/validators/layout/legend/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="layout.legend.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/legend/font/_textcase.py b/plotly/validators/layout/legend/font/_textcase.py index 0e5924d767..52332a51eb 100644 --- a/plotly/validators/layout/legend/font/_textcase.py +++ b/plotly/validators/layout/legend/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.legend.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/legend/font/_variant.py b/plotly/validators/layout/legend/font/_variant.py index 2b04b36786..d0fffb8ee4 100644 --- a/plotly/validators/layout/legend/font/_variant.py +++ b/plotly/validators/layout/legend/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.legend.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/legend/font/_weight.py b/plotly/validators/layout/legend/font/_weight.py index ca77f233e8..f7306fc3b5 100644 --- a/plotly/validators/layout/legend/font/_weight.py +++ b/plotly/validators/layout/legend/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.legend.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/legend/grouptitlefont/__init__.py b/plotly/validators/layout/legend/grouptitlefont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/legend/grouptitlefont/__init__.py +++ b/plotly/validators/layout/legend/grouptitlefont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/legend/grouptitlefont/_color.py b/plotly/validators/layout/legend/grouptitlefont/_color.py index f9a43a4e39..7403746be7 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_color.py +++ b/plotly/validators/layout/legend/grouptitlefont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.legend.grouptitlefont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/grouptitlefont/_family.py b/plotly/validators/layout/legend/grouptitlefont/_family.py index ad291ffbf3..2aa75190bb 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_family.py +++ b/plotly/validators/layout/legend/grouptitlefont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.legend.grouptitlefont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/legend/grouptitlefont/_lineposition.py b/plotly/validators/layout/legend/grouptitlefont/_lineposition.py index 8dcdaf4bf8..637cdf7c0b 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_lineposition.py +++ b/plotly/validators/layout/legend/grouptitlefont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.legend.grouptitlefont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/legend/grouptitlefont/_shadow.py b/plotly/validators/layout/legend/grouptitlefont/_shadow.py index b25dae8b93..9929e5ae97 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_shadow.py +++ b/plotly/validators/layout/legend/grouptitlefont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.legend.grouptitlefont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/grouptitlefont/_size.py b/plotly/validators/layout/legend/grouptitlefont/_size.py index 31b4d96e0c..984197d72c 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_size.py +++ b/plotly/validators/layout/legend/grouptitlefont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.legend.grouptitlefont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/legend/grouptitlefont/_style.py b/plotly/validators/layout/legend/grouptitlefont/_style.py index 5c7853b299..2e218eba35 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_style.py +++ b/plotly/validators/layout/legend/grouptitlefont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.legend.grouptitlefont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/legend/grouptitlefont/_textcase.py b/plotly/validators/layout/legend/grouptitlefont/_textcase.py index 26840847c2..518ec68f90 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_textcase.py +++ b/plotly/validators/layout/legend/grouptitlefont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.legend.grouptitlefont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/legend/grouptitlefont/_variant.py b/plotly/validators/layout/legend/grouptitlefont/_variant.py index d37c051b53..4c4834c996 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_variant.py +++ b/plotly/validators/layout/legend/grouptitlefont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.legend.grouptitlefont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/legend/grouptitlefont/_weight.py b/plotly/validators/layout/legend/grouptitlefont/_weight.py index cd3f26ff39..4a6a1c74c7 100644 --- a/plotly/validators/layout/legend/grouptitlefont/_weight.py +++ b/plotly/validators/layout/legend/grouptitlefont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.legend.grouptitlefont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/legend/title/__init__.py b/plotly/validators/layout/legend/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/layout/legend/title/__init__.py +++ b/plotly/validators/layout/legend/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/layout/legend/title/_font.py b/plotly/validators/layout/legend/title/_font.py index 06c35bdf73..57ea3fbd92 100644 --- a/plotly/validators/layout/legend/title/_font.py +++ b/plotly/validators/layout/legend/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.legend.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/legend/title/_side.py b/plotly/validators/layout/legend/title/_side.py index 42178ee3fe..be4becbfdc 100644 --- a/plotly/validators/layout/legend/title/_side.py +++ b/plotly/validators/layout/legend/title/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="layout.legend.title", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop( "values", ["top", "left", "top left", "top center", "top right"] diff --git a/plotly/validators/layout/legend/title/_text.py b/plotly/validators/layout/legend/title/_text.py index 8cbb6a6429..a65973d20e 100644 --- a/plotly/validators/layout/legend/title/_text.py +++ b/plotly/validators/layout/legend/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.legend.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/title/font/__init__.py b/plotly/validators/layout/legend/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/legend/title/font/__init__.py +++ b/plotly/validators/layout/legend/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/legend/title/font/_color.py b/plotly/validators/layout/legend/title/font/_color.py index 8f7592de6f..2b4ab363e0 100644 --- a/plotly/validators/layout/legend/title/font/_color.py +++ b/plotly/validators/layout/legend/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.legend.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/title/font/_family.py b/plotly/validators/layout/legend/title/font/_family.py index 651858af1f..d477a739cb 100644 --- a/plotly/validators/layout/legend/title/font/_family.py +++ b/plotly/validators/layout/legend/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.legend.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/legend/title/font/_lineposition.py b/plotly/validators/layout/legend/title/font/_lineposition.py index e7365f4324..df340e1270 100644 --- a/plotly/validators/layout/legend/title/font/_lineposition.py +++ b/plotly/validators/layout/legend/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.legend.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/legend/title/font/_shadow.py b/plotly/validators/layout/legend/title/font/_shadow.py index 45f0c5cd5b..15372353a8 100644 --- a/plotly/validators/layout/legend/title/font/_shadow.py +++ b/plotly/validators/layout/legend/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.legend.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), **kwargs, ) diff --git a/plotly/validators/layout/legend/title/font/_size.py b/plotly/validators/layout/legend/title/font/_size.py index f4118a7ac5..1444306a5b 100644 --- a/plotly/validators/layout/legend/title/font/_size.py +++ b/plotly/validators/layout/legend/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.legend.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/legend/title/font/_style.py b/plotly/validators/layout/legend/title/font/_style.py index d9060d32fb..ddeaffda21 100644 --- a/plotly/validators/layout/legend/title/font/_style.py +++ b/plotly/validators/layout/legend/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.legend.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/legend/title/font/_textcase.py b/plotly/validators/layout/legend/title/font/_textcase.py index 7d11b19beb..a13453e576 100644 --- a/plotly/validators/layout/legend/title/font/_textcase.py +++ b/plotly/validators/layout/legend/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.legend.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/legend/title/font/_variant.py b/plotly/validators/layout/legend/title/font/_variant.py index df328ff10e..d03533a661 100644 --- a/plotly/validators/layout/legend/title/font/_variant.py +++ b/plotly/validators/layout/legend/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.legend.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/legend/title/font/_weight.py b/plotly/validators/layout/legend/title/font/_weight.py index 4bb55053e7..aeb16c84a7 100644 --- a/plotly/validators/layout/legend/title/font/_weight.py +++ b/plotly/validators/layout/legend/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.legend.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "legend"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/map/__init__.py b/plotly/validators/layout/map/__init__.py index 13714b4f18..a9910810fb 100644 --- a/plotly/validators/layout/map/__init__.py +++ b/plotly/validators/layout/map/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zoom import ZoomValidator - from ._uirevision import UirevisionValidator - from ._style import StyleValidator - from ._pitch import PitchValidator - from ._layerdefaults import LayerdefaultsValidator - from ._layers import LayersValidator - from ._domain import DomainValidator - from ._center import CenterValidator - from ._bounds import BoundsValidator - from ._bearing import BearingValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zoom.ZoomValidator", - "._uirevision.UirevisionValidator", - "._style.StyleValidator", - "._pitch.PitchValidator", - "._layerdefaults.LayerdefaultsValidator", - "._layers.LayersValidator", - "._domain.DomainValidator", - "._center.CenterValidator", - "._bounds.BoundsValidator", - "._bearing.BearingValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zoom.ZoomValidator", + "._uirevision.UirevisionValidator", + "._style.StyleValidator", + "._pitch.PitchValidator", + "._layerdefaults.LayerdefaultsValidator", + "._layers.LayersValidator", + "._domain.DomainValidator", + "._center.CenterValidator", + "._bounds.BoundsValidator", + "._bearing.BearingValidator", + ], +) diff --git a/plotly/validators/layout/map/_bearing.py b/plotly/validators/layout/map/_bearing.py index 5190be3314..1102e28157 100644 --- a/plotly/validators/layout/map/_bearing.py +++ b/plotly/validators/layout/map/_bearing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BearingValidator(_plotly_utils.basevalidators.NumberValidator): +class BearingValidator(_bv.NumberValidator): def __init__(self, plotly_name="bearing", parent_name="layout.map", **kwargs): - super(BearingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/_bounds.py b/plotly/validators/layout/map/_bounds.py index 90a912790d..0fc29b8967 100644 --- a/plotly/validators/layout/map/_bounds.py +++ b/plotly/validators/layout/map/_bounds.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoundsValidator(_plotly_utils.basevalidators.CompoundValidator): +class BoundsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="bounds", parent_name="layout.map", **kwargs): - super(BoundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Bounds"), data_docs=kwargs.pop( "data_docs", """ - east - Sets the maximum longitude of the map (in - degrees East) if `west`, `south` and `north` - are declared. - north - Sets the maximum latitude of the map (in - degrees North) if `east`, `west` and `south` - are declared. - south - Sets the minimum latitude of the map (in - degrees North) if `east`, `west` and `north` - are declared. - west - Sets the minimum longitude of the map (in - degrees East) if `east`, `south` and `north` - are declared. """, ), **kwargs, diff --git a/plotly/validators/layout/map/_center.py b/plotly/validators/layout/map/_center.py index 8c4eb4cdde..407dd107e5 100644 --- a/plotly/validators/layout/map/_center.py +++ b/plotly/validators/layout/map/_center.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): +class CenterValidator(_bv.CompoundValidator): def __init__(self, plotly_name="center", parent_name="layout.map", **kwargs): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Center"), data_docs=kwargs.pop( "data_docs", """ - lat - Sets the latitude of the center of the map (in - degrees North). - lon - Sets the longitude of the center of the map (in - degrees East). """, ), **kwargs, diff --git a/plotly/validators/layout/map/_domain.py b/plotly/validators/layout/map/_domain.py index 1816945fce..7eaa5682dd 100644 --- a/plotly/validators/layout/map/_domain.py +++ b/plotly/validators/layout/map/_domain.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.map", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this map subplot . - row - If there is a layout grid, use the domain for - this row in the grid for this map subplot . - x - Sets the horizontal domain of this map subplot - (in plot fraction). - y - Sets the vertical domain of this map subplot - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/layout/map/_layerdefaults.py b/plotly/validators/layout/map/_layerdefaults.py index 9ab62ff5bf..3f47fa510d 100644 --- a/plotly/validators/layout/map/_layerdefaults.py +++ b/plotly/validators/layout/map/_layerdefaults.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class LayerdefaultsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="layerdefaults", parent_name="layout.map", **kwargs): - super(LayerdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Layer"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/map/_layers.py b/plotly/validators/layout/map/_layers.py index 9ace253977..3c27c997a5 100644 --- a/plotly/validators/layout/map/_layers.py +++ b/plotly/validators/layout/map/_layers.py @@ -1,126 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class LayersValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="layers", parent_name="layout.map", **kwargs): - super(LayersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Layer"), data_docs=kwargs.pop( "data_docs", """ - below - Determines if the layer will be inserted before - the layer with the specified ID. If omitted or - set to '', the layer will be inserted above - every existing layer. - circle - :class:`plotly.graph_objects.layout.map.layer.C - ircle` instance or dict with compatible - properties - color - Sets the primary layer color. If `type` is - "circle", color corresponds to the circle color - (map.layer.paint.circle-color) If `type` is - "line", color corresponds to the line color - (map.layer.paint.line-color) If `type` is - "fill", color corresponds to the fill color - (map.layer.paint.fill-color) If `type` is - "symbol", color corresponds to the icon color - (map.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom - right, bottom left. Only has an effect for - "image" `sourcetype`. - fill - :class:`plotly.graph_objects.layout.map.layer.F - ill` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.layout.map.layer.L - ine` instance or dict with compatible - properties - maxzoom - Sets the maximum zoom level - (map.layer.maxzoom). At zoom levels equal to or - greater than the maxzoom, the layer will be - hidden. - minzoom - Sets the minimum zoom level - (map.layer.minzoom). At zoom levels less than - the minzoom, the layer will be hidden. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the layer. If `type` is - "circle", opacity corresponds to the circle - opacity (map.layer.paint.circle-opacity) If - `type` is "line", opacity corresponds to the - line opacity (map.layer.paint.line-opacity) If - `type` is "fill", opacity corresponds to the - fill opacity (map.layer.paint.fill-opacity) If - `type` is "symbol", opacity corresponds to the - icon/text opacity (map.layer.paint.text- - opacity) - source - Sets the source data for this layer - (map.layer.source). When `sourcetype` is set to - "geojson", `source` can be a URL to a GeoJSON - or a GeoJSON object. When `sourcetype` is set - to "vector" or "raster", `source` can be a URL - or an array of tile URLs. When `sourcetype` is - set to "image", `source` can be a URL to an - image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile - source (map.layer.source-layer). Required for - "vector" source type that supports multiple - layers. - sourcetype - Sets the source type for this layer, that is - the type of the layer data. - symbol - :class:`plotly.graph_objects.layout.map.layer.S - ymbol` instance or dict with compatible - properties - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer - data set in `source` will be rendered With - `sourcetype` set to "geojson", the following - values are allowed: "circle", "line", "fill" - and "symbol". but note that "line" and "fill" - are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", - the following values are allowed: "circle", - "line", "fill" and "symbol". With `sourcetype` - set to "raster" or `*image*`, only the "raster" - value is allowed. - visible - Determines whether this layer is displayed """, ), **kwargs, diff --git a/plotly/validators/layout/map/_pitch.py b/plotly/validators/layout/map/_pitch.py index 33e2aafa69..94fd1a7ae6 100644 --- a/plotly/validators/layout/map/_pitch.py +++ b/plotly/validators/layout/map/_pitch.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PitchValidator(_plotly_utils.basevalidators.NumberValidator): +class PitchValidator(_bv.NumberValidator): def __init__(self, plotly_name="pitch", parent_name="layout.map", **kwargs): - super(PitchValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/_style.py b/plotly/validators/layout/map/_style.py index 8b84e2be47..b68476d9bb 100644 --- a/plotly/validators/layout/map/_style.py +++ b/plotly/validators/layout/map/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.AnyValidator): +class StyleValidator(_bv.AnyValidator): def __init__(self, plotly_name="style", parent_name="layout.map", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/map/_uirevision.py b/plotly/validators/layout/map/_uirevision.py index e859dacb58..581afb45c8 100644 --- a/plotly/validators/layout/map/_uirevision.py +++ b/plotly/validators/layout/map/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.map", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/map/_zoom.py b/plotly/validators/layout/map/_zoom.py index b9916f3172..e5720f6d82 100644 --- a/plotly/validators/layout/map/_zoom.py +++ b/plotly/validators/layout/map/_zoom.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZoomValidator(_plotly_utils.basevalidators.NumberValidator): +class ZoomValidator(_bv.NumberValidator): def __init__(self, plotly_name="zoom", parent_name="layout.map", **kwargs): - super(ZoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/bounds/__init__.py b/plotly/validators/layout/map/bounds/__init__.py index c07c964cd6..fe63c18499 100644 --- a/plotly/validators/layout/map/bounds/__init__.py +++ b/plotly/validators/layout/map/bounds/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._west import WestValidator - from ._south import SouthValidator - from ._north import NorthValidator - from ._east import EastValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._west.WestValidator", - "._south.SouthValidator", - "._north.NorthValidator", - "._east.EastValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._west.WestValidator", + "._south.SouthValidator", + "._north.NorthValidator", + "._east.EastValidator", + ], +) diff --git a/plotly/validators/layout/map/bounds/_east.py b/plotly/validators/layout/map/bounds/_east.py index 82f489f5fd..39e207ad3a 100644 --- a/plotly/validators/layout/map/bounds/_east.py +++ b/plotly/validators/layout/map/bounds/_east.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EastValidator(_plotly_utils.basevalidators.NumberValidator): +class EastValidator(_bv.NumberValidator): def __init__(self, plotly_name="east", parent_name="layout.map.bounds", **kwargs): - super(EastValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/bounds/_north.py b/plotly/validators/layout/map/bounds/_north.py index a8eb320ed2..52413428c5 100644 --- a/plotly/validators/layout/map/bounds/_north.py +++ b/plotly/validators/layout/map/bounds/_north.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NorthValidator(_plotly_utils.basevalidators.NumberValidator): +class NorthValidator(_bv.NumberValidator): def __init__(self, plotly_name="north", parent_name="layout.map.bounds", **kwargs): - super(NorthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/bounds/_south.py b/plotly/validators/layout/map/bounds/_south.py index c1259da69a..7448195974 100644 --- a/plotly/validators/layout/map/bounds/_south.py +++ b/plotly/validators/layout/map/bounds/_south.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SouthValidator(_plotly_utils.basevalidators.NumberValidator): +class SouthValidator(_bv.NumberValidator): def __init__(self, plotly_name="south", parent_name="layout.map.bounds", **kwargs): - super(SouthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/bounds/_west.py b/plotly/validators/layout/map/bounds/_west.py index 6e7d7d26f8..31e504b899 100644 --- a/plotly/validators/layout/map/bounds/_west.py +++ b/plotly/validators/layout/map/bounds/_west.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WestValidator(_plotly_utils.basevalidators.NumberValidator): +class WestValidator(_bv.NumberValidator): def __init__(self, plotly_name="west", parent_name="layout.map.bounds", **kwargs): - super(WestValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/center/__init__.py b/plotly/validators/layout/map/center/__init__.py index a723b74f14..bd95067321 100644 --- a/plotly/validators/layout/map/center/__init__.py +++ b/plotly/validators/layout/map/center/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._lon import LonValidator - from ._lat import LatValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] +) diff --git a/plotly/validators/layout/map/center/_lat.py b/plotly/validators/layout/map/center/_lat.py index 103eaa5098..c601745f03 100644 --- a/plotly/validators/layout/map/center/_lat.py +++ b/plotly/validators/layout/map/center/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.NumberValidator): +class LatValidator(_bv.NumberValidator): def __init__(self, plotly_name="lat", parent_name="layout.map.center", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/center/_lon.py b/plotly/validators/layout/map/center/_lon.py index 92ac5de39f..3b0f3d88a1 100644 --- a/plotly/validators/layout/map/center/_lon.py +++ b/plotly/validators/layout/map/center/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.NumberValidator): +class LonValidator(_bv.NumberValidator): def __init__(self, plotly_name="lon", parent_name="layout.map.center", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/domain/__init__.py b/plotly/validators/layout/map/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/map/domain/__init__.py +++ b/plotly/validators/layout/map/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/map/domain/_column.py b/plotly/validators/layout/map/domain/_column.py index 1edcaf12d1..72671678f7 100644 --- a/plotly/validators/layout/map/domain/_column.py +++ b/plotly/validators/layout/map/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="layout.map.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/map/domain/_row.py b/plotly/validators/layout/map/domain/_row.py index bbe67e36d9..28be0c102a 100644 --- a/plotly/validators/layout/map/domain/_row.py +++ b/plotly/validators/layout/map/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.map.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/map/domain/_x.py b/plotly/validators/layout/map/domain/_x.py index 91c2b9a1c4..b8eeb94489 100644 --- a/plotly/validators/layout/map/domain/_x.py +++ b/plotly/validators/layout/map/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.map.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/map/domain/_y.py b/plotly/validators/layout/map/domain/_y.py index 9fe193fee8..52ff7c875d 100644 --- a/plotly/validators/layout/map/domain/_y.py +++ b/plotly/validators/layout/map/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.map.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/map/layer/__init__.py b/plotly/validators/layout/map/layer/__init__.py index 93e08a556b..824c7d802a 100644 --- a/plotly/validators/layout/map/layer/__init__.py +++ b/plotly/validators/layout/map/layer/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._templateitemname import TemplateitemnameValidator - from ._symbol import SymbolValidator - from ._sourcetype import SourcetypeValidator - from ._sourcelayer import SourcelayerValidator - from ._sourceattribution import SourceattributionValidator - from ._source import SourceValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._minzoom import MinzoomValidator - from ._maxzoom import MaxzoomValidator - from ._line import LineValidator - from ._fill import FillValidator - from ._coordinates import CoordinatesValidator - from ._color import ColorValidator - from ._circle import CircleValidator - from ._below import BelowValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._type.TypeValidator", - "._templateitemname.TemplateitemnameValidator", - "._symbol.SymbolValidator", - "._sourcetype.SourcetypeValidator", - "._sourcelayer.SourcelayerValidator", - "._sourceattribution.SourceattributionValidator", - "._source.SourceValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._minzoom.MinzoomValidator", - "._maxzoom.MaxzoomValidator", - "._line.LineValidator", - "._fill.FillValidator", - "._coordinates.CoordinatesValidator", - "._color.ColorValidator", - "._circle.CircleValidator", - "._below.BelowValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._symbol.SymbolValidator", + "._sourcetype.SourcetypeValidator", + "._sourcelayer.SourcelayerValidator", + "._sourceattribution.SourceattributionValidator", + "._source.SourceValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._minzoom.MinzoomValidator", + "._maxzoom.MaxzoomValidator", + "._line.LineValidator", + "._fill.FillValidator", + "._coordinates.CoordinatesValidator", + "._color.ColorValidator", + "._circle.CircleValidator", + "._below.BelowValidator", + ], +) diff --git a/plotly/validators/layout/map/layer/_below.py b/plotly/validators/layout/map/layer/_below.py index 6cca251a6e..2c6590050e 100644 --- a/plotly/validators/layout/map/layer/_below.py +++ b/plotly/validators/layout/map/layer/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="layout.map.layer", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_circle.py b/plotly/validators/layout/map/layer/_circle.py index 1aa48e43fe..0778e3b15d 100644 --- a/plotly/validators/layout/map/layer/_circle.py +++ b/plotly/validators/layout/map/layer/_circle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CircleValidator(_plotly_utils.basevalidators.CompoundValidator): +class CircleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="circle", parent_name="layout.map.layer", **kwargs): - super(CircleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Circle"), data_docs=kwargs.pop( "data_docs", """ - radius - Sets the circle radius (map.layer.paint.circle- - radius). Has an effect only when `type` is set - to "circle". """, ), **kwargs, diff --git a/plotly/validators/layout/map/layer/_color.py b/plotly/validators/layout/map/layer/_color.py index 97359cfbc6..03856b0e33 100644 --- a/plotly/validators/layout/map/layer/_color.py +++ b/plotly/validators/layout/map/layer/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.map.layer", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_coordinates.py b/plotly/validators/layout/map/layer/_coordinates.py index f7a91cbc53..57abf55d17 100644 --- a/plotly/validators/layout/map/layer/_coordinates.py +++ b/plotly/validators/layout/map/layer/_coordinates.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CoordinatesValidator(_plotly_utils.basevalidators.AnyValidator): +class CoordinatesValidator(_bv.AnyValidator): def __init__( self, plotly_name="coordinates", parent_name="layout.map.layer", **kwargs ): - super(CoordinatesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_fill.py b/plotly/validators/layout/map/layer/_fill.py index 1b9742afc4..8b2f3cf521 100644 --- a/plotly/validators/layout/map/layer/_fill.py +++ b/plotly/validators/layout/map/layer/_fill.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): +class FillValidator(_bv.CompoundValidator): def __init__(self, plotly_name="fill", parent_name="layout.map.layer", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Fill"), data_docs=kwargs.pop( "data_docs", """ - outlinecolor - Sets the fill outline color - (map.layer.paint.fill-outline-color). Has an - effect only when `type` is set to "fill". """, ), **kwargs, diff --git a/plotly/validators/layout/map/layer/_line.py b/plotly/validators/layout/map/layer/_line.py index 82872348c2..560f3109a7 100644 --- a/plotly/validators/layout/map/layer/_line.py +++ b/plotly/validators/layout/map/layer/_line.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="layout.map.layer", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - dash - Sets the length of dashes and gaps - (map.layer.paint.line-dasharray). Has an effect - only when `type` is set to "line". - dashsrc - Sets the source reference on Chart Studio Cloud - for `dash`. - width - Sets the line width (map.layer.paint.line- - width). Has an effect only when `type` is set - to "line". """, ), **kwargs, diff --git a/plotly/validators/layout/map/layer/_maxzoom.py b/plotly/validators/layout/map/layer/_maxzoom.py index 9d44e32c31..ae0341b280 100644 --- a/plotly/validators/layout/map/layer/_maxzoom.py +++ b/plotly/validators/layout/map/layer/_maxzoom.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxzoomValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxzoom", parent_name="layout.map.layer", **kwargs): - super(MaxzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 24), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/map/layer/_minzoom.py b/plotly/validators/layout/map/layer/_minzoom.py index efce76e2df..411614f910 100644 --- a/plotly/validators/layout/map/layer/_minzoom.py +++ b/plotly/validators/layout/map/layer/_minzoom.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinzoomValidator(_plotly_utils.basevalidators.NumberValidator): +class MinzoomValidator(_bv.NumberValidator): def __init__(self, plotly_name="minzoom", parent_name="layout.map.layer", **kwargs): - super(MinzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 24), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/map/layer/_name.py b/plotly/validators/layout/map/layer/_name.py index 8b1a0d8b7c..ec013feae0 100644 --- a/plotly/validators/layout/map/layer/_name.py +++ b/plotly/validators/layout/map/layer/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.map.layer", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_opacity.py b/plotly/validators/layout/map/layer/_opacity.py index 00314bdd7e..d71e275b02 100644 --- a/plotly/validators/layout/map/layer/_opacity.py +++ b/plotly/validators/layout/map/layer/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="layout.map.layer", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/map/layer/_source.py b/plotly/validators/layout/map/layer/_source.py index fcbb4f5b1b..0830887b37 100644 --- a/plotly/validators/layout/map/layer/_source.py +++ b/plotly/validators/layout/map/layer/_source.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceValidator(_plotly_utils.basevalidators.AnyValidator): +class SourceValidator(_bv.AnyValidator): def __init__(self, plotly_name="source", parent_name="layout.map.layer", **kwargs): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_sourceattribution.py b/plotly/validators/layout/map/layer/_sourceattribution.py index dc43e5f8fe..72ad87848c 100644 --- a/plotly/validators/layout/map/layer/_sourceattribution.py +++ b/plotly/validators/layout/map/layer/_sourceattribution.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceattributionValidator(_plotly_utils.basevalidators.StringValidator): +class SourceattributionValidator(_bv.StringValidator): def __init__( self, plotly_name="sourceattribution", parent_name="layout.map.layer", **kwargs ): - super(SourceattributionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_sourcelayer.py b/plotly/validators/layout/map/layer/_sourcelayer.py index 61a15d14fe..097bcd1a39 100644 --- a/plotly/validators/layout/map/layer/_sourcelayer.py +++ b/plotly/validators/layout/map/layer/_sourcelayer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourcelayerValidator(_plotly_utils.basevalidators.StringValidator): +class SourcelayerValidator(_bv.StringValidator): def __init__( self, plotly_name="sourcelayer", parent_name="layout.map.layer", **kwargs ): - super(SourcelayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_sourcetype.py b/plotly/validators/layout/map/layer/_sourcetype.py index 55bd490406..61c3d1b269 100644 --- a/plotly/validators/layout/map/layer/_sourcetype.py +++ b/plotly/validators/layout/map/layer/_sourcetype.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourcetypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SourcetypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sourcetype", parent_name="layout.map.layer", **kwargs ): - super(SourcetypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["geojson", "vector", "raster", "image"]), **kwargs, diff --git a/plotly/validators/layout/map/layer/_symbol.py b/plotly/validators/layout/map/layer/_symbol.py index 1192a69a57..bf10b2f474 100644 --- a/plotly/validators/layout/map/layer/_symbol.py +++ b/plotly/validators/layout/map/layer/_symbol.py @@ -1,43 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.CompoundValidator): +class SymbolValidator(_bv.CompoundValidator): def __init__(self, plotly_name="symbol", parent_name="layout.map.layer", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Symbol"), data_docs=kwargs.pop( "data_docs", """ - icon - Sets the symbol icon image - (map.layer.layout.icon-image). Full list: - https://www.map.com/maki-icons/ - iconsize - Sets the symbol icon size - (map.layer.layout.icon-size). Has an effect - only when `type` is set to "symbol". - placement - Sets the symbol and/or text placement - (map.layer.layout.symbol-placement). If - `placement` is "point", the label is placed - where the geometry is located If `placement` is - "line", the label is placed along the line of - the geometry If `placement` is "line-center", - the label is placed on the center of the - geometry - text - Sets the symbol text (map.layer.layout.text- - field). - textfont - Sets the icon text font - (color=map.layer.paint.text-color, - size=map.layer.layout.text-size). Has an effect - only when `type` is set to "symbol". - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. """, ), **kwargs, diff --git a/plotly/validators/layout/map/layer/_templateitemname.py b/plotly/validators/layout/map/layer/_templateitemname.py index 6e9cb4fffa..49ed6660c2 100644 --- a/plotly/validators/layout/map/layer/_templateitemname.py +++ b/plotly/validators/layout/map/layer/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.map.layer", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/_type.py b/plotly/validators/layout/map/layer/_type.py index 5a88a15398..776b49ed8e 100644 --- a/plotly/validators/layout/map/layer/_type.py +++ b/plotly/validators/layout/map/layer/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.map.layer", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["circle", "line", "fill", "symbol", "raster"]), **kwargs, diff --git a/plotly/validators/layout/map/layer/_visible.py b/plotly/validators/layout/map/layer/_visible.py index dbf3fb48ff..5ea1650197 100644 --- a/plotly/validators/layout/map/layer/_visible.py +++ b/plotly/validators/layout/map/layer/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.map.layer", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/circle/__init__.py b/plotly/validators/layout/map/layer/circle/__init__.py index 659abf22fb..3ab81e9169 100644 --- a/plotly/validators/layout/map/layer/circle/__init__.py +++ b/plotly/validators/layout/map/layer/circle/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._radius import RadiusValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._radius.RadiusValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._radius.RadiusValidator"] +) diff --git a/plotly/validators/layout/map/layer/circle/_radius.py b/plotly/validators/layout/map/layer/circle/_radius.py index 36d8020c13..c219091cdd 100644 --- a/plotly/validators/layout/map/layer/circle/_radius.py +++ b/plotly/validators/layout/map/layer/circle/_radius.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): +class RadiusValidator(_bv.NumberValidator): def __init__( self, plotly_name="radius", parent_name="layout.map.layer.circle", **kwargs ): - super(RadiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/fill/__init__.py b/plotly/validators/layout/map/layer/fill/__init__.py index 722f28333c..d169627477 100644 --- a/plotly/validators/layout/map/layer/fill/__init__.py +++ b/plotly/validators/layout/map/layer/fill/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._outlinecolor import OutlinecolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._outlinecolor.OutlinecolorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._outlinecolor.OutlinecolorValidator"] +) diff --git a/plotly/validators/layout/map/layer/fill/_outlinecolor.py b/plotly/validators/layout/map/layer/fill/_outlinecolor.py index 71a131968f..1a520ac84b 100644 --- a/plotly/validators/layout/map/layer/fill/_outlinecolor.py +++ b/plotly/validators/layout/map/layer/fill/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="layout.map.layer.fill", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/line/__init__.py b/plotly/validators/layout/map/layer/line/__init__.py index e2f415ff5b..ebb48ff6e2 100644 --- a/plotly/validators/layout/map/layer/line/__init__.py +++ b/plotly/validators/layout/map/layer/line/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dashsrc import DashsrcValidator - from ._dash import DashValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._dashsrc.DashsrcValidator", - "._dash.DashValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dashsrc.DashsrcValidator", "._dash.DashValidator"], +) diff --git a/plotly/validators/layout/map/layer/line/_dash.py b/plotly/validators/layout/map/layer/line/_dash.py index 22f56eb1cd..a9ff24fb73 100644 --- a/plotly/validators/layout/map/layer/line/_dash.py +++ b/plotly/validators/layout/map/layer/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DataArrayValidator): +class DashValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="dash", parent_name="layout.map.layer.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/line/_dashsrc.py b/plotly/validators/layout/map/layer/line/_dashsrc.py index 5030f6bebf..cb7289747d 100644 --- a/plotly/validators/layout/map/layer/line/_dashsrc.py +++ b/plotly/validators/layout/map/layer/line/_dashsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class DashsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="dashsrc", parent_name="layout.map.layer.line", **kwargs ): - super(DashsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/line/_width.py b/plotly/validators/layout/map/layer/line/_width.py index b61a9d03f4..010603e0d3 100644 --- a/plotly/validators/layout/map/layer/line/_width.py +++ b/plotly/validators/layout/map/layer/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.map.layer.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/symbol/__init__.py b/plotly/validators/layout/map/layer/symbol/__init__.py index 2b890e661e..41fc41c8fd 100644 --- a/plotly/validators/layout/map/layer/symbol/__init__.py +++ b/plotly/validators/layout/map/layer/symbol/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._placement import PlacementValidator - from ._iconsize import IconsizeValidator - from ._icon import IconValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._placement.PlacementValidator", - "._iconsize.IconsizeValidator", - "._icon.IconValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._placement.PlacementValidator", + "._iconsize.IconsizeValidator", + "._icon.IconValidator", + ], +) diff --git a/plotly/validators/layout/map/layer/symbol/_icon.py b/plotly/validators/layout/map/layer/symbol/_icon.py index dcdf5a5130..eb819f4220 100644 --- a/plotly/validators/layout/map/layer/symbol/_icon.py +++ b/plotly/validators/layout/map/layer/symbol/_icon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IconValidator(_plotly_utils.basevalidators.StringValidator): +class IconValidator(_bv.StringValidator): def __init__( self, plotly_name="icon", parent_name="layout.map.layer.symbol", **kwargs ): - super(IconValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/symbol/_iconsize.py b/plotly/validators/layout/map/layer/symbol/_iconsize.py index 781d192446..d55d2dd3da 100644 --- a/plotly/validators/layout/map/layer/symbol/_iconsize.py +++ b/plotly/validators/layout/map/layer/symbol/_iconsize.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class IconsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="iconsize", parent_name="layout.map.layer.symbol", **kwargs ): - super(IconsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/symbol/_placement.py b/plotly/validators/layout/map/layer/symbol/_placement.py index 2a23813949..2bc6eda112 100644 --- a/plotly/validators/layout/map/layer/symbol/_placement.py +++ b/plotly/validators/layout/map/layer/symbol/_placement.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PlacementValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PlacementValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="placement", parent_name="layout.map.layer.symbol", **kwargs ): - super(PlacementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["point", "line", "line-center"]), **kwargs, diff --git a/plotly/validators/layout/map/layer/symbol/_text.py b/plotly/validators/layout/map/layer/symbol/_text.py index a7e3de35b6..6f679cab4b 100644 --- a/plotly/validators/layout/map/layer/symbol/_text.py +++ b/plotly/validators/layout/map/layer/symbol/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.map.layer.symbol", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/symbol/_textfont.py b/plotly/validators/layout/map/layer/symbol/_textfont.py index d2e2100b83..c260a02cc7 100644 --- a/plotly/validators/layout/map/layer/symbol/_textfont.py +++ b/plotly/validators/layout/map/layer/symbol/_textfont.py @@ -1,43 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="layout.map.layer.symbol", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/map/layer/symbol/_textposition.py b/plotly/validators/layout/map/layer/symbol/_textposition.py index bd33675f9d..23497cbd4d 100644 --- a/plotly/validators/layout/map/layer/symbol/_textposition.py +++ b/plotly/validators/layout/map/layer/symbol/_textposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="layout.map.layer.symbol", **kwargs, ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/layout/map/layer/symbol/textfont/__init__.py b/plotly/validators/layout/map/layer/symbol/textfont/__init__.py index 9301c0688c..13cbf9ae54 100644 --- a/plotly/validators/layout/map/layer/symbol/textfont/__init__.py +++ b/plotly/validators/layout/map/layer/symbol/textfont/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/map/layer/symbol/textfont/_color.py b/plotly/validators/layout/map/layer/symbol/textfont/_color.py index dae1cc1050..e688a8253d 100644 --- a/plotly/validators/layout/map/layer/symbol/textfont/_color.py +++ b/plotly/validators/layout/map/layer/symbol/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.map.layer.symbol.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/map/layer/symbol/textfont/_family.py b/plotly/validators/layout/map/layer/symbol/textfont/_family.py index d0eae613de..8f060b1454 100644 --- a/plotly/validators/layout/map/layer/symbol/textfont/_family.py +++ b/plotly/validators/layout/map/layer/symbol/textfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.map.layer.symbol.textfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/map/layer/symbol/textfont/_size.py b/plotly/validators/layout/map/layer/symbol/textfont/_size.py index 3d73bc2cd7..6ed4c7893b 100644 --- a/plotly/validators/layout/map/layer/symbol/textfont/_size.py +++ b/plotly/validators/layout/map/layer/symbol/textfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.map.layer.symbol.textfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/map/layer/symbol/textfont/_style.py b/plotly/validators/layout/map/layer/symbol/textfont/_style.py index 67ccc17c09..e572ab4169 100644 --- a/plotly/validators/layout/map/layer/symbol/textfont/_style.py +++ b/plotly/validators/layout/map/layer/symbol/textfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.map.layer.symbol.textfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/map/layer/symbol/textfont/_weight.py b/plotly/validators/layout/map/layer/symbol/textfont/_weight.py index 8ecec96650..00b6d561f8 100644 --- a/plotly/validators/layout/map/layer/symbol/textfont/_weight.py +++ b/plotly/validators/layout/map/layer/symbol/textfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.map.layer.symbol.textfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/mapbox/__init__.py b/plotly/validators/layout/mapbox/__init__.py index 5e56f18ab5..c3ed5b178f 100644 --- a/plotly/validators/layout/mapbox/__init__.py +++ b/plotly/validators/layout/mapbox/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zoom import ZoomValidator - from ._uirevision import UirevisionValidator - from ._style import StyleValidator - from ._pitch import PitchValidator - from ._layerdefaults import LayerdefaultsValidator - from ._layers import LayersValidator - from ._domain import DomainValidator - from ._center import CenterValidator - from ._bounds import BoundsValidator - from ._bearing import BearingValidator - from ._accesstoken import AccesstokenValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zoom.ZoomValidator", - "._uirevision.UirevisionValidator", - "._style.StyleValidator", - "._pitch.PitchValidator", - "._layerdefaults.LayerdefaultsValidator", - "._layers.LayersValidator", - "._domain.DomainValidator", - "._center.CenterValidator", - "._bounds.BoundsValidator", - "._bearing.BearingValidator", - "._accesstoken.AccesstokenValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zoom.ZoomValidator", + "._uirevision.UirevisionValidator", + "._style.StyleValidator", + "._pitch.PitchValidator", + "._layerdefaults.LayerdefaultsValidator", + "._layers.LayersValidator", + "._domain.DomainValidator", + "._center.CenterValidator", + "._bounds.BoundsValidator", + "._bearing.BearingValidator", + "._accesstoken.AccesstokenValidator", + ], +) diff --git a/plotly/validators/layout/mapbox/_accesstoken.py b/plotly/validators/layout/mapbox/_accesstoken.py index 8567b7bc77..3760c403f3 100644 --- a/plotly/validators/layout/mapbox/_accesstoken.py +++ b/plotly/validators/layout/mapbox/_accesstoken.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AccesstokenValidator(_plotly_utils.basevalidators.StringValidator): +class AccesstokenValidator(_bv.StringValidator): def __init__( self, plotly_name="accesstoken", parent_name="layout.mapbox", **kwargs ): - super(AccesstokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/mapbox/_bearing.py b/plotly/validators/layout/mapbox/_bearing.py index cc1ce00d7b..61f321806e 100644 --- a/plotly/validators/layout/mapbox/_bearing.py +++ b/plotly/validators/layout/mapbox/_bearing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BearingValidator(_plotly_utils.basevalidators.NumberValidator): +class BearingValidator(_bv.NumberValidator): def __init__(self, plotly_name="bearing", parent_name="layout.mapbox", **kwargs): - super(BearingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/_bounds.py b/plotly/validators/layout/mapbox/_bounds.py index b554f79525..2a89b9aa23 100644 --- a/plotly/validators/layout/mapbox/_bounds.py +++ b/plotly/validators/layout/mapbox/_bounds.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoundsValidator(_plotly_utils.basevalidators.CompoundValidator): +class BoundsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="bounds", parent_name="layout.mapbox", **kwargs): - super(BoundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Bounds"), data_docs=kwargs.pop( "data_docs", """ - east - Sets the maximum longitude of the map (in - degrees East) if `west`, `south` and `north` - are declared. - north - Sets the maximum latitude of the map (in - degrees North) if `east`, `west` and `south` - are declared. - south - Sets the minimum latitude of the map (in - degrees North) if `east`, `west` and `north` - are declared. - west - Sets the minimum longitude of the map (in - degrees East) if `east`, `south` and `north` - are declared. """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/_center.py b/plotly/validators/layout/mapbox/_center.py index 0f0eae132c..00a60345ca 100644 --- a/plotly/validators/layout/mapbox/_center.py +++ b/plotly/validators/layout/mapbox/_center.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): +class CenterValidator(_bv.CompoundValidator): def __init__(self, plotly_name="center", parent_name="layout.mapbox", **kwargs): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Center"), data_docs=kwargs.pop( "data_docs", """ - lat - Sets the latitude of the center of the map (in - degrees North). - lon - Sets the longitude of the center of the map (in - degrees East). """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/_domain.py b/plotly/validators/layout/mapbox/_domain.py index e810f05b7a..1d0143c348 100644 --- a/plotly/validators/layout/mapbox/_domain.py +++ b/plotly/validators/layout/mapbox/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.mapbox", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this mapbox subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this mapbox subplot . - x - Sets the horizontal domain of this mapbox - subplot (in plot fraction). - y - Sets the vertical domain of this mapbox subplot - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/_layerdefaults.py b/plotly/validators/layout/mapbox/_layerdefaults.py index e4d0461dfc..1ffd138579 100644 --- a/plotly/validators/layout/mapbox/_layerdefaults.py +++ b/plotly/validators/layout/mapbox/_layerdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class LayerdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="layerdefaults", parent_name="layout.mapbox", **kwargs ): - super(LayerdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Layer"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/mapbox/_layers.py b/plotly/validators/layout/mapbox/_layers.py index 6523028214..9ca80425dd 100644 --- a/plotly/validators/layout/mapbox/_layers.py +++ b/plotly/validators/layout/mapbox/_layers.py @@ -1,126 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayersValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class LayersValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="layers", parent_name="layout.mapbox", **kwargs): - super(LayersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Layer"), data_docs=kwargs.pop( "data_docs", """ - below - Determines if the layer will be inserted before - the layer with the specified ID. If omitted or - set to '', the layer will be inserted above - every existing layer. - circle - :class:`plotly.graph_objects.layout.mapbox.laye - r.Circle` instance or dict with compatible - properties - color - Sets the primary layer color. If `type` is - "circle", color corresponds to the circle color - (mapbox.layer.paint.circle-color) If `type` is - "line", color corresponds to the line color - (mapbox.layer.paint.line-color) If `type` is - "fill", color corresponds to the fill color - (mapbox.layer.paint.fill-color) If `type` is - "symbol", color corresponds to the icon color - (mapbox.layer.paint.icon-color) - coordinates - Sets the coordinates array contains [longitude, - latitude] pairs for the image corners listed in - clockwise order: top left, top right, bottom - right, bottom left. Only has an effect for - "image" `sourcetype`. - fill - :class:`plotly.graph_objects.layout.mapbox.laye - r.Fill` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.layout.mapbox.laye - r.Line` instance or dict with compatible - properties - maxzoom - Sets the maximum zoom level - (mapbox.layer.maxzoom). At zoom levels equal to - or greater than the maxzoom, the layer will be - hidden. - minzoom - Sets the minimum zoom level - (mapbox.layer.minzoom). At zoom levels less - than the minzoom, the layer will be hidden. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the layer. If `type` is - "circle", opacity corresponds to the circle - opacity (mapbox.layer.paint.circle-opacity) If - `type` is "line", opacity corresponds to the - line opacity (mapbox.layer.paint.line-opacity) - If `type` is "fill", opacity corresponds to the - fill opacity (mapbox.layer.paint.fill-opacity) - If `type` is "symbol", opacity corresponds to - the icon/text opacity (mapbox.layer.paint.text- - opacity) - source - Sets the source data for this layer - (mapbox.layer.source). When `sourcetype` is set - to "geojson", `source` can be a URL to a - GeoJSON or a GeoJSON object. When `sourcetype` - is set to "vector" or "raster", `source` can be - a URL or an array of tile URLs. When - `sourcetype` is set to "image", `source` can be - a URL to an image. - sourceattribution - Sets the attribution for this source. - sourcelayer - Specifies the layer to use from a vector tile - source (mapbox.layer.source-layer). Required - for "vector" source type that supports multiple - layers. - sourcetype - Sets the source type for this layer, that is - the type of the layer data. - symbol - :class:`plotly.graph_objects.layout.mapbox.laye - r.Symbol` instance or dict with compatible - properties - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - type - Sets the layer type, that is the how the layer - data set in `source` will be rendered With - `sourcetype` set to "geojson", the following - values are allowed: "circle", "line", "fill" - and "symbol". but note that "line" and "fill" - are not compatible with Point GeoJSON - geometries. With `sourcetype` set to "vector", - the following values are allowed: "circle", - "line", "fill" and "symbol". With `sourcetype` - set to "raster" or `*image*`, only the "raster" - value is allowed. - visible - Determines whether this layer is displayed """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/_pitch.py b/plotly/validators/layout/mapbox/_pitch.py index c0e5ef9130..7feed5a463 100644 --- a/plotly/validators/layout/mapbox/_pitch.py +++ b/plotly/validators/layout/mapbox/_pitch.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PitchValidator(_plotly_utils.basevalidators.NumberValidator): +class PitchValidator(_bv.NumberValidator): def __init__(self, plotly_name="pitch", parent_name="layout.mapbox", **kwargs): - super(PitchValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/_style.py b/plotly/validators/layout/mapbox/_style.py index ee96f7f681..a2d08bf0fd 100644 --- a/plotly/validators/layout/mapbox/_style.py +++ b/plotly/validators/layout/mapbox/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.AnyValidator): +class StyleValidator(_bv.AnyValidator): def __init__(self, plotly_name="style", parent_name="layout.mapbox", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/mapbox/_uirevision.py b/plotly/validators/layout/mapbox/_uirevision.py index 1545116a04..591fdb7753 100644 --- a/plotly/validators/layout/mapbox/_uirevision.py +++ b/plotly/validators/layout/mapbox/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.mapbox", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/_zoom.py b/plotly/validators/layout/mapbox/_zoom.py index 9fb8fdee9d..9ae8b579e6 100644 --- a/plotly/validators/layout/mapbox/_zoom.py +++ b/plotly/validators/layout/mapbox/_zoom.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZoomValidator(_plotly_utils.basevalidators.NumberValidator): +class ZoomValidator(_bv.NumberValidator): def __init__(self, plotly_name="zoom", parent_name="layout.mapbox", **kwargs): - super(ZoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/bounds/__init__.py b/plotly/validators/layout/mapbox/bounds/__init__.py index c07c964cd6..fe63c18499 100644 --- a/plotly/validators/layout/mapbox/bounds/__init__.py +++ b/plotly/validators/layout/mapbox/bounds/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._west import WestValidator - from ._south import SouthValidator - from ._north import NorthValidator - from ._east import EastValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._west.WestValidator", - "._south.SouthValidator", - "._north.NorthValidator", - "._east.EastValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._west.WestValidator", + "._south.SouthValidator", + "._north.NorthValidator", + "._east.EastValidator", + ], +) diff --git a/plotly/validators/layout/mapbox/bounds/_east.py b/plotly/validators/layout/mapbox/bounds/_east.py index c497d0a274..e7828e5054 100644 --- a/plotly/validators/layout/mapbox/bounds/_east.py +++ b/plotly/validators/layout/mapbox/bounds/_east.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EastValidator(_plotly_utils.basevalidators.NumberValidator): +class EastValidator(_bv.NumberValidator): def __init__( self, plotly_name="east", parent_name="layout.mapbox.bounds", **kwargs ): - super(EastValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/bounds/_north.py b/plotly/validators/layout/mapbox/bounds/_north.py index 5250ce0ce5..10787fa0a8 100644 --- a/plotly/validators/layout/mapbox/bounds/_north.py +++ b/plotly/validators/layout/mapbox/bounds/_north.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NorthValidator(_plotly_utils.basevalidators.NumberValidator): +class NorthValidator(_bv.NumberValidator): def __init__( self, plotly_name="north", parent_name="layout.mapbox.bounds", **kwargs ): - super(NorthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/bounds/_south.py b/plotly/validators/layout/mapbox/bounds/_south.py index 4175c1c4b5..f9e30b73b0 100644 --- a/plotly/validators/layout/mapbox/bounds/_south.py +++ b/plotly/validators/layout/mapbox/bounds/_south.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SouthValidator(_plotly_utils.basevalidators.NumberValidator): +class SouthValidator(_bv.NumberValidator): def __init__( self, plotly_name="south", parent_name="layout.mapbox.bounds", **kwargs ): - super(SouthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/bounds/_west.py b/plotly/validators/layout/mapbox/bounds/_west.py index 9e51a1794f..3bbff22792 100644 --- a/plotly/validators/layout/mapbox/bounds/_west.py +++ b/plotly/validators/layout/mapbox/bounds/_west.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WestValidator(_plotly_utils.basevalidators.NumberValidator): +class WestValidator(_bv.NumberValidator): def __init__( self, plotly_name="west", parent_name="layout.mapbox.bounds", **kwargs ): - super(WestValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/center/__init__.py b/plotly/validators/layout/mapbox/center/__init__.py index a723b74f14..bd95067321 100644 --- a/plotly/validators/layout/mapbox/center/__init__.py +++ b/plotly/validators/layout/mapbox/center/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._lon import LonValidator - from ._lat import LatValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._lon.LonValidator", "._lat.LatValidator"] +) diff --git a/plotly/validators/layout/mapbox/center/_lat.py b/plotly/validators/layout/mapbox/center/_lat.py index 199ab106d3..fcd48393c4 100644 --- a/plotly/validators/layout/mapbox/center/_lat.py +++ b/plotly/validators/layout/mapbox/center/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.NumberValidator): +class LatValidator(_bv.NumberValidator): def __init__(self, plotly_name="lat", parent_name="layout.mapbox.center", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/center/_lon.py b/plotly/validators/layout/mapbox/center/_lon.py index adcee9d183..2c5aeaac9b 100644 --- a/plotly/validators/layout/mapbox/center/_lon.py +++ b/plotly/validators/layout/mapbox/center/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.NumberValidator): +class LonValidator(_bv.NumberValidator): def __init__(self, plotly_name="lon", parent_name="layout.mapbox.center", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/domain/__init__.py b/plotly/validators/layout/mapbox/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/mapbox/domain/__init__.py +++ b/plotly/validators/layout/mapbox/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/mapbox/domain/_column.py b/plotly/validators/layout/mapbox/domain/_column.py index 2f4cf0cddf..299a3f65ce 100644 --- a/plotly/validators/layout/mapbox/domain/_column.py +++ b/plotly/validators/layout/mapbox/domain/_column.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.mapbox.domain", **kwargs ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/mapbox/domain/_row.py b/plotly/validators/layout/mapbox/domain/_row.py index efed263ed5..a09dd61547 100644 --- a/plotly/validators/layout/mapbox/domain/_row.py +++ b/plotly/validators/layout/mapbox/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.mapbox.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/mapbox/domain/_x.py b/plotly/validators/layout/mapbox/domain/_x.py index df16884276..efc87a752b 100644 --- a/plotly/validators/layout/mapbox/domain/_x.py +++ b/plotly/validators/layout/mapbox/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.mapbox.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/mapbox/domain/_y.py b/plotly/validators/layout/mapbox/domain/_y.py index 4f462f14ee..fefe9822f9 100644 --- a/plotly/validators/layout/mapbox/domain/_y.py +++ b/plotly/validators/layout/mapbox/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.mapbox.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/mapbox/layer/__init__.py b/plotly/validators/layout/mapbox/layer/__init__.py index 93e08a556b..824c7d802a 100644 --- a/plotly/validators/layout/mapbox/layer/__init__.py +++ b/plotly/validators/layout/mapbox/layer/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._templateitemname import TemplateitemnameValidator - from ._symbol import SymbolValidator - from ._sourcetype import SourcetypeValidator - from ._sourcelayer import SourcelayerValidator - from ._sourceattribution import SourceattributionValidator - from ._source import SourceValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._minzoom import MinzoomValidator - from ._maxzoom import MaxzoomValidator - from ._line import LineValidator - from ._fill import FillValidator - from ._coordinates import CoordinatesValidator - from ._color import ColorValidator - from ._circle import CircleValidator - from ._below import BelowValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._type.TypeValidator", - "._templateitemname.TemplateitemnameValidator", - "._symbol.SymbolValidator", - "._sourcetype.SourcetypeValidator", - "._sourcelayer.SourcelayerValidator", - "._sourceattribution.SourceattributionValidator", - "._source.SourceValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._minzoom.MinzoomValidator", - "._maxzoom.MaxzoomValidator", - "._line.LineValidator", - "._fill.FillValidator", - "._coordinates.CoordinatesValidator", - "._color.ColorValidator", - "._circle.CircleValidator", - "._below.BelowValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._symbol.SymbolValidator", + "._sourcetype.SourcetypeValidator", + "._sourcelayer.SourcelayerValidator", + "._sourceattribution.SourceattributionValidator", + "._source.SourceValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._minzoom.MinzoomValidator", + "._maxzoom.MaxzoomValidator", + "._line.LineValidator", + "._fill.FillValidator", + "._coordinates.CoordinatesValidator", + "._color.ColorValidator", + "._circle.CircleValidator", + "._below.BelowValidator", + ], +) diff --git a/plotly/validators/layout/mapbox/layer/_below.py b/plotly/validators/layout/mapbox/layer/_below.py index 79c3479806..0bbcf741ec 100644 --- a/plotly/validators/layout/mapbox/layer/_below.py +++ b/plotly/validators/layout/mapbox/layer/_below.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__( self, plotly_name="below", parent_name="layout.mapbox.layer", **kwargs ): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_circle.py b/plotly/validators/layout/mapbox/layer/_circle.py index 7548ec2db2..c96eba3938 100644 --- a/plotly/validators/layout/mapbox/layer/_circle.py +++ b/plotly/validators/layout/mapbox/layer/_circle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CircleValidator(_plotly_utils.basevalidators.CompoundValidator): +class CircleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="circle", parent_name="layout.mapbox.layer", **kwargs ): - super(CircleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Circle"), data_docs=kwargs.pop( "data_docs", """ - radius - Sets the circle radius - (mapbox.layer.paint.circle-radius). Has an - effect only when `type` is set to "circle". """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/_color.py b/plotly/validators/layout/mapbox/layer/_color.py index 7332524135..5e36b63046 100644 --- a/plotly/validators/layout/mapbox/layer/_color.py +++ b/plotly/validators/layout/mapbox/layer/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.mapbox.layer", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_coordinates.py b/plotly/validators/layout/mapbox/layer/_coordinates.py index cf0ea46868..9d25b9ba46 100644 --- a/plotly/validators/layout/mapbox/layer/_coordinates.py +++ b/plotly/validators/layout/mapbox/layer/_coordinates.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CoordinatesValidator(_plotly_utils.basevalidators.AnyValidator): +class CoordinatesValidator(_bv.AnyValidator): def __init__( self, plotly_name="coordinates", parent_name="layout.mapbox.layer", **kwargs ): - super(CoordinatesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_fill.py b/plotly/validators/layout/mapbox/layer/_fill.py index d32eb91b47..877185dfd2 100644 --- a/plotly/validators/layout/mapbox/layer/_fill.py +++ b/plotly/validators/layout/mapbox/layer/_fill.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): +class FillValidator(_bv.CompoundValidator): def __init__(self, plotly_name="fill", parent_name="layout.mapbox.layer", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Fill"), data_docs=kwargs.pop( "data_docs", """ - outlinecolor - Sets the fill outline color - (mapbox.layer.paint.fill-outline-color). Has an - effect only when `type` is set to "fill". """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/_line.py b/plotly/validators/layout/mapbox/layer/_line.py index ea6700651b..457b5beec4 100644 --- a/plotly/validators/layout/mapbox/layer/_line.py +++ b/plotly/validators/layout/mapbox/layer/_line.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="layout.mapbox.layer", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - dash - Sets the length of dashes and gaps - (mapbox.layer.paint.line-dasharray). Has an - effect only when `type` is set to "line". - dashsrc - Sets the source reference on Chart Studio Cloud - for `dash`. - width - Sets the line width (mapbox.layer.paint.line- - width). Has an effect only when `type` is set - to "line". """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/_maxzoom.py b/plotly/validators/layout/mapbox/layer/_maxzoom.py index d6d2c60f07..2d35b0e79b 100644 --- a/plotly/validators/layout/mapbox/layer/_maxzoom.py +++ b/plotly/validators/layout/mapbox/layer/_maxzoom.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxzoomValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxzoom", parent_name="layout.mapbox.layer", **kwargs ): - super(MaxzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 24), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/mapbox/layer/_minzoom.py b/plotly/validators/layout/mapbox/layer/_minzoom.py index fa67a7c6df..b61a92e4ef 100644 --- a/plotly/validators/layout/mapbox/layer/_minzoom.py +++ b/plotly/validators/layout/mapbox/layer/_minzoom.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinzoomValidator(_plotly_utils.basevalidators.NumberValidator): +class MinzoomValidator(_bv.NumberValidator): def __init__( self, plotly_name="minzoom", parent_name="layout.mapbox.layer", **kwargs ): - super(MinzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 24), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/mapbox/layer/_name.py b/plotly/validators/layout/mapbox/layer/_name.py index 8e68fdf6c0..0b6007a2ae 100644 --- a/plotly/validators/layout/mapbox/layer/_name.py +++ b/plotly/validators/layout/mapbox/layer/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.mapbox.layer", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_opacity.py b/plotly/validators/layout/mapbox/layer/_opacity.py index b99c9cd82c..0def92cca9 100644 --- a/plotly/validators/layout/mapbox/layer/_opacity.py +++ b/plotly/validators/layout/mapbox/layer/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="layout.mapbox.layer", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/mapbox/layer/_source.py b/plotly/validators/layout/mapbox/layer/_source.py index 9c7b69dd09..88f8b90a45 100644 --- a/plotly/validators/layout/mapbox/layer/_source.py +++ b/plotly/validators/layout/mapbox/layer/_source.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceValidator(_plotly_utils.basevalidators.AnyValidator): +class SourceValidator(_bv.AnyValidator): def __init__( self, plotly_name="source", parent_name="layout.mapbox.layer", **kwargs ): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_sourceattribution.py b/plotly/validators/layout/mapbox/layer/_sourceattribution.py index 6cd8dea4bd..1b3147606f 100644 --- a/plotly/validators/layout/mapbox/layer/_sourceattribution.py +++ b/plotly/validators/layout/mapbox/layer/_sourceattribution.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceattributionValidator(_plotly_utils.basevalidators.StringValidator): +class SourceattributionValidator(_bv.StringValidator): def __init__( self, plotly_name="sourceattribution", parent_name="layout.mapbox.layer", **kwargs, ): - super(SourceattributionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_sourcelayer.py b/plotly/validators/layout/mapbox/layer/_sourcelayer.py index 0c31981979..4721c46116 100644 --- a/plotly/validators/layout/mapbox/layer/_sourcelayer.py +++ b/plotly/validators/layout/mapbox/layer/_sourcelayer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourcelayerValidator(_plotly_utils.basevalidators.StringValidator): +class SourcelayerValidator(_bv.StringValidator): def __init__( self, plotly_name="sourcelayer", parent_name="layout.mapbox.layer", **kwargs ): - super(SourcelayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_sourcetype.py b/plotly/validators/layout/mapbox/layer/_sourcetype.py index db480a4881..89a3a0fc28 100644 --- a/plotly/validators/layout/mapbox/layer/_sourcetype.py +++ b/plotly/validators/layout/mapbox/layer/_sourcetype.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourcetypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SourcetypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sourcetype", parent_name="layout.mapbox.layer", **kwargs ): - super(SourcetypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["geojson", "vector", "raster", "image"]), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/_symbol.py b/plotly/validators/layout/mapbox/layer/_symbol.py index b9209f8979..3743236a7b 100644 --- a/plotly/validators/layout/mapbox/layer/_symbol.py +++ b/plotly/validators/layout/mapbox/layer/_symbol.py @@ -1,45 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.CompoundValidator): +class SymbolValidator(_bv.CompoundValidator): def __init__( self, plotly_name="symbol", parent_name="layout.mapbox.layer", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Symbol"), data_docs=kwargs.pop( "data_docs", """ - icon - Sets the symbol icon image - (mapbox.layer.layout.icon-image). Full list: - https://www.mapbox.com/maki-icons/ - iconsize - Sets the symbol icon size - (mapbox.layer.layout.icon-size). Has an effect - only when `type` is set to "symbol". - placement - Sets the symbol and/or text placement - (mapbox.layer.layout.symbol-placement). If - `placement` is "point", the label is placed - where the geometry is located If `placement` is - "line", the label is placed along the line of - the geometry If `placement` is "line-center", - the label is placed on the center of the - geometry - text - Sets the symbol text (mapbox.layer.layout.text- - field). - textfont - Sets the icon text font - (color=mapbox.layer.paint.text-color, - size=mapbox.layer.layout.text-size). Has an - effect only when `type` is set to "symbol". - textposition - Sets the positions of the `text` elements with - respects to the (x,y) coordinates. """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/_templateitemname.py b/plotly/validators/layout/mapbox/layer/_templateitemname.py index 95c15bb6f3..16f59a9a8b 100644 --- a/plotly/validators/layout/mapbox/layer/_templateitemname.py +++ b/plotly/validators/layout/mapbox/layer/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.mapbox.layer", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/_type.py b/plotly/validators/layout/mapbox/layer/_type.py index 080b73c1c1..2384ee2a6e 100644 --- a/plotly/validators/layout/mapbox/layer/_type.py +++ b/plotly/validators/layout/mapbox/layer/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.mapbox.layer", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["circle", "line", "fill", "symbol", "raster"]), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/_visible.py b/plotly/validators/layout/mapbox/layer/_visible.py index 782efb5c93..73b445ee09 100644 --- a/plotly/validators/layout/mapbox/layer/_visible.py +++ b/plotly/validators/layout/mapbox/layer/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.mapbox.layer", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/circle/__init__.py b/plotly/validators/layout/mapbox/layer/circle/__init__.py index 659abf22fb..3ab81e9169 100644 --- a/plotly/validators/layout/mapbox/layer/circle/__init__.py +++ b/plotly/validators/layout/mapbox/layer/circle/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._radius import RadiusValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._radius.RadiusValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._radius.RadiusValidator"] +) diff --git a/plotly/validators/layout/mapbox/layer/circle/_radius.py b/plotly/validators/layout/mapbox/layer/circle/_radius.py index 82011307ce..a6a273f3b1 100644 --- a/plotly/validators/layout/mapbox/layer/circle/_radius.py +++ b/plotly/validators/layout/mapbox/layer/circle/_radius.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadiusValidator(_plotly_utils.basevalidators.NumberValidator): +class RadiusValidator(_bv.NumberValidator): def __init__( self, plotly_name="radius", parent_name="layout.mapbox.layer.circle", **kwargs ): - super(RadiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/fill/__init__.py b/plotly/validators/layout/mapbox/layer/fill/__init__.py index 722f28333c..d169627477 100644 --- a/plotly/validators/layout/mapbox/layer/fill/__init__.py +++ b/plotly/validators/layout/mapbox/layer/fill/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._outlinecolor import OutlinecolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._outlinecolor.OutlinecolorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._outlinecolor.OutlinecolorValidator"] +) diff --git a/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py b/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py index 2e5e9d29c7..d79d102d50 100644 --- a/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py +++ b/plotly/validators/layout/mapbox/layer/fill/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="layout.mapbox.layer.fill", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/line/__init__.py b/plotly/validators/layout/mapbox/layer/line/__init__.py index e2f415ff5b..ebb48ff6e2 100644 --- a/plotly/validators/layout/mapbox/layer/line/__init__.py +++ b/plotly/validators/layout/mapbox/layer/line/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dashsrc import DashsrcValidator - from ._dash import DashValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._dashsrc.DashsrcValidator", - "._dash.DashValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dashsrc.DashsrcValidator", "._dash.DashValidator"], +) diff --git a/plotly/validators/layout/mapbox/layer/line/_dash.py b/plotly/validators/layout/mapbox/layer/line/_dash.py index 76f7a60a5e..9350c19619 100644 --- a/plotly/validators/layout/mapbox/layer/line/_dash.py +++ b/plotly/validators/layout/mapbox/layer/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DataArrayValidator): +class DashValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="dash", parent_name="layout.mapbox.layer.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/line/_dashsrc.py b/plotly/validators/layout/mapbox/layer/line/_dashsrc.py index 766df152d8..bcf17efcff 100644 --- a/plotly/validators/layout/mapbox/layer/line/_dashsrc.py +++ b/plotly/validators/layout/mapbox/layer/line/_dashsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class DashsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="dashsrc", parent_name="layout.mapbox.layer.line", **kwargs ): - super(DashsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/line/_width.py b/plotly/validators/layout/mapbox/layer/line/_width.py index 49751ba6db..7e2d6f29b3 100644 --- a/plotly/validators/layout/mapbox/layer/line/_width.py +++ b/plotly/validators/layout/mapbox/layer/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.mapbox.layer.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/symbol/__init__.py b/plotly/validators/layout/mapbox/layer/symbol/__init__.py index 2b890e661e..41fc41c8fd 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/__init__.py +++ b/plotly/validators/layout/mapbox/layer/symbol/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._placement import PlacementValidator - from ._iconsize import IconsizeValidator - from ._icon import IconValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._placement.PlacementValidator", - "._iconsize.IconsizeValidator", - "._icon.IconValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._placement.PlacementValidator", + "._iconsize.IconsizeValidator", + "._icon.IconValidator", + ], +) diff --git a/plotly/validators/layout/mapbox/layer/symbol/_icon.py b/plotly/validators/layout/mapbox/layer/symbol/_icon.py index 920742e280..332a71ce54 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/_icon.py +++ b/plotly/validators/layout/mapbox/layer/symbol/_icon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IconValidator(_plotly_utils.basevalidators.StringValidator): +class IconValidator(_bv.StringValidator): def __init__( self, plotly_name="icon", parent_name="layout.mapbox.layer.symbol", **kwargs ): - super(IconValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py b/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py index 974897ebf1..1e74c80a03 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py +++ b/plotly/validators/layout/mapbox/layer/symbol/_iconsize.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IconsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class IconsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="iconsize", parent_name="layout.mapbox.layer.symbol", **kwargs ): - super(IconsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/symbol/_placement.py b/plotly/validators/layout/mapbox/layer/symbol/_placement.py index 54c79d31ee..e1d83fc4a4 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/_placement.py +++ b/plotly/validators/layout/mapbox/layer/symbol/_placement.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PlacementValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PlacementValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="placement", parent_name="layout.mapbox.layer.symbol", **kwargs, ): - super(PlacementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["point", "line", "line-center"]), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/symbol/_text.py b/plotly/validators/layout/mapbox/layer/symbol/_text.py index e67b63f90d..382a98bfde 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/_text.py +++ b/plotly/validators/layout/mapbox/layer/symbol/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.mapbox.layer.symbol", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/symbol/_textfont.py b/plotly/validators/layout/mapbox/layer/symbol/_textfont.py index d46e5f3d70..255d3d89b5 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/_textfont.py +++ b/plotly/validators/layout/mapbox/layer/symbol/_textfont.py @@ -1,43 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="layout.mapbox.layer.symbol", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/symbol/_textposition.py b/plotly/validators/layout/mapbox/layer/symbol/_textposition.py index a6f1fd8a37..0f61369274 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/_textposition.py +++ b/plotly/validators/layout/mapbox/layer/symbol/_textposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="layout.mapbox.layer.symbol", **kwargs, ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py b/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py index 9301c0688c..13cbf9ae54 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py +++ b/plotly/validators/layout/mapbox/layer/symbol/textfont/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py b/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py index 4af6d971f5..a973ade623 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py +++ b/plotly/validators/layout/mapbox/layer/symbol/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.mapbox.layer.symbol.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py b/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py index 2031c24735..a7cfb558d4 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py +++ b/plotly/validators/layout/mapbox/layer/symbol/textfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.mapbox.layer.symbol.textfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py b/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py index 25b6edbee5..c659901d46 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py +++ b/plotly/validators/layout/mapbox/layer/symbol/textfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.mapbox.layer.symbol.textfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/symbol/textfont/_style.py b/plotly/validators/layout/mapbox/layer/symbol/textfont/_style.py index 7d9ced34ac..f15bc00ff1 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/textfont/_style.py +++ b/plotly/validators/layout/mapbox/layer/symbol/textfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.mapbox.layer.symbol.textfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/mapbox/layer/symbol/textfont/_weight.py b/plotly/validators/layout/mapbox/layer/symbol/textfont/_weight.py index b40069b9f1..21010e786e 100644 --- a/plotly/validators/layout/mapbox/layer/symbol/textfont/_weight.py +++ b/plotly/validators/layout/mapbox/layer/symbol/textfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.mapbox.layer.symbol.textfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/margin/__init__.py b/plotly/validators/layout/margin/__init__.py index 82c96bf627..0fc672f9e9 100644 --- a/plotly/validators/layout/margin/__init__.py +++ b/plotly/validators/layout/margin/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._t import TValidator - from ._r import RValidator - from ._pad import PadValidator - from ._l import LValidator - from ._b import BValidator - from ._autoexpand import AutoexpandValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._t.TValidator", - "._r.RValidator", - "._pad.PadValidator", - "._l.LValidator", - "._b.BValidator", - "._autoexpand.AutoexpandValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._t.TValidator", + "._r.RValidator", + "._pad.PadValidator", + "._l.LValidator", + "._b.BValidator", + "._autoexpand.AutoexpandValidator", + ], +) diff --git a/plotly/validators/layout/margin/_autoexpand.py b/plotly/validators/layout/margin/_autoexpand.py index 60a18f3900..82af19fc15 100644 --- a/plotly/validators/layout/margin/_autoexpand.py +++ b/plotly/validators/layout/margin/_autoexpand.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutoexpandValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutoexpandValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autoexpand", parent_name="layout.margin", **kwargs): - super(AutoexpandValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/margin/_b.py b/plotly/validators/layout/margin/_b.py index 091211fd09..37526e89c0 100644 --- a/plotly/validators/layout/margin/_b.py +++ b/plotly/validators/layout/margin/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.NumberValidator): +class BValidator(_bv.NumberValidator): def __init__(self, plotly_name="b", parent_name="layout.margin", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/margin/_l.py b/plotly/validators/layout/margin/_l.py index d61d67c387..1754e67769 100644 --- a/plotly/validators/layout/margin/_l.py +++ b/plotly/validators/layout/margin/_l.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LValidator(_plotly_utils.basevalidators.NumberValidator): +class LValidator(_bv.NumberValidator): def __init__(self, plotly_name="l", parent_name="layout.margin", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/margin/_pad.py b/plotly/validators/layout/margin/_pad.py index dd9d8d7259..1798bf95e7 100644 --- a/plotly/validators/layout/margin/_pad.py +++ b/plotly/validators/layout/margin/_pad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.NumberValidator): +class PadValidator(_bv.NumberValidator): def __init__(self, plotly_name="pad", parent_name="layout.margin", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/margin/_r.py b/plotly/validators/layout/margin/_r.py index ec8e4dec11..3fdc1a465b 100644 --- a/plotly/validators/layout/margin/_r.py +++ b/plotly/validators/layout/margin/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.NumberValidator): +class RValidator(_bv.NumberValidator): def __init__(self, plotly_name="r", parent_name="layout.margin", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/margin/_t.py b/plotly/validators/layout/margin/_t.py index 6ecd8256ba..ddd18d5d6e 100644 --- a/plotly/validators/layout/margin/_t.py +++ b/plotly/validators/layout/margin/_t.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TValidator(_plotly_utils.basevalidators.NumberValidator): +class TValidator(_bv.NumberValidator): def __init__(self, plotly_name="t", parent_name="layout.margin", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/modebar/__init__.py b/plotly/validators/layout/modebar/__init__.py index 5791ea538b..07339747c2 100644 --- a/plotly/validators/layout/modebar/__init__.py +++ b/plotly/validators/layout/modebar/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._uirevision import UirevisionValidator - from ._removesrc import RemovesrcValidator - from ._remove import RemoveValidator - from ._orientation import OrientationValidator - from ._color import ColorValidator - from ._bgcolor import BgcolorValidator - from ._addsrc import AddsrcValidator - from ._add import AddValidator - from ._activecolor import ActivecolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._uirevision.UirevisionValidator", - "._removesrc.RemovesrcValidator", - "._remove.RemoveValidator", - "._orientation.OrientationValidator", - "._color.ColorValidator", - "._bgcolor.BgcolorValidator", - "._addsrc.AddsrcValidator", - "._add.AddValidator", - "._activecolor.ActivecolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._removesrc.RemovesrcValidator", + "._remove.RemoveValidator", + "._orientation.OrientationValidator", + "._color.ColorValidator", + "._bgcolor.BgcolorValidator", + "._addsrc.AddsrcValidator", + "._add.AddValidator", + "._activecolor.ActivecolorValidator", + ], +) diff --git a/plotly/validators/layout/modebar/_activecolor.py b/plotly/validators/layout/modebar/_activecolor.py index e2dd751791..d714f7dd04 100644 --- a/plotly/validators/layout/modebar/_activecolor.py +++ b/plotly/validators/layout/modebar/_activecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ActivecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="activecolor", parent_name="layout.modebar", **kwargs ): - super(ActivecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, ) diff --git a/plotly/validators/layout/modebar/_add.py b/plotly/validators/layout/modebar/_add.py index 511f58a49b..7e38ed43a3 100644 --- a/plotly/validators/layout/modebar/_add.py +++ b/plotly/validators/layout/modebar/_add.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AddValidator(_plotly_utils.basevalidators.StringValidator): +class AddValidator(_bv.StringValidator): def __init__(self, plotly_name="add", parent_name="layout.modebar", **kwargs): - super(AddValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, diff --git a/plotly/validators/layout/modebar/_addsrc.py b/plotly/validators/layout/modebar/_addsrc.py index e971588547..6c29bc1327 100644 --- a/plotly/validators/layout/modebar/_addsrc.py +++ b/plotly/validators/layout/modebar/_addsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AddsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AddsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="addsrc", parent_name="layout.modebar", **kwargs): - super(AddsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/modebar/_bgcolor.py b/plotly/validators/layout/modebar/_bgcolor.py index 4531f04183..70a6db73aa 100644 --- a/plotly/validators/layout/modebar/_bgcolor.py +++ b/plotly/validators/layout/modebar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.modebar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, ) diff --git a/plotly/validators/layout/modebar/_color.py b/plotly/validators/layout/modebar/_color.py index b986d6401e..bda135edf8 100644 --- a/plotly/validators/layout/modebar/_color.py +++ b/plotly/validators/layout/modebar/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.modebar", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, ) diff --git a/plotly/validators/layout/modebar/_orientation.py b/plotly/validators/layout/modebar/_orientation.py index 559800db30..6f91e78d0a 100644 --- a/plotly/validators/layout/modebar/_orientation.py +++ b/plotly/validators/layout/modebar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="layout.modebar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/layout/modebar/_remove.py b/plotly/validators/layout/modebar/_remove.py index 6c9e43b2ee..9eb61dd77c 100644 --- a/plotly/validators/layout/modebar/_remove.py +++ b/plotly/validators/layout/modebar/_remove.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RemoveValidator(_plotly_utils.basevalidators.StringValidator): +class RemoveValidator(_bv.StringValidator): def __init__(self, plotly_name="remove", parent_name="layout.modebar", **kwargs): - super(RemoveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, diff --git a/plotly/validators/layout/modebar/_removesrc.py b/plotly/validators/layout/modebar/_removesrc.py index 19a5974b7c..55015513c1 100644 --- a/plotly/validators/layout/modebar/_removesrc.py +++ b/plotly/validators/layout/modebar/_removesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RemovesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RemovesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="removesrc", parent_name="layout.modebar", **kwargs): - super(RemovesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/modebar/_uirevision.py b/plotly/validators/layout/modebar/_uirevision.py index 1edcb3f80c..daa7d7fe1c 100644 --- a/plotly/validators/layout/modebar/_uirevision.py +++ b/plotly/validators/layout/modebar/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.modebar", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newselection/__init__.py b/plotly/validators/layout/newselection/__init__.py index 4bfab4498e..4358e4fdb7 100644 --- a/plotly/validators/layout/newselection/__init__.py +++ b/plotly/validators/layout/newselection/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._mode import ModeValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._mode.ModeValidator", "._line.LineValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._mode.ModeValidator", "._line.LineValidator"] +) diff --git a/plotly/validators/layout/newselection/_line.py b/plotly/validators/layout/newselection/_line.py index 14455516b1..b1d4fdf0a1 100644 --- a/plotly/validators/layout/newselection/_line.py +++ b/plotly/validators/layout/newselection/_line.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="layout.newselection", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. By default uses either - dark grey or white to increase contrast with - background color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/newselection/_mode.py b/plotly/validators/layout/newselection/_mode.py index 890dab6d31..98e53c9d91 100644 --- a/plotly/validators/layout/newselection/_mode.py +++ b/plotly/validators/layout/newselection/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ModeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="mode", parent_name="layout.newselection", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["immediate", "gradual"]), **kwargs, diff --git a/plotly/validators/layout/newselection/line/__init__.py b/plotly/validators/layout/newselection/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/layout/newselection/line/__init__.py +++ b/plotly/validators/layout/newselection/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/layout/newselection/line/_color.py b/plotly/validators/layout/newselection/line/_color.py index dd506ecb86..6bd46cb983 100644 --- a/plotly/validators/layout/newselection/line/_color.py +++ b/plotly/validators/layout/newselection/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.newselection.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newselection/line/_dash.py b/plotly/validators/layout/newselection/line/_dash.py index dc459f40ec..6994d36b98 100644 --- a/plotly/validators/layout/newselection/line/_dash.py +++ b/plotly/validators/layout/newselection/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="layout.newselection.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/newselection/line/_width.py b/plotly/validators/layout/newselection/line/_width.py index 92eae7746d..2a5a81a060 100644 --- a/plotly/validators/layout/newselection/line/_width.py +++ b/plotly/validators/layout/newselection/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.newselection.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/newshape/__init__.py b/plotly/validators/layout/newshape/__init__.py index 3248c60cb7..e83bc30aad 100644 --- a/plotly/validators/layout/newshape/__init__.py +++ b/plotly/validators/layout/newshape/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._showlegend import ShowlegendValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._layer import LayerValidator - from ._label import LabelValidator - from ._fillrule import FillruleValidator - from ._fillcolor import FillcolorValidator - from ._drawdirection import DrawdirectionValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._showlegend.ShowlegendValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._layer.LayerValidator", - "._label.LabelValidator", - "._fillrule.FillruleValidator", - "._fillcolor.FillcolorValidator", - "._drawdirection.DrawdirectionValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._showlegend.ShowlegendValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._layer.LayerValidator", + "._label.LabelValidator", + "._fillrule.FillruleValidator", + "._fillcolor.FillcolorValidator", + "._drawdirection.DrawdirectionValidator", + ], +) diff --git a/plotly/validators/layout/newshape/_drawdirection.py b/plotly/validators/layout/newshape/_drawdirection.py index ea1d94eb72..7d93ebb120 100644 --- a/plotly/validators/layout/newshape/_drawdirection.py +++ b/plotly/validators/layout/newshape/_drawdirection.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DrawdirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DrawdirectionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="drawdirection", parent_name="layout.newshape", **kwargs ): - super(DrawdirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", ["ortho", "horizontal", "vertical", "diagonal"] diff --git a/plotly/validators/layout/newshape/_fillcolor.py b/plotly/validators/layout/newshape/_fillcolor.py index 8ccefafa0b..d060768d0f 100644 --- a/plotly/validators/layout/newshape/_fillcolor.py +++ b/plotly/validators/layout/newshape/_fillcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fillcolor", parent_name="layout.newshape", **kwargs ): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/_fillrule.py b/plotly/validators/layout/newshape/_fillrule.py index 831ac264f3..fd3f7030e7 100644 --- a/plotly/validators/layout/newshape/_fillrule.py +++ b/plotly/validators/layout/newshape/_fillrule.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillruleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillruleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fillrule", parent_name="layout.newshape", **kwargs): - super(FillruleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["evenodd", "nonzero"]), **kwargs, diff --git a/plotly/validators/layout/newshape/_label.py b/plotly/validators/layout/newshape/_label.py index 62091c0b24..ddb19abf3e 100644 --- a/plotly/validators/layout/newshape/_label.py +++ b/plotly/validators/layout/newshape/_label.py @@ -1,82 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="label", parent_name="layout.newshape", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Label"), data_docs=kwargs.pop( "data_docs", """ - font - Sets the new shape label text font. - padding - Sets padding (in px) between edge of label and - edge of new shape. - text - Sets the text to display with the new shape. It - is also used for legend item if `name` is not - provided. - textangle - Sets the angle at which the label text is drawn - with respect to the horizontal. For lines, - angle "auto" is the same angle as the line. For - all other shapes, angle "auto" is horizontal. - textposition - Sets the position of the label text relative to - the new shape. Supported values for rectangles, - circles and paths are *top left*, *top center*, - *top right*, *middle left*, *middle center*, - *middle right*, *bottom left*, *bottom center*, - and *bottom right*. Supported values for lines - are "start", "middle", and "end". Default: - *middle center* for rectangles, circles, and - paths; "middle" for lines. - texttemplate - Template string used for rendering the new - shape's label. Note that this will override - `text`. Variables are inserted using - %{variable}, for example "x0: %{x0}". Numbers - are formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{x0:$.2f}". See https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{x0|%m %b %Y}". See - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. A single - multiplication or division operation may be - applied to numeric variables, and combined with - d3 number formatting, for example "Length in - cm: %{x0*2.54}", "%{slope*60:.1f} meters per - second." For log axes, variable values are - given in log units. For date axes, x/y - coordinate variables and center variables use - datetimes, while all other variable values use - values in ms. Finally, the template string has - access to variables `x0`, `x1`, `y0`, `y1`, - `slope`, `dx`, `dy`, `width`, `height`, - `length`, `xcenter` and `ycenter`. - xanchor - Sets the label's horizontal position anchor - This anchor binds the specified `textposition` - to the "left", "center" or "right" of the label - text. For example, if `textposition` is set to - *top right* and `xanchor` to "right" then the - right-most portion of the label text lines up - with the right-most edge of the new shape. - yanchor - Sets the label's vertical position anchor This - anchor binds the specified `textposition` to - the "top", "middle" or "bottom" of the label - text. For example, if `textposition` is set to - *top right* and `yanchor` to "top" then the - top-most portion of the label text lines up - with the top-most edge of the new shape. """, ), **kwargs, diff --git a/plotly/validators/layout/newshape/_layer.py b/plotly/validators/layout/newshape/_layer.py index 84c2c6d325..9aacb0c4ec 100644 --- a/plotly/validators/layout/newshape/_layer.py +++ b/plotly/validators/layout/newshape/_layer.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="layer", parent_name="layout.newshape", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["below", "above", "between"]), **kwargs, diff --git a/plotly/validators/layout/newshape/_legend.py b/plotly/validators/layout/newshape/_legend.py index fb05ffd8a4..8f9829cef6 100644 --- a/plotly/validators/layout/newshape/_legend.py +++ b/plotly/validators/layout/newshape/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="layout.newshape", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/layout/newshape/_legendgroup.py b/plotly/validators/layout/newshape/_legendgroup.py index c3ecf094e2..9fc576866e 100644 --- a/plotly/validators/layout/newshape/_legendgroup.py +++ b/plotly/validators/layout/newshape/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="layout.newshape", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/_legendgrouptitle.py b/plotly/validators/layout/newshape/_legendgrouptitle.py index 1e5b4ffcae..37cf9645c9 100644 --- a/plotly/validators/layout/newshape/_legendgrouptitle.py +++ b/plotly/validators/layout/newshape/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="layout.newshape", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/layout/newshape/_legendrank.py b/plotly/validators/layout/newshape/_legendrank.py index 37aeca56ba..1ca8dce1d5 100644 --- a/plotly/validators/layout/newshape/_legendrank.py +++ b/plotly/validators/layout/newshape/_legendrank.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendrank", parent_name="layout.newshape", **kwargs ): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/_legendwidth.py b/plotly/validators/layout/newshape/_legendwidth.py index f1b124e854..c881290eba 100644 --- a/plotly/validators/layout/newshape/_legendwidth.py +++ b/plotly/validators/layout/newshape/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="layout.newshape", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/newshape/_line.py b/plotly/validators/layout/newshape/_line.py index f7bf66aaee..c01be9497d 100644 --- a/plotly/validators/layout/newshape/_line.py +++ b/plotly/validators/layout/newshape/_line.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="layout.newshape", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. By default uses either - dark grey or white to increase contrast with - background color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/newshape/_name.py b/plotly/validators/layout/newshape/_name.py index a9a3f3651d..eff3119771 100644 --- a/plotly/validators/layout/newshape/_name.py +++ b/plotly/validators/layout/newshape/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.newshape", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/_opacity.py b/plotly/validators/layout/newshape/_opacity.py index 75c13e7574..56883e8c05 100644 --- a/plotly/validators/layout/newshape/_opacity.py +++ b/plotly/validators/layout/newshape/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="layout.newshape", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/newshape/_showlegend.py b/plotly/validators/layout/newshape/_showlegend.py index e3e63914e4..4389bf5e20 100644 --- a/plotly/validators/layout/newshape/_showlegend.py +++ b/plotly/validators/layout/newshape/_showlegend.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlegend", parent_name="layout.newshape", **kwargs ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/_visible.py b/plotly/validators/layout/newshape/_visible.py index 93ef2eed72..9afeedc41c 100644 --- a/plotly/validators/layout/newshape/_visible.py +++ b/plotly/validators/layout/newshape/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="layout.newshape", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/layout/newshape/label/__init__.py b/plotly/validators/layout/newshape/label/__init__.py index c6a5f99963..215b669f84 100644 --- a/plotly/validators/layout/newshape/label/__init__.py +++ b/plotly/validators/layout/newshape/label/__init__.py @@ -1,29 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yanchor import YanchorValidator - from ._xanchor import XanchorValidator - from ._texttemplate import TexttemplateValidator - from ._textposition import TextpositionValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._padding import PaddingValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yanchor.YanchorValidator", - "._xanchor.XanchorValidator", - "._texttemplate.TexttemplateValidator", - "._textposition.TextpositionValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._padding.PaddingValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._xanchor.XanchorValidator", + "._texttemplate.TexttemplateValidator", + "._textposition.TextpositionValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._padding.PaddingValidator", + "._font.FontValidator", + ], +) diff --git a/plotly/validators/layout/newshape/label/_font.py b/plotly/validators/layout/newshape/label/_font.py index caf91e0606..0c17aef37e 100644 --- a/plotly/validators/layout/newshape/label/_font.py +++ b/plotly/validators/layout/newshape/label/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.newshape.label", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/newshape/label/_padding.py b/plotly/validators/layout/newshape/label/_padding.py index d6193fd014..77bef7b48e 100644 --- a/plotly/validators/layout/newshape/label/_padding.py +++ b/plotly/validators/layout/newshape/label/_padding.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PaddingValidator(_plotly_utils.basevalidators.NumberValidator): +class PaddingValidator(_bv.NumberValidator): def __init__( self, plotly_name="padding", parent_name="layout.newshape.label", **kwargs ): - super(PaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/newshape/label/_text.py b/plotly/validators/layout/newshape/label/_text.py index d7fa4c1178..3bbd8ee585 100644 --- a/plotly/validators/layout/newshape/label/_text.py +++ b/plotly/validators/layout/newshape/label/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.newshape.label", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/label/_textangle.py b/plotly/validators/layout/newshape/label/_textangle.py index eb34515d64..11bd998941 100644 --- a/plotly/validators/layout/newshape/label/_textangle.py +++ b/plotly/validators/layout/newshape/label/_textangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="textangle", parent_name="layout.newshape.label", **kwargs ): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/label/_textposition.py b/plotly/validators/layout/newshape/label/_textposition.py index 4f8971303e..47a43776d7 100644 --- a/plotly/validators/layout/newshape/label/_textposition.py +++ b/plotly/validators/layout/newshape/label/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="layout.newshape.label", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/newshape/label/_texttemplate.py b/plotly/validators/layout/newshape/label/_texttemplate.py index 3a99adbf53..ac823e4345 100644 --- a/plotly/validators/layout/newshape/label/_texttemplate.py +++ b/plotly/validators/layout/newshape/label/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="layout.newshape.label", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/label/_xanchor.py b/plotly/validators/layout/newshape/label/_xanchor.py index 2e2cbeb0e6..c783333ac2 100644 --- a/plotly/validators/layout/newshape/label/_xanchor.py +++ b/plotly/validators/layout/newshape/label/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.newshape.label", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/newshape/label/_yanchor.py b/plotly/validators/layout/newshape/label/_yanchor.py index b7028be733..0f16fff719 100644 --- a/plotly/validators/layout/newshape/label/_yanchor.py +++ b/plotly/validators/layout/newshape/label/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.newshape.label", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/newshape/label/font/__init__.py b/plotly/validators/layout/newshape/label/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/newshape/label/font/__init__.py +++ b/plotly/validators/layout/newshape/label/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/newshape/label/font/_color.py b/plotly/validators/layout/newshape/label/font/_color.py index 1c0b8375fc..193c3b0ca4 100644 --- a/plotly/validators/layout/newshape/label/font/_color.py +++ b/plotly/validators/layout/newshape/label/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.newshape.label.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/label/font/_family.py b/plotly/validators/layout/newshape/label/font/_family.py index c84163c2de..98983ead20 100644 --- a/plotly/validators/layout/newshape/label/font/_family.py +++ b/plotly/validators/layout/newshape/label/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.newshape.label.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/newshape/label/font/_lineposition.py b/plotly/validators/layout/newshape/label/font/_lineposition.py index 44667b9a33..a8713ed948 100644 --- a/plotly/validators/layout/newshape/label/font/_lineposition.py +++ b/plotly/validators/layout/newshape/label/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.newshape.label.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/newshape/label/font/_shadow.py b/plotly/validators/layout/newshape/label/font/_shadow.py index 742eefffb0..c9ea8353ff 100644 --- a/plotly/validators/layout/newshape/label/font/_shadow.py +++ b/plotly/validators/layout/newshape/label/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.newshape.label.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/label/font/_size.py b/plotly/validators/layout/newshape/label/font/_size.py index b03a117e10..ed4b7c415d 100644 --- a/plotly/validators/layout/newshape/label/font/_size.py +++ b/plotly/validators/layout/newshape/label/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.newshape.label.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/newshape/label/font/_style.py b/plotly/validators/layout/newshape/label/font/_style.py index ffcbbb46be..c958b62360 100644 --- a/plotly/validators/layout/newshape/label/font/_style.py +++ b/plotly/validators/layout/newshape/label/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.newshape.label.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/newshape/label/font/_textcase.py b/plotly/validators/layout/newshape/label/font/_textcase.py index e741aa02ba..b1c0a9606b 100644 --- a/plotly/validators/layout/newshape/label/font/_textcase.py +++ b/plotly/validators/layout/newshape/label/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.newshape.label.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/newshape/label/font/_variant.py b/plotly/validators/layout/newshape/label/font/_variant.py index e8bc240221..98d2b8772c 100644 --- a/plotly/validators/layout/newshape/label/font/_variant.py +++ b/plotly/validators/layout/newshape/label/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.newshape.label.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/newshape/label/font/_weight.py b/plotly/validators/layout/newshape/label/font/_weight.py index 502ae8af93..0d3ed7cf94 100644 --- a/plotly/validators/layout/newshape/label/font/_weight.py +++ b/plotly/validators/layout/newshape/label/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.newshape.label.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/newshape/legendgrouptitle/__init__.py b/plotly/validators/layout/newshape/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/__init__.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/newshape/legendgrouptitle/_font.py b/plotly/validators/layout/newshape/legendgrouptitle/_font.py index 2b05763e58..a15f5172f2 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/_font.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.newshape.legendgrouptitle", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/newshape/legendgrouptitle/_text.py b/plotly/validators/layout/newshape/legendgrouptitle/_text.py index ad442d2fed..45626cc401 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/_text.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.newshape.legendgrouptitle", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/__init__.py b/plotly/validators/layout/newshape/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/__init__.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_color.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_color.py index fb0ae6c582..5c2a82f966 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_color.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_family.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_family.py index 70c09ac28d..f104abca3c 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_family.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_lineposition.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_lineposition.py index 57e8e7a6d0..d0e4860582 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_shadow.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_shadow.py index 16e6333d57..2848bd6411 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_size.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_size.py index 1f3fa45256..f5b686e2f0 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_size.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_style.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_style.py index 29bc22edce..120e597a35 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_style.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_textcase.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_textcase.py index 830e7d0e2c..bf7e422722 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_variant.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_variant.py index 649cb2543c..3910f3d465 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_variant.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/newshape/legendgrouptitle/font/_weight.py b/plotly/validators/layout/newshape/legendgrouptitle/font/_weight.py index 0a2daf5f52..9ca009c759 100644 --- a/plotly/validators/layout/newshape/legendgrouptitle/font/_weight.py +++ b/plotly/validators/layout/newshape/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.newshape.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/newshape/line/__init__.py b/plotly/validators/layout/newshape/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/layout/newshape/line/__init__.py +++ b/plotly/validators/layout/newshape/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/layout/newshape/line/_color.py b/plotly/validators/layout/newshape/line/_color.py index 674e9080da..f3bb5fd191 100644 --- a/plotly/validators/layout/newshape/line/_color.py +++ b/plotly/validators/layout/newshape/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.newshape.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/newshape/line/_dash.py b/plotly/validators/layout/newshape/line/_dash.py index 8cc38e9dfe..3c74fb8367 100644 --- a/plotly/validators/layout/newshape/line/_dash.py +++ b/plotly/validators/layout/newshape/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="layout.newshape.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/newshape/line/_width.py b/plotly/validators/layout/newshape/line/_width.py index c4bea32777..3b10620388 100644 --- a/plotly/validators/layout/newshape/line/_width.py +++ b/plotly/validators/layout/newshape/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.newshape.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/__init__.py b/plotly/validators/layout/polar/__init__.py index 42956b8713..bbced9cd24 100644 --- a/plotly/validators/layout/polar/__init__.py +++ b/plotly/validators/layout/polar/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._uirevision import UirevisionValidator - from ._sector import SectorValidator - from ._radialaxis import RadialaxisValidator - from ._hole import HoleValidator - from ._gridshape import GridshapeValidator - from ._domain import DomainValidator - from ._bgcolor import BgcolorValidator - from ._barmode import BarmodeValidator - from ._bargap import BargapValidator - from ._angularaxis import AngularaxisValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._uirevision.UirevisionValidator", - "._sector.SectorValidator", - "._radialaxis.RadialaxisValidator", - "._hole.HoleValidator", - "._gridshape.GridshapeValidator", - "._domain.DomainValidator", - "._bgcolor.BgcolorValidator", - "._barmode.BarmodeValidator", - "._bargap.BargapValidator", - "._angularaxis.AngularaxisValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._sector.SectorValidator", + "._radialaxis.RadialaxisValidator", + "._hole.HoleValidator", + "._gridshape.GridshapeValidator", + "._domain.DomainValidator", + "._bgcolor.BgcolorValidator", + "._barmode.BarmodeValidator", + "._bargap.BargapValidator", + "._angularaxis.AngularaxisValidator", + ], +) diff --git a/plotly/validators/layout/polar/_angularaxis.py b/plotly/validators/layout/polar/_angularaxis.py index cced1665ce..242c6c7a00 100644 --- a/plotly/validators/layout/polar/_angularaxis.py +++ b/plotly/validators/layout/polar/_angularaxis.py @@ -1,303 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngularaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class AngularaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="angularaxis", parent_name="layout.polar", **kwargs): - super(AngularaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "AngularAxis"), data_docs=kwargs.pop( "data_docs", """ - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - direction - Sets the direction corresponding to positive - angles. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - period - Set the angular period. Has an effect only when - `angularaxis.type` is "category". - rotation - Sets that start position (in degrees) of the - angular axis By default, polar subplots with - `direction` set to "counterclockwise" get a - `rotation` of 0 which corresponds to due East - (like what mathematicians prefer). In turn, - polar with `direction` set to "clockwise" get a - rotation of 90 which corresponds to due North - (like on a compass), - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thetaunit - Sets the format unit of the formatted "theta" - values. Has an effect only when - `angularaxis.type` is "linear". - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.angularaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.angularaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.angularaxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - type - Sets the angular axis type. If "linear", set - `thetaunit` to determine the unit in which axis - value are shown. If *category, use `period` to - set the number of integer coordinates around - polar axis. - uirevision - Controls persistence of user-driven changes in - axis `rotation`. Defaults to - `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false """, ), **kwargs, diff --git a/plotly/validators/layout/polar/_bargap.py b/plotly/validators/layout/polar/_bargap.py index e5167c56e9..dfa25b6371 100644 --- a/plotly/validators/layout/polar/_bargap.py +++ b/plotly/validators/layout/polar/_bargap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BargapValidator(_plotly_utils.basevalidators.NumberValidator): +class BargapValidator(_bv.NumberValidator): def __init__(self, plotly_name="bargap", parent_name="layout.polar", **kwargs): - super(BargapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/polar/_barmode.py b/plotly/validators/layout/polar/_barmode.py index 1100a3671c..628da594e7 100644 --- a/plotly/validators/layout/polar/_barmode.py +++ b/plotly/validators/layout/polar/_barmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BarmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="barmode", parent_name="layout.polar", **kwargs): - super(BarmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["stack", "overlay"]), **kwargs, diff --git a/plotly/validators/layout/polar/_bgcolor.py b/plotly/validators/layout/polar/_bgcolor.py index f168d24cbb..c29d69c482 100644 --- a/plotly/validators/layout/polar/_bgcolor.py +++ b/plotly/validators/layout/polar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.polar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/_domain.py b/plotly/validators/layout/polar/_domain.py index 814b46dce1..84ea5f29d6 100644 --- a/plotly/validators/layout/polar/_domain.py +++ b/plotly/validators/layout/polar/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.polar", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this polar subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this polar subplot . - x - Sets the horizontal domain of this polar - subplot (in plot fraction). - y - Sets the vertical domain of this polar subplot - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/layout/polar/_gridshape.py b/plotly/validators/layout/polar/_gridshape.py index 438dd954f1..0b54a8c1bf 100644 --- a/plotly/validators/layout/polar/_gridshape.py +++ b/plotly/validators/layout/polar/_gridshape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class GridshapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="gridshape", parent_name="layout.polar", **kwargs): - super(GridshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["circular", "linear"]), **kwargs, diff --git a/plotly/validators/layout/polar/_hole.py b/plotly/validators/layout/polar/_hole.py index 4795a46b58..7d60de6930 100644 --- a/plotly/validators/layout/polar/_hole.py +++ b/plotly/validators/layout/polar/_hole.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoleValidator(_plotly_utils.basevalidators.NumberValidator): +class HoleValidator(_bv.NumberValidator): def __init__(self, plotly_name="hole", parent_name="layout.polar", **kwargs): - super(HoleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/polar/_radialaxis.py b/plotly/validators/layout/polar/_radialaxis.py index fa199d8d57..a04bdd69a4 100644 --- a/plotly/validators/layout/polar/_radialaxis.py +++ b/plotly/validators/layout/polar/_radialaxis.py @@ -1,351 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RadialaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class RadialaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="radialaxis", parent_name="layout.polar", **kwargs): - super(RadialaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "RadialAxis"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the angle (in degrees) from which the - radial axis is drawn. Note that by default, - radial axis line on the theta=0 line - corresponds to a line pointing right (like what - mathematicians prefer). Defaults to the first - `polar.sector` angle. - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.polar.radia - laxis.Autorangeoptions` instance or dict with - compatible properties - autotickangles - When `tickangle` is set to "auto", it will be - set to the first angle in this array that is - large enough to prevent label overlap. - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If *tozero*`, the range extends to 0, - regardless of the input data If "nonnegative", - the range is non-negative, regardless of the - input data. If "normal", the range is computed - in relation to the extrema of the input data - (same behavior as for cartesian axes). - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of radial axis line - the tick and tick labels appear. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - polar.radialaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.polar.radialaxis.tickformatstopdefaults), - sets the default property values to use for - elements of - layout.polar.radialaxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.polar.radia - laxis.Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - uirevision - Controls persistence of user-driven changes in - axis `range`, `autorange`, `angle`, and `title` - if in `editable: true` configuration. Defaults - to `polar.uirevision`. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false """, ), **kwargs, diff --git a/plotly/validators/layout/polar/_sector.py b/plotly/validators/layout/polar/_sector.py index 307f270c9c..8e2b053945 100644 --- a/plotly/validators/layout/polar/_sector.py +++ b/plotly/validators/layout/polar/_sector.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SectorValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class SectorValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="sector", parent_name="layout.polar", **kwargs): - super(SectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/polar/_uirevision.py b/plotly/validators/layout/polar/_uirevision.py index 9df8e5a598..f1667f9259 100644 --- a/plotly/validators/layout/polar/_uirevision.py +++ b/plotly/validators/layout/polar/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.polar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/__init__.py b/plotly/validators/layout/polar/angularaxis/__init__.py index 02c7519fe5..fb6a5a28d4 100644 --- a/plotly/validators/layout/polar/angularaxis/__init__.py +++ b/plotly/validators/layout/polar/angularaxis/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._type import TypeValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thetaunit import ThetaunitValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._rotation import RotationValidator - from ._period import PeriodValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._direction import DirectionValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._autotypenumbers import AutotypenumbersValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._type.TypeValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thetaunit.ThetaunitValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._rotation.RotationValidator", - "._period.PeriodValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._direction.DirectionValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._autotypenumbers.AutotypenumbersValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thetaunit.ThetaunitValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rotation.RotationValidator", + "._period.PeriodValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._direction.DirectionValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._autotypenumbers.AutotypenumbersValidator", + ], +) diff --git a/plotly/validators/layout/polar/angularaxis/_autotypenumbers.py b/plotly/validators/layout/polar/angularaxis/_autotypenumbers.py index c4fb31ff10..cf18f49cfe 100644 --- a/plotly/validators/layout/polar/angularaxis/_autotypenumbers.py +++ b/plotly/validators/layout/polar/angularaxis/_autotypenumbers.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.polar.angularaxis", **kwargs, ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_categoryarray.py b/plotly/validators/layout/polar/angularaxis/_categoryarray.py index 233577c1a8..8608349f43 100644 --- a/plotly/validators/layout/polar/angularaxis/_categoryarray.py +++ b/plotly/validators/layout/polar/angularaxis/_categoryarray.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.polar.angularaxis", **kwargs, ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py b/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py index 5b17a0ee66..2cbe24138b 100644 --- a/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/polar/angularaxis/_categoryarraysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.polar.angularaxis", **kwargs, ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_categoryorder.py b/plotly/validators/layout/polar/angularaxis/_categoryorder.py index 934c867c12..f9ee31089f 100644 --- a/plotly/validators/layout/polar/angularaxis/_categoryorder.py +++ b/plotly/validators/layout/polar/angularaxis/_categoryorder.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.polar.angularaxis", **kwargs, ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/polar/angularaxis/_color.py b/plotly/validators/layout/polar/angularaxis/_color.py index 5542e4e18d..052d6b5042 100644 --- a/plotly/validators/layout/polar/angularaxis/_color.py +++ b/plotly/validators/layout/polar/angularaxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.polar.angularaxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_direction.py b/plotly/validators/layout/polar/angularaxis/_direction.py index b8ce2b5732..0bc34c4090 100644 --- a/plotly/validators/layout/polar/angularaxis/_direction.py +++ b/plotly/validators/layout/polar/angularaxis/_direction.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DirectionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="direction", parent_name="layout.polar.angularaxis", **kwargs ): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["counterclockwise", "clockwise"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_dtick.py b/plotly/validators/layout/polar/angularaxis/_dtick.py index 4c181c746f..a53fb1cdc2 100644 --- a/plotly/validators/layout/polar/angularaxis/_dtick.py +++ b/plotly/validators/layout/polar/angularaxis/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.polar.angularaxis", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_exponentformat.py b/plotly/validators/layout/polar/angularaxis/_exponentformat.py index 74db8b4458..4e96c6c75f 100644 --- a/plotly/validators/layout/polar/angularaxis/_exponentformat.py +++ b/plotly/validators/layout/polar/angularaxis/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.polar.angularaxis", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_gridcolor.py b/plotly/validators/layout/polar/angularaxis/_gridcolor.py index 2d6dcda3cb..70217d51ba 100644 --- a/plotly/validators/layout/polar/angularaxis/_gridcolor.py +++ b/plotly/validators/layout/polar/angularaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.polar.angularaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_griddash.py b/plotly/validators/layout/polar/angularaxis/_griddash.py index b5c0d236df..6510bc0a91 100644 --- a/plotly/validators/layout/polar/angularaxis/_griddash.py +++ b/plotly/validators/layout/polar/angularaxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.polar.angularaxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/polar/angularaxis/_gridwidth.py b/plotly/validators/layout/polar/angularaxis/_gridwidth.py index f92929571f..1706a54e89 100644 --- a/plotly/validators/layout/polar/angularaxis/_gridwidth.py +++ b/plotly/validators/layout/polar/angularaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.polar.angularaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_hoverformat.py b/plotly/validators/layout/polar/angularaxis/_hoverformat.py index 7370c7294b..505a6f2175 100644 --- a/plotly/validators/layout/polar/angularaxis/_hoverformat.py +++ b/plotly/validators/layout/polar/angularaxis/_hoverformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.polar.angularaxis", **kwargs, ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_labelalias.py b/plotly/validators/layout/polar/angularaxis/_labelalias.py index 34062d37ba..b64cf47246 100644 --- a/plotly/validators/layout/polar/angularaxis/_labelalias.py +++ b/plotly/validators/layout/polar/angularaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.polar.angularaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_layer.py b/plotly/validators/layout/polar/angularaxis/_layer.py index 4059947108..6a6485229e 100644 --- a/plotly/validators/layout/polar/angularaxis/_layer.py +++ b/plotly/validators/layout/polar/angularaxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.polar.angularaxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_linecolor.py b/plotly/validators/layout/polar/angularaxis/_linecolor.py index f1f0031807..bf3cb77492 100644 --- a/plotly/validators/layout/polar/angularaxis/_linecolor.py +++ b/plotly/validators/layout/polar/angularaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.polar.angularaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_linewidth.py b/plotly/validators/layout/polar/angularaxis/_linewidth.py index 52f24afbed..a42abbedd2 100644 --- a/plotly/validators/layout/polar/angularaxis/_linewidth.py +++ b/plotly/validators/layout/polar/angularaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.polar.angularaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_minexponent.py b/plotly/validators/layout/polar/angularaxis/_minexponent.py index ec10b1d93c..2a96451036 100644 --- a/plotly/validators/layout/polar/angularaxis/_minexponent.py +++ b/plotly/validators/layout/polar/angularaxis/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.polar.angularaxis", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_nticks.py b/plotly/validators/layout/polar/angularaxis/_nticks.py index 0bea91ea07..f1116aef91 100644 --- a/plotly/validators/layout/polar/angularaxis/_nticks.py +++ b/plotly/validators/layout/polar/angularaxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.polar.angularaxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_period.py b/plotly/validators/layout/polar/angularaxis/_period.py index 0fd54802ce..39b9ef5a0b 100644 --- a/plotly/validators/layout/polar/angularaxis/_period.py +++ b/plotly/validators/layout/polar/angularaxis/_period.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PeriodValidator(_plotly_utils.basevalidators.NumberValidator): +class PeriodValidator(_bv.NumberValidator): def __init__( self, plotly_name="period", parent_name="layout.polar.angularaxis", **kwargs ): - super(PeriodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_rotation.py b/plotly/validators/layout/polar/angularaxis/_rotation.py index 286b130418..2341c14eee 100644 --- a/plotly/validators/layout/polar/angularaxis/_rotation.py +++ b/plotly/validators/layout/polar/angularaxis/_rotation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RotationValidator(_plotly_utils.basevalidators.AngleValidator): +class RotationValidator(_bv.AngleValidator): def __init__( self, plotly_name="rotation", parent_name="layout.polar.angularaxis", **kwargs ): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_separatethousands.py b/plotly/validators/layout/polar/angularaxis/_separatethousands.py index 6719fa55eb..f4c945a28b 100644 --- a/plotly/validators/layout/polar/angularaxis/_separatethousands.py +++ b/plotly/validators/layout/polar/angularaxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.polar.angularaxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_showexponent.py b/plotly/validators/layout/polar/angularaxis/_showexponent.py index 9e36eb0c27..07fff4a462 100644 --- a/plotly/validators/layout/polar/angularaxis/_showexponent.py +++ b/plotly/validators/layout/polar/angularaxis/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.polar.angularaxis", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_showgrid.py b/plotly/validators/layout/polar/angularaxis/_showgrid.py index 2ee3cfc52b..eb3bd35859 100644 --- a/plotly/validators/layout/polar/angularaxis/_showgrid.py +++ b/plotly/validators/layout/polar/angularaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.polar.angularaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_showline.py b/plotly/validators/layout/polar/angularaxis/_showline.py index 5795aff18a..5042a24d3c 100644 --- a/plotly/validators/layout/polar/angularaxis/_showline.py +++ b/plotly/validators/layout/polar/angularaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.polar.angularaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_showticklabels.py b/plotly/validators/layout/polar/angularaxis/_showticklabels.py index 8e27e214bc..76db848a21 100644 --- a/plotly/validators/layout/polar/angularaxis/_showticklabels.py +++ b/plotly/validators/layout/polar/angularaxis/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.polar.angularaxis", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_showtickprefix.py b/plotly/validators/layout/polar/angularaxis/_showtickprefix.py index 5d431462eb..384a69eec4 100644 --- a/plotly/validators/layout/polar/angularaxis/_showtickprefix.py +++ b/plotly/validators/layout/polar/angularaxis/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.polar.angularaxis", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_showticksuffix.py b/plotly/validators/layout/polar/angularaxis/_showticksuffix.py index 88e10e92db..7d78b24775 100644 --- a/plotly/validators/layout/polar/angularaxis/_showticksuffix.py +++ b/plotly/validators/layout/polar/angularaxis/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.polar.angularaxis", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_thetaunit.py b/plotly/validators/layout/polar/angularaxis/_thetaunit.py index 4d2f41ed66..385cf349cb 100644 --- a/plotly/validators/layout/polar/angularaxis/_thetaunit.py +++ b/plotly/validators/layout/polar/angularaxis/_thetaunit.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThetaunitValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thetaunit", parent_name="layout.polar.angularaxis", **kwargs ): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radians", "degrees"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_tick0.py b/plotly/validators/layout/polar/angularaxis/_tick0.py index 7b6b0d051a..f66243fdfd 100644 --- a/plotly/validators/layout/polar/angularaxis/_tick0.py +++ b/plotly/validators/layout/polar/angularaxis/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="layout.polar.angularaxis", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_tickangle.py b/plotly/validators/layout/polar/angularaxis/_tickangle.py index 01fa9b26e0..0c6a953c5a 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickangle.py +++ b/plotly/validators/layout/polar/angularaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_tickcolor.py b/plotly/validators/layout/polar/angularaxis/_tickcolor.py index a63d09bbb5..96bb460b74 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickcolor.py +++ b/plotly/validators/layout/polar/angularaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_tickfont.py b/plotly/validators/layout/polar/angularaxis/_tickfont.py index a615aaba28..1dbc65eca4 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickfont.py +++ b/plotly/validators/layout/polar/angularaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_tickformat.py b/plotly/validators/layout/polar/angularaxis/_tickformat.py index c160be58bd..227cffb15a 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickformat.py +++ b/plotly/validators/layout/polar/angularaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py b/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py index 2fe4dec564..121810e730 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/polar/angularaxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.polar.angularaxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/polar/angularaxis/_tickformatstops.py b/plotly/validators/layout/polar/angularaxis/_tickformatstops.py index 13809e2e5c..72b6c41641 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickformatstops.py +++ b/plotly/validators/layout/polar/angularaxis/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.polar.angularaxis", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_ticklabelstep.py b/plotly/validators/layout/polar/angularaxis/_ticklabelstep.py index 89edf13850..44d065602b 100644 --- a/plotly/validators/layout/polar/angularaxis/_ticklabelstep.py +++ b/plotly/validators/layout/polar/angularaxis/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.polar.angularaxis", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_ticklen.py b/plotly/validators/layout/polar/angularaxis/_ticklen.py index 826379039f..f27da25399 100644 --- a/plotly/validators/layout/polar/angularaxis/_ticklen.py +++ b/plotly/validators/layout/polar/angularaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.polar.angularaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_tickmode.py b/plotly/validators/layout/polar/angularaxis/_tickmode.py index 4acfc40cde..4559166a04 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickmode.py +++ b/plotly/validators/layout/polar/angularaxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/polar/angularaxis/_tickprefix.py b/plotly/validators/layout/polar/angularaxis/_tickprefix.py index d0fa9bac22..f194349f32 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickprefix.py +++ b/plotly/validators/layout/polar/angularaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_ticks.py b/plotly/validators/layout/polar/angularaxis/_ticks.py index 3220db663f..414f872012 100644 --- a/plotly/validators/layout/polar/angularaxis/_ticks.py +++ b/plotly/validators/layout/polar/angularaxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.polar.angularaxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_ticksuffix.py b/plotly/validators/layout/polar/angularaxis/_ticksuffix.py index 8f388f7114..5ab3fdd9a1 100644 --- a/plotly/validators/layout/polar/angularaxis/_ticksuffix.py +++ b/plotly/validators/layout/polar/angularaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.polar.angularaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_ticktext.py b/plotly/validators/layout/polar/angularaxis/_ticktext.py index efd3457870..2c585f783f 100644 --- a/plotly/validators/layout/polar/angularaxis/_ticktext.py +++ b/plotly/validators/layout/polar/angularaxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.polar.angularaxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py b/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py index 31a4de19d0..c5d173feaf 100644 --- a/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py +++ b/plotly/validators/layout/polar/angularaxis/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.polar.angularaxis", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_tickvals.py b/plotly/validators/layout/polar/angularaxis/_tickvals.py index 3964899f09..bd62994b04 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickvals.py +++ b/plotly/validators/layout/polar/angularaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py b/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py index 671364f7be..bcacff7d93 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py +++ b/plotly/validators/layout/polar/angularaxis/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.polar.angularaxis", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_tickwidth.py b/plotly/validators/layout/polar/angularaxis/_tickwidth.py index cc73c0913b..04ae9e0303 100644 --- a/plotly/validators/layout/polar/angularaxis/_tickwidth.py +++ b/plotly/validators/layout/polar/angularaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.polar.angularaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_type.py b/plotly/validators/layout/polar/angularaxis/_type.py index 00cc3b03f2..853874f712 100644 --- a/plotly/validators/layout/polar/angularaxis/_type.py +++ b/plotly/validators/layout/polar/angularaxis/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="layout.polar.angularaxis", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["-", "linear", "category"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/_uirevision.py b/plotly/validators/layout/polar/angularaxis/_uirevision.py index 5a616ce81b..126736a54c 100644 --- a/plotly/validators/layout/polar/angularaxis/_uirevision.py +++ b/plotly/validators/layout/polar/angularaxis/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.polar.angularaxis", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/_visible.py b/plotly/validators/layout/polar/angularaxis/_visible.py index 0caebf1a76..291250d991 100644 --- a/plotly/validators/layout/polar/angularaxis/_visible.py +++ b/plotly/validators/layout/polar/angularaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.polar.angularaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py b/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_color.py b/plotly/validators/layout/polar/angularaxis/tickfont/_color.py index 01ab764bd3..3089e2a263 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_color.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_family.py b/plotly/validators/layout/polar/angularaxis/tickfont/_family.py index 94a810246d..113d8d6af3 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_family.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_lineposition.py b/plotly/validators/layout/polar/angularaxis/tickfont/_lineposition.py index 1528a65a5f..a8d4b27aa8 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_shadow.py b/plotly/validators/layout/polar/angularaxis/tickfont/_shadow.py index e1446abad4..6d0205c445 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_size.py b/plotly/validators/layout/polar/angularaxis/tickfont/_size.py index 9926e207da..655bb31def 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_size.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_style.py b/plotly/validators/layout/polar/angularaxis/tickfont/_style.py index e10bd564b7..1f19bc2f7e 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_style.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_textcase.py b/plotly/validators/layout/polar/angularaxis/tickfont/_textcase.py index b2814f726c..d7ae088cd2 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_variant.py b/plotly/validators/layout/polar/angularaxis/tickfont/_variant.py index 5d2643d565..e4942e90fc 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_variant.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/polar/angularaxis/tickfont/_weight.py b/plotly/validators/layout/polar/angularaxis/tickfont/_weight.py index 2fd57945c1..64511ce03b 100644 --- a/plotly/validators/layout/polar/angularaxis/tickfont/_weight.py +++ b/plotly/validators/layout/polar/angularaxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.polar.angularaxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py b/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/polar/angularaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py index 40ce41230b..73459a091a 100644 --- a/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/polar/angularaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.polar.angularaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py b/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py index 2d01c9a1af..d618f1ca1f 100644 --- a/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/polar/angularaxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.polar.angularaxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py b/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py index be3e5bf316..ff6eff5c3a 100644 --- a/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/polar/angularaxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.polar.angularaxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py index 8eb582d6d5..85e2089d0a 100644 --- a/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/polar/angularaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.polar.angularaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py b/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py index d133aa048d..c5dae5386b 100644 --- a/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/polar/angularaxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.polar.angularaxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/domain/__init__.py b/plotly/validators/layout/polar/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/polar/domain/__init__.py +++ b/plotly/validators/layout/polar/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/polar/domain/_column.py b/plotly/validators/layout/polar/domain/_column.py index d22c8d7a5d..e9e85cde12 100644 --- a/plotly/validators/layout/polar/domain/_column.py +++ b/plotly/validators/layout/polar/domain/_column.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.polar.domain", **kwargs ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/domain/_row.py b/plotly/validators/layout/polar/domain/_row.py index 924b140b8c..b013079d38 100644 --- a/plotly/validators/layout/polar/domain/_row.py +++ b/plotly/validators/layout/polar/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.polar.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/domain/_x.py b/plotly/validators/layout/polar/domain/_x.py index 0fb9c88300..6a8f6c7fe0 100644 --- a/plotly/validators/layout/polar/domain/_x.py +++ b/plotly/validators/layout/polar/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.polar.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/polar/domain/_y.py b/plotly/validators/layout/polar/domain/_y.py index e2c659ac27..96f81cdd22 100644 --- a/plotly/validators/layout/polar/domain/_y.py +++ b/plotly/validators/layout/polar/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.polar.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/polar/radialaxis/__init__.py b/plotly/validators/layout/polar/radialaxis/__init__.py index 4f19bdf159..e00324f45c 100644 --- a/plotly/validators/layout/polar/radialaxis/__init__.py +++ b/plotly/validators/layout/polar/radialaxis/__init__.py @@ -1,125 +1,65 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._side import SideValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._rangemode import RangemodeValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._calendar import CalendarValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autotickangles import AutotickanglesValidator - from ._autorangeoptions import AutorangeoptionsValidator - from ._autorange import AutorangeValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._type.TypeValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._side.SideValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._rangemode.RangemodeValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._calendar.CalendarValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autotickangles.AutotickanglesValidator", - "._autorangeoptions.AutorangeoptionsValidator", - "._autorange.AutorangeValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autotickangles.AutotickanglesValidator", + "._autorangeoptions.AutorangeoptionsValidator", + "._autorange.AutorangeValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/layout/polar/radialaxis/_angle.py b/plotly/validators/layout/polar/radialaxis/_angle.py index da1e1d0fcd..6de6855d85 100644 --- a/plotly/validators/layout/polar/radialaxis/_angle.py +++ b/plotly/validators/layout/polar/radialaxis/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__( self, plotly_name="angle", parent_name="layout.polar.radialaxis", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_autorange.py b/plotly/validators/layout/polar/radialaxis/_autorange.py index af9cf4e5f3..511fcb0adc 100644 --- a/plotly/validators/layout/polar/radialaxis/_autorange.py +++ b/plotly/validators/layout/polar/radialaxis/_autorange.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autorange", parent_name="layout.polar.radialaxis", **kwargs ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop( diff --git a/plotly/validators/layout/polar/radialaxis/_autorangeoptions.py b/plotly/validators/layout/polar/radialaxis/_autorangeoptions.py index 5920011fbe..c95bd8561c 100644 --- a/plotly/validators/layout/polar/radialaxis/_autorangeoptions.py +++ b/plotly/validators/layout/polar/radialaxis/_autorangeoptions.py @@ -1,37 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AutorangeoptionsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.polar.radialaxis", **kwargs, ): - super(AutorangeoptionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Autorangeoptions"), data_docs=kwargs.pop( "data_docs", """ - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. """, ), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_autotickangles.py b/plotly/validators/layout/polar/radialaxis/_autotickangles.py index 9338fb88df..3d9774473a 100644 --- a/plotly/validators/layout/polar/radialaxis/_autotickangles.py +++ b/plotly/validators/layout/polar/radialaxis/_autotickangles.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotickanglesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class AutotickanglesValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="autotickangles", parent_name="layout.polar.radialaxis", **kwargs, ): - super(AutotickanglesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), free_length=kwargs.pop("free_length", True), items=kwargs.pop("items", {"valType": "angle"}), diff --git a/plotly/validators/layout/polar/radialaxis/_autotypenumbers.py b/plotly/validators/layout/polar/radialaxis/_autotypenumbers.py index 3dfcc3c718..75546ecde8 100644 --- a/plotly/validators/layout/polar/radialaxis/_autotypenumbers.py +++ b/plotly/validators/layout/polar/radialaxis/_autotypenumbers.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.polar.radialaxis", **kwargs, ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_calendar.py b/plotly/validators/layout/polar/radialaxis/_calendar.py index 04b8266c42..17fe821861 100644 --- a/plotly/validators/layout/polar/radialaxis/_calendar.py +++ b/plotly/validators/layout/polar/radialaxis/_calendar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="calendar", parent_name="layout.polar.radialaxis", **kwargs ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/polar/radialaxis/_categoryarray.py b/plotly/validators/layout/polar/radialaxis/_categoryarray.py index a31614ecf6..3900f7c6fd 100644 --- a/plotly/validators/layout/polar/radialaxis/_categoryarray.py +++ b/plotly/validators/layout/polar/radialaxis/_categoryarray.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.polar.radialaxis", **kwargs, ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py b/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py index 7e9e8375b9..50abb6f236 100644 --- a/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/polar/radialaxis/_categoryarraysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.polar.radialaxis", **kwargs, ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_categoryorder.py b/plotly/validators/layout/polar/radialaxis/_categoryorder.py index ecd82f18d3..3b606c89e7 100644 --- a/plotly/validators/layout/polar/radialaxis/_categoryorder.py +++ b/plotly/validators/layout/polar/radialaxis/_categoryorder.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.polar.radialaxis", **kwargs, ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/polar/radialaxis/_color.py b/plotly/validators/layout/polar/radialaxis/_color.py index c6ac9bef47..14502303fe 100644 --- a/plotly/validators/layout/polar/radialaxis/_color.py +++ b/plotly/validators/layout/polar/radialaxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.polar.radialaxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_dtick.py b/plotly/validators/layout/polar/radialaxis/_dtick.py index 39a2e9ca32..700e5a78bb 100644 --- a/plotly/validators/layout/polar/radialaxis/_dtick.py +++ b/plotly/validators/layout/polar/radialaxis/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.polar.radialaxis", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_exponentformat.py b/plotly/validators/layout/polar/radialaxis/_exponentformat.py index 73046ca69d..46a3a6d7ca 100644 --- a/plotly/validators/layout/polar/radialaxis/_exponentformat.py +++ b/plotly/validators/layout/polar/radialaxis/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.polar.radialaxis", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_gridcolor.py b/plotly/validators/layout/polar/radialaxis/_gridcolor.py index 1e8a2820fa..80b64ff9ee 100644 --- a/plotly/validators/layout/polar/radialaxis/_gridcolor.py +++ b/plotly/validators/layout/polar/radialaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.polar.radialaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_griddash.py b/plotly/validators/layout/polar/radialaxis/_griddash.py index 004ade41b0..93d73ad075 100644 --- a/plotly/validators/layout/polar/radialaxis/_griddash.py +++ b/plotly/validators/layout/polar/radialaxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.polar.radialaxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/polar/radialaxis/_gridwidth.py b/plotly/validators/layout/polar/radialaxis/_gridwidth.py index 23b8327649..fb659956a9 100644 --- a/plotly/validators/layout/polar/radialaxis/_gridwidth.py +++ b/plotly/validators/layout/polar/radialaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.polar.radialaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_hoverformat.py b/plotly/validators/layout/polar/radialaxis/_hoverformat.py index 8681eb9163..e492a52f24 100644 --- a/plotly/validators/layout/polar/radialaxis/_hoverformat.py +++ b/plotly/validators/layout/polar/radialaxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.polar.radialaxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_labelalias.py b/plotly/validators/layout/polar/radialaxis/_labelalias.py index 7e3a180aa8..29e6ef480d 100644 --- a/plotly/validators/layout/polar/radialaxis/_labelalias.py +++ b/plotly/validators/layout/polar/radialaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.polar.radialaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_layer.py b/plotly/validators/layout/polar/radialaxis/_layer.py index 09f45dee59..894ac18b1d 100644 --- a/plotly/validators/layout/polar/radialaxis/_layer.py +++ b/plotly/validators/layout/polar/radialaxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.polar.radialaxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_linecolor.py b/plotly/validators/layout/polar/radialaxis/_linecolor.py index aadb3aa1b5..b8ba501741 100644 --- a/plotly/validators/layout/polar/radialaxis/_linecolor.py +++ b/plotly/validators/layout/polar/radialaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.polar.radialaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_linewidth.py b/plotly/validators/layout/polar/radialaxis/_linewidth.py index 6d8216a40f..9aad3901a1 100644 --- a/plotly/validators/layout/polar/radialaxis/_linewidth.py +++ b/plotly/validators/layout/polar/radialaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.polar.radialaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_maxallowed.py b/plotly/validators/layout/polar/radialaxis/_maxallowed.py index ee6a29d22d..a307f3585f 100644 --- a/plotly/validators/layout/polar/radialaxis/_maxallowed.py +++ b/plotly/validators/layout/polar/radialaxis/_maxallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.polar.radialaxis", **kwargs ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_minallowed.py b/plotly/validators/layout/polar/radialaxis/_minallowed.py index 8b7d83f93d..67a3b05e23 100644 --- a/plotly/validators/layout/polar/radialaxis/_minallowed.py +++ b/plotly/validators/layout/polar/radialaxis/_minallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.polar.radialaxis", **kwargs ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_minexponent.py b/plotly/validators/layout/polar/radialaxis/_minexponent.py index 010bf6f6f9..5b7214a141 100644 --- a/plotly/validators/layout/polar/radialaxis/_minexponent.py +++ b/plotly/validators/layout/polar/radialaxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.polar.radialaxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_nticks.py b/plotly/validators/layout/polar/radialaxis/_nticks.py index 8b760bd621..c6a0802ec3 100644 --- a/plotly/validators/layout/polar/radialaxis/_nticks.py +++ b/plotly/validators/layout/polar/radialaxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.polar.radialaxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_range.py b/plotly/validators/layout/polar/radialaxis/_range.py index 1ed75419d6..6cb10af427 100644 --- a/plotly/validators/layout/polar/radialaxis/_range.py +++ b/plotly/validators/layout/polar/radialaxis/_range.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="layout.polar.radialaxis", **kwargs ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), diff --git a/plotly/validators/layout/polar/radialaxis/_rangemode.py b/plotly/validators/layout/polar/radialaxis/_rangemode.py index 89b2c4a9f2..b41dee1cb7 100644 --- a/plotly/validators/layout/polar/radialaxis/_rangemode.py +++ b/plotly/validators/layout/polar/radialaxis/_rangemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="rangemode", parent_name="layout.polar.radialaxis", **kwargs ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["tozero", "nonnegative", "normal"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_separatethousands.py b/plotly/validators/layout/polar/radialaxis/_separatethousands.py index 02ca7be190..c331f8a550 100644 --- a/plotly/validators/layout/polar/radialaxis/_separatethousands.py +++ b/plotly/validators/layout/polar/radialaxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.polar.radialaxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_showexponent.py b/plotly/validators/layout/polar/radialaxis/_showexponent.py index c9a6b09307..a27b3f5195 100644 --- a/plotly/validators/layout/polar/radialaxis/_showexponent.py +++ b/plotly/validators/layout/polar/radialaxis/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.polar.radialaxis", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_showgrid.py b/plotly/validators/layout/polar/radialaxis/_showgrid.py index 1b583de9f9..212e2ef4ea 100644 --- a/plotly/validators/layout/polar/radialaxis/_showgrid.py +++ b/plotly/validators/layout/polar/radialaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.polar.radialaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_showline.py b/plotly/validators/layout/polar/radialaxis/_showline.py index 4ba8862529..fe659d1d4e 100644 --- a/plotly/validators/layout/polar/radialaxis/_showline.py +++ b/plotly/validators/layout/polar/radialaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.polar.radialaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_showticklabels.py b/plotly/validators/layout/polar/radialaxis/_showticklabels.py index 799108d739..b6fd45ee5d 100644 --- a/plotly/validators/layout/polar/radialaxis/_showticklabels.py +++ b/plotly/validators/layout/polar/radialaxis/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.polar.radialaxis", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_showtickprefix.py b/plotly/validators/layout/polar/radialaxis/_showtickprefix.py index fe867368da..a5460acdec 100644 --- a/plotly/validators/layout/polar/radialaxis/_showtickprefix.py +++ b/plotly/validators/layout/polar/radialaxis/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.polar.radialaxis", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_showticksuffix.py b/plotly/validators/layout/polar/radialaxis/_showticksuffix.py index 4db6465ecc..4bbc526704 100644 --- a/plotly/validators/layout/polar/radialaxis/_showticksuffix.py +++ b/plotly/validators/layout/polar/radialaxis/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.polar.radialaxis", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_side.py b/plotly/validators/layout/polar/radialaxis/_side.py index f54d7de3a7..afe26029be 100644 --- a/plotly/validators/layout/polar/radialaxis/_side.py +++ b/plotly/validators/layout/polar/radialaxis/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="layout.polar.radialaxis", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["clockwise", "counterclockwise"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_tick0.py b/plotly/validators/layout/polar/radialaxis/_tick0.py index 8c2e2eefaf..c90203e491 100644 --- a/plotly/validators/layout/polar/radialaxis/_tick0.py +++ b/plotly/validators/layout/polar/radialaxis/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="layout.polar.radialaxis", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_tickangle.py b/plotly/validators/layout/polar/radialaxis/_tickangle.py index 3a0acfdd8c..f94378a1a1 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickangle.py +++ b/plotly/validators/layout/polar/radialaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_tickcolor.py b/plotly/validators/layout/polar/radialaxis/_tickcolor.py index 343113607d..9ad99c01b4 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickcolor.py +++ b/plotly/validators/layout/polar/radialaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_tickfont.py b/plotly/validators/layout/polar/radialaxis/_tickfont.py index ad67d14d26..462cbe9130 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickfont.py +++ b/plotly/validators/layout/polar/radialaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_tickformat.py b/plotly/validators/layout/polar/radialaxis/_tickformat.py index d83bdf2e2b..a565db413b 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickformat.py +++ b/plotly/validators/layout/polar/radialaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py b/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py index 075a4d892d..60215fda39 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/polar/radialaxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.polar.radialaxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/polar/radialaxis/_tickformatstops.py b/plotly/validators/layout/polar/radialaxis/_tickformatstops.py index 41a080b5b0..4753cbb7d3 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickformatstops.py +++ b/plotly/validators/layout/polar/radialaxis/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.polar.radialaxis", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_ticklabelstep.py b/plotly/validators/layout/polar/radialaxis/_ticklabelstep.py index 4321fc6d24..9fd59d231d 100644 --- a/plotly/validators/layout/polar/radialaxis/_ticklabelstep.py +++ b/plotly/validators/layout/polar/radialaxis/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.polar.radialaxis", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_ticklen.py b/plotly/validators/layout/polar/radialaxis/_ticklen.py index 3373cf967c..6ba6abf32b 100644 --- a/plotly/validators/layout/polar/radialaxis/_ticklen.py +++ b/plotly/validators/layout/polar/radialaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.polar.radialaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_tickmode.py b/plotly/validators/layout/polar/radialaxis/_tickmode.py index 9cd4a4e43c..d4ac5f52ac 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickmode.py +++ b/plotly/validators/layout/polar/radialaxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/polar/radialaxis/_tickprefix.py b/plotly/validators/layout/polar/radialaxis/_tickprefix.py index cd7502f133..876307f7b8 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickprefix.py +++ b/plotly/validators/layout/polar/radialaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_ticks.py b/plotly/validators/layout/polar/radialaxis/_ticks.py index 1e885a57ff..162b3a9b71 100644 --- a/plotly/validators/layout/polar/radialaxis/_ticks.py +++ b/plotly/validators/layout/polar/radialaxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.polar.radialaxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_ticksuffix.py b/plotly/validators/layout/polar/radialaxis/_ticksuffix.py index e134aaecf6..18ca8f1058 100644 --- a/plotly/validators/layout/polar/radialaxis/_ticksuffix.py +++ b/plotly/validators/layout/polar/radialaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.polar.radialaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_ticktext.py b/plotly/validators/layout/polar/radialaxis/_ticktext.py index ce387f8c30..16bb748d38 100644 --- a/plotly/validators/layout/polar/radialaxis/_ticktext.py +++ b/plotly/validators/layout/polar/radialaxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.polar.radialaxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py b/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py index 94e4a40e0f..82bca69f9d 100644 --- a/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py +++ b/plotly/validators/layout/polar/radialaxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.polar.radialaxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_tickvals.py b/plotly/validators/layout/polar/radialaxis/_tickvals.py index 643e0b978b..e09744beac 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickvals.py +++ b/plotly/validators/layout/polar/radialaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py b/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py index 18f7cc7a0a..9946560db0 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py +++ b/plotly/validators/layout/polar/radialaxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_tickwidth.py b/plotly/validators/layout/polar/radialaxis/_tickwidth.py index a0a6cf00ff..0685c670fb 100644 --- a/plotly/validators/layout/polar/radialaxis/_tickwidth.py +++ b/plotly/validators/layout/polar/radialaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.polar.radialaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_title.py b/plotly/validators/layout/polar/radialaxis/_title.py index bc4cd9a874..0af1b56735 100644 --- a/plotly/validators/layout/polar/radialaxis/_title.py +++ b/plotly/validators/layout/polar/radialaxis/_title.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="layout.polar.radialaxis", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_type.py b/plotly/validators/layout/polar/radialaxis/_type.py index 42ed593d4e..e2fe51c077 100644 --- a/plotly/validators/layout/polar/radialaxis/_type.py +++ b/plotly/validators/layout/polar/radialaxis/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="layout.polar.radialaxis", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/_uirevision.py b/plotly/validators/layout/polar/radialaxis/_uirevision.py index 47e3d1eaed..5294a4c541 100644 --- a/plotly/validators/layout/polar/radialaxis/_uirevision.py +++ b/plotly/validators/layout/polar/radialaxis/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.polar.radialaxis", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/_visible.py b/plotly/validators/layout/polar/radialaxis/_visible.py index d09b1c2dcc..efb70f3dc0 100644 --- a/plotly/validators/layout/polar/radialaxis/_visible.py +++ b/plotly/validators/layout/polar/radialaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.polar.radialaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/__init__.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/__init__.py index 701f84c04e..8ef0b74165 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/__init__.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._includesrc import IncludesrcValidator - from ._include import IncludeValidator - from ._clipmin import ClipminValidator - from ._clipmax import ClipmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._includesrc.IncludesrcValidator", - "._include.IncludeValidator", - "._clipmin.ClipminValidator", - "._clipmax.ClipmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._includesrc.IncludesrcValidator", + "._include.IncludeValidator", + "._clipmin.ClipminValidator", + "._clipmax.ClipmaxValidator", + ], +) diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmax.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmax.py index 6196cc9bf8..53c5917268 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmax.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmax.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipmaxValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipmaxValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmax", parent_name="layout.polar.radialaxis.autorangeoptions", **kwargs, ): - super(ClipmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmin.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmin.py index db92e2cc25..e84fca60a5 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmin.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_clipmin.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipminValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipminValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmin", parent_name="layout.polar.radialaxis.autorangeoptions", **kwargs, ): - super(ClipminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_include.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_include.py index 3a64de5c16..42ae49396b 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_include.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_include.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): +class IncludeValidator(_bv.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.polar.radialaxis.autorangeoptions", **kwargs, ): - super(IncludeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_includesrc.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_includesrc.py index 144738c795..f27724bbdc 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_includesrc.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_includesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IncludesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="includesrc", parent_name="layout.polar.radialaxis.autorangeoptions", **kwargs, ): - super(IncludesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_maxallowed.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_maxallowed.py index 12bf22d96c..27b7068b92 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_maxallowed.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_maxallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.polar.radialaxis.autorangeoptions", **kwargs, ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_minallowed.py b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_minallowed.py index 95b06d26ee..d92a7d4a4d 100644 --- a/plotly/validators/layout/polar/radialaxis/autorangeoptions/_minallowed.py +++ b/plotly/validators/layout/polar/radialaxis/autorangeoptions/_minallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.polar.radialaxis.autorangeoptions", **kwargs, ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py b/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_color.py b/plotly/validators/layout/polar/radialaxis/tickfont/_color.py index 8023362f58..318ec6f4c0 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_color.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_family.py b/plotly/validators/layout/polar/radialaxis/tickfont/_family.py index b585e5ab66..fce0de2290 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_family.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_lineposition.py b/plotly/validators/layout/polar/radialaxis/tickfont/_lineposition.py index 70eb69c23e..1a7f753ded 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_shadow.py b/plotly/validators/layout/polar/radialaxis/tickfont/_shadow.py index 8545b8ded8..33dfe67c1e 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_size.py b/plotly/validators/layout/polar/radialaxis/tickfont/_size.py index a7493d083b..af80edc9a6 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_size.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_style.py b/plotly/validators/layout/polar/radialaxis/tickfont/_style.py index 7f6fa6f5b1..0ead83056a 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_style.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_textcase.py b/plotly/validators/layout/polar/radialaxis/tickfont/_textcase.py index 81149627f7..cfa9ab758e 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_variant.py b/plotly/validators/layout/polar/radialaxis/tickfont/_variant.py index eb0a77242f..201a9626d4 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_variant.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/polar/radialaxis/tickfont/_weight.py b/plotly/validators/layout/polar/radialaxis/tickfont/_weight.py index 50d84447a8..6fac307f9e 100644 --- a/plotly/validators/layout/polar/radialaxis/tickfont/_weight.py +++ b/plotly/validators/layout/polar/radialaxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.polar.radialaxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py b/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/polar/radialaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py index 3d53c63dd5..b68f441d70 100644 --- a/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/polar/radialaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py b/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py index be8503cc3d..02931ea835 100644 --- a/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/polar/radialaxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py b/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py index a3d7ce3b93..2c9c9f8db0 100644 --- a/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/polar/radialaxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py index 43e9ed4b5a..efa61c343d 100644 --- a/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/polar/radialaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py b/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py index d991d35a6e..d37758dad9 100644 --- a/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/polar/radialaxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.polar.radialaxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/title/__init__.py b/plotly/validators/layout/polar/radialaxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/polar/radialaxis/title/__init__.py +++ b/plotly/validators/layout/polar/radialaxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/polar/radialaxis/title/_font.py b/plotly/validators/layout/polar/radialaxis/title/_font.py index 2ac30fd47d..1014b2ef18 100644 --- a/plotly/validators/layout/polar/radialaxis/title/_font.py +++ b/plotly/validators/layout/polar/radialaxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.polar.radialaxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/title/_text.py b/plotly/validators/layout/polar/radialaxis/title/_text.py index 9b77810add..65e73dc3af 100644 --- a/plotly/validators/layout/polar/radialaxis/title/_text.py +++ b/plotly/validators/layout/polar/radialaxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.polar.radialaxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/title/font/__init__.py b/plotly/validators/layout/polar/radialaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/__init__.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_color.py b/plotly/validators/layout/polar/radialaxis/title/font/_color.py index 7e5f192aca..e6f454fb74 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_color.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_family.py b/plotly/validators/layout/polar/radialaxis/title/font/_family.py index ae854b998d..c8894a9755 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_family.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_lineposition.py b/plotly/validators/layout/polar/radialaxis/title/font/_lineposition.py index 5ae165ec28..ead4f2a809 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_shadow.py b/plotly/validators/layout/polar/radialaxis/title/font/_shadow.py index b438566564..52521c15f3 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_shadow.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_size.py b/plotly/validators/layout/polar/radialaxis/title/font/_size.py index 8e4395068c..1ff6ba2597 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_size.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_style.py b/plotly/validators/layout/polar/radialaxis/title/font/_style.py index 6682debb1b..4c6019dbb3 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_style.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_textcase.py b/plotly/validators/layout/polar/radialaxis/title/font/_textcase.py index 1bc0820cb6..2b458c3ee6 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_textcase.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_variant.py b/plotly/validators/layout/polar/radialaxis/title/font/_variant.py index b650934f40..02efbb6b95 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_variant.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/polar/radialaxis/title/font/_weight.py b/plotly/validators/layout/polar/radialaxis/title/font/_weight.py index 2de5695abe..c17d9e4407 100644 --- a/plotly/validators/layout/polar/radialaxis/title/font/_weight.py +++ b/plotly/validators/layout/polar/radialaxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.polar.radialaxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/__init__.py b/plotly/validators/layout/scene/__init__.py index 28f3948043..523da179fa 100644 --- a/plotly/validators/layout/scene/__init__.py +++ b/plotly/validators/layout/scene/__init__.py @@ -1,39 +1,22 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zaxis import ZaxisValidator - from ._yaxis import YaxisValidator - from ._xaxis import XaxisValidator - from ._uirevision import UirevisionValidator - from ._hovermode import HovermodeValidator - from ._dragmode import DragmodeValidator - from ._domain import DomainValidator - from ._camera import CameraValidator - from ._bgcolor import BgcolorValidator - from ._aspectratio import AspectratioValidator - from ._aspectmode import AspectmodeValidator - from ._annotationdefaults import AnnotationdefaultsValidator - from ._annotations import AnnotationsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zaxis.ZaxisValidator", - "._yaxis.YaxisValidator", - "._xaxis.XaxisValidator", - "._uirevision.UirevisionValidator", - "._hovermode.HovermodeValidator", - "._dragmode.DragmodeValidator", - "._domain.DomainValidator", - "._camera.CameraValidator", - "._bgcolor.BgcolorValidator", - "._aspectratio.AspectratioValidator", - "._aspectmode.AspectmodeValidator", - "._annotationdefaults.AnnotationdefaultsValidator", - "._annotations.AnnotationsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zaxis.ZaxisValidator", + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._uirevision.UirevisionValidator", + "._hovermode.HovermodeValidator", + "._dragmode.DragmodeValidator", + "._domain.DomainValidator", + "._camera.CameraValidator", + "._bgcolor.BgcolorValidator", + "._aspectratio.AspectratioValidator", + "._aspectmode.AspectmodeValidator", + "._annotationdefaults.AnnotationdefaultsValidator", + "._annotations.AnnotationsValidator", + ], +) diff --git a/plotly/validators/layout/scene/_annotationdefaults.py b/plotly/validators/layout/scene/_annotationdefaults.py index a6faa3f14d..ad2c79e816 100644 --- a/plotly/validators/layout/scene/_annotationdefaults.py +++ b/plotly/validators/layout/scene/_annotationdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnnotationdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AnnotationdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="annotationdefaults", parent_name="layout.scene", **kwargs ): - super(AnnotationdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Annotation"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/scene/_annotations.py b/plotly/validators/layout/scene/_annotations.py index 59bc4de65b..dcf40da1b3 100644 --- a/plotly/validators/layout/scene/_annotations.py +++ b/plotly/validators/layout/scene/_annotations.py @@ -1,191 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class AnnotationsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="annotations", parent_name="layout.scene", **kwargs): - super(AnnotationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Annotation"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - arrowcolor - Sets the color of the annotation arrow. - arrowhead - Sets the end annotation arrow head style. - arrowside - Sets the annotation arrow head position. - arrowsize - Sets the size of the end annotation arrow head, - relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - arrowwidth - Sets the width (in px) of annotation arrow - line. - ax - Sets the x component of the arrow tail about - the arrow head (in pixels). - ay - Sets the y component of the arrow tail about - the arrow head (in pixels). - bgcolor - Sets the background color of the annotation. - bordercolor - Sets the color of the border enclosing the - annotation `text`. - borderpad - Sets the padding (in px) between the `text` and - the enclosing border. - borderwidth - Sets the width (in px) of the border enclosing - the annotation `text`. - captureevents - Determines whether the annotation text box - captures mouse move and click events, or allows - those events to pass through to data points in - the plot that may be behind the annotation. By - default `captureevents` is False unless - `hovertext` is provided. If you use the event - `plotly_clickannotation` without `hovertext` - you must explicitly enable `captureevents`. - font - Sets the annotation text font. - height - Sets an explicit height for the text box. null - (default) lets the text set the box height. - Taller text will be clipped. - hoverlabel - :class:`plotly.graph_objects.layout.scene.annot - ation.Hoverlabel` instance or dict with - compatible properties - hovertext - Sets text to appear when hovering over this - annotation. If omitted or blank, no hover label - will appear. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - opacity - Sets the opacity of the annotation (text + - arrow). - showarrow - Determines whether or not the annotation is - drawn with an arrow. If True, `text` is placed - near the arrow's tail. If False, `text` lines - up with the `x` and `y` provided. - standoff - Sets a distance, in pixels, to move the end - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - startarrowhead - Sets the start annotation arrow head style. - startarrowsize - Sets the size of the start annotation arrow - head, relative to `arrowwidth`. A value of 1 - (default) gives a head about 3x as wide as the - line. - startstandoff - Sets a distance, in pixels, to move the start - arrowhead away from the position it is pointing - at, for example to point at the edge of a - marker independent of zoom. Note that this - shortens the arrow from the `ax` / `ay` vector, - in contrast to `xshift` / `yshift` which moves - everything by this amount. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - text - Sets the text associated with this annotation. - Plotly uses a subset of HTML tags to do things - like newline (
), bold (), italics - (), hyperlinks (). - Tags , , , , are - also supported. - textangle - Sets the angle at which the `text` is drawn - with respect to the horizontal. - valign - Sets the vertical alignment of the `text` - within the box. Has an effect only if an - explicit height is set to override the text - height. - visible - Determines whether or not this annotation is - visible. - width - Sets an explicit width for the text box. null - (default) lets the text set the box width. - Wider text will be clipped. There is no - automatic wrapping; use
to start a new - line. - x - Sets the annotation's x position. - xanchor - Sets the text box's horizontal position anchor - This anchor binds the `x` position to the - "left", "center" or "right" of the annotation. - For example, if `x` is set to 1, `xref` to - "paper" and `xanchor` to "right" then the - right-most portion of the annotation lines up - with the right-most edge of the plotting area. - If "auto", the anchor is equivalent to "center" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - xshift - Shifts the position of the whole annotation and - arrow to the right (positive) or left - (negative) by this many pixels. - y - Sets the annotation's y position. - yanchor - Sets the text box's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the annotation. - For example, if `y` is set to 1, `yref` to - "paper" and `yanchor` to "top" then the top- - most portion of the annotation lines up with - the top-most edge of the plotting area. If - "auto", the anchor is equivalent to "middle" - for data-referenced annotations or if there is - an arrow, whereas for paper-referenced with no - arrow, the anchor picked corresponds to the - closest side. - yshift - Shifts the position of the whole annotation and - arrow up (positive) or down (negative) by this - many pixels. - z - Sets the annotation's z position. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/_aspectmode.py b/plotly/validators/layout/scene/_aspectmode.py index b610258cff..2064c01637 100644 --- a/plotly/validators/layout/scene/_aspectmode.py +++ b/plotly/validators/layout/scene/_aspectmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AspectmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AspectmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="aspectmode", parent_name="layout.scene", **kwargs): - super(AspectmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "cube", "data", "manual"]), diff --git a/plotly/validators/layout/scene/_aspectratio.py b/plotly/validators/layout/scene/_aspectratio.py index b48c3f8597..d39ac28962 100644 --- a/plotly/validators/layout/scene/_aspectratio.py +++ b/plotly/validators/layout/scene/_aspectratio.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AspectratioValidator(_plotly_utils.basevalidators.CompoundValidator): +class AspectratioValidator(_bv.CompoundValidator): def __init__(self, plotly_name="aspectratio", parent_name="layout.scene", **kwargs): - super(AspectratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Aspectratio"), data_docs=kwargs.pop( "data_docs", """ - x - - y - - z - """, ), **kwargs, diff --git a/plotly/validators/layout/scene/_bgcolor.py b/plotly/validators/layout/scene/_bgcolor.py index 59f974c386..b7f3d79ed7 100644 --- a/plotly/validators/layout/scene/_bgcolor.py +++ b/plotly/validators/layout/scene/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.scene", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/_camera.py b/plotly/validators/layout/scene/_camera.py index 15cd9b4121..76eedc6d1a 100644 --- a/plotly/validators/layout/scene/_camera.py +++ b/plotly/validators/layout/scene/_camera.py @@ -1,35 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CameraValidator(_plotly_utils.basevalidators.CompoundValidator): +class CameraValidator(_bv.CompoundValidator): def __init__(self, plotly_name="camera", parent_name="layout.scene", **kwargs): - super(CameraValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Camera"), data_docs=kwargs.pop( "data_docs", """ - center - Sets the (x,y,z) components of the 'center' - camera vector This vector determines the - translation (x,y,z) space about the center of - this scene. By default, there is no such - translation. - eye - Sets the (x,y,z) components of the 'eye' camera - vector. This vector determines the view point - about the origin of this scene. - projection - :class:`plotly.graph_objects.layout.scene.camer - a.Projection` instance or dict with compatible - properties - up - Sets the (x,y,z) components of the 'up' camera - vector. This vector determines the up direction - of this scene with respect to the page. The - default is *{x: 0, y: 0, z: 1}* which means - that the z axis points up. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/_domain.py b/plotly/validators/layout/scene/_domain.py index 72e1a3c087..c55b53ad87 100644 --- a/plotly/validators/layout/scene/_domain.py +++ b/plotly/validators/layout/scene/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.scene", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this scene subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this scene subplot . - x - Sets the horizontal domain of this scene - subplot (in plot fraction). - y - Sets the vertical domain of this scene subplot - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/layout/scene/_dragmode.py b/plotly/validators/layout/scene/_dragmode.py index ea06274741..5b900762ce 100644 --- a/plotly/validators/layout/scene/_dragmode.py +++ b/plotly/validators/layout/scene/_dragmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DragmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DragmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="dragmode", parent_name="layout.scene", **kwargs): - super(DragmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["orbit", "turntable", "zoom", "pan", False]), **kwargs, diff --git a/plotly/validators/layout/scene/_hovermode.py b/plotly/validators/layout/scene/_hovermode.py index 89f547c020..ea7b8c543e 100644 --- a/plotly/validators/layout/scene/_hovermode.py +++ b/plotly/validators/layout/scene/_hovermode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HovermodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="hovermode", parent_name="layout.scene", **kwargs): - super(HovermodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), values=kwargs.pop("values", ["closest", False]), **kwargs, diff --git a/plotly/validators/layout/scene/_uirevision.py b/plotly/validators/layout/scene/_uirevision.py index 479f876b19..021055a524 100644 --- a/plotly/validators/layout/scene/_uirevision.py +++ b/plotly/validators/layout/scene/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.scene", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/_xaxis.py b/plotly/validators/layout/scene/_xaxis.py index 88d2f7ead7..945024dafd 100644 --- a/plotly/validators/layout/scene/_xaxis.py +++ b/plotly/validators/layout/scene/_xaxis.py @@ -1,342 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class XaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="xaxis", parent_name="layout.scene", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "XAxis"), data_docs=kwargs.pop( "data_docs", """ - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.scene.xaxis - .Autorangeoptions` instance or dict with - compatible properties - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.xaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.xaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.xaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.xaxis - .Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/_yaxis.py b/plotly/validators/layout/scene/_yaxis.py index 161a1ef836..c859a4a60d 100644 --- a/plotly/validators/layout/scene/_yaxis.py +++ b/plotly/validators/layout/scene/_yaxis.py @@ -1,342 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class YaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="yaxis", parent_name="layout.scene", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "YAxis"), data_docs=kwargs.pop( "data_docs", """ - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.scene.yaxis - .Autorangeoptions` instance or dict with - compatible properties - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.yaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.yaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.yaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.yaxis - .Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/_zaxis.py b/plotly/validators/layout/scene/_zaxis.py index 93640da1c0..4e924cd78f 100644 --- a/plotly/validators/layout/scene/_zaxis.py +++ b/plotly/validators/layout/scene/_zaxis.py @@ -1,342 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="zaxis", parent_name="layout.scene", **kwargs): - super(ZaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ZAxis"), data_docs=kwargs.pop( "data_docs", """ - autorange - Determines whether or not the range of this - axis is computed in relation to the input data. - See `rangemode` for more info. If `range` is - provided and it has a value for both the lower - and upper bound, `autorange` is set to False. - Using "min" applies autorange only to set the - minimum. Using "max" applies autorange only to - set the maximum. Using *min reversed* applies - autorange only to set the minimum on a reversed - axis. Using *max reversed* applies autorange - only to set the maximum on a reversed axis. - Using "reversed" applies autorange on both ends - and reverses the axis direction. - autorangeoptions - :class:`plotly.graph_objects.layout.scene.zaxis - .Autorangeoptions` instance or dict with - compatible properties - autotypenumbers - Using "strict" a numeric string in trace data - is not converted to a number. Using *convert - types* a numeric string in trace data may be - treated as a number during automatic axis - `type` detection. Defaults to - layout.autotypenumbers. - backgroundcolor - Sets the background color of this axis' wall. - calendar - Sets the calendar system to use for `range` and - `tick0` if this is a date axis. This does not - set the calendar for interpreting data on this - axis, that's specified in the trace or via the - global `layout.calendar` - categoryarray - Sets the order in which categories on this axis - appear. Only has an effect if `categoryorder` - is set to "array". Used with `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the case of - categorical variables. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. Set - `categoryorder` to *total ascending* or *total - descending* if order should be determined by - the numerical order of the values. Similarly, - the order can be determined by the min, max, - sum, mean, geometric mean or median of all the - values. - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - maxallowed - Determines the maximum range of this axis. - minallowed - Determines the minimum range of this axis. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - mirror - Determines if the axis lines or/and ticks are - mirrored to the opposite side of the plotting - area. If True, the axis lines are mirrored. If - "ticks", the axis lines and ticks are mirrored. - If False, mirroring is disable. If "all", axis - lines are mirrored on all shared-axes subplots. - If "allticks", axis lines and ticks are - mirrored on all shared-axes subplots. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - range - Sets the range of this axis. If the axis `type` - is "log", then you must take the log of your - desired range (e.g. to set the range from 1 to - 100, set the range from 0 to 2). If the axis - `type` is "date", it should be date strings, - like date data, though Date objects and unix - milliseconds will be accepted and converted to - strings. If the axis `type` is "category", it - should be numbers, using the scale where each - category is assigned a serial number from zero - in the order it appears. Leaving either or both - elements `null` impacts the default - `autorange`. - rangemode - If "normal", the range is computed in relation - to the extrema of the input data. If *tozero*`, - the range extends to 0, regardless of the input - data If "nonnegative", the range is non- - negative, regardless of the input data. Applies - only to linear axes. - separatethousands - If "true", even 4-digit integers are separated - showaxeslabels - Sets whether or not this axis is labeled - showbackground - Sets whether or not this axis' wall has a - background color. - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showspikes - Sets whether or not spikes starting from data - points to this axis' wall are shown on hover. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - spikecolor - Sets the color of the spikes. - spikesides - Sets whether or not spikes extending from the - projection data points to this axis' wall - boundaries are shown on hover. - spikethickness - Sets the thickness (in px) of the spikes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - scene.zaxis.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.scene.zaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.scene.zaxis.tickformatstops - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.scene.zaxis - .Title` instance or dict with compatible - properties - type - Sets the axis type. By default, plotly attempts - to determined the axis type by looking into the - data of the traces that referenced the axis in - question. - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false - zeroline - Determines whether or not a line is drawn at - along the 0 value of this axis. If True, the - zero line is drawn on top of the grid lines. - zerolinecolor - Sets the line color of the zero line. - zerolinewidth - Sets the width (in px) of the zero line. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/__init__.py b/plotly/validators/layout/scene/annotation/__init__.py index 723a59944b..86dd8cca5a 100644 --- a/plotly/validators/layout/scene/annotation/__init__.py +++ b/plotly/validators/layout/scene/annotation/__init__.py @@ -1,87 +1,46 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._yshift import YshiftValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xshift import XshiftValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valign import ValignValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._templateitemname import TemplateitemnameValidator - from ._startstandoff import StartstandoffValidator - from ._startarrowsize import StartarrowsizeValidator - from ._startarrowhead import StartarrowheadValidator - from ._standoff import StandoffValidator - from ._showarrow import ShowarrowValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._hovertext import HovertextValidator - from ._hoverlabel import HoverlabelValidator - from ._height import HeightValidator - from ._font import FontValidator - from ._captureevents import CaptureeventsValidator - from ._borderwidth import BorderwidthValidator - from ._borderpad import BorderpadValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._ay import AyValidator - from ._ax import AxValidator - from ._arrowwidth import ArrowwidthValidator - from ._arrowsize import ArrowsizeValidator - from ._arrowside import ArrowsideValidator - from ._arrowhead import ArrowheadValidator - from ._arrowcolor import ArrowcolorValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._z.ZValidator", - "._yshift.YshiftValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xshift.XshiftValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valign.ValignValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._templateitemname.TemplateitemnameValidator", - "._startstandoff.StartstandoffValidator", - "._startarrowsize.StartarrowsizeValidator", - "._startarrowhead.StartarrowheadValidator", - "._standoff.StandoffValidator", - "._showarrow.ShowarrowValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._hovertext.HovertextValidator", - "._hoverlabel.HoverlabelValidator", - "._height.HeightValidator", - "._font.FontValidator", - "._captureevents.CaptureeventsValidator", - "._borderwidth.BorderwidthValidator", - "._borderpad.BorderpadValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._ay.AyValidator", - "._ax.AxValidator", - "._arrowwidth.ArrowwidthValidator", - "._arrowsize.ArrowsizeValidator", - "._arrowside.ArrowsideValidator", - "._arrowhead.ArrowheadValidator", - "._arrowcolor.ArrowcolorValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._z.ZValidator", + "._yshift.YshiftValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xshift.XshiftValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valign.ValignValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._templateitemname.TemplateitemnameValidator", + "._startstandoff.StartstandoffValidator", + "._startarrowsize.StartarrowsizeValidator", + "._startarrowhead.StartarrowheadValidator", + "._standoff.StandoffValidator", + "._showarrow.ShowarrowValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._height.HeightValidator", + "._font.FontValidator", + "._captureevents.CaptureeventsValidator", + "._borderwidth.BorderwidthValidator", + "._borderpad.BorderpadValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._ay.AyValidator", + "._ax.AxValidator", + "._arrowwidth.ArrowwidthValidator", + "._arrowsize.ArrowsizeValidator", + "._arrowside.ArrowsideValidator", + "._arrowhead.ArrowheadValidator", + "._arrowcolor.ArrowcolorValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/layout/scene/annotation/_align.py b/plotly/validators/layout/scene/annotation/_align.py index a33c7160fd..a9d8f8ad02 100644 --- a/plotly/validators/layout/scene/annotation/_align.py +++ b/plotly/validators/layout/scene/annotation/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="layout.scene.annotation", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_arrowcolor.py b/plotly/validators/layout/scene/annotation/_arrowcolor.py index 7916a4a73e..e85f76e0d2 100644 --- a/plotly/validators/layout/scene/annotation/_arrowcolor.py +++ b/plotly/validators/layout/scene/annotation/_arrowcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ArrowcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="arrowcolor", parent_name="layout.scene.annotation", **kwargs ): - super(ArrowcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_arrowhead.py b/plotly/validators/layout/scene/annotation/_arrowhead.py index 872e3a5ed5..110e421980 100644 --- a/plotly/validators/layout/scene/annotation/_arrowhead.py +++ b/plotly/validators/layout/scene/annotation/_arrowhead.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): +class ArrowheadValidator(_bv.IntegerValidator): def __init__( self, plotly_name="arrowhead", parent_name="layout.scene.annotation", **kwargs ): - super(ArrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 8), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/scene/annotation/_arrowside.py b/plotly/validators/layout/scene/annotation/_arrowside.py index 3bea9ca23a..81e875aa04 100644 --- a/plotly/validators/layout/scene/annotation/_arrowside.py +++ b/plotly/validators/layout/scene/annotation/_arrowside.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowsideValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ArrowsideValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="arrowside", parent_name="layout.scene.annotation", **kwargs ): - super(ArrowsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["end", "start"]), diff --git a/plotly/validators/layout/scene/annotation/_arrowsize.py b/plotly/validators/layout/scene/annotation/_arrowsize.py index cc653a0757..bf68c9e8d8 100644 --- a/plotly/validators/layout/scene/annotation/_arrowsize.py +++ b/plotly/validators/layout/scene/annotation/_arrowsize.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class ArrowsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="arrowsize", parent_name="layout.scene.annotation", **kwargs ): - super(ArrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0.3), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_arrowwidth.py b/plotly/validators/layout/scene/annotation/_arrowwidth.py index 866ac1c9d9..d90d68fb98 100644 --- a/plotly/validators/layout/scene/annotation/_arrowwidth.py +++ b/plotly/validators/layout/scene/annotation/_arrowwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ArrowwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="arrowwidth", parent_name="layout.scene.annotation", **kwargs ): - super(ArrowwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0.1), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_ax.py b/plotly/validators/layout/scene/annotation/_ax.py index 8bfa4a609e..1ad2087b22 100644 --- a/plotly/validators/layout/scene/annotation/_ax.py +++ b/plotly/validators/layout/scene/annotation/_ax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AxValidator(_plotly_utils.basevalidators.NumberValidator): +class AxValidator(_bv.NumberValidator): def __init__( self, plotly_name="ax", parent_name="layout.scene.annotation", **kwargs ): - super(AxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_ay.py b/plotly/validators/layout/scene/annotation/_ay.py index 15c9309cb7..c0ab18c043 100644 --- a/plotly/validators/layout/scene/annotation/_ay.py +++ b/plotly/validators/layout/scene/annotation/_ay.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AyValidator(_plotly_utils.basevalidators.NumberValidator): +class AyValidator(_bv.NumberValidator): def __init__( self, plotly_name="ay", parent_name="layout.scene.annotation", **kwargs ): - super(AyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_bgcolor.py b/plotly/validators/layout/scene/annotation/_bgcolor.py index 396d5d3252..e4551a9867 100644 --- a/plotly/validators/layout/scene/annotation/_bgcolor.py +++ b/plotly/validators/layout/scene/annotation/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.scene.annotation", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_bordercolor.py b/plotly/validators/layout/scene/annotation/_bordercolor.py index 91f6ff528a..b992a9f4eb 100644 --- a/plotly/validators/layout/scene/annotation/_bordercolor.py +++ b/plotly/validators/layout/scene/annotation/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.scene.annotation", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_borderpad.py b/plotly/validators/layout/scene/annotation/_borderpad.py index 3f602f11d1..97c7948904 100644 --- a/plotly/validators/layout/scene/annotation/_borderpad.py +++ b/plotly/validators/layout/scene/annotation/_borderpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderpadValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderpad", parent_name="layout.scene.annotation", **kwargs ): - super(BorderpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_borderwidth.py b/plotly/validators/layout/scene/annotation/_borderwidth.py index cdbedbb2ed..de8cff458a 100644 --- a/plotly/validators/layout/scene/annotation/_borderwidth.py +++ b/plotly/validators/layout/scene/annotation/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.scene.annotation", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_captureevents.py b/plotly/validators/layout/scene/annotation/_captureevents.py index 06e3700550..ceb8649751 100644 --- a/plotly/validators/layout/scene/annotation/_captureevents.py +++ b/plotly/validators/layout/scene/annotation/_captureevents.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CaptureeventsValidator(_plotly_utils.basevalidators.BooleanValidator): +class CaptureeventsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="captureevents", parent_name="layout.scene.annotation", **kwargs, ): - super(CaptureeventsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_font.py b/plotly/validators/layout/scene/annotation/_font.py index 308433eb8b..1806f74c54 100644 --- a/plotly/validators/layout/scene/annotation/_font.py +++ b/plotly/validators/layout/scene/annotation/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.scene.annotation", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_height.py b/plotly/validators/layout/scene/annotation/_height.py index bab78d2ce7..15f46cb1da 100644 --- a/plotly/validators/layout/scene/annotation/_height.py +++ b/plotly/validators/layout/scene/annotation/_height.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): +class HeightValidator(_bv.NumberValidator): def __init__( self, plotly_name="height", parent_name="layout.scene.annotation", **kwargs ): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_hoverlabel.py b/plotly/validators/layout/scene/annotation/_hoverlabel.py index 88ec79d8f2..09d216d164 100644 --- a/plotly/validators/layout/scene/annotation/_hoverlabel.py +++ b/plotly/validators/layout/scene/annotation/_hoverlabel.py @@ -1,29 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__( self, plotly_name="hoverlabel", parent_name="layout.scene.annotation", **kwargs ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the background color of the hover label. - By default uses the annotation's `bgcolor` made - opaque, or white if it was transparent. - bordercolor - Sets the border color of the hover label. By - default uses either dark grey or white, for - maximum contrast with `hoverlabel.bgcolor`. - font - Sets the hover label text font. By default uses - the global hover font and size, with color from - `hoverlabel.bordercolor`. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_hovertext.py b/plotly/validators/layout/scene/annotation/_hovertext.py index d174da0294..e3a69e31c2 100644 --- a/plotly/validators/layout/scene/annotation/_hovertext.py +++ b/plotly/validators/layout/scene/annotation/_hovertext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertext", parent_name="layout.scene.annotation", **kwargs ): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_name.py b/plotly/validators/layout/scene/annotation/_name.py index 7dbece6887..8e90de1379 100644 --- a/plotly/validators/layout/scene/annotation/_name.py +++ b/plotly/validators/layout/scene/annotation/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.scene.annotation", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_opacity.py b/plotly/validators/layout/scene/annotation/_opacity.py index 190cdb6e74..975ec9bdb8 100644 --- a/plotly/validators/layout/scene/annotation/_opacity.py +++ b/plotly/validators/layout/scene/annotation/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="layout.scene.annotation", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/scene/annotation/_showarrow.py b/plotly/validators/layout/scene/annotation/_showarrow.py index d5201213ef..677be34182 100644 --- a/plotly/validators/layout/scene/annotation/_showarrow.py +++ b/plotly/validators/layout/scene/annotation/_showarrow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowarrowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowarrowValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showarrow", parent_name="layout.scene.annotation", **kwargs ): - super(ShowarrowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_standoff.py b/plotly/validators/layout/scene/annotation/_standoff.py index 7d42fc834b..ed51f7adcf 100644 --- a/plotly/validators/layout/scene/annotation/_standoff.py +++ b/plotly/validators/layout/scene/annotation/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="layout.scene.annotation", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_startarrowhead.py b/plotly/validators/layout/scene/annotation/_startarrowhead.py index 2306415fb3..ba4ff03d59 100644 --- a/plotly/validators/layout/scene/annotation/_startarrowhead.py +++ b/plotly/validators/layout/scene/annotation/_startarrowhead.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartarrowheadValidator(_plotly_utils.basevalidators.IntegerValidator): +class StartarrowheadValidator(_bv.IntegerValidator): def __init__( self, plotly_name="startarrowhead", parent_name="layout.scene.annotation", **kwargs, ): - super(StartarrowheadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 8), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/scene/annotation/_startarrowsize.py b/plotly/validators/layout/scene/annotation/_startarrowsize.py index 954ff007c8..25f2f26fec 100644 --- a/plotly/validators/layout/scene/annotation/_startarrowsize.py +++ b/plotly/validators/layout/scene/annotation/_startarrowsize.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartarrowsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class StartarrowsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="startarrowsize", parent_name="layout.scene.annotation", **kwargs, ): - super(StartarrowsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0.3), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_startstandoff.py b/plotly/validators/layout/scene/annotation/_startstandoff.py index f51fc1928e..ca9914a4a5 100644 --- a/plotly/validators/layout/scene/annotation/_startstandoff.py +++ b/plotly/validators/layout/scene/annotation/_startstandoff.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartstandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StartstandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="startstandoff", parent_name="layout.scene.annotation", **kwargs, ): - super(StartstandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_templateitemname.py b/plotly/validators/layout/scene/annotation/_templateitemname.py index cb0c43a865..95ee540af2 100644 --- a/plotly/validators/layout/scene/annotation/_templateitemname.py +++ b/plotly/validators/layout/scene/annotation/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.scene.annotation", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_text.py b/plotly/validators/layout/scene/annotation/_text.py index 2e70c88152..421e0ffa0d 100644 --- a/plotly/validators/layout/scene/annotation/_text.py +++ b/plotly/validators/layout/scene/annotation/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.scene.annotation", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_textangle.py b/plotly/validators/layout/scene/annotation/_textangle.py index 417bceced4..4e40fc05df 100644 --- a/plotly/validators/layout/scene/annotation/_textangle.py +++ b/plotly/validators/layout/scene/annotation/_textangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="textangle", parent_name="layout.scene.annotation", **kwargs ): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_valign.py b/plotly/validators/layout/scene/annotation/_valign.py index 50bf4200c4..baae12c347 100644 --- a/plotly/validators/layout/scene/annotation/_valign.py +++ b/plotly/validators/layout/scene/annotation/_valign.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ValignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="valign", parent_name="layout.scene.annotation", **kwargs ): - super(ValignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_visible.py b/plotly/validators/layout/scene/annotation/_visible.py index 7a7f9935d7..7af55fb323 100644 --- a/plotly/validators/layout/scene/annotation/_visible.py +++ b/plotly/validators/layout/scene/annotation/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.scene.annotation", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_width.py b/plotly/validators/layout/scene/annotation/_width.py index 44658219f9..eaab98d1ea 100644 --- a/plotly/validators/layout/scene/annotation/_width.py +++ b/plotly/validators/layout/scene/annotation/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.scene.annotation", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_x.py b/plotly/validators/layout/scene/annotation/_x.py index 558f329ca7..306b124f13 100644 --- a/plotly/validators/layout/scene/annotation/_x.py +++ b/plotly/validators/layout/scene/annotation/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.AnyValidator): +class XValidator(_bv.AnyValidator): def __init__( self, plotly_name="x", parent_name="layout.scene.annotation", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_xanchor.py b/plotly/validators/layout/scene/annotation/_xanchor.py index 27a29e5475..49dc9067cf 100644 --- a/plotly/validators/layout/scene/annotation/_xanchor.py +++ b/plotly/validators/layout/scene/annotation/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.scene.annotation", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_xshift.py b/plotly/validators/layout/scene/annotation/_xshift.py index 3b2e5541e7..12711d6c8d 100644 --- a/plotly/validators/layout/scene/annotation/_xshift.py +++ b/plotly/validators/layout/scene/annotation/_xshift.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XshiftValidator(_plotly_utils.basevalidators.NumberValidator): +class XshiftValidator(_bv.NumberValidator): def __init__( self, plotly_name="xshift", parent_name="layout.scene.annotation", **kwargs ): - super(XshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_y.py b/plotly/validators/layout/scene/annotation/_y.py index de1168676e..da69c0e001 100644 --- a/plotly/validators/layout/scene/annotation/_y.py +++ b/plotly/validators/layout/scene/annotation/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.AnyValidator): +class YValidator(_bv.AnyValidator): def __init__( self, plotly_name="y", parent_name="layout.scene.annotation", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_yanchor.py b/plotly/validators/layout/scene/annotation/_yanchor.py index f74aa85e52..e234300c81 100644 --- a/plotly/validators/layout/scene/annotation/_yanchor.py +++ b/plotly/validators/layout/scene/annotation/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.scene.annotation", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/_yshift.py b/plotly/validators/layout/scene/annotation/_yshift.py index d4a92053ea..30fc9aeb7a 100644 --- a/plotly/validators/layout/scene/annotation/_yshift.py +++ b/plotly/validators/layout/scene/annotation/_yshift.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YshiftValidator(_plotly_utils.basevalidators.NumberValidator): +class YshiftValidator(_bv.NumberValidator): def __init__( self, plotly_name="yshift", parent_name="layout.scene.annotation", **kwargs ): - super(YshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/_z.py b/plotly/validators/layout/scene/annotation/_z.py index e8c2be240a..1b03b689d8 100644 --- a/plotly/validators/layout/scene/annotation/_z.py +++ b/plotly/validators/layout/scene/annotation/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.AnyValidator): +class ZValidator(_bv.AnyValidator): def __init__( self, plotly_name="z", parent_name="layout.scene.annotation", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/font/__init__.py b/plotly/validators/layout/scene/annotation/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/annotation/font/__init__.py +++ b/plotly/validators/layout/scene/annotation/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/annotation/font/_color.py b/plotly/validators/layout/scene/annotation/font/_color.py index 39cb5160b5..23f37754be 100644 --- a/plotly/validators/layout/scene/annotation/font/_color.py +++ b/plotly/validators/layout/scene/annotation/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.annotation.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/font/_family.py b/plotly/validators/layout/scene/annotation/font/_family.py index 4c7bc9e5b8..09efe3cf5a 100644 --- a/plotly/validators/layout/scene/annotation/font/_family.py +++ b/plotly/validators/layout/scene/annotation/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.annotation.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/annotation/font/_lineposition.py b/plotly/validators/layout/scene/annotation/font/_lineposition.py index 03be35b82f..5aff24e267 100644 --- a/plotly/validators/layout/scene/annotation/font/_lineposition.py +++ b/plotly/validators/layout/scene/annotation/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.annotation.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/annotation/font/_shadow.py b/plotly/validators/layout/scene/annotation/font/_shadow.py index e6af82b2c1..0a921e8b75 100644 --- a/plotly/validators/layout/scene/annotation/font/_shadow.py +++ b/plotly/validators/layout/scene/annotation/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.annotation.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/font/_size.py b/plotly/validators/layout/scene/annotation/font/_size.py index ed3331c762..b8764a16e5 100644 --- a/plotly/validators/layout/scene/annotation/font/_size.py +++ b/plotly/validators/layout/scene/annotation/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.annotation.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/font/_style.py b/plotly/validators/layout/scene/annotation/font/_style.py index 1ea1584965..1d18331d0a 100644 --- a/plotly/validators/layout/scene/annotation/font/_style.py +++ b/plotly/validators/layout/scene/annotation/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.annotation.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/font/_textcase.py b/plotly/validators/layout/scene/annotation/font/_textcase.py index 324e8d7e18..6af7ad09dd 100644 --- a/plotly/validators/layout/scene/annotation/font/_textcase.py +++ b/plotly/validators/layout/scene/annotation/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.annotation.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/font/_variant.py b/plotly/validators/layout/scene/annotation/font/_variant.py index bab6052d76..5a7cc442d6 100644 --- a/plotly/validators/layout/scene/annotation/font/_variant.py +++ b/plotly/validators/layout/scene/annotation/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.annotation.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/annotation/font/_weight.py b/plotly/validators/layout/scene/annotation/font/_weight.py index a28d088f2e..c727de5d41 100644 --- a/plotly/validators/layout/scene/annotation/font/_weight.py +++ b/plotly/validators/layout/scene/annotation/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.annotation.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py b/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py index 6cd9f4b93c..040f0045eb 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._font import FontValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._font.FontValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._font.FontValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py b/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py index 84a8d96b94..f5634ac2ba 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.scene.annotation.hoverlabel", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py b/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py index c26c2fedb8..d3f7e88708 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.scene.annotation.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/_font.py b/plotly/validators/layout/scene/annotation/hoverlabel/_font.py index 41c904576a..5bcb36254b 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/_font.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.scene.annotation.hoverlabel", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py index a75d5e38db..6ba250fd3c 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py index c9512eb123..efff32aad9 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_lineposition.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_lineposition.py index ac63fdd6b8..3f14998bda 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_lineposition.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_shadow.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_shadow.py index 4d6d1aa258..13680ae501 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_shadow.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py index b955bb7dd4..9cc13e6a8f 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_style.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_style.py index ce03de4321..359c5441df 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_style.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_textcase.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_textcase.py index 4727886e3e..7e53dc80c8 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_textcase.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_variant.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_variant.py index 60e0278326..597860bbeb 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_variant.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/annotation/hoverlabel/font/_weight.py b/plotly/validators/layout/scene/annotation/hoverlabel/font/_weight.py index f364d50daa..e7a81d1437 100644 --- a/plotly/validators/layout/scene/annotation/hoverlabel/font/_weight.py +++ b/plotly/validators/layout/scene/annotation/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.annotation.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/aspectratio/__init__.py b/plotly/validators/layout/scene/aspectratio/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/layout/scene/aspectratio/__init__.py +++ b/plotly/validators/layout/scene/aspectratio/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/layout/scene/aspectratio/_x.py b/plotly/validators/layout/scene/aspectratio/_x.py index acf08888c7..c92cf0e02e 100644 --- a/plotly/validators/layout/scene/aspectratio/_x.py +++ b/plotly/validators/layout/scene/aspectratio/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="layout.scene.aspectratio", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/scene/aspectratio/_y.py b/plotly/validators/layout/scene/aspectratio/_y.py index 2a86381e70..6ad4904f98 100644 --- a/plotly/validators/layout/scene/aspectratio/_y.py +++ b/plotly/validators/layout/scene/aspectratio/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="layout.scene.aspectratio", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/scene/aspectratio/_z.py b/plotly/validators/layout/scene/aspectratio/_z.py index 615def6da4..e9da331f38 100644 --- a/plotly/validators/layout/scene/aspectratio/_z.py +++ b/plotly/validators/layout/scene/aspectratio/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__( self, plotly_name="z", parent_name="layout.scene.aspectratio", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^aspectmode": "manual"}), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/scene/camera/__init__.py b/plotly/validators/layout/scene/camera/__init__.py index 6fda571b1e..affcb0640a 100644 --- a/plotly/validators/layout/scene/camera/__init__.py +++ b/plotly/validators/layout/scene/camera/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._up import UpValidator - from ._projection import ProjectionValidator - from ._eye import EyeValidator - from ._center import CenterValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._up.UpValidator", - "._projection.ProjectionValidator", - "._eye.EyeValidator", - "._center.CenterValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._up.UpValidator", + "._projection.ProjectionValidator", + "._eye.EyeValidator", + "._center.CenterValidator", + ], +) diff --git a/plotly/validators/layout/scene/camera/_center.py b/plotly/validators/layout/scene/camera/_center.py index 6e24a08ea9..3bd3d30bb0 100644 --- a/plotly/validators/layout/scene/camera/_center.py +++ b/plotly/validators/layout/scene/camera/_center.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CenterValidator(_plotly_utils.basevalidators.CompoundValidator): +class CenterValidator(_bv.CompoundValidator): def __init__( self, plotly_name="center", parent_name="layout.scene.camera", **kwargs ): - super(CenterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Center"), data_docs=kwargs.pop( "data_docs", """ - x - - y - - z - """, ), **kwargs, diff --git a/plotly/validators/layout/scene/camera/_eye.py b/plotly/validators/layout/scene/camera/_eye.py index c058889406..8b19b19dff 100644 --- a/plotly/validators/layout/scene/camera/_eye.py +++ b/plotly/validators/layout/scene/camera/_eye.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EyeValidator(_plotly_utils.basevalidators.CompoundValidator): +class EyeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="eye", parent_name="layout.scene.camera", **kwargs): - super(EyeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Eye"), data_docs=kwargs.pop( "data_docs", """ - x - - y - - z - """, ), **kwargs, diff --git a/plotly/validators/layout/scene/camera/_projection.py b/plotly/validators/layout/scene/camera/_projection.py index c9fd40128b..92ed06d776 100644 --- a/plotly/validators/layout/scene/camera/_projection.py +++ b/plotly/validators/layout/scene/camera/_projection.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): +class ProjectionValidator(_bv.CompoundValidator): def __init__( self, plotly_name="projection", parent_name="layout.scene.camera", **kwargs ): - super(ProjectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Projection"), data_docs=kwargs.pop( "data_docs", """ - type - Sets the projection type. The projection type - could be either "perspective" or - "orthographic". The default is "perspective". """, ), **kwargs, diff --git a/plotly/validators/layout/scene/camera/_up.py b/plotly/validators/layout/scene/camera/_up.py index 99d11a4341..641543d1fe 100644 --- a/plotly/validators/layout/scene/camera/_up.py +++ b/plotly/validators/layout/scene/camera/_up.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UpValidator(_plotly_utils.basevalidators.CompoundValidator): +class UpValidator(_bv.CompoundValidator): def __init__(self, plotly_name="up", parent_name="layout.scene.camera", **kwargs): - super(UpValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Up"), data_docs=kwargs.pop( "data_docs", """ - x - - y - - z - """, ), **kwargs, diff --git a/plotly/validators/layout/scene/camera/center/__init__.py b/plotly/validators/layout/scene/camera/center/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/layout/scene/camera/center/__init__.py +++ b/plotly/validators/layout/scene/camera/center/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/layout/scene/camera/center/_x.py b/plotly/validators/layout/scene/camera/center/_x.py index e091625e3a..507cc973ff 100644 --- a/plotly/validators/layout/scene/camera/center/_x.py +++ b/plotly/validators/layout/scene/camera/center/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="layout.scene.camera.center", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/center/_y.py b/plotly/validators/layout/scene/camera/center/_y.py index 77b0b00343..a400715475 100644 --- a/plotly/validators/layout/scene/camera/center/_y.py +++ b/plotly/validators/layout/scene/camera/center/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="layout.scene.camera.center", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/center/_z.py b/plotly/validators/layout/scene/camera/center/_z.py index c07c970649..0957139a44 100644 --- a/plotly/validators/layout/scene/camera/center/_z.py +++ b/plotly/validators/layout/scene/camera/center/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__( self, plotly_name="z", parent_name="layout.scene.camera.center", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/eye/__init__.py b/plotly/validators/layout/scene/camera/eye/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/layout/scene/camera/eye/__init__.py +++ b/plotly/validators/layout/scene/camera/eye/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/layout/scene/camera/eye/_x.py b/plotly/validators/layout/scene/camera/eye/_x.py index bf7b62c1a7..415de0704d 100644 --- a/plotly/validators/layout/scene/camera/eye/_x.py +++ b/plotly/validators/layout/scene/camera/eye/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="layout.scene.camera.eye", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/eye/_y.py b/plotly/validators/layout/scene/camera/eye/_y.py index 354f6a730a..54a0cf6ed5 100644 --- a/plotly/validators/layout/scene/camera/eye/_y.py +++ b/plotly/validators/layout/scene/camera/eye/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="layout.scene.camera.eye", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/eye/_z.py b/plotly/validators/layout/scene/camera/eye/_z.py index df5c521363..ff9c92bdd7 100644 --- a/plotly/validators/layout/scene/camera/eye/_z.py +++ b/plotly/validators/layout/scene/camera/eye/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__( self, plotly_name="z", parent_name="layout.scene.camera.eye", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/projection/__init__.py b/plotly/validators/layout/scene/camera/projection/__init__.py index 6026c0dbbb..9b57e2a353 100644 --- a/plotly/validators/layout/scene/camera/projection/__init__.py +++ b/plotly/validators/layout/scene/camera/projection/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._type import TypeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._type.TypeValidator"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._type.TypeValidator"]) diff --git a/plotly/validators/layout/scene/camera/projection/_type.py b/plotly/validators/layout/scene/camera/projection/_type.py index b8de48c716..4ec9a73a4e 100644 --- a/plotly/validators/layout/scene/camera/projection/_type.py +++ b/plotly/validators/layout/scene/camera/projection/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="layout.scene.camera.projection", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["perspective", "orthographic"]), **kwargs, diff --git a/plotly/validators/layout/scene/camera/up/__init__.py b/plotly/validators/layout/scene/camera/up/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/layout/scene/camera/up/__init__.py +++ b/plotly/validators/layout/scene/camera/up/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/layout/scene/camera/up/_x.py b/plotly/validators/layout/scene/camera/up/_x.py index 548c33de84..e990a7e94e 100644 --- a/plotly/validators/layout/scene/camera/up/_x.py +++ b/plotly/validators/layout/scene/camera/up/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="layout.scene.camera.up", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/up/_y.py b/plotly/validators/layout/scene/camera/up/_y.py index 9590845b86..95e8ee89a7 100644 --- a/plotly/validators/layout/scene/camera/up/_y.py +++ b/plotly/validators/layout/scene/camera/up/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="layout.scene.camera.up", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/camera/up/_z.py b/plotly/validators/layout/scene/camera/up/_z.py index b75f7e5d14..5a54c6ce50 100644 --- a/plotly/validators/layout/scene/camera/up/_z.py +++ b/plotly/validators/layout/scene/camera/up/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__(self, plotly_name="z", parent_name="layout.scene.camera.up", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "camera"), **kwargs, ) diff --git a/plotly/validators/layout/scene/domain/__init__.py b/plotly/validators/layout/scene/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/scene/domain/__init__.py +++ b/plotly/validators/layout/scene/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/scene/domain/_column.py b/plotly/validators/layout/scene/domain/_column.py index eb7db69118..19d9f83036 100644 --- a/plotly/validators/layout/scene/domain/_column.py +++ b/plotly/validators/layout/scene/domain/_column.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.scene.domain", **kwargs ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/domain/_row.py b/plotly/validators/layout/scene/domain/_row.py index d9e0366e33..4153e9bd95 100644 --- a/plotly/validators/layout/scene/domain/_row.py +++ b/plotly/validators/layout/scene/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.scene.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/domain/_x.py b/plotly/validators/layout/scene/domain/_x.py index 2e64d1ed5f..34dacfefbc 100644 --- a/plotly/validators/layout/scene/domain/_x.py +++ b/plotly/validators/layout/scene/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.scene.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/scene/domain/_y.py b/plotly/validators/layout/scene/domain/_y.py index ea79ee5105..356d18edcc 100644 --- a/plotly/validators/layout/scene/domain/_y.py +++ b/plotly/validators/layout/scene/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.scene.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/scene/xaxis/__init__.py b/plotly/validators/layout/scene/xaxis/__init__.py index b95df1031f..df86998dd2 100644 --- a/plotly/validators/layout/scene/xaxis/__init__.py +++ b/plotly/validators/layout/scene/xaxis/__init__.py @@ -1,133 +1,69 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zerolinewidth import ZerolinewidthValidator - from ._zerolinecolor import ZerolinecolorValidator - from ._zeroline import ZerolineValidator - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._spikethickness import SpikethicknessValidator - from ._spikesides import SpikesidesValidator - from ._spikecolor import SpikecolorValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showspikes import ShowspikesValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._showbackground import ShowbackgroundValidator - from ._showaxeslabels import ShowaxeslabelsValidator - from ._separatethousands import SeparatethousandsValidator - from ._rangemode import RangemodeValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._mirror import MirrorValidator - from ._minexponent import MinexponentValidator - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._calendar import CalendarValidator - from ._backgroundcolor import BackgroundcolorValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autorangeoptions import AutorangeoptionsValidator - from ._autorange import AutorangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zerolinewidth.ZerolinewidthValidator", - "._zerolinecolor.ZerolinecolorValidator", - "._zeroline.ZerolineValidator", - "._visible.VisibleValidator", - "._type.TypeValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._spikethickness.SpikethicknessValidator", - "._spikesides.SpikesidesValidator", - "._spikecolor.SpikecolorValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showspikes.ShowspikesValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._showbackground.ShowbackgroundValidator", - "._showaxeslabels.ShowaxeslabelsValidator", - "._separatethousands.SeparatethousandsValidator", - "._rangemode.RangemodeValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._mirror.MirrorValidator", - "._minexponent.MinexponentValidator", - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._calendar.CalendarValidator", - "._backgroundcolor.BackgroundcolorValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autorangeoptions.AutorangeoptionsValidator", - "._autorange.AutorangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesides.SpikesidesValidator", + "._spikecolor.SpikecolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showbackground.ShowbackgroundValidator", + "._showaxeslabels.ShowaxeslabelsValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._minexponent.MinexponentValidator", + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._backgroundcolor.BackgroundcolorValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autorangeoptions.AutorangeoptionsValidator", + "._autorange.AutorangeValidator", + ], +) diff --git a/plotly/validators/layout/scene/xaxis/_autorange.py b/plotly/validators/layout/scene/xaxis/_autorange.py index 4db777e8f6..4a440f5c49 100644 --- a/plotly/validators/layout/scene/xaxis/_autorange.py +++ b/plotly/validators/layout/scene/xaxis/_autorange.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autorange", parent_name="layout.scene.xaxis", **kwargs ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop( diff --git a/plotly/validators/layout/scene/xaxis/_autorangeoptions.py b/plotly/validators/layout/scene/xaxis/_autorangeoptions.py index 36221c5c5d..33b7dfad41 100644 --- a/plotly/validators/layout/scene/xaxis/_autorangeoptions.py +++ b/plotly/validators/layout/scene/xaxis/_autorangeoptions.py @@ -1,34 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AutorangeoptionsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.scene.xaxis", **kwargs ): - super(AutorangeoptionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Autorangeoptions"), data_docs=kwargs.pop( "data_docs", """ - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_autotypenumbers.py b/plotly/validators/layout/scene/xaxis/_autotypenumbers.py index ac85e997c6..2284738afa 100644 --- a/plotly/validators/layout/scene/xaxis/_autotypenumbers.py +++ b/plotly/validators/layout/scene/xaxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.scene.xaxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_backgroundcolor.py b/plotly/validators/layout/scene/xaxis/_backgroundcolor.py index 49f934fef6..0ac6099800 100644 --- a/plotly/validators/layout/scene/xaxis/_backgroundcolor.py +++ b/plotly/validators/layout/scene/xaxis/_backgroundcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BackgroundcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="backgroundcolor", parent_name="layout.scene.xaxis", **kwargs ): - super(BackgroundcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_calendar.py b/plotly/validators/layout/scene/xaxis/_calendar.py index af0c3149ee..81360e8e48 100644 --- a/plotly/validators/layout/scene/xaxis/_calendar.py +++ b/plotly/validators/layout/scene/xaxis/_calendar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="calendar", parent_name="layout.scene.xaxis", **kwargs ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/xaxis/_categoryarray.py b/plotly/validators/layout/scene/xaxis/_categoryarray.py index 3f6b2e946d..4330acacaa 100644 --- a/plotly/validators/layout/scene/xaxis/_categoryarray.py +++ b/plotly/validators/layout/scene/xaxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.scene.xaxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py b/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py index aa19e3b3b3..e86b02e580 100644 --- a/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/scene/xaxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.scene.xaxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_categoryorder.py b/plotly/validators/layout/scene/xaxis/_categoryorder.py index 0f97993453..f2fc7c3cdd 100644 --- a/plotly/validators/layout/scene/xaxis/_categoryorder.py +++ b/plotly/validators/layout/scene/xaxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.scene.xaxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/xaxis/_color.py b/plotly/validators/layout/scene/xaxis/_color.py index ef4dd8794f..cd623e9c89 100644 --- a/plotly/validators/layout/scene/xaxis/_color.py +++ b/plotly/validators/layout/scene/xaxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.scene.xaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_dtick.py b/plotly/validators/layout/scene/xaxis/_dtick.py index b169b04cb8..7fd127802c 100644 --- a/plotly/validators/layout/scene/xaxis/_dtick.py +++ b/plotly/validators/layout/scene/xaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.scene.xaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_exponentformat.py b/plotly/validators/layout/scene/xaxis/_exponentformat.py index 52ef25e76d..f8d9473c64 100644 --- a/plotly/validators/layout/scene/xaxis/_exponentformat.py +++ b/plotly/validators/layout/scene/xaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.scene.xaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_gridcolor.py b/plotly/validators/layout/scene/xaxis/_gridcolor.py index ce7e423c07..96c9726762 100644 --- a/plotly/validators/layout/scene/xaxis/_gridcolor.py +++ b/plotly/validators/layout/scene/xaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.scene.xaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_gridwidth.py b/plotly/validators/layout/scene/xaxis/_gridwidth.py index 98a3ce40a1..30f9533392 100644 --- a/plotly/validators/layout/scene/xaxis/_gridwidth.py +++ b/plotly/validators/layout/scene/xaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.scene.xaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_hoverformat.py b/plotly/validators/layout/scene/xaxis/_hoverformat.py index 7938e32a63..2f9a0c704d 100644 --- a/plotly/validators/layout/scene/xaxis/_hoverformat.py +++ b/plotly/validators/layout/scene/xaxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.scene.xaxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_labelalias.py b/plotly/validators/layout/scene/xaxis/_labelalias.py index 4f5ad3e47f..c1e1103f41 100644 --- a/plotly/validators/layout/scene/xaxis/_labelalias.py +++ b/plotly/validators/layout/scene/xaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.scene.xaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_linecolor.py b/plotly/validators/layout/scene/xaxis/_linecolor.py index c89c320a51..0d6f5c23b9 100644 --- a/plotly/validators/layout/scene/xaxis/_linecolor.py +++ b/plotly/validators/layout/scene/xaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.scene.xaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_linewidth.py b/plotly/validators/layout/scene/xaxis/_linewidth.py index aff9785505..c3781e0694 100644 --- a/plotly/validators/layout/scene/xaxis/_linewidth.py +++ b/plotly/validators/layout/scene/xaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.scene.xaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_maxallowed.py b/plotly/validators/layout/scene/xaxis/_maxallowed.py index 30d6bed1de..f19e393860 100644 --- a/plotly/validators/layout/scene/xaxis/_maxallowed.py +++ b/plotly/validators/layout/scene/xaxis/_maxallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.xaxis", **kwargs ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_minallowed.py b/plotly/validators/layout/scene/xaxis/_minallowed.py index 1458314ff1..4831cf91b6 100644 --- a/plotly/validators/layout/scene/xaxis/_minallowed.py +++ b/plotly/validators/layout/scene/xaxis/_minallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.xaxis", **kwargs ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_minexponent.py b/plotly/validators/layout/scene/xaxis/_minexponent.py index afb277bcfd..5950cefb00 100644 --- a/plotly/validators/layout/scene/xaxis/_minexponent.py +++ b/plotly/validators/layout/scene/xaxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.scene.xaxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_mirror.py b/plotly/validators/layout/scene/xaxis/_mirror.py index a8fef0830f..b5ba1dad34 100644 --- a/plotly/validators/layout/scene/xaxis/_mirror.py +++ b/plotly/validators/layout/scene/xaxis/_mirror.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MirrorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="mirror", parent_name="layout.scene.xaxis", **kwargs ): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_nticks.py b/plotly/validators/layout/scene/xaxis/_nticks.py index ad37185c09..3499decc3f 100644 --- a/plotly/validators/layout/scene/xaxis/_nticks.py +++ b/plotly/validators/layout/scene/xaxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.scene.xaxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_range.py b/plotly/validators/layout/scene/xaxis/_range.py index 2d4dd0b133..7139348c8c 100644 --- a/plotly/validators/layout/scene/xaxis/_range.py +++ b/plotly/validators/layout/scene/xaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.scene.xaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", False), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), diff --git a/plotly/validators/layout/scene/xaxis/_rangemode.py b/plotly/validators/layout/scene/xaxis/_rangemode.py index 0ab362ab2e..4cd0c0fd97 100644 --- a/plotly/validators/layout/scene/xaxis/_rangemode.py +++ b/plotly/validators/layout/scene/xaxis/_rangemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="rangemode", parent_name="layout.scene.xaxis", **kwargs ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_separatethousands.py b/plotly/validators/layout/scene/xaxis/_separatethousands.py index 654921c23d..7b67290593 100644 --- a/plotly/validators/layout/scene/xaxis/_separatethousands.py +++ b/plotly/validators/layout/scene/xaxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.scene.xaxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showaxeslabels.py b/plotly/validators/layout/scene/xaxis/_showaxeslabels.py index 0d22803a68..02e19423a1 100644 --- a/plotly/validators/layout/scene/xaxis/_showaxeslabels.py +++ b/plotly/validators/layout/scene/xaxis/_showaxeslabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowaxeslabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showaxeslabels", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowaxeslabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showbackground.py b/plotly/validators/layout/scene/xaxis/_showbackground.py index 11809bb185..752434bdee 100644 --- a/plotly/validators/layout/scene/xaxis/_showbackground.py +++ b/plotly/validators/layout/scene/xaxis/_showbackground.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowbackgroundValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showbackground", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowbackgroundValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showexponent.py b/plotly/validators/layout/scene/xaxis/_showexponent.py index ed5e756e81..cb14650d44 100644 --- a/plotly/validators/layout/scene/xaxis/_showexponent.py +++ b/plotly/validators/layout/scene/xaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_showgrid.py b/plotly/validators/layout/scene/xaxis/_showgrid.py index 104a8c5ca3..caef15eee8 100644 --- a/plotly/validators/layout/scene/xaxis/_showgrid.py +++ b/plotly/validators/layout/scene/xaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showline.py b/plotly/validators/layout/scene/xaxis/_showline.py index 0bbbca65a1..67a3017b69 100644 --- a/plotly/validators/layout/scene/xaxis/_showline.py +++ b/plotly/validators/layout/scene/xaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showspikes.py b/plotly/validators/layout/scene/xaxis/_showspikes.py index 82bbc4aad1..50f917190e 100644 --- a/plotly/validators/layout/scene/xaxis/_showspikes.py +++ b/plotly/validators/layout/scene/xaxis/_showspikes.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowspikesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showspikes", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showticklabels.py b/plotly/validators/layout/scene/xaxis/_showticklabels.py index 66c911af79..68ec111488 100644 --- a/plotly/validators/layout/scene/xaxis/_showticklabels.py +++ b/plotly/validators/layout/scene/xaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_showtickprefix.py b/plotly/validators/layout/scene/xaxis/_showtickprefix.py index 41d4adef7b..42fc892e62 100644 --- a/plotly/validators/layout/scene/xaxis/_showtickprefix.py +++ b/plotly/validators/layout/scene/xaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_showticksuffix.py b/plotly/validators/layout/scene/xaxis/_showticksuffix.py index c6368eac21..d0b727677f 100644 --- a/plotly/validators/layout/scene/xaxis/_showticksuffix.py +++ b/plotly/validators/layout/scene/xaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.scene.xaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_spikecolor.py b/plotly/validators/layout/scene/xaxis/_spikecolor.py index e8e2d72bec..30e1f22c9f 100644 --- a/plotly/validators/layout/scene/xaxis/_spikecolor.py +++ b/plotly/validators/layout/scene/xaxis/_spikecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SpikecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="spikecolor", parent_name="layout.scene.xaxis", **kwargs ): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_spikesides.py b/plotly/validators/layout/scene/xaxis/_spikesides.py index 5ffda40399..9ff0ff2864 100644 --- a/plotly/validators/layout/scene/xaxis/_spikesides.py +++ b/plotly/validators/layout/scene/xaxis/_spikesides.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): +class SpikesidesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="spikesides", parent_name="layout.scene.xaxis", **kwargs ): - super(SpikesidesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_spikethickness.py b/plotly/validators/layout/scene/xaxis/_spikethickness.py index 0fd134fec6..333374cbc6 100644 --- a/plotly/validators/layout/scene/xaxis/_spikethickness.py +++ b/plotly/validators/layout/scene/xaxis/_spikethickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class SpikethicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="spikethickness", parent_name="layout.scene.xaxis", **kwargs ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_tick0.py b/plotly/validators/layout/scene/xaxis/_tick0.py index 6e9c7e7277..513488afb7 100644 --- a/plotly/validators/layout/scene/xaxis/_tick0.py +++ b/plotly/validators/layout/scene/xaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.scene.xaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_tickangle.py b/plotly/validators/layout/scene/xaxis/_tickangle.py index be84ada434..d7e02533cb 100644 --- a/plotly/validators/layout/scene/xaxis/_tickangle.py +++ b/plotly/validators/layout/scene/xaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.scene.xaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_tickcolor.py b/plotly/validators/layout/scene/xaxis/_tickcolor.py index 1e895f54ee..bd33b358ba 100644 --- a/plotly/validators/layout/scene/xaxis/_tickcolor.py +++ b/plotly/validators/layout/scene/xaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.scene.xaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_tickfont.py b/plotly/validators/layout/scene/xaxis/_tickfont.py index 4d8eccd015..b554784aac 100644 --- a/plotly/validators/layout/scene/xaxis/_tickfont.py +++ b/plotly/validators/layout/scene/xaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.scene.xaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_tickformat.py b/plotly/validators/layout/scene/xaxis/_tickformat.py index 662684d39b..d46609be6c 100644 --- a/plotly/validators/layout/scene/xaxis/_tickformat.py +++ b/plotly/validators/layout/scene/xaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.scene.xaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py b/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py index 9d1675d888..0f1293e082 100644 --- a/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/scene/xaxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.scene.xaxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/scene/xaxis/_tickformatstops.py b/plotly/validators/layout/scene/xaxis/_tickformatstops.py index 12c5b5c046..852321ca8b 100644 --- a/plotly/validators/layout/scene/xaxis/_tickformatstops.py +++ b/plotly/validators/layout/scene/xaxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.scene.xaxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_ticklen.py b/plotly/validators/layout/scene/xaxis/_ticklen.py index e9830f4d3e..b1f9eb21a9 100644 --- a/plotly/validators/layout/scene/xaxis/_ticklen.py +++ b/plotly/validators/layout/scene/xaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.scene.xaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_tickmode.py b/plotly/validators/layout/scene/xaxis/_tickmode.py index d96292ff30..2dfba7998e 100644 --- a/plotly/validators/layout/scene/xaxis/_tickmode.py +++ b/plotly/validators/layout/scene/xaxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.scene.xaxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/scene/xaxis/_tickprefix.py b/plotly/validators/layout/scene/xaxis/_tickprefix.py index 7991ec162f..e32893d41e 100644 --- a/plotly/validators/layout/scene/xaxis/_tickprefix.py +++ b/plotly/validators/layout/scene/xaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.scene.xaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_ticks.py b/plotly/validators/layout/scene/xaxis/_ticks.py index fb8e288718..e0457ed2ba 100644 --- a/plotly/validators/layout/scene/xaxis/_ticks.py +++ b/plotly/validators/layout/scene/xaxis/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.scene.xaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_ticksuffix.py b/plotly/validators/layout/scene/xaxis/_ticksuffix.py index 5f91ca042e..2ec1fda26e 100644 --- a/plotly/validators/layout/scene/xaxis/_ticksuffix.py +++ b/plotly/validators/layout/scene/xaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.scene.xaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_ticktext.py b/plotly/validators/layout/scene/xaxis/_ticktext.py index 60b51bb036..c2f8822b10 100644 --- a/plotly/validators/layout/scene/xaxis/_ticktext.py +++ b/plotly/validators/layout/scene/xaxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.scene.xaxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_ticktextsrc.py b/plotly/validators/layout/scene/xaxis/_ticktextsrc.py index 1288b9e830..72eeb02226 100644 --- a/plotly/validators/layout/scene/xaxis/_ticktextsrc.py +++ b/plotly/validators/layout/scene/xaxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.scene.xaxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_tickvals.py b/plotly/validators/layout/scene/xaxis/_tickvals.py index c22ff8cb0d..966ffa3503 100644 --- a/plotly/validators/layout/scene/xaxis/_tickvals.py +++ b/plotly/validators/layout/scene/xaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.scene.xaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_tickvalssrc.py b/plotly/validators/layout/scene/xaxis/_tickvalssrc.py index 2c47be974c..91b8c24b02 100644 --- a/plotly/validators/layout/scene/xaxis/_tickvalssrc.py +++ b/plotly/validators/layout/scene/xaxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.scene.xaxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_tickwidth.py b/plotly/validators/layout/scene/xaxis/_tickwidth.py index 8fdc2dad1e..3172154e1b 100644 --- a/plotly/validators/layout/scene/xaxis/_tickwidth.py +++ b/plotly/validators/layout/scene/xaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.scene.xaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_title.py b/plotly/validators/layout/scene/xaxis/_title.py index 643bdc8875..21c8efdc0f 100644 --- a/plotly/validators/layout/scene/xaxis/_title.py +++ b/plotly/validators/layout/scene/xaxis/_title.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout.scene.xaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_type.py b/plotly/validators/layout/scene/xaxis/_type.py index a26964bbd7..407d37451f 100644 --- a/plotly/validators/layout/scene/xaxis/_type.py +++ b/plotly/validators/layout/scene/xaxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.scene.xaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/_visible.py b/plotly/validators/layout/scene/xaxis/_visible.py index 775cd5d863..eebd4421ca 100644 --- a/plotly/validators/layout/scene/xaxis/_visible.py +++ b/plotly/validators/layout/scene/xaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.scene.xaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_zeroline.py b/plotly/validators/layout/scene/xaxis/_zeroline.py index 69b5ee5dec..d576bfb09b 100644 --- a/plotly/validators/layout/scene/xaxis/_zeroline.py +++ b/plotly/validators/layout/scene/xaxis/_zeroline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZerolineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="zeroline", parent_name="layout.scene.xaxis", **kwargs ): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_zerolinecolor.py b/plotly/validators/layout/scene/xaxis/_zerolinecolor.py index 2df493ed37..664cc5ab01 100644 --- a/plotly/validators/layout/scene/xaxis/_zerolinecolor.py +++ b/plotly/validators/layout/scene/xaxis/_zerolinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ZerolinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="zerolinecolor", parent_name="layout.scene.xaxis", **kwargs ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/_zerolinewidth.py b/plotly/validators/layout/scene/xaxis/_zerolinewidth.py index 70ffee536b..afd7112dfe 100644 --- a/plotly/validators/layout/scene/xaxis/_zerolinewidth.py +++ b/plotly/validators/layout/scene/xaxis/_zerolinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ZerolinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="zerolinewidth", parent_name="layout.scene.xaxis", **kwargs ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/__init__.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/__init__.py index 701f84c04e..8ef0b74165 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/__init__.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._includesrc import IncludesrcValidator - from ._include import IncludeValidator - from ._clipmin import ClipminValidator - from ._clipmax import ClipmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._includesrc.IncludesrcValidator", - "._include.IncludeValidator", - "._clipmin.ClipminValidator", - "._clipmax.ClipmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._includesrc.IncludesrcValidator", + "._include.IncludeValidator", + "._clipmin.ClipminValidator", + "._clipmax.ClipmaxValidator", + ], +) diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmax.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmax.py index d3528a7a12..e93553ed19 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmax.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmax.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipmaxValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipmaxValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmax", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): - super(ClipmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmin.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmin.py index 3c45a58fe2..07f0c95b35 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmin.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/_clipmin.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipminValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipminValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmin", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): - super(ClipminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/_include.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/_include.py index 3382cb7702..9abec01572 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/_include.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/_include.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): +class IncludeValidator(_bv.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): - super(IncludeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/_includesrc.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/_includesrc.py index 9d396fc441..c56162551d 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/_includesrc.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/_includesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IncludesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="includesrc", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): - super(IncludesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/_maxallowed.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/_maxallowed.py index 533cd8b44c..0604b8e702 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/_maxallowed.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/_maxallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/autorangeoptions/_minallowed.py b/plotly/validators/layout/scene/xaxis/autorangeoptions/_minallowed.py index 66f8bab108..c04103aa7c 100644 --- a/plotly/validators/layout/scene/xaxis/autorangeoptions/_minallowed.py +++ b/plotly/validators/layout/scene/xaxis/autorangeoptions/_minallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.xaxis.autorangeoptions", **kwargs, ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/tickfont/__init__.py b/plotly/validators/layout/scene/xaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/__init__.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_color.py b/plotly/validators/layout/scene/xaxis/tickfont/_color.py index de62e0132f..661b14f522 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_color.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_family.py b/plotly/validators/layout/scene/xaxis/tickfont/_family.py index 3bc2625326..f5c8591e9d 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_family.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_lineposition.py b/plotly/validators/layout/scene/xaxis/tickfont/_lineposition.py index ff296cf8ec..52b3258af2 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.xaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_shadow.py b/plotly/validators/layout/scene/xaxis/tickfont/_shadow.py index ab92c4fc0e..1fa0e5247c 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_size.py b/plotly/validators/layout/scene/xaxis/tickfont/_size.py index 8844599f39..f8ca20225b 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_size.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_style.py b/plotly/validators/layout/scene/xaxis/tickfont/_style.py index 46397ee8c2..517e1fa691 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_style.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_textcase.py b/plotly/validators/layout/scene/xaxis/tickfont/_textcase.py index 19cd704f54..548bb790ed 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.xaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_variant.py b/plotly/validators/layout/scene/xaxis/tickfont/_variant.py index 77bb687768..bdc9b4f37d 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_variant.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/xaxis/tickfont/_weight.py b/plotly/validators/layout/scene/xaxis/tickfont/_weight.py index 08ff3be1fb..7d82ccfc10 100644 --- a/plotly/validators/layout/scene/xaxis/tickfont/_weight.py +++ b/plotly/validators/layout/scene/xaxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.xaxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py b/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/scene/xaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py index f6d66f1575..c4623bb9cd 100644 --- a/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/scene/xaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.scene.xaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py b/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py index 921cf3da87..a74f531bd8 100644 --- a/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/scene/xaxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.scene.xaxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py b/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py index 8ebeff5eef..91173b2177 100644 --- a/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/scene/xaxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.scene.xaxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py index f810dbf4f2..339c6acdc3 100644 --- a/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/scene/xaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.scene.xaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py b/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py index b31129cdff..aba8b0f3df 100644 --- a/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/scene/xaxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.scene.xaxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/title/__init__.py b/plotly/validators/layout/scene/xaxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/scene/xaxis/title/__init__.py +++ b/plotly/validators/layout/scene/xaxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/scene/xaxis/title/_font.py b/plotly/validators/layout/scene/xaxis/title/_font.py index 0b5745a9eb..93d4cc7a74 100644 --- a/plotly/validators/layout/scene/xaxis/title/_font.py +++ b/plotly/validators/layout/scene/xaxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.scene.xaxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/title/_text.py b/plotly/validators/layout/scene/xaxis/title/_text.py index 7055f4b291..13b3374af2 100644 --- a/plotly/validators/layout/scene/xaxis/title/_text.py +++ b/plotly/validators/layout/scene/xaxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.scene.xaxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/title/font/__init__.py b/plotly/validators/layout/scene/xaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/__init__.py +++ b/plotly/validators/layout/scene/xaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/xaxis/title/font/_color.py b/plotly/validators/layout/scene/xaxis/title/font/_color.py index 5bd4f83a4b..01d38f4322 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_color.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.xaxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/title/font/_family.py b/plotly/validators/layout/scene/xaxis/title/font/_family.py index f8681f0c22..3dfe86f3d8 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_family.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.xaxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/xaxis/title/font/_lineposition.py b/plotly/validators/layout/scene/xaxis/title/font/_lineposition.py index 9e0f7ad642..8f1cf4223d 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.xaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/xaxis/title/font/_shadow.py b/plotly/validators/layout/scene/xaxis/title/font/_shadow.py index bb869fc442..860404e778 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_shadow.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.xaxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/xaxis/title/font/_size.py b/plotly/validators/layout/scene/xaxis/title/font/_size.py index f77a0536f2..83f5a8fec9 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_size.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.xaxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/title/font/_style.py b/plotly/validators/layout/scene/xaxis/title/font/_style.py index cec38e9520..9391230530 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_style.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.xaxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/title/font/_textcase.py b/plotly/validators/layout/scene/xaxis/title/font/_textcase.py index df0e0ed4ab..4ae83e4a14 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_textcase.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.xaxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/xaxis/title/font/_variant.py b/plotly/validators/layout/scene/xaxis/title/font/_variant.py index 911bdf5b7c..a5a0e98d74 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_variant.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.xaxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/xaxis/title/font/_weight.py b/plotly/validators/layout/scene/xaxis/title/font/_weight.py index d7e6c9a44a..78d9e784e7 100644 --- a/plotly/validators/layout/scene/xaxis/title/font/_weight.py +++ b/plotly/validators/layout/scene/xaxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.xaxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/yaxis/__init__.py b/plotly/validators/layout/scene/yaxis/__init__.py index b95df1031f..df86998dd2 100644 --- a/plotly/validators/layout/scene/yaxis/__init__.py +++ b/plotly/validators/layout/scene/yaxis/__init__.py @@ -1,133 +1,69 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zerolinewidth import ZerolinewidthValidator - from ._zerolinecolor import ZerolinecolorValidator - from ._zeroline import ZerolineValidator - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._spikethickness import SpikethicknessValidator - from ._spikesides import SpikesidesValidator - from ._spikecolor import SpikecolorValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showspikes import ShowspikesValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._showbackground import ShowbackgroundValidator - from ._showaxeslabels import ShowaxeslabelsValidator - from ._separatethousands import SeparatethousandsValidator - from ._rangemode import RangemodeValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._mirror import MirrorValidator - from ._minexponent import MinexponentValidator - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._calendar import CalendarValidator - from ._backgroundcolor import BackgroundcolorValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autorangeoptions import AutorangeoptionsValidator - from ._autorange import AutorangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zerolinewidth.ZerolinewidthValidator", - "._zerolinecolor.ZerolinecolorValidator", - "._zeroline.ZerolineValidator", - "._visible.VisibleValidator", - "._type.TypeValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._spikethickness.SpikethicknessValidator", - "._spikesides.SpikesidesValidator", - "._spikecolor.SpikecolorValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showspikes.ShowspikesValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._showbackground.ShowbackgroundValidator", - "._showaxeslabels.ShowaxeslabelsValidator", - "._separatethousands.SeparatethousandsValidator", - "._rangemode.RangemodeValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._mirror.MirrorValidator", - "._minexponent.MinexponentValidator", - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._calendar.CalendarValidator", - "._backgroundcolor.BackgroundcolorValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autorangeoptions.AutorangeoptionsValidator", - "._autorange.AutorangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesides.SpikesidesValidator", + "._spikecolor.SpikecolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showbackground.ShowbackgroundValidator", + "._showaxeslabels.ShowaxeslabelsValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._minexponent.MinexponentValidator", + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._backgroundcolor.BackgroundcolorValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autorangeoptions.AutorangeoptionsValidator", + "._autorange.AutorangeValidator", + ], +) diff --git a/plotly/validators/layout/scene/yaxis/_autorange.py b/plotly/validators/layout/scene/yaxis/_autorange.py index 35e17654d6..4f101e17bd 100644 --- a/plotly/validators/layout/scene/yaxis/_autorange.py +++ b/plotly/validators/layout/scene/yaxis/_autorange.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autorange", parent_name="layout.scene.yaxis", **kwargs ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop( diff --git a/plotly/validators/layout/scene/yaxis/_autorangeoptions.py b/plotly/validators/layout/scene/yaxis/_autorangeoptions.py index d35a13f006..1d82995cce 100644 --- a/plotly/validators/layout/scene/yaxis/_autorangeoptions.py +++ b/plotly/validators/layout/scene/yaxis/_autorangeoptions.py @@ -1,34 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AutorangeoptionsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.scene.yaxis", **kwargs ): - super(AutorangeoptionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Autorangeoptions"), data_docs=kwargs.pop( "data_docs", """ - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_autotypenumbers.py b/plotly/validators/layout/scene/yaxis/_autotypenumbers.py index 80142732ec..afba5f9676 100644 --- a/plotly/validators/layout/scene/yaxis/_autotypenumbers.py +++ b/plotly/validators/layout/scene/yaxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.scene.yaxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_backgroundcolor.py b/plotly/validators/layout/scene/yaxis/_backgroundcolor.py index 96993ff2e4..cffa92f0a6 100644 --- a/plotly/validators/layout/scene/yaxis/_backgroundcolor.py +++ b/plotly/validators/layout/scene/yaxis/_backgroundcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BackgroundcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="backgroundcolor", parent_name="layout.scene.yaxis", **kwargs ): - super(BackgroundcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_calendar.py b/plotly/validators/layout/scene/yaxis/_calendar.py index 9f58f65ad4..cac95ca4bb 100644 --- a/plotly/validators/layout/scene/yaxis/_calendar.py +++ b/plotly/validators/layout/scene/yaxis/_calendar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="calendar", parent_name="layout.scene.yaxis", **kwargs ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/yaxis/_categoryarray.py b/plotly/validators/layout/scene/yaxis/_categoryarray.py index 18d06322fb..d3d87c2f6a 100644 --- a/plotly/validators/layout/scene/yaxis/_categoryarray.py +++ b/plotly/validators/layout/scene/yaxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.scene.yaxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py b/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py index bee1b8f6ea..8dbb256bf0 100644 --- a/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/scene/yaxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.scene.yaxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_categoryorder.py b/plotly/validators/layout/scene/yaxis/_categoryorder.py index 72e8569594..f587b7ac60 100644 --- a/plotly/validators/layout/scene/yaxis/_categoryorder.py +++ b/plotly/validators/layout/scene/yaxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.scene.yaxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/yaxis/_color.py b/plotly/validators/layout/scene/yaxis/_color.py index 995fa472d5..252beb5ecc 100644 --- a/plotly/validators/layout/scene/yaxis/_color.py +++ b/plotly/validators/layout/scene/yaxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.scene.yaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_dtick.py b/plotly/validators/layout/scene/yaxis/_dtick.py index 93e6cb7fa1..3085115275 100644 --- a/plotly/validators/layout/scene/yaxis/_dtick.py +++ b/plotly/validators/layout/scene/yaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.scene.yaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_exponentformat.py b/plotly/validators/layout/scene/yaxis/_exponentformat.py index 5f205f9a25..4f01757c3e 100644 --- a/plotly/validators/layout/scene/yaxis/_exponentformat.py +++ b/plotly/validators/layout/scene/yaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.scene.yaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_gridcolor.py b/plotly/validators/layout/scene/yaxis/_gridcolor.py index e92ab3ec3c..14effc73b2 100644 --- a/plotly/validators/layout/scene/yaxis/_gridcolor.py +++ b/plotly/validators/layout/scene/yaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.scene.yaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_gridwidth.py b/plotly/validators/layout/scene/yaxis/_gridwidth.py index d75a6752a1..7f50fca276 100644 --- a/plotly/validators/layout/scene/yaxis/_gridwidth.py +++ b/plotly/validators/layout/scene/yaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.scene.yaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_hoverformat.py b/plotly/validators/layout/scene/yaxis/_hoverformat.py index 6159b11f83..4d563bee16 100644 --- a/plotly/validators/layout/scene/yaxis/_hoverformat.py +++ b/plotly/validators/layout/scene/yaxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.scene.yaxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_labelalias.py b/plotly/validators/layout/scene/yaxis/_labelalias.py index 934c0e8d82..48972bb743 100644 --- a/plotly/validators/layout/scene/yaxis/_labelalias.py +++ b/plotly/validators/layout/scene/yaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.scene.yaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_linecolor.py b/plotly/validators/layout/scene/yaxis/_linecolor.py index 0968766135..7f9b246031 100644 --- a/plotly/validators/layout/scene/yaxis/_linecolor.py +++ b/plotly/validators/layout/scene/yaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.scene.yaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_linewidth.py b/plotly/validators/layout/scene/yaxis/_linewidth.py index 328611453f..ebf2195a4d 100644 --- a/plotly/validators/layout/scene/yaxis/_linewidth.py +++ b/plotly/validators/layout/scene/yaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.scene.yaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_maxallowed.py b/plotly/validators/layout/scene/yaxis/_maxallowed.py index 98055a2ef8..c209b391cf 100644 --- a/plotly/validators/layout/scene/yaxis/_maxallowed.py +++ b/plotly/validators/layout/scene/yaxis/_maxallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.yaxis", **kwargs ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_minallowed.py b/plotly/validators/layout/scene/yaxis/_minallowed.py index 7912d25c73..ad4844b422 100644 --- a/plotly/validators/layout/scene/yaxis/_minallowed.py +++ b/plotly/validators/layout/scene/yaxis/_minallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.yaxis", **kwargs ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_minexponent.py b/plotly/validators/layout/scene/yaxis/_minexponent.py index 0e605aa6ec..700c110237 100644 --- a/plotly/validators/layout/scene/yaxis/_minexponent.py +++ b/plotly/validators/layout/scene/yaxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.scene.yaxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_mirror.py b/plotly/validators/layout/scene/yaxis/_mirror.py index e2bae9b38a..07f181d8e9 100644 --- a/plotly/validators/layout/scene/yaxis/_mirror.py +++ b/plotly/validators/layout/scene/yaxis/_mirror.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MirrorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="mirror", parent_name="layout.scene.yaxis", **kwargs ): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_nticks.py b/plotly/validators/layout/scene/yaxis/_nticks.py index 08b2814496..116a2c9e77 100644 --- a/plotly/validators/layout/scene/yaxis/_nticks.py +++ b/plotly/validators/layout/scene/yaxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.scene.yaxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_range.py b/plotly/validators/layout/scene/yaxis/_range.py index c4851f5514..971af478bb 100644 --- a/plotly/validators/layout/scene/yaxis/_range.py +++ b/plotly/validators/layout/scene/yaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.scene.yaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", False), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), diff --git a/plotly/validators/layout/scene/yaxis/_rangemode.py b/plotly/validators/layout/scene/yaxis/_rangemode.py index c370a8d09b..ff9938aabe 100644 --- a/plotly/validators/layout/scene/yaxis/_rangemode.py +++ b/plotly/validators/layout/scene/yaxis/_rangemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="rangemode", parent_name="layout.scene.yaxis", **kwargs ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_separatethousands.py b/plotly/validators/layout/scene/yaxis/_separatethousands.py index 6cf74d5e2a..f918eae61e 100644 --- a/plotly/validators/layout/scene/yaxis/_separatethousands.py +++ b/plotly/validators/layout/scene/yaxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.scene.yaxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showaxeslabels.py b/plotly/validators/layout/scene/yaxis/_showaxeslabels.py index 85218a8458..707766aa4c 100644 --- a/plotly/validators/layout/scene/yaxis/_showaxeslabels.py +++ b/plotly/validators/layout/scene/yaxis/_showaxeslabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowaxeslabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showaxeslabels", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowaxeslabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showbackground.py b/plotly/validators/layout/scene/yaxis/_showbackground.py index 426c3e7454..5cb8d2da44 100644 --- a/plotly/validators/layout/scene/yaxis/_showbackground.py +++ b/plotly/validators/layout/scene/yaxis/_showbackground.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowbackgroundValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showbackground", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowbackgroundValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showexponent.py b/plotly/validators/layout/scene/yaxis/_showexponent.py index c1def79a76..a62cc7d1b0 100644 --- a/plotly/validators/layout/scene/yaxis/_showexponent.py +++ b/plotly/validators/layout/scene/yaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_showgrid.py b/plotly/validators/layout/scene/yaxis/_showgrid.py index 90ed455473..bb00dc03b0 100644 --- a/plotly/validators/layout/scene/yaxis/_showgrid.py +++ b/plotly/validators/layout/scene/yaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showline.py b/plotly/validators/layout/scene/yaxis/_showline.py index 0af44ef746..514f6a5c08 100644 --- a/plotly/validators/layout/scene/yaxis/_showline.py +++ b/plotly/validators/layout/scene/yaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showspikes.py b/plotly/validators/layout/scene/yaxis/_showspikes.py index 1a730b6b70..fb45ab26bf 100644 --- a/plotly/validators/layout/scene/yaxis/_showspikes.py +++ b/plotly/validators/layout/scene/yaxis/_showspikes.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowspikesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showspikes", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showticklabels.py b/plotly/validators/layout/scene/yaxis/_showticklabels.py index cd37d59e56..f98b0e2dc2 100644 --- a/plotly/validators/layout/scene/yaxis/_showticklabels.py +++ b/plotly/validators/layout/scene/yaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_showtickprefix.py b/plotly/validators/layout/scene/yaxis/_showtickprefix.py index 1a98730f03..c8d419662b 100644 --- a/plotly/validators/layout/scene/yaxis/_showtickprefix.py +++ b/plotly/validators/layout/scene/yaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_showticksuffix.py b/plotly/validators/layout/scene/yaxis/_showticksuffix.py index 23fcca0c7c..58a9dd5a7f 100644 --- a/plotly/validators/layout/scene/yaxis/_showticksuffix.py +++ b/plotly/validators/layout/scene/yaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.scene.yaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_spikecolor.py b/plotly/validators/layout/scene/yaxis/_spikecolor.py index a6d322f34b..85ce7741f7 100644 --- a/plotly/validators/layout/scene/yaxis/_spikecolor.py +++ b/plotly/validators/layout/scene/yaxis/_spikecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SpikecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="spikecolor", parent_name="layout.scene.yaxis", **kwargs ): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_spikesides.py b/plotly/validators/layout/scene/yaxis/_spikesides.py index 8bbfd0abe8..8c8ed5f498 100644 --- a/plotly/validators/layout/scene/yaxis/_spikesides.py +++ b/plotly/validators/layout/scene/yaxis/_spikesides.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): +class SpikesidesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="spikesides", parent_name="layout.scene.yaxis", **kwargs ): - super(SpikesidesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_spikethickness.py b/plotly/validators/layout/scene/yaxis/_spikethickness.py index 7b39781fe7..7359b35f61 100644 --- a/plotly/validators/layout/scene/yaxis/_spikethickness.py +++ b/plotly/validators/layout/scene/yaxis/_spikethickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class SpikethicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="spikethickness", parent_name="layout.scene.yaxis", **kwargs ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_tick0.py b/plotly/validators/layout/scene/yaxis/_tick0.py index 6977b786af..23096b1556 100644 --- a/plotly/validators/layout/scene/yaxis/_tick0.py +++ b/plotly/validators/layout/scene/yaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.scene.yaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_tickangle.py b/plotly/validators/layout/scene/yaxis/_tickangle.py index 029ab1e9fe..0a5c36c67c 100644 --- a/plotly/validators/layout/scene/yaxis/_tickangle.py +++ b/plotly/validators/layout/scene/yaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.scene.yaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_tickcolor.py b/plotly/validators/layout/scene/yaxis/_tickcolor.py index 613c2ce073..5ab41f1c54 100644 --- a/plotly/validators/layout/scene/yaxis/_tickcolor.py +++ b/plotly/validators/layout/scene/yaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.scene.yaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_tickfont.py b/plotly/validators/layout/scene/yaxis/_tickfont.py index 18a4482686..24e83593c8 100644 --- a/plotly/validators/layout/scene/yaxis/_tickfont.py +++ b/plotly/validators/layout/scene/yaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.scene.yaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_tickformat.py b/plotly/validators/layout/scene/yaxis/_tickformat.py index ffdca526bc..a5e1ade954 100644 --- a/plotly/validators/layout/scene/yaxis/_tickformat.py +++ b/plotly/validators/layout/scene/yaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.scene.yaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py b/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py index 39b4aa9958..b2691b5c9e 100644 --- a/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/scene/yaxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.scene.yaxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/scene/yaxis/_tickformatstops.py b/plotly/validators/layout/scene/yaxis/_tickformatstops.py index e2138d8c92..cc9c19c9c3 100644 --- a/plotly/validators/layout/scene/yaxis/_tickformatstops.py +++ b/plotly/validators/layout/scene/yaxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.scene.yaxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_ticklen.py b/plotly/validators/layout/scene/yaxis/_ticklen.py index 8a436ee58f..4a56e37a42 100644 --- a/plotly/validators/layout/scene/yaxis/_ticklen.py +++ b/plotly/validators/layout/scene/yaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.scene.yaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_tickmode.py b/plotly/validators/layout/scene/yaxis/_tickmode.py index d8c1c1f854..a74d6548b1 100644 --- a/plotly/validators/layout/scene/yaxis/_tickmode.py +++ b/plotly/validators/layout/scene/yaxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.scene.yaxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/scene/yaxis/_tickprefix.py b/plotly/validators/layout/scene/yaxis/_tickprefix.py index c66562d236..93efcedd08 100644 --- a/plotly/validators/layout/scene/yaxis/_tickprefix.py +++ b/plotly/validators/layout/scene/yaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.scene.yaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_ticks.py b/plotly/validators/layout/scene/yaxis/_ticks.py index 1d440dc946..c53b213b43 100644 --- a/plotly/validators/layout/scene/yaxis/_ticks.py +++ b/plotly/validators/layout/scene/yaxis/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.scene.yaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_ticksuffix.py b/plotly/validators/layout/scene/yaxis/_ticksuffix.py index ec5afa18ec..7d33383802 100644 --- a/plotly/validators/layout/scene/yaxis/_ticksuffix.py +++ b/plotly/validators/layout/scene/yaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.scene.yaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_ticktext.py b/plotly/validators/layout/scene/yaxis/_ticktext.py index a1dcfc2995..08d5bd1452 100644 --- a/plotly/validators/layout/scene/yaxis/_ticktext.py +++ b/plotly/validators/layout/scene/yaxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.scene.yaxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_ticktextsrc.py b/plotly/validators/layout/scene/yaxis/_ticktextsrc.py index 10c4fac7c7..d803a7c9ee 100644 --- a/plotly/validators/layout/scene/yaxis/_ticktextsrc.py +++ b/plotly/validators/layout/scene/yaxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.scene.yaxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_tickvals.py b/plotly/validators/layout/scene/yaxis/_tickvals.py index e3ade261b1..f50e174fd0 100644 --- a/plotly/validators/layout/scene/yaxis/_tickvals.py +++ b/plotly/validators/layout/scene/yaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.scene.yaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_tickvalssrc.py b/plotly/validators/layout/scene/yaxis/_tickvalssrc.py index 36c4563ae6..0d68a2f320 100644 --- a/plotly/validators/layout/scene/yaxis/_tickvalssrc.py +++ b/plotly/validators/layout/scene/yaxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.scene.yaxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_tickwidth.py b/plotly/validators/layout/scene/yaxis/_tickwidth.py index 41ebb25bbb..6c4b612ea2 100644 --- a/plotly/validators/layout/scene/yaxis/_tickwidth.py +++ b/plotly/validators/layout/scene/yaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.scene.yaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_title.py b/plotly/validators/layout/scene/yaxis/_title.py index c8558802c5..81f932c966 100644 --- a/plotly/validators/layout/scene/yaxis/_title.py +++ b/plotly/validators/layout/scene/yaxis/_title.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout.scene.yaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_type.py b/plotly/validators/layout/scene/yaxis/_type.py index 7819d0926c..769970951f 100644 --- a/plotly/validators/layout/scene/yaxis/_type.py +++ b/plotly/validators/layout/scene/yaxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.scene.yaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/_visible.py b/plotly/validators/layout/scene/yaxis/_visible.py index 2b9d992a7e..3959e55ccd 100644 --- a/plotly/validators/layout/scene/yaxis/_visible.py +++ b/plotly/validators/layout/scene/yaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.scene.yaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_zeroline.py b/plotly/validators/layout/scene/yaxis/_zeroline.py index 8aab452f50..1e8b871f86 100644 --- a/plotly/validators/layout/scene/yaxis/_zeroline.py +++ b/plotly/validators/layout/scene/yaxis/_zeroline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZerolineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="zeroline", parent_name="layout.scene.yaxis", **kwargs ): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_zerolinecolor.py b/plotly/validators/layout/scene/yaxis/_zerolinecolor.py index 328a982b1b..2cd632194e 100644 --- a/plotly/validators/layout/scene/yaxis/_zerolinecolor.py +++ b/plotly/validators/layout/scene/yaxis/_zerolinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ZerolinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="zerolinecolor", parent_name="layout.scene.yaxis", **kwargs ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/_zerolinewidth.py b/plotly/validators/layout/scene/yaxis/_zerolinewidth.py index 450707ecce..c764c3e7eb 100644 --- a/plotly/validators/layout/scene/yaxis/_zerolinewidth.py +++ b/plotly/validators/layout/scene/yaxis/_zerolinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ZerolinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="zerolinewidth", parent_name="layout.scene.yaxis", **kwargs ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/__init__.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/__init__.py index 701f84c04e..8ef0b74165 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/__init__.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._includesrc import IncludesrcValidator - from ._include import IncludeValidator - from ._clipmin import ClipminValidator - from ._clipmax import ClipmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._includesrc.IncludesrcValidator", - "._include.IncludeValidator", - "._clipmin.ClipminValidator", - "._clipmax.ClipmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._includesrc.IncludesrcValidator", + "._include.IncludeValidator", + "._clipmin.ClipminValidator", + "._clipmax.ClipmaxValidator", + ], +) diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmax.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmax.py index 692ec59a06..8d418594e4 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmax.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmax.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipmaxValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipmaxValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmax", parent_name="layout.scene.yaxis.autorangeoptions", **kwargs, ): - super(ClipmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmin.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmin.py index a52d49af99..5ee5605f91 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmin.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/_clipmin.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipminValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipminValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmin", parent_name="layout.scene.yaxis.autorangeoptions", **kwargs, ): - super(ClipminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/_include.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/_include.py index 3401ab5a4d..5941b4473e 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/_include.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/_include.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): +class IncludeValidator(_bv.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.scene.yaxis.autorangeoptions", **kwargs, ): - super(IncludeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/_includesrc.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/_includesrc.py index d2b561d72b..c36383d8ad 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/_includesrc.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/_includesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IncludesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="includesrc", parent_name="layout.scene.yaxis.autorangeoptions", **kwargs, ): - super(IncludesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/_maxallowed.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/_maxallowed.py index bd2c861282..bb0ed22ac2 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/_maxallowed.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/_maxallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.yaxis.autorangeoptions", **kwargs, ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/autorangeoptions/_minallowed.py b/plotly/validators/layout/scene/yaxis/autorangeoptions/_minallowed.py index 215fdc4265..23aeabe268 100644 --- a/plotly/validators/layout/scene/yaxis/autorangeoptions/_minallowed.py +++ b/plotly/validators/layout/scene/yaxis/autorangeoptions/_minallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.yaxis.autorangeoptions", **kwargs, ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/tickfont/__init__.py b/plotly/validators/layout/scene/yaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/__init__.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_color.py b/plotly/validators/layout/scene/yaxis/tickfont/_color.py index 67b773201c..ada9587662 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_color.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_family.py b/plotly/validators/layout/scene/yaxis/tickfont/_family.py index d9432ca5c9..1f5b586ad3 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_family.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_lineposition.py b/plotly/validators/layout/scene/yaxis/tickfont/_lineposition.py index 81c534a607..ee58bae082 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.yaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_shadow.py b/plotly/validators/layout/scene/yaxis/tickfont/_shadow.py index 87849204b6..2040fc5b36 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_size.py b/plotly/validators/layout/scene/yaxis/tickfont/_size.py index ba86022d98..5cc7799edf 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_size.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_style.py b/plotly/validators/layout/scene/yaxis/tickfont/_style.py index d1379bab29..47c13ef907 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_style.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_textcase.py b/plotly/validators/layout/scene/yaxis/tickfont/_textcase.py index 54f24bb0b5..5cf60edbbe 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.yaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_variant.py b/plotly/validators/layout/scene/yaxis/tickfont/_variant.py index e90f59e2f3..c1f0b0048c 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_variant.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/yaxis/tickfont/_weight.py b/plotly/validators/layout/scene/yaxis/tickfont/_weight.py index 57efc948f4..fca8fc200a 100644 --- a/plotly/validators/layout/scene/yaxis/tickfont/_weight.py +++ b/plotly/validators/layout/scene/yaxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.yaxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py b/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/scene/yaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py index 35e3ef66a9..eded80987c 100644 --- a/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/scene/yaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.scene.yaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py b/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py index 983003da7e..1a7b4c10b7 100644 --- a/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/scene/yaxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.scene.yaxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py b/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py index 8c97ec0f7e..bd8e791ea8 100644 --- a/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/scene/yaxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.scene.yaxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py index b97fb9a8ce..074bd08d47 100644 --- a/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/scene/yaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.scene.yaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py b/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py index 8fc7371a44..625108254a 100644 --- a/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/scene/yaxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.scene.yaxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/title/__init__.py b/plotly/validators/layout/scene/yaxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/scene/yaxis/title/__init__.py +++ b/plotly/validators/layout/scene/yaxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/scene/yaxis/title/_font.py b/plotly/validators/layout/scene/yaxis/title/_font.py index a4c692da42..c5ccb3e7ea 100644 --- a/plotly/validators/layout/scene/yaxis/title/_font.py +++ b/plotly/validators/layout/scene/yaxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.scene.yaxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/title/_text.py b/plotly/validators/layout/scene/yaxis/title/_text.py index 784410bc7f..38cb91ca69 100644 --- a/plotly/validators/layout/scene/yaxis/title/_text.py +++ b/plotly/validators/layout/scene/yaxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.scene.yaxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/title/font/__init__.py b/plotly/validators/layout/scene/yaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/__init__.py +++ b/plotly/validators/layout/scene/yaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/yaxis/title/font/_color.py b/plotly/validators/layout/scene/yaxis/title/font/_color.py index 6a066d4997..e82b0c0bb1 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_color.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.yaxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/title/font/_family.py b/plotly/validators/layout/scene/yaxis/title/font/_family.py index 10b8fe1e66..6294c9c52a 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_family.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.yaxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/yaxis/title/font/_lineposition.py b/plotly/validators/layout/scene/yaxis/title/font/_lineposition.py index 4c5324029d..25b86e0c42 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.yaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/yaxis/title/font/_shadow.py b/plotly/validators/layout/scene/yaxis/title/font/_shadow.py index e4bb87e001..5cd014be0e 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_shadow.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.yaxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/yaxis/title/font/_size.py b/plotly/validators/layout/scene/yaxis/title/font/_size.py index 47bdf06b43..1f4a262f80 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_size.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.yaxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/title/font/_style.py b/plotly/validators/layout/scene/yaxis/title/font/_style.py index fce897ed71..0db1372230 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_style.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.yaxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/title/font/_textcase.py b/plotly/validators/layout/scene/yaxis/title/font/_textcase.py index 51955d77b1..619f2a502d 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_textcase.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.yaxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/yaxis/title/font/_variant.py b/plotly/validators/layout/scene/yaxis/title/font/_variant.py index f88fe591ec..aeeb7f74e0 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_variant.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.yaxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/yaxis/title/font/_weight.py b/plotly/validators/layout/scene/yaxis/title/font/_weight.py index 5b6b1e677c..dd1afde970 100644 --- a/plotly/validators/layout/scene/yaxis/title/font/_weight.py +++ b/plotly/validators/layout/scene/yaxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.yaxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/zaxis/__init__.py b/plotly/validators/layout/scene/zaxis/__init__.py index b95df1031f..df86998dd2 100644 --- a/plotly/validators/layout/scene/zaxis/__init__.py +++ b/plotly/validators/layout/scene/zaxis/__init__.py @@ -1,133 +1,69 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zerolinewidth import ZerolinewidthValidator - from ._zerolinecolor import ZerolinecolorValidator - from ._zeroline import ZerolineValidator - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._spikethickness import SpikethicknessValidator - from ._spikesides import SpikesidesValidator - from ._spikecolor import SpikecolorValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showspikes import ShowspikesValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._showbackground import ShowbackgroundValidator - from ._showaxeslabels import ShowaxeslabelsValidator - from ._separatethousands import SeparatethousandsValidator - from ._rangemode import RangemodeValidator - from ._range import RangeValidator - from ._nticks import NticksValidator - from ._mirror import MirrorValidator - from ._minexponent import MinexponentValidator - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._calendar import CalendarValidator - from ._backgroundcolor import BackgroundcolorValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autorangeoptions import AutorangeoptionsValidator - from ._autorange import AutorangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zerolinewidth.ZerolinewidthValidator", - "._zerolinecolor.ZerolinecolorValidator", - "._zeroline.ZerolineValidator", - "._visible.VisibleValidator", - "._type.TypeValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._spikethickness.SpikethicknessValidator", - "._spikesides.SpikesidesValidator", - "._spikecolor.SpikecolorValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showspikes.ShowspikesValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._showbackground.ShowbackgroundValidator", - "._showaxeslabels.ShowaxeslabelsValidator", - "._separatethousands.SeparatethousandsValidator", - "._rangemode.RangemodeValidator", - "._range.RangeValidator", - "._nticks.NticksValidator", - "._mirror.MirrorValidator", - "._minexponent.MinexponentValidator", - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._calendar.CalendarValidator", - "._backgroundcolor.BackgroundcolorValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autorangeoptions.AutorangeoptionsValidator", - "._autorange.AutorangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesides.SpikesidesValidator", + "._spikecolor.SpikecolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showbackground.ShowbackgroundValidator", + "._showaxeslabels.ShowaxeslabelsValidator", + "._separatethousands.SeparatethousandsValidator", + "._rangemode.RangemodeValidator", + "._range.RangeValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._minexponent.MinexponentValidator", + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._backgroundcolor.BackgroundcolorValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autorangeoptions.AutorangeoptionsValidator", + "._autorange.AutorangeValidator", + ], +) diff --git a/plotly/validators/layout/scene/zaxis/_autorange.py b/plotly/validators/layout/scene/zaxis/_autorange.py index eaae6e6ca2..8efa9383e0 100644 --- a/plotly/validators/layout/scene/zaxis/_autorange.py +++ b/plotly/validators/layout/scene/zaxis/_autorange.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autorange", parent_name="layout.scene.zaxis", **kwargs ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop( diff --git a/plotly/validators/layout/scene/zaxis/_autorangeoptions.py b/plotly/validators/layout/scene/zaxis/_autorangeoptions.py index 22dce4ccea..385f965bb8 100644 --- a/plotly/validators/layout/scene/zaxis/_autorangeoptions.py +++ b/plotly/validators/layout/scene/zaxis/_autorangeoptions.py @@ -1,34 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AutorangeoptionsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.scene.zaxis", **kwargs ): - super(AutorangeoptionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Autorangeoptions"), data_docs=kwargs.pop( "data_docs", """ - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_autotypenumbers.py b/plotly/validators/layout/scene/zaxis/_autotypenumbers.py index 175376d186..aaffd662fd 100644 --- a/plotly/validators/layout/scene/zaxis/_autotypenumbers.py +++ b/plotly/validators/layout/scene/zaxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.scene.zaxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_backgroundcolor.py b/plotly/validators/layout/scene/zaxis/_backgroundcolor.py index 8be4e10a5f..56fd071e3c 100644 --- a/plotly/validators/layout/scene/zaxis/_backgroundcolor.py +++ b/plotly/validators/layout/scene/zaxis/_backgroundcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackgroundcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BackgroundcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="backgroundcolor", parent_name="layout.scene.zaxis", **kwargs ): - super(BackgroundcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_calendar.py b/plotly/validators/layout/scene/zaxis/_calendar.py index d5a4b71cd9..af0b8e5063 100644 --- a/plotly/validators/layout/scene/zaxis/_calendar.py +++ b/plotly/validators/layout/scene/zaxis/_calendar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="calendar", parent_name="layout.scene.zaxis", **kwargs ): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/zaxis/_categoryarray.py b/plotly/validators/layout/scene/zaxis/_categoryarray.py index e422240b9c..488e0440c0 100644 --- a/plotly/validators/layout/scene/zaxis/_categoryarray.py +++ b/plotly/validators/layout/scene/zaxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.scene.zaxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py b/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py index 1c0cd084f8..6e3815b4ad 100644 --- a/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.scene.zaxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_categoryorder.py b/plotly/validators/layout/scene/zaxis/_categoryorder.py index 6c94587d01..cf1a535bc1 100644 --- a/plotly/validators/layout/scene/zaxis/_categoryorder.py +++ b/plotly/validators/layout/scene/zaxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.scene.zaxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/zaxis/_color.py b/plotly/validators/layout/scene/zaxis/_color.py index 5a948d0492..d9c9032d9f 100644 --- a/plotly/validators/layout/scene/zaxis/_color.py +++ b/plotly/validators/layout/scene/zaxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.scene.zaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_dtick.py b/plotly/validators/layout/scene/zaxis/_dtick.py index 89e315e8f0..fb466199a3 100644 --- a/plotly/validators/layout/scene/zaxis/_dtick.py +++ b/plotly/validators/layout/scene/zaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.scene.zaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_exponentformat.py b/plotly/validators/layout/scene/zaxis/_exponentformat.py index e8bbf49a8c..0cf0303af3 100644 --- a/plotly/validators/layout/scene/zaxis/_exponentformat.py +++ b/plotly/validators/layout/scene/zaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.scene.zaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_gridcolor.py b/plotly/validators/layout/scene/zaxis/_gridcolor.py index 5fd52c934c..73621c3a78 100644 --- a/plotly/validators/layout/scene/zaxis/_gridcolor.py +++ b/plotly/validators/layout/scene/zaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.scene.zaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_gridwidth.py b/plotly/validators/layout/scene/zaxis/_gridwidth.py index 02c21e998a..85315b80a0 100644 --- a/plotly/validators/layout/scene/zaxis/_gridwidth.py +++ b/plotly/validators/layout/scene/zaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.scene.zaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_hoverformat.py b/plotly/validators/layout/scene/zaxis/_hoverformat.py index 463268407b..ca3736427c 100644 --- a/plotly/validators/layout/scene/zaxis/_hoverformat.py +++ b/plotly/validators/layout/scene/zaxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.scene.zaxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_labelalias.py b/plotly/validators/layout/scene/zaxis/_labelalias.py index 5dd991fdbf..6875ea4f19 100644 --- a/plotly/validators/layout/scene/zaxis/_labelalias.py +++ b/plotly/validators/layout/scene/zaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.scene.zaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_linecolor.py b/plotly/validators/layout/scene/zaxis/_linecolor.py index 1be4144816..875b503ea2 100644 --- a/plotly/validators/layout/scene/zaxis/_linecolor.py +++ b/plotly/validators/layout/scene/zaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.scene.zaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_linewidth.py b/plotly/validators/layout/scene/zaxis/_linewidth.py index f6d6c342d2..c00ad0e151 100644 --- a/plotly/validators/layout/scene/zaxis/_linewidth.py +++ b/plotly/validators/layout/scene/zaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.scene.zaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_maxallowed.py b/plotly/validators/layout/scene/zaxis/_maxallowed.py index c8be55290d..2f5bda7159 100644 --- a/plotly/validators/layout/scene/zaxis/_maxallowed.py +++ b/plotly/validators/layout/scene/zaxis/_maxallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.zaxis", **kwargs ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_minallowed.py b/plotly/validators/layout/scene/zaxis/_minallowed.py index 6b9b962716..8ce7cb033d 100644 --- a/plotly/validators/layout/scene/zaxis/_minallowed.py +++ b/plotly/validators/layout/scene/zaxis/_minallowed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.zaxis", **kwargs ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_minexponent.py b/plotly/validators/layout/scene/zaxis/_minexponent.py index cf4db2fa5e..18773dc242 100644 --- a/plotly/validators/layout/scene/zaxis/_minexponent.py +++ b/plotly/validators/layout/scene/zaxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.scene.zaxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_mirror.py b/plotly/validators/layout/scene/zaxis/_mirror.py index 4b32e6729c..ca378487da 100644 --- a/plotly/validators/layout/scene/zaxis/_mirror.py +++ b/plotly/validators/layout/scene/zaxis/_mirror.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MirrorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="mirror", parent_name="layout.scene.zaxis", **kwargs ): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_nticks.py b/plotly/validators/layout/scene/zaxis/_nticks.py index 5c9e5d8e1e..b4a19ca96e 100644 --- a/plotly/validators/layout/scene/zaxis/_nticks.py +++ b/plotly/validators/layout/scene/zaxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.scene.zaxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_range.py b/plotly/validators/layout/scene/zaxis/_range.py index aa1962a35c..403afd9efb 100644 --- a/plotly/validators/layout/scene/zaxis/_range.py +++ b/plotly/validators/layout/scene/zaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.scene.zaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", False), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), diff --git a/plotly/validators/layout/scene/zaxis/_rangemode.py b/plotly/validators/layout/scene/zaxis/_rangemode.py index 780a6e4315..32cc31a085 100644 --- a/plotly/validators/layout/scene/zaxis/_rangemode.py +++ b/plotly/validators/layout/scene/zaxis/_rangemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="rangemode", parent_name="layout.scene.zaxis", **kwargs ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_separatethousands.py b/plotly/validators/layout/scene/zaxis/_separatethousands.py index e867ec19d8..b0d679f37e 100644 --- a/plotly/validators/layout/scene/zaxis/_separatethousands.py +++ b/plotly/validators/layout/scene/zaxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.scene.zaxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showaxeslabels.py b/plotly/validators/layout/scene/zaxis/_showaxeslabels.py index 8f890c2773..eba201e866 100644 --- a/plotly/validators/layout/scene/zaxis/_showaxeslabels.py +++ b/plotly/validators/layout/scene/zaxis/_showaxeslabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowaxeslabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowaxeslabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showaxeslabels", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowaxeslabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showbackground.py b/plotly/validators/layout/scene/zaxis/_showbackground.py index 030facc677..88c1cc5374 100644 --- a/plotly/validators/layout/scene/zaxis/_showbackground.py +++ b/plotly/validators/layout/scene/zaxis/_showbackground.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowbackgroundValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowbackgroundValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showbackground", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowbackgroundValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showexponent.py b/plotly/validators/layout/scene/zaxis/_showexponent.py index d13ae1e0b8..d4ff019e4a 100644 --- a/plotly/validators/layout/scene/zaxis/_showexponent.py +++ b/plotly/validators/layout/scene/zaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_showgrid.py b/plotly/validators/layout/scene/zaxis/_showgrid.py index 1d45c4b2d2..ef3dc715b8 100644 --- a/plotly/validators/layout/scene/zaxis/_showgrid.py +++ b/plotly/validators/layout/scene/zaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showline.py b/plotly/validators/layout/scene/zaxis/_showline.py index aa6e577f82..faad15354d 100644 --- a/plotly/validators/layout/scene/zaxis/_showline.py +++ b/plotly/validators/layout/scene/zaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showspikes.py b/plotly/validators/layout/scene/zaxis/_showspikes.py index 5ea1e336d2..35f86cab34 100644 --- a/plotly/validators/layout/scene/zaxis/_showspikes.py +++ b/plotly/validators/layout/scene/zaxis/_showspikes.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowspikesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showspikes", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showticklabels.py b/plotly/validators/layout/scene/zaxis/_showticklabels.py index e292804247..26641bf28e 100644 --- a/plotly/validators/layout/scene/zaxis/_showticklabels.py +++ b/plotly/validators/layout/scene/zaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_showtickprefix.py b/plotly/validators/layout/scene/zaxis/_showtickprefix.py index 4e0b81e2aa..c86f0b1073 100644 --- a/plotly/validators/layout/scene/zaxis/_showtickprefix.py +++ b/plotly/validators/layout/scene/zaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_showticksuffix.py b/plotly/validators/layout/scene/zaxis/_showticksuffix.py index 1bb83aaf0a..64b6d4b8f5 100644 --- a/plotly/validators/layout/scene/zaxis/_showticksuffix.py +++ b/plotly/validators/layout/scene/zaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.scene.zaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_spikecolor.py b/plotly/validators/layout/scene/zaxis/_spikecolor.py index d261adede3..6fbacf2767 100644 --- a/plotly/validators/layout/scene/zaxis/_spikecolor.py +++ b/plotly/validators/layout/scene/zaxis/_spikecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SpikecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="spikecolor", parent_name="layout.scene.zaxis", **kwargs ): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_spikesides.py b/plotly/validators/layout/scene/zaxis/_spikesides.py index a258a22784..b86414cd23 100644 --- a/plotly/validators/layout/scene/zaxis/_spikesides.py +++ b/plotly/validators/layout/scene/zaxis/_spikesides.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikesidesValidator(_plotly_utils.basevalidators.BooleanValidator): +class SpikesidesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="spikesides", parent_name="layout.scene.zaxis", **kwargs ): - super(SpikesidesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_spikethickness.py b/plotly/validators/layout/scene/zaxis/_spikethickness.py index 75dd93b89f..ad46645e99 100644 --- a/plotly/validators/layout/scene/zaxis/_spikethickness.py +++ b/plotly/validators/layout/scene/zaxis/_spikethickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class SpikethicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="spikethickness", parent_name="layout.scene.zaxis", **kwargs ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_tick0.py b/plotly/validators/layout/scene/zaxis/_tick0.py index a39460d2f3..04a7ffc418 100644 --- a/plotly/validators/layout/scene/zaxis/_tick0.py +++ b/plotly/validators/layout/scene/zaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.scene.zaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_tickangle.py b/plotly/validators/layout/scene/zaxis/_tickangle.py index bb72dee36c..34f74bb027 100644 --- a/plotly/validators/layout/scene/zaxis/_tickangle.py +++ b/plotly/validators/layout/scene/zaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.scene.zaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_tickcolor.py b/plotly/validators/layout/scene/zaxis/_tickcolor.py index 78dbd88675..130a91ffc2 100644 --- a/plotly/validators/layout/scene/zaxis/_tickcolor.py +++ b/plotly/validators/layout/scene/zaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.scene.zaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_tickfont.py b/plotly/validators/layout/scene/zaxis/_tickfont.py index e5c2bd902e..010e069518 100644 --- a/plotly/validators/layout/scene/zaxis/_tickfont.py +++ b/plotly/validators/layout/scene/zaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.scene.zaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_tickformat.py b/plotly/validators/layout/scene/zaxis/_tickformat.py index bf83b2adba..2e2c735170 100644 --- a/plotly/validators/layout/scene/zaxis/_tickformat.py +++ b/plotly/validators/layout/scene/zaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.scene.zaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py b/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py index 8c3751b6fd..d2d6d9887f 100644 --- a/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/scene/zaxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.scene.zaxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/scene/zaxis/_tickformatstops.py b/plotly/validators/layout/scene/zaxis/_tickformatstops.py index cabfab02ce..d2098ec165 100644 --- a/plotly/validators/layout/scene/zaxis/_tickformatstops.py +++ b/plotly/validators/layout/scene/zaxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.scene.zaxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_ticklen.py b/plotly/validators/layout/scene/zaxis/_ticklen.py index 947f1266a2..cfd8e5a10c 100644 --- a/plotly/validators/layout/scene/zaxis/_ticklen.py +++ b/plotly/validators/layout/scene/zaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.scene.zaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_tickmode.py b/plotly/validators/layout/scene/zaxis/_tickmode.py index c690bd8ff3..bcaee50432 100644 --- a/plotly/validators/layout/scene/zaxis/_tickmode.py +++ b/plotly/validators/layout/scene/zaxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.scene.zaxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/scene/zaxis/_tickprefix.py b/plotly/validators/layout/scene/zaxis/_tickprefix.py index 7d23394586..5e0df4d5b9 100644 --- a/plotly/validators/layout/scene/zaxis/_tickprefix.py +++ b/plotly/validators/layout/scene/zaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.scene.zaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_ticks.py b/plotly/validators/layout/scene/zaxis/_ticks.py index 7a96f855f6..3e97b3f60e 100644 --- a/plotly/validators/layout/scene/zaxis/_ticks.py +++ b/plotly/validators/layout/scene/zaxis/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.scene.zaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_ticksuffix.py b/plotly/validators/layout/scene/zaxis/_ticksuffix.py index bacbee8c65..fe332a8c8e 100644 --- a/plotly/validators/layout/scene/zaxis/_ticksuffix.py +++ b/plotly/validators/layout/scene/zaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.scene.zaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_ticktext.py b/plotly/validators/layout/scene/zaxis/_ticktext.py index 0f243e03eb..fd78dd97f8 100644 --- a/plotly/validators/layout/scene/zaxis/_ticktext.py +++ b/plotly/validators/layout/scene/zaxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.scene.zaxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_ticktextsrc.py b/plotly/validators/layout/scene/zaxis/_ticktextsrc.py index 7dba15af5e..8a1ef0d9f6 100644 --- a/plotly/validators/layout/scene/zaxis/_ticktextsrc.py +++ b/plotly/validators/layout/scene/zaxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.scene.zaxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_tickvals.py b/plotly/validators/layout/scene/zaxis/_tickvals.py index b58eb462d9..5b6eee67f6 100644 --- a/plotly/validators/layout/scene/zaxis/_tickvals.py +++ b/plotly/validators/layout/scene/zaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.scene.zaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_tickvalssrc.py b/plotly/validators/layout/scene/zaxis/_tickvalssrc.py index 8d515fb082..ed8bf093f7 100644 --- a/plotly/validators/layout/scene/zaxis/_tickvalssrc.py +++ b/plotly/validators/layout/scene/zaxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.scene.zaxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_tickwidth.py b/plotly/validators/layout/scene/zaxis/_tickwidth.py index 308e2e74f3..386ef16c40 100644 --- a/plotly/validators/layout/scene/zaxis/_tickwidth.py +++ b/plotly/validators/layout/scene/zaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.scene.zaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_title.py b/plotly/validators/layout/scene/zaxis/_title.py index 79d137210b..a2e464a830 100644 --- a/plotly/validators/layout/scene/zaxis/_title.py +++ b/plotly/validators/layout/scene/zaxis/_title.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout.scene.zaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_type.py b/plotly/validators/layout/scene/zaxis/_type.py index e804f36079..d9a06b02e9 100644 --- a/plotly/validators/layout/scene/zaxis/_type.py +++ b/plotly/validators/layout/scene/zaxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.scene.zaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["-", "linear", "log", "date", "category"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/_visible.py b/plotly/validators/layout/scene/zaxis/_visible.py index 9aeded29ea..d4c4b65438 100644 --- a/plotly/validators/layout/scene/zaxis/_visible.py +++ b/plotly/validators/layout/scene/zaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.scene.zaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_zeroline.py b/plotly/validators/layout/scene/zaxis/_zeroline.py index 2aafd05796..d5bda3b26b 100644 --- a/plotly/validators/layout/scene/zaxis/_zeroline.py +++ b/plotly/validators/layout/scene/zaxis/_zeroline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZerolineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="zeroline", parent_name="layout.scene.zaxis", **kwargs ): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_zerolinecolor.py b/plotly/validators/layout/scene/zaxis/_zerolinecolor.py index 2bab5882ca..f80da1b3e4 100644 --- a/plotly/validators/layout/scene/zaxis/_zerolinecolor.py +++ b/plotly/validators/layout/scene/zaxis/_zerolinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ZerolinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="zerolinecolor", parent_name="layout.scene.zaxis", **kwargs ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/_zerolinewidth.py b/plotly/validators/layout/scene/zaxis/_zerolinewidth.py index 16a92ed232..95a85196f3 100644 --- a/plotly/validators/layout/scene/zaxis/_zerolinewidth.py +++ b/plotly/validators/layout/scene/zaxis/_zerolinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ZerolinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="zerolinewidth", parent_name="layout.scene.zaxis", **kwargs ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/__init__.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/__init__.py index 701f84c04e..8ef0b74165 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/__init__.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._includesrc import IncludesrcValidator - from ._include import IncludeValidator - from ._clipmin import ClipminValidator - from ._clipmax import ClipmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._includesrc.IncludesrcValidator", - "._include.IncludeValidator", - "._clipmin.ClipminValidator", - "._clipmax.ClipmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._includesrc.IncludesrcValidator", + "._include.IncludeValidator", + "._clipmin.ClipminValidator", + "._clipmax.ClipmaxValidator", + ], +) diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmax.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmax.py index 541dcbabf3..52dbcb2d2f 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmax.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmax.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipmaxValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipmaxValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmax", parent_name="layout.scene.zaxis.autorangeoptions", **kwargs, ): - super(ClipmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmin.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmin.py index b40caa3fca..4e6f17d732 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmin.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/_clipmin.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipminValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipminValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmin", parent_name="layout.scene.zaxis.autorangeoptions", **kwargs, ): - super(ClipminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/_include.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/_include.py index c2d3401cbd..5fead26b1c 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/_include.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/_include.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): +class IncludeValidator(_bv.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.scene.zaxis.autorangeoptions", **kwargs, ): - super(IncludeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/_includesrc.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/_includesrc.py index dee1f42fb0..f7566e55db 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/_includesrc.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/_includesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IncludesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="includesrc", parent_name="layout.scene.zaxis.autorangeoptions", **kwargs, ): - super(IncludesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/_maxallowed.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/_maxallowed.py index 56d5dc856f..a6db729141 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/_maxallowed.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/_maxallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.scene.zaxis.autorangeoptions", **kwargs, ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/autorangeoptions/_minallowed.py b/plotly/validators/layout/scene/zaxis/autorangeoptions/_minallowed.py index b031c37761..92c03b58a6 100644 --- a/plotly/validators/layout/scene/zaxis/autorangeoptions/_minallowed.py +++ b/plotly/validators/layout/scene/zaxis/autorangeoptions/_minallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.scene.zaxis.autorangeoptions", **kwargs, ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/tickfont/__init__.py b/plotly/validators/layout/scene/zaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/__init__.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_color.py b/plotly/validators/layout/scene/zaxis/tickfont/_color.py index 194e31b130..a77c22b28f 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_color.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_family.py b/plotly/validators/layout/scene/zaxis/tickfont/_family.py index 48c2c5d651..9a7a201b7e 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_family.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_lineposition.py b/plotly/validators/layout/scene/zaxis/tickfont/_lineposition.py index 456f9608c5..e91b15d0f2 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.zaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_shadow.py b/plotly/validators/layout/scene/zaxis/tickfont/_shadow.py index 3b208f7465..0480976dca 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_size.py b/plotly/validators/layout/scene/zaxis/tickfont/_size.py index ff74fdfade..69b04e7faf 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_size.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_style.py b/plotly/validators/layout/scene/zaxis/tickfont/_style.py index dc8a3c505b..b6f9da7ad3 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_style.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_textcase.py b/plotly/validators/layout/scene/zaxis/tickfont/_textcase.py index 93e2e01168..7a16473319 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.zaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_variant.py b/plotly/validators/layout/scene/zaxis/tickfont/_variant.py index 04d25b9695..7ff5eb7fee 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_variant.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/zaxis/tickfont/_weight.py b/plotly/validators/layout/scene/zaxis/tickfont/_weight.py index 983d728c8d..659fbd76ff 100644 --- a/plotly/validators/layout/scene/zaxis/tickfont/_weight.py +++ b/plotly/validators/layout/scene/zaxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.zaxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py b/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/scene/zaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py index 6e7dc01979..6bb10f5a9d 100644 --- a/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/scene/zaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.scene.zaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py b/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py index 0e22fdb56e..3e24968988 100644 --- a/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/scene/zaxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.scene.zaxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py b/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py index 074c9a5ea6..96d6409944 100644 --- a/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/scene/zaxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.scene.zaxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py index 593e503998..c9db0e3b56 100644 --- a/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/scene/zaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.scene.zaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py b/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py index 871839b71d..b6eefda93c 100644 --- a/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/scene/zaxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.scene.zaxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/title/__init__.py b/plotly/validators/layout/scene/zaxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/scene/zaxis/title/__init__.py +++ b/plotly/validators/layout/scene/zaxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/scene/zaxis/title/_font.py b/plotly/validators/layout/scene/zaxis/title/_font.py index 237e25c699..2b9bf8e58e 100644 --- a/plotly/validators/layout/scene/zaxis/title/_font.py +++ b/plotly/validators/layout/scene/zaxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.scene.zaxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/title/_text.py b/plotly/validators/layout/scene/zaxis/title/_text.py index 9bce25eb57..8075f032c7 100644 --- a/plotly/validators/layout/scene/zaxis/title/_text.py +++ b/plotly/validators/layout/scene/zaxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.scene.zaxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/title/font/__init__.py b/plotly/validators/layout/scene/zaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/__init__.py +++ b/plotly/validators/layout/scene/zaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/scene/zaxis/title/font/_color.py b/plotly/validators/layout/scene/zaxis/title/font/_color.py index b01b06906f..b5e11b026a 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_color.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.scene.zaxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/title/font/_family.py b/plotly/validators/layout/scene/zaxis/title/font/_family.py index 4fe6862624..ed98ce39e2 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_family.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.scene.zaxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/scene/zaxis/title/font/_lineposition.py b/plotly/validators/layout/scene/zaxis/title/font/_lineposition.py index 8df8198bb5..9538ac5a22 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.scene.zaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/scene/zaxis/title/font/_shadow.py b/plotly/validators/layout/scene/zaxis/title/font/_shadow.py index 75f1b0b210..84f2addf43 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_shadow.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.scene.zaxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/scene/zaxis/title/font/_size.py b/plotly/validators/layout/scene/zaxis/title/font/_size.py index ccb49275e6..491f8b3ccd 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_size.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.scene.zaxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/title/font/_style.py b/plotly/validators/layout/scene/zaxis/title/font/_style.py index 9ee0415c4e..26e64086cd 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_style.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.scene.zaxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/title/font/_textcase.py b/plotly/validators/layout/scene/zaxis/title/font/_textcase.py index ca9c8fd504..940bdd692c 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_textcase.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.scene.zaxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/scene/zaxis/title/font/_variant.py b/plotly/validators/layout/scene/zaxis/title/font/_variant.py index 46bb41ce40..551f576202 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_variant.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.scene.zaxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/scene/zaxis/title/font/_weight.py b/plotly/validators/layout/scene/zaxis/title/font/_weight.py index 765126c7a5..a203184f62 100644 --- a/plotly/validators/layout/scene/zaxis/title/font/_weight.py +++ b/plotly/validators/layout/scene/zaxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.scene.zaxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/selection/__init__.py b/plotly/validators/layout/selection/__init__.py index 12ba4f55b4..a2df1a2c23 100644 --- a/plotly/validators/layout/selection/__init__.py +++ b/plotly/validators/layout/selection/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._y1 import Y1Validator - from ._y0 import Y0Validator - from ._xref import XrefValidator - from ._x1 import X1Validator - from ._x0 import X0Validator - from ._type import TypeValidator - from ._templateitemname import TemplateitemnameValidator - from ._path import PathValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._y1.Y1Validator", - "._y0.Y0Validator", - "._xref.XrefValidator", - "._x1.X1Validator", - "._x0.X0Validator", - "._type.TypeValidator", - "._templateitemname.TemplateitemnameValidator", - "._path.PathValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._line.LineValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._y1.Y1Validator", + "._y0.Y0Validator", + "._xref.XrefValidator", + "._x1.X1Validator", + "._x0.X0Validator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._path.PathValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._line.LineValidator", + ], +) diff --git a/plotly/validators/layout/selection/_line.py b/plotly/validators/layout/selection/_line.py index 7017d95469..b1d44db866 100644 --- a/plotly/validators/layout/selection/_line.py +++ b/plotly/validators/layout/selection/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="layout.selection", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/selection/_name.py b/plotly/validators/layout/selection/_name.py index 3074c4fa66..9aeb8b0f5a 100644 --- a/plotly/validators/layout/selection/_name.py +++ b/plotly/validators/layout/selection/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.selection", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_opacity.py b/plotly/validators/layout/selection/_opacity.py index 08c319d99b..f10e06e2fb 100644 --- a/plotly/validators/layout/selection/_opacity.py +++ b/plotly/validators/layout/selection/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="layout.selection", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/selection/_path.py b/plotly/validators/layout/selection/_path.py index abcd969292..32dc331d35 100644 --- a/plotly/validators/layout/selection/_path.py +++ b/plotly/validators/layout/selection/_path.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PathValidator(_plotly_utils.basevalidators.StringValidator): +class PathValidator(_bv.StringValidator): def __init__(self, plotly_name="path", parent_name="layout.selection", **kwargs): - super(PathValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_templateitemname.py b/plotly/validators/layout/selection/_templateitemname.py index fd8a09d6fb..d17d8ac0c4 100644 --- a/plotly/validators/layout/selection/_templateitemname.py +++ b/plotly/validators/layout/selection/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.selection", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_type.py b/plotly/validators/layout/selection/_type.py index 28262664c5..611be0fff9 100644 --- a/plotly/validators/layout/selection/_type.py +++ b/plotly/validators/layout/selection/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.selection", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["rect", "path"]), **kwargs, diff --git a/plotly/validators/layout/selection/_x0.py b/plotly/validators/layout/selection/_x0.py index 9287c41e40..6e99f2da22 100644 --- a/plotly/validators/layout/selection/_x0.py +++ b/plotly/validators/layout/selection/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="layout.selection", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_x1.py b/plotly/validators/layout/selection/_x1.py index 87a0d634bf..4c7847b1eb 100644 --- a/plotly/validators/layout/selection/_x1.py +++ b/plotly/validators/layout/selection/_x1.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X1Validator(_plotly_utils.basevalidators.AnyValidator): +class X1Validator(_bv.AnyValidator): def __init__(self, plotly_name="x1", parent_name="layout.selection", **kwargs): - super(X1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_xref.py b/plotly/validators/layout/selection/_xref.py index 7a4be8fba3..d9eabd177b 100644 --- a/plotly/validators/layout/selection/_xref.py +++ b/plotly/validators/layout/selection/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="layout.selection", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["paper", "/^x([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/selection/_y0.py b/plotly/validators/layout/selection/_y0.py index fbff6d5394..db4d37455c 100644 --- a/plotly/validators/layout/selection/_y0.py +++ b/plotly/validators/layout/selection/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="layout.selection", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_y1.py b/plotly/validators/layout/selection/_y1.py index f576b5505c..10ef98d0e8 100644 --- a/plotly/validators/layout/selection/_y1.py +++ b/plotly/validators/layout/selection/_y1.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y1Validator(_plotly_utils.basevalidators.AnyValidator): +class Y1Validator(_bv.AnyValidator): def __init__(self, plotly_name="y1", parent_name="layout.selection", **kwargs): - super(Y1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/selection/_yref.py b/plotly/validators/layout/selection/_yref.py index 38ceef30be..462c4a742f 100644 --- a/plotly/validators/layout/selection/_yref.py +++ b/plotly/validators/layout/selection/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="layout.selection", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["paper", "/^y([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/selection/line/__init__.py b/plotly/validators/layout/selection/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/layout/selection/line/__init__.py +++ b/plotly/validators/layout/selection/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/layout/selection/line/_color.py b/plotly/validators/layout/selection/line/_color.py index 8a054d845d..01d53940a2 100644 --- a/plotly/validators/layout/selection/line/_color.py +++ b/plotly/validators/layout/selection/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.selection.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, diff --git a/plotly/validators/layout/selection/line/_dash.py b/plotly/validators/layout/selection/line/_dash.py index 29a6efd807..61959a07ad 100644 --- a/plotly/validators/layout/selection/line/_dash.py +++ b/plotly/validators/layout/selection/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="layout.selection.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/selection/line/_width.py b/plotly/validators/layout/selection/line/_width.py index e32fd424f5..9bf33b662f 100644 --- a/plotly/validators/layout/selection/line/_width.py +++ b/plotly/validators/layout/selection/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="layout.selection.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/layout/shape/__init__.py b/plotly/validators/layout/shape/__init__.py index aefa39690c..3bc8d16933 100644 --- a/plotly/validators/layout/shape/__init__.py +++ b/plotly/validators/layout/shape/__init__.py @@ -1,77 +1,41 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._ysizemode import YsizemodeValidator - from ._yref import YrefValidator - from ._yanchor import YanchorValidator - from ._y1shift import Y1ShiftValidator - from ._y1 import Y1Validator - from ._y0shift import Y0ShiftValidator - from ._y0 import Y0Validator - from ._xsizemode import XsizemodeValidator - from ._xref import XrefValidator - from ._xanchor import XanchorValidator - from ._x1shift import X1ShiftValidator - from ._x1 import X1Validator - from ._x0shift import X0ShiftValidator - from ._x0 import X0Validator - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._templateitemname import TemplateitemnameValidator - from ._showlegend import ShowlegendValidator - from ._path import PathValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._layer import LayerValidator - from ._label import LabelValidator - from ._fillrule import FillruleValidator - from ._fillcolor import FillcolorValidator - from ._editable import EditableValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._ysizemode.YsizemodeValidator", - "._yref.YrefValidator", - "._yanchor.YanchorValidator", - "._y1shift.Y1ShiftValidator", - "._y1.Y1Validator", - "._y0shift.Y0ShiftValidator", - "._y0.Y0Validator", - "._xsizemode.XsizemodeValidator", - "._xref.XrefValidator", - "._xanchor.XanchorValidator", - "._x1shift.X1ShiftValidator", - "._x1.X1Validator", - "._x0shift.X0ShiftValidator", - "._x0.X0Validator", - "._visible.VisibleValidator", - "._type.TypeValidator", - "._templateitemname.TemplateitemnameValidator", - "._showlegend.ShowlegendValidator", - "._path.PathValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._layer.LayerValidator", - "._label.LabelValidator", - "._fillrule.FillruleValidator", - "._fillcolor.FillcolorValidator", - "._editable.EditableValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysizemode.YsizemodeValidator", + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y1shift.Y1ShiftValidator", + "._y1.Y1Validator", + "._y0shift.Y0ShiftValidator", + "._y0.Y0Validator", + "._xsizemode.XsizemodeValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x1shift.X1ShiftValidator", + "._x1.X1Validator", + "._x0shift.X0ShiftValidator", + "._x0.X0Validator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._showlegend.ShowlegendValidator", + "._path.PathValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._layer.LayerValidator", + "._label.LabelValidator", + "._fillrule.FillruleValidator", + "._fillcolor.FillcolorValidator", + "._editable.EditableValidator", + ], +) diff --git a/plotly/validators/layout/shape/_editable.py b/plotly/validators/layout/shape/_editable.py index 755527aff7..f5c3c1240a 100644 --- a/plotly/validators/layout/shape/_editable.py +++ b/plotly/validators/layout/shape/_editable.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EditableValidator(_plotly_utils.basevalidators.BooleanValidator): +class EditableValidator(_bv.BooleanValidator): def __init__(self, plotly_name="editable", parent_name="layout.shape", **kwargs): - super(EditableValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_fillcolor.py b/plotly/validators/layout/shape/_fillcolor.py index 22a32493e3..9810e13804 100644 --- a/plotly/validators/layout/shape/_fillcolor.py +++ b/plotly/validators/layout/shape/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="layout.shape", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_fillrule.py b/plotly/validators/layout/shape/_fillrule.py index 2454afa5c1..8f85238663 100644 --- a/plotly/validators/layout/shape/_fillrule.py +++ b/plotly/validators/layout/shape/_fillrule.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillruleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillruleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fillrule", parent_name="layout.shape", **kwargs): - super(FillruleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["evenodd", "nonzero"]), **kwargs, diff --git a/plotly/validators/layout/shape/_label.py b/plotly/validators/layout/shape/_label.py index adb9c069c9..650fad27e8 100644 --- a/plotly/validators/layout/shape/_label.py +++ b/plotly/validators/layout/shape/_label.py @@ -1,81 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="label", parent_name="layout.shape", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Label"), data_docs=kwargs.pop( "data_docs", """ - font - Sets the shape label text font. - padding - Sets padding (in px) between edge of label and - edge of shape. - text - Sets the text to display with shape. It is also - used for legend item if `name` is not provided. - textangle - Sets the angle at which the label text is drawn - with respect to the horizontal. For lines, - angle "auto" is the same angle as the line. For - all other shapes, angle "auto" is horizontal. - textposition - Sets the position of the label text relative to - the shape. Supported values for rectangles, - circles and paths are *top left*, *top center*, - *top right*, *middle left*, *middle center*, - *middle right*, *bottom left*, *bottom center*, - and *bottom right*. Supported values for lines - are "start", "middle", and "end". Default: - *middle center* for rectangles, circles, and - paths; "middle" for lines. - texttemplate - Template string used for rendering the shape's - label. Note that this will override `text`. - Variables are inserted using %{variable}, for - example "x0: %{x0}". Numbers are formatted - using d3-format's syntax %{variable:d3-format}, - for example "Price: %{x0:$.2f}". See https://gi - thub.com/d3/d3-format/tree/v1.4.5#d3-format for - details on the formatting syntax. Dates are - formatted using d3-time-format's syntax - %{variable|d3-time-format}, for example "Day: - %{x0|%m %b %Y}". See - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. A single - multiplication or division operation may be - applied to numeric variables, and combined with - d3 number formatting, for example "Length in - cm: %{x0*2.54}", "%{slope*60:.1f} meters per - second." For log axes, variable values are - given in log units. For date axes, x/y - coordinate variables and center variables use - datetimes, while all other variable values use - values in ms. Finally, the template string has - access to variables `x0`, `x1`, `y0`, `y1`, - `slope`, `dx`, `dy`, `width`, `height`, - `length`, `xcenter` and `ycenter`. - xanchor - Sets the label's horizontal position anchor - This anchor binds the specified `textposition` - to the "left", "center" or "right" of the label - text. For example, if `textposition` is set to - *top right* and `xanchor` to "right" then the - right-most portion of the label text lines up - with the right-most edge of the shape. - yanchor - Sets the label's vertical position anchor This - anchor binds the specified `textposition` to - the "top", "middle" or "bottom" of the label - text. For example, if `textposition` is set to - *top right* and `yanchor` to "top" then the - top-most portion of the label text lines up - with the top-most edge of the shape. """, ), **kwargs, diff --git a/plotly/validators/layout/shape/_layer.py b/plotly/validators/layout/shape/_layer.py index 7775d370e5..aaa0edff5e 100644 --- a/plotly/validators/layout/shape/_layer.py +++ b/plotly/validators/layout/shape/_layer.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="layer", parent_name="layout.shape", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["below", "above", "between"]), **kwargs, diff --git a/plotly/validators/layout/shape/_legend.py b/plotly/validators/layout/shape/_legend.py index b4f3b595e3..d683ada462 100644 --- a/plotly/validators/layout/shape/_legend.py +++ b/plotly/validators/layout/shape/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="layout.shape", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, diff --git a/plotly/validators/layout/shape/_legendgroup.py b/plotly/validators/layout/shape/_legendgroup.py index 2c45f89665..424d30e6dd 100644 --- a/plotly/validators/layout/shape/_legendgroup.py +++ b/plotly/validators/layout/shape/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="layout.shape", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_legendgrouptitle.py b/plotly/validators/layout/shape/_legendgrouptitle.py index 63f93c783d..7cba3eecd5 100644 --- a/plotly/validators/layout/shape/_legendgrouptitle.py +++ b/plotly/validators/layout/shape/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="layout.shape", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/layout/shape/_legendrank.py b/plotly/validators/layout/shape/_legendrank.py index 28eec2d678..916c47a182 100644 --- a/plotly/validators/layout/shape/_legendrank.py +++ b/plotly/validators/layout/shape/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="layout.shape", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_legendwidth.py b/plotly/validators/layout/shape/_legendwidth.py index 89c4904bb2..5f867ecaf0 100644 --- a/plotly/validators/layout/shape/_legendwidth.py +++ b/plotly/validators/layout/shape/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="layout.shape", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/shape/_line.py b/plotly/validators/layout/shape/_line.py index 75b7910340..c89caac5a9 100644 --- a/plotly/validators/layout/shape/_line.py +++ b/plotly/validators/layout/shape/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="layout.shape", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/shape/_name.py b/plotly/validators/layout/shape/_name.py index 085f21db04..d45b2692d8 100644 --- a/plotly/validators/layout/shape/_name.py +++ b/plotly/validators/layout/shape/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.shape", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_opacity.py b/plotly/validators/layout/shape/_opacity.py index 19f44342b5..4281f53d6e 100644 --- a/plotly/validators/layout/shape/_opacity.py +++ b/plotly/validators/layout/shape/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="layout.shape", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/shape/_path.py b/plotly/validators/layout/shape/_path.py index 754e1772c9..280428dff9 100644 --- a/plotly/validators/layout/shape/_path.py +++ b/plotly/validators/layout/shape/_path.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PathValidator(_plotly_utils.basevalidators.StringValidator): +class PathValidator(_bv.StringValidator): def __init__(self, plotly_name="path", parent_name="layout.shape", **kwargs): - super(PathValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_showlegend.py b/plotly/validators/layout/shape/_showlegend.py index 2d332f1298..3afdca81e7 100644 --- a/plotly/validators/layout/shape/_showlegend.py +++ b/plotly/validators/layout/shape/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="layout.shape", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_templateitemname.py b/plotly/validators/layout/shape/_templateitemname.py index d1df4657b1..d3514d604e 100644 --- a/plotly/validators/layout/shape/_templateitemname.py +++ b/plotly/validators/layout/shape/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.shape", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_type.py b/plotly/validators/layout/shape/_type.py index 80fd2fdbf8..c53ad95a9b 100644 --- a/plotly/validators/layout/shape/_type.py +++ b/plotly/validators/layout/shape/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.shape", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["circle", "rect", "path", "line"]), **kwargs, diff --git a/plotly/validators/layout/shape/_visible.py b/plotly/validators/layout/shape/_visible.py index 465a8a0e81..391b3bc4ff 100644 --- a/plotly/validators/layout/shape/_visible.py +++ b/plotly/validators/layout/shape/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="layout.shape", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/layout/shape/_x0.py b/plotly/validators/layout/shape/_x0.py index 1c9642e6a6..e03fabe59a 100644 --- a/plotly/validators/layout/shape/_x0.py +++ b/plotly/validators/layout/shape/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="layout.shape", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_x0shift.py b/plotly/validators/layout/shape/_x0shift.py index fddaad3ac4..9f072211d6 100644 --- a/plotly/validators/layout/shape/_x0shift.py +++ b/plotly/validators/layout/shape/_x0shift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0ShiftValidator(_plotly_utils.basevalidators.NumberValidator): +class X0ShiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="x0shift", parent_name="layout.shape", **kwargs): - super(X0ShiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", -1), diff --git a/plotly/validators/layout/shape/_x1.py b/plotly/validators/layout/shape/_x1.py index b7d6f51a7d..179cbdf37d 100644 --- a/plotly/validators/layout/shape/_x1.py +++ b/plotly/validators/layout/shape/_x1.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X1Validator(_plotly_utils.basevalidators.AnyValidator): +class X1Validator(_bv.AnyValidator): def __init__(self, plotly_name="x1", parent_name="layout.shape", **kwargs): - super(X1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_x1shift.py b/plotly/validators/layout/shape/_x1shift.py index 02aaa138e7..ea4cc2621b 100644 --- a/plotly/validators/layout/shape/_x1shift.py +++ b/plotly/validators/layout/shape/_x1shift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X1ShiftValidator(_plotly_utils.basevalidators.NumberValidator): +class X1ShiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="x1shift", parent_name="layout.shape", **kwargs): - super(X1ShiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", -1), diff --git a/plotly/validators/layout/shape/_xanchor.py b/plotly/validators/layout/shape/_xanchor.py index d6ba286da8..63d8ff4980 100644 --- a/plotly/validators/layout/shape/_xanchor.py +++ b/plotly/validators/layout/shape/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.AnyValidator): +class XanchorValidator(_bv.AnyValidator): def __init__(self, plotly_name="xanchor", parent_name="layout.shape", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_xref.py b/plotly/validators/layout/shape/_xref.py index 065f9868b5..e0a09c2c4c 100644 --- a/plotly/validators/layout/shape/_xref.py +++ b/plotly/validators/layout/shape/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="layout.shape", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["paper", "/^x([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/shape/_xsizemode.py b/plotly/validators/layout/shape/_xsizemode.py index 34f9ead7a9..2041d0bf0a 100644 --- a/plotly/validators/layout/shape/_xsizemode.py +++ b/plotly/validators/layout/shape/_xsizemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XsizemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xsizemode", parent_name="layout.shape", **kwargs): - super(XsizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["scaled", "pixel"]), **kwargs, diff --git a/plotly/validators/layout/shape/_y0.py b/plotly/validators/layout/shape/_y0.py index 85f933f59a..ff84cf8848 100644 --- a/plotly/validators/layout/shape/_y0.py +++ b/plotly/validators/layout/shape/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="layout.shape", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_y0shift.py b/plotly/validators/layout/shape/_y0shift.py index ea5d94af0c..7a5aa68c12 100644 --- a/plotly/validators/layout/shape/_y0shift.py +++ b/plotly/validators/layout/shape/_y0shift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0ShiftValidator(_plotly_utils.basevalidators.NumberValidator): +class Y0ShiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="y0shift", parent_name="layout.shape", **kwargs): - super(Y0ShiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", -1), diff --git a/plotly/validators/layout/shape/_y1.py b/plotly/validators/layout/shape/_y1.py index a7b28a1d2d..636a5f9a92 100644 --- a/plotly/validators/layout/shape/_y1.py +++ b/plotly/validators/layout/shape/_y1.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y1Validator(_plotly_utils.basevalidators.AnyValidator): +class Y1Validator(_bv.AnyValidator): def __init__(self, plotly_name="y1", parent_name="layout.shape", **kwargs): - super(Y1Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_y1shift.py b/plotly/validators/layout/shape/_y1shift.py index 47c142afd1..3c8335b8a3 100644 --- a/plotly/validators/layout/shape/_y1shift.py +++ b/plotly/validators/layout/shape/_y1shift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y1ShiftValidator(_plotly_utils.basevalidators.NumberValidator): +class Y1ShiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="y1shift", parent_name="layout.shape", **kwargs): - super(Y1ShiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", -1), diff --git a/plotly/validators/layout/shape/_yanchor.py b/plotly/validators/layout/shape/_yanchor.py index 3cad26d102..fc13d5ca22 100644 --- a/plotly/validators/layout/shape/_yanchor.py +++ b/plotly/validators/layout/shape/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.AnyValidator): +class YanchorValidator(_bv.AnyValidator): def __init__(self, plotly_name="yanchor", parent_name="layout.shape", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/_yref.py b/plotly/validators/layout/shape/_yref.py index d362c4151c..5d9d1e0dbe 100644 --- a/plotly/validators/layout/shape/_yref.py +++ b/plotly/validators/layout/shape/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="layout.shape", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["paper", "/^y([2-9]|[1-9][0-9]+)?( domain)?$/"] diff --git a/plotly/validators/layout/shape/_ysizemode.py b/plotly/validators/layout/shape/_ysizemode.py index 8659ab0e61..bc4beacb2f 100644 --- a/plotly/validators/layout/shape/_ysizemode.py +++ b/plotly/validators/layout/shape/_ysizemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YsizemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ysizemode", parent_name="layout.shape", **kwargs): - super(YsizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["scaled", "pixel"]), **kwargs, diff --git a/plotly/validators/layout/shape/label/__init__.py b/plotly/validators/layout/shape/label/__init__.py index c6a5f99963..215b669f84 100644 --- a/plotly/validators/layout/shape/label/__init__.py +++ b/plotly/validators/layout/shape/label/__init__.py @@ -1,29 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yanchor import YanchorValidator - from ._xanchor import XanchorValidator - from ._texttemplate import TexttemplateValidator - from ._textposition import TextpositionValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._padding import PaddingValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yanchor.YanchorValidator", - "._xanchor.XanchorValidator", - "._texttemplate.TexttemplateValidator", - "._textposition.TextpositionValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._padding.PaddingValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._xanchor.XanchorValidator", + "._texttemplate.TexttemplateValidator", + "._textposition.TextpositionValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._padding.PaddingValidator", + "._font.FontValidator", + ], +) diff --git a/plotly/validators/layout/shape/label/_font.py b/plotly/validators/layout/shape/label/_font.py index a6868456d4..f212217b66 100644 --- a/plotly/validators/layout/shape/label/_font.py +++ b/plotly/validators/layout/shape/label/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.shape.label", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/shape/label/_padding.py b/plotly/validators/layout/shape/label/_padding.py index dadd7669ad..c2750f0a91 100644 --- a/plotly/validators/layout/shape/label/_padding.py +++ b/plotly/validators/layout/shape/label/_padding.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PaddingValidator(_plotly_utils.basevalidators.NumberValidator): +class PaddingValidator(_bv.NumberValidator): def __init__( self, plotly_name="padding", parent_name="layout.shape.label", **kwargs ): - super(PaddingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/shape/label/_text.py b/plotly/validators/layout/shape/label/_text.py index 59b00bfe98..d05f9981e4 100644 --- a/plotly/validators/layout/shape/label/_text.py +++ b/plotly/validators/layout/shape/label/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.shape.label", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/label/_textangle.py b/plotly/validators/layout/shape/label/_textangle.py index 6934194a77..8d3b4fb1de 100644 --- a/plotly/validators/layout/shape/label/_textangle.py +++ b/plotly/validators/layout/shape/label/_textangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="textangle", parent_name="layout.shape.label", **kwargs ): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/label/_textposition.py b/plotly/validators/layout/shape/label/_textposition.py index 4201b92d67..c2968e1061 100644 --- a/plotly/validators/layout/shape/label/_textposition.py +++ b/plotly/validators/layout/shape/label/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="layout.shape.label", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/shape/label/_texttemplate.py b/plotly/validators/layout/shape/label/_texttemplate.py index 76a0eb7439..e4c2eea7b8 100644 --- a/plotly/validators/layout/shape/label/_texttemplate.py +++ b/plotly/validators/layout/shape/label/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="layout.shape.label", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/label/_xanchor.py b/plotly/validators/layout/shape/label/_xanchor.py index 2ce86e0fff..87b99f7a75 100644 --- a/plotly/validators/layout/shape/label/_xanchor.py +++ b/plotly/validators/layout/shape/label/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.shape.label", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/shape/label/_yanchor.py b/plotly/validators/layout/shape/label/_yanchor.py index d5da6312aa..90c57d9469 100644 --- a/plotly/validators/layout/shape/label/_yanchor.py +++ b/plotly/validators/layout/shape/label/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.shape.label", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/shape/label/font/__init__.py b/plotly/validators/layout/shape/label/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/shape/label/font/__init__.py +++ b/plotly/validators/layout/shape/label/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/shape/label/font/_color.py b/plotly/validators/layout/shape/label/font/_color.py index aad3e1590c..766d17c78c 100644 --- a/plotly/validators/layout/shape/label/font/_color.py +++ b/plotly/validators/layout/shape/label/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.shape.label.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/label/font/_family.py b/plotly/validators/layout/shape/label/font/_family.py index 63cb58e9fe..2d0c1e50d3 100644 --- a/plotly/validators/layout/shape/label/font/_family.py +++ b/plotly/validators/layout/shape/label/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.shape.label.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/shape/label/font/_lineposition.py b/plotly/validators/layout/shape/label/font/_lineposition.py index cd5e2f8430..f4b208cc94 100644 --- a/plotly/validators/layout/shape/label/font/_lineposition.py +++ b/plotly/validators/layout/shape/label/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.shape.label.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/shape/label/font/_shadow.py b/plotly/validators/layout/shape/label/font/_shadow.py index bf1c8415b0..d6e3fa5295 100644 --- a/plotly/validators/layout/shape/label/font/_shadow.py +++ b/plotly/validators/layout/shape/label/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.shape.label.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/label/font/_size.py b/plotly/validators/layout/shape/label/font/_size.py index 4635de948e..bd0a8111ab 100644 --- a/plotly/validators/layout/shape/label/font/_size.py +++ b/plotly/validators/layout/shape/label/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.shape.label.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/shape/label/font/_style.py b/plotly/validators/layout/shape/label/font/_style.py index a65bd892bd..ae8ab915e4 100644 --- a/plotly/validators/layout/shape/label/font/_style.py +++ b/plotly/validators/layout/shape/label/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.shape.label.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/shape/label/font/_textcase.py b/plotly/validators/layout/shape/label/font/_textcase.py index d4cb7f787d..e9097f83d4 100644 --- a/plotly/validators/layout/shape/label/font/_textcase.py +++ b/plotly/validators/layout/shape/label/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.shape.label.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/shape/label/font/_variant.py b/plotly/validators/layout/shape/label/font/_variant.py index 9234bfbb1d..4b5d6c75fc 100644 --- a/plotly/validators/layout/shape/label/font/_variant.py +++ b/plotly/validators/layout/shape/label/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.shape.label.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/shape/label/font/_weight.py b/plotly/validators/layout/shape/label/font/_weight.py index ec82a919e0..c1538401ee 100644 --- a/plotly/validators/layout/shape/label/font/_weight.py +++ b/plotly/validators/layout/shape/label/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.shape.label.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/shape/legendgrouptitle/__init__.py b/plotly/validators/layout/shape/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/__init__.py +++ b/plotly/validators/layout/shape/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/shape/legendgrouptitle/_font.py b/plotly/validators/layout/shape/legendgrouptitle/_font.py index b3b2e55070..f5e643ef90 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/_font.py +++ b/plotly/validators/layout/shape/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.shape.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/shape/legendgrouptitle/_text.py b/plotly/validators/layout/shape/legendgrouptitle/_text.py index 8161016e95..a5ba332916 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/_text.py +++ b/plotly/validators/layout/shape/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.shape.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/__init__.py b/plotly/validators/layout/shape/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/__init__.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_color.py b/plotly/validators/layout/shape/legendgrouptitle/font/_color.py index bb0fc5affa..959505ea67 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_color.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_family.py b/plotly/validators/layout/shape/legendgrouptitle/font/_family.py index 3aa7ed94f8..49d9ece168 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_family.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_lineposition.py b/plotly/validators/layout/shape/legendgrouptitle/font/_lineposition.py index 5e784eb6ef..01284cc609 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_shadow.py b/plotly/validators/layout/shape/legendgrouptitle/font/_shadow.py index 61ed7e48d6..76664da7f6 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_size.py b/plotly/validators/layout/shape/legendgrouptitle/font/_size.py index c0e5adc6ec..8ad6ad244d 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_size.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_style.py b/plotly/validators/layout/shape/legendgrouptitle/font/_style.py index ce6d3daacb..812dcfd882 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_style.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_textcase.py b/plotly/validators/layout/shape/legendgrouptitle/font/_textcase.py index 3a57aa9de3..fd062584c5 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_variant.py b/plotly/validators/layout/shape/legendgrouptitle/font/_variant.py index 40f9c35811..1207944f6a 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_variant.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/shape/legendgrouptitle/font/_weight.py b/plotly/validators/layout/shape/legendgrouptitle/font/_weight.py index f55a2e319b..e030a600d9 100644 --- a/plotly/validators/layout/shape/legendgrouptitle/font/_weight.py +++ b/plotly/validators/layout/shape/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.shape.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/shape/line/__init__.py b/plotly/validators/layout/shape/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/layout/shape/line/__init__.py +++ b/plotly/validators/layout/shape/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/layout/shape/line/_color.py b/plotly/validators/layout/shape/line/_color.py index c1075a2715..9ec9230250 100644 --- a/plotly/validators/layout/shape/line/_color.py +++ b/plotly/validators/layout/shape/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.shape.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, diff --git a/plotly/validators/layout/shape/line/_dash.py b/plotly/validators/layout/shape/line/_dash.py index 86b5e089a8..9056409fca 100644 --- a/plotly/validators/layout/shape/line/_dash.py +++ b/plotly/validators/layout/shape/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="layout.shape.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/shape/line/_width.py b/plotly/validators/layout/shape/line/_width.py index 9861373927..144bdd77ac 100644 --- a/plotly/validators/layout/shape/line/_width.py +++ b/plotly/validators/layout/shape/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="layout.shape.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+arraydraw"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/slider/__init__.py b/plotly/validators/layout/slider/__init__.py index 54bb79b340..707979274f 100644 --- a/plotly/validators/layout/slider/__init__.py +++ b/plotly/validators/layout/slider/__init__.py @@ -1,61 +1,33 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._transition import TransitionValidator - from ._tickwidth import TickwidthValidator - from ._ticklen import TicklenValidator - from ._tickcolor import TickcolorValidator - from ._templateitemname import TemplateitemnameValidator - from ._stepdefaults import StepdefaultsValidator - from ._steps import StepsValidator - from ._pad import PadValidator - from ._name import NameValidator - from ._minorticklen import MinorticklenValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._font import FontValidator - from ._currentvalue import CurrentvalueValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._activebgcolor import ActivebgcolorValidator - from ._active import ActiveValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._transition.TransitionValidator", - "._tickwidth.TickwidthValidator", - "._ticklen.TicklenValidator", - "._tickcolor.TickcolorValidator", - "._templateitemname.TemplateitemnameValidator", - "._stepdefaults.StepdefaultsValidator", - "._steps.StepsValidator", - "._pad.PadValidator", - "._name.NameValidator", - "._minorticklen.MinorticklenValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._font.FontValidator", - "._currentvalue.CurrentvalueValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._activebgcolor.ActivebgcolorValidator", - "._active.ActiveValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._transition.TransitionValidator", + "._tickwidth.TickwidthValidator", + "._ticklen.TicklenValidator", + "._tickcolor.TickcolorValidator", + "._templateitemname.TemplateitemnameValidator", + "._stepdefaults.StepdefaultsValidator", + "._steps.StepsValidator", + "._pad.PadValidator", + "._name.NameValidator", + "._minorticklen.MinorticklenValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._font.FontValidator", + "._currentvalue.CurrentvalueValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._activebgcolor.ActivebgcolorValidator", + "._active.ActiveValidator", + ], +) diff --git a/plotly/validators/layout/slider/_active.py b/plotly/validators/layout/slider/_active.py index ee6b622d71..5ebe98d170 100644 --- a/plotly/validators/layout/slider/_active.py +++ b/plotly/validators/layout/slider/_active.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActiveValidator(_plotly_utils.basevalidators.NumberValidator): +class ActiveValidator(_bv.NumberValidator): def __init__(self, plotly_name="active", parent_name="layout.slider", **kwargs): - super(ActiveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/_activebgcolor.py b/plotly/validators/layout/slider/_activebgcolor.py index f7f3a57a3a..f263ffe8dc 100644 --- a/plotly/validators/layout/slider/_activebgcolor.py +++ b/plotly/validators/layout/slider/_activebgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActivebgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ActivebgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="activebgcolor", parent_name="layout.slider", **kwargs ): - super(ActivebgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_bgcolor.py b/plotly/validators/layout/slider/_bgcolor.py index dc71427341..562f77c1bd 100644 --- a/plotly/validators/layout/slider/_bgcolor.py +++ b/plotly/validators/layout/slider/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.slider", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_bordercolor.py b/plotly/validators/layout/slider/_bordercolor.py index 7df82b57a0..66cbde0158 100644 --- a/plotly/validators/layout/slider/_bordercolor.py +++ b/plotly/validators/layout/slider/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.slider", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_borderwidth.py b/plotly/validators/layout/slider/_borderwidth.py index af1c7e54b3..03df1fc5f0 100644 --- a/plotly/validators/layout/slider/_borderwidth.py +++ b/plotly/validators/layout/slider/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.slider", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/_currentvalue.py b/plotly/validators/layout/slider/_currentvalue.py index 2dccc62d5f..df426b1c31 100644 --- a/plotly/validators/layout/slider/_currentvalue.py +++ b/plotly/validators/layout/slider/_currentvalue.py @@ -1,34 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CurrentvalueValidator(_plotly_utils.basevalidators.CompoundValidator): +class CurrentvalueValidator(_bv.CompoundValidator): def __init__( self, plotly_name="currentvalue", parent_name="layout.slider", **kwargs ): - super(CurrentvalueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Currentvalue"), data_docs=kwargs.pop( "data_docs", """ - font - Sets the font of the current value label text. - offset - The amount of space, in pixels, between the - current value label and the slider. - prefix - When currentvalue.visible is true, this sets - the prefix of the label. - suffix - When currentvalue.visible is true, this sets - the suffix of the label. - visible - Shows the currently-selected value above the - slider. - xanchor - The alignment of the value readout relative to - the length of the slider. """, ), **kwargs, diff --git a/plotly/validators/layout/slider/_font.py b/plotly/validators/layout/slider/_font.py index 25c97ddaf8..deca928758 100644 --- a/plotly/validators/layout/slider/_font.py +++ b/plotly/validators/layout/slider/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.slider", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/slider/_len.py b/plotly/validators/layout/slider/_len.py index 4c32d579e0..17106e83eb 100644 --- a/plotly/validators/layout/slider/_len.py +++ b/plotly/validators/layout/slider/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="layout.slider", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/_lenmode.py b/plotly/validators/layout/slider/_lenmode.py index 66c638d128..ab27ce9293 100644 --- a/plotly/validators/layout/slider/_lenmode.py +++ b/plotly/validators/layout/slider/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="layout.slider", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/layout/slider/_minorticklen.py b/plotly/validators/layout/slider/_minorticklen.py index adba18a6a0..0de6a775d3 100644 --- a/plotly/validators/layout/slider/_minorticklen.py +++ b/plotly/validators/layout/slider/_minorticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorticklenValidator(_plotly_utils.basevalidators.NumberValidator): +class MinorticklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="minorticklen", parent_name="layout.slider", **kwargs ): - super(MinorticklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/_name.py b/plotly/validators/layout/slider/_name.py index 3989f9f350..f1cd420645 100644 --- a/plotly/validators/layout/slider/_name.py +++ b/plotly/validators/layout/slider/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.slider", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_pad.py b/plotly/validators/layout/slider/_pad.py index d80669a017..80e23c6766 100644 --- a/plotly/validators/layout/slider/_pad.py +++ b/plotly/validators/layout/slider/_pad.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): +class PadValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pad", parent_name="layout.slider", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pad"), data_docs=kwargs.pop( "data_docs", """ - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. """, ), **kwargs, diff --git a/plotly/validators/layout/slider/_stepdefaults.py b/plotly/validators/layout/slider/_stepdefaults.py index 9eff359b83..fe5bdd2b69 100644 --- a/plotly/validators/layout/slider/_stepdefaults.py +++ b/plotly/validators/layout/slider/_stepdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class StepdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="stepdefaults", parent_name="layout.slider", **kwargs ): - super(StepdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Step"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/slider/_steps.py b/plotly/validators/layout/slider/_steps.py index c2f6b1f0c7..001329262b 100644 --- a/plotly/validators/layout/slider/_steps.py +++ b/plotly/validators/layout/slider/_steps.py @@ -1,66 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class StepsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="steps", parent_name="layout.slider", **kwargs): - super(StepsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Step"), data_docs=kwargs.pop( "data_docs", """ - args - Sets the arguments values to be passed to the - Plotly method set in `method` on slide. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_sliderchange` method and executing the - API command manually without losing the benefit - of the slider automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the slider - method - Sets the Plotly method to be called when the - slider value is changed. If the `skip` method - is used, the API slider will function as normal - but will perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to slider events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - Sets the value of the slider step, used to - refer to the step programatically. Defaults to - the slider label if not provided. - visible - Determines whether or not this step is included - in the slider. """, ), **kwargs, diff --git a/plotly/validators/layout/slider/_templateitemname.py b/plotly/validators/layout/slider/_templateitemname.py index 7db9a9067d..ff2be4ffd5 100644 --- a/plotly/validators/layout/slider/_templateitemname.py +++ b/plotly/validators/layout/slider/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.slider", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_tickcolor.py b/plotly/validators/layout/slider/_tickcolor.py index 3581c3028c..0fcb12f1a1 100644 --- a/plotly/validators/layout/slider/_tickcolor.py +++ b/plotly/validators/layout/slider/_tickcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="tickcolor", parent_name="layout.slider", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_ticklen.py b/plotly/validators/layout/slider/_ticklen.py index de63d0a57c..f1afbd09de 100644 --- a/plotly/validators/layout/slider/_ticklen.py +++ b/plotly/validators/layout/slider/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="layout.slider", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/_tickwidth.py b/plotly/validators/layout/slider/_tickwidth.py index f23e5c15e3..271207183b 100644 --- a/plotly/validators/layout/slider/_tickwidth.py +++ b/plotly/validators/layout/slider/_tickwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="tickwidth", parent_name="layout.slider", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/_transition.py b/plotly/validators/layout/slider/_transition.py index dd5261b97b..353eb7eb5f 100644 --- a/plotly/validators/layout/slider/_transition.py +++ b/plotly/validators/layout/slider/_transition.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TransitionValidator(_plotly_utils.basevalidators.CompoundValidator): +class TransitionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="transition", parent_name="layout.slider", **kwargs): - super(TransitionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Transition"), data_docs=kwargs.pop( "data_docs", """ - duration - Sets the duration of the slider transition - easing - Sets the easing function of the slider - transition """, ), **kwargs, diff --git a/plotly/validators/layout/slider/_visible.py b/plotly/validators/layout/slider/_visible.py index b91186fad3..c5b1a4fe62 100644 --- a/plotly/validators/layout/slider/_visible.py +++ b/plotly/validators/layout/slider/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.slider", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/_x.py b/plotly/validators/layout/slider/_x.py index c65f3a28f5..f54cb70bb5 100644 --- a/plotly/validators/layout/slider/_x.py +++ b/plotly/validators/layout/slider/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="layout.slider", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 3), min=kwargs.pop("min", -2), diff --git a/plotly/validators/layout/slider/_xanchor.py b/plotly/validators/layout/slider/_xanchor.py index 878baf15ee..7602bbe231 100644 --- a/plotly/validators/layout/slider/_xanchor.py +++ b/plotly/validators/layout/slider/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="layout.slider", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/slider/_y.py b/plotly/validators/layout/slider/_y.py index 95248eb93c..2ba81d118e 100644 --- a/plotly/validators/layout/slider/_y.py +++ b/plotly/validators/layout/slider/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="layout.slider", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 3), min=kwargs.pop("min", -2), diff --git a/plotly/validators/layout/slider/_yanchor.py b/plotly/validators/layout/slider/_yanchor.py index 59e60fb6ea..65e7cc295a 100644 --- a/plotly/validators/layout/slider/_yanchor.py +++ b/plotly/validators/layout/slider/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="layout.slider", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/slider/currentvalue/__init__.py b/plotly/validators/layout/slider/currentvalue/__init__.py index 7d45ab0ca0..4bf8b638e8 100644 --- a/plotly/validators/layout/slider/currentvalue/__init__.py +++ b/plotly/validators/layout/slider/currentvalue/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._xanchor import XanchorValidator - from ._visible import VisibleValidator - from ._suffix import SuffixValidator - from ._prefix import PrefixValidator - from ._offset import OffsetValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._xanchor.XanchorValidator", - "._visible.VisibleValidator", - "._suffix.SuffixValidator", - "._prefix.PrefixValidator", - "._offset.OffsetValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._xanchor.XanchorValidator", + "._visible.VisibleValidator", + "._suffix.SuffixValidator", + "._prefix.PrefixValidator", + "._offset.OffsetValidator", + "._font.FontValidator", + ], +) diff --git a/plotly/validators/layout/slider/currentvalue/_font.py b/plotly/validators/layout/slider/currentvalue/_font.py index 386030113e..146eed6c68 100644 --- a/plotly/validators/layout/slider/currentvalue/_font.py +++ b/plotly/validators/layout/slider/currentvalue/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.slider.currentvalue", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/slider/currentvalue/_offset.py b/plotly/validators/layout/slider/currentvalue/_offset.py index 244808499b..f1ecbe3fcb 100644 --- a/plotly/validators/layout/slider/currentvalue/_offset.py +++ b/plotly/validators/layout/slider/currentvalue/_offset.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__( self, plotly_name="offset", parent_name="layout.slider.currentvalue", **kwargs ): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/currentvalue/_prefix.py b/plotly/validators/layout/slider/currentvalue/_prefix.py index 14734e394d..836241e5fe 100644 --- a/plotly/validators/layout/slider/currentvalue/_prefix.py +++ b/plotly/validators/layout/slider/currentvalue/_prefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): +class PrefixValidator(_bv.StringValidator): def __init__( self, plotly_name="prefix", parent_name="layout.slider.currentvalue", **kwargs ): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/currentvalue/_suffix.py b/plotly/validators/layout/slider/currentvalue/_suffix.py index 1999b6fad5..835194e646 100644 --- a/plotly/validators/layout/slider/currentvalue/_suffix.py +++ b/plotly/validators/layout/slider/currentvalue/_suffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): +class SuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="suffix", parent_name="layout.slider.currentvalue", **kwargs ): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/currentvalue/_visible.py b/plotly/validators/layout/slider/currentvalue/_visible.py index 43cde0777b..d59f5a9d11 100644 --- a/plotly/validators/layout/slider/currentvalue/_visible.py +++ b/plotly/validators/layout/slider/currentvalue/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.slider.currentvalue", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/currentvalue/_xanchor.py b/plotly/validators/layout/slider/currentvalue/_xanchor.py index e1e9ef0aaa..9d57a5e9dc 100644 --- a/plotly/validators/layout/slider/currentvalue/_xanchor.py +++ b/plotly/validators/layout/slider/currentvalue/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.slider.currentvalue", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/slider/currentvalue/font/__init__.py b/plotly/validators/layout/slider/currentvalue/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/slider/currentvalue/font/__init__.py +++ b/plotly/validators/layout/slider/currentvalue/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/slider/currentvalue/font/_color.py b/plotly/validators/layout/slider/currentvalue/font/_color.py index d4f39799a7..ddb4be5c5f 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_color.py +++ b/plotly/validators/layout/slider/currentvalue/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/currentvalue/font/_family.py b/plotly/validators/layout/slider/currentvalue/font/_family.py index 6d3d9b14bd..a4d81e1f25 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_family.py +++ b/plotly/validators/layout/slider/currentvalue/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/slider/currentvalue/font/_lineposition.py b/plotly/validators/layout/slider/currentvalue/font/_lineposition.py index 659c9723dc..ec5d16a357 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_lineposition.py +++ b/plotly/validators/layout/slider/currentvalue/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/slider/currentvalue/font/_shadow.py b/plotly/validators/layout/slider/currentvalue/font/_shadow.py index d6d1431e84..7b66efa6b4 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_shadow.py +++ b/plotly/validators/layout/slider/currentvalue/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/currentvalue/font/_size.py b/plotly/validators/layout/slider/currentvalue/font/_size.py index bd4d814ca2..3adf4c7b3b 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_size.py +++ b/plotly/validators/layout/slider/currentvalue/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/slider/currentvalue/font/_style.py b/plotly/validators/layout/slider/currentvalue/font/_style.py index caf3ed8a5c..9ba0f34750 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_style.py +++ b/plotly/validators/layout/slider/currentvalue/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/slider/currentvalue/font/_textcase.py b/plotly/validators/layout/slider/currentvalue/font/_textcase.py index 9c47d0720f..7615763799 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_textcase.py +++ b/plotly/validators/layout/slider/currentvalue/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/slider/currentvalue/font/_variant.py b/plotly/validators/layout/slider/currentvalue/font/_variant.py index d8c6e8896c..d97860066a 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_variant.py +++ b/plotly/validators/layout/slider/currentvalue/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/slider/currentvalue/font/_weight.py b/plotly/validators/layout/slider/currentvalue/font/_weight.py index 01192ea148..f2f1eeff49 100644 --- a/plotly/validators/layout/slider/currentvalue/font/_weight.py +++ b/plotly/validators/layout/slider/currentvalue/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.slider.currentvalue.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/slider/font/__init__.py b/plotly/validators/layout/slider/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/slider/font/__init__.py +++ b/plotly/validators/layout/slider/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/slider/font/_color.py b/plotly/validators/layout/slider/font/_color.py index a06e2039c1..31c165909e 100644 --- a/plotly/validators/layout/slider/font/_color.py +++ b/plotly/validators/layout/slider/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.slider.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/font/_family.py b/plotly/validators/layout/slider/font/_family.py index f787aff219..a800e8e1d9 100644 --- a/plotly/validators/layout/slider/font/_family.py +++ b/plotly/validators/layout/slider/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.slider.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/slider/font/_lineposition.py b/plotly/validators/layout/slider/font/_lineposition.py index b74ca1010c..be2d198935 100644 --- a/plotly/validators/layout/slider/font/_lineposition.py +++ b/plotly/validators/layout/slider/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.slider.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/slider/font/_shadow.py b/plotly/validators/layout/slider/font/_shadow.py index f9f8047333..efbba4d307 100644 --- a/plotly/validators/layout/slider/font/_shadow.py +++ b/plotly/validators/layout/slider/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.slider.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/font/_size.py b/plotly/validators/layout/slider/font/_size.py index f47cb9f63b..7e25e5e28a 100644 --- a/plotly/validators/layout/slider/font/_size.py +++ b/plotly/validators/layout/slider/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="layout.slider.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/slider/font/_style.py b/plotly/validators/layout/slider/font/_style.py index 2bef10c36b..f0a50289da 100644 --- a/plotly/validators/layout/slider/font/_style.py +++ b/plotly/validators/layout/slider/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="layout.slider.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/slider/font/_textcase.py b/plotly/validators/layout/slider/font/_textcase.py index f3c9a13b3a..326fd05079 100644 --- a/plotly/validators/layout/slider/font/_textcase.py +++ b/plotly/validators/layout/slider/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.slider.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/slider/font/_variant.py b/plotly/validators/layout/slider/font/_variant.py index 958738d6d7..86cbc06abc 100644 --- a/plotly/validators/layout/slider/font/_variant.py +++ b/plotly/validators/layout/slider/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.slider.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/slider/font/_weight.py b/plotly/validators/layout/slider/font/_weight.py index 89787f4947..114bacd7ba 100644 --- a/plotly/validators/layout/slider/font/_weight.py +++ b/plotly/validators/layout/slider/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.slider.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/slider/pad/__init__.py b/plotly/validators/layout/slider/pad/__init__.py index 04e64dbc5e..4189bfbe1f 100644 --- a/plotly/validators/layout/slider/pad/__init__.py +++ b/plotly/validators/layout/slider/pad/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._t import TValidator - from ._r import RValidator - from ._l import LValidator - from ._b import BValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], +) diff --git a/plotly/validators/layout/slider/pad/_b.py b/plotly/validators/layout/slider/pad/_b.py index db7707de5d..20e4b66f76 100644 --- a/plotly/validators/layout/slider/pad/_b.py +++ b/plotly/validators/layout/slider/pad/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.NumberValidator): +class BValidator(_bv.NumberValidator): def __init__(self, plotly_name="b", parent_name="layout.slider.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/pad/_l.py b/plotly/validators/layout/slider/pad/_l.py index a22bd4e56c..972629cb9d 100644 --- a/plotly/validators/layout/slider/pad/_l.py +++ b/plotly/validators/layout/slider/pad/_l.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LValidator(_plotly_utils.basevalidators.NumberValidator): +class LValidator(_bv.NumberValidator): def __init__(self, plotly_name="l", parent_name="layout.slider.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/pad/_r.py b/plotly/validators/layout/slider/pad/_r.py index 93b4397102..e0c59ebaf3 100644 --- a/plotly/validators/layout/slider/pad/_r.py +++ b/plotly/validators/layout/slider/pad/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.NumberValidator): +class RValidator(_bv.NumberValidator): def __init__(self, plotly_name="r", parent_name="layout.slider.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/pad/_t.py b/plotly/validators/layout/slider/pad/_t.py index 1da3e539cc..a77a0c90aa 100644 --- a/plotly/validators/layout/slider/pad/_t.py +++ b/plotly/validators/layout/slider/pad/_t.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TValidator(_plotly_utils.basevalidators.NumberValidator): +class TValidator(_bv.NumberValidator): def __init__(self, plotly_name="t", parent_name="layout.slider.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/step/__init__.py b/plotly/validators/layout/slider/step/__init__.py index 8abecadfbd..945d93ed7f 100644 --- a/plotly/validators/layout/slider/step/__init__.py +++ b/plotly/validators/layout/slider/step/__init__.py @@ -1,29 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._method import MethodValidator - from ._label import LabelValidator - from ._execute import ExecuteValidator - from ._args import ArgsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._method.MethodValidator", - "._label.LabelValidator", - "._execute.ExecuteValidator", - "._args.ArgsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._method.MethodValidator", + "._label.LabelValidator", + "._execute.ExecuteValidator", + "._args.ArgsValidator", + ], +) diff --git a/plotly/validators/layout/slider/step/_args.py b/plotly/validators/layout/slider/step/_args.py index 8a4af5719f..b6993cf795 100644 --- a/plotly/validators/layout/slider/step/_args.py +++ b/plotly/validators/layout/slider/step/_args.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArgsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ArgsValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="args", parent_name="layout.slider.step", **kwargs): - super(ArgsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/layout/slider/step/_execute.py b/plotly/validators/layout/slider/step/_execute.py index 9253f7afe1..9649ef4ddc 100644 --- a/plotly/validators/layout/slider/step/_execute.py +++ b/plotly/validators/layout/slider/step/_execute.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExecuteValidator(_bv.BooleanValidator): def __init__( self, plotly_name="execute", parent_name="layout.slider.step", **kwargs ): - super(ExecuteValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/step/_label.py b/plotly/validators/layout/slider/step/_label.py index fc68a65250..14a137d5b4 100644 --- a/plotly/validators/layout/slider/step/_label.py +++ b/plotly/validators/layout/slider/step/_label.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__(self, plotly_name="label", parent_name="layout.slider.step", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/step/_method.py b/plotly/validators/layout/slider/step/_method.py index e15d213191..3a8527e1a9 100644 --- a/plotly/validators/layout/slider/step/_method.py +++ b/plotly/validators/layout/slider/step/_method.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MethodValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="method", parent_name="layout.slider.step", **kwargs ): - super(MethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["restyle", "relayout", "animate", "update", "skip"] diff --git a/plotly/validators/layout/slider/step/_name.py b/plotly/validators/layout/slider/step/_name.py index 4ca1bf0155..5823c62d30 100644 --- a/plotly/validators/layout/slider/step/_name.py +++ b/plotly/validators/layout/slider/step/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.slider.step", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/step/_templateitemname.py b/plotly/validators/layout/slider/step/_templateitemname.py index 9faef2901e..1f28f9f63b 100644 --- a/plotly/validators/layout/slider/step/_templateitemname.py +++ b/plotly/validators/layout/slider/step/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.slider.step", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/step/_value.py b/plotly/validators/layout/slider/step/_value.py index fa77517e27..101880aa30 100644 --- a/plotly/validators/layout/slider/step/_value.py +++ b/plotly/validators/layout/slider/step/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__(self, plotly_name="value", parent_name="layout.slider.step", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/step/_visible.py b/plotly/validators/layout/slider/step/_visible.py index 447d96fbf8..d7076ddd0d 100644 --- a/plotly/validators/layout/slider/step/_visible.py +++ b/plotly/validators/layout/slider/step/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.slider.step", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/slider/transition/__init__.py b/plotly/validators/layout/slider/transition/__init__.py index 7d9860a84d..817ac2685a 100644 --- a/plotly/validators/layout/slider/transition/__init__.py +++ b/plotly/validators/layout/slider/transition/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._easing import EasingValidator - from ._duration import DurationValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._easing.EasingValidator", "._duration.DurationValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._easing.EasingValidator", "._duration.DurationValidator"] +) diff --git a/plotly/validators/layout/slider/transition/_duration.py b/plotly/validators/layout/slider/transition/_duration.py index 9dbb57cb48..ad72a3b54b 100644 --- a/plotly/validators/layout/slider/transition/_duration.py +++ b/plotly/validators/layout/slider/transition/_duration.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DurationValidator(_plotly_utils.basevalidators.NumberValidator): +class DurationValidator(_bv.NumberValidator): def __init__( self, plotly_name="duration", parent_name="layout.slider.transition", **kwargs ): - super(DurationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/slider/transition/_easing.py b/plotly/validators/layout/slider/transition/_easing.py index 6a9adbdeed..bd1b6e6a01 100644 --- a/plotly/validators/layout/slider/transition/_easing.py +++ b/plotly/validators/layout/slider/transition/_easing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class EasingValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="easing", parent_name="layout.slider.transition", **kwargs ): - super(EasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/smith/__init__.py b/plotly/validators/layout/smith/__init__.py index afc951432f..efd6471648 100644 --- a/plotly/validators/layout/smith/__init__.py +++ b/plotly/validators/layout/smith/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._realaxis import RealaxisValidator - from ._imaginaryaxis import ImaginaryaxisValidator - from ._domain import DomainValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._realaxis.RealaxisValidator", - "._imaginaryaxis.ImaginaryaxisValidator", - "._domain.DomainValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._realaxis.RealaxisValidator", + "._imaginaryaxis.ImaginaryaxisValidator", + "._domain.DomainValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/layout/smith/_bgcolor.py b/plotly/validators/layout/smith/_bgcolor.py index ddc3d8d1bf..594dce590a 100644 --- a/plotly/validators/layout/smith/_bgcolor.py +++ b/plotly/validators/layout/smith/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.smith", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/_domain.py b/plotly/validators/layout/smith/_domain.py index d2623eda7e..b443d2ddb4 100644 --- a/plotly/validators/layout/smith/_domain.py +++ b/plotly/validators/layout/smith/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.smith", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this smith subplot - . - row - If there is a layout grid, use the domain for - this row in the grid for this smith subplot . - x - Sets the horizontal domain of this smith - subplot (in plot fraction). - y - Sets the vertical domain of this smith subplot - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/layout/smith/_imaginaryaxis.py b/plotly/validators/layout/smith/_imaginaryaxis.py index 64ea5f9407..02e922d432 100644 --- a/plotly/validators/layout/smith/_imaginaryaxis.py +++ b/plotly/validators/layout/smith/_imaginaryaxis.py @@ -1,133 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImaginaryaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class ImaginaryaxisValidator(_bv.CompoundValidator): def __init__( self, plotly_name="imaginaryaxis", parent_name="layout.smith", **kwargs ): - super(ImaginaryaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Imaginaryaxis"), data_docs=kwargs.pop( "data_docs", """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticklen - Sets the tick length (in px). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - tickvals - Sets the values at which ticks on this axis - appear. Defaults to `realaxis.tickvals` plus - the same as negatives and zero. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false """, ), **kwargs, diff --git a/plotly/validators/layout/smith/_realaxis.py b/plotly/validators/layout/smith/_realaxis.py index 16367a1d47..5eb8986d7c 100644 --- a/plotly/validators/layout/smith/_realaxis.py +++ b/plotly/validators/layout/smith/_realaxis.py @@ -1,137 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RealaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class RealaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="realaxis", parent_name="layout.smith", **kwargs): - super(RealaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Realaxis"), data_docs=kwargs.pop( "data_docs", """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - side - Determines on which side of real axis line the - tick and tick labels appear. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticklen - Sets the tick length (in px). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If "top" - ("bottom"), this axis' are drawn above (below) - the axis line. - ticksuffix - Sets a tick label suffix. - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - visible - A single toggle to hide the axis while - preserving interaction like dragging. Default - is true when a cheater plot is present on the - axis, otherwise false """, ), **kwargs, diff --git a/plotly/validators/layout/smith/domain/__init__.py b/plotly/validators/layout/smith/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/smith/domain/__init__.py +++ b/plotly/validators/layout/smith/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/smith/domain/_column.py b/plotly/validators/layout/smith/domain/_column.py index 2b7b61b194..7c037414a5 100644 --- a/plotly/validators/layout/smith/domain/_column.py +++ b/plotly/validators/layout/smith/domain/_column.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.smith.domain", **kwargs ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/domain/_row.py b/plotly/validators/layout/smith/domain/_row.py index 87674164ff..d597870fee 100644 --- a/plotly/validators/layout/smith/domain/_row.py +++ b/plotly/validators/layout/smith/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="layout.smith.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/domain/_x.py b/plotly/validators/layout/smith/domain/_x.py index 7a7b727601..1f2066edba 100644 --- a/plotly/validators/layout/smith/domain/_x.py +++ b/plotly/validators/layout/smith/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.smith.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/smith/domain/_y.py b/plotly/validators/layout/smith/domain/_y.py index 8b7fb032d7..3e03effdfe 100644 --- a/plotly/validators/layout/smith/domain/_y.py +++ b/plotly/validators/layout/smith/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.smith.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/smith/imaginaryaxis/__init__.py b/plotly/validators/layout/smith/imaginaryaxis/__init__.py index 6cb6e2eb06..73c1cf501b 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/__init__.py +++ b/plotly/validators/layout/smith/imaginaryaxis/__init__.py @@ -1,63 +1,34 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._ticklen import TicklenValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._ticklen.TicklenValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._ticklen.TicklenValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_color.py b/plotly/validators/layout/smith/imaginaryaxis/_color.py index bebbef2209..9dc3685259 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_color.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_gridcolor.py b/plotly/validators/layout/smith/imaginaryaxis/_gridcolor.py index c4b00bb21e..a76e183019 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_gridcolor.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_gridcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_griddash.py b/plotly/validators/layout/smith/imaginaryaxis/_griddash.py index 81af5c4040..a6d843d6a4 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_griddash.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/smith/imaginaryaxis/_gridwidth.py b/plotly/validators/layout/smith/imaginaryaxis/_gridwidth.py index add49d4eae..9eab81f325 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_gridwidth.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_gridwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_hoverformat.py b/plotly/validators/layout/smith/imaginaryaxis/_hoverformat.py index 56971fa3a2..9b463ded87 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_hoverformat.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_hoverformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_labelalias.py b/plotly/validators/layout/smith/imaginaryaxis/_labelalias.py index 4c03b1e0dd..0b50e5826d 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_labelalias.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_layer.py b/plotly/validators/layout/smith/imaginaryaxis/_layer.py index ba4a9623d9..04e9f74149 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_layer.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_linecolor.py b/plotly/validators/layout/smith/imaginaryaxis/_linecolor.py index 2f32347c89..c16dfce1d8 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_linecolor.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_linecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_linewidth.py b/plotly/validators/layout/smith/imaginaryaxis/_linewidth.py index 42c7a7fe35..3558e24e2c 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_linewidth.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_linewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_showgrid.py b/plotly/validators/layout/smith/imaginaryaxis/_showgrid.py index 5979082bc3..b16fbee338 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_showgrid.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_showline.py b/plotly/validators/layout/smith/imaginaryaxis/_showline.py index 89035731f3..1e191c10cf 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_showline.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_showticklabels.py b/plotly/validators/layout/smith/imaginaryaxis/_showticklabels.py index cadd9f5793..2d9d30c669 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_showticklabels.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_showtickprefix.py b/plotly/validators/layout/smith/imaginaryaxis/_showtickprefix.py index 008a21981b..b3b61e7b97 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_showtickprefix.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_showticksuffix.py b/plotly/validators/layout/smith/imaginaryaxis/_showticksuffix.py index 499911991f..375c32d8b9 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_showticksuffix.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickcolor.py b/plotly/validators/layout/smith/imaginaryaxis/_tickcolor.py index 476444cce4..58dc1aad38 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickcolor.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickfont.py b/plotly/validators/layout/smith/imaginaryaxis/_tickfont.py index 0822a7e61a..2f7d14f28a 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickfont.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickformat.py b/plotly/validators/layout/smith/imaginaryaxis/_tickformat.py index 73fb995b82..8ed14a1bcc 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickformat.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_ticklen.py b/plotly/validators/layout/smith/imaginaryaxis/_ticklen.py index 02e68c798d..07f032953a 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_ticklen.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickprefix.py b/plotly/validators/layout/smith/imaginaryaxis/_tickprefix.py index ee51f0b3e2..8196b19ff3 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickprefix.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_ticks.py b/plotly/validators/layout/smith/imaginaryaxis/_ticks.py index 7dba258e37..a283850292 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_ticks.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_ticksuffix.py b/plotly/validators/layout/smith/imaginaryaxis/_ticksuffix.py index bdd207293a..0e748d5613 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_ticksuffix.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickvals.py b/plotly/validators/layout/smith/imaginaryaxis/_tickvals.py index 0780e13a73..50b78a4015 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickvals.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickvalssrc.py b/plotly/validators/layout/smith/imaginaryaxis/_tickvalssrc.py index 56b36ac9cd..9caa922280 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickvalssrc.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/_tickwidth.py b/plotly/validators/layout/smith/imaginaryaxis/_tickwidth.py index 29f47d4fc5..9bb1051939 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_tickwidth.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.smith.imaginaryaxis", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/_visible.py b/plotly/validators/layout/smith/imaginaryaxis/_visible.py index e4c74b3cd3..19d5063018 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/_visible.py +++ b/plotly/validators/layout/smith/imaginaryaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.smith.imaginaryaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/__init__.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/__init__.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_color.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_color.py index faa650ef73..35b525a6f8 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_color.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_family.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_family.py index 44d5056bde..97d37e4975 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_family.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_lineposition.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_lineposition.py index ca54eaa883..ad2a9b3723 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_shadow.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_shadow.py index 1b4ebb40f6..0684a3ca5a 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_size.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_size.py index 3c65941605..0f98ae3b30 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_size.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_style.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_style.py index af8bc324dd..e49f0e9ce7 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_style.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_textcase.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_textcase.py index 16312ea64e..fc14576519 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_variant.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_variant.py index 173511e7a2..8e4118737c 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_variant.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_weight.py b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_weight.py index d643e1d9af..509a392816 100644 --- a/plotly/validators/layout/smith/imaginaryaxis/tickfont/_weight.py +++ b/plotly/validators/layout/smith/imaginaryaxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.smith.imaginaryaxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/smith/realaxis/__init__.py b/plotly/validators/layout/smith/realaxis/__init__.py index d70a1c4234..47f058f74e 100644 --- a/plotly/validators/layout/smith/realaxis/__init__.py +++ b/plotly/validators/layout/smith/realaxis/__init__.py @@ -1,67 +1,36 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._ticklen import TicklenValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._side import SideValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._ticklen.TicklenValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._side.SideValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._ticklen.TicklenValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/smith/realaxis/_color.py b/plotly/validators/layout/smith/realaxis/_color.py index 462acdffd2..0bbec6d453 100644 --- a/plotly/validators/layout/smith/realaxis/_color.py +++ b/plotly/validators/layout/smith/realaxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.smith.realaxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_gridcolor.py b/plotly/validators/layout/smith/realaxis/_gridcolor.py index b1ad35ff0e..cb903d7c6f 100644 --- a/plotly/validators/layout/smith/realaxis/_gridcolor.py +++ b/plotly/validators/layout/smith/realaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.smith.realaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_griddash.py b/plotly/validators/layout/smith/realaxis/_griddash.py index a5a842d5a6..929876a964 100644 --- a/plotly/validators/layout/smith/realaxis/_griddash.py +++ b/plotly/validators/layout/smith/realaxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.smith.realaxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/smith/realaxis/_gridwidth.py b/plotly/validators/layout/smith/realaxis/_gridwidth.py index ce891b907d..51db887308 100644 --- a/plotly/validators/layout/smith/realaxis/_gridwidth.py +++ b/plotly/validators/layout/smith/realaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.smith.realaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_hoverformat.py b/plotly/validators/layout/smith/realaxis/_hoverformat.py index 4aba26587d..c55b339120 100644 --- a/plotly/validators/layout/smith/realaxis/_hoverformat.py +++ b/plotly/validators/layout/smith/realaxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.smith.realaxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_labelalias.py b/plotly/validators/layout/smith/realaxis/_labelalias.py index 65d48cbc8c..9f30fbd6b9 100644 --- a/plotly/validators/layout/smith/realaxis/_labelalias.py +++ b/plotly/validators/layout/smith/realaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.smith.realaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_layer.py b/plotly/validators/layout/smith/realaxis/_layer.py index d2d2c91944..4b0e346843 100644 --- a/plotly/validators/layout/smith/realaxis/_layer.py +++ b/plotly/validators/layout/smith/realaxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.smith.realaxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_linecolor.py b/plotly/validators/layout/smith/realaxis/_linecolor.py index 2adec9a47b..73cb0939ce 100644 --- a/plotly/validators/layout/smith/realaxis/_linecolor.py +++ b/plotly/validators/layout/smith/realaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.smith.realaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_linewidth.py b/plotly/validators/layout/smith/realaxis/_linewidth.py index ceb2a97bd4..e7abd31a0b 100644 --- a/plotly/validators/layout/smith/realaxis/_linewidth.py +++ b/plotly/validators/layout/smith/realaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.smith.realaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_showgrid.py b/plotly/validators/layout/smith/realaxis/_showgrid.py index 915cdb91d7..12960ff72c 100644 --- a/plotly/validators/layout/smith/realaxis/_showgrid.py +++ b/plotly/validators/layout/smith/realaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.smith.realaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_showline.py b/plotly/validators/layout/smith/realaxis/_showline.py index 366aac83fa..802cf3f4cb 100644 --- a/plotly/validators/layout/smith/realaxis/_showline.py +++ b/plotly/validators/layout/smith/realaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.smith.realaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_showticklabels.py b/plotly/validators/layout/smith/realaxis/_showticklabels.py index 7e2626ee95..afa3d7b234 100644 --- a/plotly/validators/layout/smith/realaxis/_showticklabels.py +++ b/plotly/validators/layout/smith/realaxis/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.smith.realaxis", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_showtickprefix.py b/plotly/validators/layout/smith/realaxis/_showtickprefix.py index f0a1ba9b6d..76cb4a957c 100644 --- a/plotly/validators/layout/smith/realaxis/_showtickprefix.py +++ b/plotly/validators/layout/smith/realaxis/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.smith.realaxis", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_showticksuffix.py b/plotly/validators/layout/smith/realaxis/_showticksuffix.py index 3cbc26e428..2433cd66fa 100644 --- a/plotly/validators/layout/smith/realaxis/_showticksuffix.py +++ b/plotly/validators/layout/smith/realaxis/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.smith.realaxis", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_side.py b/plotly/validators/layout/smith/realaxis/_side.py index 2181306f87..9815f4ea48 100644 --- a/plotly/validators/layout/smith/realaxis/_side.py +++ b/plotly/validators/layout/smith/realaxis/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="layout.smith.realaxis", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_tickangle.py b/plotly/validators/layout/smith/realaxis/_tickangle.py index ab7b7d09e0..45079eb528 100644 --- a/plotly/validators/layout/smith/realaxis/_tickangle.py +++ b/plotly/validators/layout/smith/realaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.smith.realaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_tickcolor.py b/plotly/validators/layout/smith/realaxis/_tickcolor.py index bde9e4a3b4..3a1b632b67 100644 --- a/plotly/validators/layout/smith/realaxis/_tickcolor.py +++ b/plotly/validators/layout/smith/realaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.smith.realaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_tickfont.py b/plotly/validators/layout/smith/realaxis/_tickfont.py index 73c64d3de5..d4a4d7aaf7 100644 --- a/plotly/validators/layout/smith/realaxis/_tickfont.py +++ b/plotly/validators/layout/smith/realaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.smith.realaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_tickformat.py b/plotly/validators/layout/smith/realaxis/_tickformat.py index 2cae60d768..83945ad748 100644 --- a/plotly/validators/layout/smith/realaxis/_tickformat.py +++ b/plotly/validators/layout/smith/realaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.smith.realaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_ticklen.py b/plotly/validators/layout/smith/realaxis/_ticklen.py index c60c12ac88..e9387ede61 100644 --- a/plotly/validators/layout/smith/realaxis/_ticklen.py +++ b/plotly/validators/layout/smith/realaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.smith.realaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_tickprefix.py b/plotly/validators/layout/smith/realaxis/_tickprefix.py index 1ad45e19f1..3b2e198549 100644 --- a/plotly/validators/layout/smith/realaxis/_tickprefix.py +++ b/plotly/validators/layout/smith/realaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.smith.realaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_ticks.py b/plotly/validators/layout/smith/realaxis/_ticks.py index 4f2459f4a8..e596e5d30f 100644 --- a/plotly/validators/layout/smith/realaxis/_ticks.py +++ b/plotly/validators/layout/smith/realaxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.smith.realaxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["top", "bottom", ""]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_ticksuffix.py b/plotly/validators/layout/smith/realaxis/_ticksuffix.py index 7e36de1809..989fef03dc 100644 --- a/plotly/validators/layout/smith/realaxis/_ticksuffix.py +++ b/plotly/validators/layout/smith/realaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.smith.realaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_tickvals.py b/plotly/validators/layout/smith/realaxis/_tickvals.py index a9f701c420..832f6f42bf 100644 --- a/plotly/validators/layout/smith/realaxis/_tickvals.py +++ b/plotly/validators/layout/smith/realaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.smith.realaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_tickvalssrc.py b/plotly/validators/layout/smith/realaxis/_tickvalssrc.py index cc044ab6a2..586e421b4b 100644 --- a/plotly/validators/layout/smith/realaxis/_tickvalssrc.py +++ b/plotly/validators/layout/smith/realaxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.smith.realaxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/_tickwidth.py b/plotly/validators/layout/smith/realaxis/_tickwidth.py index 32b2fd001b..02a3c8d260 100644 --- a/plotly/validators/layout/smith/realaxis/_tickwidth.py +++ b/plotly/validators/layout/smith/realaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.smith.realaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/_visible.py b/plotly/validators/layout/smith/realaxis/_visible.py index 177c1fb430..eb0192465d 100644 --- a/plotly/validators/layout/smith/realaxis/_visible.py +++ b/plotly/validators/layout/smith/realaxis/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.smith.realaxis", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/tickfont/__init__.py b/plotly/validators/layout/smith/realaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/__init__.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_color.py b/plotly/validators/layout/smith/realaxis/tickfont/_color.py index daf36ae190..3b5a505369 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_color.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_family.py b/plotly/validators/layout/smith/realaxis/tickfont/_family.py index ee5cc26d80..c8ade3c088 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_family.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_lineposition.py b/plotly/validators/layout/smith/realaxis/tickfont/_lineposition.py index ce957617e9..334b21d83d 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_shadow.py b/plotly/validators/layout/smith/realaxis/tickfont/_shadow.py index 1b62faee87..9c7c926f1b 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_size.py b/plotly/validators/layout/smith/realaxis/tickfont/_size.py index 8a8487ca2e..2e8c9a753b 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_size.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.smith.realaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_style.py b/plotly/validators/layout/smith/realaxis/tickfont/_style.py index 903724edea..71892ab0c0 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_style.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_textcase.py b/plotly/validators/layout/smith/realaxis/tickfont/_textcase.py index 3e030c575d..303237b824 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_variant.py b/plotly/validators/layout/smith/realaxis/tickfont/_variant.py index ceed82e406..c618f87b6c 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_variant.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/smith/realaxis/tickfont/_weight.py b/plotly/validators/layout/smith/realaxis/tickfont/_weight.py index 53a242f218..8ade386591 100644 --- a/plotly/validators/layout/smith/realaxis/tickfont/_weight.py +++ b/plotly/validators/layout/smith/realaxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.smith.realaxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/template/__init__.py b/plotly/validators/layout/template/__init__.py index bba1136f42..6252409e26 100644 --- a/plotly/validators/layout/template/__init__.py +++ b/plotly/validators/layout/template/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._layout import LayoutValidator - from ._data import DataValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._layout.LayoutValidator", "._data.DataValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._layout.LayoutValidator", "._data.DataValidator"] +) diff --git a/plotly/validators/layout/template/_data.py b/plotly/validators/layout/template/_data.py index a18bd8de06..1d1aa7adb5 100644 --- a/plotly/validators/layout/template/_data.py +++ b/plotly/validators/layout/template/_data.py @@ -1,196 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DataValidator(_plotly_utils.basevalidators.CompoundValidator): +class DataValidator(_bv.CompoundValidator): def __init__(self, plotly_name="data", parent_name="layout.template", **kwargs): - super(DataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Data"), data_docs=kwargs.pop( "data_docs", """ - barpolar - A tuple of - :class:`plotly.graph_objects.Barpolar` - instances or dicts with compatible properties - bar - A tuple of :class:`plotly.graph_objects.Bar` - instances or dicts with compatible properties - box - A tuple of :class:`plotly.graph_objects.Box` - instances or dicts with compatible properties - candlestick - A tuple of - :class:`plotly.graph_objects.Candlestick` - instances or dicts with compatible properties - carpet - A tuple of :class:`plotly.graph_objects.Carpet` - instances or dicts with compatible properties - choroplethmapbox - A tuple of - :class:`plotly.graph_objects.Choroplethmapbox` - instances or dicts with compatible properties - choroplethmap - A tuple of - :class:`plotly.graph_objects.Choroplethmap` - instances or dicts with compatible properties - choropleth - A tuple of - :class:`plotly.graph_objects.Choropleth` - instances or dicts with compatible properties - cone - A tuple of :class:`plotly.graph_objects.Cone` - instances or dicts with compatible properties - contourcarpet - A tuple of - :class:`plotly.graph_objects.Contourcarpet` - instances or dicts with compatible properties - contour - A tuple of - :class:`plotly.graph_objects.Contour` instances - or dicts with compatible properties - densitymapbox - A tuple of - :class:`plotly.graph_objects.Densitymapbox` - instances or dicts with compatible properties - densitymap - A tuple of - :class:`plotly.graph_objects.Densitymap` - instances or dicts with compatible properties - funnelarea - A tuple of - :class:`plotly.graph_objects.Funnelarea` - instances or dicts with compatible properties - funnel - A tuple of :class:`plotly.graph_objects.Funnel` - instances or dicts with compatible properties - heatmap - A tuple of - :class:`plotly.graph_objects.Heatmap` instances - or dicts with compatible properties - histogram2dcontour - A tuple of :class:`plotly.graph_objects.Histogr - am2dContour` instances or dicts with compatible - properties - histogram2d - A tuple of - :class:`plotly.graph_objects.Histogram2d` - instances or dicts with compatible properties - histogram - A tuple of - :class:`plotly.graph_objects.Histogram` - instances or dicts with compatible properties - icicle - A tuple of :class:`plotly.graph_objects.Icicle` - instances or dicts with compatible properties - image - A tuple of :class:`plotly.graph_objects.Image` - instances or dicts with compatible properties - indicator - A tuple of - :class:`plotly.graph_objects.Indicator` - instances or dicts with compatible properties - isosurface - A tuple of - :class:`plotly.graph_objects.Isosurface` - instances or dicts with compatible properties - mesh3d - A tuple of :class:`plotly.graph_objects.Mesh3d` - instances or dicts with compatible properties - ohlc - A tuple of :class:`plotly.graph_objects.Ohlc` - instances or dicts with compatible properties - parcats - A tuple of - :class:`plotly.graph_objects.Parcats` instances - or dicts with compatible properties - parcoords - A tuple of - :class:`plotly.graph_objects.Parcoords` - instances or dicts with compatible properties - pie - A tuple of :class:`plotly.graph_objects.Pie` - instances or dicts with compatible properties - sankey - A tuple of :class:`plotly.graph_objects.Sankey` - instances or dicts with compatible properties - scatter3d - A tuple of - :class:`plotly.graph_objects.Scatter3d` - instances or dicts with compatible properties - scattercarpet - A tuple of - :class:`plotly.graph_objects.Scattercarpet` - instances or dicts with compatible properties - scattergeo - A tuple of - :class:`plotly.graph_objects.Scattergeo` - instances or dicts with compatible properties - scattergl - A tuple of - :class:`plotly.graph_objects.Scattergl` - instances or dicts with compatible properties - scattermapbox - A tuple of - :class:`plotly.graph_objects.Scattermapbox` - instances or dicts with compatible properties - scattermap - A tuple of - :class:`plotly.graph_objects.Scattermap` - instances or dicts with compatible properties - scatterpolargl - A tuple of - :class:`plotly.graph_objects.Scatterpolargl` - instances or dicts with compatible properties - scatterpolar - A tuple of - :class:`plotly.graph_objects.Scatterpolar` - instances or dicts with compatible properties - scatter - A tuple of - :class:`plotly.graph_objects.Scatter` instances - or dicts with compatible properties - scattersmith - A tuple of - :class:`plotly.graph_objects.Scattersmith` - instances or dicts with compatible properties - scatterternary - A tuple of - :class:`plotly.graph_objects.Scatterternary` - instances or dicts with compatible properties - splom - A tuple of :class:`plotly.graph_objects.Splom` - instances or dicts with compatible properties - streamtube - A tuple of - :class:`plotly.graph_objects.Streamtube` - instances or dicts with compatible properties - sunburst - A tuple of - :class:`plotly.graph_objects.Sunburst` - instances or dicts with compatible properties - surface - A tuple of - :class:`plotly.graph_objects.Surface` instances - or dicts with compatible properties - table - A tuple of :class:`plotly.graph_objects.Table` - instances or dicts with compatible properties - treemap - A tuple of - :class:`plotly.graph_objects.Treemap` instances - or dicts with compatible properties - violin - A tuple of :class:`plotly.graph_objects.Violin` - instances or dicts with compatible properties - volume - A tuple of :class:`plotly.graph_objects.Volume` - instances or dicts with compatible properties - waterfall - A tuple of - :class:`plotly.graph_objects.Waterfall` - instances or dicts with compatible properties """, ), **kwargs, diff --git a/plotly/validators/layout/template/_layout.py b/plotly/validators/layout/template/_layout.py index f0ff4de14f..5834a63807 100644 --- a/plotly/validators/layout/template/_layout.py +++ b/plotly/validators/layout/template/_layout.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayoutValidator(_plotly_utils.basevalidators.CompoundValidator): +class LayoutValidator(_bv.CompoundValidator): def __init__(self, plotly_name="layout", parent_name="layout.template", **kwargs): - super(LayoutValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Layout"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/__init__.py b/plotly/validators/layout/template/data/__init__.py index da0ae90974..e81f0e0813 100644 --- a/plotly/validators/layout/template/data/__init__.py +++ b/plotly/validators/layout/template/data/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._waterfall import WaterfallValidator - from ._volume import VolumeValidator - from ._violin import ViolinValidator - from ._treemap import TreemapValidator - from ._table import TableValidator - from ._surface import SurfaceValidator - from ._sunburst import SunburstValidator - from ._streamtube import StreamtubeValidator - from ._splom import SplomValidator - from ._scatterternary import ScatterternaryValidator - from ._scattersmith import ScattersmithValidator - from ._scatter import ScatterValidator - from ._scatterpolar import ScatterpolarValidator - from ._scatterpolargl import ScatterpolarglValidator - from ._scattermap import ScattermapValidator - from ._scattermapbox import ScattermapboxValidator - from ._scattergl import ScatterglValidator - from ._scattergeo import ScattergeoValidator - from ._scattercarpet import ScattercarpetValidator - from ._scatter3d import Scatter3DValidator - from ._sankey import SankeyValidator - from ._pie import PieValidator - from ._parcoords import ParcoordsValidator - from ._parcats import ParcatsValidator - from ._ohlc import OhlcValidator - from ._mesh3d import Mesh3DValidator - from ._isosurface import IsosurfaceValidator - from ._indicator import IndicatorValidator - from ._image import ImageValidator - from ._icicle import IcicleValidator - from ._histogram import HistogramValidator - from ._histogram2d import Histogram2DValidator - from ._histogram2dcontour import Histogram2DcontourValidator - from ._heatmap import HeatmapValidator - from ._funnel import FunnelValidator - from ._funnelarea import FunnelareaValidator - from ._densitymap import DensitymapValidator - from ._densitymapbox import DensitymapboxValidator - from ._contour import ContourValidator - from ._contourcarpet import ContourcarpetValidator - from ._cone import ConeValidator - from ._choropleth import ChoroplethValidator - from ._choroplethmap import ChoroplethmapValidator - from ._choroplethmapbox import ChoroplethmapboxValidator - from ._carpet import CarpetValidator - from ._candlestick import CandlestickValidator - from ._box import BoxValidator - from ._bar import BarValidator - from ._barpolar import BarpolarValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._waterfall.WaterfallValidator", - "._volume.VolumeValidator", - "._violin.ViolinValidator", - "._treemap.TreemapValidator", - "._table.TableValidator", - "._surface.SurfaceValidator", - "._sunburst.SunburstValidator", - "._streamtube.StreamtubeValidator", - "._splom.SplomValidator", - "._scatterternary.ScatterternaryValidator", - "._scattersmith.ScattersmithValidator", - "._scatter.ScatterValidator", - "._scatterpolar.ScatterpolarValidator", - "._scatterpolargl.ScatterpolarglValidator", - "._scattermap.ScattermapValidator", - "._scattermapbox.ScattermapboxValidator", - "._scattergl.ScatterglValidator", - "._scattergeo.ScattergeoValidator", - "._scattercarpet.ScattercarpetValidator", - "._scatter3d.Scatter3DValidator", - "._sankey.SankeyValidator", - "._pie.PieValidator", - "._parcoords.ParcoordsValidator", - "._parcats.ParcatsValidator", - "._ohlc.OhlcValidator", - "._mesh3d.Mesh3DValidator", - "._isosurface.IsosurfaceValidator", - "._indicator.IndicatorValidator", - "._image.ImageValidator", - "._icicle.IcicleValidator", - "._histogram.HistogramValidator", - "._histogram2d.Histogram2DValidator", - "._histogram2dcontour.Histogram2DcontourValidator", - "._heatmap.HeatmapValidator", - "._funnel.FunnelValidator", - "._funnelarea.FunnelareaValidator", - "._densitymap.DensitymapValidator", - "._densitymapbox.DensitymapboxValidator", - "._contour.ContourValidator", - "._contourcarpet.ContourcarpetValidator", - "._cone.ConeValidator", - "._choropleth.ChoroplethValidator", - "._choroplethmap.ChoroplethmapValidator", - "._choroplethmapbox.ChoroplethmapboxValidator", - "._carpet.CarpetValidator", - "._candlestick.CandlestickValidator", - "._box.BoxValidator", - "._bar.BarValidator", - "._barpolar.BarpolarValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._waterfall.WaterfallValidator", + "._volume.VolumeValidator", + "._violin.ViolinValidator", + "._treemap.TreemapValidator", + "._table.TableValidator", + "._surface.SurfaceValidator", + "._sunburst.SunburstValidator", + "._streamtube.StreamtubeValidator", + "._splom.SplomValidator", + "._scatterternary.ScatterternaryValidator", + "._scattersmith.ScattersmithValidator", + "._scatter.ScatterValidator", + "._scatterpolar.ScatterpolarValidator", + "._scatterpolargl.ScatterpolarglValidator", + "._scattermap.ScattermapValidator", + "._scattermapbox.ScattermapboxValidator", + "._scattergl.ScatterglValidator", + "._scattergeo.ScattergeoValidator", + "._scattercarpet.ScattercarpetValidator", + "._scatter3d.Scatter3DValidator", + "._sankey.SankeyValidator", + "._pie.PieValidator", + "._parcoords.ParcoordsValidator", + "._parcats.ParcatsValidator", + "._ohlc.OhlcValidator", + "._mesh3d.Mesh3DValidator", + "._isosurface.IsosurfaceValidator", + "._indicator.IndicatorValidator", + "._image.ImageValidator", + "._icicle.IcicleValidator", + "._histogram.HistogramValidator", + "._histogram2d.Histogram2DValidator", + "._histogram2dcontour.Histogram2DcontourValidator", + "._heatmap.HeatmapValidator", + "._funnel.FunnelValidator", + "._funnelarea.FunnelareaValidator", + "._densitymap.DensitymapValidator", + "._densitymapbox.DensitymapboxValidator", + "._contour.ContourValidator", + "._contourcarpet.ContourcarpetValidator", + "._cone.ConeValidator", + "._choropleth.ChoroplethValidator", + "._choroplethmap.ChoroplethmapValidator", + "._choroplethmapbox.ChoroplethmapboxValidator", + "._carpet.CarpetValidator", + "._candlestick.CandlestickValidator", + "._box.BoxValidator", + "._bar.BarValidator", + "._barpolar.BarpolarValidator", + ], +) diff --git a/plotly/validators/layout/template/data/_bar.py b/plotly/validators/layout/template/data/_bar.py index b91930642e..1b7bf66f0b 100644 --- a/plotly/validators/layout/template/data/_bar.py +++ b/plotly/validators/layout/template/data/_bar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class BarValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="bar", parent_name="layout.template.data", **kwargs): - super(BarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Bar"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_barpolar.py b/plotly/validators/layout/template/data/_barpolar.py index ae424bf2f7..837d448e6a 100644 --- a/plotly/validators/layout/template/data/_barpolar.py +++ b/plotly/validators/layout/template/data/_barpolar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BarpolarValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class BarpolarValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="barpolar", parent_name="layout.template.data", **kwargs ): - super(BarpolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Barpolar"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_box.py b/plotly/validators/layout/template/data/_box.py index 803d299448..826cc5566b 100644 --- a/plotly/validators/layout/template/data/_box.py +++ b/plotly/validators/layout/template/data/_box.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class BoxValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="box", parent_name="layout.template.data", **kwargs): - super(BoxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Box"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_candlestick.py b/plotly/validators/layout/template/data/_candlestick.py index f268690028..32c5d038f1 100644 --- a/plotly/validators/layout/template/data/_candlestick.py +++ b/plotly/validators/layout/template/data/_candlestick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CandlestickValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class CandlestickValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="candlestick", parent_name="layout.template.data", **kwargs ): - super(CandlestickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Candlestick"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_carpet.py b/plotly/validators/layout/template/data/_carpet.py index ff93e03085..2c2108cbb8 100644 --- a/plotly/validators/layout/template/data/_carpet.py +++ b/plotly/validators/layout/template/data/_carpet.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CarpetValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class CarpetValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="carpet", parent_name="layout.template.data", **kwargs ): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Carpet"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_choropleth.py b/plotly/validators/layout/template/data/_choropleth.py index 4253a3d925..74190d7a33 100644 --- a/plotly/validators/layout/template/data/_choropleth.py +++ b/plotly/validators/layout/template/data/_choropleth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ChoroplethValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ChoroplethValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="choropleth", parent_name="layout.template.data", **kwargs ): - super(ChoroplethValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Choropleth"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_choroplethmap.py b/plotly/validators/layout/template/data/_choroplethmap.py index fe8deba541..a9f7226d1d 100644 --- a/plotly/validators/layout/template/data/_choroplethmap.py +++ b/plotly/validators/layout/template/data/_choroplethmap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ChoroplethmapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ChoroplethmapValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="choroplethmap", parent_name="layout.template.data", **kwargs ): - super(ChoroplethmapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Choroplethmap"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_choroplethmapbox.py b/plotly/validators/layout/template/data/_choroplethmapbox.py index 882279d494..05f83139ef 100644 --- a/plotly/validators/layout/template/data/_choroplethmapbox.py +++ b/plotly/validators/layout/template/data/_choroplethmapbox.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ChoroplethmapboxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ChoroplethmapboxValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="choroplethmapbox", parent_name="layout.template.data", **kwargs, ): - super(ChoroplethmapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Choroplethmapbox"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_cone.py b/plotly/validators/layout/template/data/_cone.py index 73df86f08f..61467bd691 100644 --- a/plotly/validators/layout/template/data/_cone.py +++ b/plotly/validators/layout/template/data/_cone.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ConeValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="cone", parent_name="layout.template.data", **kwargs ): - super(ConeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Cone"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_contour.py b/plotly/validators/layout/template/data/_contour.py index 47905d5ad4..1418451f4f 100644 --- a/plotly/validators/layout/template/data/_contour.py +++ b/plotly/validators/layout/template/data/_contour.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ContourValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="contour", parent_name="layout.template.data", **kwargs ): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contour"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_contourcarpet.py b/plotly/validators/layout/template/data/_contourcarpet.py index b40e0292b6..73fdadaae3 100644 --- a/plotly/validators/layout/template/data/_contourcarpet.py +++ b/plotly/validators/layout/template/data/_contourcarpet.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourcarpetValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ContourcarpetValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="contourcarpet", parent_name="layout.template.data", **kwargs ): - super(ContourcarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contourcarpet"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_densitymap.py b/plotly/validators/layout/template/data/_densitymap.py index 98a867b5d0..902fc3dc88 100644 --- a/plotly/validators/layout/template/data/_densitymap.py +++ b/plotly/validators/layout/template/data/_densitymap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DensitymapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class DensitymapValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="densitymap", parent_name="layout.template.data", **kwargs ): - super(DensitymapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Densitymap"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_densitymapbox.py b/plotly/validators/layout/template/data/_densitymapbox.py index 6ea6762697..4aaa29395a 100644 --- a/plotly/validators/layout/template/data/_densitymapbox.py +++ b/plotly/validators/layout/template/data/_densitymapbox.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DensitymapboxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class DensitymapboxValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="densitymapbox", parent_name="layout.template.data", **kwargs ): - super(DensitymapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Densitymapbox"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_funnel.py b/plotly/validators/layout/template/data/_funnel.py index 1cdd39d3e1..3bf06468e2 100644 --- a/plotly/validators/layout/template/data/_funnel.py +++ b/plotly/validators/layout/template/data/_funnel.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class FunnelValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="funnel", parent_name="layout.template.data", **kwargs ): - super(FunnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Funnel"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_funnelarea.py b/plotly/validators/layout/template/data/_funnelarea.py index 5b0ee95af9..01958a69fd 100644 --- a/plotly/validators/layout/template/data/_funnelarea.py +++ b/plotly/validators/layout/template/data/_funnelarea.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FunnelareaValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class FunnelareaValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="funnelarea", parent_name="layout.template.data", **kwargs ): - super(FunnelareaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Funnelarea"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_heatmap.py b/plotly/validators/layout/template/data/_heatmap.py index 2c49e30cf7..ee3e88cf08 100644 --- a/plotly/validators/layout/template/data/_heatmap.py +++ b/plotly/validators/layout/template/data/_heatmap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeatmapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class HeatmapValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="heatmap", parent_name="layout.template.data", **kwargs ): - super(HeatmapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Heatmap"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_histogram.py b/plotly/validators/layout/template/data/_histogram.py index fa3bdbb9f6..014fe906da 100644 --- a/plotly/validators/layout/template/data/_histogram.py +++ b/plotly/validators/layout/template/data/_histogram.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HistogramValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class HistogramValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="histogram", parent_name="layout.template.data", **kwargs ): - super(HistogramValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Histogram"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_histogram2d.py b/plotly/validators/layout/template/data/_histogram2d.py index b783a77b4c..7dff4b4b7f 100644 --- a/plotly/validators/layout/template/data/_histogram2d.py +++ b/plotly/validators/layout/template/data/_histogram2d.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Histogram2DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class Histogram2DValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="histogram2d", parent_name="layout.template.data", **kwargs ): - super(Histogram2DValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Histogram2d"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_histogram2dcontour.py b/plotly/validators/layout/template/data/_histogram2dcontour.py index 1d68a410ea..6ae348a4df 100644 --- a/plotly/validators/layout/template/data/_histogram2dcontour.py +++ b/plotly/validators/layout/template/data/_histogram2dcontour.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Histogram2DcontourValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class Histogram2DcontourValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="histogram2dcontour", parent_name="layout.template.data", **kwargs, ): - super(Histogram2DcontourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Histogram2dContour"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_icicle.py b/plotly/validators/layout/template/data/_icicle.py index f57765ae6d..697bd4d31e 100644 --- a/plotly/validators/layout/template/data/_icicle.py +++ b/plotly/validators/layout/template/data/_icicle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IcicleValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class IcicleValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="icicle", parent_name="layout.template.data", **kwargs ): - super(IcicleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Icicle"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_image.py b/plotly/validators/layout/template/data/_image.py index 7eaa9a942c..45d0a84c55 100644 --- a/plotly/validators/layout/template/data/_image.py +++ b/plotly/validators/layout/template/data/_image.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImageValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ImageValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="image", parent_name="layout.template.data", **kwargs ): - super(ImageValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Image"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_indicator.py b/plotly/validators/layout/template/data/_indicator.py index c1328703f3..2b9f5386c7 100644 --- a/plotly/validators/layout/template/data/_indicator.py +++ b/plotly/validators/layout/template/data/_indicator.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IndicatorValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class IndicatorValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="indicator", parent_name="layout.template.data", **kwargs ): - super(IndicatorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Indicator"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_isosurface.py b/plotly/validators/layout/template/data/_isosurface.py index b595eb2d8d..661b9dc244 100644 --- a/plotly/validators/layout/template/data/_isosurface.py +++ b/plotly/validators/layout/template/data/_isosurface.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsosurfaceValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class IsosurfaceValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="isosurface", parent_name="layout.template.data", **kwargs ): - super(IsosurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Isosurface"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_mesh3d.py b/plotly/validators/layout/template/data/_mesh3d.py index ddc72e9c77..36eed00f79 100644 --- a/plotly/validators/layout/template/data/_mesh3d.py +++ b/plotly/validators/layout/template/data/_mesh3d.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Mesh3DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class Mesh3DValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="mesh3d", parent_name="layout.template.data", **kwargs ): - super(Mesh3DValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Mesh3d"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_ohlc.py b/plotly/validators/layout/template/data/_ohlc.py index 75f7c0cc6d..5df26c9ed1 100644 --- a/plotly/validators/layout/template/data/_ohlc.py +++ b/plotly/validators/layout/template/data/_ohlc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OhlcValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class OhlcValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="ohlc", parent_name="layout.template.data", **kwargs ): - super(OhlcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Ohlc"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_parcats.py b/plotly/validators/layout/template/data/_parcats.py index a92aeeb7e3..f64f4898ca 100644 --- a/plotly/validators/layout/template/data/_parcats.py +++ b/plotly/validators/layout/template/data/_parcats.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParcatsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ParcatsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="parcats", parent_name="layout.template.data", **kwargs ): - super(ParcatsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Parcats"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_parcoords.py b/plotly/validators/layout/template/data/_parcoords.py index 603adc5606..d58ca28088 100644 --- a/plotly/validators/layout/template/data/_parcoords.py +++ b/plotly/validators/layout/template/data/_parcoords.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParcoordsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ParcoordsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="parcoords", parent_name="layout.template.data", **kwargs ): - super(ParcoordsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Parcoords"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_pie.py b/plotly/validators/layout/template/data/_pie.py index 42a39f75a4..7caf00b2ab 100644 --- a/plotly/validators/layout/template/data/_pie.py +++ b/plotly/validators/layout/template/data/_pie.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PieValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class PieValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="pie", parent_name="layout.template.data", **kwargs): - super(PieValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pie"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_sankey.py b/plotly/validators/layout/template/data/_sankey.py index c2b7664948..8089c75ec2 100644 --- a/plotly/validators/layout/template/data/_sankey.py +++ b/plotly/validators/layout/template/data/_sankey.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SankeyValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class SankeyValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="sankey", parent_name="layout.template.data", **kwargs ): - super(SankeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Sankey"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scatter.py b/plotly/validators/layout/template/data/_scatter.py index caf23cc1de..06a1350d97 100644 --- a/plotly/validators/layout/template/data/_scatter.py +++ b/plotly/validators/layout/template/data/_scatter.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScatterValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scatter", parent_name="layout.template.data", **kwargs ): - super(ScatterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatter"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scatter3d.py b/plotly/validators/layout/template/data/_scatter3d.py index 810402aeb3..3665e3cd8c 100644 --- a/plotly/validators/layout/template/data/_scatter3d.py +++ b/plotly/validators/layout/template/data/_scatter3d.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Scatter3DValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class Scatter3DValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scatter3d", parent_name="layout.template.data", **kwargs ): - super(Scatter3DValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatter3d"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scattercarpet.py b/plotly/validators/layout/template/data/_scattercarpet.py index eb44a65672..38df325160 100644 --- a/plotly/validators/layout/template/data/_scattercarpet.py +++ b/plotly/validators/layout/template/data/_scattercarpet.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattercarpetValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScattercarpetValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scattercarpet", parent_name="layout.template.data", **kwargs ): - super(ScattercarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattercarpet"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scattergeo.py b/plotly/validators/layout/template/data/_scattergeo.py index 55e5277eaa..c52276c88b 100644 --- a/plotly/validators/layout/template/data/_scattergeo.py +++ b/plotly/validators/layout/template/data/_scattergeo.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattergeoValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScattergeoValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scattergeo", parent_name="layout.template.data", **kwargs ): - super(ScattergeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattergeo"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scattergl.py b/plotly/validators/layout/template/data/_scattergl.py index b4400120ad..cfcdd4579b 100644 --- a/plotly/validators/layout/template/data/_scattergl.py +++ b/plotly/validators/layout/template/data/_scattergl.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterglValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScatterglValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scattergl", parent_name="layout.template.data", **kwargs ): - super(ScatterglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattergl"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scattermap.py b/plotly/validators/layout/template/data/_scattermap.py index 73eab73344..9662c6ee27 100644 --- a/plotly/validators/layout/template/data/_scattermap.py +++ b/plotly/validators/layout/template/data/_scattermap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattermapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScattermapValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scattermap", parent_name="layout.template.data", **kwargs ): - super(ScattermapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattermap"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scattermapbox.py b/plotly/validators/layout/template/data/_scattermapbox.py index 970f59110d..b81e103673 100644 --- a/plotly/validators/layout/template/data/_scattermapbox.py +++ b/plotly/validators/layout/template/data/_scattermapbox.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScattermapboxValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scattermapbox", parent_name="layout.template.data", **kwargs ): - super(ScattermapboxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattermapbox"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scatterpolar.py b/plotly/validators/layout/template/data/_scatterpolar.py index 77b17da467..a9e2ca3f89 100644 --- a/plotly/validators/layout/template/data/_scatterpolar.py +++ b/plotly/validators/layout/template/data/_scatterpolar.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterpolarValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScatterpolarValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scatterpolar", parent_name="layout.template.data", **kwargs ): - super(ScatterpolarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatterpolar"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scatterpolargl.py b/plotly/validators/layout/template/data/_scatterpolargl.py index 6520a3c51c..d36b54d4d2 100644 --- a/plotly/validators/layout/template/data/_scatterpolargl.py +++ b/plotly/validators/layout/template/data/_scatterpolargl.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterpolarglValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScatterpolarglValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scatterpolargl", parent_name="layout.template.data", **kwargs ): - super(ScatterpolarglValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatterpolargl"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scattersmith.py b/plotly/validators/layout/template/data/_scattersmith.py index c62fc95203..585999c5c9 100644 --- a/plotly/validators/layout/template/data/_scattersmith.py +++ b/plotly/validators/layout/template/data/_scattersmith.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScattersmithValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScattersmithValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scattersmith", parent_name="layout.template.data", **kwargs ): - super(ScattersmithValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scattersmith"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_scatterternary.py b/plotly/validators/layout/template/data/_scatterternary.py index 1902e1ffbf..6d646c1305 100644 --- a/plotly/validators/layout/template/data/_scatterternary.py +++ b/plotly/validators/layout/template/data/_scatterternary.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScatterternaryValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ScatterternaryValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="scatterternary", parent_name="layout.template.data", **kwargs ): - super(ScatterternaryValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Scatterternary"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_splom.py b/plotly/validators/layout/template/data/_splom.py index b259a25692..b86d38e3de 100644 --- a/plotly/validators/layout/template/data/_splom.py +++ b/plotly/validators/layout/template/data/_splom.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SplomValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class SplomValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="splom", parent_name="layout.template.data", **kwargs ): - super(SplomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Splom"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_streamtube.py b/plotly/validators/layout/template/data/_streamtube.py index 60e8790ca1..a75f5d629d 100644 --- a/plotly/validators/layout/template/data/_streamtube.py +++ b/plotly/validators/layout/template/data/_streamtube.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamtubeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class StreamtubeValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="streamtube", parent_name="layout.template.data", **kwargs ): - super(StreamtubeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Streamtube"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_sunburst.py b/plotly/validators/layout/template/data/_sunburst.py index bf8323566b..19d40be7b2 100644 --- a/plotly/validators/layout/template/data/_sunburst.py +++ b/plotly/validators/layout/template/data/_sunburst.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SunburstValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class SunburstValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="sunburst", parent_name="layout.template.data", **kwargs ): - super(SunburstValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Sunburst"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_surface.py b/plotly/validators/layout/template/data/_surface.py index 3277668fe8..86cf613ac5 100644 --- a/plotly/validators/layout/template/data/_surface.py +++ b/plotly/validators/layout/template/data/_surface.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfaceValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class SurfaceValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="surface", parent_name="layout.template.data", **kwargs ): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Surface"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_table.py b/plotly/validators/layout/template/data/_table.py index c2e5a49095..d4e2b9ff15 100644 --- a/plotly/validators/layout/template/data/_table.py +++ b/plotly/validators/layout/template/data/_table.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TableValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TableValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="table", parent_name="layout.template.data", **kwargs ): - super(TableValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Table"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_treemap.py b/plotly/validators/layout/template/data/_treemap.py index 70e380417c..a2f1bc9eb4 100644 --- a/plotly/validators/layout/template/data/_treemap.py +++ b/plotly/validators/layout/template/data/_treemap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TreemapValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TreemapValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="treemap", parent_name="layout.template.data", **kwargs ): - super(TreemapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Treemap"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_violin.py b/plotly/validators/layout/template/data/_violin.py index 91f6842f52..93fafc4f12 100644 --- a/plotly/validators/layout/template/data/_violin.py +++ b/plotly/validators/layout/template/data/_violin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ViolinValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ViolinValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="violin", parent_name="layout.template.data", **kwargs ): - super(ViolinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Violin"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_volume.py b/plotly/validators/layout/template/data/_volume.py index b7edcfc7b1..810b2aabda 100644 --- a/plotly/validators/layout/template/data/_volume.py +++ b/plotly/validators/layout/template/data/_volume.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VolumeValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class VolumeValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="volume", parent_name="layout.template.data", **kwargs ): - super(VolumeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Volume"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/template/data/_waterfall.py b/plotly/validators/layout/template/data/_waterfall.py index eb59918063..3aefb27705 100644 --- a/plotly/validators/layout/template/data/_waterfall.py +++ b/plotly/validators/layout/template/data/_waterfall.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WaterfallValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class WaterfallValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="waterfall", parent_name="layout.template.data", **kwargs ): - super(WaterfallValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Waterfall"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/ternary/__init__.py b/plotly/validators/layout/ternary/__init__.py index 6c9d35db38..64f6fa3154 100644 --- a/plotly/validators/layout/ternary/__init__.py +++ b/plotly/validators/layout/ternary/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._uirevision import UirevisionValidator - from ._sum import SumValidator - from ._domain import DomainValidator - from ._caxis import CaxisValidator - from ._bgcolor import BgcolorValidator - from ._baxis import BaxisValidator - from ._aaxis import AaxisValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._uirevision.UirevisionValidator", - "._sum.SumValidator", - "._domain.DomainValidator", - "._caxis.CaxisValidator", - "._bgcolor.BgcolorValidator", - "._baxis.BaxisValidator", - "._aaxis.AaxisValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._sum.SumValidator", + "._domain.DomainValidator", + "._caxis.CaxisValidator", + "._bgcolor.BgcolorValidator", + "._baxis.BaxisValidator", + "._aaxis.AaxisValidator", + ], +) diff --git a/plotly/validators/layout/ternary/_aaxis.py b/plotly/validators/layout/ternary/_aaxis.py index bcae070c7e..14d7514711 100644 --- a/plotly/validators/layout/ternary/_aaxis.py +++ b/plotly/validators/layout/ternary/_aaxis.py @@ -1,247 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class AaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="aaxis", parent_name="layout.ternary", **kwargs): - super(AaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Aaxis"), data_docs=kwargs.pop( "data_docs", """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.aaxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.aaxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.aaxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.aax - is.Title` instance or dict with compatible - properties - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/_baxis.py b/plotly/validators/layout/ternary/_baxis.py index 622aa8704c..664cb379f0 100644 --- a/plotly/validators/layout/ternary/_baxis.py +++ b/plotly/validators/layout/ternary/_baxis.py @@ -1,247 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class BaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="baxis", parent_name="layout.ternary", **kwargs): - super(BaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Baxis"), data_docs=kwargs.pop( "data_docs", """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.baxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.baxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.baxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.bax - is.Title` instance or dict with compatible - properties - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/_bgcolor.py b/plotly/validators/layout/ternary/_bgcolor.py index 3f4b320670..dca06194d5 100644 --- a/plotly/validators/layout/ternary/_bgcolor.py +++ b/plotly/validators/layout/ternary/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="layout.ternary", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/_caxis.py b/plotly/validators/layout/ternary/_caxis.py index f44ac4681c..3e71b6ab63 100644 --- a/plotly/validators/layout/ternary/_caxis.py +++ b/plotly/validators/layout/ternary/_caxis.py @@ -1,247 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class CaxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="caxis", parent_name="layout.ternary", **kwargs): - super(CaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Caxis"), data_docs=kwargs.pop( "data_docs", """ - color - Sets default for all colors associated with - this axis all at once: line, font, tick, and - grid colors. Grid color is lightened by - blending this with the plot background - Individual pieces can override this. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - hoverformat - Sets the hover text formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - layer - Sets the layer on which this axis is displayed. - If *above traces*, this axis is displayed above - all the subplot's traces If *below traces*, - this axis is displayed below all the subplot's - traces, but above the grid lines. Useful when - used together with scatter-like traces with - `cliponaxis` set to False to show markers - and/or text nodes above this axis. - linecolor - Sets the axis line color. - linewidth - Sets the width (in px) of the axis line. - min - The minimum value visible on this axis. The - maximum is determined by the sum minus the - minimum values of the other two axes. The full - view corresponds to all the minima set to zero. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - showline - Determines whether or not a line bounding this - axis is drawn. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the tick font. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.layout. - ternary.caxis.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.lay - out.ternary.caxis.tickformatstopdefaults), sets - the default property values to use for elements - of layout.ternary.caxis.tickformatstops - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.layout.ternary.cax - is.Title` instance or dict with compatible - properties - uirevision - Controls persistence of user-driven changes in - axis `min`, and `title` if in `editable: true` - configuration. Defaults to - `ternary.uirevision`. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/_domain.py b/plotly/validators/layout/ternary/_domain.py index b2abda08e5..7cea5013eb 100644 --- a/plotly/validators/layout/ternary/_domain.py +++ b/plotly/validators/layout/ternary/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="layout.ternary", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this ternary - subplot . - row - If there is a layout grid, use the domain for - this row in the grid for this ternary subplot . - x - Sets the horizontal domain of this ternary - subplot (in plot fraction). - y - Sets the vertical domain of this ternary - subplot (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/_sum.py b/plotly/validators/layout/ternary/_sum.py index 6d8e2f30ef..401a411615 100644 --- a/plotly/validators/layout/ternary/_sum.py +++ b/plotly/validators/layout/ternary/_sum.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SumValidator(_plotly_utils.basevalidators.NumberValidator): +class SumValidator(_bv.NumberValidator): def __init__(self, plotly_name="sum", parent_name="layout.ternary", **kwargs): - super(SumValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/_uirevision.py b/plotly/validators/layout/ternary/_uirevision.py index 2c0e5b4689..ff1d77e0b2 100644 --- a/plotly/validators/layout/ternary/_uirevision.py +++ b/plotly/validators/layout/ternary/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.ternary", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/__init__.py b/plotly/validators/layout/ternary/aaxis/__init__.py index 0fafe61824..5f18e86986 100644 --- a/plotly/validators/layout/ternary/aaxis/__init__.py +++ b/plotly/validators/layout/ternary/aaxis/__init__.py @@ -1,95 +1,50 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._uirevision import UirevisionValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._min import MinValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._uirevision.UirevisionValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._min.MinValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._min.MinValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/aaxis/_color.py b/plotly/validators/layout/ternary/aaxis/_color.py index 15bccd0d20..cb0ad2fa31 100644 --- a/plotly/validators/layout/ternary/aaxis/_color.py +++ b/plotly/validators/layout/ternary/aaxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.aaxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_dtick.py b/plotly/validators/layout/ternary/aaxis/_dtick.py index 49c81600d6..7d1cb0b1a0 100644 --- a/plotly/validators/layout/ternary/aaxis/_dtick.py +++ b/plotly/validators/layout/ternary/aaxis/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.ternary.aaxis", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_exponentformat.py b/plotly/validators/layout/ternary/aaxis/_exponentformat.py index a34627991c..1470173699 100644 --- a/plotly/validators/layout/ternary/aaxis/_exponentformat.py +++ b/plotly/validators/layout/ternary/aaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.ternary.aaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_gridcolor.py b/plotly/validators/layout/ternary/aaxis/_gridcolor.py index a371f2748c..79fefc5d2c 100644 --- a/plotly/validators/layout/ternary/aaxis/_gridcolor.py +++ b/plotly/validators/layout/ternary/aaxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.ternary.aaxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_griddash.py b/plotly/validators/layout/ternary/aaxis/_griddash.py index f8df3bd1aa..5737a371c7 100644 --- a/plotly/validators/layout/ternary/aaxis/_griddash.py +++ b/plotly/validators/layout/ternary/aaxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.ternary.aaxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/ternary/aaxis/_gridwidth.py b/plotly/validators/layout/ternary/aaxis/_gridwidth.py index 3b9263932f..3efcf98b28 100644 --- a/plotly/validators/layout/ternary/aaxis/_gridwidth.py +++ b/plotly/validators/layout/ternary/aaxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.ternary.aaxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_hoverformat.py b/plotly/validators/layout/ternary/aaxis/_hoverformat.py index 7443bdc1ac..a4c3e75e40 100644 --- a/plotly/validators/layout/ternary/aaxis/_hoverformat.py +++ b/plotly/validators/layout/ternary/aaxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.ternary.aaxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_labelalias.py b/plotly/validators/layout/ternary/aaxis/_labelalias.py index 2877292992..e57501a253 100644 --- a/plotly/validators/layout/ternary/aaxis/_labelalias.py +++ b/plotly/validators/layout/ternary/aaxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.ternary.aaxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_layer.py b/plotly/validators/layout/ternary/aaxis/_layer.py index 0435365990..ae9ac2bb77 100644 --- a/plotly/validators/layout/ternary/aaxis/_layer.py +++ b/plotly/validators/layout/ternary/aaxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.ternary.aaxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_linecolor.py b/plotly/validators/layout/ternary/aaxis/_linecolor.py index 796a86d565..76bbef4a29 100644 --- a/plotly/validators/layout/ternary/aaxis/_linecolor.py +++ b/plotly/validators/layout/ternary/aaxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.ternary.aaxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_linewidth.py b/plotly/validators/layout/ternary/aaxis/_linewidth.py index 34a01018a9..a032355088 100644 --- a/plotly/validators/layout/ternary/aaxis/_linewidth.py +++ b/plotly/validators/layout/ternary/aaxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.ternary.aaxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_min.py b/plotly/validators/layout/ternary/aaxis/_min.py index b8f48ee73e..6fe4c4b7cc 100644 --- a/plotly/validators/layout/ternary/aaxis/_min.py +++ b/plotly/validators/layout/ternary/aaxis/_min.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinValidator(_plotly_utils.basevalidators.NumberValidator): +class MinValidator(_bv.NumberValidator): def __init__(self, plotly_name="min", parent_name="layout.ternary.aaxis", **kwargs): - super(MinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_minexponent.py b/plotly/validators/layout/ternary/aaxis/_minexponent.py index 8196fac9a2..a36ffd1618 100644 --- a/plotly/validators/layout/ternary/aaxis/_minexponent.py +++ b/plotly/validators/layout/ternary/aaxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.ternary.aaxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_nticks.py b/plotly/validators/layout/ternary/aaxis/_nticks.py index 9fe2cfd30d..edc7be49f6 100644 --- a/plotly/validators/layout/ternary/aaxis/_nticks.py +++ b/plotly/validators/layout/ternary/aaxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.ternary.aaxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_separatethousands.py b/plotly/validators/layout/ternary/aaxis/_separatethousands.py index 73db08e248..60a3cfd95e 100644 --- a/plotly/validators/layout/ternary/aaxis/_separatethousands.py +++ b/plotly/validators/layout/ternary/aaxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.ternary.aaxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_showexponent.py b/plotly/validators/layout/ternary/aaxis/_showexponent.py index d427c7e5df..454ca6bc6e 100644 --- a/plotly/validators/layout/ternary/aaxis/_showexponent.py +++ b/plotly/validators/layout/ternary/aaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.ternary.aaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_showgrid.py b/plotly/validators/layout/ternary/aaxis/_showgrid.py index d76eb03791..2fd52e0348 100644 --- a/plotly/validators/layout/ternary/aaxis/_showgrid.py +++ b/plotly/validators/layout/ternary/aaxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.ternary.aaxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_showline.py b/plotly/validators/layout/ternary/aaxis/_showline.py index b48e7e1fa9..e42aed624b 100644 --- a/plotly/validators/layout/ternary/aaxis/_showline.py +++ b/plotly/validators/layout/ternary/aaxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.ternary.aaxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_showticklabels.py b/plotly/validators/layout/ternary/aaxis/_showticklabels.py index c0c3794e70..74e26a43d1 100644 --- a/plotly/validators/layout/ternary/aaxis/_showticklabels.py +++ b/plotly/validators/layout/ternary/aaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.ternary.aaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_showtickprefix.py b/plotly/validators/layout/ternary/aaxis/_showtickprefix.py index 69621fa041..53fe014d8c 100644 --- a/plotly/validators/layout/ternary/aaxis/_showtickprefix.py +++ b/plotly/validators/layout/ternary/aaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.ternary.aaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_showticksuffix.py b/plotly/validators/layout/ternary/aaxis/_showticksuffix.py index 86d7a8ed13..41ab43b9b6 100644 --- a/plotly/validators/layout/ternary/aaxis/_showticksuffix.py +++ b/plotly/validators/layout/ternary/aaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.ternary.aaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_tick0.py b/plotly/validators/layout/ternary/aaxis/_tick0.py index 3aa8d005de..a72dbfb7f7 100644 --- a/plotly/validators/layout/ternary/aaxis/_tick0.py +++ b/plotly/validators/layout/ternary/aaxis/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="layout.ternary.aaxis", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_tickangle.py b/plotly/validators/layout/ternary/aaxis/_tickangle.py index 34595ae574..8354ad360e 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickangle.py +++ b/plotly/validators/layout/ternary/aaxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_tickcolor.py b/plotly/validators/layout/ternary/aaxis/_tickcolor.py index c315fbcc75..ae2c0f5282 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickcolor.py +++ b/plotly/validators/layout/ternary/aaxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_tickfont.py b/plotly/validators/layout/ternary/aaxis/_tickfont.py index 3d2a1bc7d4..19ef8f2909 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickfont.py +++ b/plotly/validators/layout/ternary/aaxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_tickformat.py b/plotly/validators/layout/ternary/aaxis/_tickformat.py index 5d506740e0..eced291e62 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickformat.py +++ b/plotly/validators/layout/ternary/aaxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py b/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py index 9bca349a35..66170ee6bd 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/ternary/aaxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.ternary.aaxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/ternary/aaxis/_tickformatstops.py b/plotly/validators/layout/ternary/aaxis/_tickformatstops.py index f25670c3e4..5ef6861acf 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickformatstops.py +++ b/plotly/validators/layout/ternary/aaxis/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.ternary.aaxis", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_ticklabelstep.py b/plotly/validators/layout/ternary/aaxis/_ticklabelstep.py index 5659106df1..c12c6de6ed 100644 --- a/plotly/validators/layout/ternary/aaxis/_ticklabelstep.py +++ b/plotly/validators/layout/ternary/aaxis/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.ternary.aaxis", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_ticklen.py b/plotly/validators/layout/ternary/aaxis/_ticklen.py index 9157d944f1..e6eaf75803 100644 --- a/plotly/validators/layout/ternary/aaxis/_ticklen.py +++ b/plotly/validators/layout/ternary/aaxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.ternary.aaxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_tickmode.py b/plotly/validators/layout/ternary/aaxis/_tickmode.py index f28c8e99b9..8ae4bbfa02 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickmode.py +++ b/plotly/validators/layout/ternary/aaxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/ternary/aaxis/_tickprefix.py b/plotly/validators/layout/ternary/aaxis/_tickprefix.py index 4f988fcd29..583884d0e3 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickprefix.py +++ b/plotly/validators/layout/ternary/aaxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_ticks.py b/plotly/validators/layout/ternary/aaxis/_ticks.py index c97a73a27e..4dd813e8ea 100644 --- a/plotly/validators/layout/ternary/aaxis/_ticks.py +++ b/plotly/validators/layout/ternary/aaxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.ternary.aaxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_ticksuffix.py b/plotly/validators/layout/ternary/aaxis/_ticksuffix.py index 5dbe280eb5..7e1afcbaba 100644 --- a/plotly/validators/layout/ternary/aaxis/_ticksuffix.py +++ b/plotly/validators/layout/ternary/aaxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.ternary.aaxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_ticktext.py b/plotly/validators/layout/ternary/aaxis/_ticktext.py index cc3248e0d7..cc65c48506 100644 --- a/plotly/validators/layout/ternary/aaxis/_ticktext.py +++ b/plotly/validators/layout/ternary/aaxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.ternary.aaxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py b/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py index 7bd6da09b9..9f1e75c69a 100644 --- a/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py +++ b/plotly/validators/layout/ternary/aaxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.ternary.aaxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_tickvals.py b/plotly/validators/layout/ternary/aaxis/_tickvals.py index dc7329e088..bac07e767f 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickvals.py +++ b/plotly/validators/layout/ternary/aaxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py b/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py index e9950719a6..9d6a8d8c94 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py +++ b/plotly/validators/layout/ternary/aaxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/_tickwidth.py b/plotly/validators/layout/ternary/aaxis/_tickwidth.py index b1c59bdeb9..c6233637d5 100644 --- a/plotly/validators/layout/ternary/aaxis/_tickwidth.py +++ b/plotly/validators/layout/ternary/aaxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.ternary.aaxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_title.py b/plotly/validators/layout/ternary/aaxis/_title.py index 0024dfcd5f..22e4fd806d 100644 --- a/plotly/validators/layout/ternary/aaxis/_title.py +++ b/plotly/validators/layout/ternary/aaxis/_title.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="layout.ternary.aaxis", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/_uirevision.py b/plotly/validators/layout/ternary/aaxis/_uirevision.py index f9b44f3c61..c85f83334f 100644 --- a/plotly/validators/layout/ternary/aaxis/_uirevision.py +++ b/plotly/validators/layout/ternary/aaxis/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.ternary.aaxis", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py b/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_color.py b/plotly/validators/layout/ternary/aaxis/tickfont/_color.py index 15864fee5f..216aeee370 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_color.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.aaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_family.py b/plotly/validators/layout/ternary/aaxis/tickfont/_family.py index 17257e3d7d..02c05bd489 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_family.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_lineposition.py b/plotly/validators/layout/ternary/aaxis/tickfont/_lineposition.py index c621ac133e..e0a36be3e6 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_shadow.py b/plotly/validators/layout/ternary/aaxis/tickfont/_shadow.py index 2911253ae0..e3fca8df50 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_size.py b/plotly/validators/layout/ternary/aaxis/tickfont/_size.py index 3c3f5193b4..d061f35cfa 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_size.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.aaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_style.py b/plotly/validators/layout/ternary/aaxis/tickfont/_style.py index d438c2f75a..8da25a8aa5 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_style.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.ternary.aaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_textcase.py b/plotly/validators/layout/ternary/aaxis/tickfont/_textcase.py index 6b7f879542..dba9914aa9 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_variant.py b/plotly/validators/layout/ternary/aaxis/tickfont/_variant.py index b780f65fd4..538ce71929 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_variant.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/ternary/aaxis/tickfont/_weight.py b/plotly/validators/layout/ternary/aaxis/tickfont/_weight.py index e1b3be89d2..aa2e8d77e9 100644 --- a/plotly/validators/layout/ternary/aaxis/tickfont/_weight.py +++ b/plotly/validators/layout/ternary/aaxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.ternary.aaxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py b/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/ternary/aaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py index 0c8a5e4d2a..18ec3b3c5b 100644 --- a/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/ternary/aaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.ternary.aaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py b/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py index 047be9cbc9..1b6d16329c 100644 --- a/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/ternary/aaxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.ternary.aaxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py b/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py index cad40679c1..d52d57c096 100644 --- a/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/ternary/aaxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.ternary.aaxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py index 60672120fb..8bcc1bf8bc 100644 --- a/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/ternary/aaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.ternary.aaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py b/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py index a9c601c8d5..08ec78ee69 100644 --- a/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/ternary/aaxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.ternary.aaxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/title/__init__.py b/plotly/validators/layout/ternary/aaxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/ternary/aaxis/title/__init__.py +++ b/plotly/validators/layout/ternary/aaxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/ternary/aaxis/title/_font.py b/plotly/validators/layout/ternary/aaxis/title/_font.py index 9e6cc35483..f7d4e21dea 100644 --- a/plotly/validators/layout/ternary/aaxis/title/_font.py +++ b/plotly/validators/layout/ternary/aaxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.ternary.aaxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/title/_text.py b/plotly/validators/layout/ternary/aaxis/title/_text.py index 6771e130e1..460197d26f 100644 --- a/plotly/validators/layout/ternary/aaxis/title/_text.py +++ b/plotly/validators/layout/ternary/aaxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.ternary.aaxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/title/font/__init__.py b/plotly/validators/layout/ternary/aaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/__init__.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_color.py b/plotly/validators/layout/ternary/aaxis/title/font/_color.py index d34a02e65c..2f26c97e4a 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_color.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_family.py b/plotly/validators/layout/ternary/aaxis/title/font/_family.py index 6a2cb30306..4147b2d977 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_family.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_lineposition.py b/plotly/validators/layout/ternary/aaxis/title/font/_lineposition.py index 2323013343..96982f1dc5 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_shadow.py b/plotly/validators/layout/ternary/aaxis/title/font/_shadow.py index 754b2ad638..90cd6c4eb8 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_shadow.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_size.py b/plotly/validators/layout/ternary/aaxis/title/font/_size.py index 4f95af68bc..dcbc6b2bfb 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_size.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_style.py b/plotly/validators/layout/ternary/aaxis/title/font/_style.py index dba515e617..c4d3698520 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_style.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_textcase.py b/plotly/validators/layout/ternary/aaxis/title/font/_textcase.py index eea2599535..5227f2689d 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_textcase.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_variant.py b/plotly/validators/layout/ternary/aaxis/title/font/_variant.py index 7c30d1dad6..dfb47b84f9 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_variant.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/ternary/aaxis/title/font/_weight.py b/plotly/validators/layout/ternary/aaxis/title/font/_weight.py index 629b98dc8e..1bf03218af 100644 --- a/plotly/validators/layout/ternary/aaxis/title/font/_weight.py +++ b/plotly/validators/layout/ternary/aaxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.ternary.aaxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/ternary/baxis/__init__.py b/plotly/validators/layout/ternary/baxis/__init__.py index 0fafe61824..5f18e86986 100644 --- a/plotly/validators/layout/ternary/baxis/__init__.py +++ b/plotly/validators/layout/ternary/baxis/__init__.py @@ -1,95 +1,50 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._uirevision import UirevisionValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._min import MinValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._uirevision.UirevisionValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._min.MinValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._min.MinValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/baxis/_color.py b/plotly/validators/layout/ternary/baxis/_color.py index 81f4118614..0393cc801a 100644 --- a/plotly/validators/layout/ternary/baxis/_color.py +++ b/plotly/validators/layout/ternary/baxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.baxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_dtick.py b/plotly/validators/layout/ternary/baxis/_dtick.py index cc8e71bc7b..7d88a5d0bd 100644 --- a/plotly/validators/layout/ternary/baxis/_dtick.py +++ b/plotly/validators/layout/ternary/baxis/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.ternary.baxis", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_exponentformat.py b/plotly/validators/layout/ternary/baxis/_exponentformat.py index 7a8833f6dc..8f6980a3b4 100644 --- a/plotly/validators/layout/ternary/baxis/_exponentformat.py +++ b/plotly/validators/layout/ternary/baxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.ternary.baxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_gridcolor.py b/plotly/validators/layout/ternary/baxis/_gridcolor.py index 4b8e97783d..3bbdd09cc0 100644 --- a/plotly/validators/layout/ternary/baxis/_gridcolor.py +++ b/plotly/validators/layout/ternary/baxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.ternary.baxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_griddash.py b/plotly/validators/layout/ternary/baxis/_griddash.py index 5212538f67..4019a7147f 100644 --- a/plotly/validators/layout/ternary/baxis/_griddash.py +++ b/plotly/validators/layout/ternary/baxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.ternary.baxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/ternary/baxis/_gridwidth.py b/plotly/validators/layout/ternary/baxis/_gridwidth.py index 546c2891ce..bf5fa3bd84 100644 --- a/plotly/validators/layout/ternary/baxis/_gridwidth.py +++ b/plotly/validators/layout/ternary/baxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.ternary.baxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_hoverformat.py b/plotly/validators/layout/ternary/baxis/_hoverformat.py index 6bfd37b226..d21e9dcd60 100644 --- a/plotly/validators/layout/ternary/baxis/_hoverformat.py +++ b/plotly/validators/layout/ternary/baxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.ternary.baxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_labelalias.py b/plotly/validators/layout/ternary/baxis/_labelalias.py index d76024f8e0..fe5e5a408f 100644 --- a/plotly/validators/layout/ternary/baxis/_labelalias.py +++ b/plotly/validators/layout/ternary/baxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.ternary.baxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_layer.py b/plotly/validators/layout/ternary/baxis/_layer.py index e18dcf19e5..919f261647 100644 --- a/plotly/validators/layout/ternary/baxis/_layer.py +++ b/plotly/validators/layout/ternary/baxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.ternary.baxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_linecolor.py b/plotly/validators/layout/ternary/baxis/_linecolor.py index 1db6adbb3a..4a2db059fe 100644 --- a/plotly/validators/layout/ternary/baxis/_linecolor.py +++ b/plotly/validators/layout/ternary/baxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.ternary.baxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_linewidth.py b/plotly/validators/layout/ternary/baxis/_linewidth.py index 2ae4c65cbd..52e1eca5fe 100644 --- a/plotly/validators/layout/ternary/baxis/_linewidth.py +++ b/plotly/validators/layout/ternary/baxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.ternary.baxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_min.py b/plotly/validators/layout/ternary/baxis/_min.py index 90ec078638..1e6d8e6611 100644 --- a/plotly/validators/layout/ternary/baxis/_min.py +++ b/plotly/validators/layout/ternary/baxis/_min.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinValidator(_plotly_utils.basevalidators.NumberValidator): +class MinValidator(_bv.NumberValidator): def __init__(self, plotly_name="min", parent_name="layout.ternary.baxis", **kwargs): - super(MinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_minexponent.py b/plotly/validators/layout/ternary/baxis/_minexponent.py index 142086b3e5..a72a6b9b49 100644 --- a/plotly/validators/layout/ternary/baxis/_minexponent.py +++ b/plotly/validators/layout/ternary/baxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.ternary.baxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_nticks.py b/plotly/validators/layout/ternary/baxis/_nticks.py index 23c4d8d345..25c972d928 100644 --- a/plotly/validators/layout/ternary/baxis/_nticks.py +++ b/plotly/validators/layout/ternary/baxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.ternary.baxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_separatethousands.py b/plotly/validators/layout/ternary/baxis/_separatethousands.py index f3512096d9..5d6eaa7902 100644 --- a/plotly/validators/layout/ternary/baxis/_separatethousands.py +++ b/plotly/validators/layout/ternary/baxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.ternary.baxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_showexponent.py b/plotly/validators/layout/ternary/baxis/_showexponent.py index 445dd5f5ec..2b4d869efd 100644 --- a/plotly/validators/layout/ternary/baxis/_showexponent.py +++ b/plotly/validators/layout/ternary/baxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.ternary.baxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_showgrid.py b/plotly/validators/layout/ternary/baxis/_showgrid.py index a02196bbf8..f01fb245b8 100644 --- a/plotly/validators/layout/ternary/baxis/_showgrid.py +++ b/plotly/validators/layout/ternary/baxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.ternary.baxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_showline.py b/plotly/validators/layout/ternary/baxis/_showline.py index 7b86bb76b5..1e21d49536 100644 --- a/plotly/validators/layout/ternary/baxis/_showline.py +++ b/plotly/validators/layout/ternary/baxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.ternary.baxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_showticklabels.py b/plotly/validators/layout/ternary/baxis/_showticklabels.py index 922f00c49e..9196c98f89 100644 --- a/plotly/validators/layout/ternary/baxis/_showticklabels.py +++ b/plotly/validators/layout/ternary/baxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.ternary.baxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_showtickprefix.py b/plotly/validators/layout/ternary/baxis/_showtickprefix.py index 6f57deed79..beee076add 100644 --- a/plotly/validators/layout/ternary/baxis/_showtickprefix.py +++ b/plotly/validators/layout/ternary/baxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.ternary.baxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_showticksuffix.py b/plotly/validators/layout/ternary/baxis/_showticksuffix.py index 633a125f7e..f01ceb2bbc 100644 --- a/plotly/validators/layout/ternary/baxis/_showticksuffix.py +++ b/plotly/validators/layout/ternary/baxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.ternary.baxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_tick0.py b/plotly/validators/layout/ternary/baxis/_tick0.py index 011aad01bc..9747169062 100644 --- a/plotly/validators/layout/ternary/baxis/_tick0.py +++ b/plotly/validators/layout/ternary/baxis/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="layout.ternary.baxis", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_tickangle.py b/plotly/validators/layout/ternary/baxis/_tickangle.py index 9bf3e01ffa..f6eb1dd78b 100644 --- a/plotly/validators/layout/ternary/baxis/_tickangle.py +++ b/plotly/validators/layout/ternary/baxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.ternary.baxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_tickcolor.py b/plotly/validators/layout/ternary/baxis/_tickcolor.py index 7352b2e57c..02ede5ee57 100644 --- a/plotly/validators/layout/ternary/baxis/_tickcolor.py +++ b/plotly/validators/layout/ternary/baxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.ternary.baxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_tickfont.py b/plotly/validators/layout/ternary/baxis/_tickfont.py index dc9f1d74da..7ea79062f7 100644 --- a/plotly/validators/layout/ternary/baxis/_tickfont.py +++ b/plotly/validators/layout/ternary/baxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.ternary.baxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_tickformat.py b/plotly/validators/layout/ternary/baxis/_tickformat.py index 4944fcb3c1..3e92cd1c4c 100644 --- a/plotly/validators/layout/ternary/baxis/_tickformat.py +++ b/plotly/validators/layout/ternary/baxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.ternary.baxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py b/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py index 4e5064d76b..b97feb9da6 100644 --- a/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/ternary/baxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.ternary.baxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/ternary/baxis/_tickformatstops.py b/plotly/validators/layout/ternary/baxis/_tickformatstops.py index 345d97a859..7f81a41296 100644 --- a/plotly/validators/layout/ternary/baxis/_tickformatstops.py +++ b/plotly/validators/layout/ternary/baxis/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.ternary.baxis", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_ticklabelstep.py b/plotly/validators/layout/ternary/baxis/_ticklabelstep.py index d51c479b62..adf68a5726 100644 --- a/plotly/validators/layout/ternary/baxis/_ticklabelstep.py +++ b/plotly/validators/layout/ternary/baxis/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.ternary.baxis", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_ticklen.py b/plotly/validators/layout/ternary/baxis/_ticklen.py index be3d81e24e..712b779c4b 100644 --- a/plotly/validators/layout/ternary/baxis/_ticklen.py +++ b/plotly/validators/layout/ternary/baxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.ternary.baxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_tickmode.py b/plotly/validators/layout/ternary/baxis/_tickmode.py index 4049721008..97f7b6c997 100644 --- a/plotly/validators/layout/ternary/baxis/_tickmode.py +++ b/plotly/validators/layout/ternary/baxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.ternary.baxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/ternary/baxis/_tickprefix.py b/plotly/validators/layout/ternary/baxis/_tickprefix.py index 4f9a8faec6..1d983c90ca 100644 --- a/plotly/validators/layout/ternary/baxis/_tickprefix.py +++ b/plotly/validators/layout/ternary/baxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.ternary.baxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_ticks.py b/plotly/validators/layout/ternary/baxis/_ticks.py index 9b2e433d7a..f760bac8df 100644 --- a/plotly/validators/layout/ternary/baxis/_ticks.py +++ b/plotly/validators/layout/ternary/baxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.ternary.baxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_ticksuffix.py b/plotly/validators/layout/ternary/baxis/_ticksuffix.py index e65decd24c..7a02208735 100644 --- a/plotly/validators/layout/ternary/baxis/_ticksuffix.py +++ b/plotly/validators/layout/ternary/baxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.ternary.baxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_ticktext.py b/plotly/validators/layout/ternary/baxis/_ticktext.py index ee294edb73..bd1ba1d138 100644 --- a/plotly/validators/layout/ternary/baxis/_ticktext.py +++ b/plotly/validators/layout/ternary/baxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.ternary.baxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_ticktextsrc.py b/plotly/validators/layout/ternary/baxis/_ticktextsrc.py index 4ba97c3b0a..feebc112ff 100644 --- a/plotly/validators/layout/ternary/baxis/_ticktextsrc.py +++ b/plotly/validators/layout/ternary/baxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.ternary.baxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_tickvals.py b/plotly/validators/layout/ternary/baxis/_tickvals.py index eb508a9505..3e4d7928c0 100644 --- a/plotly/validators/layout/ternary/baxis/_tickvals.py +++ b/plotly/validators/layout/ternary/baxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.ternary.baxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_tickvalssrc.py b/plotly/validators/layout/ternary/baxis/_tickvalssrc.py index 3d36fade33..6e9bbe064b 100644 --- a/plotly/validators/layout/ternary/baxis/_tickvalssrc.py +++ b/plotly/validators/layout/ternary/baxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.ternary.baxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/_tickwidth.py b/plotly/validators/layout/ternary/baxis/_tickwidth.py index fb2186d69e..bc8f4a6acc 100644 --- a/plotly/validators/layout/ternary/baxis/_tickwidth.py +++ b/plotly/validators/layout/ternary/baxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.ternary.baxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_title.py b/plotly/validators/layout/ternary/baxis/_title.py index aa188ea51c..65f5288fad 100644 --- a/plotly/validators/layout/ternary/baxis/_title.py +++ b/plotly/validators/layout/ternary/baxis/_title.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="layout.ternary.baxis", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/_uirevision.py b/plotly/validators/layout/ternary/baxis/_uirevision.py index 6dd2a8ff66..07a5023373 100644 --- a/plotly/validators/layout/ternary/baxis/_uirevision.py +++ b/plotly/validators/layout/ternary/baxis/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.ternary.baxis", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/tickfont/__init__.py b/plotly/validators/layout/ternary/baxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/__init__.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_color.py b/plotly/validators/layout/ternary/baxis/tickfont/_color.py index 1c8db02dcd..cec424e444 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_color.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.baxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_family.py b/plotly/validators/layout/ternary/baxis/tickfont/_family.py index 02eb706aba..0fc766ea59 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_family.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_lineposition.py b/plotly/validators/layout/ternary/baxis/tickfont/_lineposition.py index 6493683013..be0ba1af64 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_shadow.py b/plotly/validators/layout/ternary/baxis/tickfont/_shadow.py index dafe10d05d..b27ebd249f 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_shadow.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_size.py b/plotly/validators/layout/ternary/baxis/tickfont/_size.py index 04bbe0731a..832757b086 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_size.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.baxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_style.py b/plotly/validators/layout/ternary/baxis/tickfont/_style.py index 0768a24db4..8ce2bbabb2 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_style.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.ternary.baxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_textcase.py b/plotly/validators/layout/ternary/baxis/tickfont/_textcase.py index f5e71e0ee8..079ecc7646 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_textcase.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_variant.py b/plotly/validators/layout/ternary/baxis/tickfont/_variant.py index 7fabe78bff..0bd4018689 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_variant.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/ternary/baxis/tickfont/_weight.py b/plotly/validators/layout/ternary/baxis/tickfont/_weight.py index cf72a5d20b..6e8d872243 100644 --- a/plotly/validators/layout/ternary/baxis/tickfont/_weight.py +++ b/plotly/validators/layout/ternary/baxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.ternary.baxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py b/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/ternary/baxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py index b60aceedcc..4b5880f25f 100644 --- a/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/ternary/baxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.ternary.baxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py b/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py index edd5f951d5..d0294d56b4 100644 --- a/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/ternary/baxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.ternary.baxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py b/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py index 8eea566639..4f76d3eace 100644 --- a/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py +++ b/plotly/validators/layout/ternary/baxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.ternary.baxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py index 6307cc6a8b..d1c5f5c9ee 100644 --- a/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/ternary/baxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.ternary.baxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py b/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py index 80b6df39bd..77ba003744 100644 --- a/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py +++ b/plotly/validators/layout/ternary/baxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.ternary.baxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/title/__init__.py b/plotly/validators/layout/ternary/baxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/ternary/baxis/title/__init__.py +++ b/plotly/validators/layout/ternary/baxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/ternary/baxis/title/_font.py b/plotly/validators/layout/ternary/baxis/title/_font.py index f7424b2798..7222e7ff29 100644 --- a/plotly/validators/layout/ternary/baxis/title/_font.py +++ b/plotly/validators/layout/ternary/baxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.ternary.baxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/title/_text.py b/plotly/validators/layout/ternary/baxis/title/_text.py index 9d4dd5118a..3c8b1d113c 100644 --- a/plotly/validators/layout/ternary/baxis/title/_text.py +++ b/plotly/validators/layout/ternary/baxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.ternary.baxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/title/font/__init__.py b/plotly/validators/layout/ternary/baxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/__init__.py +++ b/plotly/validators/layout/ternary/baxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/baxis/title/font/_color.py b/plotly/validators/layout/ternary/baxis/title/font/_color.py index c819cc912e..4e4e222492 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_color.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/title/font/_family.py b/plotly/validators/layout/ternary/baxis/title/font/_family.py index f5e6eddaab..acb7369471 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_family.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/ternary/baxis/title/font/_lineposition.py b/plotly/validators/layout/ternary/baxis/title/font/_lineposition.py index 621d852b3b..f938dc9e1d 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_lineposition.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/ternary/baxis/title/font/_shadow.py b/plotly/validators/layout/ternary/baxis/title/font/_shadow.py index 40062e44c3..127ae7035e 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_shadow.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/baxis/title/font/_size.py b/plotly/validators/layout/ternary/baxis/title/font/_size.py index 565cfb6360..a42d115f6b 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_size.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/title/font/_style.py b/plotly/validators/layout/ternary/baxis/title/font/_style.py index 168d5658ae..bfbfa59931 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_style.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/title/font/_textcase.py b/plotly/validators/layout/ternary/baxis/title/font/_textcase.py index 2cfa5b44ad..478738c9dd 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_textcase.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/ternary/baxis/title/font/_variant.py b/plotly/validators/layout/ternary/baxis/title/font/_variant.py index 5c420d3a06..c6a757a2d4 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_variant.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/ternary/baxis/title/font/_weight.py b/plotly/validators/layout/ternary/baxis/title/font/_weight.py index 076b993189..8ae29acd81 100644 --- a/plotly/validators/layout/ternary/baxis/title/font/_weight.py +++ b/plotly/validators/layout/ternary/baxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.ternary.baxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/ternary/caxis/__init__.py b/plotly/validators/layout/ternary/caxis/__init__.py index 0fafe61824..5f18e86986 100644 --- a/plotly/validators/layout/ternary/caxis/__init__.py +++ b/plotly/validators/layout/ternary/caxis/__init__.py @@ -1,95 +1,50 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._uirevision import UirevisionValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._min import MinValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._uirevision.UirevisionValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._min.MinValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._uirevision.UirevisionValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._min.MinValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/caxis/_color.py b/plotly/validators/layout/ternary/caxis/_color.py index 445c83b07f..3a899f3f56 100644 --- a/plotly/validators/layout/ternary/caxis/_color.py +++ b/plotly/validators/layout/ternary/caxis/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.caxis", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_dtick.py b/plotly/validators/layout/ternary/caxis/_dtick.py index 5b31a874b9..cd23a121fc 100644 --- a/plotly/validators/layout/ternary/caxis/_dtick.py +++ b/plotly/validators/layout/ternary/caxis/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="layout.ternary.caxis", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_exponentformat.py b/plotly/validators/layout/ternary/caxis/_exponentformat.py index 5fe6734dae..4943da7c4b 100644 --- a/plotly/validators/layout/ternary/caxis/_exponentformat.py +++ b/plotly/validators/layout/ternary/caxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.ternary.caxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_gridcolor.py b/plotly/validators/layout/ternary/caxis/_gridcolor.py index 444f930ba9..e4cbc07527 100644 --- a/plotly/validators/layout/ternary/caxis/_gridcolor.py +++ b/plotly/validators/layout/ternary/caxis/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.ternary.caxis", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_griddash.py b/plotly/validators/layout/ternary/caxis/_griddash.py index 6336c362d2..f1f81d527a 100644 --- a/plotly/validators/layout/ternary/caxis/_griddash.py +++ b/plotly/validators/layout/ternary/caxis/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.ternary.caxis", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/ternary/caxis/_gridwidth.py b/plotly/validators/layout/ternary/caxis/_gridwidth.py index 77178201e2..32ec24e134 100644 --- a/plotly/validators/layout/ternary/caxis/_gridwidth.py +++ b/plotly/validators/layout/ternary/caxis/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.ternary.caxis", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_hoverformat.py b/plotly/validators/layout/ternary/caxis/_hoverformat.py index df67ce269e..96a4ad3564 100644 --- a/plotly/validators/layout/ternary/caxis/_hoverformat.py +++ b/plotly/validators/layout/ternary/caxis/_hoverformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__( self, plotly_name="hoverformat", parent_name="layout.ternary.caxis", **kwargs ): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_labelalias.py b/plotly/validators/layout/ternary/caxis/_labelalias.py index 5211c225ce..a111dc4f06 100644 --- a/plotly/validators/layout/ternary/caxis/_labelalias.py +++ b/plotly/validators/layout/ternary/caxis/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="layout.ternary.caxis", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_layer.py b/plotly/validators/layout/ternary/caxis/_layer.py index 71472ff37b..90aac193d3 100644 --- a/plotly/validators/layout/ternary/caxis/_layer.py +++ b/plotly/validators/layout/ternary/caxis/_layer.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="layer", parent_name="layout.ternary.caxis", **kwargs ): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_linecolor.py b/plotly/validators/layout/ternary/caxis/_linecolor.py index c21fd97b6c..6b838d18d5 100644 --- a/plotly/validators/layout/ternary/caxis/_linecolor.py +++ b/plotly/validators/layout/ternary/caxis/_linecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="linecolor", parent_name="layout.ternary.caxis", **kwargs ): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_linewidth.py b/plotly/validators/layout/ternary/caxis/_linewidth.py index f2f88f69bc..45008e2745 100644 --- a/plotly/validators/layout/ternary/caxis/_linewidth.py +++ b/plotly/validators/layout/ternary/caxis/_linewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="linewidth", parent_name="layout.ternary.caxis", **kwargs ): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_min.py b/plotly/validators/layout/ternary/caxis/_min.py index 19ca2f04be..9eab512821 100644 --- a/plotly/validators/layout/ternary/caxis/_min.py +++ b/plotly/validators/layout/ternary/caxis/_min.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinValidator(_plotly_utils.basevalidators.NumberValidator): +class MinValidator(_bv.NumberValidator): def __init__(self, plotly_name="min", parent_name="layout.ternary.caxis", **kwargs): - super(MinValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_minexponent.py b/plotly/validators/layout/ternary/caxis/_minexponent.py index b9b0b50d5f..56c31c4d85 100644 --- a/plotly/validators/layout/ternary/caxis/_minexponent.py +++ b/plotly/validators/layout/ternary/caxis/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="layout.ternary.caxis", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_nticks.py b/plotly/validators/layout/ternary/caxis/_nticks.py index 5c5b0fc32e..2587304338 100644 --- a/plotly/validators/layout/ternary/caxis/_nticks.py +++ b/plotly/validators/layout/ternary/caxis/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.ternary.caxis", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_separatethousands.py b/plotly/validators/layout/ternary/caxis/_separatethousands.py index 58113c40db..525f5998ef 100644 --- a/plotly/validators/layout/ternary/caxis/_separatethousands.py +++ b/plotly/validators/layout/ternary/caxis/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.ternary.caxis", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_showexponent.py b/plotly/validators/layout/ternary/caxis/_showexponent.py index 89d668e881..0cde980218 100644 --- a/plotly/validators/layout/ternary/caxis/_showexponent.py +++ b/plotly/validators/layout/ternary/caxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.ternary.caxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_showgrid.py b/plotly/validators/layout/ternary/caxis/_showgrid.py index 4d3d8f4e91..11b737d355 100644 --- a/plotly/validators/layout/ternary/caxis/_showgrid.py +++ b/plotly/validators/layout/ternary/caxis/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.ternary.caxis", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_showline.py b/plotly/validators/layout/ternary/caxis/_showline.py index c8e4d1cb7a..b001be67d0 100644 --- a/plotly/validators/layout/ternary/caxis/_showline.py +++ b/plotly/validators/layout/ternary/caxis/_showline.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showline", parent_name="layout.ternary.caxis", **kwargs ): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_showticklabels.py b/plotly/validators/layout/ternary/caxis/_showticklabels.py index 4149cd6027..06584b42de 100644 --- a/plotly/validators/layout/ternary/caxis/_showticklabels.py +++ b/plotly/validators/layout/ternary/caxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.ternary.caxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_showtickprefix.py b/plotly/validators/layout/ternary/caxis/_showtickprefix.py index 1c214423d7..9407460988 100644 --- a/plotly/validators/layout/ternary/caxis/_showtickprefix.py +++ b/plotly/validators/layout/ternary/caxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.ternary.caxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_showticksuffix.py b/plotly/validators/layout/ternary/caxis/_showticksuffix.py index 77db398471..0778052b5e 100644 --- a/plotly/validators/layout/ternary/caxis/_showticksuffix.py +++ b/plotly/validators/layout/ternary/caxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.ternary.caxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_tick0.py b/plotly/validators/layout/ternary/caxis/_tick0.py index 698fa9479c..4162ccbf3f 100644 --- a/plotly/validators/layout/ternary/caxis/_tick0.py +++ b/plotly/validators/layout/ternary/caxis/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="layout.ternary.caxis", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_tickangle.py b/plotly/validators/layout/ternary/caxis/_tickangle.py index 9572f41751..de2527e41d 100644 --- a/plotly/validators/layout/ternary/caxis/_tickangle.py +++ b/plotly/validators/layout/ternary/caxis/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="layout.ternary.caxis", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_tickcolor.py b/plotly/validators/layout/ternary/caxis/_tickcolor.py index 0b2ede38d6..7022bce194 100644 --- a/plotly/validators/layout/ternary/caxis/_tickcolor.py +++ b/plotly/validators/layout/ternary/caxis/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.ternary.caxis", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_tickfont.py b/plotly/validators/layout/ternary/caxis/_tickfont.py index 4095c0366c..8da5c6a2b0 100644 --- a/plotly/validators/layout/ternary/caxis/_tickfont.py +++ b/plotly/validators/layout/ternary/caxis/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="layout.ternary.caxis", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_tickformat.py b/plotly/validators/layout/ternary/caxis/_tickformat.py index 5c19bf57ae..9c41c00940 100644 --- a/plotly/validators/layout/ternary/caxis/_tickformat.py +++ b/plotly/validators/layout/ternary/caxis/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="layout.ternary.caxis", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py b/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py index 42fc6530d9..1650e149b8 100644 --- a/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/ternary/caxis/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.ternary.caxis", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/ternary/caxis/_tickformatstops.py b/plotly/validators/layout/ternary/caxis/_tickformatstops.py index 2b0e2415fc..5fb49a21d7 100644 --- a/plotly/validators/layout/ternary/caxis/_tickformatstops.py +++ b/plotly/validators/layout/ternary/caxis/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.ternary.caxis", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_ticklabelstep.py b/plotly/validators/layout/ternary/caxis/_ticklabelstep.py index bbcb7a847a..9b45da3617 100644 --- a/plotly/validators/layout/ternary/caxis/_ticklabelstep.py +++ b/plotly/validators/layout/ternary/caxis/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.ternary.caxis", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_ticklen.py b/plotly/validators/layout/ternary/caxis/_ticklen.py index 0216e825f0..2a756f3b9e 100644 --- a/plotly/validators/layout/ternary/caxis/_ticklen.py +++ b/plotly/validators/layout/ternary/caxis/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.ternary.caxis", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_tickmode.py b/plotly/validators/layout/ternary/caxis/_tickmode.py index f83c3d1199..38d8dbb7d5 100644 --- a/plotly/validators/layout/ternary/caxis/_tickmode.py +++ b/plotly/validators/layout/ternary/caxis/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.ternary.caxis", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/ternary/caxis/_tickprefix.py b/plotly/validators/layout/ternary/caxis/_tickprefix.py index 1d4ac5e86b..30f431e7a0 100644 --- a/plotly/validators/layout/ternary/caxis/_tickprefix.py +++ b/plotly/validators/layout/ternary/caxis/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="layout.ternary.caxis", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_ticks.py b/plotly/validators/layout/ternary/caxis/_ticks.py index aaf601c9b8..1fe79c5608 100644 --- a/plotly/validators/layout/ternary/caxis/_ticks.py +++ b/plotly/validators/layout/ternary/caxis/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="layout.ternary.caxis", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_ticksuffix.py b/plotly/validators/layout/ternary/caxis/_ticksuffix.py index e842481135..72e96a5781 100644 --- a/plotly/validators/layout/ternary/caxis/_ticksuffix.py +++ b/plotly/validators/layout/ternary/caxis/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="layout.ternary.caxis", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_ticktext.py b/plotly/validators/layout/ternary/caxis/_ticktext.py index 92f428cfd7..4520646438 100644 --- a/plotly/validators/layout/ternary/caxis/_ticktext.py +++ b/plotly/validators/layout/ternary/caxis/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="layout.ternary.caxis", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_ticktextsrc.py b/plotly/validators/layout/ternary/caxis/_ticktextsrc.py index 5ecdfb7003..5df59d96bb 100644 --- a/plotly/validators/layout/ternary/caxis/_ticktextsrc.py +++ b/plotly/validators/layout/ternary/caxis/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="layout.ternary.caxis", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_tickvals.py b/plotly/validators/layout/ternary/caxis/_tickvals.py index 986ff5e397..2af5715b62 100644 --- a/plotly/validators/layout/ternary/caxis/_tickvals.py +++ b/plotly/validators/layout/ternary/caxis/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.ternary.caxis", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_tickvalssrc.py b/plotly/validators/layout/ternary/caxis/_tickvalssrc.py index bb08253cfa..f71c73ad64 100644 --- a/plotly/validators/layout/ternary/caxis/_tickvalssrc.py +++ b/plotly/validators/layout/ternary/caxis/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.ternary.caxis", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/_tickwidth.py b/plotly/validators/layout/ternary/caxis/_tickwidth.py index 4e1ecd81e3..6e5b2ab7f5 100644 --- a/plotly/validators/layout/ternary/caxis/_tickwidth.py +++ b/plotly/validators/layout/ternary/caxis/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.ternary.caxis", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_title.py b/plotly/validators/layout/ternary/caxis/_title.py index ce6321ecf1..0124c6e48f 100644 --- a/plotly/validators/layout/ternary/caxis/_title.py +++ b/plotly/validators/layout/ternary/caxis/_title.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="layout.ternary.caxis", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/_uirevision.py b/plotly/validators/layout/ternary/caxis/_uirevision.py index 830d7e213c..df9d5e252b 100644 --- a/plotly/validators/layout/ternary/caxis/_uirevision.py +++ b/plotly/validators/layout/ternary/caxis/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="layout.ternary.caxis", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/tickfont/__init__.py b/plotly/validators/layout/ternary/caxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/__init__.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_color.py b/plotly/validators/layout/ternary/caxis/tickfont/_color.py index 81b7dcb546..9230691ccc 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_color.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.caxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_family.py b/plotly/validators/layout/ternary/caxis/tickfont/_family.py index 4b4461e3d3..6e077fd6a9 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_family.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.caxis.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_lineposition.py b/plotly/validators/layout/ternary/caxis/tickfont/_lineposition.py index 4961449b6c..6796badcfd 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.caxis.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_shadow.py b/plotly/validators/layout/ternary/caxis/tickfont/_shadow.py index 1b4b69acd8..c950b3c9c0 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_shadow.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.caxis.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_size.py b/plotly/validators/layout/ternary/caxis/tickfont/_size.py index 8bcddbdd0f..a1d859d0f7 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_size.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.caxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_style.py b/plotly/validators/layout/ternary/caxis/tickfont/_style.py index 5ded3c244a..3ab4ccec28 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_style.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.ternary.caxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_textcase.py b/plotly/validators/layout/ternary/caxis/tickfont/_textcase.py index acda7aaaaa..49ec8a342d 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_textcase.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.ternary.caxis.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_variant.py b/plotly/validators/layout/ternary/caxis/tickfont/_variant.py index fc3e098371..96d858a9e1 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_variant.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.ternary.caxis.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/ternary/caxis/tickfont/_weight.py b/plotly/validators/layout/ternary/caxis/tickfont/_weight.py index f5bbc61a07..4401d6dd84 100644 --- a/plotly/validators/layout/ternary/caxis/tickfont/_weight.py +++ b/plotly/validators/layout/ternary/caxis/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.ternary.caxis.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py b/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/ternary/caxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py index 985e7edc3a..5b185eeba9 100644 --- a/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/ternary/caxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.ternary.caxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py b/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py index 1102a0996e..06422fda07 100644 --- a/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/ternary/caxis/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.ternary.caxis.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py b/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py index 3a6ff07406..da1e857b29 100644 --- a/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py +++ b/plotly/validators/layout/ternary/caxis/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.ternary.caxis.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py index dc4c665fc9..6aff149b4d 100644 --- a/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/ternary/caxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.ternary.caxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py b/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py index 80fced51dd..4b07f978a7 100644 --- a/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py +++ b/plotly/validators/layout/ternary/caxis/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.ternary.caxis.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/title/__init__.py b/plotly/validators/layout/ternary/caxis/title/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/ternary/caxis/title/__init__.py +++ b/plotly/validators/layout/ternary/caxis/title/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/ternary/caxis/title/_font.py b/plotly/validators/layout/ternary/caxis/title/_font.py index fb15481211..ff05045770 100644 --- a/plotly/validators/layout/ternary/caxis/title/_font.py +++ b/plotly/validators/layout/ternary/caxis/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.ternary.caxis.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/title/_text.py b/plotly/validators/layout/ternary/caxis/title/_text.py index 706481313c..412d37342d 100644 --- a/plotly/validators/layout/ternary/caxis/title/_text.py +++ b/plotly/validators/layout/ternary/caxis/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.ternary.caxis.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/title/font/__init__.py b/plotly/validators/layout/ternary/caxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/__init__.py +++ b/plotly/validators/layout/ternary/caxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/ternary/caxis/title/font/_color.py b/plotly/validators/layout/ternary/caxis/title/font/_color.py index cba638198b..bdefbf0ab9 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_color.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/title/font/_family.py b/plotly/validators/layout/ternary/caxis/title/font/_family.py index 4962500a29..3b8eed4041 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_family.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/ternary/caxis/title/font/_lineposition.py b/plotly/validators/layout/ternary/caxis/title/font/_lineposition.py index 163f871f73..dd8e896973 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_lineposition.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/ternary/caxis/title/font/_shadow.py b/plotly/validators/layout/ternary/caxis/title/font/_shadow.py index 732dd3eda0..290211bcfd 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_shadow.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/ternary/caxis/title/font/_size.py b/plotly/validators/layout/ternary/caxis/title/font/_size.py index a104f3fd7c..d1ce5ba320 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_size.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/title/font/_style.py b/plotly/validators/layout/ternary/caxis/title/font/_style.py index af8ea85e86..7a5019c633 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_style.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/title/font/_textcase.py b/plotly/validators/layout/ternary/caxis/title/font/_textcase.py index 99fb0d1804..e81ef78240 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_textcase.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/ternary/caxis/title/font/_variant.py b/plotly/validators/layout/ternary/caxis/title/font/_variant.py index 0db41f3296..9d9c87d097 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_variant.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/ternary/caxis/title/font/_weight.py b/plotly/validators/layout/ternary/caxis/title/font/_weight.py index 4859322250..2dd2a3889d 100644 --- a/plotly/validators/layout/ternary/caxis/title/font/_weight.py +++ b/plotly/validators/layout/ternary/caxis/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.ternary.caxis.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/ternary/domain/__init__.py b/plotly/validators/layout/ternary/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/layout/ternary/domain/__init__.py +++ b/plotly/validators/layout/ternary/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/layout/ternary/domain/_column.py b/plotly/validators/layout/ternary/domain/_column.py index 2a69c44e31..4c8005c524 100644 --- a/plotly/validators/layout/ternary/domain/_column.py +++ b/plotly/validators/layout/ternary/domain/_column.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__( self, plotly_name="column", parent_name="layout.ternary.domain", **kwargs ): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/domain/_row.py b/plotly/validators/layout/ternary/domain/_row.py index 2322246b72..03755d8355 100644 --- a/plotly/validators/layout/ternary/domain/_row.py +++ b/plotly/validators/layout/ternary/domain/_row.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__( self, plotly_name="row", parent_name="layout.ternary.domain", **kwargs ): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/ternary/domain/_x.py b/plotly/validators/layout/ternary/domain/_x.py index 2ec412e51d..b4bc3d48dd 100644 --- a/plotly/validators/layout/ternary/domain/_x.py +++ b/plotly/validators/layout/ternary/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="layout.ternary.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/ternary/domain/_y.py b/plotly/validators/layout/ternary/domain/_y.py index 0d45bc53a4..a914087a33 100644 --- a/plotly/validators/layout/ternary/domain/_y.py +++ b/plotly/validators/layout/ternary/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="layout.ternary.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/title/__init__.py b/plotly/validators/layout/title/__init__.py index ff0523d680..d5874a9ef9 100644 --- a/plotly/validators/layout/title/__init__.py +++ b/plotly/validators/layout/title/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._text import TextValidator - from ._subtitle import SubtitleValidator - from ._pad import PadValidator - from ._font import FontValidator - from ._automargin import AutomarginValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._text.TextValidator", - "._subtitle.SubtitleValidator", - "._pad.PadValidator", - "._font.FontValidator", - "._automargin.AutomarginValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._text.TextValidator", + "._subtitle.SubtitleValidator", + "._pad.PadValidator", + "._font.FontValidator", + "._automargin.AutomarginValidator", + ], +) diff --git a/plotly/validators/layout/title/_automargin.py b/plotly/validators/layout/title/_automargin.py index 54acf090f0..fdd94ad13b 100644 --- a/plotly/validators/layout/title/_automargin.py +++ b/plotly/validators/layout/title/_automargin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutomarginValidator(_bv.BooleanValidator): def __init__(self, plotly_name="automargin", parent_name="layout.title", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/title/_font.py b/plotly/validators/layout/title/_font.py index 748bf7a20d..fefce8e66d 100644 --- a/plotly/validators/layout/title/_font.py +++ b/plotly/validators/layout/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/title/_pad.py b/plotly/validators/layout/title/_pad.py index 4a2ecbc678..ab0fa37f0f 100644 --- a/plotly/validators/layout/title/_pad.py +++ b/plotly/validators/layout/title/_pad.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): +class PadValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pad", parent_name="layout.title", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pad"), data_docs=kwargs.pop( "data_docs", """ - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. """, ), **kwargs, diff --git a/plotly/validators/layout/title/_subtitle.py b/plotly/validators/layout/title/_subtitle.py index b74d1474cb..9474629684 100644 --- a/plotly/validators/layout/title/_subtitle.py +++ b/plotly/validators/layout/title/_subtitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubtitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class SubtitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="subtitle", parent_name="layout.title", **kwargs): - super(SubtitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Subtitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets the subtitle font. - text - Sets the plot's subtitle. """, ), **kwargs, diff --git a/plotly/validators/layout/title/_text.py b/plotly/validators/layout/title/_text.py index 306c672976..8153a4ac0b 100644 --- a/plotly/validators/layout/title/_text.py +++ b/plotly/validators/layout/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/_x.py b/plotly/validators/layout/title/_x.py index 72f5e357b8..58edcbaa95 100644 --- a/plotly/validators/layout/title/_x.py +++ b/plotly/validators/layout/title/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="layout.title", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/title/_xanchor.py b/plotly/validators/layout/title/_xanchor.py index 8d1cd362b5..f84e6f6c26 100644 --- a/plotly/validators/layout/title/_xanchor.py +++ b/plotly/validators/layout/title/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="layout.title", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/title/_xref.py b/plotly/validators/layout/title/_xref.py index e1ce968ed4..7420853574 100644 --- a/plotly/validators/layout/title/_xref.py +++ b/plotly/validators/layout/title/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="layout.title", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/layout/title/_y.py b/plotly/validators/layout/title/_y.py index 9a184bfae8..eaabe9ff7a 100644 --- a/plotly/validators/layout/title/_y.py +++ b/plotly/validators/layout/title/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="layout.title", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/title/_yanchor.py b/plotly/validators/layout/title/_yanchor.py index 3a2e60fd15..6cd3c60eba 100644 --- a/plotly/validators/layout/title/_yanchor.py +++ b/plotly/validators/layout/title/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="layout.title", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/title/_yref.py b/plotly/validators/layout/title/_yref.py index 3e9523fe0d..14efbbf3bf 100644 --- a/plotly/validators/layout/title/_yref.py +++ b/plotly/validators/layout/title/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="layout.title", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/layout/title/font/__init__.py b/plotly/validators/layout/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/title/font/__init__.py +++ b/plotly/validators/layout/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/title/font/_color.py b/plotly/validators/layout/title/font/_color.py index e5c8c451c1..4846323afd 100644 --- a/plotly/validators/layout/title/font/_color.py +++ b/plotly/validators/layout/title/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.title.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/font/_family.py b/plotly/validators/layout/title/font/_family.py index 33803083d5..208c2eff4f 100644 --- a/plotly/validators/layout/title/font/_family.py +++ b/plotly/validators/layout/title/font/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="layout.title.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/title/font/_lineposition.py b/plotly/validators/layout/title/font/_lineposition.py index bbbbea590f..13e4ee42fa 100644 --- a/plotly/validators/layout/title/font/_lineposition.py +++ b/plotly/validators/layout/title/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.title.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/title/font/_shadow.py b/plotly/validators/layout/title/font/_shadow.py index 309cddd429..38c5d93f75 100644 --- a/plotly/validators/layout/title/font/_shadow.py +++ b/plotly/validators/layout/title/font/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="layout.title.font", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/font/_size.py b/plotly/validators/layout/title/font/_size.py index e53e199f32..f75efbaacc 100644 --- a/plotly/validators/layout/title/font/_size.py +++ b/plotly/validators/layout/title/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="layout.title.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/title/font/_style.py b/plotly/validators/layout/title/font/_style.py index 881f04c499..af9da5c018 100644 --- a/plotly/validators/layout/title/font/_style.py +++ b/plotly/validators/layout/title/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="layout.title.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/title/font/_textcase.py b/plotly/validators/layout/title/font/_textcase.py index 2d01a361eb..3b6de86f04 100644 --- a/plotly/validators/layout/title/font/_textcase.py +++ b/plotly/validators/layout/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/title/font/_variant.py b/plotly/validators/layout/title/font/_variant.py index 0aab05197a..d28307838f 100644 --- a/plotly/validators/layout/title/font/_variant.py +++ b/plotly/validators/layout/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/title/font/_weight.py b/plotly/validators/layout/title/font/_weight.py index 4a05d3ac7a..87074b192e 100644 --- a/plotly/validators/layout/title/font/_weight.py +++ b/plotly/validators/layout/title/font/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="layout.title.font", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/title/pad/__init__.py b/plotly/validators/layout/title/pad/__init__.py index 04e64dbc5e..4189bfbe1f 100644 --- a/plotly/validators/layout/title/pad/__init__.py +++ b/plotly/validators/layout/title/pad/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._t import TValidator - from ._r import RValidator - from ._l import LValidator - from ._b import BValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], +) diff --git a/plotly/validators/layout/title/pad/_b.py b/plotly/validators/layout/title/pad/_b.py index fff09d801b..525d628b48 100644 --- a/plotly/validators/layout/title/pad/_b.py +++ b/plotly/validators/layout/title/pad/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.NumberValidator): +class BValidator(_bv.NumberValidator): def __init__(self, plotly_name="b", parent_name="layout.title.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/pad/_l.py b/plotly/validators/layout/title/pad/_l.py index 75a1a7e2ad..4f02c203e8 100644 --- a/plotly/validators/layout/title/pad/_l.py +++ b/plotly/validators/layout/title/pad/_l.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LValidator(_plotly_utils.basevalidators.NumberValidator): +class LValidator(_bv.NumberValidator): def __init__(self, plotly_name="l", parent_name="layout.title.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/pad/_r.py b/plotly/validators/layout/title/pad/_r.py index afa1a1fe5e..cb7405b67e 100644 --- a/plotly/validators/layout/title/pad/_r.py +++ b/plotly/validators/layout/title/pad/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.NumberValidator): +class RValidator(_bv.NumberValidator): def __init__(self, plotly_name="r", parent_name="layout.title.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/pad/_t.py b/plotly/validators/layout/title/pad/_t.py index 53a3f666e4..1cbc27e969 100644 --- a/plotly/validators/layout/title/pad/_t.py +++ b/plotly/validators/layout/title/pad/_t.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TValidator(_plotly_utils.basevalidators.NumberValidator): +class TValidator(_bv.NumberValidator): def __init__(self, plotly_name="t", parent_name="layout.title.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/subtitle/__init__.py b/plotly/validators/layout/title/subtitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/layout/title/subtitle/__init__.py +++ b/plotly/validators/layout/title/subtitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/layout/title/subtitle/_font.py b/plotly/validators/layout/title/subtitle/_font.py index 7c6da318c8..ab73db7c82 100644 --- a/plotly/validators/layout/title/subtitle/_font.py +++ b/plotly/validators/layout/title/subtitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.title.subtitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/title/subtitle/_text.py b/plotly/validators/layout/title/subtitle/_text.py index 9b10ca7c2a..52c86e56b7 100644 --- a/plotly/validators/layout/title/subtitle/_text.py +++ b/plotly/validators/layout/title/subtitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="layout.title.subtitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/subtitle/font/__init__.py b/plotly/validators/layout/title/subtitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/title/subtitle/font/__init__.py +++ b/plotly/validators/layout/title/subtitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/title/subtitle/font/_color.py b/plotly/validators/layout/title/subtitle/font/_color.py index 60e321f2e9..c1b694e74a 100644 --- a/plotly/validators/layout/title/subtitle/font/_color.py +++ b/plotly/validators/layout/title/subtitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.title.subtitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/subtitle/font/_family.py b/plotly/validators/layout/title/subtitle/font/_family.py index a5ce0803f2..c5db0f3600 100644 --- a/plotly/validators/layout/title/subtitle/font/_family.py +++ b/plotly/validators/layout/title/subtitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.title.subtitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/title/subtitle/font/_lineposition.py b/plotly/validators/layout/title/subtitle/font/_lineposition.py index ec92d350f1..457a34322b 100644 --- a/plotly/validators/layout/title/subtitle/font/_lineposition.py +++ b/plotly/validators/layout/title/subtitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.title.subtitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/title/subtitle/font/_shadow.py b/plotly/validators/layout/title/subtitle/font/_shadow.py index 4587620448..9ede1ad0a4 100644 --- a/plotly/validators/layout/title/subtitle/font/_shadow.py +++ b/plotly/validators/layout/title/subtitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.title.subtitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/title/subtitle/font/_size.py b/plotly/validators/layout/title/subtitle/font/_size.py index a43ed1d68c..831fd16e8e 100644 --- a/plotly/validators/layout/title/subtitle/font/_size.py +++ b/plotly/validators/layout/title/subtitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.title.subtitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/title/subtitle/font/_style.py b/plotly/validators/layout/title/subtitle/font/_style.py index 7515f8df6f..c0a1ce9ecb 100644 --- a/plotly/validators/layout/title/subtitle/font/_style.py +++ b/plotly/validators/layout/title/subtitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.title.subtitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/title/subtitle/font/_textcase.py b/plotly/validators/layout/title/subtitle/font/_textcase.py index e857836cf1..6a726ad0e2 100644 --- a/plotly/validators/layout/title/subtitle/font/_textcase.py +++ b/plotly/validators/layout/title/subtitle/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.title.subtitle.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/title/subtitle/font/_variant.py b/plotly/validators/layout/title/subtitle/font/_variant.py index 5ae59c2fc6..f8667ef4f6 100644 --- a/plotly/validators/layout/title/subtitle/font/_variant.py +++ b/plotly/validators/layout/title/subtitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.title.subtitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/title/subtitle/font/_weight.py b/plotly/validators/layout/title/subtitle/font/_weight.py index dfc8934c05..62ca3c4f23 100644 --- a/plotly/validators/layout/title/subtitle/font/_weight.py +++ b/plotly/validators/layout/title/subtitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.title.subtitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/transition/__init__.py b/plotly/validators/layout/transition/__init__.py index 07de6dadaf..df8f606b1b 100644 --- a/plotly/validators/layout/transition/__init__.py +++ b/plotly/validators/layout/transition/__init__.py @@ -1,19 +1,12 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._ordering import OrderingValidator - from ._easing import EasingValidator - from ._duration import DurationValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._ordering.OrderingValidator", - "._easing.EasingValidator", - "._duration.DurationValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ordering.OrderingValidator", + "._easing.EasingValidator", + "._duration.DurationValidator", + ], +) diff --git a/plotly/validators/layout/transition/_duration.py b/plotly/validators/layout/transition/_duration.py index 7c46ce987f..9629c4333c 100644 --- a/plotly/validators/layout/transition/_duration.py +++ b/plotly/validators/layout/transition/_duration.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DurationValidator(_plotly_utils.basevalidators.NumberValidator): +class DurationValidator(_bv.NumberValidator): def __init__( self, plotly_name="duration", parent_name="layout.transition", **kwargs ): - super(DurationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/transition/_easing.py b/plotly/validators/layout/transition/_easing.py index ccad9edea2..55fbd6af88 100644 --- a/plotly/validators/layout/transition/_easing.py +++ b/plotly/validators/layout/transition/_easing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EasingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class EasingValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="easing", parent_name="layout.transition", **kwargs): - super(EasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/transition/_ordering.py b/plotly/validators/layout/transition/_ordering.py index c2bac1855c..2c8fffd3eb 100644 --- a/plotly/validators/layout/transition/_ordering.py +++ b/plotly/validators/layout/transition/_ordering.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrderingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrderingValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ordering", parent_name="layout.transition", **kwargs ): - super(OrderingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["layout first", "traces first"]), **kwargs, diff --git a/plotly/validators/layout/uniformtext/__init__.py b/plotly/validators/layout/uniformtext/__init__.py index 8ddff597fe..b6bb5dfdb9 100644 --- a/plotly/validators/layout/uniformtext/__init__.py +++ b/plotly/validators/layout/uniformtext/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._mode import ModeValidator - from ._minsize import MinsizeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._mode.ModeValidator", "._minsize.MinsizeValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._mode.ModeValidator", "._minsize.MinsizeValidator"] +) diff --git a/plotly/validators/layout/uniformtext/_minsize.py b/plotly/validators/layout/uniformtext/_minsize.py index 69c37d3552..9a68586465 100644 --- a/plotly/validators/layout/uniformtext/_minsize.py +++ b/plotly/validators/layout/uniformtext/_minsize.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinsizeValidator(_plotly_utils.basevalidators.NumberValidator): +class MinsizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="minsize", parent_name="layout.uniformtext", **kwargs ): - super(MinsizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/uniformtext/_mode.py b/plotly/validators/layout/uniformtext/_mode.py index 85b70ef082..60d506e091 100644 --- a/plotly/validators/layout/uniformtext/_mode.py +++ b/plotly/validators/layout/uniformtext/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ModeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="mode", parent_name="layout.uniformtext", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [False, "hide", "show"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/__init__.py b/plotly/validators/layout/updatemenu/__init__.py index cedac6271e..4136881a29 100644 --- a/plotly/validators/layout/updatemenu/__init__.py +++ b/plotly/validators/layout/updatemenu/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._type import TypeValidator - from ._templateitemname import TemplateitemnameValidator - from ._showactive import ShowactiveValidator - from ._pad import PadValidator - from ._name import NameValidator - from ._font import FontValidator - from ._direction import DirectionValidator - from ._buttondefaults import ButtondefaultsValidator - from ._buttons import ButtonsValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._active import ActiveValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._type.TypeValidator", - "._templateitemname.TemplateitemnameValidator", - "._showactive.ShowactiveValidator", - "._pad.PadValidator", - "._name.NameValidator", - "._font.FontValidator", - "._direction.DirectionValidator", - "._buttondefaults.ButtondefaultsValidator", - "._buttons.ButtonsValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._active.ActiveValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._type.TypeValidator", + "._templateitemname.TemplateitemnameValidator", + "._showactive.ShowactiveValidator", + "._pad.PadValidator", + "._name.NameValidator", + "._font.FontValidator", + "._direction.DirectionValidator", + "._buttondefaults.ButtondefaultsValidator", + "._buttons.ButtonsValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._active.ActiveValidator", + ], +) diff --git a/plotly/validators/layout/updatemenu/_active.py b/plotly/validators/layout/updatemenu/_active.py index 8bca3ec41e..00874fc997 100644 --- a/plotly/validators/layout/updatemenu/_active.py +++ b/plotly/validators/layout/updatemenu/_active.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActiveValidator(_plotly_utils.basevalidators.IntegerValidator): +class ActiveValidator(_bv.IntegerValidator): def __init__(self, plotly_name="active", parent_name="layout.updatemenu", **kwargs): - super(ActiveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", -1), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_bgcolor.py b/plotly/validators/layout/updatemenu/_bgcolor.py index 3344dbb1b7..3df2da4aa2 100644 --- a/plotly/validators/layout/updatemenu/_bgcolor.py +++ b/plotly/validators/layout/updatemenu/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.updatemenu", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/_bordercolor.py b/plotly/validators/layout/updatemenu/_bordercolor.py index 97bdb33b75..e0aade8ff0 100644 --- a/plotly/validators/layout/updatemenu/_bordercolor.py +++ b/plotly/validators/layout/updatemenu/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.updatemenu", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/_borderwidth.py b/plotly/validators/layout/updatemenu/_borderwidth.py index 11e0852edc..7f602f0cb7 100644 --- a/plotly/validators/layout/updatemenu/_borderwidth.py +++ b/plotly/validators/layout/updatemenu/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.updatemenu", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_buttondefaults.py b/plotly/validators/layout/updatemenu/_buttondefaults.py index fe7839c756..6e03309cc9 100644 --- a/plotly/validators/layout/updatemenu/_buttondefaults.py +++ b/plotly/validators/layout/updatemenu/_buttondefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ButtondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ButtondefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="buttondefaults", parent_name="layout.updatemenu", **kwargs ): - super(ButtondefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Button"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/updatemenu/_buttons.py b/plotly/validators/layout/updatemenu/_buttons.py index 6f2e43ff41..f51978f724 100644 --- a/plotly/validators/layout/updatemenu/_buttons.py +++ b/plotly/validators/layout/updatemenu/_buttons.py @@ -1,70 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ButtonsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="buttons", parent_name="layout.updatemenu", **kwargs ): - super(ButtonsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Button"), data_docs=kwargs.pop( "data_docs", """ - args - Sets the arguments values to be passed to the - Plotly method set in `method` on click. - args2 - Sets a 2nd set of `args`, these arguments - values are passed to the Plotly method set in - `method` when clicking this button while in the - active state. Use this to create toggle - buttons. - execute - When true, the API method is executed. When - false, all other behaviors are the same and - command execution is skipped. This may be - useful when hooking into, for example, the - `plotly_buttonclicked` method and executing the - API command manually without losing the benefit - of the updatemenu automatically binding to the - state of the plot through the specification of - `method` and `args`. - label - Sets the text label to appear on the button. - method - Sets the Plotly method to be called on click. - If the `skip` method is used, the API - updatemenu will function as normal but will - perform no API calls and will not bind - automatically to state updates. This may be - used to create a component interface and attach - to updatemenu events manually via JavaScript. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. """, ), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_direction.py b/plotly/validators/layout/updatemenu/_direction.py index c1a469b5c5..5f9adc5d6b 100644 --- a/plotly/validators/layout/updatemenu/_direction.py +++ b/plotly/validators/layout/updatemenu/_direction.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DirectionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="direction", parent_name="layout.updatemenu", **kwargs ): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["left", "right", "up", "down"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_font.py b/plotly/validators/layout/updatemenu/_font.py index 54980bf31c..da550108dd 100644 --- a/plotly/validators/layout/updatemenu/_font.py +++ b/plotly/validators/layout/updatemenu/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.updatemenu", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_name.py b/plotly/validators/layout/updatemenu/_name.py index 7564825f1c..3733b832de 100644 --- a/plotly/validators/layout/updatemenu/_name.py +++ b/plotly/validators/layout/updatemenu/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="layout.updatemenu", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/_pad.py b/plotly/validators/layout/updatemenu/_pad.py index 35ab1f298b..144ffdfeaf 100644 --- a/plotly/validators/layout/updatemenu/_pad.py +++ b/plotly/validators/layout/updatemenu/_pad.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): +class PadValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pad", parent_name="layout.updatemenu", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pad"), data_docs=kwargs.pop( "data_docs", """ - b - The amount of padding (in px) along the bottom - of the component. - l - The amount of padding (in px) on the left side - of the component. - r - The amount of padding (in px) on the right side - of the component. - t - The amount of padding (in px) along the top of - the component. """, ), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_showactive.py b/plotly/validators/layout/updatemenu/_showactive.py index baa47a0516..c8e28e68f9 100644 --- a/plotly/validators/layout/updatemenu/_showactive.py +++ b/plotly/validators/layout/updatemenu/_showactive.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowactiveValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowactiveValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showactive", parent_name="layout.updatemenu", **kwargs ): - super(ShowactiveValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/_templateitemname.py b/plotly/validators/layout/updatemenu/_templateitemname.py index b0358faa4c..57f59d8d92 100644 --- a/plotly/validators/layout/updatemenu/_templateitemname.py +++ b/plotly/validators/layout/updatemenu/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.updatemenu", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/_type.py b/plotly/validators/layout/updatemenu/_type.py index a6716a7d64..41ea7a590d 100644 --- a/plotly/validators/layout/updatemenu/_type.py +++ b/plotly/validators/layout/updatemenu/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.updatemenu", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["dropdown", "buttons"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_visible.py b/plotly/validators/layout/updatemenu/_visible.py index d225cbf117..37facb0f31 100644 --- a/plotly/validators/layout/updatemenu/_visible.py +++ b/plotly/validators/layout/updatemenu/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.updatemenu", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/_x.py b/plotly/validators/layout/updatemenu/_x.py index bc619b4f3f..9bce6a8511 100644 --- a/plotly/validators/layout/updatemenu/_x.py +++ b/plotly/validators/layout/updatemenu/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="layout.updatemenu", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 3), min=kwargs.pop("min", -2), diff --git a/plotly/validators/layout/updatemenu/_xanchor.py b/plotly/validators/layout/updatemenu/_xanchor.py index 3bd91bff1a..62a2eccb71 100644 --- a/plotly/validators/layout/updatemenu/_xanchor.py +++ b/plotly/validators/layout/updatemenu/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.updatemenu", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/_y.py b/plotly/validators/layout/updatemenu/_y.py index 3d0d153064..8b2d00549c 100644 --- a/plotly/validators/layout/updatemenu/_y.py +++ b/plotly/validators/layout/updatemenu/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="layout.updatemenu", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), max=kwargs.pop("max", 3), min=kwargs.pop("min", -2), diff --git a/plotly/validators/layout/updatemenu/_yanchor.py b/plotly/validators/layout/updatemenu/_yanchor.py index 97a132c982..ba11727370 100644 --- a/plotly/validators/layout/updatemenu/_yanchor.py +++ b/plotly/validators/layout/updatemenu/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.updatemenu", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/button/__init__.py b/plotly/validators/layout/updatemenu/button/__init__.py index e0a90a88c0..de38de558a 100644 --- a/plotly/validators/layout/updatemenu/button/__init__.py +++ b/plotly/validators/layout/updatemenu/button/__init__.py @@ -1,29 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._method import MethodValidator - from ._label import LabelValidator - from ._execute import ExecuteValidator - from ._args2 import Args2Validator - from ._args import ArgsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._method.MethodValidator", - "._label.LabelValidator", - "._execute.ExecuteValidator", - "._args2.Args2Validator", - "._args.ArgsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._method.MethodValidator", + "._label.LabelValidator", + "._execute.ExecuteValidator", + "._args2.Args2Validator", + "._args.ArgsValidator", + ], +) diff --git a/plotly/validators/layout/updatemenu/button/_args.py b/plotly/validators/layout/updatemenu/button/_args.py index 2fc9ff2adb..ee52f9af67 100644 --- a/plotly/validators/layout/updatemenu/button/_args.py +++ b/plotly/validators/layout/updatemenu/button/_args.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArgsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ArgsValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="args", parent_name="layout.updatemenu.button", **kwargs ): - super(ArgsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/layout/updatemenu/button/_args2.py b/plotly/validators/layout/updatemenu/button/_args2.py index eaae9d8a9e..1e1cb9b020 100644 --- a/plotly/validators/layout/updatemenu/button/_args2.py +++ b/plotly/validators/layout/updatemenu/button/_args2.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Args2Validator(_plotly_utils.basevalidators.InfoArrayValidator): +class Args2Validator(_bv.InfoArrayValidator): def __init__( self, plotly_name="args2", parent_name="layout.updatemenu.button", **kwargs ): - super(Args2Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/layout/updatemenu/button/_execute.py b/plotly/validators/layout/updatemenu/button/_execute.py index 67b6bdf886..5754663ed6 100644 --- a/plotly/validators/layout/updatemenu/button/_execute.py +++ b/plotly/validators/layout/updatemenu/button/_execute.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExecuteValidator(_plotly_utils.basevalidators.BooleanValidator): +class ExecuteValidator(_bv.BooleanValidator): def __init__( self, plotly_name="execute", parent_name="layout.updatemenu.button", **kwargs ): - super(ExecuteValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/button/_label.py b/plotly/validators/layout/updatemenu/button/_label.py index 29fc32253f..2770f1ceac 100644 --- a/plotly/validators/layout/updatemenu/button/_label.py +++ b/plotly/validators/layout/updatemenu/button/_label.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__( self, plotly_name="label", parent_name="layout.updatemenu.button", **kwargs ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/button/_method.py b/plotly/validators/layout/updatemenu/button/_method.py index b1d7c69e8b..eeb20ff6ea 100644 --- a/plotly/validators/layout/updatemenu/button/_method.py +++ b/plotly/validators/layout/updatemenu/button/_method.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MethodValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="method", parent_name="layout.updatemenu.button", **kwargs ): - super(MethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", ["restyle", "relayout", "animate", "update", "skip"] diff --git a/plotly/validators/layout/updatemenu/button/_name.py b/plotly/validators/layout/updatemenu/button/_name.py index ecd6c0f05b..d057627eec 100644 --- a/plotly/validators/layout/updatemenu/button/_name.py +++ b/plotly/validators/layout/updatemenu/button/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.updatemenu.button", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/button/_templateitemname.py b/plotly/validators/layout/updatemenu/button/_templateitemname.py index 7e6485fb2d..cedcd1fe38 100644 --- a/plotly/validators/layout/updatemenu/button/_templateitemname.py +++ b/plotly/validators/layout/updatemenu/button/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.updatemenu.button", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/button/_visible.py b/plotly/validators/layout/updatemenu/button/_visible.py index 0f6fd75ab3..9c3ad2d5d8 100644 --- a/plotly/validators/layout/updatemenu/button/_visible.py +++ b/plotly/validators/layout/updatemenu/button/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.updatemenu.button", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/font/__init__.py b/plotly/validators/layout/updatemenu/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/updatemenu/font/__init__.py +++ b/plotly/validators/layout/updatemenu/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/updatemenu/font/_color.py b/plotly/validators/layout/updatemenu/font/_color.py index e8f47add9e..efb7e3ca05 100644 --- a/plotly/validators/layout/updatemenu/font/_color.py +++ b/plotly/validators/layout/updatemenu/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.updatemenu.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/font/_family.py b/plotly/validators/layout/updatemenu/font/_family.py index 764f844997..d22965acb2 100644 --- a/plotly/validators/layout/updatemenu/font/_family.py +++ b/plotly/validators/layout/updatemenu/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.updatemenu.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/updatemenu/font/_lineposition.py b/plotly/validators/layout/updatemenu/font/_lineposition.py index 4cb5e3b5f9..f9241e8211 100644 --- a/plotly/validators/layout/updatemenu/font/_lineposition.py +++ b/plotly/validators/layout/updatemenu/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.updatemenu.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/updatemenu/font/_shadow.py b/plotly/validators/layout/updatemenu/font/_shadow.py index 396b59fa41..df61c20cb3 100644 --- a/plotly/validators/layout/updatemenu/font/_shadow.py +++ b/plotly/validators/layout/updatemenu/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.updatemenu.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/font/_size.py b/plotly/validators/layout/updatemenu/font/_size.py index bc266124c2..99c563a3a7 100644 --- a/plotly/validators/layout/updatemenu/font/_size.py +++ b/plotly/validators/layout/updatemenu/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.updatemenu.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/updatemenu/font/_style.py b/plotly/validators/layout/updatemenu/font/_style.py index 4e8ee7939a..dd4aff7202 100644 --- a/plotly/validators/layout/updatemenu/font/_style.py +++ b/plotly/validators/layout/updatemenu/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.updatemenu.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/font/_textcase.py b/plotly/validators/layout/updatemenu/font/_textcase.py index 3045b5de85..329f26f94f 100644 --- a/plotly/validators/layout/updatemenu/font/_textcase.py +++ b/plotly/validators/layout/updatemenu/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.updatemenu.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/updatemenu/font/_variant.py b/plotly/validators/layout/updatemenu/font/_variant.py index f7721474f0..c94ea3e9ea 100644 --- a/plotly/validators/layout/updatemenu/font/_variant.py +++ b/plotly/validators/layout/updatemenu/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.updatemenu.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/updatemenu/font/_weight.py b/plotly/validators/layout/updatemenu/font/_weight.py index 4eba499598..d11e7f2229 100644 --- a/plotly/validators/layout/updatemenu/font/_weight.py +++ b/plotly/validators/layout/updatemenu/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.updatemenu.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/updatemenu/pad/__init__.py b/plotly/validators/layout/updatemenu/pad/__init__.py index 04e64dbc5e..4189bfbe1f 100644 --- a/plotly/validators/layout/updatemenu/pad/__init__.py +++ b/plotly/validators/layout/updatemenu/pad/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._t import TValidator - from ._r import RValidator - from ._l import LValidator - from ._b import BValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], +) diff --git a/plotly/validators/layout/updatemenu/pad/_b.py b/plotly/validators/layout/updatemenu/pad/_b.py index 3c45fd96c4..bda69417ff 100644 --- a/plotly/validators/layout/updatemenu/pad/_b.py +++ b/plotly/validators/layout/updatemenu/pad/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.NumberValidator): +class BValidator(_bv.NumberValidator): def __init__(self, plotly_name="b", parent_name="layout.updatemenu.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/pad/_l.py b/plotly/validators/layout/updatemenu/pad/_l.py index ec9dc3d151..4ba4a1836f 100644 --- a/plotly/validators/layout/updatemenu/pad/_l.py +++ b/plotly/validators/layout/updatemenu/pad/_l.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LValidator(_plotly_utils.basevalidators.NumberValidator): +class LValidator(_bv.NumberValidator): def __init__(self, plotly_name="l", parent_name="layout.updatemenu.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/pad/_r.py b/plotly/validators/layout/updatemenu/pad/_r.py index d0a68cd52a..99b2a7e458 100644 --- a/plotly/validators/layout/updatemenu/pad/_r.py +++ b/plotly/validators/layout/updatemenu/pad/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.NumberValidator): +class RValidator(_bv.NumberValidator): def __init__(self, plotly_name="r", parent_name="layout.updatemenu.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/updatemenu/pad/_t.py b/plotly/validators/layout/updatemenu/pad/_t.py index 7b32734bad..548ec011a9 100644 --- a/plotly/validators/layout/updatemenu/pad/_t.py +++ b/plotly/validators/layout/updatemenu/pad/_t.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TValidator(_plotly_utils.basevalidators.NumberValidator): +class TValidator(_bv.NumberValidator): def __init__(self, plotly_name="t", parent_name="layout.updatemenu.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "arraydraw"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/__init__.py b/plotly/validators/layout/xaxis/__init__.py index be5a049045..ce48cf9b14 100644 --- a/plotly/validators/layout/xaxis/__init__.py +++ b/plotly/validators/layout/xaxis/__init__.py @@ -1,199 +1,102 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zerolinewidth import ZerolinewidthValidator - from ._zerolinecolor import ZerolinecolorValidator - from ._zeroline import ZerolineValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._tickson import TicksonValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelstandoff import TicklabelstandoffValidator - from ._ticklabelshift import TicklabelshiftValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._ticklabelmode import TicklabelmodeValidator - from ._ticklabelindexsrc import TicklabelindexsrcValidator - from ._ticklabelindex import TicklabelindexValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._spikethickness import SpikethicknessValidator - from ._spikesnap import SpikesnapValidator - from ._spikemode import SpikemodeValidator - from ._spikedash import SpikedashValidator - from ._spikecolor import SpikecolorValidator - from ._side import SideValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showspikes import ShowspikesValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._showdividers import ShowdividersValidator - from ._separatethousands import SeparatethousandsValidator - from ._scaleratio import ScaleratioValidator - from ._scaleanchor import ScaleanchorValidator - from ._rangeslider import RangesliderValidator - from ._rangeselector import RangeselectorValidator - from ._rangemode import RangemodeValidator - from ._rangebreakdefaults import RangebreakdefaultsValidator - from ._rangebreaks import RangebreaksValidator - from ._range import RangeValidator - from ._position import PositionValidator - from ._overlaying import OverlayingValidator - from ._nticks import NticksValidator - from ._mirror import MirrorValidator - from ._minor import MinorValidator - from ._minexponent import MinexponentValidator - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._matches import MatchesValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._insiderange import InsiderangeValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._fixedrange import FixedrangeValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._domain import DomainValidator - from ._dividerwidth import DividerwidthValidator - from ._dividercolor import DividercolorValidator - from ._constraintoward import ConstraintowardValidator - from ._constrain import ConstrainValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._calendar import CalendarValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autotickangles import AutotickanglesValidator - from ._autorangeoptions import AutorangeoptionsValidator - from ._autorange import AutorangeValidator - from ._automargin import AutomarginValidator - from ._anchor import AnchorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zerolinewidth.ZerolinewidthValidator", - "._zerolinecolor.ZerolinecolorValidator", - "._zeroline.ZerolineValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._type.TypeValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._tickson.TicksonValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelstandoff.TicklabelstandoffValidator", - "._ticklabelshift.TicklabelshiftValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._ticklabelmode.TicklabelmodeValidator", - "._ticklabelindexsrc.TicklabelindexsrcValidator", - "._ticklabelindex.TicklabelindexValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._spikethickness.SpikethicknessValidator", - "._spikesnap.SpikesnapValidator", - "._spikemode.SpikemodeValidator", - "._spikedash.SpikedashValidator", - "._spikecolor.SpikecolorValidator", - "._side.SideValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showspikes.ShowspikesValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._showdividers.ShowdividersValidator", - "._separatethousands.SeparatethousandsValidator", - "._scaleratio.ScaleratioValidator", - "._scaleanchor.ScaleanchorValidator", - "._rangeslider.RangesliderValidator", - "._rangeselector.RangeselectorValidator", - "._rangemode.RangemodeValidator", - "._rangebreakdefaults.RangebreakdefaultsValidator", - "._rangebreaks.RangebreaksValidator", - "._range.RangeValidator", - "._position.PositionValidator", - "._overlaying.OverlayingValidator", - "._nticks.NticksValidator", - "._mirror.MirrorValidator", - "._minor.MinorValidator", - "._minexponent.MinexponentValidator", - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._matches.MatchesValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._insiderange.InsiderangeValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._fixedrange.FixedrangeValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._domain.DomainValidator", - "._dividerwidth.DividerwidthValidator", - "._dividercolor.DividercolorValidator", - "._constraintoward.ConstraintowardValidator", - "._constrain.ConstrainValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._calendar.CalendarValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autotickangles.AutotickanglesValidator", - "._autorangeoptions.AutorangeoptionsValidator", - "._autorange.AutorangeValidator", - "._automargin.AutomarginValidator", - "._anchor.AnchorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickson.TicksonValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelstandoff.TicklabelstandoffValidator", + "._ticklabelshift.TicklabelshiftValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._ticklabelmode.TicklabelmodeValidator", + "._ticklabelindexsrc.TicklabelindexsrcValidator", + "._ticklabelindex.TicklabelindexValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesnap.SpikesnapValidator", + "._spikemode.SpikemodeValidator", + "._spikedash.SpikedashValidator", + "._spikecolor.SpikecolorValidator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showdividers.ShowdividersValidator", + "._separatethousands.SeparatethousandsValidator", + "._scaleratio.ScaleratioValidator", + "._scaleanchor.ScaleanchorValidator", + "._rangeslider.RangesliderValidator", + "._rangeselector.RangeselectorValidator", + "._rangemode.RangemodeValidator", + "._rangebreakdefaults.RangebreakdefaultsValidator", + "._rangebreaks.RangebreaksValidator", + "._range.RangeValidator", + "._position.PositionValidator", + "._overlaying.OverlayingValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._minor.MinorValidator", + "._minexponent.MinexponentValidator", + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._matches.MatchesValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._insiderange.InsiderangeValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._domain.DomainValidator", + "._dividerwidth.DividerwidthValidator", + "._dividercolor.DividercolorValidator", + "._constraintoward.ConstraintowardValidator", + "._constrain.ConstrainValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autotickangles.AutotickanglesValidator", + "._autorangeoptions.AutorangeoptionsValidator", + "._autorange.AutorangeValidator", + "._automargin.AutomarginValidator", + "._anchor.AnchorValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/_anchor.py b/plotly/validators/layout/xaxis/_anchor.py index 00a1af05f8..e746b5d446 100644 --- a/plotly/validators/layout/xaxis/_anchor.py +++ b/plotly/validators/layout/xaxis/_anchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="anchor", parent_name="layout.xaxis", **kwargs): - super(AnchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_automargin.py b/plotly/validators/layout/xaxis/_automargin.py index 1cd1a65657..15d8df16e9 100644 --- a/plotly/validators/layout/xaxis/_automargin.py +++ b/plotly/validators/layout/xaxis/_automargin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutomarginValidator(_plotly_utils.basevalidators.FlaglistValidator): +class AutomarginValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="automargin", parent_name="layout.xaxis", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", [True, False]), flags=kwargs.pop( diff --git a/plotly/validators/layout/xaxis/_autorange.py b/plotly/validators/layout/xaxis/_autorange.py index c703dee9e6..b766c13b6f 100644 --- a/plotly/validators/layout/xaxis/_autorange.py +++ b/plotly/validators/layout/xaxis/_autorange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="autorange", parent_name="layout.xaxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "axrange"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop( diff --git a/plotly/validators/layout/xaxis/_autorangeoptions.py b/plotly/validators/layout/xaxis/_autorangeoptions.py index 08d6a22712..ca34ddd995 100644 --- a/plotly/validators/layout/xaxis/_autorangeoptions.py +++ b/plotly/validators/layout/xaxis/_autorangeoptions.py @@ -1,34 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AutorangeoptionsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.xaxis", **kwargs ): - super(AutorangeoptionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Autorangeoptions"), data_docs=kwargs.pop( "data_docs", """ - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_autotickangles.py b/plotly/validators/layout/xaxis/_autotickangles.py index 6162a92720..5c16a7caec 100644 --- a/plotly/validators/layout/xaxis/_autotickangles.py +++ b/plotly/validators/layout/xaxis/_autotickangles.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotickanglesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class AutotickanglesValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="autotickangles", parent_name="layout.xaxis", **kwargs ): - super(AutotickanglesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), free_length=kwargs.pop("free_length", True), items=kwargs.pop("items", {"valType": "angle"}), diff --git a/plotly/validators/layout/xaxis/_autotypenumbers.py b/plotly/validators/layout/xaxis/_autotypenumbers.py index 5862fc718f..8b16111f7e 100644 --- a/plotly/validators/layout/xaxis/_autotypenumbers.py +++ b/plotly/validators/layout/xaxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.xaxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_calendar.py b/plotly/validators/layout/xaxis/_calendar.py index c4fbd69258..66ea16963d 100644 --- a/plotly/validators/layout/xaxis/_calendar.py +++ b/plotly/validators/layout/xaxis/_calendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="calendar", parent_name="layout.xaxis", **kwargs): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_categoryarray.py b/plotly/validators/layout/xaxis/_categoryarray.py index 5aa4088c1c..cb21f38e50 100644 --- a/plotly/validators/layout/xaxis/_categoryarray.py +++ b/plotly/validators/layout/xaxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.xaxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_categoryarraysrc.py b/plotly/validators/layout/xaxis/_categoryarraysrc.py index c7c6d8c06b..4c47e60413 100644 --- a/plotly/validators/layout/xaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/xaxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.xaxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_categoryorder.py b/plotly/validators/layout/xaxis/_categoryorder.py index c914afc6f4..382abac229 100644 --- a/plotly/validators/layout/xaxis/_categoryorder.py +++ b/plotly/validators/layout/xaxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.xaxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_color.py b/plotly/validators/layout/xaxis/_color.py index 69f981c130..01dd172e75 100644 --- a/plotly/validators/layout/xaxis/_color.py +++ b/plotly/validators/layout/xaxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.xaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_constrain.py b/plotly/validators/layout/xaxis/_constrain.py index f8bab252bd..328dcbf593 100644 --- a/plotly/validators/layout/xaxis/_constrain.py +++ b/plotly/validators/layout/xaxis/_constrain.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstrainValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="constrain", parent_name="layout.xaxis", **kwargs): - super(ConstrainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["range", "domain"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_constraintoward.py b/plotly/validators/layout/xaxis/_constraintoward.py index 30cb202148..c218ae9edf 100644 --- a/plotly/validators/layout/xaxis/_constraintoward.py +++ b/plotly/validators/layout/xaxis/_constraintoward.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintowardValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstraintowardValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="constraintoward", parent_name="layout.xaxis", **kwargs ): - super(ConstraintowardValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["left", "center", "right", "top", "middle", "bottom"] diff --git a/plotly/validators/layout/xaxis/_dividercolor.py b/plotly/validators/layout/xaxis/_dividercolor.py index 3a828151e9..769ad8409c 100644 --- a/plotly/validators/layout/xaxis/_dividercolor.py +++ b/plotly/validators/layout/xaxis/_dividercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DividercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class DividercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="dividercolor", parent_name="layout.xaxis", **kwargs ): - super(DividercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_dividerwidth.py b/plotly/validators/layout/xaxis/_dividerwidth.py index 081e530ef4..32d7192c20 100644 --- a/plotly/validators/layout/xaxis/_dividerwidth.py +++ b/plotly/validators/layout/xaxis/_dividerwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class DividerwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="dividerwidth", parent_name="layout.xaxis", **kwargs ): - super(DividerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_domain.py b/plotly/validators/layout/xaxis/_domain.py index ba770de97f..9a553fd251 100644 --- a/plotly/validators/layout/xaxis/_domain.py +++ b/plotly/validators/layout/xaxis/_domain.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DomainValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="domain", parent_name="layout.xaxis", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/xaxis/_dtick.py b/plotly/validators/layout/xaxis/_dtick.py index ae40ad3aef..154b0eadcf 100644 --- a/plotly/validators/layout/xaxis/_dtick.py +++ b/plotly/validators/layout/xaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.xaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/xaxis/_exponentformat.py b/plotly/validators/layout/xaxis/_exponentformat.py index 6b460fe80e..4d0f807dfb 100644 --- a/plotly/validators/layout/xaxis/_exponentformat.py +++ b/plotly/validators/layout/xaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.xaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_fixedrange.py b/plotly/validators/layout/xaxis/_fixedrange.py index 41f2a3adda..3491d81185 100644 --- a/plotly/validators/layout/xaxis/_fixedrange.py +++ b/plotly/validators/layout/xaxis/_fixedrange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): +class FixedrangeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="fixedrange", parent_name="layout.xaxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_gridcolor.py b/plotly/validators/layout/xaxis/_gridcolor.py index c1b4110e11..61458d4dfc 100644 --- a/plotly/validators/layout/xaxis/_gridcolor.py +++ b/plotly/validators/layout/xaxis/_gridcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="gridcolor", parent_name="layout.xaxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_griddash.py b/plotly/validators/layout/xaxis/_griddash.py index db0cb6e991..aeecf04a9f 100644 --- a/plotly/validators/layout/xaxis/_griddash.py +++ b/plotly/validators/layout/xaxis/_griddash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__(self, plotly_name="griddash", parent_name="layout.xaxis", **kwargs): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/xaxis/_gridwidth.py b/plotly/validators/layout/xaxis/_gridwidth.py index 5ca0e2299d..d937a85885 100644 --- a/plotly/validators/layout/xaxis/_gridwidth.py +++ b/plotly/validators/layout/xaxis/_gridwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="gridwidth", parent_name="layout.xaxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_hoverformat.py b/plotly/validators/layout/xaxis/_hoverformat.py index 4bbc9ec44a..bf13adecdc 100644 --- a/plotly/validators/layout/xaxis/_hoverformat.py +++ b/plotly/validators/layout/xaxis/_hoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="hoverformat", parent_name="layout.xaxis", **kwargs): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_insiderange.py b/plotly/validators/layout/xaxis/_insiderange.py index ef193da2e1..7d0b773a10 100644 --- a/plotly/validators/layout/xaxis/_insiderange.py +++ b/plotly/validators/layout/xaxis/_insiderange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsiderangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class InsiderangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="insiderange", parent_name="layout.xaxis", **kwargs): - super(InsiderangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/xaxis/_labelalias.py b/plotly/validators/layout/xaxis/_labelalias.py index 57fdd4dafb..8d8f8345f9 100644 --- a/plotly/validators/layout/xaxis/_labelalias.py +++ b/plotly/validators/layout/xaxis/_labelalias.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__(self, plotly_name="labelalias", parent_name="layout.xaxis", **kwargs): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_layer.py b/plotly/validators/layout/xaxis/_layer.py index ae2f8e0794..4e802734f8 100644 --- a/plotly/validators/layout/xaxis/_layer.py +++ b/plotly/validators/layout/xaxis/_layer.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="layer", parent_name="layout.xaxis", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_linecolor.py b/plotly/validators/layout/xaxis/_linecolor.py index b802392202..bf6ecf1a7e 100644 --- a/plotly/validators/layout/xaxis/_linecolor.py +++ b/plotly/validators/layout/xaxis/_linecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="linecolor", parent_name="layout.xaxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_linewidth.py b/plotly/validators/layout/xaxis/_linewidth.py index f4c6542863..280f189e3a 100644 --- a/plotly/validators/layout/xaxis/_linewidth.py +++ b/plotly/validators/layout/xaxis/_linewidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="linewidth", parent_name="layout.xaxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_matches.py b/plotly/validators/layout/xaxis/_matches.py index 2add8daf21..0489795e82 100644 --- a/plotly/validators/layout/xaxis/_matches.py +++ b/plotly/validators/layout/xaxis/_matches.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MatchesValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MatchesValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="matches", parent_name="layout.xaxis", **kwargs): - super(MatchesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_maxallowed.py b/plotly/validators/layout/xaxis/_maxallowed.py index 4f824b8248..cbfcc71670 100644 --- a/plotly/validators/layout/xaxis/_maxallowed.py +++ b/plotly/validators/layout/xaxis/_maxallowed.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__(self, plotly_name="maxallowed", parent_name="layout.xaxis", **kwargs): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/xaxis/_minallowed.py b/plotly/validators/layout/xaxis/_minallowed.py index ef05c31304..8a376296b8 100644 --- a/plotly/validators/layout/xaxis/_minallowed.py +++ b/plotly/validators/layout/xaxis/_minallowed.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__(self, plotly_name="minallowed", parent_name="layout.xaxis", **kwargs): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/xaxis/_minexponent.py b/plotly/validators/layout/xaxis/_minexponent.py index 780cb19030..4fd231751d 100644 --- a/plotly/validators/layout/xaxis/_minexponent.py +++ b/plotly/validators/layout/xaxis/_minexponent.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__(self, plotly_name="minexponent", parent_name="layout.xaxis", **kwargs): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_minor.py b/plotly/validators/layout/xaxis/_minor.py index 5fdb4da1d5..874be15ade 100644 --- a/plotly/validators/layout/xaxis/_minor.py +++ b/plotly/validators/layout/xaxis/_minor.py @@ -1,103 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorValidator(_plotly_utils.basevalidators.CompoundValidator): +class MinorValidator(_bv.CompoundValidator): def __init__(self, plotly_name="minor", parent_name="layout.xaxis", **kwargs): - super(MinorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Minor"), data_docs=kwargs.pop( "data_docs", """ - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickcolor - Sets the tick color. - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_mirror.py b/plotly/validators/layout/xaxis/_mirror.py index 892e576cb1..eea679d68c 100644 --- a/plotly/validators/layout/xaxis/_mirror.py +++ b/plotly/validators/layout/xaxis/_mirror.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MirrorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="mirror", parent_name="layout.xaxis", **kwargs): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_nticks.py b/plotly/validators/layout/xaxis/_nticks.py index 6cb18239e2..032d439e84 100644 --- a/plotly/validators/layout/xaxis/_nticks.py +++ b/plotly/validators/layout/xaxis/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="layout.xaxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_overlaying.py b/plotly/validators/layout/xaxis/_overlaying.py index fc009e719b..f22a351273 100644 --- a/plotly/validators/layout/xaxis/_overlaying.py +++ b/plotly/validators/layout/xaxis/_overlaying.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OverlayingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OverlayingValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="overlaying", parent_name="layout.xaxis", **kwargs): - super(OverlayingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_position.py b/plotly/validators/layout/xaxis/_position.py index 87072a3cc7..2b9050c646 100644 --- a/plotly/validators/layout/xaxis/_position.py +++ b/plotly/validators/layout/xaxis/_position.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PositionValidator(_plotly_utils.basevalidators.NumberValidator): +class PositionValidator(_bv.NumberValidator): def __init__(self, plotly_name="position", parent_name="layout.xaxis", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/xaxis/_range.py b/plotly/validators/layout/xaxis/_range.py index cf7e4d0156..9c4a0885c1 100644 --- a/plotly/validators/layout/xaxis/_range.py +++ b/plotly/validators/layout/xaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.xaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "axrange"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), diff --git a/plotly/validators/layout/xaxis/_rangebreakdefaults.py b/plotly/validators/layout/xaxis/_rangebreakdefaults.py index 4f1a4af57e..619eb3f44b 100644 --- a/plotly/validators/layout/xaxis/_rangebreakdefaults.py +++ b/plotly/validators/layout/xaxis/_rangebreakdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangebreakdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class RangebreakdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="rangebreakdefaults", parent_name="layout.xaxis", **kwargs ): - super(RangebreakdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangebreak"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/xaxis/_rangebreaks.py b/plotly/validators/layout/xaxis/_rangebreaks.py index 1936458ac2..333c0816dd 100644 --- a/plotly/validators/layout/xaxis/_rangebreaks.py +++ b/plotly/validators/layout/xaxis/_rangebreaks.py @@ -1,66 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class RangebreaksValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="rangebreaks", parent_name="layout.xaxis", **kwargs): - super(RangebreaksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangebreak"), data_docs=kwargs.pop( "data_docs", """ - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_rangemode.py b/plotly/validators/layout/xaxis/_rangemode.py index 826220881f..7c87621296 100644 --- a/plotly/validators/layout/xaxis/_rangemode.py +++ b/plotly/validators/layout/xaxis/_rangemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="layout.xaxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_rangeselector.py b/plotly/validators/layout/xaxis/_rangeselector.py index 1bacb9302b..251eb4f394 100644 --- a/plotly/validators/layout/xaxis/_rangeselector.py +++ b/plotly/validators/layout/xaxis/_rangeselector.py @@ -1,62 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeselectorValidator(_plotly_utils.basevalidators.CompoundValidator): +class RangeselectorValidator(_bv.CompoundValidator): def __init__( self, plotly_name="rangeselector", parent_name="layout.xaxis", **kwargs ): - super(RangeselectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangeselector"), data_docs=kwargs.pop( "data_docs", """ - activecolor - Sets the background color of the active range - selector button. - bgcolor - Sets the background color of the range selector - buttons. - bordercolor - Sets the color of the border enclosing the - range selector. - borderwidth - Sets the width (in px) of the border enclosing - the range selector. - buttons - Sets the specifications for each buttons. By - default, a range selector comes with no - buttons. - buttondefaults - When used in a template (as layout.template.lay - out.xaxis.rangeselector.buttondefaults), sets - the default property values to use for elements - of layout.xaxis.rangeselector.buttons - font - Sets the font of the range selector button - text. - visible - Determines whether or not this range selector - is visible. Note that range selectors are only - available for x axes of `type` set to or auto- - typed to "date". - x - Sets the x position (in normalized coordinates) - of the range selector. - xanchor - Sets the range selector's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the range - selector. - y - Sets the y position (in normalized coordinates) - of the range selector. - yanchor - Sets the range selector's vertical position - anchor This anchor binds the `y` position to - the "top", "middle" or "bottom" of the range - selector. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_rangeslider.py b/plotly/validators/layout/xaxis/_rangeslider.py index 1c25c169e1..e8b2a17e6d 100644 --- a/plotly/validators/layout/xaxis/_rangeslider.py +++ b/plotly/validators/layout/xaxis/_rangeslider.py @@ -1,49 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangesliderValidator(_plotly_utils.basevalidators.CompoundValidator): +class RangesliderValidator(_bv.CompoundValidator): def __init__(self, plotly_name="rangeslider", parent_name="layout.xaxis", **kwargs): - super(RangesliderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangeslider"), data_docs=kwargs.pop( "data_docs", """ - autorange - Determines whether or not the range slider - range is computed in relation to the input - data. If `range` is provided, then `autorange` - is set to False. - bgcolor - Sets the background color of the range slider. - bordercolor - Sets the border color of the range slider. - borderwidth - Sets the border width of the range slider. - range - Sets the range of the range slider. If not set, - defaults to the full xaxis range. If the axis - `type` is "log", then you must take the log of - your desired range. If the axis `type` is - "date", it should be date strings, like date - data, though Date objects and unix milliseconds - will be accepted and converted to strings. If - the axis `type` is "category", it should be - numbers, using the scale where each category is - assigned a serial number from zero in the order - it appears. - thickness - The height of the range slider as a fraction of - the total plot area height. - visible - Determines whether or not the range slider will - be visible. If visible, perpendicular axes will - be set to `fixedrange` - yaxis - :class:`plotly.graph_objects.layout.xaxis.range - slider.YAxis` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_scaleanchor.py b/plotly/validators/layout/xaxis/_scaleanchor.py index 48819032c3..f987310826 100644 --- a/plotly/validators/layout/xaxis/_scaleanchor.py +++ b/plotly/validators/layout/xaxis/_scaleanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ScaleanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="scaleanchor", parent_name="layout.xaxis", **kwargs): - super(ScaleanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_scaleratio.py b/plotly/validators/layout/xaxis/_scaleratio.py index 5526bcb07e..450385bf62 100644 --- a/plotly/validators/layout/xaxis/_scaleratio.py +++ b/plotly/validators/layout/xaxis/_scaleratio.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): +class ScaleratioValidator(_bv.NumberValidator): def __init__(self, plotly_name="scaleratio", parent_name="layout.xaxis", **kwargs): - super(ScaleratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_separatethousands.py b/plotly/validators/layout/xaxis/_separatethousands.py index ca4e2f062f..3633b17f4f 100644 --- a/plotly/validators/layout/xaxis/_separatethousands.py +++ b/plotly/validators/layout/xaxis/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.xaxis", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_showdividers.py b/plotly/validators/layout/xaxis/_showdividers.py index 8b8b543795..47814bc0b4 100644 --- a/plotly/validators/layout/xaxis/_showdividers.py +++ b/plotly/validators/layout/xaxis/_showdividers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowdividersValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowdividersValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showdividers", parent_name="layout.xaxis", **kwargs ): - super(ShowdividersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_showexponent.py b/plotly/validators/layout/xaxis/_showexponent.py index 18227f2515..8bb2b8ee8f 100644 --- a/plotly/validators/layout/xaxis/_showexponent.py +++ b/plotly/validators/layout/xaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.xaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_showgrid.py b/plotly/validators/layout/xaxis/_showgrid.py index ace8a2e854..ce622d8750 100644 --- a/plotly/validators/layout/xaxis/_showgrid.py +++ b/plotly/validators/layout/xaxis/_showgrid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showgrid", parent_name="layout.xaxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_showline.py b/plotly/validators/layout/xaxis/_showline.py index e1d2f6544f..6413772cf8 100644 --- a/plotly/validators/layout/xaxis/_showline.py +++ b/plotly/validators/layout/xaxis/_showline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showline", parent_name="layout.xaxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_showspikes.py b/plotly/validators/layout/xaxis/_showspikes.py index 44f0c8a5c4..38d2365c88 100644 --- a/plotly/validators/layout/xaxis/_showspikes.py +++ b/plotly/validators/layout/xaxis/_showspikes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowspikesValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showspikes", parent_name="layout.xaxis", **kwargs): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_showticklabels.py b/plotly/validators/layout/xaxis/_showticklabels.py index 0b85d7fc67..392705818f 100644 --- a/plotly/validators/layout/xaxis/_showticklabels.py +++ b/plotly/validators/layout/xaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.xaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_showtickprefix.py b/plotly/validators/layout/xaxis/_showtickprefix.py index bc95ebc606..c73c0da4b0 100644 --- a/plotly/validators/layout/xaxis/_showtickprefix.py +++ b/plotly/validators/layout/xaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.xaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_showticksuffix.py b/plotly/validators/layout/xaxis/_showticksuffix.py index 96c550923a..d6908dd039 100644 --- a/plotly/validators/layout/xaxis/_showticksuffix.py +++ b/plotly/validators/layout/xaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.xaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_side.py b/plotly/validators/layout/xaxis/_side.py index 5ab9c2be12..05f86e83d0 100644 --- a/plotly/validators/layout/xaxis/_side.py +++ b/plotly/validators/layout/xaxis/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="layout.xaxis", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom", "left", "right"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_spikecolor.py b/plotly/validators/layout/xaxis/_spikecolor.py index caae434677..1031f4ed9b 100644 --- a/plotly/validators/layout/xaxis/_spikecolor.py +++ b/plotly/validators/layout/xaxis/_spikecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SpikecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="spikecolor", parent_name="layout.xaxis", **kwargs): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_spikedash.py b/plotly/validators/layout/xaxis/_spikedash.py index b2a425bbe1..1f1ed55c3e 100644 --- a/plotly/validators/layout/xaxis/_spikedash.py +++ b/plotly/validators/layout/xaxis/_spikedash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikedashValidator(_plotly_utils.basevalidators.DashValidator): +class SpikedashValidator(_bv.DashValidator): def __init__(self, plotly_name="spikedash", parent_name="layout.xaxis", **kwargs): - super(SpikedashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/xaxis/_spikemode.py b/plotly/validators/layout/xaxis/_spikemode.py index c94b047b9a..932177afae 100644 --- a/plotly/validators/layout/xaxis/_spikemode.py +++ b/plotly/validators/layout/xaxis/_spikemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikemodeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class SpikemodeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="spikemode", parent_name="layout.xaxis", **kwargs): - super(SpikemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), flags=kwargs.pop("flags", ["toaxis", "across", "marker"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_spikesnap.py b/plotly/validators/layout/xaxis/_spikesnap.py index 780256b842..cd0de2dad0 100644 --- a/plotly/validators/layout/xaxis/_spikesnap.py +++ b/plotly/validators/layout/xaxis/_spikesnap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikesnapValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SpikesnapValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="spikesnap", parent_name="layout.xaxis", **kwargs): - super(SpikesnapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["data", "cursor", "hovered data"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_spikethickness.py b/plotly/validators/layout/xaxis/_spikethickness.py index 949ac5ec8d..de81313674 100644 --- a/plotly/validators/layout/xaxis/_spikethickness.py +++ b/plotly/validators/layout/xaxis/_spikethickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class SpikethicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="spikethickness", parent_name="layout.xaxis", **kwargs ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tick0.py b/plotly/validators/layout/xaxis/_tick0.py index bbd05ba561..cfef4cb9b4 100644 --- a/plotly/validators/layout/xaxis/_tick0.py +++ b/plotly/validators/layout/xaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.xaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/xaxis/_tickangle.py b/plotly/validators/layout/xaxis/_tickangle.py index a1886c8ba9..b9a288b667 100644 --- a/plotly/validators/layout/xaxis/_tickangle.py +++ b/plotly/validators/layout/xaxis/_tickangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="tickangle", parent_name="layout.xaxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tickcolor.py b/plotly/validators/layout/xaxis/_tickcolor.py index 14dbd0c63f..787337a188 100644 --- a/plotly/validators/layout/xaxis/_tickcolor.py +++ b/plotly/validators/layout/xaxis/_tickcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="tickcolor", parent_name="layout.xaxis", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tickfont.py b/plotly/validators/layout/xaxis/_tickfont.py index 0b33a61249..a39f9da25b 100644 --- a/plotly/validators/layout/xaxis/_tickfont.py +++ b/plotly/validators/layout/xaxis/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="layout.xaxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_tickformat.py b/plotly/validators/layout/xaxis/_tickformat.py index 5d8e98a10e..b16b465e55 100644 --- a/plotly/validators/layout/xaxis/_tickformat.py +++ b/plotly/validators/layout/xaxis/_tickformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__(self, plotly_name="tickformat", parent_name="layout.xaxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tickformatstopdefaults.py b/plotly/validators/layout/xaxis/_tickformatstopdefaults.py index 1c3b8633a8..97e82b9afb 100644 --- a/plotly/validators/layout/xaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/xaxis/_tickformatstopdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.xaxis", **kwargs ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/xaxis/_tickformatstops.py b/plotly/validators/layout/xaxis/_tickformatstops.py index 3278895daf..2a7d1d5249 100644 --- a/plotly/validators/layout/xaxis/_tickformatstops.py +++ b/plotly/validators/layout/xaxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.xaxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_ticklabelindex.py b/plotly/validators/layout/xaxis/_ticklabelindex.py index 4078bd028b..15a00d4cad 100644 --- a/plotly/validators/layout/xaxis/_ticklabelindex.py +++ b/plotly/validators/layout/xaxis/_ticklabelindex.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelindexValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelindexValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelindex", parent_name="layout.xaxis", **kwargs ): - super(TicklabelindexValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/layout/xaxis/_ticklabelindexsrc.py b/plotly/validators/layout/xaxis/_ticklabelindexsrc.py index 0154c702c6..f1c58f09ce 100644 --- a/plotly/validators/layout/xaxis/_ticklabelindexsrc.py +++ b/plotly/validators/layout/xaxis/_ticklabelindexsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelindexsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicklabelindexsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticklabelindexsrc", parent_name="layout.xaxis", **kwargs ): - super(TicklabelindexsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_ticklabelmode.py b/plotly/validators/layout/xaxis/_ticklabelmode.py index 18be892bd2..b9b10773ab 100644 --- a/plotly/validators/layout/xaxis/_ticklabelmode.py +++ b/plotly/validators/layout/xaxis/_ticklabelmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelmode", parent_name="layout.xaxis", **kwargs ): - super(TicklabelmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["instant", "period"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_ticklabeloverflow.py b/plotly/validators/layout/xaxis/_ticklabeloverflow.py index e496d5b845..0445b75444 100644 --- a/plotly/validators/layout/xaxis/_ticklabeloverflow.py +++ b/plotly/validators/layout/xaxis/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="layout.xaxis", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_ticklabelposition.py b/plotly/validators/layout/xaxis/_ticklabelposition.py index b8d3b26b47..7f415c5664 100644 --- a/plotly/validators/layout/xaxis/_ticklabelposition.py +++ b/plotly/validators/layout/xaxis/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="layout.xaxis", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/_ticklabelshift.py b/plotly/validators/layout/xaxis/_ticklabelshift.py index 6ae55bbe6a..7e31d767af 100644 --- a/plotly/validators/layout/xaxis/_ticklabelshift.py +++ b/plotly/validators/layout/xaxis/_ticklabelshift.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelshiftValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelshiftValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelshift", parent_name="layout.xaxis", **kwargs ): - super(TicklabelshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_ticklabelstandoff.py b/plotly/validators/layout/xaxis/_ticklabelstandoff.py index 1a8d1e7125..ae0ce6e18c 100644 --- a/plotly/validators/layout/xaxis/_ticklabelstandoff.py +++ b/plotly/validators/layout/xaxis/_ticklabelstandoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstandoffValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstandoffValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstandoff", parent_name="layout.xaxis", **kwargs ): - super(TicklabelstandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_ticklabelstep.py b/plotly/validators/layout/xaxis/_ticklabelstep.py index ac38224529..a11e0e44f5 100644 --- a/plotly/validators/layout/xaxis/_ticklabelstep.py +++ b/plotly/validators/layout/xaxis/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.xaxis", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/xaxis/_ticklen.py b/plotly/validators/layout/xaxis/_ticklen.py index 3c1979618f..6250af7172 100644 --- a/plotly/validators/layout/xaxis/_ticklen.py +++ b/plotly/validators/layout/xaxis/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="layout.xaxis", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_tickmode.py b/plotly/validators/layout/xaxis/_tickmode.py index b9db01540e..aacf3923f6 100644 --- a/plotly/validators/layout/xaxis/_tickmode.py +++ b/plotly/validators/layout/xaxis/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="layout.xaxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array", "sync"]), diff --git a/plotly/validators/layout/xaxis/_tickprefix.py b/plotly/validators/layout/xaxis/_tickprefix.py index 97e94856c1..e55845b52a 100644 --- a/plotly/validators/layout/xaxis/_tickprefix.py +++ b/plotly/validators/layout/xaxis/_tickprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="layout.xaxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_ticks.py b/plotly/validators/layout/xaxis/_ticks.py index 21023d64a7..878556b951 100644 --- a/plotly/validators/layout/xaxis/_ticks.py +++ b/plotly/validators/layout/xaxis/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.xaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_tickson.py b/plotly/validators/layout/xaxis/_tickson.py index 889b931b99..f045e18e90 100644 --- a/plotly/validators/layout/xaxis/_tickson.py +++ b/plotly/validators/layout/xaxis/_tickson.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksonValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksonValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickson", parent_name="layout.xaxis", **kwargs): - super(TicksonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["labels", "boundaries"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/_ticksuffix.py b/plotly/validators/layout/xaxis/_ticksuffix.py index 69ad94efe8..1437f10881 100644 --- a/plotly/validators/layout/xaxis/_ticksuffix.py +++ b/plotly/validators/layout/xaxis/_ticksuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="ticksuffix", parent_name="layout.xaxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_ticktext.py b/plotly/validators/layout/xaxis/_ticktext.py index 2c6f73f837..5a11bac8a9 100644 --- a/plotly/validators/layout/xaxis/_ticktext.py +++ b/plotly/validators/layout/xaxis/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="layout.xaxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_ticktextsrc.py b/plotly/validators/layout/xaxis/_ticktextsrc.py index db0a5c55b5..94789114b9 100644 --- a/plotly/validators/layout/xaxis/_ticktextsrc.py +++ b/plotly/validators/layout/xaxis/_ticktextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="layout.xaxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tickvals.py b/plotly/validators/layout/xaxis/_tickvals.py index c0061daf68..1051752b31 100644 --- a/plotly/validators/layout/xaxis/_tickvals.py +++ b/plotly/validators/layout/xaxis/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="layout.xaxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tickvalssrc.py b/plotly/validators/layout/xaxis/_tickvalssrc.py index e7dc511535..67bc76b100 100644 --- a/plotly/validators/layout/xaxis/_tickvalssrc.py +++ b/plotly/validators/layout/xaxis/_tickvalssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="tickvalssrc", parent_name="layout.xaxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_tickwidth.py b/plotly/validators/layout/xaxis/_tickwidth.py index da6d1332ec..71a9eb0986 100644 --- a/plotly/validators/layout/xaxis/_tickwidth.py +++ b/plotly/validators/layout/xaxis/_tickwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="tickwidth", parent_name="layout.xaxis", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/_title.py b/plotly/validators/layout/xaxis/_title.py index ffa67b3dd8..bd22fb86dc 100644 --- a/plotly/validators/layout/xaxis/_title.py +++ b/plotly/validators/layout/xaxis/_title.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout.xaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/_type.py b/plotly/validators/layout/xaxis/_type.py index bb76bbb65e..30a89a343a 100644 --- a/plotly/validators/layout/xaxis/_type.py +++ b/plotly/validators/layout/xaxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.xaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["-", "linear", "log", "date", "category", "multicategory"] diff --git a/plotly/validators/layout/xaxis/_uirevision.py b/plotly/validators/layout/xaxis/_uirevision.py index da99dc386a..c45fcdee61 100644 --- a/plotly/validators/layout/xaxis/_uirevision.py +++ b/plotly/validators/layout/xaxis/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.xaxis", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_visible.py b/plotly/validators/layout/xaxis/_visible.py index ae8d5b0b9d..9a1acfa4f3 100644 --- a/plotly/validators/layout/xaxis/_visible.py +++ b/plotly/validators/layout/xaxis/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.xaxis", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_zeroline.py b/plotly/validators/layout/xaxis/_zeroline.py index 132f401b5a..5f67d6bf82 100644 --- a/plotly/validators/layout/xaxis/_zeroline.py +++ b/plotly/validators/layout/xaxis/_zeroline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZerolineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zeroline", parent_name="layout.xaxis", **kwargs): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_zerolinecolor.py b/plotly/validators/layout/xaxis/_zerolinecolor.py index 276c0ecf04..3f154544ba 100644 --- a/plotly/validators/layout/xaxis/_zerolinecolor.py +++ b/plotly/validators/layout/xaxis/_zerolinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ZerolinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="zerolinecolor", parent_name="layout.xaxis", **kwargs ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/_zerolinewidth.py b/plotly/validators/layout/xaxis/_zerolinewidth.py index 840204575b..9ae1690566 100644 --- a/plotly/validators/layout/xaxis/_zerolinewidth.py +++ b/plotly/validators/layout/xaxis/_zerolinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ZerolinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="zerolinewidth", parent_name="layout.xaxis", **kwargs ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/autorangeoptions/__init__.py b/plotly/validators/layout/xaxis/autorangeoptions/__init__.py index 701f84c04e..8ef0b74165 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/__init__.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._includesrc import IncludesrcValidator - from ._include import IncludeValidator - from ._clipmin import ClipminValidator - from ._clipmax import ClipmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._includesrc.IncludesrcValidator", - "._include.IncludeValidator", - "._clipmin.ClipminValidator", - "._clipmax.ClipmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._includesrc.IncludesrcValidator", + "._include.IncludeValidator", + "._clipmin.ClipminValidator", + "._clipmax.ClipmaxValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/autorangeoptions/_clipmax.py b/plotly/validators/layout/xaxis/autorangeoptions/_clipmax.py index 341fe48e6e..7b70099143 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/_clipmax.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/_clipmax.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipmaxValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipmaxValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmax", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): - super(ClipmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/xaxis/autorangeoptions/_clipmin.py b/plotly/validators/layout/xaxis/autorangeoptions/_clipmin.py index 22e728fc3a..24bb76eb56 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/_clipmin.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/_clipmin.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipminValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipminValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmin", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): - super(ClipminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/xaxis/autorangeoptions/_include.py b/plotly/validators/layout/xaxis/autorangeoptions/_include.py index 31737bfd64..449862f346 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/_include.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/_include.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): +class IncludeValidator(_bv.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): - super(IncludeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), diff --git a/plotly/validators/layout/xaxis/autorangeoptions/_includesrc.py b/plotly/validators/layout/xaxis/autorangeoptions/_includesrc.py index 593e7937cf..739683f66d 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/_includesrc.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/_includesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IncludesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="includesrc", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): - super(IncludesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/autorangeoptions/_maxallowed.py b/plotly/validators/layout/xaxis/autorangeoptions/_maxallowed.py index cc1c3aa1e6..c5326cc5ce 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/_maxallowed.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/_maxallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/xaxis/autorangeoptions/_minallowed.py b/plotly/validators/layout/xaxis/autorangeoptions/_minallowed.py index 4faf5cfbe1..3c2722c248 100644 --- a/plotly/validators/layout/xaxis/autorangeoptions/_minallowed.py +++ b/plotly/validators/layout/xaxis/autorangeoptions/_minallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.xaxis.autorangeoptions", **kwargs, ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/__init__.py b/plotly/validators/layout/xaxis/minor/__init__.py index 27860a82b8..50b8522165 100644 --- a/plotly/validators/layout/xaxis/minor/__init__.py +++ b/plotly/validators/layout/xaxis/minor/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticks import TicksValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._tickcolor import TickcolorValidator - from ._tick0 import Tick0Validator - from ._showgrid import ShowgridValidator - from ._nticks import NticksValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._dtick import DtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticks.TicksValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._tickcolor.TickcolorValidator", - "._tick0.Tick0Validator", - "._showgrid.ShowgridValidator", - "._nticks.NticksValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._dtick.DtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticks.TicksValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickcolor.TickcolorValidator", + "._tick0.Tick0Validator", + "._showgrid.ShowgridValidator", + "._nticks.NticksValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._dtick.DtickValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/minor/_dtick.py b/plotly/validators/layout/xaxis/minor/_dtick.py index 92aef5224f..a796f49d32 100644 --- a/plotly/validators/layout/xaxis/minor/_dtick.py +++ b/plotly/validators/layout/xaxis/minor/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.xaxis.minor", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/_gridcolor.py b/plotly/validators/layout/xaxis/minor/_gridcolor.py index 0fe85bc1b4..c0832b2466 100644 --- a/plotly/validators/layout/xaxis/minor/_gridcolor.py +++ b/plotly/validators/layout/xaxis/minor/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.xaxis.minor", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/minor/_griddash.py b/plotly/validators/layout/xaxis/minor/_griddash.py index 49893ff157..86d074989a 100644 --- a/plotly/validators/layout/xaxis/minor/_griddash.py +++ b/plotly/validators/layout/xaxis/minor/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.xaxis.minor", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/xaxis/minor/_gridwidth.py b/plotly/validators/layout/xaxis/minor/_gridwidth.py index a98c793aff..cb58834b9e 100644 --- a/plotly/validators/layout/xaxis/minor/_gridwidth.py +++ b/plotly/validators/layout/xaxis/minor/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.xaxis.minor", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/_nticks.py b/plotly/validators/layout/xaxis/minor/_nticks.py index 80a947aa43..024d94e5a8 100644 --- a/plotly/validators/layout/xaxis/minor/_nticks.py +++ b/plotly/validators/layout/xaxis/minor/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.xaxis.minor", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/_showgrid.py b/plotly/validators/layout/xaxis/minor/_showgrid.py index 424abbbd26..2a44980147 100644 --- a/plotly/validators/layout/xaxis/minor/_showgrid.py +++ b/plotly/validators/layout/xaxis/minor/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.xaxis.minor", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/minor/_tick0.py b/plotly/validators/layout/xaxis/minor/_tick0.py index f2413c1c9c..c5c6ffd42d 100644 --- a/plotly/validators/layout/xaxis/minor/_tick0.py +++ b/plotly/validators/layout/xaxis/minor/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.xaxis.minor", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/_tickcolor.py b/plotly/validators/layout/xaxis/minor/_tickcolor.py index fc4ec184b0..b9fdfed25a 100644 --- a/plotly/validators/layout/xaxis/minor/_tickcolor.py +++ b/plotly/validators/layout/xaxis/minor/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.xaxis.minor", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/minor/_ticklen.py b/plotly/validators/layout/xaxis/minor/_ticklen.py index 588224dc0f..37ed16bea7 100644 --- a/plotly/validators/layout/xaxis/minor/_ticklen.py +++ b/plotly/validators/layout/xaxis/minor/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.xaxis.minor", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/_tickmode.py b/plotly/validators/layout/xaxis/minor/_tickmode.py index fc6889ba1f..5418682f4d 100644 --- a/plotly/validators/layout/xaxis/minor/_tickmode.py +++ b/plotly/validators/layout/xaxis/minor/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.xaxis.minor", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/xaxis/minor/_ticks.py b/plotly/validators/layout/xaxis/minor/_ticks.py index 7009ebfa56..6aac417387 100644 --- a/plotly/validators/layout/xaxis/minor/_ticks.py +++ b/plotly/validators/layout/xaxis/minor/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.xaxis.minor", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/xaxis/minor/_tickvals.py b/plotly/validators/layout/xaxis/minor/_tickvals.py index c31a4883aa..596d3a4ffb 100644 --- a/plotly/validators/layout/xaxis/minor/_tickvals.py +++ b/plotly/validators/layout/xaxis/minor/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.xaxis.minor", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/minor/_tickvalssrc.py b/plotly/validators/layout/xaxis/minor/_tickvalssrc.py index c5d999431b..492cbfb1fa 100644 --- a/plotly/validators/layout/xaxis/minor/_tickvalssrc.py +++ b/plotly/validators/layout/xaxis/minor/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.xaxis.minor", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/minor/_tickwidth.py b/plotly/validators/layout/xaxis/minor/_tickwidth.py index 11b3a3474d..1521c7a696 100644 --- a/plotly/validators/layout/xaxis/minor/_tickwidth.py +++ b/plotly/validators/layout/xaxis/minor/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.xaxis.minor", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangebreak/__init__.py b/plotly/validators/layout/xaxis/rangebreak/__init__.py index 0388365853..4cd89140b8 100644 --- a/plotly/validators/layout/xaxis/rangebreak/__init__.py +++ b/plotly/validators/layout/xaxis/rangebreak/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._values import ValuesValidator - from ._templateitemname import TemplateitemnameValidator - from ._pattern import PatternValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dvalue import DvalueValidator - from ._bounds import BoundsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._values.ValuesValidator", - "._templateitemname.TemplateitemnameValidator", - "._pattern.PatternValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dvalue.DvalueValidator", - "._bounds.BoundsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._values.ValuesValidator", + "._templateitemname.TemplateitemnameValidator", + "._pattern.PatternValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dvalue.DvalueValidator", + "._bounds.BoundsValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/rangebreak/_bounds.py b/plotly/validators/layout/xaxis/rangebreak/_bounds.py index f2c40b9a5f..e590db6981 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_bounds.py +++ b/plotly/validators/layout/xaxis/rangebreak/_bounds.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoundsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class BoundsValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="bounds", parent_name="layout.xaxis.rangebreak", **kwargs ): - super(BoundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/xaxis/rangebreak/_dvalue.py b/plotly/validators/layout/xaxis/rangebreak/_dvalue.py index e89216a4c6..e3acd85a06 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_dvalue.py +++ b/plotly/validators/layout/xaxis/rangebreak/_dvalue.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DvalueValidator(_plotly_utils.basevalidators.NumberValidator): +class DvalueValidator(_bv.NumberValidator): def __init__( self, plotly_name="dvalue", parent_name="layout.xaxis.rangebreak", **kwargs ): - super(DvalueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangebreak/_enabled.py b/plotly/validators/layout/xaxis/rangebreak/_enabled.py index 760a704cce..65407a9c41 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_enabled.py +++ b/plotly/validators/layout/xaxis/rangebreak/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.xaxis.rangebreak", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangebreak/_name.py b/plotly/validators/layout/xaxis/rangebreak/_name.py index 6605d7797d..07e8dfb65f 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_name.py +++ b/plotly/validators/layout/xaxis/rangebreak/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.xaxis.rangebreak", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangebreak/_pattern.py b/plotly/validators/layout/xaxis/rangebreak/_pattern.py index d906cd2228..1734ed91bf 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_pattern.py +++ b/plotly/validators/layout/xaxis/rangebreak/_pattern.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PatternValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="pattern", parent_name="layout.xaxis.rangebreak", **kwargs ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["day of week", "hour", ""]), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py b/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py index 894188d860..6edfc1c2ff 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py +++ b/plotly/validators/layout/xaxis/rangebreak/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.xaxis.rangebreak", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangebreak/_values.py b/plotly/validators/layout/xaxis/rangebreak/_values.py index ff932107fe..90f4879523 100644 --- a/plotly/validators/layout/xaxis/rangebreak/_values.py +++ b/plotly/validators/layout/xaxis/rangebreak/_values.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ValuesValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="values", parent_name="layout.xaxis.rangebreak", **kwargs ): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), free_length=kwargs.pop("free_length", True), items=kwargs.pop("items", {"editType": "calc", "valType": "any"}), diff --git a/plotly/validators/layout/xaxis/rangeselector/__init__.py b/plotly/validators/layout/xaxis/rangeselector/__init__.py index 4e2ef7c7f3..42354defa5 100644 --- a/plotly/validators/layout/xaxis/rangeselector/__init__.py +++ b/plotly/validators/layout/xaxis/rangeselector/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._font import FontValidator - from ._buttondefaults import ButtondefaultsValidator - from ._buttons import ButtonsValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._activecolor import ActivecolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._font.FontValidator", - "._buttondefaults.ButtondefaultsValidator", - "._buttons.ButtonsValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._activecolor.ActivecolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._font.FontValidator", + "._buttondefaults.ButtondefaultsValidator", + "._buttons.ButtonsValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._activecolor.ActivecolorValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/rangeselector/_activecolor.py b/plotly/validators/layout/xaxis/rangeselector/_activecolor.py index 729edd111b..e168645354 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_activecolor.py +++ b/plotly/validators/layout/xaxis/rangeselector/_activecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ActivecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ActivecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="activecolor", parent_name="layout.xaxis.rangeselector", **kwargs, ): - super(ActivecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py b/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py index 1f3dc0061d..db68f35971 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py +++ b/plotly/validators/layout/xaxis/rangeselector/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py b/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py index 8a2c804a44..c1a267240f 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py +++ b/plotly/validators/layout/xaxis/rangeselector/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.xaxis.rangeselector", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py b/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py index 8a6d64055c..23207cde45 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py +++ b/plotly/validators/layout/xaxis/rangeselector/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.xaxis.rangeselector", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py b/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py index 4d40da0f35..2956f618d7 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py +++ b/plotly/validators/layout/xaxis/rangeselector/_buttondefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ButtondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ButtondefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="buttondefaults", parent_name="layout.xaxis.rangeselector", **kwargs, ): - super(ButtondefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Button"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/xaxis/rangeselector/_buttons.py b/plotly/validators/layout/xaxis/rangeselector/_buttons.py index cdc2514215..0875a75b31 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_buttons.py +++ b/plotly/validators/layout/xaxis/rangeselector/_buttons.py @@ -1,62 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ButtonsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ButtonsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="buttons", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(ButtonsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Button"), data_docs=kwargs.pop( "data_docs", """ - count - Sets the number of steps to take to update the - range. Use with `step` to specify the update - interval. - label - Sets the text label to appear on the button. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - step - The unit of measurement that the `count` value - will set the range by. - stepmode - Sets the range update mode. If "backward", the - range update shifts the start of range back - "count" times "step" milliseconds. If "todate", - the range update shifts the start of range back - to the first timestamp from "count" times - "step" milliseconds back. For example, with - `step` set to "year" and `count` set to 1 the - range update shifts the start of the range back - to January 01 of the current year. Month and - year "todate" are currently available only for - the built-in (Gregorian) calendar. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - visible - Determines whether or not this button is - visible. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/_font.py b/plotly/validators/layout/xaxis/rangeselector/_font.py index 4a64548f3b..9b92e67bbb 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_font.py +++ b/plotly/validators/layout/xaxis/rangeselector/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/_visible.py b/plotly/validators/layout/xaxis/rangeselector/_visible.py index ec87ff4ec4..5349292d53 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_visible.py +++ b/plotly/validators/layout/xaxis/rangeselector/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/_x.py b/plotly/validators/layout/xaxis/rangeselector/_x.py index 12d987a9ca..1696e80422 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_x.py +++ b/plotly/validators/layout/xaxis/rangeselector/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 3), min=kwargs.pop("min", -2), diff --git a/plotly/validators/layout/xaxis/rangeselector/_xanchor.py b/plotly/validators/layout/xaxis/rangeselector/_xanchor.py index c2f82545b1..001a98bfdc 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_xanchor.py +++ b/plotly/validators/layout/xaxis/rangeselector/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["auto", "left", "center", "right"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/_y.py b/plotly/validators/layout/xaxis/rangeselector/_y.py index c2fd1b1c3f..4a51348870 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_y.py +++ b/plotly/validators/layout/xaxis/rangeselector/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 3), min=kwargs.pop("min", -2), diff --git a/plotly/validators/layout/xaxis/rangeselector/_yanchor.py b/plotly/validators/layout/xaxis/rangeselector/_yanchor.py index e1c0f4935b..d3899f8d8d 100644 --- a/plotly/validators/layout/xaxis/rangeselector/_yanchor.py +++ b/plotly/validators/layout/xaxis/rangeselector/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.xaxis.rangeselector", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["auto", "top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/button/__init__.py b/plotly/validators/layout/xaxis/rangeselector/button/__init__.py index 50e76b682d..ac076088f8 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/__init__.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._templateitemname import TemplateitemnameValidator - from ._stepmode import StepmodeValidator - from ._step import StepValidator - from ._name import NameValidator - from ._label import LabelValidator - from ._count import CountValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._templateitemname.TemplateitemnameValidator", - "._stepmode.StepmodeValidator", - "._step.StepValidator", - "._name.NameValidator", - "._label.LabelValidator", - "._count.CountValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._templateitemname.TemplateitemnameValidator", + "._stepmode.StepmodeValidator", + "._step.StepValidator", + "._name.NameValidator", + "._label.LabelValidator", + "._count.CountValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_count.py b/plotly/validators/layout/xaxis/rangeselector/button/_count.py index c479be13a0..a36f24be1d 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_count.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_count.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountValidator(_plotly_utils.basevalidators.NumberValidator): +class CountValidator(_bv.NumberValidator): def __init__( self, plotly_name="count", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_label.py b/plotly/validators/layout/xaxis/rangeselector/button/_label.py index 591edfaf8c..e52dbcd543 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_label.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_label.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__( self, plotly_name="label", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_name.py b/plotly/validators/layout/xaxis/rangeselector/button/_name.py index 7dbb9c668a..2624849ab7 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_name.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_step.py b/plotly/validators/layout/xaxis/rangeselector/button/_step.py index de4f7e2a18..9ac0486b6c 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_step.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_step.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StepValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="step", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(StepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["month", "year", "day", "hour", "minute", "second", "all"] diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py b/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py index 5183664e40..599819e16f 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_stepmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StepmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="stepmode", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(StepmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["backward", "todate"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py b/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py index 78a9036a9a..e03a5b179e 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/button/_visible.py b/plotly/validators/layout/xaxis/rangeselector/button/_visible.py index a03aca5f1c..d101731f3f 100644 --- a/plotly/validators/layout/xaxis/rangeselector/button/_visible.py +++ b/plotly/validators/layout/xaxis/rangeselector/button/_visible.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.xaxis.rangeselector.button", **kwargs, ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/font/__init__.py b/plotly/validators/layout/xaxis/rangeselector/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/__init__.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_color.py b/plotly/validators/layout/xaxis/rangeselector/font/_color.py index 307d3b721a..d82bda8ca4 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_color.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_family.py b/plotly/validators/layout/xaxis/rangeselector/font/_family.py index 60c48fb067..1c28db0eb2 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_family.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_lineposition.py b/plotly/validators/layout/xaxis/rangeselector/font/_lineposition.py index 3ca2ab2dc3..b5bdd1d3b2 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_lineposition.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_shadow.py b/plotly/validators/layout/xaxis/rangeselector/font/_shadow.py index 3e761bf6b3..e3da2bb81e 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_shadow.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_size.py b/plotly/validators/layout/xaxis/rangeselector/font/_size.py index 7b5fa3ba2f..5c482bec2a 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_size.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_style.py b/plotly/validators/layout/xaxis/rangeselector/font/_style.py index b65be360c2..32dddd84b0 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_style.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_textcase.py b/plotly/validators/layout/xaxis/rangeselector/font/_textcase.py index 40d4338b03..09c01b01c8 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_textcase.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_variant.py b/plotly/validators/layout/xaxis/rangeselector/font/_variant.py index b168211778..879f6ba7f6 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_variant.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/rangeselector/font/_weight.py b/plotly/validators/layout/xaxis/rangeselector/font/_weight.py index a4330623f5..b642e4396f 100644 --- a/plotly/validators/layout/xaxis/rangeselector/font/_weight.py +++ b/plotly/validators/layout/xaxis/rangeselector/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.xaxis.rangeselector.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/xaxis/rangeslider/__init__.py b/plotly/validators/layout/xaxis/rangeslider/__init__.py index b772996f42..56f0806302 100644 --- a/plotly/validators/layout/xaxis/rangeslider/__init__.py +++ b/plotly/validators/layout/xaxis/rangeslider/__init__.py @@ -1,29 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yaxis import YaxisValidator - from ._visible import VisibleValidator - from ._thickness import ThicknessValidator - from ._range import RangeValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator - from ._autorange import AutorangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yaxis.YaxisValidator", - "._visible.VisibleValidator", - "._thickness.ThicknessValidator", - "._range.RangeValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - "._autorange.AutorangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yaxis.YaxisValidator", + "._visible.VisibleValidator", + "._thickness.ThicknessValidator", + "._range.RangeValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + "._autorange.AutorangeValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/rangeslider/_autorange.py b/plotly/validators/layout/xaxis/rangeslider/_autorange.py index 0acbff9a6c..8bc9ce1003 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_autorange.py +++ b/plotly/validators/layout/xaxis/rangeslider/_autorange.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutorangeValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autorange", parent_name="layout.xaxis.rangeslider", **kwargs ): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py b/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py index 1cd68f9387..e69da7c4b2 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py +++ b/plotly/validators/layout/xaxis/rangeslider/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="layout.xaxis.rangeslider", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py b/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py index 30858da33a..a03bd7610c 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py +++ b/plotly/validators/layout/xaxis/rangeslider/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="layout.xaxis.rangeslider", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py b/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py index a3d04dc3c7..e3dfec2dbb 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py +++ b/plotly/validators/layout/xaxis/rangeslider/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.IntegerValidator): +class BorderwidthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="borderwidth", parent_name="layout.xaxis.rangeslider", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeslider/_range.py b/plotly/validators/layout/xaxis/rangeslider/_range.py index dd49692a9e..df77598b26 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_range.py +++ b/plotly/validators/layout/xaxis/rangeslider/_range.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="layout.xaxis.rangeslider", **kwargs ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), items=kwargs.pop( diff --git a/plotly/validators/layout/xaxis/rangeslider/_thickness.py b/plotly/validators/layout/xaxis/rangeslider/_thickness.py index 9269e949e9..c3f06f6afb 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_thickness.py +++ b/plotly/validators/layout/xaxis/rangeslider/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="layout.xaxis.rangeslider", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/xaxis/rangeslider/_visible.py b/plotly/validators/layout/xaxis/rangeslider/_visible.py index 7c5b31be38..6a02c1b179 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_visible.py +++ b/plotly/validators/layout/xaxis/rangeslider/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="layout.xaxis.rangeslider", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/rangeslider/_yaxis.py b/plotly/validators/layout/xaxis/rangeslider/_yaxis.py index f35578845c..f41fe5d075 100644 --- a/plotly/validators/layout/xaxis/rangeslider/_yaxis.py +++ b/plotly/validators/layout/xaxis/rangeslider/_yaxis.py @@ -1,28 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class YaxisValidator(_bv.CompoundValidator): def __init__( self, plotly_name="yaxis", parent_name="layout.xaxis.rangeslider", **kwargs ): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "YAxis"), data_docs=kwargs.pop( "data_docs", """ - range - Sets the range of this axis for the - rangeslider. - rangemode - Determines whether or not the range of this - axis in the rangeslider use the same value than - in the main plot when zooming in/out. If - "auto", the autorange will be used. If "fixed", - the `range` is used. If "match", the current - range of the corresponding y-axis on the main - subplot is used. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py b/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py index 4f27a744de..d0f62faf82 100644 --- a/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py +++ b/plotly/validators/layout/xaxis/rangeslider/yaxis/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._rangemode import RangemodeValidator - from ._range import RangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._rangemode.RangemodeValidator", "._range.RangeValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._rangemode.RangemodeValidator", "._range.RangeValidator"] +) diff --git a/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py b/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py index c2b532b316..575797f1a5 100644 --- a/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py +++ b/plotly/validators/layout/xaxis/rangeslider/yaxis/_range.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="layout.xaxis.rangeslider.yaxis", **kwargs, ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py b/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py index 94e1436d59..dac6b198a1 100644 --- a/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py +++ b/plotly/validators/layout/xaxis/rangeslider/yaxis/_rangemode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="rangemode", parent_name="layout.xaxis.rangeslider.yaxis", **kwargs, ): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["auto", "fixed", "match"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/tickfont/__init__.py b/plotly/validators/layout/xaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/xaxis/tickfont/__init__.py +++ b/plotly/validators/layout/xaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/tickfont/_color.py b/plotly/validators/layout/xaxis/tickfont/_color.py index 8d6016f51a..6deaf46435 100644 --- a/plotly/validators/layout/xaxis/tickfont/_color.py +++ b/plotly/validators/layout/xaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.xaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/tickfont/_family.py b/plotly/validators/layout/xaxis/tickfont/_family.py index 4de3925644..cf983a8fd2 100644 --- a/plotly/validators/layout/xaxis/tickfont/_family.py +++ b/plotly/validators/layout/xaxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.xaxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/xaxis/tickfont/_lineposition.py b/plotly/validators/layout/xaxis/tickfont/_lineposition.py index 9c7d66c749..69ef55d25a 100644 --- a/plotly/validators/layout/xaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/xaxis/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.xaxis.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/xaxis/tickfont/_shadow.py b/plotly/validators/layout/xaxis/tickfont/_shadow.py index 73842a444f..80021699e3 100644 --- a/plotly/validators/layout/xaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/xaxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.xaxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/tickfont/_size.py b/plotly/validators/layout/xaxis/tickfont/_size.py index 283c2a8d4c..b21505946d 100644 --- a/plotly/validators/layout/xaxis/tickfont/_size.py +++ b/plotly/validators/layout/xaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.xaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/xaxis/tickfont/_style.py b/plotly/validators/layout/xaxis/tickfont/_style.py index 8ce3ab4942..3c594ec211 100644 --- a/plotly/validators/layout/xaxis/tickfont/_style.py +++ b/plotly/validators/layout/xaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.xaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/tickfont/_textcase.py b/plotly/validators/layout/xaxis/tickfont/_textcase.py index fbc4a9661c..76a198088f 100644 --- a/plotly/validators/layout/xaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/xaxis/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.xaxis.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/tickfont/_variant.py b/plotly/validators/layout/xaxis/tickfont/_variant.py index 463befa4a6..17d1117bd8 100644 --- a/plotly/validators/layout/xaxis/tickfont/_variant.py +++ b/plotly/validators/layout/xaxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.xaxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/tickfont/_weight.py b/plotly/validators/layout/xaxis/tickfont/_weight.py index cb10a0db54..15f43db3cc 100644 --- a/plotly/validators/layout/xaxis/tickfont/_weight.py +++ b/plotly/validators/layout/xaxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.xaxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/xaxis/tickformatstop/__init__.py b/plotly/validators/layout/xaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/xaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/xaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py index 3c0d740eeb..7af1a21ae7 100644 --- a/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/xaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.xaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/xaxis/tickformatstop/_enabled.py b/plotly/validators/layout/xaxis/tickformatstop/_enabled.py index 26bc2468e0..f84e824d35 100644 --- a/plotly/validators/layout/xaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/xaxis/tickformatstop/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.xaxis.tickformatstop", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/tickformatstop/_name.py b/plotly/validators/layout/xaxis/tickformatstop/_name.py index b1624dc31e..022c01fb28 100644 --- a/plotly/validators/layout/xaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/xaxis/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.xaxis.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py index 7d5b9b9ad2..e535fff4c1 100644 --- a/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/xaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.xaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/tickformatstop/_value.py b/plotly/validators/layout/xaxis/tickformatstop/_value.py index 4957a99112..23d54d2a72 100644 --- a/plotly/validators/layout/xaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/xaxis/tickformatstop/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.xaxis.tickformatstop", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/title/__init__.py b/plotly/validators/layout/xaxis/title/__init__.py index e8ad96b4dc..a0bd5d5de8 100644 --- a/plotly/validators/layout/xaxis/title/__init__.py +++ b/plotly/validators/layout/xaxis/title/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._standoff import StandoffValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._text.TextValidator", - "._standoff.StandoffValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._standoff.StandoffValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/layout/xaxis/title/_font.py b/plotly/validators/layout/xaxis/title/_font.py index adf321ba94..bc01a3d567 100644 --- a/plotly/validators/layout/xaxis/title/_font.py +++ b/plotly/validators/layout/xaxis/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.xaxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/xaxis/title/_standoff.py b/plotly/validators/layout/xaxis/title/_standoff.py index 318cbf5814..51ab26f655 100644 --- a/plotly/validators/layout/xaxis/title/_standoff.py +++ b/plotly/validators/layout/xaxis/title/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="layout.xaxis.title", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/xaxis/title/_text.py b/plotly/validators/layout/xaxis/title/_text.py index d1d6cb2633..f84d50058c 100644 --- a/plotly/validators/layout/xaxis/title/_text.py +++ b/plotly/validators/layout/xaxis/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.xaxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/title/font/__init__.py b/plotly/validators/layout/xaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/xaxis/title/font/__init__.py +++ b/plotly/validators/layout/xaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/xaxis/title/font/_color.py b/plotly/validators/layout/xaxis/title/font/_color.py index 27d5b3f65c..7aad79c2d3 100644 --- a/plotly/validators/layout/xaxis/title/font/_color.py +++ b/plotly/validators/layout/xaxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.xaxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/title/font/_family.py b/plotly/validators/layout/xaxis/title/font/_family.py index 573bb79c43..37701463d3 100644 --- a/plotly/validators/layout/xaxis/title/font/_family.py +++ b/plotly/validators/layout/xaxis/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.xaxis.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/xaxis/title/font/_lineposition.py b/plotly/validators/layout/xaxis/title/font/_lineposition.py index dcd1591043..e462855381 100644 --- a/plotly/validators/layout/xaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/xaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.xaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/xaxis/title/font/_shadow.py b/plotly/validators/layout/xaxis/title/font/_shadow.py index 56d9e97391..0be64024d0 100644 --- a/plotly/validators/layout/xaxis/title/font/_shadow.py +++ b/plotly/validators/layout/xaxis/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.xaxis.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/xaxis/title/font/_size.py b/plotly/validators/layout/xaxis/title/font/_size.py index 5f371bf2dd..b151286081 100644 --- a/plotly/validators/layout/xaxis/title/font/_size.py +++ b/plotly/validators/layout/xaxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.xaxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/xaxis/title/font/_style.py b/plotly/validators/layout/xaxis/title/font/_style.py index 2e2874af04..f07c1abf97 100644 --- a/plotly/validators/layout/xaxis/title/font/_style.py +++ b/plotly/validators/layout/xaxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.xaxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/title/font/_textcase.py b/plotly/validators/layout/xaxis/title/font/_textcase.py index fb504d1ac5..029c3e5c70 100644 --- a/plotly/validators/layout/xaxis/title/font/_textcase.py +++ b/plotly/validators/layout/xaxis/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.xaxis.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/xaxis/title/font/_variant.py b/plotly/validators/layout/xaxis/title/font/_variant.py index 34333db56d..4cfc6a8549 100644 --- a/plotly/validators/layout/xaxis/title/font/_variant.py +++ b/plotly/validators/layout/xaxis/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.xaxis.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/xaxis/title/font/_weight.py b/plotly/validators/layout/xaxis/title/font/_weight.py index 864d90a61a..410e0697c5 100644 --- a/plotly/validators/layout/xaxis/title/font/_weight.py +++ b/plotly/validators/layout/xaxis/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.xaxis.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/yaxis/__init__.py b/plotly/validators/layout/yaxis/__init__.py index b081aee460..6dfe4972b2 100644 --- a/plotly/validators/layout/yaxis/__init__.py +++ b/plotly/validators/layout/yaxis/__init__.py @@ -1,199 +1,102 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zerolinewidth import ZerolinewidthValidator - from ._zerolinecolor import ZerolinecolorValidator - from ._zeroline import ZerolineValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._type import TypeValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._tickson import TicksonValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelstandoff import TicklabelstandoffValidator - from ._ticklabelshift import TicklabelshiftValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._ticklabelmode import TicklabelmodeValidator - from ._ticklabelindexsrc import TicklabelindexsrcValidator - from ._ticklabelindex import TicklabelindexValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._spikethickness import SpikethicknessValidator - from ._spikesnap import SpikesnapValidator - from ._spikemode import SpikemodeValidator - from ._spikedash import SpikedashValidator - from ._spikecolor import SpikecolorValidator - from ._side import SideValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showspikes import ShowspikesValidator - from ._showline import ShowlineValidator - from ._showgrid import ShowgridValidator - from ._showexponent import ShowexponentValidator - from ._showdividers import ShowdividersValidator - from ._shift import ShiftValidator - from ._separatethousands import SeparatethousandsValidator - from ._scaleratio import ScaleratioValidator - from ._scaleanchor import ScaleanchorValidator - from ._rangemode import RangemodeValidator - from ._rangebreakdefaults import RangebreakdefaultsValidator - from ._rangebreaks import RangebreaksValidator - from ._range import RangeValidator - from ._position import PositionValidator - from ._overlaying import OverlayingValidator - from ._nticks import NticksValidator - from ._mirror import MirrorValidator - from ._minor import MinorValidator - from ._minexponent import MinexponentValidator - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._matches import MatchesValidator - from ._linewidth import LinewidthValidator - from ._linecolor import LinecolorValidator - from ._layer import LayerValidator - from ._labelalias import LabelaliasValidator - from ._insiderange import InsiderangeValidator - from ._hoverformat import HoverformatValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._fixedrange import FixedrangeValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._domain import DomainValidator - from ._dividerwidth import DividerwidthValidator - from ._dividercolor import DividercolorValidator - from ._constraintoward import ConstraintowardValidator - from ._constrain import ConstrainValidator - from ._color import ColorValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator - from ._calendar import CalendarValidator - from ._autotypenumbers import AutotypenumbersValidator - from ._autotickangles import AutotickanglesValidator - from ._autoshift import AutoshiftValidator - from ._autorangeoptions import AutorangeoptionsValidator - from ._autorange import AutorangeValidator - from ._automargin import AutomarginValidator - from ._anchor import AnchorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zerolinewidth.ZerolinewidthValidator", - "._zerolinecolor.ZerolinecolorValidator", - "._zeroline.ZerolineValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._type.TypeValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._tickson.TicksonValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelstandoff.TicklabelstandoffValidator", - "._ticklabelshift.TicklabelshiftValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._ticklabelmode.TicklabelmodeValidator", - "._ticklabelindexsrc.TicklabelindexsrcValidator", - "._ticklabelindex.TicklabelindexValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._spikethickness.SpikethicknessValidator", - "._spikesnap.SpikesnapValidator", - "._spikemode.SpikemodeValidator", - "._spikedash.SpikedashValidator", - "._spikecolor.SpikecolorValidator", - "._side.SideValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showspikes.ShowspikesValidator", - "._showline.ShowlineValidator", - "._showgrid.ShowgridValidator", - "._showexponent.ShowexponentValidator", - "._showdividers.ShowdividersValidator", - "._shift.ShiftValidator", - "._separatethousands.SeparatethousandsValidator", - "._scaleratio.ScaleratioValidator", - "._scaleanchor.ScaleanchorValidator", - "._rangemode.RangemodeValidator", - "._rangebreakdefaults.RangebreakdefaultsValidator", - "._rangebreaks.RangebreaksValidator", - "._range.RangeValidator", - "._position.PositionValidator", - "._overlaying.OverlayingValidator", - "._nticks.NticksValidator", - "._mirror.MirrorValidator", - "._minor.MinorValidator", - "._minexponent.MinexponentValidator", - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._matches.MatchesValidator", - "._linewidth.LinewidthValidator", - "._linecolor.LinecolorValidator", - "._layer.LayerValidator", - "._labelalias.LabelaliasValidator", - "._insiderange.InsiderangeValidator", - "._hoverformat.HoverformatValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._fixedrange.FixedrangeValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._domain.DomainValidator", - "._dividerwidth.DividerwidthValidator", - "._dividercolor.DividercolorValidator", - "._constraintoward.ConstraintowardValidator", - "._constrain.ConstrainValidator", - "._color.ColorValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - "._calendar.CalendarValidator", - "._autotypenumbers.AutotypenumbersValidator", - "._autotickangles.AutotickanglesValidator", - "._autoshift.AutoshiftValidator", - "._autorangeoptions.AutorangeoptionsValidator", - "._autorange.AutorangeValidator", - "._automargin.AutomarginValidator", - "._anchor.AnchorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zerolinewidth.ZerolinewidthValidator", + "._zerolinecolor.ZerolinecolorValidator", + "._zeroline.ZerolineValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._type.TypeValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._tickson.TicksonValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelstandoff.TicklabelstandoffValidator", + "._ticklabelshift.TicklabelshiftValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._ticklabelmode.TicklabelmodeValidator", + "._ticklabelindexsrc.TicklabelindexsrcValidator", + "._ticklabelindex.TicklabelindexValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._spikethickness.SpikethicknessValidator", + "._spikesnap.SpikesnapValidator", + "._spikemode.SpikemodeValidator", + "._spikedash.SpikedashValidator", + "._spikecolor.SpikecolorValidator", + "._side.SideValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showspikes.ShowspikesValidator", + "._showline.ShowlineValidator", + "._showgrid.ShowgridValidator", + "._showexponent.ShowexponentValidator", + "._showdividers.ShowdividersValidator", + "._shift.ShiftValidator", + "._separatethousands.SeparatethousandsValidator", + "._scaleratio.ScaleratioValidator", + "._scaleanchor.ScaleanchorValidator", + "._rangemode.RangemodeValidator", + "._rangebreakdefaults.RangebreakdefaultsValidator", + "._rangebreaks.RangebreaksValidator", + "._range.RangeValidator", + "._position.PositionValidator", + "._overlaying.OverlayingValidator", + "._nticks.NticksValidator", + "._mirror.MirrorValidator", + "._minor.MinorValidator", + "._minexponent.MinexponentValidator", + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._matches.MatchesValidator", + "._linewidth.LinewidthValidator", + "._linecolor.LinecolorValidator", + "._layer.LayerValidator", + "._labelalias.LabelaliasValidator", + "._insiderange.InsiderangeValidator", + "._hoverformat.HoverformatValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._fixedrange.FixedrangeValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._domain.DomainValidator", + "._dividerwidth.DividerwidthValidator", + "._dividercolor.DividercolorValidator", + "._constraintoward.ConstraintowardValidator", + "._constrain.ConstrainValidator", + "._color.ColorValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + "._calendar.CalendarValidator", + "._autotypenumbers.AutotypenumbersValidator", + "._autotickangles.AutotickanglesValidator", + "._autoshift.AutoshiftValidator", + "._autorangeoptions.AutorangeoptionsValidator", + "._autorange.AutorangeValidator", + "._automargin.AutomarginValidator", + "._anchor.AnchorValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/_anchor.py b/plotly/validators/layout/yaxis/_anchor.py index b74acd5746..b41660b028 100644 --- a/plotly/validators/layout/yaxis/_anchor.py +++ b/plotly/validators/layout/yaxis/_anchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="anchor", parent_name="layout.yaxis", **kwargs): - super(AnchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_automargin.py b/plotly/validators/layout/yaxis/_automargin.py index e299ba46ec..cfe78a43ac 100644 --- a/plotly/validators/layout/yaxis/_automargin.py +++ b/plotly/validators/layout/yaxis/_automargin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutomarginValidator(_plotly_utils.basevalidators.FlaglistValidator): +class AutomarginValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="automargin", parent_name="layout.yaxis", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", [True, False]), flags=kwargs.pop( diff --git a/plotly/validators/layout/yaxis/_autorange.py b/plotly/validators/layout/yaxis/_autorange.py index 2f737d4238..c100d83632 100644 --- a/plotly/validators/layout/yaxis/_autorange.py +++ b/plotly/validators/layout/yaxis/_autorange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutorangeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="autorange", parent_name="layout.yaxis", **kwargs): - super(AutorangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "axrange"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop( diff --git a/plotly/validators/layout/yaxis/_autorangeoptions.py b/plotly/validators/layout/yaxis/_autorangeoptions.py index 88e5afd59e..8379b07bf1 100644 --- a/plotly/validators/layout/yaxis/_autorangeoptions.py +++ b/plotly/validators/layout/yaxis/_autorangeoptions.py @@ -1,34 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutorangeoptionsValidator(_plotly_utils.basevalidators.CompoundValidator): +class AutorangeoptionsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="autorangeoptions", parent_name="layout.yaxis", **kwargs ): - super(AutorangeoptionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Autorangeoptions"), data_docs=kwargs.pop( "data_docs", """ - clipmax - Clip autorange maximum if it goes beyond this - value. Has no effect when - `autorangeoptions.maxallowed` is provided. - clipmin - Clip autorange minimum if it goes beyond this - value. Has no effect when - `autorangeoptions.minallowed` is provided. - include - Ensure this value is included in autorange. - includesrc - Sets the source reference on Chart Studio Cloud - for `include`. - maxallowed - Use this value exactly as autorange maximum. - minallowed - Use this value exactly as autorange minimum. """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/_autoshift.py b/plotly/validators/layout/yaxis/_autoshift.py index f2f8638cd1..24f0d4d799 100644 --- a/plotly/validators/layout/yaxis/_autoshift.py +++ b/plotly/validators/layout/yaxis/_autoshift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutoshiftValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutoshiftValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autoshift", parent_name="layout.yaxis", **kwargs): - super(AutoshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_autotickangles.py b/plotly/validators/layout/yaxis/_autotickangles.py index 261fb45dcb..38c9bd321e 100644 --- a/plotly/validators/layout/yaxis/_autotickangles.py +++ b/plotly/validators/layout/yaxis/_autotickangles.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotickanglesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class AutotickanglesValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="autotickangles", parent_name="layout.yaxis", **kwargs ): - super(AutotickanglesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), free_length=kwargs.pop("free_length", True), items=kwargs.pop("items", {"valType": "angle"}), diff --git a/plotly/validators/layout/yaxis/_autotypenumbers.py b/plotly/validators/layout/yaxis/_autotypenumbers.py index 11d2b3fd85..8ac6fb83b3 100644 --- a/plotly/validators/layout/yaxis/_autotypenumbers.py +++ b/plotly/validators/layout/yaxis/_autotypenumbers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutotypenumbersValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AutotypenumbersValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="autotypenumbers", parent_name="layout.yaxis", **kwargs ): - super(AutotypenumbersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["convert types", "strict"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_calendar.py b/plotly/validators/layout/yaxis/_calendar.py index 9643eb4068..089c31f06d 100644 --- a/plotly/validators/layout/yaxis/_calendar.py +++ b/plotly/validators/layout/yaxis/_calendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="calendar", parent_name="layout.yaxis", **kwargs): - super(CalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_categoryarray.py b/plotly/validators/layout/yaxis/_categoryarray.py index b398ef550c..8ec27eb2fa 100644 --- a/plotly/validators/layout/yaxis/_categoryarray.py +++ b/plotly/validators/layout/yaxis/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="layout.yaxis", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_categoryarraysrc.py b/plotly/validators/layout/yaxis/_categoryarraysrc.py index 2ab8a85433..b9fb091187 100644 --- a/plotly/validators/layout/yaxis/_categoryarraysrc.py +++ b/plotly/validators/layout/yaxis/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="layout.yaxis", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_categoryorder.py b/plotly/validators/layout/yaxis/_categoryorder.py index 63a43b7267..7a51728580 100644 --- a/plotly/validators/layout/yaxis/_categoryorder.py +++ b/plotly/validators/layout/yaxis/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="layout.yaxis", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_color.py b/plotly/validators/layout/yaxis/_color.py index 8b20ab6faf..16d54de7f3 100644 --- a/plotly/validators/layout/yaxis/_color.py +++ b/plotly/validators/layout/yaxis/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="layout.yaxis", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_constrain.py b/plotly/validators/layout/yaxis/_constrain.py index 889a504e34..d6aa46f7e4 100644 --- a/plotly/validators/layout/yaxis/_constrain.py +++ b/plotly/validators/layout/yaxis/_constrain.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstrainValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstrainValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="constrain", parent_name="layout.yaxis", **kwargs): - super(ConstrainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["range", "domain"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_constraintoward.py b/plotly/validators/layout/yaxis/_constraintoward.py index 4146c7da74..865f496ed5 100644 --- a/plotly/validators/layout/yaxis/_constraintoward.py +++ b/plotly/validators/layout/yaxis/_constraintoward.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintowardValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstraintowardValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="constraintoward", parent_name="layout.yaxis", **kwargs ): - super(ConstraintowardValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", ["left", "center", "right", "top", "middle", "bottom"] diff --git a/plotly/validators/layout/yaxis/_dividercolor.py b/plotly/validators/layout/yaxis/_dividercolor.py index 6f9dd0b005..832871c182 100644 --- a/plotly/validators/layout/yaxis/_dividercolor.py +++ b/plotly/validators/layout/yaxis/_dividercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DividercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class DividercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="dividercolor", parent_name="layout.yaxis", **kwargs ): - super(DividercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_dividerwidth.py b/plotly/validators/layout/yaxis/_dividerwidth.py index afe396f0d8..7a1c4892f4 100644 --- a/plotly/validators/layout/yaxis/_dividerwidth.py +++ b/plotly/validators/layout/yaxis/_dividerwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DividerwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class DividerwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="dividerwidth", parent_name="layout.yaxis", **kwargs ): - super(DividerwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_domain.py b/plotly/validators/layout/yaxis/_domain.py index 7d8be496ed..40d45815f5 100644 --- a/plotly/validators/layout/yaxis/_domain.py +++ b/plotly/validators/layout/yaxis/_domain.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DomainValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="domain", parent_name="layout.yaxis", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/yaxis/_dtick.py b/plotly/validators/layout/yaxis/_dtick.py index ae707f355a..6543c61ec8 100644 --- a/plotly/validators/layout/yaxis/_dtick.py +++ b/plotly/validators/layout/yaxis/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.yaxis", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/yaxis/_exponentformat.py b/plotly/validators/layout/yaxis/_exponentformat.py index 1122a6fcf5..caae5dcd26 100644 --- a/plotly/validators/layout/yaxis/_exponentformat.py +++ b/plotly/validators/layout/yaxis/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="layout.yaxis", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_fixedrange.py b/plotly/validators/layout/yaxis/_fixedrange.py index f9b65aab56..9d68e39620 100644 --- a/plotly/validators/layout/yaxis/_fixedrange.py +++ b/plotly/validators/layout/yaxis/_fixedrange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FixedrangeValidator(_plotly_utils.basevalidators.BooleanValidator): +class FixedrangeValidator(_bv.BooleanValidator): def __init__(self, plotly_name="fixedrange", parent_name="layout.yaxis", **kwargs): - super(FixedrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_gridcolor.py b/plotly/validators/layout/yaxis/_gridcolor.py index 75de9acaa1..f619170635 100644 --- a/plotly/validators/layout/yaxis/_gridcolor.py +++ b/plotly/validators/layout/yaxis/_gridcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="gridcolor", parent_name="layout.yaxis", **kwargs): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_griddash.py b/plotly/validators/layout/yaxis/_griddash.py index 3bfd34783b..9e1565d8cf 100644 --- a/plotly/validators/layout/yaxis/_griddash.py +++ b/plotly/validators/layout/yaxis/_griddash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__(self, plotly_name="griddash", parent_name="layout.yaxis", **kwargs): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/yaxis/_gridwidth.py b/plotly/validators/layout/yaxis/_gridwidth.py index a9a9f16e68..a4bd353159 100644 --- a/plotly/validators/layout/yaxis/_gridwidth.py +++ b/plotly/validators/layout/yaxis/_gridwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="gridwidth", parent_name="layout.yaxis", **kwargs): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_hoverformat.py b/plotly/validators/layout/yaxis/_hoverformat.py index 7281c178da..607a067ce7 100644 --- a/plotly/validators/layout/yaxis/_hoverformat.py +++ b/plotly/validators/layout/yaxis/_hoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class HoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="hoverformat", parent_name="layout.yaxis", **kwargs): - super(HoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_insiderange.py b/plotly/validators/layout/yaxis/_insiderange.py index 23873102a4..945a443951 100644 --- a/plotly/validators/layout/yaxis/_insiderange.py +++ b/plotly/validators/layout/yaxis/_insiderange.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsiderangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class InsiderangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="insiderange", parent_name="layout.yaxis", **kwargs): - super(InsiderangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/yaxis/_labelalias.py b/plotly/validators/layout/yaxis/_labelalias.py index 0dd665dd74..be384ef647 100644 --- a/plotly/validators/layout/yaxis/_labelalias.py +++ b/plotly/validators/layout/yaxis/_labelalias.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__(self, plotly_name="labelalias", parent_name="layout.yaxis", **kwargs): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_layer.py b/plotly/validators/layout/yaxis/_layer.py index dda4eb090f..0c786573f5 100644 --- a/plotly/validators/layout/yaxis/_layer.py +++ b/plotly/validators/layout/yaxis/_layer.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LayerValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LayerValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="layer", parent_name="layout.yaxis", **kwargs): - super(LayerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["above traces", "below traces"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_linecolor.py b/plotly/validators/layout/yaxis/_linecolor.py index f5adc30c6d..6d8284fc23 100644 --- a/plotly/validators/layout/yaxis/_linecolor.py +++ b/plotly/validators/layout/yaxis/_linecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class LinecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="linecolor", parent_name="layout.yaxis", **kwargs): - super(LinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_linewidth.py b/plotly/validators/layout/yaxis/_linewidth.py index d62ec49412..6a99602ec4 100644 --- a/plotly/validators/layout/yaxis/_linewidth.py +++ b/plotly/validators/layout/yaxis/_linewidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LinewidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="linewidth", parent_name="layout.yaxis", **kwargs): - super(LinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_matches.py b/plotly/validators/layout/yaxis/_matches.py index 85b5364721..245e56586b 100644 --- a/plotly/validators/layout/yaxis/_matches.py +++ b/plotly/validators/layout/yaxis/_matches.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MatchesValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MatchesValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="matches", parent_name="layout.yaxis", **kwargs): - super(MatchesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_maxallowed.py b/plotly/validators/layout/yaxis/_maxallowed.py index be24ce40aa..caae26fa56 100644 --- a/plotly/validators/layout/yaxis/_maxallowed.py +++ b/plotly/validators/layout/yaxis/_maxallowed.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__(self, plotly_name="maxallowed", parent_name="layout.yaxis", **kwargs): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/yaxis/_minallowed.py b/plotly/validators/layout/yaxis/_minallowed.py index 098c842966..4a00ff03c9 100644 --- a/plotly/validators/layout/yaxis/_minallowed.py +++ b/plotly/validators/layout/yaxis/_minallowed.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__(self, plotly_name="minallowed", parent_name="layout.yaxis", **kwargs): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"^autorange": False}), **kwargs, diff --git a/plotly/validators/layout/yaxis/_minexponent.py b/plotly/validators/layout/yaxis/_minexponent.py index b1e7145399..2d6653b215 100644 --- a/plotly/validators/layout/yaxis/_minexponent.py +++ b/plotly/validators/layout/yaxis/_minexponent.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__(self, plotly_name="minexponent", parent_name="layout.yaxis", **kwargs): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_minor.py b/plotly/validators/layout/yaxis/_minor.py index b0b20ae6bb..d62ac57da1 100644 --- a/plotly/validators/layout/yaxis/_minor.py +++ b/plotly/validators/layout/yaxis/_minor.py @@ -1,103 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinorValidator(_plotly_utils.basevalidators.CompoundValidator): +class MinorValidator(_bv.CompoundValidator): def __init__(self, plotly_name="minor", parent_name="layout.yaxis", **kwargs): - super(MinorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Minor"), data_docs=kwargs.pop( "data_docs", """ - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - gridcolor - Sets the color of the grid lines. - griddash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - gridwidth - Sets the width (in px) of the grid lines. - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - showgrid - Determines whether or not grid lines are drawn. - If True, the grid lines are drawn at every tick - mark. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickcolor - Sets the tick color. - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/_mirror.py b/plotly/validators/layout/yaxis/_mirror.py index 66eec2e3c4..776c2db9fd 100644 --- a/plotly/validators/layout/yaxis/_mirror.py +++ b/plotly/validators/layout/yaxis/_mirror.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MirrorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class MirrorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="mirror", parent_name="layout.yaxis", **kwargs): - super(MirrorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), values=kwargs.pop("values", [True, "ticks", False, "all", "allticks"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_nticks.py b/plotly/validators/layout/yaxis/_nticks.py index a9bc214f04..00277e5a71 100644 --- a/plotly/validators/layout/yaxis/_nticks.py +++ b/plotly/validators/layout/yaxis/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="layout.yaxis", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_overlaying.py b/plotly/validators/layout/yaxis/_overlaying.py index ba0c49c039..0b3384f68d 100644 --- a/plotly/validators/layout/yaxis/_overlaying.py +++ b/plotly/validators/layout/yaxis/_overlaying.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OverlayingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OverlayingValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="overlaying", parent_name="layout.yaxis", **kwargs): - super(OverlayingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_position.py b/plotly/validators/layout/yaxis/_position.py index 86b438df67..d5b145b0f1 100644 --- a/plotly/validators/layout/yaxis/_position.py +++ b/plotly/validators/layout/yaxis/_position.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PositionValidator(_plotly_utils.basevalidators.NumberValidator): +class PositionValidator(_bv.NumberValidator): def __init__(self, plotly_name="position", parent_name="layout.yaxis", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/layout/yaxis/_range.py b/plotly/validators/layout/yaxis/_range.py index 0ce610d21c..d8ed428633 100644 --- a/plotly/validators/layout/yaxis/_range.py +++ b/plotly/validators/layout/yaxis/_range.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="range", parent_name="layout.yaxis", **kwargs): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "axrange"), implied_edits=kwargs.pop("implied_edits", {"autorange": False}), diff --git a/plotly/validators/layout/yaxis/_rangebreakdefaults.py b/plotly/validators/layout/yaxis/_rangebreakdefaults.py index 4672f81a04..99a0814d98 100644 --- a/plotly/validators/layout/yaxis/_rangebreakdefaults.py +++ b/plotly/validators/layout/yaxis/_rangebreakdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangebreakdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class RangebreakdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="rangebreakdefaults", parent_name="layout.yaxis", **kwargs ): - super(RangebreakdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangebreak"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/yaxis/_rangebreaks.py b/plotly/validators/layout/yaxis/_rangebreaks.py index 0f78ac34f3..36e30f2c44 100644 --- a/plotly/validators/layout/yaxis/_rangebreaks.py +++ b/plotly/validators/layout/yaxis/_rangebreaks.py @@ -1,66 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangebreaksValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class RangebreaksValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="rangebreaks", parent_name="layout.yaxis", **kwargs): - super(RangebreaksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangebreak"), data_docs=kwargs.pop( "data_docs", """ - bounds - Sets the lower and upper bounds of this axis - rangebreak. Can be used with `pattern`. - dvalue - Sets the size of each `values` item. The - default is one day in milliseconds. - enabled - Determines whether this axis rangebreak is - enabled or disabled. Please note that - `rangebreaks` only work for "date" axis type. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - pattern - Determines a pattern on the time line that - generates breaks. If *day of week* - days of - the week in English e.g. 'Sunday' or `sun` - (matching is case-insensitive and considers - only the first three characters), as well as - Sunday-based integers between 0 and 6. If - "hour" - hour (24-hour clock) as decimal - numbers between 0 and 24. for more info. - Examples: - { pattern: 'day of week', bounds: - [6, 1] } or simply { bounds: ['sat', 'mon'] } - breaks from Saturday to Monday (i.e. skips the - weekends). - { pattern: 'hour', bounds: [17, 8] - } breaks from 5pm to 8am (i.e. skips non-work - hours). - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the coordinate values corresponding to the - rangebreaks. An alternative to `bounds`. Use - `dvalue` to set the size of the values along - the axis. """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/_rangemode.py b/plotly/validators/layout/yaxis/_rangemode.py index e59e360ee4..ec28ca19a7 100644 --- a/plotly/validators/layout/yaxis/_rangemode.py +++ b/plotly/validators/layout/yaxis/_rangemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class RangemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="layout.yaxis", **kwargs): - super(RangemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "tozero", "nonnegative"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_scaleanchor.py b/plotly/validators/layout/yaxis/_scaleanchor.py index 241db36938..7bc1837c07 100644 --- a/plotly/validators/layout/yaxis/_scaleanchor.py +++ b/plotly/validators/layout/yaxis/_scaleanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ScaleanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="scaleanchor", parent_name="layout.yaxis", **kwargs): - super(ScaleanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_scaleratio.py b/plotly/validators/layout/yaxis/_scaleratio.py index 341aa62a96..1cf67666aa 100644 --- a/plotly/validators/layout/yaxis/_scaleratio.py +++ b/plotly/validators/layout/yaxis/_scaleratio.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleratioValidator(_plotly_utils.basevalidators.NumberValidator): +class ScaleratioValidator(_bv.NumberValidator): def __init__(self, plotly_name="scaleratio", parent_name="layout.yaxis", **kwargs): - super(ScaleratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_separatethousands.py b/plotly/validators/layout/yaxis/_separatethousands.py index 77ec9350d9..c48a7a7a2e 100644 --- a/plotly/validators/layout/yaxis/_separatethousands.py +++ b/plotly/validators/layout/yaxis/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="layout.yaxis", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_shift.py b/plotly/validators/layout/yaxis/_shift.py index cdfc87bc25..f49472b1a7 100644 --- a/plotly/validators/layout/yaxis/_shift.py +++ b/plotly/validators/layout/yaxis/_shift.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShiftValidator(_plotly_utils.basevalidators.NumberValidator): +class ShiftValidator(_bv.NumberValidator): def __init__(self, plotly_name="shift", parent_name="layout.yaxis", **kwargs): - super(ShiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_showdividers.py b/plotly/validators/layout/yaxis/_showdividers.py index af3e6d03ae..866cf2b90b 100644 --- a/plotly/validators/layout/yaxis/_showdividers.py +++ b/plotly/validators/layout/yaxis/_showdividers.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowdividersValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowdividersValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showdividers", parent_name="layout.yaxis", **kwargs ): - super(ShowdividersValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_showexponent.py b/plotly/validators/layout/yaxis/_showexponent.py index 207e2ed444..61c57f20b4 100644 --- a/plotly/validators/layout/yaxis/_showexponent.py +++ b/plotly/validators/layout/yaxis/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="layout.yaxis", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_showgrid.py b/plotly/validators/layout/yaxis/_showgrid.py index ccc3013ec4..84bd13940e 100644 --- a/plotly/validators/layout/yaxis/_showgrid.py +++ b/plotly/validators/layout/yaxis/_showgrid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showgrid", parent_name="layout.yaxis", **kwargs): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_showline.py b/plotly/validators/layout/yaxis/_showline.py index 9161f56824..db8ccc06b0 100644 --- a/plotly/validators/layout/yaxis/_showline.py +++ b/plotly/validators/layout/yaxis/_showline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showline", parent_name="layout.yaxis", **kwargs): - super(ShowlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks+layoutstyle"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_showspikes.py b/plotly/validators/layout/yaxis/_showspikes.py index bcdefbd81d..58456c69ad 100644 --- a/plotly/validators/layout/yaxis/_showspikes.py +++ b/plotly/validators/layout/yaxis/_showspikes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowspikesValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowspikesValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showspikes", parent_name="layout.yaxis", **kwargs): - super(ShowspikesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "modebar"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_showticklabels.py b/plotly/validators/layout/yaxis/_showticklabels.py index 5b26ea3f3c..6cbb57dd4a 100644 --- a/plotly/validators/layout/yaxis/_showticklabels.py +++ b/plotly/validators/layout/yaxis/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="layout.yaxis", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_showtickprefix.py b/plotly/validators/layout/yaxis/_showtickprefix.py index 0b540282e4..1371d4e871 100644 --- a/plotly/validators/layout/yaxis/_showtickprefix.py +++ b/plotly/validators/layout/yaxis/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="layout.yaxis", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_showticksuffix.py b/plotly/validators/layout/yaxis/_showticksuffix.py index 70e20229b1..f879ca881c 100644 --- a/plotly/validators/layout/yaxis/_showticksuffix.py +++ b/plotly/validators/layout/yaxis/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="layout.yaxis", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_side.py b/plotly/validators/layout/yaxis/_side.py index 95d7c48ec5..0710ba6c5a 100644 --- a/plotly/validators/layout/yaxis/_side.py +++ b/plotly/validators/layout/yaxis/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="layout.yaxis", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom", "left", "right"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_spikecolor.py b/plotly/validators/layout/yaxis/_spikecolor.py index 87580b7e71..8fa4269ada 100644 --- a/plotly/validators/layout/yaxis/_spikecolor.py +++ b/plotly/validators/layout/yaxis/_spikecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SpikecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="spikecolor", parent_name="layout.yaxis", **kwargs): - super(SpikecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_spikedash.py b/plotly/validators/layout/yaxis/_spikedash.py index 8f2ae4012d..f24342b67c 100644 --- a/plotly/validators/layout/yaxis/_spikedash.py +++ b/plotly/validators/layout/yaxis/_spikedash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikedashValidator(_plotly_utils.basevalidators.DashValidator): +class SpikedashValidator(_bv.DashValidator): def __init__(self, plotly_name="spikedash", parent_name="layout.yaxis", **kwargs): - super(SpikedashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/yaxis/_spikemode.py b/plotly/validators/layout/yaxis/_spikemode.py index 0ba05a888a..2cfcd00df9 100644 --- a/plotly/validators/layout/yaxis/_spikemode.py +++ b/plotly/validators/layout/yaxis/_spikemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikemodeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class SpikemodeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="spikemode", parent_name="layout.yaxis", **kwargs): - super(SpikemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), flags=kwargs.pop("flags", ["toaxis", "across", "marker"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_spikesnap.py b/plotly/validators/layout/yaxis/_spikesnap.py index 6fdf975858..e994c893ca 100644 --- a/plotly/validators/layout/yaxis/_spikesnap.py +++ b/plotly/validators/layout/yaxis/_spikesnap.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikesnapValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SpikesnapValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="spikesnap", parent_name="layout.yaxis", **kwargs): - super(SpikesnapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["data", "cursor", "hovered data"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_spikethickness.py b/plotly/validators/layout/yaxis/_spikethickness.py index c5e28fefc5..58dc6bcba0 100644 --- a/plotly/validators/layout/yaxis/_spikethickness.py +++ b/plotly/validators/layout/yaxis/_spikethickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpikethicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class SpikethicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="spikethickness", parent_name="layout.yaxis", **kwargs ): - super(SpikethicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tick0.py b/plotly/validators/layout/yaxis/_tick0.py index 7b324c3a0e..00921312f8 100644 --- a/plotly/validators/layout/yaxis/_tick0.py +++ b/plotly/validators/layout/yaxis/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.yaxis", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/yaxis/_tickangle.py b/plotly/validators/layout/yaxis/_tickangle.py index ba701e15cb..a9a81dd221 100644 --- a/plotly/validators/layout/yaxis/_tickangle.py +++ b/plotly/validators/layout/yaxis/_tickangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="tickangle", parent_name="layout.yaxis", **kwargs): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tickcolor.py b/plotly/validators/layout/yaxis/_tickcolor.py index 1e13c351b5..2173e54861 100644 --- a/plotly/validators/layout/yaxis/_tickcolor.py +++ b/plotly/validators/layout/yaxis/_tickcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="tickcolor", parent_name="layout.yaxis", **kwargs): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tickfont.py b/plotly/validators/layout/yaxis/_tickfont.py index e55d0167a8..b5a8a2fa1a 100644 --- a/plotly/validators/layout/yaxis/_tickfont.py +++ b/plotly/validators/layout/yaxis/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="layout.yaxis", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/_tickformat.py b/plotly/validators/layout/yaxis/_tickformat.py index fa8214a043..7e558bbab8 100644 --- a/plotly/validators/layout/yaxis/_tickformat.py +++ b/plotly/validators/layout/yaxis/_tickformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__(self, plotly_name="tickformat", parent_name="layout.yaxis", **kwargs): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tickformatstopdefaults.py b/plotly/validators/layout/yaxis/_tickformatstopdefaults.py index 4a6942dd16..4b0bb0d9b9 100644 --- a/plotly/validators/layout/yaxis/_tickformatstopdefaults.py +++ b/plotly/validators/layout/yaxis/_tickformatstopdefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="layout.yaxis", **kwargs ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/layout/yaxis/_tickformatstops.py b/plotly/validators/layout/yaxis/_tickformatstops.py index 1aff114f02..70f2689191 100644 --- a/plotly/validators/layout/yaxis/_tickformatstops.py +++ b/plotly/validators/layout/yaxis/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="layout.yaxis", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/_ticklabelindex.py b/plotly/validators/layout/yaxis/_ticklabelindex.py index 6f3df29d1b..65363600c0 100644 --- a/plotly/validators/layout/yaxis/_ticklabelindex.py +++ b/plotly/validators/layout/yaxis/_ticklabelindex.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelindexValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelindexValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelindex", parent_name="layout.yaxis", **kwargs ): - super(TicklabelindexValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/layout/yaxis/_ticklabelindexsrc.py b/plotly/validators/layout/yaxis/_ticklabelindexsrc.py index 0d0c77a6f7..fabd4a16e7 100644 --- a/plotly/validators/layout/yaxis/_ticklabelindexsrc.py +++ b/plotly/validators/layout/yaxis/_ticklabelindexsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelindexsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicklabelindexsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticklabelindexsrc", parent_name="layout.yaxis", **kwargs ): - super(TicklabelindexsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_ticklabelmode.py b/plotly/validators/layout/yaxis/_ticklabelmode.py index 164d49f56a..d9db02fe15 100644 --- a/plotly/validators/layout/yaxis/_ticklabelmode.py +++ b/plotly/validators/layout/yaxis/_ticklabelmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelmode", parent_name="layout.yaxis", **kwargs ): - super(TicklabelmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["instant", "period"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_ticklabeloverflow.py b/plotly/validators/layout/yaxis/_ticklabeloverflow.py index ff2bf9766c..66c3d446b6 100644 --- a/plotly/validators/layout/yaxis/_ticklabeloverflow.py +++ b/plotly/validators/layout/yaxis/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="layout.yaxis", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_ticklabelposition.py b/plotly/validators/layout/yaxis/_ticklabelposition.py index 2f49aee90e..9f631ce45e 100644 --- a/plotly/validators/layout/yaxis/_ticklabelposition.py +++ b/plotly/validators/layout/yaxis/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="layout.yaxis", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/_ticklabelshift.py b/plotly/validators/layout/yaxis/_ticklabelshift.py index bbef76d176..dd35e480cd 100644 --- a/plotly/validators/layout/yaxis/_ticklabelshift.py +++ b/plotly/validators/layout/yaxis/_ticklabelshift.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelshiftValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelshiftValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelshift", parent_name="layout.yaxis", **kwargs ): - super(TicklabelshiftValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_ticklabelstandoff.py b/plotly/validators/layout/yaxis/_ticklabelstandoff.py index c46e83562a..e3a83c643f 100644 --- a/plotly/validators/layout/yaxis/_ticklabelstandoff.py +++ b/plotly/validators/layout/yaxis/_ticklabelstandoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstandoffValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstandoffValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstandoff", parent_name="layout.yaxis", **kwargs ): - super(TicklabelstandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_ticklabelstep.py b/plotly/validators/layout/yaxis/_ticklabelstep.py index 683d7825f2..8fc955efa0 100644 --- a/plotly/validators/layout/yaxis/_ticklabelstep.py +++ b/plotly/validators/layout/yaxis/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="layout.yaxis", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/yaxis/_ticklen.py b/plotly/validators/layout/yaxis/_ticklen.py index 38cde5b287..a441b47a7f 100644 --- a/plotly/validators/layout/yaxis/_ticklen.py +++ b/plotly/validators/layout/yaxis/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="layout.yaxis", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_tickmode.py b/plotly/validators/layout/yaxis/_tickmode.py index a75c20cfa3..fe23f9aa23 100644 --- a/plotly/validators/layout/yaxis/_tickmode.py +++ b/plotly/validators/layout/yaxis/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="layout.yaxis", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array", "sync"]), diff --git a/plotly/validators/layout/yaxis/_tickprefix.py b/plotly/validators/layout/yaxis/_tickprefix.py index 452a8fd885..ab4f3d0ecd 100644 --- a/plotly/validators/layout/yaxis/_tickprefix.py +++ b/plotly/validators/layout/yaxis/_tickprefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__(self, plotly_name="tickprefix", parent_name="layout.yaxis", **kwargs): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_ticks.py b/plotly/validators/layout/yaxis/_ticks.py index 19830c8a90..c4c4307308 100644 --- a/plotly/validators/layout/yaxis/_ticks.py +++ b/plotly/validators/layout/yaxis/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.yaxis", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_tickson.py b/plotly/validators/layout/yaxis/_tickson.py index 9a1ac3649c..63146453db 100644 --- a/plotly/validators/layout/yaxis/_tickson.py +++ b/plotly/validators/layout/yaxis/_tickson.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksonValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksonValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickson", parent_name="layout.yaxis", **kwargs): - super(TicksonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["labels", "boundaries"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/_ticksuffix.py b/plotly/validators/layout/yaxis/_ticksuffix.py index 6bc108ff66..3db97b6298 100644 --- a/plotly/validators/layout/yaxis/_ticksuffix.py +++ b/plotly/validators/layout/yaxis/_ticksuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="ticksuffix", parent_name="layout.yaxis", **kwargs): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_ticktext.py b/plotly/validators/layout/yaxis/_ticktext.py index 9246831695..f1ff0712a2 100644 --- a/plotly/validators/layout/yaxis/_ticktext.py +++ b/plotly/validators/layout/yaxis/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="layout.yaxis", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_ticktextsrc.py b/plotly/validators/layout/yaxis/_ticktextsrc.py index c79b304ba4..181b1d14a4 100644 --- a/plotly/validators/layout/yaxis/_ticktextsrc.py +++ b/plotly/validators/layout/yaxis/_ticktextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="layout.yaxis", **kwargs): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tickvals.py b/plotly/validators/layout/yaxis/_tickvals.py index e5e641835f..ca0786da62 100644 --- a/plotly/validators/layout/yaxis/_tickvals.py +++ b/plotly/validators/layout/yaxis/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="layout.yaxis", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tickvalssrc.py b/plotly/validators/layout/yaxis/_tickvalssrc.py index 8cf431ca46..8ce61d064c 100644 --- a/plotly/validators/layout/yaxis/_tickvalssrc.py +++ b/plotly/validators/layout/yaxis/_tickvalssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="tickvalssrc", parent_name="layout.yaxis", **kwargs): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_tickwidth.py b/plotly/validators/layout/yaxis/_tickwidth.py index 2810f16414..421e2f05f9 100644 --- a/plotly/validators/layout/yaxis/_tickwidth.py +++ b/plotly/validators/layout/yaxis/_tickwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="tickwidth", parent_name="layout.yaxis", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/_title.py b/plotly/validators/layout/yaxis/_title.py index ef6734d219..5b7697973d 100644 --- a/plotly/validators/layout/yaxis/_title.py +++ b/plotly/validators/layout/yaxis/_title.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="layout.yaxis", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this axis' title font. - standoff - Sets the standoff distance (in px) between the - axis labels and the title text The default - value is a function of the axis tick labels, - the title `font.size` and the axis `linewidth`. - Note that the axis title position is always - constrained within the margins, so the actual - standoff distance is always less than the set - or default value. By setting `standoff` and - turning on `automargin`, plotly.js will push - the margins to fit the axis title at given - standoff distance. - text - Sets the title of this axis. """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/_type.py b/plotly/validators/layout/yaxis/_type.py index 18796c814c..692d2dffd3 100644 --- a/plotly/validators/layout/yaxis/_type.py +++ b/plotly/validators/layout/yaxis/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="layout.yaxis", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["-", "linear", "log", "date", "category", "multicategory"] diff --git a/plotly/validators/layout/yaxis/_uirevision.py b/plotly/validators/layout/yaxis/_uirevision.py index 8a33677076..b37f0e2434 100644 --- a/plotly/validators/layout/yaxis/_uirevision.py +++ b/plotly/validators/layout/yaxis/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="layout.yaxis", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_visible.py b/plotly/validators/layout/yaxis/_visible.py index 59a07a109a..74b0104313 100644 --- a/plotly/validators/layout/yaxis/_visible.py +++ b/plotly/validators/layout/yaxis/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="layout.yaxis", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_zeroline.py b/plotly/validators/layout/yaxis/_zeroline.py index 94a1455e93..86a0401636 100644 --- a/plotly/validators/layout/yaxis/_zeroline.py +++ b/plotly/validators/layout/yaxis/_zeroline.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolineValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZerolineValidator(_bv.BooleanValidator): def __init__(self, plotly_name="zeroline", parent_name="layout.yaxis", **kwargs): - super(ZerolineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_zerolinecolor.py b/plotly/validators/layout/yaxis/_zerolinecolor.py index bc75f09442..2df95adef2 100644 --- a/plotly/validators/layout/yaxis/_zerolinecolor.py +++ b/plotly/validators/layout/yaxis/_zerolinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class ZerolinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="zerolinecolor", parent_name="layout.yaxis", **kwargs ): - super(ZerolinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/_zerolinewidth.py b/plotly/validators/layout/yaxis/_zerolinewidth.py index 8b1f12a3b9..9f274b3867 100644 --- a/plotly/validators/layout/yaxis/_zerolinewidth.py +++ b/plotly/validators/layout/yaxis/_zerolinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZerolinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ZerolinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="zerolinewidth", parent_name="layout.yaxis", **kwargs ): - super(ZerolinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/autorangeoptions/__init__.py b/plotly/validators/layout/yaxis/autorangeoptions/__init__.py index 701f84c04e..8ef0b74165 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/__init__.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._minallowed import MinallowedValidator - from ._maxallowed import MaxallowedValidator - from ._includesrc import IncludesrcValidator - from ._include import IncludeValidator - from ._clipmin import ClipminValidator - from ._clipmax import ClipmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._minallowed.MinallowedValidator", - "._maxallowed.MaxallowedValidator", - "._includesrc.IncludesrcValidator", - "._include.IncludeValidator", - "._clipmin.ClipminValidator", - "._clipmax.ClipmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._minallowed.MinallowedValidator", + "._maxallowed.MaxallowedValidator", + "._includesrc.IncludesrcValidator", + "._include.IncludeValidator", + "._clipmin.ClipminValidator", + "._clipmax.ClipmaxValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/autorangeoptions/_clipmax.py b/plotly/validators/layout/yaxis/autorangeoptions/_clipmax.py index 2ff2ca46b4..f86e6bafda 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/_clipmax.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/_clipmax.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipmaxValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipmaxValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmax", parent_name="layout.yaxis.autorangeoptions", **kwargs, ): - super(ClipmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/yaxis/autorangeoptions/_clipmin.py b/plotly/validators/layout/yaxis/autorangeoptions/_clipmin.py index 4f7df433a4..63750d8488 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/_clipmin.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/_clipmin.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClipminValidator(_plotly_utils.basevalidators.AnyValidator): +class ClipminValidator(_bv.AnyValidator): def __init__( self, plotly_name="clipmin", parent_name="layout.yaxis.autorangeoptions", **kwargs, ): - super(ClipminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/yaxis/autorangeoptions/_include.py b/plotly/validators/layout/yaxis/autorangeoptions/_include.py index 8dcd1d2a1e..5cb164a4c3 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/_include.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/_include.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludeValidator(_plotly_utils.basevalidators.AnyValidator): +class IncludeValidator(_bv.AnyValidator): def __init__( self, plotly_name="include", parent_name="layout.yaxis.autorangeoptions", **kwargs, ): - super(IncludeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), diff --git a/plotly/validators/layout/yaxis/autorangeoptions/_includesrc.py b/plotly/validators/layout/yaxis/autorangeoptions/_includesrc.py index a9bd9fe0b2..f1e2a9e9c5 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/_includesrc.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/_includesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncludesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IncludesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="includesrc", parent_name="layout.yaxis.autorangeoptions", **kwargs, ): - super(IncludesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/autorangeoptions/_maxallowed.py b/plotly/validators/layout/yaxis/autorangeoptions/_maxallowed.py index 0059a1dba3..a7f4bfe5b3 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/_maxallowed.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/_maxallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MaxallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="maxallowed", parent_name="layout.yaxis.autorangeoptions", **kwargs, ): - super(MaxallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/yaxis/autorangeoptions/_minallowed.py b/plotly/validators/layout/yaxis/autorangeoptions/_minallowed.py index 8008d2f5c2..54cb82e958 100644 --- a/plotly/validators/layout/yaxis/autorangeoptions/_minallowed.py +++ b/plotly/validators/layout/yaxis/autorangeoptions/_minallowed.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinallowedValidator(_plotly_utils.basevalidators.AnyValidator): +class MinallowedValidator(_bv.AnyValidator): def __init__( self, plotly_name="minallowed", parent_name="layout.yaxis.autorangeoptions", **kwargs, ): - super(MinallowedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/__init__.py b/plotly/validators/layout/yaxis/minor/__init__.py index 27860a82b8..50b8522165 100644 --- a/plotly/validators/layout/yaxis/minor/__init__.py +++ b/plotly/validators/layout/yaxis/minor/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticks import TicksValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._tickcolor import TickcolorValidator - from ._tick0 import Tick0Validator - from ._showgrid import ShowgridValidator - from ._nticks import NticksValidator - from ._gridwidth import GridwidthValidator - from ._griddash import GriddashValidator - from ._gridcolor import GridcolorValidator - from ._dtick import DtickValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticks.TicksValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._tickcolor.TickcolorValidator", - "._tick0.Tick0Validator", - "._showgrid.ShowgridValidator", - "._nticks.NticksValidator", - "._gridwidth.GridwidthValidator", - "._griddash.GriddashValidator", - "._gridcolor.GridcolorValidator", - "._dtick.DtickValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticks.TicksValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._tickcolor.TickcolorValidator", + "._tick0.Tick0Validator", + "._showgrid.ShowgridValidator", + "._nticks.NticksValidator", + "._gridwidth.GridwidthValidator", + "._griddash.GriddashValidator", + "._gridcolor.GridcolorValidator", + "._dtick.DtickValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/minor/_dtick.py b/plotly/validators/layout/yaxis/minor/_dtick.py index c1753b0a6a..7dcb427046 100644 --- a/plotly/validators/layout/yaxis/minor/_dtick.py +++ b/plotly/validators/layout/yaxis/minor/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="layout.yaxis.minor", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/_gridcolor.py b/plotly/validators/layout/yaxis/minor/_gridcolor.py index 308f17541c..03df83bf92 100644 --- a/plotly/validators/layout/yaxis/minor/_gridcolor.py +++ b/plotly/validators/layout/yaxis/minor/_gridcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class GridcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="gridcolor", parent_name="layout.yaxis.minor", **kwargs ): - super(GridcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/minor/_griddash.py b/plotly/validators/layout/yaxis/minor/_griddash.py index 1ca8429bf7..7f53851344 100644 --- a/plotly/validators/layout/yaxis/minor/_griddash.py +++ b/plotly/validators/layout/yaxis/minor/_griddash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GriddashValidator(_plotly_utils.basevalidators.DashValidator): +class GriddashValidator(_bv.DashValidator): def __init__( self, plotly_name="griddash", parent_name="layout.yaxis.minor", **kwargs ): - super(GriddashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/layout/yaxis/minor/_gridwidth.py b/plotly/validators/layout/yaxis/minor/_gridwidth.py index b4988e01ee..1c7faebb26 100644 --- a/plotly/validators/layout/yaxis/minor/_gridwidth.py +++ b/plotly/validators/layout/yaxis/minor/_gridwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GridwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class GridwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="gridwidth", parent_name="layout.yaxis.minor", **kwargs ): - super(GridwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/_nticks.py b/plotly/validators/layout/yaxis/minor/_nticks.py index e9178e0b78..f5cc0abf8e 100644 --- a/plotly/validators/layout/yaxis/minor/_nticks.py +++ b/plotly/validators/layout/yaxis/minor/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="layout.yaxis.minor", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/_showgrid.py b/plotly/validators/layout/yaxis/minor/_showgrid.py index de9af91867..9655ce7c2a 100644 --- a/plotly/validators/layout/yaxis/minor/_showgrid.py +++ b/plotly/validators/layout/yaxis/minor/_showgrid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowgridValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowgridValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showgrid", parent_name="layout.yaxis.minor", **kwargs ): - super(ShowgridValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/minor/_tick0.py b/plotly/validators/layout/yaxis/minor/_tick0.py index 113d05e397..c08fc7669e 100644 --- a/plotly/validators/layout/yaxis/minor/_tick0.py +++ b/plotly/validators/layout/yaxis/minor/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="layout.yaxis.minor", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/_tickcolor.py b/plotly/validators/layout/yaxis/minor/_tickcolor.py index 15c4dfe893..9ccc5aafa3 100644 --- a/plotly/validators/layout/yaxis/minor/_tickcolor.py +++ b/plotly/validators/layout/yaxis/minor/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="layout.yaxis.minor", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/minor/_ticklen.py b/plotly/validators/layout/yaxis/minor/_ticklen.py index 6ef5436ee1..6891b1e118 100644 --- a/plotly/validators/layout/yaxis/minor/_ticklen.py +++ b/plotly/validators/layout/yaxis/minor/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="layout.yaxis.minor", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/_tickmode.py b/plotly/validators/layout/yaxis/minor/_tickmode.py index 8ea6d4d476..b15206ce0a 100644 --- a/plotly/validators/layout/yaxis/minor/_tickmode.py +++ b/plotly/validators/layout/yaxis/minor/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="layout.yaxis.minor", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/layout/yaxis/minor/_ticks.py b/plotly/validators/layout/yaxis/minor/_ticks.py index dcc5ba5a15..f799faec18 100644 --- a/plotly/validators/layout/yaxis/minor/_ticks.py +++ b/plotly/validators/layout/yaxis/minor/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="layout.yaxis.minor", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/layout/yaxis/minor/_tickvals.py b/plotly/validators/layout/yaxis/minor/_tickvals.py index 9c3e7850f8..5349bbaf7f 100644 --- a/plotly/validators/layout/yaxis/minor/_tickvals.py +++ b/plotly/validators/layout/yaxis/minor/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="layout.yaxis.minor", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/minor/_tickvalssrc.py b/plotly/validators/layout/yaxis/minor/_tickvalssrc.py index 9b16c27d73..f961768cc7 100644 --- a/plotly/validators/layout/yaxis/minor/_tickvalssrc.py +++ b/plotly/validators/layout/yaxis/minor/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="layout.yaxis.minor", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/minor/_tickwidth.py b/plotly/validators/layout/yaxis/minor/_tickwidth.py index 7d12597cad..96f8b79641 100644 --- a/plotly/validators/layout/yaxis/minor/_tickwidth.py +++ b/plotly/validators/layout/yaxis/minor/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="layout.yaxis.minor", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/rangebreak/__init__.py b/plotly/validators/layout/yaxis/rangebreak/__init__.py index 0388365853..4cd89140b8 100644 --- a/plotly/validators/layout/yaxis/rangebreak/__init__.py +++ b/plotly/validators/layout/yaxis/rangebreak/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._values import ValuesValidator - from ._templateitemname import TemplateitemnameValidator - from ._pattern import PatternValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dvalue import DvalueValidator - from ._bounds import BoundsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._values.ValuesValidator", - "._templateitemname.TemplateitemnameValidator", - "._pattern.PatternValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dvalue.DvalueValidator", - "._bounds.BoundsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._values.ValuesValidator", + "._templateitemname.TemplateitemnameValidator", + "._pattern.PatternValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dvalue.DvalueValidator", + "._bounds.BoundsValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/rangebreak/_bounds.py b/plotly/validators/layout/yaxis/rangebreak/_bounds.py index 6caf9a64b5..6d320aa104 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_bounds.py +++ b/plotly/validators/layout/yaxis/rangebreak/_bounds.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoundsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class BoundsValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="bounds", parent_name="layout.yaxis.rangebreak", **kwargs ): - super(BoundsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/yaxis/rangebreak/_dvalue.py b/plotly/validators/layout/yaxis/rangebreak/_dvalue.py index 85f0744574..df35f3d1d8 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_dvalue.py +++ b/plotly/validators/layout/yaxis/rangebreak/_dvalue.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DvalueValidator(_plotly_utils.basevalidators.NumberValidator): +class DvalueValidator(_bv.NumberValidator): def __init__( self, plotly_name="dvalue", parent_name="layout.yaxis.rangebreak", **kwargs ): - super(DvalueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/rangebreak/_enabled.py b/plotly/validators/layout/yaxis/rangebreak/_enabled.py index a302a7f1c9..fc9a7d13f0 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_enabled.py +++ b/plotly/validators/layout/yaxis/rangebreak/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.yaxis.rangebreak", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/rangebreak/_name.py b/plotly/validators/layout/yaxis/rangebreak/_name.py index 347ac646ad..f5f1eadb3e 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_name.py +++ b/plotly/validators/layout/yaxis/rangebreak/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.yaxis.rangebreak", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/rangebreak/_pattern.py b/plotly/validators/layout/yaxis/rangebreak/_pattern.py index 331317d2e5..be6d3122fd 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_pattern.py +++ b/plotly/validators/layout/yaxis/rangebreak/_pattern.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PatternValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="pattern", parent_name="layout.yaxis.rangebreak", **kwargs ): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["day of week", "hour", ""]), **kwargs, diff --git a/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py b/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py index 00318042eb..d8d8b7ce6f 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py +++ b/plotly/validators/layout/yaxis/rangebreak/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.yaxis.rangebreak", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/rangebreak/_values.py b/plotly/validators/layout/yaxis/rangebreak/_values.py index c1076708fb..4348229678 100644 --- a/plotly/validators/layout/yaxis/rangebreak/_values.py +++ b/plotly/validators/layout/yaxis/rangebreak/_values.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ValuesValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="values", parent_name="layout.yaxis.rangebreak", **kwargs ): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), free_length=kwargs.pop("free_length", True), items=kwargs.pop("items", {"editType": "calc", "valType": "any"}), diff --git a/plotly/validators/layout/yaxis/tickfont/__init__.py b/plotly/validators/layout/yaxis/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/yaxis/tickfont/__init__.py +++ b/plotly/validators/layout/yaxis/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/tickfont/_color.py b/plotly/validators/layout/yaxis/tickfont/_color.py index d3e70c57f2..e352930b2c 100644 --- a/plotly/validators/layout/yaxis/tickfont/_color.py +++ b/plotly/validators/layout/yaxis/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.yaxis.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/tickfont/_family.py b/plotly/validators/layout/yaxis/tickfont/_family.py index d311526674..2476d26035 100644 --- a/plotly/validators/layout/yaxis/tickfont/_family.py +++ b/plotly/validators/layout/yaxis/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.yaxis.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/yaxis/tickfont/_lineposition.py b/plotly/validators/layout/yaxis/tickfont/_lineposition.py index 99dc6725df..ecf7e5b132 100644 --- a/plotly/validators/layout/yaxis/tickfont/_lineposition.py +++ b/plotly/validators/layout/yaxis/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.yaxis.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/yaxis/tickfont/_shadow.py b/plotly/validators/layout/yaxis/tickfont/_shadow.py index dd3c38dd7b..24947f7766 100644 --- a/plotly/validators/layout/yaxis/tickfont/_shadow.py +++ b/plotly/validators/layout/yaxis/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.yaxis.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/tickfont/_size.py b/plotly/validators/layout/yaxis/tickfont/_size.py index 6bd11497ef..8708303be1 100644 --- a/plotly/validators/layout/yaxis/tickfont/_size.py +++ b/plotly/validators/layout/yaxis/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.yaxis.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/yaxis/tickfont/_style.py b/plotly/validators/layout/yaxis/tickfont/_style.py index 360946af75..d4df82fa3a 100644 --- a/plotly/validators/layout/yaxis/tickfont/_style.py +++ b/plotly/validators/layout/yaxis/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.yaxis.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/tickfont/_textcase.py b/plotly/validators/layout/yaxis/tickfont/_textcase.py index d4564daee7..1a0ba7b7da 100644 --- a/plotly/validators/layout/yaxis/tickfont/_textcase.py +++ b/plotly/validators/layout/yaxis/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.yaxis.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/tickfont/_variant.py b/plotly/validators/layout/yaxis/tickfont/_variant.py index b704344df0..8c87aa4b79 100644 --- a/plotly/validators/layout/yaxis/tickfont/_variant.py +++ b/plotly/validators/layout/yaxis/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.yaxis.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/tickfont/_weight.py b/plotly/validators/layout/yaxis/tickfont/_weight.py index 6fc4b64ad2..f88e02be9a 100644 --- a/plotly/validators/layout/yaxis/tickfont/_weight.py +++ b/plotly/validators/layout/yaxis/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.yaxis.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/layout/yaxis/tickformatstop/__init__.py b/plotly/validators/layout/yaxis/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/layout/yaxis/tickformatstop/__init__.py +++ b/plotly/validators/layout/yaxis/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py b/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py index abf1131c09..1b728a65f0 100644 --- a/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py +++ b/plotly/validators/layout/yaxis/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="layout.yaxis.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), items=kwargs.pop( "items", diff --git a/plotly/validators/layout/yaxis/tickformatstop/_enabled.py b/plotly/validators/layout/yaxis/tickformatstop/_enabled.py index 8d7ce57f4b..34dce9239e 100644 --- a/plotly/validators/layout/yaxis/tickformatstop/_enabled.py +++ b/plotly/validators/layout/yaxis/tickformatstop/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="layout.yaxis.tickformatstop", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/tickformatstop/_name.py b/plotly/validators/layout/yaxis/tickformatstop/_name.py index d0280b3ba7..b64e8b3732 100644 --- a/plotly/validators/layout/yaxis/tickformatstop/_name.py +++ b/plotly/validators/layout/yaxis/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="layout.yaxis.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py b/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py index 7d930dab93..21747596ff 100644 --- a/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py +++ b/plotly/validators/layout/yaxis/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="layout.yaxis.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/tickformatstop/_value.py b/plotly/validators/layout/yaxis/tickformatstop/_value.py index 0a43d80147..15b343e5bf 100644 --- a/plotly/validators/layout/yaxis/tickformatstop/_value.py +++ b/plotly/validators/layout/yaxis/tickformatstop/_value.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="layout.yaxis.tickformatstop", **kwargs ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/title/__init__.py b/plotly/validators/layout/yaxis/title/__init__.py index e8ad96b4dc..a0bd5d5de8 100644 --- a/plotly/validators/layout/yaxis/title/__init__.py +++ b/plotly/validators/layout/yaxis/title/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._standoff import StandoffValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._text.TextValidator", - "._standoff.StandoffValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._standoff.StandoffValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/layout/yaxis/title/_font.py b/plotly/validators/layout/yaxis/title/_font.py index 16ba168ff8..be67f0b234 100644 --- a/plotly/validators/layout/yaxis/title/_font.py +++ b/plotly/validators/layout/yaxis/title/_font.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="layout.yaxis.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/layout/yaxis/title/_standoff.py b/plotly/validators/layout/yaxis/title/_standoff.py index eff34897c6..47a5c24378 100644 --- a/plotly/validators/layout/yaxis/title/_standoff.py +++ b/plotly/validators/layout/yaxis/title/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="layout.yaxis.title", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/layout/yaxis/title/_text.py b/plotly/validators/layout/yaxis/title/_text.py index f90a0adfb2..72f4725f55 100644 --- a/plotly/validators/layout/yaxis/title/_text.py +++ b/plotly/validators/layout/yaxis/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="layout.yaxis.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/title/font/__init__.py b/plotly/validators/layout/yaxis/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/layout/yaxis/title/font/__init__.py +++ b/plotly/validators/layout/yaxis/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/layout/yaxis/title/font/_color.py b/plotly/validators/layout/yaxis/title/font/_color.py index b1bb5b4af0..5616a496c2 100644 --- a/plotly/validators/layout/yaxis/title/font/_color.py +++ b/plotly/validators/layout/yaxis/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="layout.yaxis.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/title/font/_family.py b/plotly/validators/layout/yaxis/title/font/_family.py index 3a5ed8d4aa..7194e6dead 100644 --- a/plotly/validators/layout/yaxis/title/font/_family.py +++ b/plotly/validators/layout/yaxis/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="layout.yaxis.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/layout/yaxis/title/font/_lineposition.py b/plotly/validators/layout/yaxis/title/font/_lineposition.py index 7b89c32f78..4a56dbee6c 100644 --- a/plotly/validators/layout/yaxis/title/font/_lineposition.py +++ b/plotly/validators/layout/yaxis/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="layout.yaxis.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/layout/yaxis/title/font/_shadow.py b/plotly/validators/layout/yaxis/title/font/_shadow.py index 85e4a71a08..525fe7f3f2 100644 --- a/plotly/validators/layout/yaxis/title/font/_shadow.py +++ b/plotly/validators/layout/yaxis/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="layout.yaxis.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), **kwargs, ) diff --git a/plotly/validators/layout/yaxis/title/font/_size.py b/plotly/validators/layout/yaxis/title/font/_size.py index d7992ca800..e8e24403ff 100644 --- a/plotly/validators/layout/yaxis/title/font/_size.py +++ b/plotly/validators/layout/yaxis/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="layout.yaxis.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/layout/yaxis/title/font/_style.py b/plotly/validators/layout/yaxis/title/font/_style.py index 3aa7a6db5e..a36db56917 100644 --- a/plotly/validators/layout/yaxis/title/font/_style.py +++ b/plotly/validators/layout/yaxis/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="layout.yaxis.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/title/font/_textcase.py b/plotly/validators/layout/yaxis/title/font/_textcase.py index 0cf33560fc..a87de77c25 100644 --- a/plotly/validators/layout/yaxis/title/font/_textcase.py +++ b/plotly/validators/layout/yaxis/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="layout.yaxis.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/layout/yaxis/title/font/_variant.py b/plotly/validators/layout/yaxis/title/font/_variant.py index 573b541159..5b78fc50ad 100644 --- a/plotly/validators/layout/yaxis/title/font/_variant.py +++ b/plotly/validators/layout/yaxis/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="layout.yaxis.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), values=kwargs.pop( "values", diff --git a/plotly/validators/layout/yaxis/title/font/_weight.py b/plotly/validators/layout/yaxis/title/font/_weight.py index c02757ac8e..bdfd2715bb 100644 --- a/plotly/validators/layout/yaxis/title/font/_weight.py +++ b/plotly/validators/layout/yaxis/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="layout.yaxis.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "ticks"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/mesh3d/__init__.py b/plotly/validators/mesh3d/__init__.py index fc0281e897..959d3c13f7 100644 --- a/plotly/validators/mesh3d/__init__.py +++ b/plotly/validators/mesh3d/__init__.py @@ -1,153 +1,79 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._zcalendar import ZcalendarValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._vertexcolorsrc import VertexcolorsrcValidator - from ._vertexcolor import VertexcolorValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lightposition import LightpositionValidator - from ._lighting import LightingValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._ksrc import KsrcValidator - from ._k import KValidator - from ._jsrc import JsrcValidator - from ._j import JValidator - from ._isrc import IsrcValidator - from ._intensitysrc import IntensitysrcValidator - from ._intensitymode import IntensitymodeValidator - from ._intensity import IntensityValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._i import IValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._flatshading import FlatshadingValidator - from ._facecolorsrc import FacecolorsrcValidator - from ._facecolor import FacecolorValidator - from ._delaunayaxis import DelaunayaxisValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contour import ContourValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._alphahull import AlphahullValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._zcalendar.ZcalendarValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._vertexcolorsrc.VertexcolorsrcValidator", - "._vertexcolor.VertexcolorValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lightposition.LightpositionValidator", - "._lighting.LightingValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._ksrc.KsrcValidator", - "._k.KValidator", - "._jsrc.JsrcValidator", - "._j.JValidator", - "._isrc.IsrcValidator", - "._intensitysrc.IntensitysrcValidator", - "._intensitymode.IntensitymodeValidator", - "._intensity.IntensityValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._i.IValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._flatshading.FlatshadingValidator", - "._facecolorsrc.FacecolorsrcValidator", - "._facecolor.FacecolorValidator", - "._delaunayaxis.DelaunayaxisValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contour.ContourValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._alphahull.AlphahullValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._zcalendar.ZcalendarValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._vertexcolorsrc.VertexcolorsrcValidator", + "._vertexcolor.VertexcolorValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._ksrc.KsrcValidator", + "._k.KValidator", + "._jsrc.JsrcValidator", + "._j.JValidator", + "._isrc.IsrcValidator", + "._intensitysrc.IntensitysrcValidator", + "._intensitymode.IntensitymodeValidator", + "._intensity.IntensityValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._i.IValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._flatshading.FlatshadingValidator", + "._facecolorsrc.FacecolorsrcValidator", + "._facecolor.FacecolorValidator", + "._delaunayaxis.DelaunayaxisValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contour.ContourValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._alphahull.AlphahullValidator", + ], +) diff --git a/plotly/validators/mesh3d/_alphahull.py b/plotly/validators/mesh3d/_alphahull.py index 64a586ec84..d7a6ac4a61 100644 --- a/plotly/validators/mesh3d/_alphahull.py +++ b/plotly/validators/mesh3d/_alphahull.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlphahullValidator(_plotly_utils.basevalidators.NumberValidator): +class AlphahullValidator(_bv.NumberValidator): def __init__(self, plotly_name="alphahull", parent_name="mesh3d", **kwargs): - super(AlphahullValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_autocolorscale.py b/plotly/validators/mesh3d/_autocolorscale.py index dd8347a975..ec71faf9c0 100644 --- a/plotly/validators/mesh3d/_autocolorscale.py +++ b/plotly/validators/mesh3d/_autocolorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="mesh3d", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/mesh3d/_cauto.py b/plotly/validators/mesh3d/_cauto.py index 7bd3f6f396..f38d0c1cf2 100644 --- a/plotly/validators/mesh3d/_cauto.py +++ b/plotly/validators/mesh3d/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="mesh3d", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/mesh3d/_cmax.py b/plotly/validators/mesh3d/_cmax.py index ebf2d12c7f..c298f3fa34 100644 --- a/plotly/validators/mesh3d/_cmax.py +++ b/plotly/validators/mesh3d/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="mesh3d", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/mesh3d/_cmid.py b/plotly/validators/mesh3d/_cmid.py index 6b857eb388..c038878512 100644 --- a/plotly/validators/mesh3d/_cmid.py +++ b/plotly/validators/mesh3d/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="mesh3d", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/mesh3d/_cmin.py b/plotly/validators/mesh3d/_cmin.py index a7558840e3..dbe3bc9daf 100644 --- a/plotly/validators/mesh3d/_cmin.py +++ b/plotly/validators/mesh3d/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="mesh3d", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/mesh3d/_color.py b/plotly/validators/mesh3d/_color.py index cf703588bd..796e6b93bd 100644 --- a/plotly/validators/mesh3d/_color.py +++ b/plotly/validators/mesh3d/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="mesh3d", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop("colorscale_path", "mesh3d.colorscale"), **kwargs, diff --git a/plotly/validators/mesh3d/_coloraxis.py b/plotly/validators/mesh3d/_coloraxis.py index d9824c77dc..bb04a4e793 100644 --- a/plotly/validators/mesh3d/_coloraxis.py +++ b/plotly/validators/mesh3d/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="mesh3d", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/mesh3d/_colorbar.py b/plotly/validators/mesh3d/_colorbar.py index 1d305d725e..93c230696a 100644 --- a/plotly/validators/mesh3d/_colorbar.py +++ b/plotly/validators/mesh3d/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="mesh3d", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.mesh3d. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.mesh3d.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of mesh3d.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.mesh3d.colorbar.Ti - tle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_colorscale.py b/plotly/validators/mesh3d/_colorscale.py index ca97432488..11e82f154e 100644 --- a/plotly/validators/mesh3d/_colorscale.py +++ b/plotly/validators/mesh3d/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="mesh3d", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/mesh3d/_contour.py b/plotly/validators/mesh3d/_contour.py index c7d2905e08..2bbe2efe5b 100644 --- a/plotly/validators/mesh3d/_contour.py +++ b/plotly/validators/mesh3d/_contour.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContourValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contour", parent_name="mesh3d", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contour"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_customdata.py b/plotly/validators/mesh3d/_customdata.py index a908fd5ee1..aea391a74e 100644 --- a/plotly/validators/mesh3d/_customdata.py +++ b/plotly/validators/mesh3d/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="mesh3d", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_customdatasrc.py b/plotly/validators/mesh3d/_customdatasrc.py index f98d7e6b55..8f9a8285cc 100644 --- a/plotly/validators/mesh3d/_customdatasrc.py +++ b/plotly/validators/mesh3d/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="mesh3d", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_delaunayaxis.py b/plotly/validators/mesh3d/_delaunayaxis.py index b0a030f2dc..7621eb30a8 100644 --- a/plotly/validators/mesh3d/_delaunayaxis.py +++ b/plotly/validators/mesh3d/_delaunayaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DelaunayaxisValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DelaunayaxisValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="delaunayaxis", parent_name="mesh3d", **kwargs): - super(DelaunayaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["x", "y", "z"]), **kwargs, diff --git a/plotly/validators/mesh3d/_facecolor.py b/plotly/validators/mesh3d/_facecolor.py index 7d6a091f02..39ca46169b 100644 --- a/plotly/validators/mesh3d/_facecolor.py +++ b/plotly/validators/mesh3d/_facecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): +class FacecolorValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="facecolor", parent_name="mesh3d", **kwargs): - super(FacecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_facecolorsrc.py b/plotly/validators/mesh3d/_facecolorsrc.py index dbe10eb699..f5aafa4115 100644 --- a/plotly/validators/mesh3d/_facecolorsrc.py +++ b/plotly/validators/mesh3d/_facecolorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacecolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FacecolorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="facecolorsrc", parent_name="mesh3d", **kwargs): - super(FacecolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_flatshading.py b/plotly/validators/mesh3d/_flatshading.py index 549112ce24..0192ce33d1 100644 --- a/plotly/validators/mesh3d/_flatshading.py +++ b/plotly/validators/mesh3d/_flatshading.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): +class FlatshadingValidator(_bv.BooleanValidator): def __init__(self, plotly_name="flatshading", parent_name="mesh3d", **kwargs): - super(FlatshadingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_hoverinfo.py b/plotly/validators/mesh3d/_hoverinfo.py index b290e22332..f87405a831 100644 --- a/plotly/validators/mesh3d/_hoverinfo.py +++ b/plotly/validators/mesh3d/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="mesh3d", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/mesh3d/_hoverinfosrc.py b/plotly/validators/mesh3d/_hoverinfosrc.py index a0381f5769..2ec2780fd7 100644 --- a/plotly/validators/mesh3d/_hoverinfosrc.py +++ b/plotly/validators/mesh3d/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="mesh3d", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_hoverlabel.py b/plotly/validators/mesh3d/_hoverlabel.py index c0c1e22c98..926823804f 100644 --- a/plotly/validators/mesh3d/_hoverlabel.py +++ b/plotly/validators/mesh3d/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="mesh3d", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_hovertemplate.py b/plotly/validators/mesh3d/_hovertemplate.py index f77974ac35..76cdf24fa0 100644 --- a/plotly/validators/mesh3d/_hovertemplate.py +++ b/plotly/validators/mesh3d/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="mesh3d", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/mesh3d/_hovertemplatesrc.py b/plotly/validators/mesh3d/_hovertemplatesrc.py index d55be7aec8..378b8ae99f 100644 --- a/plotly/validators/mesh3d/_hovertemplatesrc.py +++ b/plotly/validators/mesh3d/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="mesh3d", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_hovertext.py b/plotly/validators/mesh3d/_hovertext.py index 09be0546e4..02337f1f55 100644 --- a/plotly/validators/mesh3d/_hovertext.py +++ b/plotly/validators/mesh3d/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="mesh3d", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/mesh3d/_hovertextsrc.py b/plotly/validators/mesh3d/_hovertextsrc.py index 134ee5f421..3c058024e1 100644 --- a/plotly/validators/mesh3d/_hovertextsrc.py +++ b/plotly/validators/mesh3d/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="mesh3d", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_i.py b/plotly/validators/mesh3d/_i.py index a0903808b9..1166d1239e 100644 --- a/plotly/validators/mesh3d/_i.py +++ b/plotly/validators/mesh3d/_i.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="i", parent_name="mesh3d", **kwargs): - super(IValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_ids.py b/plotly/validators/mesh3d/_ids.py index 0f938d4679..4bed43a4f5 100644 --- a/plotly/validators/mesh3d/_ids.py +++ b/plotly/validators/mesh3d/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="mesh3d", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_idssrc.py b/plotly/validators/mesh3d/_idssrc.py index e0f3a1647b..554f206ed0 100644 --- a/plotly/validators/mesh3d/_idssrc.py +++ b/plotly/validators/mesh3d/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="mesh3d", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_intensity.py b/plotly/validators/mesh3d/_intensity.py index 5073ec3810..92f1498f21 100644 --- a/plotly/validators/mesh3d/_intensity.py +++ b/plotly/validators/mesh3d/_intensity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IntensityValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IntensityValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="intensity", parent_name="mesh3d", **kwargs): - super(IntensityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_intensitymode.py b/plotly/validators/mesh3d/_intensitymode.py index c67df2a369..041fa0f7bd 100644 --- a/plotly/validators/mesh3d/_intensitymode.py +++ b/plotly/validators/mesh3d/_intensitymode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IntensitymodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class IntensitymodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="intensitymode", parent_name="mesh3d", **kwargs): - super(IntensitymodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["vertex", "cell"]), **kwargs, diff --git a/plotly/validators/mesh3d/_intensitysrc.py b/plotly/validators/mesh3d/_intensitysrc.py index c507ac4f25..df304ecd20 100644 --- a/plotly/validators/mesh3d/_intensitysrc.py +++ b/plotly/validators/mesh3d/_intensitysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IntensitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IntensitysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="intensitysrc", parent_name="mesh3d", **kwargs): - super(IntensitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_isrc.py b/plotly/validators/mesh3d/_isrc.py index 2a85c26fef..c430f3f547 100644 --- a/plotly/validators/mesh3d/_isrc.py +++ b/plotly/validators/mesh3d/_isrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="isrc", parent_name="mesh3d", **kwargs): - super(IsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_j.py b/plotly/validators/mesh3d/_j.py index 12c5c89ab9..8f68274db5 100644 --- a/plotly/validators/mesh3d/_j.py +++ b/plotly/validators/mesh3d/_j.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class JValidator(_plotly_utils.basevalidators.DataArrayValidator): +class JValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="j", parent_name="mesh3d", **kwargs): - super(JValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_jsrc.py b/plotly/validators/mesh3d/_jsrc.py index 5e8a69313c..948ad1dc46 100644 --- a/plotly/validators/mesh3d/_jsrc.py +++ b/plotly/validators/mesh3d/_jsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class JsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class JsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="jsrc", parent_name="mesh3d", **kwargs): - super(JsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_k.py b/plotly/validators/mesh3d/_k.py index 264348e340..aa58e968a9 100644 --- a/plotly/validators/mesh3d/_k.py +++ b/plotly/validators/mesh3d/_k.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class KValidator(_plotly_utils.basevalidators.DataArrayValidator): +class KValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="k", parent_name="mesh3d", **kwargs): - super(KValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_ksrc.py b/plotly/validators/mesh3d/_ksrc.py index ada524dd00..85686b53d3 100644 --- a/plotly/validators/mesh3d/_ksrc.py +++ b/plotly/validators/mesh3d/_ksrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class KsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class KsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ksrc", parent_name="mesh3d", **kwargs): - super(KsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_legend.py b/plotly/validators/mesh3d/_legend.py index bbef4ace31..1ba45b059f 100644 --- a/plotly/validators/mesh3d/_legend.py +++ b/plotly/validators/mesh3d/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="mesh3d", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/mesh3d/_legendgroup.py b/plotly/validators/mesh3d/_legendgroup.py index 98c9c6260b..c18f4f19a8 100644 --- a/plotly/validators/mesh3d/_legendgroup.py +++ b/plotly/validators/mesh3d/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="mesh3d", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_legendgrouptitle.py b/plotly/validators/mesh3d/_legendgrouptitle.py index 92d48623ee..c5074a8f4a 100644 --- a/plotly/validators/mesh3d/_legendgrouptitle.py +++ b/plotly/validators/mesh3d/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="mesh3d", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_legendrank.py b/plotly/validators/mesh3d/_legendrank.py index 219fe32f12..6a4764cf04 100644 --- a/plotly/validators/mesh3d/_legendrank.py +++ b/plotly/validators/mesh3d/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="mesh3d", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_legendwidth.py b/plotly/validators/mesh3d/_legendwidth.py index f7bf80c1a0..d1e1fcb7f9 100644 --- a/plotly/validators/mesh3d/_legendwidth.py +++ b/plotly/validators/mesh3d/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="mesh3d", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/_lighting.py b/plotly/validators/mesh3d/_lighting.py index 2d16ba1cf8..ffaf272eee 100644 --- a/plotly/validators/mesh3d/_lighting.py +++ b/plotly/validators/mesh3d/_lighting.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lighting", parent_name="mesh3d", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lighting"), data_docs=kwargs.pop( "data_docs", """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_lightposition.py b/plotly/validators/mesh3d/_lightposition.py index 4cbac015f6..d92d1358e6 100644 --- a/plotly/validators/mesh3d/_lightposition.py +++ b/plotly/validators/mesh3d/_lightposition.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightpositionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="mesh3d", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lightposition"), data_docs=kwargs.pop( "data_docs", """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_meta.py b/plotly/validators/mesh3d/_meta.py index a5dd042af7..2599884a2d 100644 --- a/plotly/validators/mesh3d/_meta.py +++ b/plotly/validators/mesh3d/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="mesh3d", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/mesh3d/_metasrc.py b/plotly/validators/mesh3d/_metasrc.py index 48c4086d60..7da0ab485c 100644 --- a/plotly/validators/mesh3d/_metasrc.py +++ b/plotly/validators/mesh3d/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="mesh3d", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_name.py b/plotly/validators/mesh3d/_name.py index fe3be2e4d5..146c8c684d 100644 --- a/plotly/validators/mesh3d/_name.py +++ b/plotly/validators/mesh3d/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="mesh3d", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_opacity.py b/plotly/validators/mesh3d/_opacity.py index 7e7a981748..8220301017 100644 --- a/plotly/validators/mesh3d/_opacity.py +++ b/plotly/validators/mesh3d/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="mesh3d", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/_reversescale.py b/plotly/validators/mesh3d/_reversescale.py index 87a6a3b31f..093d1b742b 100644 --- a/plotly/validators/mesh3d/_reversescale.py +++ b/plotly/validators/mesh3d/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="mesh3d", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_scene.py b/plotly/validators/mesh3d/_scene.py index c6118838a3..dbf7d27af0 100644 --- a/plotly/validators/mesh3d/_scene.py +++ b/plotly/validators/mesh3d/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="mesh3d", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/mesh3d/_showlegend.py b/plotly/validators/mesh3d/_showlegend.py index 03958c8272..b439a7907d 100644 --- a/plotly/validators/mesh3d/_showlegend.py +++ b/plotly/validators/mesh3d/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="mesh3d", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_showscale.py b/plotly/validators/mesh3d/_showscale.py index 524d89beb4..2b0de4e59d 100644 --- a/plotly/validators/mesh3d/_showscale.py +++ b/plotly/validators/mesh3d/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="mesh3d", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_stream.py b/plotly/validators/mesh3d/_stream.py index a451436124..63ad5a64f7 100644 --- a/plotly/validators/mesh3d/_stream.py +++ b/plotly/validators/mesh3d/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="mesh3d", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/_text.py b/plotly/validators/mesh3d/_text.py index 40db816333..6afe38189c 100644 --- a/plotly/validators/mesh3d/_text.py +++ b/plotly/validators/mesh3d/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="mesh3d", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/mesh3d/_textsrc.py b/plotly/validators/mesh3d/_textsrc.py index 3a697c55e1..13f27881ee 100644 --- a/plotly/validators/mesh3d/_textsrc.py +++ b/plotly/validators/mesh3d/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="mesh3d", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_uid.py b/plotly/validators/mesh3d/_uid.py index b6c0fc41bf..ed37563564 100644 --- a/plotly/validators/mesh3d/_uid.py +++ b/plotly/validators/mesh3d/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="mesh3d", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_uirevision.py b/plotly/validators/mesh3d/_uirevision.py index a01d04509e..244e7226bc 100644 --- a/plotly/validators/mesh3d/_uirevision.py +++ b/plotly/validators/mesh3d/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="mesh3d", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_vertexcolor.py b/plotly/validators/mesh3d/_vertexcolor.py index c4d866eb24..965ec88db5 100644 --- a/plotly/validators/mesh3d/_vertexcolor.py +++ b/plotly/validators/mesh3d/_vertexcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexcolorValidator(_plotly_utils.basevalidators.DataArrayValidator): +class VertexcolorValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="vertexcolor", parent_name="mesh3d", **kwargs): - super(VertexcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_vertexcolorsrc.py b/plotly/validators/mesh3d/_vertexcolorsrc.py index 2a364caa7c..ff6fbc7128 100644 --- a/plotly/validators/mesh3d/_vertexcolorsrc.py +++ b/plotly/validators/mesh3d/_vertexcolorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VertexcolorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="vertexcolorsrc", parent_name="mesh3d", **kwargs): - super(VertexcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_visible.py b/plotly/validators/mesh3d/_visible.py index 8e560dc8cd..31a4d2c330 100644 --- a/plotly/validators/mesh3d/_visible.py +++ b/plotly/validators/mesh3d/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="mesh3d", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/mesh3d/_x.py b/plotly/validators/mesh3d/_x.py index 73acdb050c..5e16210bfc 100644 --- a/plotly/validators/mesh3d/_x.py +++ b/plotly/validators/mesh3d/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="mesh3d", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_xcalendar.py b/plotly/validators/mesh3d/_xcalendar.py index a1189ac771..fbfa75185c 100644 --- a/plotly/validators/mesh3d/_xcalendar.py +++ b/plotly/validators/mesh3d/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="mesh3d", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/_xhoverformat.py b/plotly/validators/mesh3d/_xhoverformat.py index a9b1f072d7..b46f317776 100644 --- a/plotly/validators/mesh3d/_xhoverformat.py +++ b/plotly/validators/mesh3d/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="mesh3d", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_xsrc.py b/plotly/validators/mesh3d/_xsrc.py index 9f0e33c968..aa62ce2b75 100644 --- a/plotly/validators/mesh3d/_xsrc.py +++ b/plotly/validators/mesh3d/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="mesh3d", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_y.py b/plotly/validators/mesh3d/_y.py index 547a6c72dc..333103f105 100644 --- a/plotly/validators/mesh3d/_y.py +++ b/plotly/validators/mesh3d/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="mesh3d", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_ycalendar.py b/plotly/validators/mesh3d/_ycalendar.py index 5cc69441f4..07096aa380 100644 --- a/plotly/validators/mesh3d/_ycalendar.py +++ b/plotly/validators/mesh3d/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="mesh3d", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/_yhoverformat.py b/plotly/validators/mesh3d/_yhoverformat.py index e3406c1932..65d66cdc20 100644 --- a/plotly/validators/mesh3d/_yhoverformat.py +++ b/plotly/validators/mesh3d/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="mesh3d", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_ysrc.py b/plotly/validators/mesh3d/_ysrc.py index c48d7007c3..54b1e8ba50 100644 --- a/plotly/validators/mesh3d/_ysrc.py +++ b/plotly/validators/mesh3d/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="mesh3d", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_z.py b/plotly/validators/mesh3d/_z.py index bdce7b2b35..83f8793930 100644 --- a/plotly/validators/mesh3d/_z.py +++ b/plotly/validators/mesh3d/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="mesh3d", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_zcalendar.py b/plotly/validators/mesh3d/_zcalendar.py index 1e6047057e..87d8d9b1bb 100644 --- a/plotly/validators/mesh3d/_zcalendar.py +++ b/plotly/validators/mesh3d/_zcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ZcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="zcalendar", parent_name="mesh3d", **kwargs): - super(ZcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/_zhoverformat.py b/plotly/validators/mesh3d/_zhoverformat.py index fb79539b1d..5d90944900 100644 --- a/plotly/validators/mesh3d/_zhoverformat.py +++ b/plotly/validators/mesh3d/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="mesh3d", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/_zsrc.py b/plotly/validators/mesh3d/_zsrc.py index 9ec9082ecf..803682d1d0 100644 --- a/plotly/validators/mesh3d/_zsrc.py +++ b/plotly/validators/mesh3d/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="mesh3d", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/__init__.py b/plotly/validators/mesh3d/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/mesh3d/colorbar/__init__.py +++ b/plotly/validators/mesh3d/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/mesh3d/colorbar/_bgcolor.py b/plotly/validators/mesh3d/colorbar/_bgcolor.py index 6c578e4097..4d5aac1629 100644 --- a/plotly/validators/mesh3d/colorbar/_bgcolor.py +++ b/plotly/validators/mesh3d/colorbar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="mesh3d.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_bordercolor.py b/plotly/validators/mesh3d/colorbar/_bordercolor.py index 6a90a357d8..2b84d33f6b 100644 --- a/plotly/validators/mesh3d/colorbar/_bordercolor.py +++ b/plotly/validators/mesh3d/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="mesh3d.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_borderwidth.py b/plotly/validators/mesh3d/colorbar/_borderwidth.py index d8b97390be..6e7f9c75e5 100644 --- a/plotly/validators/mesh3d/colorbar/_borderwidth.py +++ b/plotly/validators/mesh3d/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="mesh3d.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_dtick.py b/plotly/validators/mesh3d/colorbar/_dtick.py index 3a09436984..65333269a5 100644 --- a/plotly/validators/mesh3d/colorbar/_dtick.py +++ b/plotly/validators/mesh3d/colorbar/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="mesh3d.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_exponentformat.py b/plotly/validators/mesh3d/colorbar/_exponentformat.py index 126fc58c6b..36461c9b3d 100644 --- a/plotly/validators/mesh3d/colorbar/_exponentformat.py +++ b/plotly/validators/mesh3d/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="mesh3d.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_labelalias.py b/plotly/validators/mesh3d/colorbar/_labelalias.py index d102600a50..fbd475cfcf 100644 --- a/plotly/validators/mesh3d/colorbar/_labelalias.py +++ b/plotly/validators/mesh3d/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="mesh3d.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_len.py b/plotly/validators/mesh3d/colorbar/_len.py index 352c951d7a..90559fadd5 100644 --- a/plotly/validators/mesh3d/colorbar/_len.py +++ b/plotly/validators/mesh3d/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="mesh3d.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_lenmode.py b/plotly/validators/mesh3d/colorbar/_lenmode.py index 4afff8033e..f82908bfe6 100644 --- a/plotly/validators/mesh3d/colorbar/_lenmode.py +++ b/plotly/validators/mesh3d/colorbar/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="mesh3d.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_minexponent.py b/plotly/validators/mesh3d/colorbar/_minexponent.py index 8e85b921cc..e7592a6074 100644 --- a/plotly/validators/mesh3d/colorbar/_minexponent.py +++ b/plotly/validators/mesh3d/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="mesh3d.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_nticks.py b/plotly/validators/mesh3d/colorbar/_nticks.py index 28bcc81a45..a460c2d201 100644 --- a/plotly/validators/mesh3d/colorbar/_nticks.py +++ b/plotly/validators/mesh3d/colorbar/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="mesh3d.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_orientation.py b/plotly/validators/mesh3d/colorbar/_orientation.py index ed0ed31221..6285771510 100644 --- a/plotly/validators/mesh3d/colorbar/_orientation.py +++ b/plotly/validators/mesh3d/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="mesh3d.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_outlinecolor.py b/plotly/validators/mesh3d/colorbar/_outlinecolor.py index 5d1a547579..42d4bc98c7 100644 --- a/plotly/validators/mesh3d/colorbar/_outlinecolor.py +++ b/plotly/validators/mesh3d/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="mesh3d.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_outlinewidth.py b/plotly/validators/mesh3d/colorbar/_outlinewidth.py index fcf2832edf..7f31202384 100644 --- a/plotly/validators/mesh3d/colorbar/_outlinewidth.py +++ b/plotly/validators/mesh3d/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="mesh3d.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_separatethousands.py b/plotly/validators/mesh3d/colorbar/_separatethousands.py index 7d59013812..b72afbbd02 100644 --- a/plotly/validators/mesh3d/colorbar/_separatethousands.py +++ b/plotly/validators/mesh3d/colorbar/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="mesh3d.colorbar", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_showexponent.py b/plotly/validators/mesh3d/colorbar/_showexponent.py index c0c8c71f8b..feebeef8c4 100644 --- a/plotly/validators/mesh3d/colorbar/_showexponent.py +++ b/plotly/validators/mesh3d/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="mesh3d.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_showticklabels.py b/plotly/validators/mesh3d/colorbar/_showticklabels.py index 095f1d7e1c..b3ae6e637f 100644 --- a/plotly/validators/mesh3d/colorbar/_showticklabels.py +++ b/plotly/validators/mesh3d/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="mesh3d.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_showtickprefix.py b/plotly/validators/mesh3d/colorbar/_showtickprefix.py index 0e04c2eaaa..4648650f08 100644 --- a/plotly/validators/mesh3d/colorbar/_showtickprefix.py +++ b/plotly/validators/mesh3d/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="mesh3d.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_showticksuffix.py b/plotly/validators/mesh3d/colorbar/_showticksuffix.py index 01c08f3d72..4bb21120c1 100644 --- a/plotly/validators/mesh3d/colorbar/_showticksuffix.py +++ b/plotly/validators/mesh3d/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="mesh3d.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_thickness.py b/plotly/validators/mesh3d/colorbar/_thickness.py index 4f5b4ac510..de6478d0d5 100644 --- a/plotly/validators/mesh3d/colorbar/_thickness.py +++ b/plotly/validators/mesh3d/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="mesh3d.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_thicknessmode.py b/plotly/validators/mesh3d/colorbar/_thicknessmode.py index 2d79d18d53..517ce584ee 100644 --- a/plotly/validators/mesh3d/colorbar/_thicknessmode.py +++ b/plotly/validators/mesh3d/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="mesh3d.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_tick0.py b/plotly/validators/mesh3d/colorbar/_tick0.py index 4fe4143067..ed6951d4e9 100644 --- a/plotly/validators/mesh3d/colorbar/_tick0.py +++ b/plotly/validators/mesh3d/colorbar/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="mesh3d.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_tickangle.py b/plotly/validators/mesh3d/colorbar/_tickangle.py index 1a0c0043b8..904160fa75 100644 --- a/plotly/validators/mesh3d/colorbar/_tickangle.py +++ b/plotly/validators/mesh3d/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="mesh3d.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_tickcolor.py b/plotly/validators/mesh3d/colorbar/_tickcolor.py index 2bb17e502c..a6306dcf4d 100644 --- a/plotly/validators/mesh3d/colorbar/_tickcolor.py +++ b/plotly/validators/mesh3d/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="mesh3d.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_tickfont.py b/plotly/validators/mesh3d/colorbar/_tickfont.py index 294afe9563..bc58dc0013 100644 --- a/plotly/validators/mesh3d/colorbar/_tickfont.py +++ b/plotly/validators/mesh3d/colorbar/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="mesh3d.colorbar", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_tickformat.py b/plotly/validators/mesh3d/colorbar/_tickformat.py index dfffc66423..590ad5a317 100644 --- a/plotly/validators/mesh3d/colorbar/_tickformat.py +++ b/plotly/validators/mesh3d/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="mesh3d.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py b/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py index e7287e3b32..79a8337821 100644 --- a/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/mesh3d/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="mesh3d.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/mesh3d/colorbar/_tickformatstops.py b/plotly/validators/mesh3d/colorbar/_tickformatstops.py index d0fbcb8e56..57933b0d45 100644 --- a/plotly/validators/mesh3d/colorbar/_tickformatstops.py +++ b/plotly/validators/mesh3d/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="mesh3d.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_ticklabeloverflow.py b/plotly/validators/mesh3d/colorbar/_ticklabeloverflow.py index 5ccaf2969c..26201eff87 100644 --- a/plotly/validators/mesh3d/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/mesh3d/colorbar/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="mesh3d.colorbar", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_ticklabelposition.py b/plotly/validators/mesh3d/colorbar/_ticklabelposition.py index cd9e75fe3b..aa29c8cdbd 100644 --- a/plotly/validators/mesh3d/colorbar/_ticklabelposition.py +++ b/plotly/validators/mesh3d/colorbar/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="mesh3d.colorbar", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/colorbar/_ticklabelstep.py b/plotly/validators/mesh3d/colorbar/_ticklabelstep.py index a04073019c..4086d278c6 100644 --- a/plotly/validators/mesh3d/colorbar/_ticklabelstep.py +++ b/plotly/validators/mesh3d/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="mesh3d.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_ticklen.py b/plotly/validators/mesh3d/colorbar/_ticklen.py index fd202c3df1..0f40b16ed7 100644 --- a/plotly/validators/mesh3d/colorbar/_ticklen.py +++ b/plotly/validators/mesh3d/colorbar/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="mesh3d.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_tickmode.py b/plotly/validators/mesh3d/colorbar/_tickmode.py index a10a575ef2..fd4aeb5dfa 100644 --- a/plotly/validators/mesh3d/colorbar/_tickmode.py +++ b/plotly/validators/mesh3d/colorbar/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="mesh3d.colorbar", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/mesh3d/colorbar/_tickprefix.py b/plotly/validators/mesh3d/colorbar/_tickprefix.py index 93809e0807..9fc5b1c736 100644 --- a/plotly/validators/mesh3d/colorbar/_tickprefix.py +++ b/plotly/validators/mesh3d/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="mesh3d.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_ticks.py b/plotly/validators/mesh3d/colorbar/_ticks.py index 394edf64da..482b7010b4 100644 --- a/plotly/validators/mesh3d/colorbar/_ticks.py +++ b/plotly/validators/mesh3d/colorbar/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="mesh3d.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_ticksuffix.py b/plotly/validators/mesh3d/colorbar/_ticksuffix.py index 4f3a0e8678..f8b4ef9c6d 100644 --- a/plotly/validators/mesh3d/colorbar/_ticksuffix.py +++ b/plotly/validators/mesh3d/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="mesh3d.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_ticktext.py b/plotly/validators/mesh3d/colorbar/_ticktext.py index 07881b488c..2cda7c5212 100644 --- a/plotly/validators/mesh3d/colorbar/_ticktext.py +++ b/plotly/validators/mesh3d/colorbar/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="mesh3d.colorbar", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_ticktextsrc.py b/plotly/validators/mesh3d/colorbar/_ticktextsrc.py index 6f175f2bc0..3bc8be04c3 100644 --- a/plotly/validators/mesh3d/colorbar/_ticktextsrc.py +++ b/plotly/validators/mesh3d/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="mesh3d.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_tickvals.py b/plotly/validators/mesh3d/colorbar/_tickvals.py index 73c49f26ce..1487e0edf3 100644 --- a/plotly/validators/mesh3d/colorbar/_tickvals.py +++ b/plotly/validators/mesh3d/colorbar/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="mesh3d.colorbar", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_tickvalssrc.py b/plotly/validators/mesh3d/colorbar/_tickvalssrc.py index 6d5f809a7d..d827bdce7b 100644 --- a/plotly/validators/mesh3d/colorbar/_tickvalssrc.py +++ b/plotly/validators/mesh3d/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="mesh3d.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_tickwidth.py b/plotly/validators/mesh3d/colorbar/_tickwidth.py index 8bd49e0778..e9014b511d 100644 --- a/plotly/validators/mesh3d/colorbar/_tickwidth.py +++ b/plotly/validators/mesh3d/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="mesh3d.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_title.py b/plotly/validators/mesh3d/colorbar/_title.py index fe7375c376..4e92288c63 100644 --- a/plotly/validators/mesh3d/colorbar/_title.py +++ b/plotly/validators/mesh3d/colorbar/_title.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="mesh3d.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_x.py b/plotly/validators/mesh3d/colorbar/_x.py index 44bb8c3387..6a8809e39c 100644 --- a/plotly/validators/mesh3d/colorbar/_x.py +++ b/plotly/validators/mesh3d/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="mesh3d.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_xanchor.py b/plotly/validators/mesh3d/colorbar/_xanchor.py index 13a12efb45..317f0e298c 100644 --- a/plotly/validators/mesh3d/colorbar/_xanchor.py +++ b/plotly/validators/mesh3d/colorbar/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="mesh3d.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_xpad.py b/plotly/validators/mesh3d/colorbar/_xpad.py index 72599df24b..4faeecdd3f 100644 --- a/plotly/validators/mesh3d/colorbar/_xpad.py +++ b/plotly/validators/mesh3d/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="mesh3d.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_xref.py b/plotly/validators/mesh3d/colorbar/_xref.py index 4bb7015f83..bb3fd248a7 100644 --- a/plotly/validators/mesh3d/colorbar/_xref.py +++ b/plotly/validators/mesh3d/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="mesh3d.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_y.py b/plotly/validators/mesh3d/colorbar/_y.py index 8d1d774aa7..81f3749273 100644 --- a/plotly/validators/mesh3d/colorbar/_y.py +++ b/plotly/validators/mesh3d/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="mesh3d.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/_yanchor.py b/plotly/validators/mesh3d/colorbar/_yanchor.py index 71c4498d78..e1f918287d 100644 --- a/plotly/validators/mesh3d/colorbar/_yanchor.py +++ b/plotly/validators/mesh3d/colorbar/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="mesh3d.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_ypad.py b/plotly/validators/mesh3d/colorbar/_ypad.py index 7287f8f6de..cf718c68a4 100644 --- a/plotly/validators/mesh3d/colorbar/_ypad.py +++ b/plotly/validators/mesh3d/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="mesh3d.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/_yref.py b/plotly/validators/mesh3d/colorbar/_yref.py index d43f94780e..7550909e97 100644 --- a/plotly/validators/mesh3d/colorbar/_yref.py +++ b/plotly/validators/mesh3d/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="mesh3d.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/tickfont/__init__.py b/plotly/validators/mesh3d/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/__init__.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_color.py b/plotly/validators/mesh3d/colorbar/tickfont/_color.py index 59844b4c83..d2fe43f3b2 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_color.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_family.py b/plotly/validators/mesh3d/colorbar/tickfont/_family.py index 3385b258c8..f92d2c34c7 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_family.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_lineposition.py b/plotly/validators/mesh3d/colorbar/tickfont/_lineposition.py index 76bcfe1b7a..7ba739b4d7 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="mesh3d.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_shadow.py b/plotly/validators/mesh3d/colorbar/tickfont/_shadow.py index 31070d3017..15941251b8 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_shadow.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_size.py b/plotly/validators/mesh3d/colorbar/tickfont/_size.py index 432c1bfa6c..0853cb121e 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_size.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_style.py b/plotly/validators/mesh3d/colorbar/tickfont/_style.py index ea3f21e26e..fade32cbc7 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_style.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_textcase.py b/plotly/validators/mesh3d/colorbar/tickfont/_textcase.py index 0dcb8be556..ec4f313828 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_textcase.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_variant.py b/plotly/validators/mesh3d/colorbar/tickfont/_variant.py index 46d77e006a..f30a35a1dc 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_variant.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/colorbar/tickfont/_weight.py b/plotly/validators/mesh3d/colorbar/tickfont/_weight.py index 12db86faa7..173e42805b 100644 --- a/plotly/validators/mesh3d/colorbar/tickfont/_weight.py +++ b/plotly/validators/mesh3d/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="mesh3d.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py b/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/mesh3d/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py index 3bb31f785b..ec7f876749 100644 --- a/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/mesh3d/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="mesh3d.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py b/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py index 26cb57def0..04ff2d2c1e 100644 --- a/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/mesh3d/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="mesh3d.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py b/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py index cd1368ebbb..a7ad88dddd 100644 --- a/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py +++ b/plotly/validators/mesh3d/colorbar/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="mesh3d.colorbar.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py index 00b6f041a2..1fd413d9f2 100644 --- a/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/mesh3d/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="mesh3d.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py b/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py index ff420cd3a7..7c65532053 100644 --- a/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py +++ b/plotly/validators/mesh3d/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="mesh3d.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/title/__init__.py b/plotly/validators/mesh3d/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/mesh3d/colorbar/title/__init__.py +++ b/plotly/validators/mesh3d/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/mesh3d/colorbar/title/_font.py b/plotly/validators/mesh3d/colorbar/title/_font.py index e22394dba8..dd03953b65 100644 --- a/plotly/validators/mesh3d/colorbar/title/_font.py +++ b/plotly/validators/mesh3d/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="mesh3d.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/title/_side.py b/plotly/validators/mesh3d/colorbar/title/_side.py index dd268347fb..aab3ff48a4 100644 --- a/plotly/validators/mesh3d/colorbar/title/_side.py +++ b/plotly/validators/mesh3d/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="mesh3d.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/title/_text.py b/plotly/validators/mesh3d/colorbar/title/_text.py index 1e909db4d7..c256cdf44f 100644 --- a/plotly/validators/mesh3d/colorbar/title/_text.py +++ b/plotly/validators/mesh3d/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="mesh3d.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/title/font/__init__.py b/plotly/validators/mesh3d/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/__init__.py +++ b/plotly/validators/mesh3d/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/mesh3d/colorbar/title/font/_color.py b/plotly/validators/mesh3d/colorbar/title/font/_color.py index f8b7ecbcdd..4fe5f34f08 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_color.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/title/font/_family.py b/plotly/validators/mesh3d/colorbar/title/font/_family.py index a3513443e9..2a71d9502a 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_family.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/mesh3d/colorbar/title/font/_lineposition.py b/plotly/validators/mesh3d/colorbar/title/font/_lineposition.py index 0b1eab2efb..173ae80672 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_lineposition.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="mesh3d.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/mesh3d/colorbar/title/font/_shadow.py b/plotly/validators/mesh3d/colorbar/title/font/_shadow.py index e695824e37..7330050627 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_shadow.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/mesh3d/colorbar/title/font/_size.py b/plotly/validators/mesh3d/colorbar/title/font/_size.py index 86f9d48012..5310712525 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_size.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/title/font/_style.py b/plotly/validators/mesh3d/colorbar/title/font/_style.py index 801faa8d11..2f899a8b0d 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_style.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/title/font/_textcase.py b/plotly/validators/mesh3d/colorbar/title/font/_textcase.py index b89153f3f1..fa0a5f5c9e 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_textcase.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/mesh3d/colorbar/title/font/_variant.py b/plotly/validators/mesh3d/colorbar/title/font/_variant.py index 0193cbf41c..1562bcdddd 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_variant.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/colorbar/title/font/_weight.py b/plotly/validators/mesh3d/colorbar/title/font/_weight.py index 283e157431..8b94c79ef4 100644 --- a/plotly/validators/mesh3d/colorbar/title/font/_weight.py +++ b/plotly/validators/mesh3d/colorbar/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="mesh3d.colorbar.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/mesh3d/contour/__init__.py b/plotly/validators/mesh3d/contour/__init__.py index 8d51b1d4c0..1a1cc3031d 100644 --- a/plotly/validators/mesh3d/contour/__init__.py +++ b/plotly/validators/mesh3d/contour/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._show import ShowValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/mesh3d/contour/_color.py b/plotly/validators/mesh3d/contour/_color.py index deb30ad2cf..7849564227 100644 --- a/plotly/validators/mesh3d/contour/_color.py +++ b/plotly/validators/mesh3d/contour/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="mesh3d.contour", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/contour/_show.py b/plotly/validators/mesh3d/contour/_show.py index c72bca0b0d..bee6abb0d3 100644 --- a/plotly/validators/mesh3d/contour/_show.py +++ b/plotly/validators/mesh3d/contour/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="mesh3d.contour", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/mesh3d/contour/_width.py b/plotly/validators/mesh3d/contour/_width.py index c802091da0..0043c96ddb 100644 --- a/plotly/validators/mesh3d/contour/_width.py +++ b/plotly/validators/mesh3d/contour/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="mesh3d.contour", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/mesh3d/hoverlabel/__init__.py b/plotly/validators/mesh3d/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/mesh3d/hoverlabel/__init__.py +++ b/plotly/validators/mesh3d/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/mesh3d/hoverlabel/_align.py b/plotly/validators/mesh3d/hoverlabel/_align.py index 68b77db449..b092e8554d 100644 --- a/plotly/validators/mesh3d/hoverlabel/_align.py +++ b/plotly/validators/mesh3d/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="mesh3d.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/mesh3d/hoverlabel/_alignsrc.py b/plotly/validators/mesh3d/hoverlabel/_alignsrc.py index 2c47097ded..616f9792a3 100644 --- a/plotly/validators/mesh3d/hoverlabel/_alignsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="mesh3d.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/_bgcolor.py b/plotly/validators/mesh3d/hoverlabel/_bgcolor.py index 53294c715f..2c3fe4a24a 100644 --- a/plotly/validators/mesh3d/hoverlabel/_bgcolor.py +++ b/plotly/validators/mesh3d/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="mesh3d.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py b/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py index c0db8126f1..8e1077245b 100644 --- a/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="mesh3d.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/_bordercolor.py b/plotly/validators/mesh3d/hoverlabel/_bordercolor.py index 0a78a29107..19057d3127 100644 --- a/plotly/validators/mesh3d/hoverlabel/_bordercolor.py +++ b/plotly/validators/mesh3d/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="mesh3d.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py b/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py index e90b827597..0e6f66079b 100644 --- a/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="mesh3d.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/_font.py b/plotly/validators/mesh3d/hoverlabel/_font.py index feccc71542..418948e5f7 100644 --- a/plotly/validators/mesh3d/hoverlabel/_font.py +++ b/plotly/validators/mesh3d/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="mesh3d.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/hoverlabel/_namelength.py b/plotly/validators/mesh3d/hoverlabel/_namelength.py index 1e3d1023ce..aeda3439bf 100644 --- a/plotly/validators/mesh3d/hoverlabel/_namelength.py +++ b/plotly/validators/mesh3d/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="mesh3d.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py b/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py index 99c62351f8..e742e9c98f 100644 --- a/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="mesh3d.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/__init__.py b/plotly/validators/mesh3d/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/__init__.py +++ b/plotly/validators/mesh3d/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_color.py b/plotly/validators/mesh3d/hoverlabel/font/_color.py index f0294f2720..8229486b67 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_color.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py b/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py index 259b05e89b..951cf3aa17 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_family.py b/plotly/validators/mesh3d/hoverlabel/font/_family.py index 1686bb8da7..f94266e1a8 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_family.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py b/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py index c3dc8b5b1c..d6a3a60aca 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_lineposition.py b/plotly/validators/mesh3d/hoverlabel/font/_lineposition.py index d8e6a68415..80e479f79d 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_lineposition.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/mesh3d/hoverlabel/font/_linepositionsrc.py b/plotly/validators/mesh3d/hoverlabel/font/_linepositionsrc.py index 6a4520f92d..83a05aa074 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="mesh3d.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_shadow.py b/plotly/validators/mesh3d/hoverlabel/font/_shadow.py index 517c4858a0..00245651b8 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_shadow.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/mesh3d/hoverlabel/font/_shadowsrc.py b/plotly/validators/mesh3d/hoverlabel/font/_shadowsrc.py index 5154851b8e..08f24aa9b0 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_size.py b/plotly/validators/mesh3d/hoverlabel/font/_size.py index ab968fb69d..fc437e9fff 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_size.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py b/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py index cadd6f52bb..e01412d2e2 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_style.py b/plotly/validators/mesh3d/hoverlabel/font/_style.py index 579c39d7a8..36f0b6790e 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_style.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/mesh3d/hoverlabel/font/_stylesrc.py b/plotly/validators/mesh3d/hoverlabel/font/_stylesrc.py index 3c1d3b2454..be81713fc6 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_textcase.py b/plotly/validators/mesh3d/hoverlabel/font/_textcase.py index 870b59c236..4f15b44521 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_textcase.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/mesh3d/hoverlabel/font/_textcasesrc.py b/plotly/validators/mesh3d/hoverlabel/font/_textcasesrc.py index da0b4d8978..cecc6e1d7f 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_variant.py b/plotly/validators/mesh3d/hoverlabel/font/_variant.py index c8ea2d7f35..104caa5d80 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_variant.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/mesh3d/hoverlabel/font/_variantsrc.py b/plotly/validators/mesh3d/hoverlabel/font/_variantsrc.py index dda2acbfd6..544b12aebc 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/hoverlabel/font/_weight.py b/plotly/validators/mesh3d/hoverlabel/font/_weight.py index 887832e5cd..c8ec9dca59 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_weight.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/mesh3d/hoverlabel/font/_weightsrc.py b/plotly/validators/mesh3d/hoverlabel/font/_weightsrc.py index 3a308f1a6b..a327a5c21e 100644 --- a/plotly/validators/mesh3d/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/mesh3d/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="mesh3d.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/mesh3d/legendgrouptitle/__init__.py b/plotly/validators/mesh3d/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/__init__.py +++ b/plotly/validators/mesh3d/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/mesh3d/legendgrouptitle/_font.py b/plotly/validators/mesh3d/legendgrouptitle/_font.py index 846e0f7c51..dce846f712 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/_font.py +++ b/plotly/validators/mesh3d/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="mesh3d.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/mesh3d/legendgrouptitle/_text.py b/plotly/validators/mesh3d/legendgrouptitle/_text.py index 5ce1b70d58..6913d33fec 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/_text.py +++ b/plotly/validators/mesh3d/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="mesh3d.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/__init__.py b/plotly/validators/mesh3d/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/__init__.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_color.py b/plotly/validators/mesh3d/legendgrouptitle/font/_color.py index 117b25134b..1470a04de6 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_color.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_family.py b/plotly/validators/mesh3d/legendgrouptitle/font/_family.py index 79bfe78e93..666baf3220 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_family.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_lineposition.py b/plotly/validators/mesh3d/legendgrouptitle/font/_lineposition.py index c71e4d8a81..e76b4cf0f4 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="mesh3d.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_shadow.py b/plotly/validators/mesh3d/legendgrouptitle/font/_shadow.py index 5bfc135c02..5f4c86b9bc 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_size.py b/plotly/validators/mesh3d/legendgrouptitle/font/_size.py index b0c6a9d243..3ca556fbc4 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_size.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_style.py b/plotly/validators/mesh3d/legendgrouptitle/font/_style.py index cd89b20f22..4ca7f032f9 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_style.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_textcase.py b/plotly/validators/mesh3d/legendgrouptitle/font/_textcase.py index 7462e94d20..bbfd8120e9 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="mesh3d.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_variant.py b/plotly/validators/mesh3d/legendgrouptitle/font/_variant.py index c0f1be19da..b884aa3f3a 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_variant.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="mesh3d.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/mesh3d/legendgrouptitle/font/_weight.py b/plotly/validators/mesh3d/legendgrouptitle/font/_weight.py index e15028aad3..59619e6b63 100644 --- a/plotly/validators/mesh3d/legendgrouptitle/font/_weight.py +++ b/plotly/validators/mesh3d/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="mesh3d.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/mesh3d/lighting/__init__.py b/plotly/validators/mesh3d/lighting/__init__.py index 028351f35d..1f11e1b86f 100644 --- a/plotly/validators/mesh3d/lighting/__init__.py +++ b/plotly/validators/mesh3d/lighting/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._vertexnormalsepsilon import VertexnormalsepsilonValidator - from ._specular import SpecularValidator - from ._roughness import RoughnessValidator - from ._fresnel import FresnelValidator - from ._facenormalsepsilon import FacenormalsepsilonValidator - from ._diffuse import DiffuseValidator - from ._ambient import AmbientValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._vertexnormalsepsilon.VertexnormalsepsilonValidator", - "._specular.SpecularValidator", - "._roughness.RoughnessValidator", - "._fresnel.FresnelValidator", - "._facenormalsepsilon.FacenormalsepsilonValidator", - "._diffuse.DiffuseValidator", - "._ambient.AmbientValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], +) diff --git a/plotly/validators/mesh3d/lighting/_ambient.py b/plotly/validators/mesh3d/lighting/_ambient.py index 769de352b7..c48b0c2ee8 100644 --- a/plotly/validators/mesh3d/lighting/_ambient.py +++ b/plotly/validators/mesh3d/lighting/_ambient.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): +class AmbientValidator(_bv.NumberValidator): def __init__(self, plotly_name="ambient", parent_name="mesh3d.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lighting/_diffuse.py b/plotly/validators/mesh3d/lighting/_diffuse.py index 127bee655e..3aa3d52939 100644 --- a/plotly/validators/mesh3d/lighting/_diffuse.py +++ b/plotly/validators/mesh3d/lighting/_diffuse.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): +class DiffuseValidator(_bv.NumberValidator): def __init__(self, plotly_name="diffuse", parent_name="mesh3d.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py b/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py index 111cfb31a5..17dd516781 100644 --- a/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py +++ b/plotly/validators/mesh3d/lighting/_facenormalsepsilon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class FacenormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="facenormalsepsilon", parent_name="mesh3d.lighting", **kwargs ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lighting/_fresnel.py b/plotly/validators/mesh3d/lighting/_fresnel.py index b80d4539ea..c08eedb7c5 100644 --- a/plotly/validators/mesh3d/lighting/_fresnel.py +++ b/plotly/validators/mesh3d/lighting/_fresnel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): +class FresnelValidator(_bv.NumberValidator): def __init__(self, plotly_name="fresnel", parent_name="mesh3d.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lighting/_roughness.py b/plotly/validators/mesh3d/lighting/_roughness.py index 81e2fbf26e..7e605bfa7d 100644 --- a/plotly/validators/mesh3d/lighting/_roughness.py +++ b/plotly/validators/mesh3d/lighting/_roughness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): +class RoughnessValidator(_bv.NumberValidator): def __init__( self, plotly_name="roughness", parent_name="mesh3d.lighting", **kwargs ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lighting/_specular.py b/plotly/validators/mesh3d/lighting/_specular.py index 5de8e034da..19a2b6dcce 100644 --- a/plotly/validators/mesh3d/lighting/_specular.py +++ b/plotly/validators/mesh3d/lighting/_specular.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): +class SpecularValidator(_bv.NumberValidator): def __init__(self, plotly_name="specular", parent_name="mesh3d.lighting", **kwargs): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py b/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py index 1b34819b4a..085adb5662 100644 --- a/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py +++ b/plotly/validators/mesh3d/lighting/_vertexnormalsepsilon.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class VertexnormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="vertexnormalsepsilon", parent_name="mesh3d.lighting", **kwargs, ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/lightposition/__init__.py b/plotly/validators/mesh3d/lightposition/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/mesh3d/lightposition/__init__.py +++ b/plotly/validators/mesh3d/lightposition/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/mesh3d/lightposition/_x.py b/plotly/validators/mesh3d/lightposition/_x.py index 5005071f76..f06ae81810 100644 --- a/plotly/validators/mesh3d/lightposition/_x.py +++ b/plotly/validators/mesh3d/lightposition/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="mesh3d.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/mesh3d/lightposition/_y.py b/plotly/validators/mesh3d/lightposition/_y.py index 3e9c8b58b2..1f409f1ff3 100644 --- a/plotly/validators/mesh3d/lightposition/_y.py +++ b/plotly/validators/mesh3d/lightposition/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="mesh3d.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/mesh3d/lightposition/_z.py b/plotly/validators/mesh3d/lightposition/_z.py index 886e1e997a..50d3c03509 100644 --- a/plotly/validators/mesh3d/lightposition/_z.py +++ b/plotly/validators/mesh3d/lightposition/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__(self, plotly_name="z", parent_name="mesh3d.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/mesh3d/stream/__init__.py b/plotly/validators/mesh3d/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/mesh3d/stream/__init__.py +++ b/plotly/validators/mesh3d/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/mesh3d/stream/_maxpoints.py b/plotly/validators/mesh3d/stream/_maxpoints.py index 7fff7ac574..2ec8e8090d 100644 --- a/plotly/validators/mesh3d/stream/_maxpoints.py +++ b/plotly/validators/mesh3d/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="mesh3d.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/mesh3d/stream/_token.py b/plotly/validators/mesh3d/stream/_token.py index e69cb6fd2a..029ff60b3c 100644 --- a/plotly/validators/mesh3d/stream/_token.py +++ b/plotly/validators/mesh3d/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="mesh3d.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/ohlc/__init__.py b/plotly/validators/ohlc/__init__.py index 1a42406dad..5204a70089 100644 --- a/plotly/validators/ohlc/__init__.py +++ b/plotly/validators/ohlc/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._yhoverformat import YhoverformatValidator - from ._yaxis import YaxisValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._tickwidth import TickwidthValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._opensrc import OpensrcValidator - from ._open import OpenValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lowsrc import LowsrcValidator - from ._low import LowValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._increasing import IncreasingValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._highsrc import HighsrcValidator - from ._high import HighValidator - from ._decreasing import DecreasingValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._closesrc import ClosesrcValidator - from ._close import CloseValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._yhoverformat.YhoverformatValidator", - "._yaxis.YaxisValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._tickwidth.TickwidthValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._opensrc.OpensrcValidator", - "._open.OpenValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lowsrc.LowsrcValidator", - "._low.LowValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._increasing.IncreasingValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._highsrc.HighsrcValidator", - "._high.HighValidator", - "._decreasing.DecreasingValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._closesrc.ClosesrcValidator", - "._close.CloseValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._yhoverformat.YhoverformatValidator", + "._yaxis.YaxisValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tickwidth.TickwidthValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._opensrc.OpensrcValidator", + "._open.OpenValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lowsrc.LowsrcValidator", + "._low.LowValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._increasing.IncreasingValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._highsrc.HighsrcValidator", + "._high.HighValidator", + "._decreasing.DecreasingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._closesrc.ClosesrcValidator", + "._close.CloseValidator", + ], +) diff --git a/plotly/validators/ohlc/_close.py b/plotly/validators/ohlc/_close.py index db559093b4..aa85796b14 100644 --- a/plotly/validators/ohlc/_close.py +++ b/plotly/validators/ohlc/_close.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CloseValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CloseValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="close", parent_name="ohlc", **kwargs): - super(CloseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_closesrc.py b/plotly/validators/ohlc/_closesrc.py index 2771f53cd3..fce7fc688e 100644 --- a/plotly/validators/ohlc/_closesrc.py +++ b/plotly/validators/ohlc/_closesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClosesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ClosesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="closesrc", parent_name="ohlc", **kwargs): - super(ClosesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_customdata.py b/plotly/validators/ohlc/_customdata.py index 3f41e79e0c..3987f7421b 100644 --- a/plotly/validators/ohlc/_customdata.py +++ b/plotly/validators/ohlc/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="ohlc", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_customdatasrc.py b/plotly/validators/ohlc/_customdatasrc.py index ee03e1cecd..51a2524ed9 100644 --- a/plotly/validators/ohlc/_customdatasrc.py +++ b/plotly/validators/ohlc/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="ohlc", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_decreasing.py b/plotly/validators/ohlc/_decreasing.py index c381e50479..4069dd4c59 100644 --- a/plotly/validators/ohlc/_decreasing.py +++ b/plotly/validators/ohlc/_decreasing.py @@ -1,18 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class DecreasingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="decreasing", parent_name="ohlc", **kwargs): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Decreasing"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.ohlc.decreasing.Li - ne` instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/ohlc/_high.py b/plotly/validators/ohlc/_high.py index a5479d72cc..9b187b0886 100644 --- a/plotly/validators/ohlc/_high.py +++ b/plotly/validators/ohlc/_high.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighValidator(_plotly_utils.basevalidators.DataArrayValidator): +class HighValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="high", parent_name="ohlc", **kwargs): - super(HighValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_highsrc.py b/plotly/validators/ohlc/_highsrc.py index f20ed3abf4..2211ea4c76 100644 --- a/plotly/validators/ohlc/_highsrc.py +++ b/plotly/validators/ohlc/_highsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HighsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="highsrc", parent_name="ohlc", **kwargs): - super(HighsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_hoverinfo.py b/plotly/validators/ohlc/_hoverinfo.py index 9254660975..b1c4582246 100644 --- a/plotly/validators/ohlc/_hoverinfo.py +++ b/plotly/validators/ohlc/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="ohlc", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/ohlc/_hoverinfosrc.py b/plotly/validators/ohlc/_hoverinfosrc.py index 72a5b7f29b..340bea11dc 100644 --- a/plotly/validators/ohlc/_hoverinfosrc.py +++ b/plotly/validators/ohlc/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="ohlc", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_hoverlabel.py b/plotly/validators/ohlc/_hoverlabel.py index 5282edd55c..d7fdb6d255 100644 --- a/plotly/validators/ohlc/_hoverlabel.py +++ b/plotly/validators/ohlc/_hoverlabel.py @@ -1,53 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="ohlc", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. - split - Show hover information (open, close, high, low) - in separate labels. """, ), **kwargs, diff --git a/plotly/validators/ohlc/_hovertext.py b/plotly/validators/ohlc/_hovertext.py index 2661378f5d..8421b7bb66 100644 --- a/plotly/validators/ohlc/_hovertext.py +++ b/plotly/validators/ohlc/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="ohlc", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/ohlc/_hovertextsrc.py b/plotly/validators/ohlc/_hovertextsrc.py index eceaef417d..0ab50555df 100644 --- a/plotly/validators/ohlc/_hovertextsrc.py +++ b/plotly/validators/ohlc/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="ohlc", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_ids.py b/plotly/validators/ohlc/_ids.py index 8aa15d6bc3..0ad4174708 100644 --- a/plotly/validators/ohlc/_ids.py +++ b/plotly/validators/ohlc/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="ohlc", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_idssrc.py b/plotly/validators/ohlc/_idssrc.py index 87560b854a..35ad2d8a92 100644 --- a/plotly/validators/ohlc/_idssrc.py +++ b/plotly/validators/ohlc/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="ohlc", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_increasing.py b/plotly/validators/ohlc/_increasing.py index cb264e90c5..481bbb44b6 100644 --- a/plotly/validators/ohlc/_increasing.py +++ b/plotly/validators/ohlc/_increasing.py @@ -1,18 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class IncreasingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="increasing", parent_name="ohlc", **kwargs): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Increasing"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.ohlc.increasing.Li - ne` instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/ohlc/_legend.py b/plotly/validators/ohlc/_legend.py index 9a781df3fb..ae88570fcd 100644 --- a/plotly/validators/ohlc/_legend.py +++ b/plotly/validators/ohlc/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="ohlc", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/ohlc/_legendgroup.py b/plotly/validators/ohlc/_legendgroup.py index 384e89c7f3..6c50a5023b 100644 --- a/plotly/validators/ohlc/_legendgroup.py +++ b/plotly/validators/ohlc/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="ohlc", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/_legendgrouptitle.py b/plotly/validators/ohlc/_legendgrouptitle.py index ce6838a648..6771fd34d2 100644 --- a/plotly/validators/ohlc/_legendgrouptitle.py +++ b/plotly/validators/ohlc/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="ohlc", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/ohlc/_legendrank.py b/plotly/validators/ohlc/_legendrank.py index 14de6bd00b..34b09c4c65 100644 --- a/plotly/validators/ohlc/_legendrank.py +++ b/plotly/validators/ohlc/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="ohlc", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/_legendwidth.py b/plotly/validators/ohlc/_legendwidth.py index f56dd212cb..307e671b05 100644 --- a/plotly/validators/ohlc/_legendwidth.py +++ b/plotly/validators/ohlc/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="ohlc", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/ohlc/_line.py b/plotly/validators/ohlc/_line.py index 9a21f90b7e..03511597e2 100644 --- a/plotly/validators/ohlc/_line.py +++ b/plotly/validators/ohlc/_line.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="ohlc", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - Note that this style setting can also be set - per direction via `increasing.line.dash` and - `decreasing.line.dash`. - width - [object Object] Note that this style setting - can also be set per direction via - `increasing.line.width` and - `decreasing.line.width`. """, ), **kwargs, diff --git a/plotly/validators/ohlc/_low.py b/plotly/validators/ohlc/_low.py index 4cd11320ce..c8e2e62a6f 100644 --- a/plotly/validators/ohlc/_low.py +++ b/plotly/validators/ohlc/_low.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LowValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LowValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="low", parent_name="ohlc", **kwargs): - super(LowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_lowsrc.py b/plotly/validators/ohlc/_lowsrc.py index 8f6f1f7579..d5106abc8e 100644 --- a/plotly/validators/ohlc/_lowsrc.py +++ b/plotly/validators/ohlc/_lowsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LowsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lowsrc", parent_name="ohlc", **kwargs): - super(LowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_meta.py b/plotly/validators/ohlc/_meta.py index 6c202a044e..446b2cb3a8 100644 --- a/plotly/validators/ohlc/_meta.py +++ b/plotly/validators/ohlc/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="ohlc", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/ohlc/_metasrc.py b/plotly/validators/ohlc/_metasrc.py index ca6abf77b0..1e9466354f 100644 --- a/plotly/validators/ohlc/_metasrc.py +++ b/plotly/validators/ohlc/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="ohlc", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_name.py b/plotly/validators/ohlc/_name.py index 02483d3221..0976b69192 100644 --- a/plotly/validators/ohlc/_name.py +++ b/plotly/validators/ohlc/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="ohlc", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/_opacity.py b/plotly/validators/ohlc/_opacity.py index e6bd77598a..9123b88342 100644 --- a/plotly/validators/ohlc/_opacity.py +++ b/plotly/validators/ohlc/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="ohlc", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/ohlc/_open.py b/plotly/validators/ohlc/_open.py index 6f24d8ee90..43aea5552f 100644 --- a/plotly/validators/ohlc/_open.py +++ b/plotly/validators/ohlc/_open.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpenValidator(_plotly_utils.basevalidators.DataArrayValidator): +class OpenValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="open", parent_name="ohlc", **kwargs): - super(OpenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_opensrc.py b/plotly/validators/ohlc/_opensrc.py index 3ff8022c53..ea654ef42a 100644 --- a/plotly/validators/ohlc/_opensrc.py +++ b/plotly/validators/ohlc/_opensrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpensrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpensrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="opensrc", parent_name="ohlc", **kwargs): - super(OpensrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_selectedpoints.py b/plotly/validators/ohlc/_selectedpoints.py index fa0ceaef67..ad3feaaa0c 100644 --- a/plotly/validators/ohlc/_selectedpoints.py +++ b/plotly/validators/ohlc/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="ohlc", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_showlegend.py b/plotly/validators/ohlc/_showlegend.py index 6ae29267b1..7e0431f4bc 100644 --- a/plotly/validators/ohlc/_showlegend.py +++ b/plotly/validators/ohlc/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="ohlc", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/_stream.py b/plotly/validators/ohlc/_stream.py index 86c0b2c310..95d5a69b94 100644 --- a/plotly/validators/ohlc/_stream.py +++ b/plotly/validators/ohlc/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="ohlc", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/ohlc/_text.py b/plotly/validators/ohlc/_text.py index 755cea4df9..683781cf3e 100644 --- a/plotly/validators/ohlc/_text.py +++ b/plotly/validators/ohlc/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="ohlc", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/ohlc/_textsrc.py b/plotly/validators/ohlc/_textsrc.py index 0e67a0e084..cecdf008db 100644 --- a/plotly/validators/ohlc/_textsrc.py +++ b/plotly/validators/ohlc/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="ohlc", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_tickwidth.py b/plotly/validators/ohlc/_tickwidth.py index 46e86c700b..0b8908b9e7 100644 --- a/plotly/validators/ohlc/_tickwidth.py +++ b/plotly/validators/ohlc/_tickwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="tickwidth", parent_name="ohlc", **kwargs): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 0.5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/ohlc/_uid.py b/plotly/validators/ohlc/_uid.py index 49f0605fc4..95eab9e109 100644 --- a/plotly/validators/ohlc/_uid.py +++ b/plotly/validators/ohlc/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="ohlc", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/ohlc/_uirevision.py b/plotly/validators/ohlc/_uirevision.py index 6e995793cf..f1dd46da43 100644 --- a/plotly/validators/ohlc/_uirevision.py +++ b/plotly/validators/ohlc/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="ohlc", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_visible.py b/plotly/validators/ohlc/_visible.py index 11b73c8a81..09d90fc58c 100644 --- a/plotly/validators/ohlc/_visible.py +++ b/plotly/validators/ohlc/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="ohlc", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/ohlc/_x.py b/plotly/validators/ohlc/_x.py index 0a2f55f8fa..ac9ea947f5 100644 --- a/plotly/validators/ohlc/_x.py +++ b/plotly/validators/ohlc/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="ohlc", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/ohlc/_xaxis.py b/plotly/validators/ohlc/_xaxis.py index f9c35cdccd..d4dd82791e 100644 --- a/plotly/validators/ohlc/_xaxis.py +++ b/plotly/validators/ohlc/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="ohlc", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/ohlc/_xcalendar.py b/plotly/validators/ohlc/_xcalendar.py index f28fd4fe9c..b12f1d43d6 100644 --- a/plotly/validators/ohlc/_xcalendar.py +++ b/plotly/validators/ohlc/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="ohlc", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/ohlc/_xhoverformat.py b/plotly/validators/ohlc/_xhoverformat.py index 6799e6862e..e99abad95e 100644 --- a/plotly/validators/ohlc/_xhoverformat.py +++ b/plotly/validators/ohlc/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="ohlc", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_xperiod.py b/plotly/validators/ohlc/_xperiod.py index 5d5c1db7e9..17713d1f8d 100644 --- a/plotly/validators/ohlc/_xperiod.py +++ b/plotly/validators/ohlc/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="ohlc", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_xperiod0.py b/plotly/validators/ohlc/_xperiod0.py index af448df0ec..8e6acd1fef 100644 --- a/plotly/validators/ohlc/_xperiod0.py +++ b/plotly/validators/ohlc/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="ohlc", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/ohlc/_xperiodalignment.py b/plotly/validators/ohlc/_xperiodalignment.py index 1b7c457c28..6dbb76a9d0 100644 --- a/plotly/validators/ohlc/_xperiodalignment.py +++ b/plotly/validators/ohlc/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="ohlc", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/ohlc/_xsrc.py b/plotly/validators/ohlc/_xsrc.py index 64d3311b0b..bd9f56db29 100644 --- a/plotly/validators/ohlc/_xsrc.py +++ b/plotly/validators/ohlc/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="ohlc", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_yaxis.py b/plotly/validators/ohlc/_yaxis.py index 1cf93cf090..1f206b7b85 100644 --- a/plotly/validators/ohlc/_yaxis.py +++ b/plotly/validators/ohlc/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="ohlc", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/ohlc/_yhoverformat.py b/plotly/validators/ohlc/_yhoverformat.py index 417dd86710..fdb06fc4c8 100644 --- a/plotly/validators/ohlc/_yhoverformat.py +++ b/plotly/validators/ohlc/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="ohlc", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/_zorder.py b/plotly/validators/ohlc/_zorder.py index b3ad7f3450..d92f800643 100644 --- a/plotly/validators/ohlc/_zorder.py +++ b/plotly/validators/ohlc/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="ohlc", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/ohlc/decreasing/__init__.py b/plotly/validators/ohlc/decreasing/__init__.py index 90c7f7b127..f7acb5b172 100644 --- a/plotly/validators/ohlc/decreasing/__init__.py +++ b/plotly/validators/ohlc/decreasing/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.LineValidator"]) diff --git a/plotly/validators/ohlc/decreasing/_line.py b/plotly/validators/ohlc/decreasing/_line.py index 49c9834417..5e7be939d5 100644 --- a/plotly/validators/ohlc/decreasing/_line.py +++ b/plotly/validators/ohlc/decreasing/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="ohlc.decreasing", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/ohlc/decreasing/line/__init__.py b/plotly/validators/ohlc/decreasing/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/ohlc/decreasing/line/__init__.py +++ b/plotly/validators/ohlc/decreasing/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/ohlc/decreasing/line/_color.py b/plotly/validators/ohlc/decreasing/line/_color.py index c5210d83e1..bedf6e31b4 100644 --- a/plotly/validators/ohlc/decreasing/line/_color.py +++ b/plotly/validators/ohlc/decreasing/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="ohlc.decreasing.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/decreasing/line/_dash.py b/plotly/validators/ohlc/decreasing/line/_dash.py index 31d708295f..d0da5238e7 100644 --- a/plotly/validators/ohlc/decreasing/line/_dash.py +++ b/plotly/validators/ohlc/decreasing/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="ohlc.decreasing.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/ohlc/decreasing/line/_width.py b/plotly/validators/ohlc/decreasing/line/_width.py index b7bf0fcc75..2fe2dd6cb0 100644 --- a/plotly/validators/ohlc/decreasing/line/_width.py +++ b/plotly/validators/ohlc/decreasing/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="ohlc.decreasing.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/ohlc/hoverlabel/__init__.py b/plotly/validators/ohlc/hoverlabel/__init__.py index 5504c36e76..f4773f7cdd 100644 --- a/plotly/validators/ohlc/hoverlabel/__init__.py +++ b/plotly/validators/ohlc/hoverlabel/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._split import SplitValidator - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._split.SplitValidator", - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._split.SplitValidator", + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/ohlc/hoverlabel/_align.py b/plotly/validators/ohlc/hoverlabel/_align.py index bc7eda954c..67f862b32b 100644 --- a/plotly/validators/ohlc/hoverlabel/_align.py +++ b/plotly/validators/ohlc/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="ohlc.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/ohlc/hoverlabel/_alignsrc.py b/plotly/validators/ohlc/hoverlabel/_alignsrc.py index ec375c561a..dc1241f205 100644 --- a/plotly/validators/ohlc/hoverlabel/_alignsrc.py +++ b/plotly/validators/ohlc/hoverlabel/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="ohlc.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/_bgcolor.py b/plotly/validators/ohlc/hoverlabel/_bgcolor.py index 9a75cdeb06..1ddcb9b6d3 100644 --- a/plotly/validators/ohlc/hoverlabel/_bgcolor.py +++ b/plotly/validators/ohlc/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="ohlc.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py b/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py index 6b45c48e53..7fd5729f47 100644 --- a/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/ohlc/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="ohlc.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/_bordercolor.py b/plotly/validators/ohlc/hoverlabel/_bordercolor.py index 911d1748cf..dcc66827e8 100644 --- a/plotly/validators/ohlc/hoverlabel/_bordercolor.py +++ b/plotly/validators/ohlc/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="ohlc.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py b/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py index aad3319a42..f9df3bad49 100644 --- a/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/ohlc/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="ohlc.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/_font.py b/plotly/validators/ohlc/hoverlabel/_font.py index 95c54cc625..5344c2d46e 100644 --- a/plotly/validators/ohlc/hoverlabel/_font.py +++ b/plotly/validators/ohlc/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="ohlc.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/ohlc/hoverlabel/_namelength.py b/plotly/validators/ohlc/hoverlabel/_namelength.py index 7f9c1d44b3..75cf067e41 100644 --- a/plotly/validators/ohlc/hoverlabel/_namelength.py +++ b/plotly/validators/ohlc/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="ohlc.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py b/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py index dae5da745c..da07cc52a2 100644 --- a/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/ohlc/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="ohlc.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/_split.py b/plotly/validators/ohlc/hoverlabel/_split.py index fec36fbc9d..19d147d54b 100644 --- a/plotly/validators/ohlc/hoverlabel/_split.py +++ b/plotly/validators/ohlc/hoverlabel/_split.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SplitValidator(_plotly_utils.basevalidators.BooleanValidator): +class SplitValidator(_bv.BooleanValidator): def __init__(self, plotly_name="split", parent_name="ohlc.hoverlabel", **kwargs): - super(SplitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/__init__.py b/plotly/validators/ohlc/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/ohlc/hoverlabel/font/__init__.py +++ b/plotly/validators/ohlc/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/ohlc/hoverlabel/font/_color.py b/plotly/validators/ohlc/hoverlabel/font/_color.py index 651f3962ff..72c337a159 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_color.py +++ b/plotly/validators/ohlc/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py b/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py index ea45957a5b..9a694ab31d 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_family.py b/plotly/validators/ohlc/hoverlabel/font/_family.py index 069e3ad65e..8550acc816 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_family.py +++ b/plotly/validators/ohlc/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/ohlc/hoverlabel/font/_familysrc.py b/plotly/validators/ohlc/hoverlabel/font/_familysrc.py index bcca06d013..f07e40e62f 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_familysrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_lineposition.py b/plotly/validators/ohlc/hoverlabel/font/_lineposition.py index f714945af2..8954d12211 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_lineposition.py +++ b/plotly/validators/ohlc/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/ohlc/hoverlabel/font/_linepositionsrc.py b/plotly/validators/ohlc/hoverlabel/font/_linepositionsrc.py index 8295e4fb8f..e28daf392e 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="ohlc.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_shadow.py b/plotly/validators/ohlc/hoverlabel/font/_shadow.py index 9dcd667869..0fd4c835d0 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_shadow.py +++ b/plotly/validators/ohlc/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/ohlc/hoverlabel/font/_shadowsrc.py b/plotly/validators/ohlc/hoverlabel/font/_shadowsrc.py index 245a43baa5..4564d936e8 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_size.py b/plotly/validators/ohlc/hoverlabel/font/_size.py index ee715c4486..42e4f495af 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_size.py +++ b/plotly/validators/ohlc/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py b/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py index d55cf9b11b..1a59d4b6ee 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_style.py b/plotly/validators/ohlc/hoverlabel/font/_style.py index dc163fa92d..e6557ecb0b 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_style.py +++ b/plotly/validators/ohlc/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/ohlc/hoverlabel/font/_stylesrc.py b/plotly/validators/ohlc/hoverlabel/font/_stylesrc.py index bb8b5b3d4d..12cad89ddf 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_textcase.py b/plotly/validators/ohlc/hoverlabel/font/_textcase.py index 13dbb51284..79fb0c9650 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_textcase.py +++ b/plotly/validators/ohlc/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/ohlc/hoverlabel/font/_textcasesrc.py b/plotly/validators/ohlc/hoverlabel/font/_textcasesrc.py index 71eefd3592..2d0b18bd6f 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_variant.py b/plotly/validators/ohlc/hoverlabel/font/_variant.py index 6901823618..8db7fc1bba 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_variant.py +++ b/plotly/validators/ohlc/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/ohlc/hoverlabel/font/_variantsrc.py b/plotly/validators/ohlc/hoverlabel/font/_variantsrc.py index 532e222dd8..af340fca3f 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/hoverlabel/font/_weight.py b/plotly/validators/ohlc/hoverlabel/font/_weight.py index f539a52bcb..d2b8f97277 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_weight.py +++ b/plotly/validators/ohlc/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/ohlc/hoverlabel/font/_weightsrc.py b/plotly/validators/ohlc/hoverlabel/font/_weightsrc.py index 4a7af52e77..129dec8670 100644 --- a/plotly/validators/ohlc/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/ohlc/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="ohlc.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/ohlc/increasing/__init__.py b/plotly/validators/ohlc/increasing/__init__.py index 90c7f7b127..f7acb5b172 100644 --- a/plotly/validators/ohlc/increasing/__init__.py +++ b/plotly/validators/ohlc/increasing/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.LineValidator"]) diff --git a/plotly/validators/ohlc/increasing/_line.py b/plotly/validators/ohlc/increasing/_line.py index 2ed0a29d83..a8a566abe3 100644 --- a/plotly/validators/ohlc/increasing/_line.py +++ b/plotly/validators/ohlc/increasing/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="ohlc.increasing", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/ohlc/increasing/line/__init__.py b/plotly/validators/ohlc/increasing/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/ohlc/increasing/line/__init__.py +++ b/plotly/validators/ohlc/increasing/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/ohlc/increasing/line/_color.py b/plotly/validators/ohlc/increasing/line/_color.py index b1f75cb258..f08299f5bb 100644 --- a/plotly/validators/ohlc/increasing/line/_color.py +++ b/plotly/validators/ohlc/increasing/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="ohlc.increasing.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/increasing/line/_dash.py b/plotly/validators/ohlc/increasing/line/_dash.py index 9ee2a5a805..169c725383 100644 --- a/plotly/validators/ohlc/increasing/line/_dash.py +++ b/plotly/validators/ohlc/increasing/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="ohlc.increasing.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/ohlc/increasing/line/_width.py b/plotly/validators/ohlc/increasing/line/_width.py index be5368b686..7bb438da76 100644 --- a/plotly/validators/ohlc/increasing/line/_width.py +++ b/plotly/validators/ohlc/increasing/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="ohlc.increasing.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/ohlc/legendgrouptitle/__init__.py b/plotly/validators/ohlc/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/ohlc/legendgrouptitle/__init__.py +++ b/plotly/validators/ohlc/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/ohlc/legendgrouptitle/_font.py b/plotly/validators/ohlc/legendgrouptitle/_font.py index e6bc08065c..68f0bcfb3f 100644 --- a/plotly/validators/ohlc/legendgrouptitle/_font.py +++ b/plotly/validators/ohlc/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="ohlc.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/ohlc/legendgrouptitle/_text.py b/plotly/validators/ohlc/legendgrouptitle/_text.py index 1583995858..5c5ef49cf1 100644 --- a/plotly/validators/ohlc/legendgrouptitle/_text.py +++ b/plotly/validators/ohlc/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="ohlc.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/legendgrouptitle/font/__init__.py b/plotly/validators/ohlc/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/__init__.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_color.py b/plotly/validators/ohlc/legendgrouptitle/font/_color.py index 343a4f12ac..2238965ebd 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_color.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_family.py b/plotly/validators/ohlc/legendgrouptitle/font/_family.py index d1740416e5..2f19d70f04 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_family.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_lineposition.py b/plotly/validators/ohlc/legendgrouptitle/font/_lineposition.py index 06acd464a5..77801bc7aa 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="ohlc.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_shadow.py b/plotly/validators/ohlc/legendgrouptitle/font/_shadow.py index ac884973fb..06d8752757 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_size.py b/plotly/validators/ohlc/legendgrouptitle/font/_size.py index de1de19eec..5996f540eb 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_size.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_style.py b/plotly/validators/ohlc/legendgrouptitle/font/_style.py index d0273427ef..9534e1857d 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_style.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_textcase.py b/plotly/validators/ohlc/legendgrouptitle/font/_textcase.py index f31d5c3f70..405bf58ddb 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_variant.py b/plotly/validators/ohlc/legendgrouptitle/font/_variant.py index 8671485770..9b12f05a63 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_variant.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/ohlc/legendgrouptitle/font/_weight.py b/plotly/validators/ohlc/legendgrouptitle/font/_weight.py index c61784a48d..7c1c37311b 100644 --- a/plotly/validators/ohlc/legendgrouptitle/font/_weight.py +++ b/plotly/validators/ohlc/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="ohlc.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/ohlc/line/__init__.py b/plotly/validators/ohlc/line/__init__.py index e02935101f..a2136ec59f 100644 --- a/plotly/validators/ohlc/line/__init__.py +++ b/plotly/validators/ohlc/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._dash.DashValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._dash.DashValidator"] +) diff --git a/plotly/validators/ohlc/line/_dash.py b/plotly/validators/ohlc/line/_dash.py index ce5e067524..0bf88f706b 100644 --- a/plotly/validators/ohlc/line/_dash.py +++ b/plotly/validators/ohlc/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="ohlc.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/ohlc/line/_width.py b/plotly/validators/ohlc/line/_width.py index 3de1df879d..e1097dc275 100644 --- a/plotly/validators/ohlc/line/_width.py +++ b/plotly/validators/ohlc/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="ohlc.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/ohlc/stream/__init__.py b/plotly/validators/ohlc/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/ohlc/stream/__init__.py +++ b/plotly/validators/ohlc/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/ohlc/stream/_maxpoints.py b/plotly/validators/ohlc/stream/_maxpoints.py index 365e5701be..10ea374065 100644 --- a/plotly/validators/ohlc/stream/_maxpoints.py +++ b/plotly/validators/ohlc/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="ohlc.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/ohlc/stream/_token.py b/plotly/validators/ohlc/stream/_token.py index 6ee6e3c09a..efe63736e9 100644 --- a/plotly/validators/ohlc/stream/_token.py +++ b/plotly/validators/ohlc/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="ohlc.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/__init__.py b/plotly/validators/parcats/__init__.py index 6e95a64b31..59a4163d02 100644 --- a/plotly/validators/parcats/__init__.py +++ b/plotly/validators/parcats/__init__.py @@ -1,59 +1,32 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._tickfont import TickfontValidator - from ._stream import StreamValidator - from ._sortpaths import SortpathsValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._labelfont import LabelfontValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverinfo import HoverinfoValidator - from ._domain import DomainValidator - from ._dimensiondefaults import DimensiondefaultsValidator - from ._dimensions import DimensionsValidator - from ._countssrc import CountssrcValidator - from ._counts import CountsValidator - from ._bundlecolors import BundlecolorsValidator - from ._arrangement import ArrangementValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._tickfont.TickfontValidator", - "._stream.StreamValidator", - "._sortpaths.SortpathsValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._labelfont.LabelfontValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverinfo.HoverinfoValidator", - "._domain.DomainValidator", - "._dimensiondefaults.DimensiondefaultsValidator", - "._dimensions.DimensionsValidator", - "._countssrc.CountssrcValidator", - "._counts.CountsValidator", - "._bundlecolors.BundlecolorsValidator", - "._arrangement.ArrangementValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tickfont.TickfontValidator", + "._stream.StreamValidator", + "._sortpaths.SortpathsValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._labelfont.LabelfontValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._dimensiondefaults.DimensiondefaultsValidator", + "._dimensions.DimensionsValidator", + "._countssrc.CountssrcValidator", + "._counts.CountsValidator", + "._bundlecolors.BundlecolorsValidator", + "._arrangement.ArrangementValidator", + ], +) diff --git a/plotly/validators/parcats/_arrangement.py b/plotly/validators/parcats/_arrangement.py index c8175da421..e05f11b0af 100644 --- a/plotly/validators/parcats/_arrangement.py +++ b/plotly/validators/parcats/_arrangement.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrangementValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ArrangementValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="arrangement", parent_name="parcats", **kwargs): - super(ArrangementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["perpendicular", "freeform", "fixed"]), **kwargs, diff --git a/plotly/validators/parcats/_bundlecolors.py b/plotly/validators/parcats/_bundlecolors.py index a1c2f611b5..6823d24ea4 100644 --- a/plotly/validators/parcats/_bundlecolors.py +++ b/plotly/validators/parcats/_bundlecolors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BundlecolorsValidator(_plotly_utils.basevalidators.BooleanValidator): +class BundlecolorsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="bundlecolors", parent_name="parcats", **kwargs): - super(BundlecolorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcats/_counts.py b/plotly/validators/parcats/_counts.py index 1924953576..0d0655a5b3 100644 --- a/plotly/validators/parcats/_counts.py +++ b/plotly/validators/parcats/_counts.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountsValidator(_plotly_utils.basevalidators.NumberValidator): +class CountsValidator(_bv.NumberValidator): def __init__(self, plotly_name="counts", parent_name="parcats", **kwargs): - super(CountsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/parcats/_countssrc.py b/plotly/validators/parcats/_countssrc.py index e67d56d36a..93f361ca64 100644 --- a/plotly/validators/parcats/_countssrc.py +++ b/plotly/validators/parcats/_countssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CountssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="countssrc", parent_name="parcats", **kwargs): - super(CountssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/_dimensiondefaults.py b/plotly/validators/parcats/_dimensiondefaults.py index 0f92a6eaf9..e48cdcefbb 100644 --- a/plotly/validators/parcats/_dimensiondefaults.py +++ b/plotly/validators/parcats/_dimensiondefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DimensiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class DimensiondefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="dimensiondefaults", parent_name="parcats", **kwargs ): - super(DimensiondefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Dimension"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/parcats/_dimensions.py b/plotly/validators/parcats/_dimensions.py index 1c1885e0b5..2341c7f6e5 100644 --- a/plotly/validators/parcats/_dimensions.py +++ b/plotly/validators/parcats/_dimensions.py @@ -1,65 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class DimensionsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="dimensions", parent_name="parcats", **kwargs): - super(DimensionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Dimension"), data_docs=kwargs.pop( "data_docs", """ - categoryarray - Sets the order in which categories in this - dimension appear. Only has an effect if - `categoryorder` is set to "array". Used with - `categoryorder`. - categoryarraysrc - Sets the source reference on Chart Studio Cloud - for `categoryarray`. - categoryorder - Specifies the ordering logic for the categories - in the dimension. By default, plotly uses - "trace", which specifies the order that is - present in the data supplied. Set - `categoryorder` to *category ascending* or - *category descending* if order should be - determined by the alphanumerical order of the - category names. Set `categoryorder` to "array" - to derive the ordering from the attribute - `categoryarray`. If a category is not found in - the `categoryarray` array, the sorting behavior - for that attribute will be identical to the - "trace" mode. The unspecified categories will - follow the categories in `categoryarray`. - displayindex - The display index of dimension, from left to - right, zero indexed, defaults to dimension - index. - label - The shown name of the dimension. - ticktext - Sets alternative tick labels for the categories - in this dimension. Only has an effect if - `categoryorder` is set to "array". Should be an - array the same length as `categoryarray` Used - with `categoryorder`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - values - Dimension values. `values[n]` represents the - category value of the `n`th point in the - dataset, therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. """, ), **kwargs, diff --git a/plotly/validators/parcats/_domain.py b/plotly/validators/parcats/_domain.py index 51dc30225d..b52d17149d 100644 --- a/plotly/validators/parcats/_domain.py +++ b/plotly/validators/parcats/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="parcats", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this parcats trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this parcats trace . - x - Sets the horizontal domain of this parcats - trace (in plot fraction). - y - Sets the vertical domain of this parcats trace - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/parcats/_hoverinfo.py b/plotly/validators/parcats/_hoverinfo.py index 35d8e40d06..5584ae98fd 100644 --- a/plotly/validators/parcats/_hoverinfo.py +++ b/plotly/validators/parcats/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="parcats", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/parcats/_hoveron.py b/plotly/validators/parcats/_hoveron.py index 4fc02972c9..e7f637fcf1 100644 --- a/plotly/validators/parcats/_hoveron.py +++ b/plotly/validators/parcats/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HoveronValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="hoveron", parent_name="parcats", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["category", "color", "dimension"]), **kwargs, diff --git a/plotly/validators/parcats/_hovertemplate.py b/plotly/validators/parcats/_hovertemplate.py index bf8e6cc382..6b325fbf58 100644 --- a/plotly/validators/parcats/_hovertemplate.py +++ b/plotly/validators/parcats/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="parcats", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcats/_labelfont.py b/plotly/validators/parcats/_labelfont.py index 591599e26c..35607c415e 100644 --- a/plotly/validators/parcats/_labelfont.py +++ b/plotly/validators/parcats/_labelfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="labelfont", parent_name="parcats", **kwargs): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Labelfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcats/_legendgrouptitle.py b/plotly/validators/parcats/_legendgrouptitle.py index b3cb0262fd..6a1a424f43 100644 --- a/plotly/validators/parcats/_legendgrouptitle.py +++ b/plotly/validators/parcats/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="parcats", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/parcats/_legendwidth.py b/plotly/validators/parcats/_legendwidth.py index 8e6d18a307..29c30f8eff 100644 --- a/plotly/validators/parcats/_legendwidth.py +++ b/plotly/validators/parcats/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="parcats", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/_line.py b/plotly/validators/parcats/_line.py index 49d3faaeb3..ffb9ea2a1a 100644 --- a/plotly/validators/parcats/_line.py +++ b/plotly/validators/parcats/_line.py @@ -1,141 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="parcats", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color` is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color` is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color` is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets the line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `line.cmin` and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcats.line.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - This value here applies when hovering over - lines.Finally, the template string has access - to variables `count` and `probability`. - Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color` is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - shape - Sets the shape of the paths. If `linear`, paths - are composed of straight lines. If `hspline`, - paths are composed of horizontal curved splines - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color` is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/parcats/_meta.py b/plotly/validators/parcats/_meta.py index 229c939cb9..53d6b4422c 100644 --- a/plotly/validators/parcats/_meta.py +++ b/plotly/validators/parcats/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="parcats", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/parcats/_metasrc.py b/plotly/validators/parcats/_metasrc.py index 552faa3d5c..ccea62c7f4 100644 --- a/plotly/validators/parcats/_metasrc.py +++ b/plotly/validators/parcats/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="parcats", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/_name.py b/plotly/validators/parcats/_name.py index 6a6f771f47..95e93abf62 100644 --- a/plotly/validators/parcats/_name.py +++ b/plotly/validators/parcats/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="parcats", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcats/_sortpaths.py b/plotly/validators/parcats/_sortpaths.py index 467ac173b9..05a95783b9 100644 --- a/plotly/validators/parcats/_sortpaths.py +++ b/plotly/validators/parcats/_sortpaths.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SortpathsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SortpathsValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="sortpaths", parent_name="parcats", **kwargs): - super(SortpathsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["forward", "backward"]), **kwargs, diff --git a/plotly/validators/parcats/_stream.py b/plotly/validators/parcats/_stream.py index 331ecda7f2..57ed3749a1 100644 --- a/plotly/validators/parcats/_stream.py +++ b/plotly/validators/parcats/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="parcats", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/parcats/_tickfont.py b/plotly/validators/parcats/_tickfont.py index 5abae6a9d9..cc00cfd8db 100644 --- a/plotly/validators/parcats/_tickfont.py +++ b/plotly/validators/parcats/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="parcats", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcats/_uid.py b/plotly/validators/parcats/_uid.py index ae354803f8..447ef2f911 100644 --- a/plotly/validators/parcats/_uid.py +++ b/plotly/validators/parcats/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="parcats", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcats/_uirevision.py b/plotly/validators/parcats/_uirevision.py index cadb8a85a3..7f5eea847e 100644 --- a/plotly/validators/parcats/_uirevision.py +++ b/plotly/validators/parcats/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="parcats", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/_visible.py b/plotly/validators/parcats/_visible.py index 93a4e85aa8..e01e2e5c54 100644 --- a/plotly/validators/parcats/_visible.py +++ b/plotly/validators/parcats/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="parcats", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/parcats/dimension/__init__.py b/plotly/validators/parcats/dimension/__init__.py index 166d9faa32..976c1fcfe2 100644 --- a/plotly/validators/parcats/dimension/__init__.py +++ b/plotly/validators/parcats/dimension/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._label import LabelValidator - from ._displayindex import DisplayindexValidator - from ._categoryorder import CategoryorderValidator - from ._categoryarraysrc import CategoryarraysrcValidator - from ._categoryarray import CategoryarrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._label.LabelValidator", - "._displayindex.DisplayindexValidator", - "._categoryorder.CategoryorderValidator", - "._categoryarraysrc.CategoryarraysrcValidator", - "._categoryarray.CategoryarrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._label.LabelValidator", + "._displayindex.DisplayindexValidator", + "._categoryorder.CategoryorderValidator", + "._categoryarraysrc.CategoryarraysrcValidator", + "._categoryarray.CategoryarrayValidator", + ], +) diff --git a/plotly/validators/parcats/dimension/_categoryarray.py b/plotly/validators/parcats/dimension/_categoryarray.py index 85edeaa9b8..4cc682f178 100644 --- a/plotly/validators/parcats/dimension/_categoryarray.py +++ b/plotly/validators/parcats/dimension/_categoryarray.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CategoryarrayValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="categoryarray", parent_name="parcats.dimension", **kwargs ): - super(CategoryarrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_categoryarraysrc.py b/plotly/validators/parcats/dimension/_categoryarraysrc.py index 8b06b340e0..a93b94c5bf 100644 --- a/plotly/validators/parcats/dimension/_categoryarraysrc.py +++ b/plotly/validators/parcats/dimension/_categoryarraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CategoryarraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="categoryarraysrc", parent_name="parcats.dimension", **kwargs ): - super(CategoryarraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_categoryorder.py b/plotly/validators/parcats/dimension/_categoryorder.py index 09968442b3..302b371a1f 100644 --- a/plotly/validators/parcats/dimension/_categoryorder.py +++ b/plotly/validators/parcats/dimension/_categoryorder.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class CategoryorderValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="categoryorder", parent_name="parcats.dimension", **kwargs ): - super(CategoryorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/dimension/_displayindex.py b/plotly/validators/parcats/dimension/_displayindex.py index 559d125a56..385578e857 100644 --- a/plotly/validators/parcats/dimension/_displayindex.py +++ b/plotly/validators/parcats/dimension/_displayindex.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DisplayindexValidator(_plotly_utils.basevalidators.IntegerValidator): +class DisplayindexValidator(_bv.IntegerValidator): def __init__( self, plotly_name="displayindex", parent_name="parcats.dimension", **kwargs ): - super(DisplayindexValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_label.py b/plotly/validators/parcats/dimension/_label.py index 9840d38bdf..31bed83b57 100644 --- a/plotly/validators/parcats/dimension/_label.py +++ b/plotly/validators/parcats/dimension/_label.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__(self, plotly_name="label", parent_name="parcats.dimension", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_ticktext.py b/plotly/validators/parcats/dimension/_ticktext.py index 6c1d645c50..863fe9c43b 100644 --- a/plotly/validators/parcats/dimension/_ticktext.py +++ b/plotly/validators/parcats/dimension/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="parcats.dimension", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_ticktextsrc.py b/plotly/validators/parcats/dimension/_ticktextsrc.py index bd47fb8a3d..7bdbf2192f 100644 --- a/plotly/validators/parcats/dimension/_ticktextsrc.py +++ b/plotly/validators/parcats/dimension/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="parcats.dimension", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_values.py b/plotly/validators/parcats/dimension/_values.py index c4cc246d87..194f6d7136 100644 --- a/plotly/validators/parcats/dimension/_values.py +++ b/plotly/validators/parcats/dimension/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="parcats.dimension", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_valuessrc.py b/plotly/validators/parcats/dimension/_valuessrc.py index 187803a5bc..146ab73144 100644 --- a/plotly/validators/parcats/dimension/_valuessrc.py +++ b/plotly/validators/parcats/dimension/_valuessrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="valuessrc", parent_name="parcats.dimension", **kwargs ): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/dimension/_visible.py b/plotly/validators/parcats/dimension/_visible.py index 586aa9bff0..e44d20aa76 100644 --- a/plotly/validators/parcats/dimension/_visible.py +++ b/plotly/validators/parcats/dimension/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="parcats.dimension", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/domain/__init__.py b/plotly/validators/parcats/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/parcats/domain/__init__.py +++ b/plotly/validators/parcats/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/parcats/domain/_column.py b/plotly/validators/parcats/domain/_column.py index 0f0090ca35..7d09da28bb 100644 --- a/plotly/validators/parcats/domain/_column.py +++ b/plotly/validators/parcats/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="parcats.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/domain/_row.py b/plotly/validators/parcats/domain/_row.py index 3bd6f4fc95..9370c472cd 100644 --- a/plotly/validators/parcats/domain/_row.py +++ b/plotly/validators/parcats/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="parcats.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/domain/_x.py b/plotly/validators/parcats/domain/_x.py index 94b3271d4d..aec2ed5e28 100644 --- a/plotly/validators/parcats/domain/_x.py +++ b/plotly/validators/parcats/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="parcats.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcats/domain/_y.py b/plotly/validators/parcats/domain/_y.py index 12b36630b0..644596dce9 100644 --- a/plotly/validators/parcats/domain/_y.py +++ b/plotly/validators/parcats/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="parcats.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcats/labelfont/__init__.py b/plotly/validators/parcats/labelfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcats/labelfont/__init__.py +++ b/plotly/validators/parcats/labelfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcats/labelfont/_color.py b/plotly/validators/parcats/labelfont/_color.py index 1cf71fd380..7085fc6a48 100644 --- a/plotly/validators/parcats/labelfont/_color.py +++ b/plotly/validators/parcats/labelfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="parcats.labelfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/labelfont/_family.py b/plotly/validators/parcats/labelfont/_family.py index d8419f848a..00835038d3 100644 --- a/plotly/validators/parcats/labelfont/_family.py +++ b/plotly/validators/parcats/labelfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="parcats.labelfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/labelfont/_lineposition.py b/plotly/validators/parcats/labelfont/_lineposition.py index fbdbeda09e..25e3063eb2 100644 --- a/plotly/validators/parcats/labelfont/_lineposition.py +++ b/plotly/validators/parcats/labelfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcats.labelfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcats/labelfont/_shadow.py b/plotly/validators/parcats/labelfont/_shadow.py index 7530a3dc4c..6ae59f415b 100644 --- a/plotly/validators/parcats/labelfont/_shadow.py +++ b/plotly/validators/parcats/labelfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="parcats.labelfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/labelfont/_size.py b/plotly/validators/parcats/labelfont/_size.py index cef22bb537..43c6b02069 100644 --- a/plotly/validators/parcats/labelfont/_size.py +++ b/plotly/validators/parcats/labelfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="parcats.labelfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcats/labelfont/_style.py b/plotly/validators/parcats/labelfont/_style.py index 013ec79926..f2cb14505f 100644 --- a/plotly/validators/parcats/labelfont/_style.py +++ b/plotly/validators/parcats/labelfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="parcats.labelfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcats/labelfont/_textcase.py b/plotly/validators/parcats/labelfont/_textcase.py index 6166b0af89..df82fa8d88 100644 --- a/plotly/validators/parcats/labelfont/_textcase.py +++ b/plotly/validators/parcats/labelfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcats.labelfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcats/labelfont/_variant.py b/plotly/validators/parcats/labelfont/_variant.py index 8ccc6ddbb5..fc220ab189 100644 --- a/plotly/validators/parcats/labelfont/_variant.py +++ b/plotly/validators/parcats/labelfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcats.labelfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/labelfont/_weight.py b/plotly/validators/parcats/labelfont/_weight.py index 5089c36209..e2294f0347 100644 --- a/plotly/validators/parcats/labelfont/_weight.py +++ b/plotly/validators/parcats/labelfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="parcats.labelfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcats/legendgrouptitle/__init__.py b/plotly/validators/parcats/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/parcats/legendgrouptitle/__init__.py +++ b/plotly/validators/parcats/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/parcats/legendgrouptitle/_font.py b/plotly/validators/parcats/legendgrouptitle/_font.py index c5f2d716d5..c5b62af4a4 100644 --- a/plotly/validators/parcats/legendgrouptitle/_font.py +++ b/plotly/validators/parcats/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="parcats.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcats/legendgrouptitle/_text.py b/plotly/validators/parcats/legendgrouptitle/_text.py index a37d521c33..2ff8f64e0a 100644 --- a/plotly/validators/parcats/legendgrouptitle/_text.py +++ b/plotly/validators/parcats/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="parcats.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcats/legendgrouptitle/font/__init__.py b/plotly/validators/parcats/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/__init__.py +++ b/plotly/validators/parcats/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcats/legendgrouptitle/font/_color.py b/plotly/validators/parcats/legendgrouptitle/font/_color.py index b9e1d70342..dc4ad9a9bd 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_color.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcats.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcats/legendgrouptitle/font/_family.py b/plotly/validators/parcats/legendgrouptitle/font/_family.py index 9a37ebacee..22bc43e1cb 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_family.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcats.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/legendgrouptitle/font/_lineposition.py b/plotly/validators/parcats/legendgrouptitle/font/_lineposition.py index f4ad1406b5..6cb71df830 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcats.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcats/legendgrouptitle/font/_shadow.py b/plotly/validators/parcats/legendgrouptitle/font/_shadow.py index 79fa9a5286..75e743ead9 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcats.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcats/legendgrouptitle/font/_size.py b/plotly/validators/parcats/legendgrouptitle/font/_size.py index c8d34f8604..fc8d74c530 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_size.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcats.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcats/legendgrouptitle/font/_style.py b/plotly/validators/parcats/legendgrouptitle/font/_style.py index ddf7893202..8a4f7ae659 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_style.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcats.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcats/legendgrouptitle/font/_textcase.py b/plotly/validators/parcats/legendgrouptitle/font/_textcase.py index 103103a76a..5cb0a294de 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcats.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcats/legendgrouptitle/font/_variant.py b/plotly/validators/parcats/legendgrouptitle/font/_variant.py index 7f2af78351..8f6ff556ca 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_variant.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcats.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/legendgrouptitle/font/_weight.py b/plotly/validators/parcats/legendgrouptitle/font/_weight.py index c76add8051..f100a16be0 100644 --- a/plotly/validators/parcats/legendgrouptitle/font/_weight.py +++ b/plotly/validators/parcats/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcats.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcats/line/__init__.py b/plotly/validators/parcats/line/__init__.py index a5677cc3e2..4d382fb890 100644 --- a/plotly/validators/parcats/line/__init__.py +++ b/plotly/validators/parcats/line/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._shape import ShapeValidator - from ._reversescale import ReversescaleValidator - from ._hovertemplate import HovertemplateValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._shape.ShapeValidator", - "._reversescale.ReversescaleValidator", - "._hovertemplate.HovertemplateValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._shape.ShapeValidator", + "._reversescale.ReversescaleValidator", + "._hovertemplate.HovertemplateValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/parcats/line/_autocolorscale.py b/plotly/validators/parcats/line/_autocolorscale.py index 0f17beae89..b41f8da89e 100644 --- a/plotly/validators/parcats/line/_autocolorscale.py +++ b/plotly/validators/parcats/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="parcats.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/parcats/line/_cauto.py b/plotly/validators/parcats/line/_cauto.py index 5441c8a802..67138d6491 100644 --- a/plotly/validators/parcats/line/_cauto.py +++ b/plotly/validators/parcats/line/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="parcats.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/parcats/line/_cmax.py b/plotly/validators/parcats/line/_cmax.py index 847bd8cdab..8398f4ee7a 100644 --- a/plotly/validators/parcats/line/_cmax.py +++ b/plotly/validators/parcats/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="parcats.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/parcats/line/_cmid.py b/plotly/validators/parcats/line/_cmid.py index 6236b0ddf4..ffc38be97c 100644 --- a/plotly/validators/parcats/line/_cmid.py +++ b/plotly/validators/parcats/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="parcats.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/parcats/line/_cmin.py b/plotly/validators/parcats/line/_cmin.py index f36ffd0048..5cde1e392a 100644 --- a/plotly/validators/parcats/line/_cmin.py +++ b/plotly/validators/parcats/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="parcats.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/parcats/line/_color.py b/plotly/validators/parcats/line/_color.py index c682c57cc6..26929ba4e7 100644 --- a/plotly/validators/parcats/line/_color.py +++ b/plotly/validators/parcats/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="parcats.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop("colorscale_path", "parcats.line.colorscale"), diff --git a/plotly/validators/parcats/line/_coloraxis.py b/plotly/validators/parcats/line/_coloraxis.py index 5c7c89e6f7..bdebc95dc8 100644 --- a/plotly/validators/parcats/line/_coloraxis.py +++ b/plotly/validators/parcats/line/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="parcats.line", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/parcats/line/_colorbar.py b/plotly/validators/parcats/line/_colorbar.py index 4a9a1d0d2d..1f1897dafd 100644 --- a/plotly/validators/parcats/line/_colorbar.py +++ b/plotly/validators/parcats/line/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="parcats.line", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcats - .line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcats.line.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - parcats.line.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcats.line.color - bar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/parcats/line/_colorscale.py b/plotly/validators/parcats/line/_colorscale.py index bc14d3dc06..a164a2e8a8 100644 --- a/plotly/validators/parcats/line/_colorscale.py +++ b/plotly/validators/parcats/line/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="parcats.line", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/parcats/line/_colorsrc.py b/plotly/validators/parcats/line/_colorsrc.py index 672e2fe250..20dd25217f 100644 --- a/plotly/validators/parcats/line/_colorsrc.py +++ b/plotly/validators/parcats/line/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="parcats.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/line/_hovertemplate.py b/plotly/validators/parcats/line/_hovertemplate.py index faee02b33d..0403a11e00 100644 --- a/plotly/validators/parcats/line/_hovertemplate.py +++ b/plotly/validators/parcats/line/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="parcats.line", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcats/line/_reversescale.py b/plotly/validators/parcats/line/_reversescale.py index 6b90d879ea..a57beff23c 100644 --- a/plotly/validators/parcats/line/_reversescale.py +++ b/plotly/validators/parcats/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="parcats.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcats/line/_shape.py b/plotly/validators/parcats/line/_shape.py index 953a856105..7e58324a29 100644 --- a/plotly/validators/parcats/line/_shape.py +++ b/plotly/validators/parcats/line/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="parcats.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["linear", "hspline"]), **kwargs, diff --git a/plotly/validators/parcats/line/_showscale.py b/plotly/validators/parcats/line/_showscale.py index 9680d114d2..e10333d5cf 100644 --- a/plotly/validators/parcats/line/_showscale.py +++ b/plotly/validators/parcats/line/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="parcats.line", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/__init__.py b/plotly/validators/parcats/line/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/parcats/line/colorbar/__init__.py +++ b/plotly/validators/parcats/line/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/parcats/line/colorbar/_bgcolor.py b/plotly/validators/parcats/line/colorbar/_bgcolor.py index eb750756c9..546b5af38e 100644 --- a/plotly/validators/parcats/line/colorbar/_bgcolor.py +++ b/plotly/validators/parcats/line/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="parcats.line.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_bordercolor.py b/plotly/validators/parcats/line/colorbar/_bordercolor.py index da5694c062..ab286f4ecb 100644 --- a/plotly/validators/parcats/line/colorbar/_bordercolor.py +++ b/plotly/validators/parcats/line/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="parcats.line.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_borderwidth.py b/plotly/validators/parcats/line/colorbar/_borderwidth.py index f46671833c..affadeed45 100644 --- a/plotly/validators/parcats/line/colorbar/_borderwidth.py +++ b/plotly/validators/parcats/line/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="parcats.line.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_dtick.py b/plotly/validators/parcats/line/colorbar/_dtick.py index b747c42782..b11fbdbb03 100644 --- a/plotly/validators/parcats/line/colorbar/_dtick.py +++ b/plotly/validators/parcats/line/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="parcats.line.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_exponentformat.py b/plotly/validators/parcats/line/colorbar/_exponentformat.py index 2450552137..3612cd8878 100644 --- a/plotly/validators/parcats/line/colorbar/_exponentformat.py +++ b/plotly/validators/parcats/line/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="parcats.line.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_labelalias.py b/plotly/validators/parcats/line/colorbar/_labelalias.py index 76a4df3929..67b8121e8b 100644 --- a/plotly/validators/parcats/line/colorbar/_labelalias.py +++ b/plotly/validators/parcats/line/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="parcats.line.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_len.py b/plotly/validators/parcats/line/colorbar/_len.py index 31fae716b2..4125cc7afd 100644 --- a/plotly/validators/parcats/line/colorbar/_len.py +++ b/plotly/validators/parcats/line/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="parcats.line.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_lenmode.py b/plotly/validators/parcats/line/colorbar/_lenmode.py index df7d6e6609..2b9f5fbe87 100644 --- a/plotly/validators/parcats/line/colorbar/_lenmode.py +++ b/plotly/validators/parcats/line/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="parcats.line.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_minexponent.py b/plotly/validators/parcats/line/colorbar/_minexponent.py index b2c268a975..fe6b95ab76 100644 --- a/plotly/validators/parcats/line/colorbar/_minexponent.py +++ b/plotly/validators/parcats/line/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="parcats.line.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_nticks.py b/plotly/validators/parcats/line/colorbar/_nticks.py index 62a845c749..fdbf417809 100644 --- a/plotly/validators/parcats/line/colorbar/_nticks.py +++ b/plotly/validators/parcats/line/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="parcats.line.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_orientation.py b/plotly/validators/parcats/line/colorbar/_orientation.py index c3126fb0b0..d97bbe40c3 100644 --- a/plotly/validators/parcats/line/colorbar/_orientation.py +++ b/plotly/validators/parcats/line/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="parcats.line.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_outlinecolor.py b/plotly/validators/parcats/line/colorbar/_outlinecolor.py index 34a452b04f..0be6b4217a 100644 --- a/plotly/validators/parcats/line/colorbar/_outlinecolor.py +++ b/plotly/validators/parcats/line/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="parcats.line.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_outlinewidth.py b/plotly/validators/parcats/line/colorbar/_outlinewidth.py index d7d1a86a60..78d5566c79 100644 --- a/plotly/validators/parcats/line/colorbar/_outlinewidth.py +++ b/plotly/validators/parcats/line/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="parcats.line.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_separatethousands.py b/plotly/validators/parcats/line/colorbar/_separatethousands.py index cd0c24e6cf..28d5bb92c8 100644 --- a/plotly/validators/parcats/line/colorbar/_separatethousands.py +++ b/plotly/validators/parcats/line/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="parcats.line.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_showexponent.py b/plotly/validators/parcats/line/colorbar/_showexponent.py index 7b73c95bd1..7b1fc4f0b5 100644 --- a/plotly/validators/parcats/line/colorbar/_showexponent.py +++ b/plotly/validators/parcats/line/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="parcats.line.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_showticklabels.py b/plotly/validators/parcats/line/colorbar/_showticklabels.py index df6e5b291c..a5aadfa3ed 100644 --- a/plotly/validators/parcats/line/colorbar/_showticklabels.py +++ b/plotly/validators/parcats/line/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="parcats.line.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_showtickprefix.py b/plotly/validators/parcats/line/colorbar/_showtickprefix.py index 87b00c0136..a39fb381f2 100644 --- a/plotly/validators/parcats/line/colorbar/_showtickprefix.py +++ b/plotly/validators/parcats/line/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="parcats.line.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_showticksuffix.py b/plotly/validators/parcats/line/colorbar/_showticksuffix.py index e88e143a9f..8dc4e8e4f7 100644 --- a/plotly/validators/parcats/line/colorbar/_showticksuffix.py +++ b/plotly/validators/parcats/line/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="parcats.line.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_thickness.py b/plotly/validators/parcats/line/colorbar/_thickness.py index aedb5cb875..209196f50c 100644 --- a/plotly/validators/parcats/line/colorbar/_thickness.py +++ b/plotly/validators/parcats/line/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="parcats.line.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_thicknessmode.py b/plotly/validators/parcats/line/colorbar/_thicknessmode.py index d3ee8249d7..9b1cea94e7 100644 --- a/plotly/validators/parcats/line/colorbar/_thicknessmode.py +++ b/plotly/validators/parcats/line/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="parcats.line.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_tick0.py b/plotly/validators/parcats/line/colorbar/_tick0.py index 0f5555f1a6..776fb60e4a 100644 --- a/plotly/validators/parcats/line/colorbar/_tick0.py +++ b/plotly/validators/parcats/line/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="parcats.line.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_tickangle.py b/plotly/validators/parcats/line/colorbar/_tickangle.py index 9d7f7a699e..0544d175cd 100644 --- a/plotly/validators/parcats/line/colorbar/_tickangle.py +++ b/plotly/validators/parcats/line/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="parcats.line.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_tickcolor.py b/plotly/validators/parcats/line/colorbar/_tickcolor.py index 4791447d97..f6ddf664a1 100644 --- a/plotly/validators/parcats/line/colorbar/_tickcolor.py +++ b/plotly/validators/parcats/line/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="parcats.line.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_tickfont.py b/plotly/validators/parcats/line/colorbar/_tickfont.py index 935b7acfdb..19b83cd56f 100644 --- a/plotly/validators/parcats/line/colorbar/_tickfont.py +++ b/plotly/validators/parcats/line/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="parcats.line.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_tickformat.py b/plotly/validators/parcats/line/colorbar/_tickformat.py index c7a02cbfb5..656bfd477f 100644 --- a/plotly/validators/parcats/line/colorbar/_tickformat.py +++ b/plotly/validators/parcats/line/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="parcats.line.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py b/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py index fa51128464..f04c39a0ea 100644 --- a/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/parcats/line/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="parcats.line.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/parcats/line/colorbar/_tickformatstops.py b/plotly/validators/parcats/line/colorbar/_tickformatstops.py index 09fa9b683e..00ff1e6430 100644 --- a/plotly/validators/parcats/line/colorbar/_tickformatstops.py +++ b/plotly/validators/parcats/line/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="parcats.line.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_ticklabeloverflow.py b/plotly/validators/parcats/line/colorbar/_ticklabeloverflow.py index 91d9907607..0786876fea 100644 --- a/plotly/validators/parcats/line/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/parcats/line/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="parcats.line.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_ticklabelposition.py b/plotly/validators/parcats/line/colorbar/_ticklabelposition.py index ac9e417af6..75b3a523df 100644 --- a/plotly/validators/parcats/line/colorbar/_ticklabelposition.py +++ b/plotly/validators/parcats/line/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="parcats.line.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/line/colorbar/_ticklabelstep.py b/plotly/validators/parcats/line/colorbar/_ticklabelstep.py index 18faa76f91..f245f20f31 100644 --- a/plotly/validators/parcats/line/colorbar/_ticklabelstep.py +++ b/plotly/validators/parcats/line/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="parcats.line.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_ticklen.py b/plotly/validators/parcats/line/colorbar/_ticklen.py index 6aae35621d..2910be0830 100644 --- a/plotly/validators/parcats/line/colorbar/_ticklen.py +++ b/plotly/validators/parcats/line/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="parcats.line.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_tickmode.py b/plotly/validators/parcats/line/colorbar/_tickmode.py index 21cebcc4cf..74748fe563 100644 --- a/plotly/validators/parcats/line/colorbar/_tickmode.py +++ b/plotly/validators/parcats/line/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="parcats.line.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/parcats/line/colorbar/_tickprefix.py b/plotly/validators/parcats/line/colorbar/_tickprefix.py index 33e3f94c4b..39ebfd0174 100644 --- a/plotly/validators/parcats/line/colorbar/_tickprefix.py +++ b/plotly/validators/parcats/line/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="parcats.line.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_ticks.py b/plotly/validators/parcats/line/colorbar/_ticks.py index e33116c60a..2d41cfaec9 100644 --- a/plotly/validators/parcats/line/colorbar/_ticks.py +++ b/plotly/validators/parcats/line/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="parcats.line.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_ticksuffix.py b/plotly/validators/parcats/line/colorbar/_ticksuffix.py index d80f228fc1..b7f2bd523f 100644 --- a/plotly/validators/parcats/line/colorbar/_ticksuffix.py +++ b/plotly/validators/parcats/line/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="parcats.line.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_ticktext.py b/plotly/validators/parcats/line/colorbar/_ticktext.py index 05fe7fa99e..59b8889cc6 100644 --- a/plotly/validators/parcats/line/colorbar/_ticktext.py +++ b/plotly/validators/parcats/line/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="parcats.line.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_ticktextsrc.py b/plotly/validators/parcats/line/colorbar/_ticktextsrc.py index 60711dac2d..e09213b4f6 100644 --- a/plotly/validators/parcats/line/colorbar/_ticktextsrc.py +++ b/plotly/validators/parcats/line/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="parcats.line.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_tickvals.py b/plotly/validators/parcats/line/colorbar/_tickvals.py index 87ddd2de60..c9a5c3858f 100644 --- a/plotly/validators/parcats/line/colorbar/_tickvals.py +++ b/plotly/validators/parcats/line/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="parcats.line.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_tickvalssrc.py b/plotly/validators/parcats/line/colorbar/_tickvalssrc.py index ee8acd9ced..f1eedfe68f 100644 --- a/plotly/validators/parcats/line/colorbar/_tickvalssrc.py +++ b/plotly/validators/parcats/line/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="parcats.line.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_tickwidth.py b/plotly/validators/parcats/line/colorbar/_tickwidth.py index 4ef0dc5f13..6177bdc63b 100644 --- a/plotly/validators/parcats/line/colorbar/_tickwidth.py +++ b/plotly/validators/parcats/line/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="parcats.line.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_title.py b/plotly/validators/parcats/line/colorbar/_title.py index c90e94e47c..2362849613 100644 --- a/plotly/validators/parcats/line/colorbar/_title.py +++ b/plotly/validators/parcats/line/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="parcats.line.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_x.py b/plotly/validators/parcats/line/colorbar/_x.py index e49d6edf69..5af71d9f66 100644 --- a/plotly/validators/parcats/line/colorbar/_x.py +++ b/plotly/validators/parcats/line/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="parcats.line.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_xanchor.py b/plotly/validators/parcats/line/colorbar/_xanchor.py index e57be71a85..36059869d9 100644 --- a/plotly/validators/parcats/line/colorbar/_xanchor.py +++ b/plotly/validators/parcats/line/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="parcats.line.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_xpad.py b/plotly/validators/parcats/line/colorbar/_xpad.py index bf7929c1cd..4542035883 100644 --- a/plotly/validators/parcats/line/colorbar/_xpad.py +++ b/plotly/validators/parcats/line/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="parcats.line.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_xref.py b/plotly/validators/parcats/line/colorbar/_xref.py index efc88522fb..c788c80f29 100644 --- a/plotly/validators/parcats/line/colorbar/_xref.py +++ b/plotly/validators/parcats/line/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="parcats.line.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_y.py b/plotly/validators/parcats/line/colorbar/_y.py index 82b78b6a77..3b46da0cab 100644 --- a/plotly/validators/parcats/line/colorbar/_y.py +++ b/plotly/validators/parcats/line/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="parcats.line.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/_yanchor.py b/plotly/validators/parcats/line/colorbar/_yanchor.py index d0444859f1..ac344cd860 100644 --- a/plotly/validators/parcats/line/colorbar/_yanchor.py +++ b/plotly/validators/parcats/line/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="parcats.line.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_ypad.py b/plotly/validators/parcats/line/colorbar/_ypad.py index f95b70ae8c..6b2d81b666 100644 --- a/plotly/validators/parcats/line/colorbar/_ypad.py +++ b/plotly/validators/parcats/line/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="parcats.line.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/_yref.py b/plotly/validators/parcats/line/colorbar/_yref.py index 1d9bc92b8a..7db9485652 100644 --- a/plotly/validators/parcats/line/colorbar/_yref.py +++ b/plotly/validators/parcats/line/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="parcats.line.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/tickfont/__init__.py b/plotly/validators/parcats/line/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/__init__.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_color.py b/plotly/validators/parcats/line/colorbar/tickfont/_color.py index df7e025705..2669a4b214 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_color.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_family.py b/plotly/validators/parcats/line/colorbar/tickfont/_family.py index 4eae253200..37c2710ba1 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_family.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_lineposition.py b/plotly/validators/parcats/line/colorbar/tickfont/_lineposition.py index 95c3b3cea0..60d88120eb 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_shadow.py b/plotly/validators/parcats/line/colorbar/tickfont/_shadow.py index 67e1f691c4..39e9c0477b 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_shadow.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_size.py b/plotly/validators/parcats/line/colorbar/tickfont/_size.py index 0d4adb86b8..c27f4ad373 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_size.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcats.line.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_style.py b/plotly/validators/parcats/line/colorbar/tickfont/_style.py index 884bcdd367..96bdaf30ae 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_style.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_textcase.py b/plotly/validators/parcats/line/colorbar/tickfont/_textcase.py index 9b54a87efd..8277f2dbb9 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_textcase.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_variant.py b/plotly/validators/parcats/line/colorbar/tickfont/_variant.py index 9ee38eb2bb..fc32147594 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_variant.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/line/colorbar/tickfont/_weight.py b/plotly/validators/parcats/line/colorbar/tickfont/_weight.py index 52ad471990..6e453d5525 100644 --- a/plotly/validators/parcats/line/colorbar/tickfont/_weight.py +++ b/plotly/validators/parcats/line/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcats.line.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py b/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/parcats/line/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py index d0d0db0c59..38bf7c77e0 100644 --- a/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/parcats/line/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="parcats.line.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py b/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py index 57df853fae..e8fa29d114 100644 --- a/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/parcats/line/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="parcats.line.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py b/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py index af8a44de11..c53686ae5e 100644 --- a/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py +++ b/plotly/validators/parcats/line/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="parcats.line.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py index b021492b8f..b6017693ce 100644 --- a/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/parcats/line/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="parcats.line.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py b/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py index 0940425c3e..d74e511cd9 100644 --- a/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py +++ b/plotly/validators/parcats/line/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="parcats.line.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/title/__init__.py b/plotly/validators/parcats/line/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/parcats/line/colorbar/title/__init__.py +++ b/plotly/validators/parcats/line/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/parcats/line/colorbar/title/_font.py b/plotly/validators/parcats/line/colorbar/title/_font.py index f3c3c9ce63..749d4f2884 100644 --- a/plotly/validators/parcats/line/colorbar/title/_font.py +++ b/plotly/validators/parcats/line/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="parcats.line.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/title/_side.py b/plotly/validators/parcats/line/colorbar/title/_side.py index 281c74a94f..5c1c19a4d7 100644 --- a/plotly/validators/parcats/line/colorbar/title/_side.py +++ b/plotly/validators/parcats/line/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="parcats.line.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/title/_text.py b/plotly/validators/parcats/line/colorbar/title/_text.py index 120207bdc9..0532c353bb 100644 --- a/plotly/validators/parcats/line/colorbar/title/_text.py +++ b/plotly/validators/parcats/line/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="parcats.line.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/title/font/__init__.py b/plotly/validators/parcats/line/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/__init__.py +++ b/plotly/validators/parcats/line/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcats/line/colorbar/title/font/_color.py b/plotly/validators/parcats/line/colorbar/title/font/_color.py index f709a78792..7f8bc0602d 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_color.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/title/font/_family.py b/plotly/validators/parcats/line/colorbar/title/font/_family.py index d466e80bbd..7f171f82c3 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_family.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/line/colorbar/title/font/_lineposition.py b/plotly/validators/parcats/line/colorbar/title/font/_lineposition.py index f0c9f6484f..fc1b9a14f2 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_lineposition.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcats/line/colorbar/title/font/_shadow.py b/plotly/validators/parcats/line/colorbar/title/font/_shadow.py index be4b53d56f..58ee5015f3 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_shadow.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcats/line/colorbar/title/font/_size.py b/plotly/validators/parcats/line/colorbar/title/font/_size.py index bbe499555d..3521fc6d0c 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_size.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/title/font/_style.py b/plotly/validators/parcats/line/colorbar/title/font/_style.py index 396b30e7ed..a5d524a422 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_style.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/title/font/_textcase.py b/plotly/validators/parcats/line/colorbar/title/font/_textcase.py index 3eff304086..2cdbcec6f9 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_textcase.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcats/line/colorbar/title/font/_variant.py b/plotly/validators/parcats/line/colorbar/title/font/_variant.py index 64972b7d74..7da34047c1 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_variant.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/line/colorbar/title/font/_weight.py b/plotly/validators/parcats/line/colorbar/title/font/_weight.py index 8f1ceecc24..073a261afd 100644 --- a/plotly/validators/parcats/line/colorbar/title/font/_weight.py +++ b/plotly/validators/parcats/line/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcats.line.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcats/stream/__init__.py b/plotly/validators/parcats/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/parcats/stream/__init__.py +++ b/plotly/validators/parcats/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/parcats/stream/_maxpoints.py b/plotly/validators/parcats/stream/_maxpoints.py index 1c9b05cf83..f68bf4545f 100644 --- a/plotly/validators/parcats/stream/_maxpoints.py +++ b/plotly/validators/parcats/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="parcats.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/parcats/stream/_token.py b/plotly/validators/parcats/stream/_token.py index 1050a23907..da3a66f892 100644 --- a/plotly/validators/parcats/stream/_token.py +++ b/plotly/validators/parcats/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="parcats.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/tickfont/__init__.py b/plotly/validators/parcats/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcats/tickfont/__init__.py +++ b/plotly/validators/parcats/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcats/tickfont/_color.py b/plotly/validators/parcats/tickfont/_color.py index 47f1f0acb6..6655f2bfca 100644 --- a/plotly/validators/parcats/tickfont/_color.py +++ b/plotly/validators/parcats/tickfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="parcats.tickfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/tickfont/_family.py b/plotly/validators/parcats/tickfont/_family.py index 2f164710e6..ff4f8e449b 100644 --- a/plotly/validators/parcats/tickfont/_family.py +++ b/plotly/validators/parcats/tickfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="parcats.tickfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcats/tickfont/_lineposition.py b/plotly/validators/parcats/tickfont/_lineposition.py index 4515876ee9..f39d0069aa 100644 --- a/plotly/validators/parcats/tickfont/_lineposition.py +++ b/plotly/validators/parcats/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcats.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcats/tickfont/_shadow.py b/plotly/validators/parcats/tickfont/_shadow.py index 486e24acbb..e38d1dff9e 100644 --- a/plotly/validators/parcats/tickfont/_shadow.py +++ b/plotly/validators/parcats/tickfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="parcats.tickfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcats/tickfont/_size.py b/plotly/validators/parcats/tickfont/_size.py index 7203dc5be1..9fa815fc9b 100644 --- a/plotly/validators/parcats/tickfont/_size.py +++ b/plotly/validators/parcats/tickfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="parcats.tickfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcats/tickfont/_style.py b/plotly/validators/parcats/tickfont/_style.py index 35135ffca0..5b45a48083 100644 --- a/plotly/validators/parcats/tickfont/_style.py +++ b/plotly/validators/parcats/tickfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="parcats.tickfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcats/tickfont/_textcase.py b/plotly/validators/parcats/tickfont/_textcase.py index be392db3ed..33ba0fe26f 100644 --- a/plotly/validators/parcats/tickfont/_textcase.py +++ b/plotly/validators/parcats/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcats.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcats/tickfont/_variant.py b/plotly/validators/parcats/tickfont/_variant.py index e7973e886f..1c00186ca6 100644 --- a/plotly/validators/parcats/tickfont/_variant.py +++ b/plotly/validators/parcats/tickfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="parcats.tickfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcats/tickfont/_weight.py b/plotly/validators/parcats/tickfont/_weight.py index 6550762ca2..4ec881a5e2 100644 --- a/plotly/validators/parcats/tickfont/_weight.py +++ b/plotly/validators/parcats/tickfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="parcats.tickfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/__init__.py b/plotly/validators/parcoords/__init__.py index 9fb0212462..ff07cb0370 100644 --- a/plotly/validators/parcoords/__init__.py +++ b/plotly/validators/parcoords/__init__.py @@ -1,63 +1,34 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._tickfont import TickfontValidator - from ._stream import StreamValidator - from ._rangefont import RangefontValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._labelside import LabelsideValidator - from ._labelfont import LabelfontValidator - from ._labelangle import LabelangleValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._domain import DomainValidator - from ._dimensiondefaults import DimensiondefaultsValidator - from ._dimensions import DimensionsValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._tickfont.TickfontValidator", - "._stream.StreamValidator", - "._rangefont.RangefontValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._labelside.LabelsideValidator", - "._labelfont.LabelfontValidator", - "._labelangle.LabelangleValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._domain.DomainValidator", - "._dimensiondefaults.DimensiondefaultsValidator", - "._dimensions.DimensionsValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tickfont.TickfontValidator", + "._stream.StreamValidator", + "._rangefont.RangefontValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._labelside.LabelsideValidator", + "._labelfont.LabelfontValidator", + "._labelangle.LabelangleValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._domain.DomainValidator", + "._dimensiondefaults.DimensiondefaultsValidator", + "._dimensions.DimensionsValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + ], +) diff --git a/plotly/validators/parcoords/_customdata.py b/plotly/validators/parcoords/_customdata.py index 1ef160fac3..986b72a236 100644 --- a/plotly/validators/parcoords/_customdata.py +++ b/plotly/validators/parcoords/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="parcoords", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcoords/_customdatasrc.py b/plotly/validators/parcoords/_customdatasrc.py index ce0fb04e47..ccf0e7364d 100644 --- a/plotly/validators/parcoords/_customdatasrc.py +++ b/plotly/validators/parcoords/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="parcoords", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/_dimensiondefaults.py b/plotly/validators/parcoords/_dimensiondefaults.py index 2041264bc8..7fd09f35e7 100644 --- a/plotly/validators/parcoords/_dimensiondefaults.py +++ b/plotly/validators/parcoords/_dimensiondefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DimensiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class DimensiondefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="dimensiondefaults", parent_name="parcoords", **kwargs ): - super(DimensiondefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Dimension"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/parcoords/_dimensions.py b/plotly/validators/parcoords/_dimensions.py index 1337b114a7..f3493823c2 100644 --- a/plotly/validators/parcoords/_dimensions.py +++ b/plotly/validators/parcoords/_dimensions.py @@ -1,92 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class DimensionsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="dimensions", parent_name="parcoords", **kwargs): - super(DimensionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Dimension"), data_docs=kwargs.pop( "data_docs", """ - constraintrange - The domain range to which the filter on the - dimension is constrained. Must be an array of - `[fromValue, toValue]` with `fromValue <= - toValue`, or if `multiselect` is not disabled, - you may give an array of arrays, where each - inner array is `[fromValue, toValue]`. - label - The shown name of the dimension. - multiselect - Do we allow multiple selection ranges or just a - single range? - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - range - The domain range that represents the full, - shown axis extent. Defaults to the `values` - extent. Must be an array of `[fromValue, - toValue]` with finite numbers as elements. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - ticktext - Sets the text displayed at the ticks position - via `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - values - Dimension values. `values[n]` represents the - value of the `n`th point in the dataset, - therefore the `values` vector for all - dimensions must be the same (longer vectors - will be truncated). Each value must be a finite - number. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Shows the dimension when set to `true` (the - default). Hides the dimension for `false`. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_domain.py b/plotly/validators/parcoords/_domain.py index 4c231dbadf..e65b7a67e4 100644 --- a/plotly/validators/parcoords/_domain.py +++ b/plotly/validators/parcoords/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="parcoords", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this parcoords - trace . - row - If there is a layout grid, use the domain for - this row in the grid for this parcoords trace . - x - Sets the horizontal domain of this parcoords - trace (in plot fraction). - y - Sets the vertical domain of this parcoords - trace (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/parcoords/_ids.py b/plotly/validators/parcoords/_ids.py index 6b39d08e8b..f66d35c43e 100644 --- a/plotly/validators/parcoords/_ids.py +++ b/plotly/validators/parcoords/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="parcoords", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcoords/_idssrc.py b/plotly/validators/parcoords/_idssrc.py index eb227394ec..f14e9cab1b 100644 --- a/plotly/validators/parcoords/_idssrc.py +++ b/plotly/validators/parcoords/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="parcoords", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/_labelangle.py b/plotly/validators/parcoords/_labelangle.py index e419cf987b..6d99ad33ea 100644 --- a/plotly/validators/parcoords/_labelangle.py +++ b/plotly/validators/parcoords/_labelangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelangleValidator(_plotly_utils.basevalidators.AngleValidator): +class LabelangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="labelangle", parent_name="parcoords", **kwargs): - super(LabelangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/_labelfont.py b/plotly/validators/parcoords/_labelfont.py index ce357bb001..7c0c13cd36 100644 --- a/plotly/validators/parcoords/_labelfont.py +++ b/plotly/validators/parcoords/_labelfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class LabelfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="labelfont", parent_name="parcoords", **kwargs): - super(LabelfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Labelfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_labelside.py b/plotly/validators/parcoords/_labelside.py index 31a96b934d..c4b7ce1096 100644 --- a/plotly/validators/parcoords/_labelside.py +++ b/plotly/validators/parcoords/_labelside.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LabelsideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="labelside", parent_name="parcoords", **kwargs): - super(LabelsideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom"]), **kwargs, diff --git a/plotly/validators/parcoords/_legend.py b/plotly/validators/parcoords/_legend.py index 0ae4cf20c0..412fb0e6a3 100644 --- a/plotly/validators/parcoords/_legend.py +++ b/plotly/validators/parcoords/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="parcoords", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/parcoords/_legendgrouptitle.py b/plotly/validators/parcoords/_legendgrouptitle.py index 58ba2592c5..afb7906874 100644 --- a/plotly/validators/parcoords/_legendgrouptitle.py +++ b/plotly/validators/parcoords/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="parcoords", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_legendrank.py b/plotly/validators/parcoords/_legendrank.py index 4b44f9c641..28cfe1ce5a 100644 --- a/plotly/validators/parcoords/_legendrank.py +++ b/plotly/validators/parcoords/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="parcoords", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcoords/_legendwidth.py b/plotly/validators/parcoords/_legendwidth.py index 0ee8b65a3e..d51bdff421 100644 --- a/plotly/validators/parcoords/_legendwidth.py +++ b/plotly/validators/parcoords/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="parcoords", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/_line.py b/plotly/validators/parcoords/_line.py index 80c3b67104..e042d93887 100644 --- a/plotly/validators/parcoords/_line.py +++ b/plotly/validators/parcoords/_line.py @@ -1,101 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="parcoords", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color` is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color` is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color` is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets the line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `line.cmin` and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.parcoords.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color` is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color` is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_meta.py b/plotly/validators/parcoords/_meta.py index 28b767b7d1..78a68a2029 100644 --- a/plotly/validators/parcoords/_meta.py +++ b/plotly/validators/parcoords/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="parcoords", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/parcoords/_metasrc.py b/plotly/validators/parcoords/_metasrc.py index a7371f41ef..5bd21db506 100644 --- a/plotly/validators/parcoords/_metasrc.py +++ b/plotly/validators/parcoords/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="parcoords", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/_name.py b/plotly/validators/parcoords/_name.py index 014cc51124..feea42deb0 100644 --- a/plotly/validators/parcoords/_name.py +++ b/plotly/validators/parcoords/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="parcoords", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcoords/_rangefont.py b/plotly/validators/parcoords/_rangefont.py index 0fc0918651..ad258b09e8 100644 --- a/plotly/validators/parcoords/_rangefont.py +++ b/plotly/validators/parcoords/_rangefont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangefontValidator(_plotly_utils.basevalidators.CompoundValidator): +class RangefontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="rangefont", parent_name="parcoords", **kwargs): - super(RangefontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Rangefont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_stream.py b/plotly/validators/parcoords/_stream.py index ee96503d69..bdfc623a20 100644 --- a/plotly/validators/parcoords/_stream.py +++ b/plotly/validators/parcoords/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="parcoords", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_tickfont.py b/plotly/validators/parcoords/_tickfont.py index 1704a71b96..70291a6060 100644 --- a/plotly/validators/parcoords/_tickfont.py +++ b/plotly/validators/parcoords/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="parcoords", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcoords/_uid.py b/plotly/validators/parcoords/_uid.py index bf066b6713..d029306c29 100644 --- a/plotly/validators/parcoords/_uid.py +++ b/plotly/validators/parcoords/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="parcoords", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/_uirevision.py b/plotly/validators/parcoords/_uirevision.py index 20b12b8bb7..9a1c09f441 100644 --- a/plotly/validators/parcoords/_uirevision.py +++ b/plotly/validators/parcoords/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="parcoords", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/_unselected.py b/plotly/validators/parcoords/_unselected.py index 949d237381..1f3efd3b6f 100644 --- a/plotly/validators/parcoords/_unselected.py +++ b/plotly/validators/parcoords/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="parcoords", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.parcoords.unselect - ed.Line` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/parcoords/_visible.py b/plotly/validators/parcoords/_visible.py index fd03a8f709..d248e1be90 100644 --- a/plotly/validators/parcoords/_visible.py +++ b/plotly/validators/parcoords/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="parcoords", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/parcoords/dimension/__init__.py b/plotly/validators/parcoords/dimension/__init__.py index 69bde72cd6..0177ed8b24 100644 --- a/plotly/validators/parcoords/dimension/__init__.py +++ b/plotly/validators/parcoords/dimension/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._tickformat import TickformatValidator - from ._templateitemname import TemplateitemnameValidator - from ._range import RangeValidator - from ._name import NameValidator - from ._multiselect import MultiselectValidator - from ._label import LabelValidator - from ._constraintrange import ConstraintrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._tickformat.TickformatValidator", - "._templateitemname.TemplateitemnameValidator", - "._range.RangeValidator", - "._name.NameValidator", - "._multiselect.MultiselectValidator", - "._label.LabelValidator", - "._constraintrange.ConstraintrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._tickformat.TickformatValidator", + "._templateitemname.TemplateitemnameValidator", + "._range.RangeValidator", + "._name.NameValidator", + "._multiselect.MultiselectValidator", + "._label.LabelValidator", + "._constraintrange.ConstraintrangeValidator", + ], +) diff --git a/plotly/validators/parcoords/dimension/_constraintrange.py b/plotly/validators/parcoords/dimension/_constraintrange.py index f1055a75c2..03ede33fd9 100644 --- a/plotly/validators/parcoords/dimension/_constraintrange.py +++ b/plotly/validators/parcoords/dimension/_constraintrange.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class ConstraintrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="constraintrange", parent_name="parcoords.dimension", **kwargs ): - super(ConstraintrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dimensions=kwargs.pop("dimensions", "1-2"), edit_type=kwargs.pop("edit_type", "plot"), free_length=kwargs.pop("free_length", True), diff --git a/plotly/validators/parcoords/dimension/_label.py b/plotly/validators/parcoords/dimension/_label.py index 58bbd6bd5f..1e78ea4a7e 100644 --- a/plotly/validators/parcoords/dimension/_label.py +++ b/plotly/validators/parcoords/dimension/_label.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__( self, plotly_name="label", parent_name="parcoords.dimension", **kwargs ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_multiselect.py b/plotly/validators/parcoords/dimension/_multiselect.py index a0b43f108c..b73a7e00cd 100644 --- a/plotly/validators/parcoords/dimension/_multiselect.py +++ b/plotly/validators/parcoords/dimension/_multiselect.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MultiselectValidator(_plotly_utils.basevalidators.BooleanValidator): +class MultiselectValidator(_bv.BooleanValidator): def __init__( self, plotly_name="multiselect", parent_name="parcoords.dimension", **kwargs ): - super(MultiselectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_name.py b/plotly/validators/parcoords/dimension/_name.py index b071e2f22a..4a6d4d6762 100644 --- a/plotly/validators/parcoords/dimension/_name.py +++ b/plotly/validators/parcoords/dimension/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="parcoords.dimension", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_range.py b/plotly/validators/parcoords/dimension/_range.py index fe9a4b7a7c..9eec82b46c 100644 --- a/plotly/validators/parcoords/dimension/_range.py +++ b/plotly/validators/parcoords/dimension/_range.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class RangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="range", parent_name="parcoords.dimension", **kwargs ): - super(RangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcoords/dimension/_templateitemname.py b/plotly/validators/parcoords/dimension/_templateitemname.py index 7a8ac7d753..aed1259b1e 100644 --- a/plotly/validators/parcoords/dimension/_templateitemname.py +++ b/plotly/validators/parcoords/dimension/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="parcoords.dimension", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_tickformat.py b/plotly/validators/parcoords/dimension/_tickformat.py index 1000206453..bd1243dc93 100644 --- a/plotly/validators/parcoords/dimension/_tickformat.py +++ b/plotly/validators/parcoords/dimension/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="parcoords.dimension", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_ticktext.py b/plotly/validators/parcoords/dimension/_ticktext.py index ceaa611889..4f61fe0b46 100644 --- a/plotly/validators/parcoords/dimension/_ticktext.py +++ b/plotly/validators/parcoords/dimension/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="parcoords.dimension", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_ticktextsrc.py b/plotly/validators/parcoords/dimension/_ticktextsrc.py index 7d1958bf66..df1a66489e 100644 --- a/plotly/validators/parcoords/dimension/_ticktextsrc.py +++ b/plotly/validators/parcoords/dimension/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="parcoords.dimension", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_tickvals.py b/plotly/validators/parcoords/dimension/_tickvals.py index b1d5672a9f..63a94b3fe4 100644 --- a/plotly/validators/parcoords/dimension/_tickvals.py +++ b/plotly/validators/parcoords/dimension/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="parcoords.dimension", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_tickvalssrc.py b/plotly/validators/parcoords/dimension/_tickvalssrc.py index 9460b5268a..9a95e3d0a2 100644 --- a/plotly/validators/parcoords/dimension/_tickvalssrc.py +++ b/plotly/validators/parcoords/dimension/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="parcoords.dimension", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_values.py b/plotly/validators/parcoords/dimension/_values.py index a1543a15af..3ace6ecbeb 100644 --- a/plotly/validators/parcoords/dimension/_values.py +++ b/plotly/validators/parcoords/dimension/_values.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="values", parent_name="parcoords.dimension", **kwargs ): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_valuessrc.py b/plotly/validators/parcoords/dimension/_valuessrc.py index d81641aa6a..1bffae98f5 100644 --- a/plotly/validators/parcoords/dimension/_valuessrc.py +++ b/plotly/validators/parcoords/dimension/_valuessrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="valuessrc", parent_name="parcoords.dimension", **kwargs ): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/dimension/_visible.py b/plotly/validators/parcoords/dimension/_visible.py index 3d214cf1d1..ddb39d8890 100644 --- a/plotly/validators/parcoords/dimension/_visible.py +++ b/plotly/validators/parcoords/dimension/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="parcoords.dimension", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/domain/__init__.py b/plotly/validators/parcoords/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/parcoords/domain/__init__.py +++ b/plotly/validators/parcoords/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/parcoords/domain/_column.py b/plotly/validators/parcoords/domain/_column.py index 02bbeacd34..b3e2252868 100644 --- a/plotly/validators/parcoords/domain/_column.py +++ b/plotly/validators/parcoords/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="parcoords.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/domain/_row.py b/plotly/validators/parcoords/domain/_row.py index 449e22cefb..7221496bd4 100644 --- a/plotly/validators/parcoords/domain/_row.py +++ b/plotly/validators/parcoords/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="parcoords.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/domain/_x.py b/plotly/validators/parcoords/domain/_x.py index 515d581d60..dd6edc766d 100644 --- a/plotly/validators/parcoords/domain/_x.py +++ b/plotly/validators/parcoords/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="parcoords.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcoords/domain/_y.py b/plotly/validators/parcoords/domain/_y.py index 3daf0b4b89..49686a5179 100644 --- a/plotly/validators/parcoords/domain/_y.py +++ b/plotly/validators/parcoords/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="parcoords.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcoords/labelfont/__init__.py b/plotly/validators/parcoords/labelfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcoords/labelfont/__init__.py +++ b/plotly/validators/parcoords/labelfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcoords/labelfont/_color.py b/plotly/validators/parcoords/labelfont/_color.py index cdee801230..81ea84d973 100644 --- a/plotly/validators/parcoords/labelfont/_color.py +++ b/plotly/validators/parcoords/labelfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcoords.labelfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/labelfont/_family.py b/plotly/validators/parcoords/labelfont/_family.py index 6452497079..e919df6f65 100644 --- a/plotly/validators/parcoords/labelfont/_family.py +++ b/plotly/validators/parcoords/labelfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.labelfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/labelfont/_lineposition.py b/plotly/validators/parcoords/labelfont/_lineposition.py index e8bf3b59bd..7db2fa0572 100644 --- a/plotly/validators/parcoords/labelfont/_lineposition.py +++ b/plotly/validators/parcoords/labelfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.labelfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcoords/labelfont/_shadow.py b/plotly/validators/parcoords/labelfont/_shadow.py index 075507bf05..81bc902ace 100644 --- a/plotly/validators/parcoords/labelfont/_shadow.py +++ b/plotly/validators/parcoords/labelfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.labelfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/labelfont/_size.py b/plotly/validators/parcoords/labelfont/_size.py index 49b61ab91e..a30b5715dc 100644 --- a/plotly/validators/parcoords/labelfont/_size.py +++ b/plotly/validators/parcoords/labelfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="parcoords.labelfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/labelfont/_style.py b/plotly/validators/parcoords/labelfont/_style.py index 1daf7ebee5..b207dd81cc 100644 --- a/plotly/validators/parcoords/labelfont/_style.py +++ b/plotly/validators/parcoords/labelfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcoords.labelfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcoords/labelfont/_textcase.py b/plotly/validators/parcoords/labelfont/_textcase.py index 759d7b89ec..d92f4011a9 100644 --- a/plotly/validators/parcoords/labelfont/_textcase.py +++ b/plotly/validators/parcoords/labelfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcoords.labelfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcoords/labelfont/_variant.py b/plotly/validators/parcoords/labelfont/_variant.py index 6090fddaef..f9427d37c1 100644 --- a/plotly/validators/parcoords/labelfont/_variant.py +++ b/plotly/validators/parcoords/labelfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.labelfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/labelfont/_weight.py b/plotly/validators/parcoords/labelfont/_weight.py index 3593a5744f..f8f8862582 100644 --- a/plotly/validators/parcoords/labelfont/_weight.py +++ b/plotly/validators/parcoords/labelfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcoords.labelfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/legendgrouptitle/__init__.py b/plotly/validators/parcoords/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/parcoords/legendgrouptitle/__init__.py +++ b/plotly/validators/parcoords/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/parcoords/legendgrouptitle/_font.py b/plotly/validators/parcoords/legendgrouptitle/_font.py index 0eee46907e..84f1e5c1ba 100644 --- a/plotly/validators/parcoords/legendgrouptitle/_font.py +++ b/plotly/validators/parcoords/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="parcoords.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcoords/legendgrouptitle/_text.py b/plotly/validators/parcoords/legendgrouptitle/_text.py index b59e1b8201..84700b7197 100644 --- a/plotly/validators/parcoords/legendgrouptitle/_text.py +++ b/plotly/validators/parcoords/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="parcoords.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcoords/legendgrouptitle/font/__init__.py b/plotly/validators/parcoords/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/__init__.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_color.py b/plotly/validators/parcoords/legendgrouptitle/font/_color.py index 882105ec04..a3746b5bc4 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_color.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_family.py b/plotly/validators/parcoords/legendgrouptitle/font/_family.py index c8ec06e829..eb84977213 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_family.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_lineposition.py b/plotly/validators/parcoords/legendgrouptitle/font/_lineposition.py index 0a166b98a3..70ed565c03 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_shadow.py b/plotly/validators/parcoords/legendgrouptitle/font/_shadow.py index 6acb9988d1..22bdcce411 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_size.py b/plotly/validators/parcoords/legendgrouptitle/font/_size.py index 25ebae0a3c..10913ea62e 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_size.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_style.py b/plotly/validators/parcoords/legendgrouptitle/font/_style.py index 309510bf71..20d141d084 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_style.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_textcase.py b/plotly/validators/parcoords/legendgrouptitle/font/_textcase.py index 40e54fe237..9f94db270f 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_variant.py b/plotly/validators/parcoords/legendgrouptitle/font/_variant.py index 595471dba3..db15b66b1b 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_variant.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/legendgrouptitle/font/_weight.py b/plotly/validators/parcoords/legendgrouptitle/font/_weight.py index ea20c87731..389cc95d0e 100644 --- a/plotly/validators/parcoords/legendgrouptitle/font/_weight.py +++ b/plotly/validators/parcoords/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcoords.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/line/__init__.py b/plotly/validators/parcoords/line/__init__.py index acf6c173d8..4ec1631b84 100644 --- a/plotly/validators/parcoords/line/__init__.py +++ b/plotly/validators/parcoords/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/parcoords/line/_autocolorscale.py b/plotly/validators/parcoords/line/_autocolorscale.py index 8cb53c8084..fadd5e8c89 100644 --- a/plotly/validators/parcoords/line/_autocolorscale.py +++ b/plotly/validators/parcoords/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="parcoords.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/parcoords/line/_cauto.py b/plotly/validators/parcoords/line/_cauto.py index 1f83f16a77..57d42282aa 100644 --- a/plotly/validators/parcoords/line/_cauto.py +++ b/plotly/validators/parcoords/line/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="parcoords.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/parcoords/line/_cmax.py b/plotly/validators/parcoords/line/_cmax.py index 0dcb28f846..b997f44826 100644 --- a/plotly/validators/parcoords/line/_cmax.py +++ b/plotly/validators/parcoords/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="parcoords.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/parcoords/line/_cmid.py b/plotly/validators/parcoords/line/_cmid.py index fa8869a9ba..1c8109e99e 100644 --- a/plotly/validators/parcoords/line/_cmid.py +++ b/plotly/validators/parcoords/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="parcoords.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/parcoords/line/_cmin.py b/plotly/validators/parcoords/line/_cmin.py index 479e6d2b66..14e4ee7afd 100644 --- a/plotly/validators/parcoords/line/_cmin.py +++ b/plotly/validators/parcoords/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="parcoords.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/parcoords/line/_color.py b/plotly/validators/parcoords/line/_color.py index 2e415f461c..bfb2dd7521 100644 --- a/plotly/validators/parcoords/line/_color.py +++ b/plotly/validators/parcoords/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="parcoords.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop("colorscale_path", "parcoords.line.colorscale"), diff --git a/plotly/validators/parcoords/line/_coloraxis.py b/plotly/validators/parcoords/line/_coloraxis.py index 078e6bd02e..b83b3f67e5 100644 --- a/plotly/validators/parcoords/line/_coloraxis.py +++ b/plotly/validators/parcoords/line/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="parcoords.line", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/parcoords/line/_colorbar.py b/plotly/validators/parcoords/line/_colorbar.py index fa178b76b5..ce5e57b99c 100644 --- a/plotly/validators/parcoords/line/_colorbar.py +++ b/plotly/validators/parcoords/line/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="parcoords.line", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.parcoor - ds.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.parcoords.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - parcoords.line.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.parcoords.line.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/parcoords/line/_colorscale.py b/plotly/validators/parcoords/line/_colorscale.py index 794b2bfe8f..aea93a160e 100644 --- a/plotly/validators/parcoords/line/_colorscale.py +++ b/plotly/validators/parcoords/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="parcoords.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/parcoords/line/_colorsrc.py b/plotly/validators/parcoords/line/_colorsrc.py index beeef7d621..6284399ccd 100644 --- a/plotly/validators/parcoords/line/_colorsrc.py +++ b/plotly/validators/parcoords/line/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="parcoords.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/_reversescale.py b/plotly/validators/parcoords/line/_reversescale.py index 994ec4692b..7c4f10ecd0 100644 --- a/plotly/validators/parcoords/line/_reversescale.py +++ b/plotly/validators/parcoords/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="parcoords.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/_showscale.py b/plotly/validators/parcoords/line/_showscale.py index 9dad256baf..b37a177091 100644 --- a/plotly/validators/parcoords/line/_showscale.py +++ b/plotly/validators/parcoords/line/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="parcoords.line", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/__init__.py b/plotly/validators/parcoords/line/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/parcoords/line/colorbar/__init__.py +++ b/plotly/validators/parcoords/line/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/parcoords/line/colorbar/_bgcolor.py b/plotly/validators/parcoords/line/colorbar/_bgcolor.py index e3b6c54eea..57efabf79d 100644 --- a/plotly/validators/parcoords/line/colorbar/_bgcolor.py +++ b/plotly/validators/parcoords/line/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="parcoords.line.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_bordercolor.py b/plotly/validators/parcoords/line/colorbar/_bordercolor.py index e61a76630b..6090bc33c3 100644 --- a/plotly/validators/parcoords/line/colorbar/_bordercolor.py +++ b/plotly/validators/parcoords/line/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="parcoords.line.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_borderwidth.py b/plotly/validators/parcoords/line/colorbar/_borderwidth.py index 9f5ab54511..de9b7bf753 100644 --- a/plotly/validators/parcoords/line/colorbar/_borderwidth.py +++ b/plotly/validators/parcoords/line/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="parcoords.line.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_dtick.py b/plotly/validators/parcoords/line/colorbar/_dtick.py index 1676df8443..172e754eea 100644 --- a/plotly/validators/parcoords/line/colorbar/_dtick.py +++ b/plotly/validators/parcoords/line/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="parcoords.line.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_exponentformat.py b/plotly/validators/parcoords/line/colorbar/_exponentformat.py index 55b0670b59..7bee0b8a22 100644 --- a/plotly/validators/parcoords/line/colorbar/_exponentformat.py +++ b/plotly/validators/parcoords/line/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="parcoords.line.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_labelalias.py b/plotly/validators/parcoords/line/colorbar/_labelalias.py index 88383e38e9..1277ab9d7c 100644 --- a/plotly/validators/parcoords/line/colorbar/_labelalias.py +++ b/plotly/validators/parcoords/line/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="parcoords.line.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_len.py b/plotly/validators/parcoords/line/colorbar/_len.py index a2cf4185ad..298c9fe04b 100644 --- a/plotly/validators/parcoords/line/colorbar/_len.py +++ b/plotly/validators/parcoords/line/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="parcoords.line.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_lenmode.py b/plotly/validators/parcoords/line/colorbar/_lenmode.py index 3bee0ef6af..066ff70cf5 100644 --- a/plotly/validators/parcoords/line/colorbar/_lenmode.py +++ b/plotly/validators/parcoords/line/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="parcoords.line.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_minexponent.py b/plotly/validators/parcoords/line/colorbar/_minexponent.py index 09af0d007a..47248dfdca 100644 --- a/plotly/validators/parcoords/line/colorbar/_minexponent.py +++ b/plotly/validators/parcoords/line/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="parcoords.line.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_nticks.py b/plotly/validators/parcoords/line/colorbar/_nticks.py index bf293c27b2..caf8ea2616 100644 --- a/plotly/validators/parcoords/line/colorbar/_nticks.py +++ b/plotly/validators/parcoords/line/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="parcoords.line.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_orientation.py b/plotly/validators/parcoords/line/colorbar/_orientation.py index dfada88699..1e44837b33 100644 --- a/plotly/validators/parcoords/line/colorbar/_orientation.py +++ b/plotly/validators/parcoords/line/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="parcoords.line.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_outlinecolor.py b/plotly/validators/parcoords/line/colorbar/_outlinecolor.py index ef80296511..3b8ee7e4fc 100644 --- a/plotly/validators/parcoords/line/colorbar/_outlinecolor.py +++ b/plotly/validators/parcoords/line/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="parcoords.line.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_outlinewidth.py b/plotly/validators/parcoords/line/colorbar/_outlinewidth.py index 49fce61d26..4db4accb20 100644 --- a/plotly/validators/parcoords/line/colorbar/_outlinewidth.py +++ b/plotly/validators/parcoords/line/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="parcoords.line.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_separatethousands.py b/plotly/validators/parcoords/line/colorbar/_separatethousands.py index b8461009ae..43194b1595 100644 --- a/plotly/validators/parcoords/line/colorbar/_separatethousands.py +++ b/plotly/validators/parcoords/line/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="parcoords.line.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_showexponent.py b/plotly/validators/parcoords/line/colorbar/_showexponent.py index 923ce477b6..c6fbdf5e57 100644 --- a/plotly/validators/parcoords/line/colorbar/_showexponent.py +++ b/plotly/validators/parcoords/line/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="parcoords.line.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_showticklabels.py b/plotly/validators/parcoords/line/colorbar/_showticklabels.py index 2a0f1dc477..968673f694 100644 --- a/plotly/validators/parcoords/line/colorbar/_showticklabels.py +++ b/plotly/validators/parcoords/line/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="parcoords.line.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_showtickprefix.py b/plotly/validators/parcoords/line/colorbar/_showtickprefix.py index 4905209a39..805fa88e5b 100644 --- a/plotly/validators/parcoords/line/colorbar/_showtickprefix.py +++ b/plotly/validators/parcoords/line/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="parcoords.line.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_showticksuffix.py b/plotly/validators/parcoords/line/colorbar/_showticksuffix.py index 521ff7870a..05b8accf35 100644 --- a/plotly/validators/parcoords/line/colorbar/_showticksuffix.py +++ b/plotly/validators/parcoords/line/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="parcoords.line.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_thickness.py b/plotly/validators/parcoords/line/colorbar/_thickness.py index 42aa471ea6..bbc22425a7 100644 --- a/plotly/validators/parcoords/line/colorbar/_thickness.py +++ b/plotly/validators/parcoords/line/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="parcoords.line.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_thicknessmode.py b/plotly/validators/parcoords/line/colorbar/_thicknessmode.py index 5a0c6b7fed..18ccc94823 100644 --- a/plotly/validators/parcoords/line/colorbar/_thicknessmode.py +++ b/plotly/validators/parcoords/line/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="parcoords.line.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_tick0.py b/plotly/validators/parcoords/line/colorbar/_tick0.py index 0471333c67..d872e91690 100644 --- a/plotly/validators/parcoords/line/colorbar/_tick0.py +++ b/plotly/validators/parcoords/line/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="parcoords.line.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_tickangle.py b/plotly/validators/parcoords/line/colorbar/_tickangle.py index 0ee19a40d3..90311f01f3 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickangle.py +++ b/plotly/validators/parcoords/line/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_tickcolor.py b/plotly/validators/parcoords/line/colorbar/_tickcolor.py index 0510bec604..3e09ecf3ef 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickcolor.py +++ b/plotly/validators/parcoords/line/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_tickfont.py b/plotly/validators/parcoords/line/colorbar/_tickfont.py index 101e257345..6bcd8ad7cd 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickfont.py +++ b/plotly/validators/parcoords/line/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_tickformat.py b/plotly/validators/parcoords/line/colorbar/_tickformat.py index f0a944a572..502f5c4d81 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickformat.py +++ b/plotly/validators/parcoords/line/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py b/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py index 181a3b1f88..2e98b4ce3e 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/parcoords/line/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="parcoords.line.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/parcoords/line/colorbar/_tickformatstops.py b/plotly/validators/parcoords/line/colorbar/_tickformatstops.py index bf3c939f0a..bc3e8ee737 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickformatstops.py +++ b/plotly/validators/parcoords/line/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="parcoords.line.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_ticklabeloverflow.py b/plotly/validators/parcoords/line/colorbar/_ticklabeloverflow.py index 477858bd96..3e47eb3a8d 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/parcoords/line/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="parcoords.line.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_ticklabelposition.py b/plotly/validators/parcoords/line/colorbar/_ticklabelposition.py index 05d93b7f8c..cf77532894 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticklabelposition.py +++ b/plotly/validators/parcoords/line/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="parcoords.line.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/line/colorbar/_ticklabelstep.py b/plotly/validators/parcoords/line/colorbar/_ticklabelstep.py index 1b92e9ce9c..8585abaf1a 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticklabelstep.py +++ b/plotly/validators/parcoords/line/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="parcoords.line.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_ticklen.py b/plotly/validators/parcoords/line/colorbar/_ticklen.py index d202cf8c6d..15685944c9 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticklen.py +++ b/plotly/validators/parcoords/line/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="parcoords.line.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_tickmode.py b/plotly/validators/parcoords/line/colorbar/_tickmode.py index 84a9507828..400241913f 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickmode.py +++ b/plotly/validators/parcoords/line/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/parcoords/line/colorbar/_tickprefix.py b/plotly/validators/parcoords/line/colorbar/_tickprefix.py index 52423d41d3..43617a5922 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickprefix.py +++ b/plotly/validators/parcoords/line/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_ticks.py b/plotly/validators/parcoords/line/colorbar/_ticks.py index b1ec58d1cb..d3a1e222a6 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticks.py +++ b/plotly/validators/parcoords/line/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="parcoords.line.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_ticksuffix.py b/plotly/validators/parcoords/line/colorbar/_ticksuffix.py index e95e7e18e9..0b3aecb067 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticksuffix.py +++ b/plotly/validators/parcoords/line/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="parcoords.line.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_ticktext.py b/plotly/validators/parcoords/line/colorbar/_ticktext.py index 5ba0cd8e25..9a0030695e 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticktext.py +++ b/plotly/validators/parcoords/line/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="parcoords.line.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py b/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py index bae22a9e69..e8a19b73c1 100644 --- a/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py +++ b/plotly/validators/parcoords/line/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="parcoords.line.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_tickvals.py b/plotly/validators/parcoords/line/colorbar/_tickvals.py index 6fcf5f1ea0..3b53cbe9fc 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickvals.py +++ b/plotly/validators/parcoords/line/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py b/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py index 44e37a13c9..a95256d321 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py +++ b/plotly/validators/parcoords/line/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_tickwidth.py b/plotly/validators/parcoords/line/colorbar/_tickwidth.py index 27599896fb..e3d023bcf3 100644 --- a/plotly/validators/parcoords/line/colorbar/_tickwidth.py +++ b/plotly/validators/parcoords/line/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="parcoords.line.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_title.py b/plotly/validators/parcoords/line/colorbar/_title.py index 12eca3ff07..66d1082e7b 100644 --- a/plotly/validators/parcoords/line/colorbar/_title.py +++ b/plotly/validators/parcoords/line/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="parcoords.line.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_x.py b/plotly/validators/parcoords/line/colorbar/_x.py index 1b6a9e3b55..bc19a617c0 100644 --- a/plotly/validators/parcoords/line/colorbar/_x.py +++ b/plotly/validators/parcoords/line/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="parcoords.line.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_xanchor.py b/plotly/validators/parcoords/line/colorbar/_xanchor.py index 8658ec58b4..853923ebdf 100644 --- a/plotly/validators/parcoords/line/colorbar/_xanchor.py +++ b/plotly/validators/parcoords/line/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="parcoords.line.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_xpad.py b/plotly/validators/parcoords/line/colorbar/_xpad.py index 823422ba86..dd3b7b486a 100644 --- a/plotly/validators/parcoords/line/colorbar/_xpad.py +++ b/plotly/validators/parcoords/line/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="parcoords.line.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_xref.py b/plotly/validators/parcoords/line/colorbar/_xref.py index 900ae3a9d1..9b806c480e 100644 --- a/plotly/validators/parcoords/line/colorbar/_xref.py +++ b/plotly/validators/parcoords/line/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="parcoords.line.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_y.py b/plotly/validators/parcoords/line/colorbar/_y.py index c08ef88a13..58d633fe0b 100644 --- a/plotly/validators/parcoords/line/colorbar/_y.py +++ b/plotly/validators/parcoords/line/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="parcoords.line.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/_yanchor.py b/plotly/validators/parcoords/line/colorbar/_yanchor.py index 9d680370a6..bcc2d43836 100644 --- a/plotly/validators/parcoords/line/colorbar/_yanchor.py +++ b/plotly/validators/parcoords/line/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="parcoords.line.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_ypad.py b/plotly/validators/parcoords/line/colorbar/_ypad.py index 9f204b9768..d3429bbc1d 100644 --- a/plotly/validators/parcoords/line/colorbar/_ypad.py +++ b/plotly/validators/parcoords/line/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="parcoords.line.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/_yref.py b/plotly/validators/parcoords/line/colorbar/_yref.py index 556d1ab028..fb8daae983 100644 --- a/plotly/validators/parcoords/line/colorbar/_yref.py +++ b/plotly/validators/parcoords/line/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="parcoords.line.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py b/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_color.py b/plotly/validators/parcoords/line/colorbar/tickfont/_color.py index ad52474434..ca39e9b986 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_color.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_family.py b/plotly/validators/parcoords/line/colorbar/tickfont/_family.py index 769fecb50e..04797f1672 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_family.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_lineposition.py b/plotly/validators/parcoords/line/colorbar/tickfont/_lineposition.py index 69a94e736d..d3bf244891 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_shadow.py b/plotly/validators/parcoords/line/colorbar/tickfont/_shadow.py index ecdc95d0f2..b90337ff89 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_shadow.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_size.py b/plotly/validators/parcoords/line/colorbar/tickfont/_size.py index bcf2971fef..6a1fb2b082 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_size.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_style.py b/plotly/validators/parcoords/line/colorbar/tickfont/_style.py index a163c19ae8..33b7081dc6 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_style.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_textcase.py b/plotly/validators/parcoords/line/colorbar/tickfont/_textcase.py index b91079eeb1..4fb6c4c339 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_textcase.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_variant.py b/plotly/validators/parcoords/line/colorbar/tickfont/_variant.py index 458ec8dd28..ce57c55b74 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_variant.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/line/colorbar/tickfont/_weight.py b/plotly/validators/parcoords/line/colorbar/tickfont/_weight.py index 18afa72e5e..afcd0b0a6d 100644 --- a/plotly/validators/parcoords/line/colorbar/tickfont/_weight.py +++ b/plotly/validators/parcoords/line/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcoords.line.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py b/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/parcoords/line/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py index 73e75dc915..62183cbe83 100644 --- a/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/parcoords/line/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="parcoords.line.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py b/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py index abd001c608..e5e28e30c6 100644 --- a/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/parcoords/line/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="parcoords.line.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py b/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py index 3b62af4e0b..1f4abb4372 100644 --- a/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py +++ b/plotly/validators/parcoords/line/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="parcoords.line.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py index 04007c62d9..53aef2e16f 100644 --- a/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/parcoords/line/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="parcoords.line.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py b/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py index b1d4645936..3abdb2f611 100644 --- a/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py +++ b/plotly/validators/parcoords/line/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="parcoords.line.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/title/__init__.py b/plotly/validators/parcoords/line/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/parcoords/line/colorbar/title/__init__.py +++ b/plotly/validators/parcoords/line/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/parcoords/line/colorbar/title/_font.py b/plotly/validators/parcoords/line/colorbar/title/_font.py index 4ca22c3ad0..41c7c9ab92 100644 --- a/plotly/validators/parcoords/line/colorbar/title/_font.py +++ b/plotly/validators/parcoords/line/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="parcoords.line.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/title/_side.py b/plotly/validators/parcoords/line/colorbar/title/_side.py index 0e8156b146..89322887ee 100644 --- a/plotly/validators/parcoords/line/colorbar/title/_side.py +++ b/plotly/validators/parcoords/line/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="parcoords.line.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/title/_text.py b/plotly/validators/parcoords/line/colorbar/title/_text.py index 7657b8d0de..ca4f6ce1ee 100644 --- a/plotly/validators/parcoords/line/colorbar/title/_text.py +++ b/plotly/validators/parcoords/line/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="parcoords.line.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/title/font/__init__.py b/plotly/validators/parcoords/line/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/__init__.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_color.py b/plotly/validators/parcoords/line/colorbar/title/font/_color.py index 40a3788988..c9f69c68d1 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_color.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_family.py b/plotly/validators/parcoords/line/colorbar/title/font/_family.py index 19c23f12ab..3d14d82c10 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_family.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_lineposition.py b/plotly/validators/parcoords/line/colorbar/title/font/_lineposition.py index 9c6fa3a895..524bfdd205 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_lineposition.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_shadow.py b/plotly/validators/parcoords/line/colorbar/title/font/_shadow.py index aa23688003..46a3d2206a 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_shadow.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_size.py b/plotly/validators/parcoords/line/colorbar/title/font/_size.py index d67224836c..f9c183b6f5 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_size.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_style.py b/plotly/validators/parcoords/line/colorbar/title/font/_style.py index 782529b7a3..b2017cf3a6 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_style.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_textcase.py b/plotly/validators/parcoords/line/colorbar/title/font/_textcase.py index cc29356d87..31294c246c 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_textcase.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_variant.py b/plotly/validators/parcoords/line/colorbar/title/font/_variant.py index abbc47ceb6..a4957c1fe6 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_variant.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/line/colorbar/title/font/_weight.py b/plotly/validators/parcoords/line/colorbar/title/font/_weight.py index a678c66683..8336020838 100644 --- a/plotly/validators/parcoords/line/colorbar/title/font/_weight.py +++ b/plotly/validators/parcoords/line/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcoords.line.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/rangefont/__init__.py b/plotly/validators/parcoords/rangefont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcoords/rangefont/__init__.py +++ b/plotly/validators/parcoords/rangefont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcoords/rangefont/_color.py b/plotly/validators/parcoords/rangefont/_color.py index 3ead31b559..a4aebe7cd3 100644 --- a/plotly/validators/parcoords/rangefont/_color.py +++ b/plotly/validators/parcoords/rangefont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcoords.rangefont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/rangefont/_family.py b/plotly/validators/parcoords/rangefont/_family.py index 083709e706..f8df5faab8 100644 --- a/plotly/validators/parcoords/rangefont/_family.py +++ b/plotly/validators/parcoords/rangefont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.rangefont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/rangefont/_lineposition.py b/plotly/validators/parcoords/rangefont/_lineposition.py index 6db2d17f98..908dee04df 100644 --- a/plotly/validators/parcoords/rangefont/_lineposition.py +++ b/plotly/validators/parcoords/rangefont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.rangefont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcoords/rangefont/_shadow.py b/plotly/validators/parcoords/rangefont/_shadow.py index 7c6ebfcb98..2b2a0c9429 100644 --- a/plotly/validators/parcoords/rangefont/_shadow.py +++ b/plotly/validators/parcoords/rangefont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.rangefont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/rangefont/_size.py b/plotly/validators/parcoords/rangefont/_size.py index 12952c829c..26f373e0b3 100644 --- a/plotly/validators/parcoords/rangefont/_size.py +++ b/plotly/validators/parcoords/rangefont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="parcoords.rangefont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/rangefont/_style.py b/plotly/validators/parcoords/rangefont/_style.py index 75566065b5..abb9ce7222 100644 --- a/plotly/validators/parcoords/rangefont/_style.py +++ b/plotly/validators/parcoords/rangefont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="parcoords.rangefont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcoords/rangefont/_textcase.py b/plotly/validators/parcoords/rangefont/_textcase.py index f1105bc3f4..5a1d9cc36b 100644 --- a/plotly/validators/parcoords/rangefont/_textcase.py +++ b/plotly/validators/parcoords/rangefont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcoords.rangefont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcoords/rangefont/_variant.py b/plotly/validators/parcoords/rangefont/_variant.py index a48fc037f3..b9f474bf8c 100644 --- a/plotly/validators/parcoords/rangefont/_variant.py +++ b/plotly/validators/parcoords/rangefont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.rangefont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/rangefont/_weight.py b/plotly/validators/parcoords/rangefont/_weight.py index fcbc6de39f..c20a279191 100644 --- a/plotly/validators/parcoords/rangefont/_weight.py +++ b/plotly/validators/parcoords/rangefont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcoords.rangefont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/stream/__init__.py b/plotly/validators/parcoords/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/parcoords/stream/__init__.py +++ b/plotly/validators/parcoords/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/parcoords/stream/_maxpoints.py b/plotly/validators/parcoords/stream/_maxpoints.py index 84107754f1..d4275d9cd3 100644 --- a/plotly/validators/parcoords/stream/_maxpoints.py +++ b/plotly/validators/parcoords/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="parcoords.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/parcoords/stream/_token.py b/plotly/validators/parcoords/stream/_token.py index c431f1a940..1b1eb8105e 100644 --- a/plotly/validators/parcoords/stream/_token.py +++ b/plotly/validators/parcoords/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="parcoords.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/tickfont/__init__.py b/plotly/validators/parcoords/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/parcoords/tickfont/__init__.py +++ b/plotly/validators/parcoords/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/parcoords/tickfont/_color.py b/plotly/validators/parcoords/tickfont/_color.py index 827066d526..aed9680210 100644 --- a/plotly/validators/parcoords/tickfont/_color.py +++ b/plotly/validators/parcoords/tickfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="parcoords.tickfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/tickfont/_family.py b/plotly/validators/parcoords/tickfont/_family.py index dcf8986739..01c13ce7c4 100644 --- a/plotly/validators/parcoords/tickfont/_family.py +++ b/plotly/validators/parcoords/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="parcoords.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/parcoords/tickfont/_lineposition.py b/plotly/validators/parcoords/tickfont/_lineposition.py index 4025a150d5..e7e9c0e5d3 100644 --- a/plotly/validators/parcoords/tickfont/_lineposition.py +++ b/plotly/validators/parcoords/tickfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="parcoords.tickfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/parcoords/tickfont/_shadow.py b/plotly/validators/parcoords/tickfont/_shadow.py index 85ee51fe87..16ae534718 100644 --- a/plotly/validators/parcoords/tickfont/_shadow.py +++ b/plotly/validators/parcoords/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="parcoords.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/tickfont/_size.py b/plotly/validators/parcoords/tickfont/_size.py index 8ef1dcd12c..87fb2ceeb2 100644 --- a/plotly/validators/parcoords/tickfont/_size.py +++ b/plotly/validators/parcoords/tickfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="parcoords.tickfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/parcoords/tickfont/_style.py b/plotly/validators/parcoords/tickfont/_style.py index 93a02485a4..a84e08acd3 100644 --- a/plotly/validators/parcoords/tickfont/_style.py +++ b/plotly/validators/parcoords/tickfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="parcoords.tickfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/parcoords/tickfont/_textcase.py b/plotly/validators/parcoords/tickfont/_textcase.py index 273a0040cb..3fd439264d 100644 --- a/plotly/validators/parcoords/tickfont/_textcase.py +++ b/plotly/validators/parcoords/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="parcoords.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/parcoords/tickfont/_variant.py b/plotly/validators/parcoords/tickfont/_variant.py index e5a056b77f..a3f932ed13 100644 --- a/plotly/validators/parcoords/tickfont/_variant.py +++ b/plotly/validators/parcoords/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="parcoords.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/parcoords/tickfont/_weight.py b/plotly/validators/parcoords/tickfont/_weight.py index 6f764db0c8..b33ea95108 100644 --- a/plotly/validators/parcoords/tickfont/_weight.py +++ b/plotly/validators/parcoords/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="parcoords.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/parcoords/unselected/__init__.py b/plotly/validators/parcoords/unselected/__init__.py index 90c7f7b127..f7acb5b172 100644 --- a/plotly/validators/parcoords/unselected/__init__.py +++ b/plotly/validators/parcoords/unselected/__init__.py @@ -1,11 +1,4 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator"] - ) +__all__, __getattr__, __dir__ = relative_import(__name__, [], ["._line.LineValidator"]) diff --git a/plotly/validators/parcoords/unselected/_line.py b/plotly/validators/parcoords/unselected/_line.py index 1df68c100c..bb99cc5776 100644 --- a/plotly/validators/parcoords/unselected/_line.py +++ b/plotly/validators/parcoords/unselected/_line.py @@ -1,25 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="parcoords.unselected", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the base color of unselected lines. in - connection with `unselected.line.opacity`. - opacity - Sets the opacity of unselected lines. The - default "auto" decreases the opacity smoothly - as the number of lines increases. Use 1 to - achieve exact `unselected.line.color`. """, ), **kwargs, diff --git a/plotly/validators/parcoords/unselected/line/__init__.py b/plotly/validators/parcoords/unselected/line/__init__.py index d8f31347bf..653e572933 100644 --- a/plotly/validators/parcoords/unselected/line/__init__.py +++ b/plotly/validators/parcoords/unselected/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/parcoords/unselected/line/_color.py b/plotly/validators/parcoords/unselected/line/_color.py index b7b91d730e..2f073bf000 100644 --- a/plotly/validators/parcoords/unselected/line/_color.py +++ b/plotly/validators/parcoords/unselected/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="parcoords.unselected.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/parcoords/unselected/line/_opacity.py b/plotly/validators/parcoords/unselected/line/_opacity.py index 2348b092f4..995a94bb2b 100644 --- a/plotly/validators/parcoords/unselected/line/_opacity.py +++ b/plotly/validators/parcoords/unselected/line/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="parcoords.unselected.line", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/__init__.py b/plotly/validators/pie/__init__.py index 7ee355c1cb..90f4ec7513 100644 --- a/plotly/validators/pie/__init__.py +++ b/plotly/validators/pie/__init__.py @@ -1,119 +1,62 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._title import TitleValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._sort import SortValidator - from ._showlegend import ShowlegendValidator - from ._scalegroup import ScalegroupValidator - from ._rotation import RotationValidator - from ._pullsrc import PullsrcValidator - from ._pull import PullValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._labelssrc import LabelssrcValidator - from ._labels import LabelsValidator - from ._label0 import Label0Validator - from ._insidetextorientation import InsidetextorientationValidator - from ._insidetextfont import InsidetextfontValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._hole import HoleValidator - from ._domain import DomainValidator - from ._dlabel import DlabelValidator - from ._direction import DirectionValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._automargin import AutomarginValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._title.TitleValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._sort.SortValidator", - "._showlegend.ShowlegendValidator", - "._scalegroup.ScalegroupValidator", - "._rotation.RotationValidator", - "._pullsrc.PullsrcValidator", - "._pull.PullValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._labelssrc.LabelssrcValidator", - "._labels.LabelsValidator", - "._label0.Label0Validator", - "._insidetextorientation.InsidetextorientationValidator", - "._insidetextfont.InsidetextfontValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._hole.HoleValidator", - "._domain.DomainValidator", - "._dlabel.DlabelValidator", - "._direction.DirectionValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._automargin.AutomarginValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._title.TitleValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sort.SortValidator", + "._showlegend.ShowlegendValidator", + "._scalegroup.ScalegroupValidator", + "._rotation.RotationValidator", + "._pullsrc.PullsrcValidator", + "._pull.PullValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._label0.Label0Validator", + "._insidetextorientation.InsidetextorientationValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._hole.HoleValidator", + "._domain.DomainValidator", + "._dlabel.DlabelValidator", + "._direction.DirectionValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._automargin.AutomarginValidator", + ], +) diff --git a/plotly/validators/pie/_automargin.py b/plotly/validators/pie/_automargin.py index 40d0c9c698..666f0449e9 100644 --- a/plotly/validators/pie/_automargin.py +++ b/plotly/validators/pie/_automargin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutomarginValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutomarginValidator(_bv.BooleanValidator): def __init__(self, plotly_name="automargin", parent_name="pie", **kwargs): - super(AutomarginValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/pie/_customdata.py b/plotly/validators/pie/_customdata.py index 00f5f52ba6..2274a6fbe0 100644 --- a/plotly/validators/pie/_customdata.py +++ b/plotly/validators/pie/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="pie", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_customdatasrc.py b/plotly/validators/pie/_customdatasrc.py index b3ea7a5d1c..89bef8f074 100644 --- a/plotly/validators/pie/_customdatasrc.py +++ b/plotly/validators/pie/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="pie", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_direction.py b/plotly/validators/pie/_direction.py index bc706c9f50..c389973fa4 100644 --- a/plotly/validators/pie/_direction.py +++ b/plotly/validators/pie/_direction.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DirectionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DirectionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="direction", parent_name="pie", **kwargs): - super(DirectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["clockwise", "counterclockwise"]), **kwargs, diff --git a/plotly/validators/pie/_dlabel.py b/plotly/validators/pie/_dlabel.py index 986fc84fdd..20b0d9a836 100644 --- a/plotly/validators/pie/_dlabel.py +++ b/plotly/validators/pie/_dlabel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DlabelValidator(_plotly_utils.basevalidators.NumberValidator): +class DlabelValidator(_bv.NumberValidator): def __init__(self, plotly_name="dlabel", parent_name="pie", **kwargs): - super(DlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_domain.py b/plotly/validators/pie/_domain.py index ff1d81a9de..024361faee 100644 --- a/plotly/validators/pie/_domain.py +++ b/plotly/validators/pie/_domain.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="pie", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this pie trace . - row - If there is a layout grid, use the domain for - this row in the grid for this pie trace . - x - Sets the horizontal domain of this pie trace - (in plot fraction). - y - Sets the vertical domain of this pie trace (in - plot fraction). """, ), **kwargs, diff --git a/plotly/validators/pie/_hole.py b/plotly/validators/pie/_hole.py index b539d85bb3..262a85c6ed 100644 --- a/plotly/validators/pie/_hole.py +++ b/plotly/validators/pie/_hole.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoleValidator(_plotly_utils.basevalidators.NumberValidator): +class HoleValidator(_bv.NumberValidator): def __init__(self, plotly_name="hole", parent_name="pie", **kwargs): - super(HoleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/_hoverinfo.py b/plotly/validators/pie/_hoverinfo.py index 3fdeadd900..233fac33cd 100644 --- a/plotly/validators/pie/_hoverinfo.py +++ b/plotly/validators/pie/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="pie", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/pie/_hoverinfosrc.py b/plotly/validators/pie/_hoverinfosrc.py index 5b67b1c833..1cc09b6c00 100644 --- a/plotly/validators/pie/_hoverinfosrc.py +++ b/plotly/validators/pie/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="pie", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_hoverlabel.py b/plotly/validators/pie/_hoverlabel.py index 82e9a98d6c..cb38a9c5fd 100644 --- a/plotly/validators/pie/_hoverlabel.py +++ b/plotly/validators/pie/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="pie", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/pie/_hovertemplate.py b/plotly/validators/pie/_hovertemplate.py index 008669a285..e472894c08 100644 --- a/plotly/validators/pie/_hovertemplate.py +++ b/plotly/validators/pie/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="pie", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/pie/_hovertemplatesrc.py b/plotly/validators/pie/_hovertemplatesrc.py index 27bd761eb6..1edc8b4325 100644 --- a/plotly/validators/pie/_hovertemplatesrc.py +++ b/plotly/validators/pie/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="pie", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_hovertext.py b/plotly/validators/pie/_hovertext.py index 6dfc626320..a6a1619bf1 100644 --- a/plotly/validators/pie/_hovertext.py +++ b/plotly/validators/pie/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="pie", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/pie/_hovertextsrc.py b/plotly/validators/pie/_hovertextsrc.py index 43292c62e8..4e35cff96a 100644 --- a/plotly/validators/pie/_hovertextsrc.py +++ b/plotly/validators/pie/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="pie", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_ids.py b/plotly/validators/pie/_ids.py index 1762f18a12..365e6ad040 100644 --- a/plotly/validators/pie/_ids.py +++ b/plotly/validators/pie/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="pie", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_idssrc.py b/plotly/validators/pie/_idssrc.py index 80072a90ed..01ed723759 100644 --- a/plotly/validators/pie/_idssrc.py +++ b/plotly/validators/pie/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="pie", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_insidetextfont.py b/plotly/validators/pie/_insidetextfont.py index 2317e84b9f..339ad3e65a 100644 --- a/plotly/validators/pie/_insidetextfont.py +++ b/plotly/validators/pie/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="pie", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/pie/_insidetextorientation.py b/plotly/validators/pie/_insidetextorientation.py index f7f95efe46..3f209e04a4 100644 --- a/plotly/validators/pie/_insidetextorientation.py +++ b/plotly/validators/pie/_insidetextorientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class InsidetextorientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="insidetextorientation", parent_name="pie", **kwargs ): - super(InsidetextorientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["horizontal", "radial", "tangential", "auto"]), **kwargs, diff --git a/plotly/validators/pie/_label0.py b/plotly/validators/pie/_label0.py index 754dee98dd..058ec92288 100644 --- a/plotly/validators/pie/_label0.py +++ b/plotly/validators/pie/_label0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Label0Validator(_plotly_utils.basevalidators.NumberValidator): +class Label0Validator(_bv.NumberValidator): def __init__(self, plotly_name="label0", parent_name="pie", **kwargs): - super(Label0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_labels.py b/plotly/validators/pie/_labels.py index c08b30e8a2..6bce9d0681 100644 --- a/plotly/validators/pie/_labels.py +++ b/plotly/validators/pie/_labels.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="labels", parent_name="pie", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_labelssrc.py b/plotly/validators/pie/_labelssrc.py index fea5f08445..6e66c2fa92 100644 --- a/plotly/validators/pie/_labelssrc.py +++ b/plotly/validators/pie/_labelssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelssrc", parent_name="pie", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_legend.py b/plotly/validators/pie/_legend.py index ea35729c43..b58002c7b0 100644 --- a/plotly/validators/pie/_legend.py +++ b/plotly/validators/pie/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="pie", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/pie/_legendgroup.py b/plotly/validators/pie/_legendgroup.py index 6b0275bd56..f195279151 100644 --- a/plotly/validators/pie/_legendgroup.py +++ b/plotly/validators/pie/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="pie", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/_legendgrouptitle.py b/plotly/validators/pie/_legendgrouptitle.py index 554e619ac5..d6a9913550 100644 --- a/plotly/validators/pie/_legendgrouptitle.py +++ b/plotly/validators/pie/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="pie", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/pie/_legendrank.py b/plotly/validators/pie/_legendrank.py index 47a2e363cd..0c78fc1373 100644 --- a/plotly/validators/pie/_legendrank.py +++ b/plotly/validators/pie/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="pie", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/_legendwidth.py b/plotly/validators/pie/_legendwidth.py index 7db5dbdb2e..6af26e8056 100644 --- a/plotly/validators/pie/_legendwidth.py +++ b/plotly/validators/pie/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="pie", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/pie/_marker.py b/plotly/validators/pie/_marker.py index 5134bed1d8..f01f7ef413 100644 --- a/plotly/validators/pie/_marker.py +++ b/plotly/validators/pie/_marker.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="pie", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - colors - Sets the color of each sector. If not - specified, the default trace color set is used - to pick the sector colors. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.pie.marker.Line` - instance or dict with compatible properties - pattern - Sets the pattern within the marker. """, ), **kwargs, diff --git a/plotly/validators/pie/_meta.py b/plotly/validators/pie/_meta.py index 54fd038294..73972386ff 100644 --- a/plotly/validators/pie/_meta.py +++ b/plotly/validators/pie/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="pie", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/_metasrc.py b/plotly/validators/pie/_metasrc.py index dd7b78a6da..ab5e8bea97 100644 --- a/plotly/validators/pie/_metasrc.py +++ b/plotly/validators/pie/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="pie", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_name.py b/plotly/validators/pie/_name.py index 4997093701..cdd5c0c797 100644 --- a/plotly/validators/pie/_name.py +++ b/plotly/validators/pie/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="pie", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/_opacity.py b/plotly/validators/pie/_opacity.py index 19d7b58f57..03e1a68a49 100644 --- a/plotly/validators/pie/_opacity.py +++ b/plotly/validators/pie/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="pie", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/_outsidetextfont.py b/plotly/validators/pie/_outsidetextfont.py index 3556ed0bea..c368c12da7 100644 --- a/plotly/validators/pie/_outsidetextfont.py +++ b/plotly/validators/pie/_outsidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="outsidetextfont", parent_name="pie", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/pie/_pull.py b/plotly/validators/pie/_pull.py index 8d4b6856e0..0783b5c620 100644 --- a/plotly/validators/pie/_pull.py +++ b/plotly/validators/pie/_pull.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PullValidator(_plotly_utils.basevalidators.NumberValidator): +class PullValidator(_bv.NumberValidator): def __init__(self, plotly_name="pull", parent_name="pie", **kwargs): - super(PullValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/pie/_pullsrc.py b/plotly/validators/pie/_pullsrc.py index c1057e5560..befd79dd9c 100644 --- a/plotly/validators/pie/_pullsrc.py +++ b/plotly/validators/pie/_pullsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PullsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class PullsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="pullsrc", parent_name="pie", **kwargs): - super(PullsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_rotation.py b/plotly/validators/pie/_rotation.py index 449553a04e..02a80a9914 100644 --- a/plotly/validators/pie/_rotation.py +++ b/plotly/validators/pie/_rotation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RotationValidator(_plotly_utils.basevalidators.AngleValidator): +class RotationValidator(_bv.AngleValidator): def __init__(self, plotly_name="rotation", parent_name="pie", **kwargs): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_scalegroup.py b/plotly/validators/pie/_scalegroup.py index b1d8f35707..299b89ef7a 100644 --- a/plotly/validators/pie/_scalegroup.py +++ b/plotly/validators/pie/_scalegroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): +class ScalegroupValidator(_bv.StringValidator): def __init__(self, plotly_name="scalegroup", parent_name="pie", **kwargs): - super(ScalegroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_showlegend.py b/plotly/validators/pie/_showlegend.py index b076d79362..d3776f7a11 100644 --- a/plotly/validators/pie/_showlegend.py +++ b/plotly/validators/pie/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="pie", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/_sort.py b/plotly/validators/pie/_sort.py index 7452878a24..bd9f3a3d7d 100644 --- a/plotly/validators/pie/_sort.py +++ b/plotly/validators/pie/_sort.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SortValidator(_plotly_utils.basevalidators.BooleanValidator): +class SortValidator(_bv.BooleanValidator): def __init__(self, plotly_name="sort", parent_name="pie", **kwargs): - super(SortValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_stream.py b/plotly/validators/pie/_stream.py index 918ddba8ea..3831cca2af 100644 --- a/plotly/validators/pie/_stream.py +++ b/plotly/validators/pie/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="pie", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/pie/_text.py b/plotly/validators/pie/_text.py index aa0d25493b..7a460f8d16 100644 --- a/plotly/validators/pie/_text.py +++ b/plotly/validators/pie/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="pie", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/pie/_textfont.py b/plotly/validators/pie/_textfont.py index ccb8131e66..c2939f57da 100644 --- a/plotly/validators/pie/_textfont.py +++ b/plotly/validators/pie/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="pie", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/pie/_textinfo.py b/plotly/validators/pie/_textinfo.py index 438b045c82..d8d8404cc5 100644 --- a/plotly/validators/pie/_textinfo.py +++ b/plotly/validators/pie/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="pie", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["label", "text", "value", "percent"]), diff --git a/plotly/validators/pie/_textposition.py b/plotly/validators/pie/_textposition.py index 126819c1b8..bfd40a37b5 100644 --- a/plotly/validators/pie/_textposition.py +++ b/plotly/validators/pie/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="pie", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), diff --git a/plotly/validators/pie/_textpositionsrc.py b/plotly/validators/pie/_textpositionsrc.py index 614e7095f7..44d1d253d4 100644 --- a/plotly/validators/pie/_textpositionsrc.py +++ b/plotly/validators/pie/_textpositionsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textpositionsrc", parent_name="pie", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_textsrc.py b/plotly/validators/pie/_textsrc.py index 9086eca8b9..aaac0066b4 100644 --- a/plotly/validators/pie/_textsrc.py +++ b/plotly/validators/pie/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="pie", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_texttemplate.py b/plotly/validators/pie/_texttemplate.py index ca4ed09880..cb8e3cf412 100644 --- a/plotly/validators/pie/_texttemplate.py +++ b/plotly/validators/pie/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="pie", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/_texttemplatesrc.py b/plotly/validators/pie/_texttemplatesrc.py index 3b91319faf..3409b20f55 100644 --- a/plotly/validators/pie/_texttemplatesrc.py +++ b/plotly/validators/pie/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="pie", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_title.py b/plotly/validators/pie/_title.py index 4fe46334ae..6259bcd3eb 100644 --- a/plotly/validators/pie/_title.py +++ b/plotly/validators/pie/_title.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="pie", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets the font used for `title`. - position - Specifies the location of the `title`. - text - Sets the title of the chart. If it is empty, no - title is displayed. """, ), **kwargs, diff --git a/plotly/validators/pie/_uid.py b/plotly/validators/pie/_uid.py index d339151f5b..4e043d843f 100644 --- a/plotly/validators/pie/_uid.py +++ b/plotly/validators/pie/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="pie", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/pie/_uirevision.py b/plotly/validators/pie/_uirevision.py index a0b6c31895..2668614da6 100644 --- a/plotly/validators/pie/_uirevision.py +++ b/plotly/validators/pie/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="pie", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_values.py b/plotly/validators/pie/_values.py index 17be9a9c8f..fb5eb0c6de 100644 --- a/plotly/validators/pie/_values.py +++ b/plotly/validators/pie/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="pie", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/_valuessrc.py b/plotly/validators/pie/_valuessrc.py index 73310c9d24..8f8c06d001 100644 --- a/plotly/validators/pie/_valuessrc.py +++ b/plotly/validators/pie/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="pie", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/_visible.py b/plotly/validators/pie/_visible.py index 99cd1f7214..06b745cad4 100644 --- a/plotly/validators/pie/_visible.py +++ b/plotly/validators/pie/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="pie", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/pie/domain/__init__.py b/plotly/validators/pie/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/pie/domain/__init__.py +++ b/plotly/validators/pie/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/pie/domain/_column.py b/plotly/validators/pie/domain/_column.py index 0c258cc510..6c425cf4a6 100644 --- a/plotly/validators/pie/domain/_column.py +++ b/plotly/validators/pie/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="pie.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/pie/domain/_row.py b/plotly/validators/pie/domain/_row.py index b1817d17e6..67c03bf472 100644 --- a/plotly/validators/pie/domain/_row.py +++ b/plotly/validators/pie/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="pie.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/pie/domain/_x.py b/plotly/validators/pie/domain/_x.py index 0a45400d88..02ad707c72 100644 --- a/plotly/validators/pie/domain/_x.py +++ b/plotly/validators/pie/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="pie.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/pie/domain/_y.py b/plotly/validators/pie/domain/_y.py index b8a4b9f334..b3193c425f 100644 --- a/plotly/validators/pie/domain/_y.py +++ b/plotly/validators/pie/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="pie.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/pie/hoverlabel/__init__.py b/plotly/validators/pie/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/pie/hoverlabel/__init__.py +++ b/plotly/validators/pie/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/pie/hoverlabel/_align.py b/plotly/validators/pie/hoverlabel/_align.py index 9969ab0fd7..f8d8cbbaae 100644 --- a/plotly/validators/pie/hoverlabel/_align.py +++ b/plotly/validators/pie/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="pie.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/pie/hoverlabel/_alignsrc.py b/plotly/validators/pie/hoverlabel/_alignsrc.py index 34ce493aca..6020cd6d85 100644 --- a/plotly/validators/pie/hoverlabel/_alignsrc.py +++ b/plotly/validators/pie/hoverlabel/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="pie.hoverlabel", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/_bgcolor.py b/plotly/validators/pie/hoverlabel/_bgcolor.py index 1638710073..68836073ed 100644 --- a/plotly/validators/pie/hoverlabel/_bgcolor.py +++ b/plotly/validators/pie/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="pie.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/pie/hoverlabel/_bgcolorsrc.py b/plotly/validators/pie/hoverlabel/_bgcolorsrc.py index 78213f5ee1..56b86f2622 100644 --- a/plotly/validators/pie/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/pie/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="pie.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/_bordercolor.py b/plotly/validators/pie/hoverlabel/_bordercolor.py index 6548cb3968..f5222dcbd2 100644 --- a/plotly/validators/pie/hoverlabel/_bordercolor.py +++ b/plotly/validators/pie/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="pie.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/pie/hoverlabel/_bordercolorsrc.py b/plotly/validators/pie/hoverlabel/_bordercolorsrc.py index d8058ab466..69185cccbf 100644 --- a/plotly/validators/pie/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/pie/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="pie.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/_font.py b/plotly/validators/pie/hoverlabel/_font.py index 458c518a83..ca1657f6db 100644 --- a/plotly/validators/pie/hoverlabel/_font.py +++ b/plotly/validators/pie/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="pie.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/pie/hoverlabel/_namelength.py b/plotly/validators/pie/hoverlabel/_namelength.py index 7f42c7fdad..8cf727b91c 100644 --- a/plotly/validators/pie/hoverlabel/_namelength.py +++ b/plotly/validators/pie/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="pie.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/pie/hoverlabel/_namelengthsrc.py b/plotly/validators/pie/hoverlabel/_namelengthsrc.py index b467682d2b..617837afa3 100644 --- a/plotly/validators/pie/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/pie/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="pie.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/__init__.py b/plotly/validators/pie/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/pie/hoverlabel/font/__init__.py +++ b/plotly/validators/pie/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/hoverlabel/font/_color.py b/plotly/validators/pie/hoverlabel/font/_color.py index cee4bff0cd..72a7f727d7 100644 --- a/plotly/validators/pie/hoverlabel/font/_color.py +++ b/plotly/validators/pie/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="pie.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/pie/hoverlabel/font/_colorsrc.py b/plotly/validators/pie/hoverlabel/font/_colorsrc.py index ba0b5a0155..fdfc4d22b3 100644 --- a/plotly/validators/pie/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/pie/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_family.py b/plotly/validators/pie/hoverlabel/font/_family.py index 88afed15a2..243437f3e7 100644 --- a/plotly/validators/pie/hoverlabel/font/_family.py +++ b/plotly/validators/pie/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="pie.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/pie/hoverlabel/font/_familysrc.py b/plotly/validators/pie/hoverlabel/font/_familysrc.py index 1e66e6e1d8..bc215a800b 100644 --- a/plotly/validators/pie/hoverlabel/font/_familysrc.py +++ b/plotly/validators/pie/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_lineposition.py b/plotly/validators/pie/hoverlabel/font/_lineposition.py index bff23d0843..74ae58c18a 100644 --- a/plotly/validators/pie/hoverlabel/font/_lineposition.py +++ b/plotly/validators/pie/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="pie.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/pie/hoverlabel/font/_linepositionsrc.py b/plotly/validators/pie/hoverlabel/font/_linepositionsrc.py index 9bfa0fbf50..b48033b0d1 100644 --- a/plotly/validators/pie/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/pie/hoverlabel/font/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_shadow.py b/plotly/validators/pie/hoverlabel/font/_shadow.py index f22498fe21..0f31680504 100644 --- a/plotly/validators/pie/hoverlabel/font/_shadow.py +++ b/plotly/validators/pie/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="pie.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/pie/hoverlabel/font/_shadowsrc.py b/plotly/validators/pie/hoverlabel/font/_shadowsrc.py index a76ca8e0c5..64b4e5e55e 100644 --- a/plotly/validators/pie/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/pie/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_size.py b/plotly/validators/pie/hoverlabel/font/_size.py index 61830ff395..75e1aa491e 100644 --- a/plotly/validators/pie/hoverlabel/font/_size.py +++ b/plotly/validators/pie/hoverlabel/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.hoverlabel.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/pie/hoverlabel/font/_sizesrc.py b/plotly/validators/pie/hoverlabel/font/_sizesrc.py index 772e5a71f0..99a0dbed4e 100644 --- a/plotly/validators/pie/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/pie/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_style.py b/plotly/validators/pie/hoverlabel/font/_style.py index bc1081d6bc..7954698c49 100644 --- a/plotly/validators/pie/hoverlabel/font/_style.py +++ b/plotly/validators/pie/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="pie.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/pie/hoverlabel/font/_stylesrc.py b/plotly/validators/pie/hoverlabel/font/_stylesrc.py index 3b3af9af33..a7aa85442d 100644 --- a/plotly/validators/pie/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/pie/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_textcase.py b/plotly/validators/pie/hoverlabel/font/_textcase.py index 7547a425ec..6165ee94bc 100644 --- a/plotly/validators/pie/hoverlabel/font/_textcase.py +++ b/plotly/validators/pie/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="pie.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/pie/hoverlabel/font/_textcasesrc.py b/plotly/validators/pie/hoverlabel/font/_textcasesrc.py index 4985affcac..9f17da64bb 100644 --- a/plotly/validators/pie/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/pie/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_variant.py b/plotly/validators/pie/hoverlabel/font/_variant.py index b0b324b2a5..2503768625 100644 --- a/plotly/validators/pie/hoverlabel/font/_variant.py +++ b/plotly/validators/pie/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="pie.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/pie/hoverlabel/font/_variantsrc.py b/plotly/validators/pie/hoverlabel/font/_variantsrc.py index f726e7082b..c65545b320 100644 --- a/plotly/validators/pie/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/pie/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/hoverlabel/font/_weight.py b/plotly/validators/pie/hoverlabel/font/_weight.py index b8a9c31a93..49e8a4c381 100644 --- a/plotly/validators/pie/hoverlabel/font/_weight.py +++ b/plotly/validators/pie/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="pie.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/pie/hoverlabel/font/_weightsrc.py b/plotly/validators/pie/hoverlabel/font/_weightsrc.py index 25932b7bfb..23560157eb 100644 --- a/plotly/validators/pie/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/pie/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="pie.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/__init__.py b/plotly/validators/pie/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/pie/insidetextfont/__init__.py +++ b/plotly/validators/pie/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/insidetextfont/_color.py b/plotly/validators/pie/insidetextfont/_color.py index 766d4a5f19..6a373af2ab 100644 --- a/plotly/validators/pie/insidetextfont/_color.py +++ b/plotly/validators/pie/insidetextfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="pie.insidetextfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/insidetextfont/_colorsrc.py b/plotly/validators/pie/insidetextfont/_colorsrc.py index ce1bfb2bda..a84a683b52 100644 --- a/plotly/validators/pie/insidetextfont/_colorsrc.py +++ b/plotly/validators/pie/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="pie.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_family.py b/plotly/validators/pie/insidetextfont/_family.py index b5a0591c73..04cb542a9b 100644 --- a/plotly/validators/pie/insidetextfont/_family.py +++ b/plotly/validators/pie/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="pie.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/pie/insidetextfont/_familysrc.py b/plotly/validators/pie/insidetextfont/_familysrc.py index 1619bc278f..3c5502c6f6 100644 --- a/plotly/validators/pie/insidetextfont/_familysrc.py +++ b/plotly/validators/pie/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="pie.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_lineposition.py b/plotly/validators/pie/insidetextfont/_lineposition.py index 73d4e15f44..81a61abafd 100644 --- a/plotly/validators/pie/insidetextfont/_lineposition.py +++ b/plotly/validators/pie/insidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="pie.insidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/pie/insidetextfont/_linepositionsrc.py b/plotly/validators/pie/insidetextfont/_linepositionsrc.py index 549a5cd5f2..051550e99d 100644 --- a/plotly/validators/pie/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/pie/insidetextfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="pie.insidetextfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_shadow.py b/plotly/validators/pie/insidetextfont/_shadow.py index 071e336092..745ce404f1 100644 --- a/plotly/validators/pie/insidetextfont/_shadow.py +++ b/plotly/validators/pie/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="pie.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/insidetextfont/_shadowsrc.py b/plotly/validators/pie/insidetextfont/_shadowsrc.py index 5c1ff1c7bc..214b442a1c 100644 --- a/plotly/validators/pie/insidetextfont/_shadowsrc.py +++ b/plotly/validators/pie/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="pie.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_size.py b/plotly/validators/pie/insidetextfont/_size.py index 61e49b12c9..17d6258905 100644 --- a/plotly/validators/pie/insidetextfont/_size.py +++ b/plotly/validators/pie/insidetextfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.insidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/pie/insidetextfont/_sizesrc.py b/plotly/validators/pie/insidetextfont/_sizesrc.py index d91b5f7820..c5bbc0936e 100644 --- a/plotly/validators/pie/insidetextfont/_sizesrc.py +++ b/plotly/validators/pie/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="pie.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_style.py b/plotly/validators/pie/insidetextfont/_style.py index 9cddcf17c7..8839565d4b 100644 --- a/plotly/validators/pie/insidetextfont/_style.py +++ b/plotly/validators/pie/insidetextfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="pie.insidetextfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/pie/insidetextfont/_stylesrc.py b/plotly/validators/pie/insidetextfont/_stylesrc.py index eb571706b0..9e8c74dccb 100644 --- a/plotly/validators/pie/insidetextfont/_stylesrc.py +++ b/plotly/validators/pie/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="pie.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_textcase.py b/plotly/validators/pie/insidetextfont/_textcase.py index 7f9eb4d6ca..dc88470dce 100644 --- a/plotly/validators/pie/insidetextfont/_textcase.py +++ b/plotly/validators/pie/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="pie.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/pie/insidetextfont/_textcasesrc.py b/plotly/validators/pie/insidetextfont/_textcasesrc.py index e1e6a7fb64..3846b5f650 100644 --- a/plotly/validators/pie/insidetextfont/_textcasesrc.py +++ b/plotly/validators/pie/insidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="pie.insidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_variant.py b/plotly/validators/pie/insidetextfont/_variant.py index b7c4898b16..4ad7bf21ea 100644 --- a/plotly/validators/pie/insidetextfont/_variant.py +++ b/plotly/validators/pie/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="pie.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/pie/insidetextfont/_variantsrc.py b/plotly/validators/pie/insidetextfont/_variantsrc.py index d983c78ebf..2c2f0630a4 100644 --- a/plotly/validators/pie/insidetextfont/_variantsrc.py +++ b/plotly/validators/pie/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="pie.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/insidetextfont/_weight.py b/plotly/validators/pie/insidetextfont/_weight.py index 44dbb65969..c86045153d 100644 --- a/plotly/validators/pie/insidetextfont/_weight.py +++ b/plotly/validators/pie/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="pie.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/pie/insidetextfont/_weightsrc.py b/plotly/validators/pie/insidetextfont/_weightsrc.py index 13f0f39554..72bce9ad44 100644 --- a/plotly/validators/pie/insidetextfont/_weightsrc.py +++ b/plotly/validators/pie/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="pie.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/legendgrouptitle/__init__.py b/plotly/validators/pie/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/pie/legendgrouptitle/__init__.py +++ b/plotly/validators/pie/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/pie/legendgrouptitle/_font.py b/plotly/validators/pie/legendgrouptitle/_font.py index 021bba6030..c473646e7c 100644 --- a/plotly/validators/pie/legendgrouptitle/_font.py +++ b/plotly/validators/pie/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="pie.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/pie/legendgrouptitle/_text.py b/plotly/validators/pie/legendgrouptitle/_text.py index 625fdaf756..ddbb11280e 100644 --- a/plotly/validators/pie/legendgrouptitle/_text.py +++ b/plotly/validators/pie/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="pie.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/legendgrouptitle/font/__init__.py b/plotly/validators/pie/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/pie/legendgrouptitle/font/__init__.py +++ b/plotly/validators/pie/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/legendgrouptitle/font/_color.py b/plotly/validators/pie/legendgrouptitle/font/_color.py index a3d4f718a5..04d7e168f5 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_color.py +++ b/plotly/validators/pie/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/legendgrouptitle/font/_family.py b/plotly/validators/pie/legendgrouptitle/font/_family.py index 861181b871..19e6605aca 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_family.py +++ b/plotly/validators/pie/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/pie/legendgrouptitle/font/_lineposition.py b/plotly/validators/pie/legendgrouptitle/font/_lineposition.py index 2d7e00d3e4..2bdf4b25d0 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/pie/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="pie.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/pie/legendgrouptitle/font/_shadow.py b/plotly/validators/pie/legendgrouptitle/font/_shadow.py index bea3fdad67..a26ef394d6 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/pie/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/pie/legendgrouptitle/font/_size.py b/plotly/validators/pie/legendgrouptitle/font/_size.py index e3e710fa5f..1955a69c9c 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_size.py +++ b/plotly/validators/pie/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/pie/legendgrouptitle/font/_style.py b/plotly/validators/pie/legendgrouptitle/font/_style.py index e3824fea45..8913ade130 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_style.py +++ b/plotly/validators/pie/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/pie/legendgrouptitle/font/_textcase.py b/plotly/validators/pie/legendgrouptitle/font/_textcase.py index 81c2f2edb5..4f64b3e372 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/pie/legendgrouptitle/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/pie/legendgrouptitle/font/_variant.py b/plotly/validators/pie/legendgrouptitle/font/_variant.py index 6213aae355..1546e9bf13 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_variant.py +++ b/plotly/validators/pie/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/pie/legendgrouptitle/font/_weight.py b/plotly/validators/pie/legendgrouptitle/font/_weight.py index bea2b3a83e..e522e1aeaa 100644 --- a/plotly/validators/pie/legendgrouptitle/font/_weight.py +++ b/plotly/validators/pie/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="pie.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/pie/marker/__init__.py b/plotly/validators/pie/marker/__init__.py index aeae3564f6..22860e3333 100644 --- a/plotly/validators/pie/marker/__init__.py +++ b/plotly/validators/pie/marker/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._pattern import PatternValidator - from ._line import LineValidator - from ._colorssrc import ColorssrcValidator - from ._colors import ColorsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._pattern.PatternValidator", - "._line.LineValidator", - "._colorssrc.ColorssrcValidator", - "._colors.ColorsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._pattern.PatternValidator", + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colors.ColorsValidator", + ], +) diff --git a/plotly/validators/pie/marker/_colors.py b/plotly/validators/pie/marker/_colors.py index 4d1ce95030..a0e1b9f91e 100644 --- a/plotly/validators/pie/marker/_colors.py +++ b/plotly/validators/pie/marker/_colors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="colors", parent_name="pie.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/pie/marker/_colorssrc.py b/plotly/validators/pie/marker/_colorssrc.py index bf222615f2..5db6009cd9 100644 --- a/plotly/validators/pie/marker/_colorssrc.py +++ b/plotly/validators/pie/marker/_colorssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorssrc", parent_name="pie.marker", **kwargs): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/_line.py b/plotly/validators/pie/marker/_line.py index 05f8f1dc82..3480b4f45c 100644 --- a/plotly/validators/pie/marker/_line.py +++ b/plotly/validators/pie/marker/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="pie.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/pie/marker/_pattern.py b/plotly/validators/pie/marker/_pattern.py index 4e0277de40..245335719b 100644 --- a/plotly/validators/pie/marker/_pattern.py +++ b/plotly/validators/pie/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="pie.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/pie/marker/line/__init__.py b/plotly/validators/pie/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/pie/marker/line/__init__.py +++ b/plotly/validators/pie/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/marker/line/_color.py b/plotly/validators/pie/marker/line/_color.py index 2fb231f787..2224b9b028 100644 --- a/plotly/validators/pie/marker/line/_color.py +++ b/plotly/validators/pie/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="pie.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/pie/marker/line/_colorsrc.py b/plotly/validators/pie/marker/line/_colorsrc.py index 9178fffd55..c18b9ce211 100644 --- a/plotly/validators/pie/marker/line/_colorsrc.py +++ b/plotly/validators/pie/marker/line/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="pie.marker.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/line/_width.py b/plotly/validators/pie/marker/line/_width.py index a754a75ab1..c74227fa9a 100644 --- a/plotly/validators/pie/marker/line/_width.py +++ b/plotly/validators/pie/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="pie.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/marker/line/_widthsrc.py b/plotly/validators/pie/marker/line/_widthsrc.py index f20132c2bf..554794aed4 100644 --- a/plotly/validators/pie/marker/line/_widthsrc.py +++ b/plotly/validators/pie/marker/line/_widthsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="widthsrc", parent_name="pie.marker.line", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/pattern/__init__.py b/plotly/validators/pie/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/pie/marker/pattern/__init__.py +++ b/plotly/validators/pie/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/pie/marker/pattern/_bgcolor.py b/plotly/validators/pie/marker/pattern/_bgcolor.py index 4dedd28ff5..a46f27079d 100644 --- a/plotly/validators/pie/marker/pattern/_bgcolor.py +++ b/plotly/validators/pie/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="pie.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/pie/marker/pattern/_bgcolorsrc.py b/plotly/validators/pie/marker/pattern/_bgcolorsrc.py index 874028535e..168386e5dd 100644 --- a/plotly/validators/pie/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/pie/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="pie.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/pattern/_fgcolor.py b/plotly/validators/pie/marker/pattern/_fgcolor.py index f21b05dc0f..99b24d74c1 100644 --- a/plotly/validators/pie/marker/pattern/_fgcolor.py +++ b/plotly/validators/pie/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="pie.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/pie/marker/pattern/_fgcolorsrc.py b/plotly/validators/pie/marker/pattern/_fgcolorsrc.py index 74c793c646..feb852d2fe 100644 --- a/plotly/validators/pie/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/pie/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="pie.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/pattern/_fgopacity.py b/plotly/validators/pie/marker/pattern/_fgopacity.py index 0c1532e719..555558c832 100644 --- a/plotly/validators/pie/marker/pattern/_fgopacity.py +++ b/plotly/validators/pie/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="pie.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/marker/pattern/_fillmode.py b/plotly/validators/pie/marker/pattern/_fillmode.py index bf9a1e9556..580581dc31 100644 --- a/plotly/validators/pie/marker/pattern/_fillmode.py +++ b/plotly/validators/pie/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="pie.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/pie/marker/pattern/_shape.py b/plotly/validators/pie/marker/pattern/_shape.py index f87457d72e..ee7d94077b 100644 --- a/plotly/validators/pie/marker/pattern/_shape.py +++ b/plotly/validators/pie/marker/pattern/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="pie.marker.pattern", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/pie/marker/pattern/_shapesrc.py b/plotly/validators/pie/marker/pattern/_shapesrc.py index aaff7d1bdf..c9a6bb73c5 100644 --- a/plotly/validators/pie/marker/pattern/_shapesrc.py +++ b/plotly/validators/pie/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="pie.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/pattern/_size.py b/plotly/validators/pie/marker/pattern/_size.py index 60b1369ae7..b0628e26d2 100644 --- a/plotly/validators/pie/marker/pattern/_size.py +++ b/plotly/validators/pie/marker/pattern/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.marker.pattern", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/marker/pattern/_sizesrc.py b/plotly/validators/pie/marker/pattern/_sizesrc.py index d461056afc..74770b2e3c 100644 --- a/plotly/validators/pie/marker/pattern/_sizesrc.py +++ b/plotly/validators/pie/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="pie.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/marker/pattern/_solidity.py b/plotly/validators/pie/marker/pattern/_solidity.py index 5b6b873891..3ece16bd5a 100644 --- a/plotly/validators/pie/marker/pattern/_solidity.py +++ b/plotly/validators/pie/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="pie.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/pie/marker/pattern/_soliditysrc.py b/plotly/validators/pie/marker/pattern/_soliditysrc.py index 0a5d34df31..2d02ff036c 100644 --- a/plotly/validators/pie/marker/pattern/_soliditysrc.py +++ b/plotly/validators/pie/marker/pattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="pie.marker.pattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/__init__.py b/plotly/validators/pie/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/pie/outsidetextfont/__init__.py +++ b/plotly/validators/pie/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/outsidetextfont/_color.py b/plotly/validators/pie/outsidetextfont/_color.py index f4a3293445..680dede694 100644 --- a/plotly/validators/pie/outsidetextfont/_color.py +++ b/plotly/validators/pie/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="pie.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/outsidetextfont/_colorsrc.py b/plotly/validators/pie/outsidetextfont/_colorsrc.py index 762400b6a9..483ad83b40 100644 --- a/plotly/validators/pie/outsidetextfont/_colorsrc.py +++ b/plotly/validators/pie/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="pie.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_family.py b/plotly/validators/pie/outsidetextfont/_family.py index 6f5602956f..0b52323e04 100644 --- a/plotly/validators/pie/outsidetextfont/_family.py +++ b/plotly/validators/pie/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="pie.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/pie/outsidetextfont/_familysrc.py b/plotly/validators/pie/outsidetextfont/_familysrc.py index db526c184a..7be558c6c4 100644 --- a/plotly/validators/pie/outsidetextfont/_familysrc.py +++ b/plotly/validators/pie/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="pie.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_lineposition.py b/plotly/validators/pie/outsidetextfont/_lineposition.py index bbd9f2f9a8..cdcc4f44a8 100644 --- a/plotly/validators/pie/outsidetextfont/_lineposition.py +++ b/plotly/validators/pie/outsidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="pie.outsidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/pie/outsidetextfont/_linepositionsrc.py b/plotly/validators/pie/outsidetextfont/_linepositionsrc.py index 542347140a..3d7f2fdd3f 100644 --- a/plotly/validators/pie/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/pie/outsidetextfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="pie.outsidetextfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_shadow.py b/plotly/validators/pie/outsidetextfont/_shadow.py index 51d51e11e4..d0e33821f5 100644 --- a/plotly/validators/pie/outsidetextfont/_shadow.py +++ b/plotly/validators/pie/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="pie.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/outsidetextfont/_shadowsrc.py b/plotly/validators/pie/outsidetextfont/_shadowsrc.py index 06af4c478b..250ed98ca0 100644 --- a/plotly/validators/pie/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/pie/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="pie.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_size.py b/plotly/validators/pie/outsidetextfont/_size.py index 4078cfb9d2..89d1933cfa 100644 --- a/plotly/validators/pie/outsidetextfont/_size.py +++ b/plotly/validators/pie/outsidetextfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.outsidetextfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/pie/outsidetextfont/_sizesrc.py b/plotly/validators/pie/outsidetextfont/_sizesrc.py index 9e4318a4d6..9b947ab224 100644 --- a/plotly/validators/pie/outsidetextfont/_sizesrc.py +++ b/plotly/validators/pie/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="pie.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_style.py b/plotly/validators/pie/outsidetextfont/_style.py index 18818047ec..8d9749b9d2 100644 --- a/plotly/validators/pie/outsidetextfont/_style.py +++ b/plotly/validators/pie/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="pie.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/pie/outsidetextfont/_stylesrc.py b/plotly/validators/pie/outsidetextfont/_stylesrc.py index 3ca7e751e6..1af6560f37 100644 --- a/plotly/validators/pie/outsidetextfont/_stylesrc.py +++ b/plotly/validators/pie/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="pie.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_textcase.py b/plotly/validators/pie/outsidetextfont/_textcase.py index 7a32a1542b..3255b38175 100644 --- a/plotly/validators/pie/outsidetextfont/_textcase.py +++ b/plotly/validators/pie/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="pie.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/pie/outsidetextfont/_textcasesrc.py b/plotly/validators/pie/outsidetextfont/_textcasesrc.py index 6fdb93bb06..6eeca0e510 100644 --- a/plotly/validators/pie/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/pie/outsidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="pie.outsidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_variant.py b/plotly/validators/pie/outsidetextfont/_variant.py index 39fa39f1d7..8b9aa576cf 100644 --- a/plotly/validators/pie/outsidetextfont/_variant.py +++ b/plotly/validators/pie/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="pie.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/pie/outsidetextfont/_variantsrc.py b/plotly/validators/pie/outsidetextfont/_variantsrc.py index 32a9ad3e19..2c3858e1c9 100644 --- a/plotly/validators/pie/outsidetextfont/_variantsrc.py +++ b/plotly/validators/pie/outsidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="pie.outsidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/outsidetextfont/_weight.py b/plotly/validators/pie/outsidetextfont/_weight.py index 6688663e82..1e572cc5b4 100644 --- a/plotly/validators/pie/outsidetextfont/_weight.py +++ b/plotly/validators/pie/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="pie.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/pie/outsidetextfont/_weightsrc.py b/plotly/validators/pie/outsidetextfont/_weightsrc.py index 650d7367dd..0d20a26ccd 100644 --- a/plotly/validators/pie/outsidetextfont/_weightsrc.py +++ b/plotly/validators/pie/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="pie.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/stream/__init__.py b/plotly/validators/pie/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/pie/stream/__init__.py +++ b/plotly/validators/pie/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/pie/stream/_maxpoints.py b/plotly/validators/pie/stream/_maxpoints.py index 3f152ff71a..eac09187a3 100644 --- a/plotly/validators/pie/stream/_maxpoints.py +++ b/plotly/validators/pie/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="pie.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/pie/stream/_token.py b/plotly/validators/pie/stream/_token.py index 58022ebab7..e6f94f4a56 100644 --- a/plotly/validators/pie/stream/_token.py +++ b/plotly/validators/pie/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="pie.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/pie/textfont/__init__.py b/plotly/validators/pie/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/pie/textfont/__init__.py +++ b/plotly/validators/pie/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/textfont/_color.py b/plotly/validators/pie/textfont/_color.py index 150670ebd0..f9ec6e738f 100644 --- a/plotly/validators/pie/textfont/_color.py +++ b/plotly/validators/pie/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="pie.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/textfont/_colorsrc.py b/plotly/validators/pie/textfont/_colorsrc.py index 40006c00be..aa3c80f5a1 100644 --- a/plotly/validators/pie/textfont/_colorsrc.py +++ b/plotly/validators/pie/textfont/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="pie.textfont", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_family.py b/plotly/validators/pie/textfont/_family.py index 0bb6404dc6..c5c0f7ebe5 100644 --- a/plotly/validators/pie/textfont/_family.py +++ b/plotly/validators/pie/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="pie.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/pie/textfont/_familysrc.py b/plotly/validators/pie/textfont/_familysrc.py index f3d83a1dd9..f50537d24a 100644 --- a/plotly/validators/pie/textfont/_familysrc.py +++ b/plotly/validators/pie/textfont/_familysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="familysrc", parent_name="pie.textfont", **kwargs): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_lineposition.py b/plotly/validators/pie/textfont/_lineposition.py index a70daf89df..4abe6d4e8d 100644 --- a/plotly/validators/pie/textfont/_lineposition.py +++ b/plotly/validators/pie/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="pie.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/pie/textfont/_linepositionsrc.py b/plotly/validators/pie/textfont/_linepositionsrc.py index 6894e5700a..ee6867018f 100644 --- a/plotly/validators/pie/textfont/_linepositionsrc.py +++ b/plotly/validators/pie/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="pie.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_shadow.py b/plotly/validators/pie/textfont/_shadow.py index a1a4791c23..50dbb9bfde 100644 --- a/plotly/validators/pie/textfont/_shadow.py +++ b/plotly/validators/pie/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="pie.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/textfont/_shadowsrc.py b/plotly/validators/pie/textfont/_shadowsrc.py index 313072823e..bb8bfbbe8d 100644 --- a/plotly/validators/pie/textfont/_shadowsrc.py +++ b/plotly/validators/pie/textfont/_shadowsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="shadowsrc", parent_name="pie.textfont", **kwargs): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_size.py b/plotly/validators/pie/textfont/_size.py index bc163ab534..a5dc6cd2f3 100644 --- a/plotly/validators/pie/textfont/_size.py +++ b/plotly/validators/pie/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/pie/textfont/_sizesrc.py b/plotly/validators/pie/textfont/_sizesrc.py index e8c4d79fd5..cda5dfac57 100644 --- a/plotly/validators/pie/textfont/_sizesrc.py +++ b/plotly/validators/pie/textfont/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="pie.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_style.py b/plotly/validators/pie/textfont/_style.py index d4c169651a..b1054933d2 100644 --- a/plotly/validators/pie/textfont/_style.py +++ b/plotly/validators/pie/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="pie.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/pie/textfont/_stylesrc.py b/plotly/validators/pie/textfont/_stylesrc.py index 7fb87ebdb2..4a77e16c1f 100644 --- a/plotly/validators/pie/textfont/_stylesrc.py +++ b/plotly/validators/pie/textfont/_stylesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="stylesrc", parent_name="pie.textfont", **kwargs): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_textcase.py b/plotly/validators/pie/textfont/_textcase.py index a9df1d8b06..196a30933e 100644 --- a/plotly/validators/pie/textfont/_textcase.py +++ b/plotly/validators/pie/textfont/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="pie.textfont", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/pie/textfont/_textcasesrc.py b/plotly/validators/pie/textfont/_textcasesrc.py index 9714e8e4b2..0594704930 100644 --- a/plotly/validators/pie/textfont/_textcasesrc.py +++ b/plotly/validators/pie/textfont/_textcasesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textcasesrc", parent_name="pie.textfont", **kwargs): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_variant.py b/plotly/validators/pie/textfont/_variant.py index 27bc860dc6..ac18e917d6 100644 --- a/plotly/validators/pie/textfont/_variant.py +++ b/plotly/validators/pie/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="pie.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/pie/textfont/_variantsrc.py b/plotly/validators/pie/textfont/_variantsrc.py index a79cf5d843..841cd1b7e2 100644 --- a/plotly/validators/pie/textfont/_variantsrc.py +++ b/plotly/validators/pie/textfont/_variantsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="variantsrc", parent_name="pie.textfont", **kwargs): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/textfont/_weight.py b/plotly/validators/pie/textfont/_weight.py index eb2ed903f2..a34b15a301 100644 --- a/plotly/validators/pie/textfont/_weight.py +++ b/plotly/validators/pie/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="pie.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/pie/textfont/_weightsrc.py b/plotly/validators/pie/textfont/_weightsrc.py index 8cc58186e4..6624034963 100644 --- a/plotly/validators/pie/textfont/_weightsrc.py +++ b/plotly/validators/pie/textfont/_weightsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="weightsrc", parent_name="pie.textfont", **kwargs): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/__init__.py b/plotly/validators/pie/title/__init__.py index bedd4ba176..8d5c91b29e 100644 --- a/plotly/validators/pie/title/__init__.py +++ b/plotly/validators/pie/title/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._position import PositionValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._text.TextValidator", - "._position.PositionValidator", - "._font.FontValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._position.PositionValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/pie/title/_font.py b/plotly/validators/pie/title/_font.py index dc7359145a..2cc34d3d31 100644 --- a/plotly/validators/pie/title/_font.py +++ b/plotly/validators/pie/title/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="pie.title", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/pie/title/_position.py b/plotly/validators/pie/title/_position.py index de1de712a2..0108aa4e64 100644 --- a/plotly/validators/pie/title/_position.py +++ b/plotly/validators/pie/title/_position.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="position", parent_name="pie.title", **kwargs): - super(PositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/pie/title/_text.py b/plotly/validators/pie/title/_text.py index 45178d2e64..059d76c9f5 100644 --- a/plotly/validators/pie/title/_text.py +++ b/plotly/validators/pie/title/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="pie.title", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/__init__.py b/plotly/validators/pie/title/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/pie/title/font/__init__.py +++ b/plotly/validators/pie/title/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/pie/title/font/_color.py b/plotly/validators/pie/title/font/_color.py index ebca1fb016..0bdf041441 100644 --- a/plotly/validators/pie/title/font/_color.py +++ b/plotly/validators/pie/title/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="pie.title.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/title/font/_colorsrc.py b/plotly/validators/pie/title/font/_colorsrc.py index 5244a8ff1c..56de452cef 100644 --- a/plotly/validators/pie/title/font/_colorsrc.py +++ b/plotly/validators/pie/title/font/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="pie.title.font", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_family.py b/plotly/validators/pie/title/font/_family.py index 04cb80f5b4..531ab60dca 100644 --- a/plotly/validators/pie/title/font/_family.py +++ b/plotly/validators/pie/title/font/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="pie.title.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/pie/title/font/_familysrc.py b/plotly/validators/pie/title/font/_familysrc.py index 1415d300f6..b0a70d5f24 100644 --- a/plotly/validators/pie/title/font/_familysrc.py +++ b/plotly/validators/pie/title/font/_familysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="familysrc", parent_name="pie.title.font", **kwargs): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_lineposition.py b/plotly/validators/pie/title/font/_lineposition.py index f5bc7cab64..37af47c8f9 100644 --- a/plotly/validators/pie/title/font/_lineposition.py +++ b/plotly/validators/pie/title/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="pie.title.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/pie/title/font/_linepositionsrc.py b/plotly/validators/pie/title/font/_linepositionsrc.py index 0d6aa40f68..5f04084db1 100644 --- a/plotly/validators/pie/title/font/_linepositionsrc.py +++ b/plotly/validators/pie/title/font/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="pie.title.font", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_shadow.py b/plotly/validators/pie/title/font/_shadow.py index b250380958..e7fc35f476 100644 --- a/plotly/validators/pie/title/font/_shadow.py +++ b/plotly/validators/pie/title/font/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="pie.title.font", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/pie/title/font/_shadowsrc.py b/plotly/validators/pie/title/font/_shadowsrc.py index f92c1c3179..a5ecded565 100644 --- a/plotly/validators/pie/title/font/_shadowsrc.py +++ b/plotly/validators/pie/title/font/_shadowsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="shadowsrc", parent_name="pie.title.font", **kwargs): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_size.py b/plotly/validators/pie/title/font/_size.py index 2b643a0f2c..f15cec85d4 100644 --- a/plotly/validators/pie/title/font/_size.py +++ b/plotly/validators/pie/title/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="pie.title.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/pie/title/font/_sizesrc.py b/plotly/validators/pie/title/font/_sizesrc.py index 0e6a1711d1..36a6bafb6b 100644 --- a/plotly/validators/pie/title/font/_sizesrc.py +++ b/plotly/validators/pie/title/font/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="pie.title.font", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_style.py b/plotly/validators/pie/title/font/_style.py index b86b4fa9ce..d9b72d0473 100644 --- a/plotly/validators/pie/title/font/_style.py +++ b/plotly/validators/pie/title/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="pie.title.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/pie/title/font/_stylesrc.py b/plotly/validators/pie/title/font/_stylesrc.py index 0b92871703..d38a97d0b9 100644 --- a/plotly/validators/pie/title/font/_stylesrc.py +++ b/plotly/validators/pie/title/font/_stylesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="stylesrc", parent_name="pie.title.font", **kwargs): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_textcase.py b/plotly/validators/pie/title/font/_textcase.py index 289055989a..ec7b359fed 100644 --- a/plotly/validators/pie/title/font/_textcase.py +++ b/plotly/validators/pie/title/font/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="pie.title.font", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/pie/title/font/_textcasesrc.py b/plotly/validators/pie/title/font/_textcasesrc.py index 556cadde04..638cff4091 100644 --- a/plotly/validators/pie/title/font/_textcasesrc.py +++ b/plotly/validators/pie/title/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="pie.title.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_variant.py b/plotly/validators/pie/title/font/_variant.py index eb19f35fa9..e6c80eb411 100644 --- a/plotly/validators/pie/title/font/_variant.py +++ b/plotly/validators/pie/title/font/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="pie.title.font", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/pie/title/font/_variantsrc.py b/plotly/validators/pie/title/font/_variantsrc.py index f0afc43e79..aeb17bebc5 100644 --- a/plotly/validators/pie/title/font/_variantsrc.py +++ b/plotly/validators/pie/title/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="pie.title.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/pie/title/font/_weight.py b/plotly/validators/pie/title/font/_weight.py index 3b856f65a2..82a76d0f24 100644 --- a/plotly/validators/pie/title/font/_weight.py +++ b/plotly/validators/pie/title/font/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="pie.title.font", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/pie/title/font/_weightsrc.py b/plotly/validators/pie/title/font/_weightsrc.py index e9e8568e76..a625c59a1d 100644 --- a/plotly/validators/pie/title/font/_weightsrc.py +++ b/plotly/validators/pie/title/font/_weightsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="weightsrc", parent_name="pie.title.font", **kwargs): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/__init__.py b/plotly/validators/sankey/__init__.py index 0dd341cd80..9cde0f22be 100644 --- a/plotly/validators/sankey/__init__.py +++ b/plotly/validators/sankey/__init__.py @@ -1,65 +1,35 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuesuffix import ValuesuffixValidator - from ._valueformat import ValueformatValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textfont import TextfontValidator - from ._stream import StreamValidator - from ._selectedpoints import SelectedpointsValidator - from ._orientation import OrientationValidator - from ._node import NodeValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._link import LinkValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfo import HoverinfoValidator - from ._domain import DomainValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._arrangement import ArrangementValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuesuffix.ValuesuffixValidator", - "._valueformat.ValueformatValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textfont.TextfontValidator", - "._stream.StreamValidator", - "._selectedpoints.SelectedpointsValidator", - "._orientation.OrientationValidator", - "._node.NodeValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._link.LinkValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfo.HoverinfoValidator", - "._domain.DomainValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._arrangement.ArrangementValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuesuffix.ValuesuffixValidator", + "._valueformat.ValueformatValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textfont.TextfontValidator", + "._stream.StreamValidator", + "._selectedpoints.SelectedpointsValidator", + "._orientation.OrientationValidator", + "._node.NodeValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._link.LinkValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._arrangement.ArrangementValidator", + ], +) diff --git a/plotly/validators/sankey/_arrangement.py b/plotly/validators/sankey/_arrangement.py index eaa87b4218..ce6b73a65a 100644 --- a/plotly/validators/sankey/_arrangement.py +++ b/plotly/validators/sankey/_arrangement.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrangementValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ArrangementValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="arrangement", parent_name="sankey", **kwargs): - super(ArrangementValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["snap", "perpendicular", "freeform", "fixed"]), **kwargs, diff --git a/plotly/validators/sankey/_customdata.py b/plotly/validators/sankey/_customdata.py index 82d6f56ded..670b078797 100644 --- a/plotly/validators/sankey/_customdata.py +++ b/plotly/validators/sankey/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="sankey", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/_customdatasrc.py b/plotly/validators/sankey/_customdatasrc.py index 28d0375322..a98007c7de 100644 --- a/plotly/validators/sankey/_customdatasrc.py +++ b/plotly/validators/sankey/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="sankey", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/_domain.py b/plotly/validators/sankey/_domain.py index 49f08934c4..6f99202221 100644 --- a/plotly/validators/sankey/_domain.py +++ b/plotly/validators/sankey/_domain.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="sankey", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this sankey trace . - row - If there is a layout grid, use the domain for - this row in the grid for this sankey trace . - x - Sets the horizontal domain of this sankey trace - (in plot fraction). - y - Sets the vertical domain of this sankey trace - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/sankey/_hoverinfo.py b/plotly/validators/sankey/_hoverinfo.py index 0eaec18c76..46956766df 100644 --- a/plotly/validators/sankey/_hoverinfo.py +++ b/plotly/validators/sankey/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="sankey", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/sankey/_hoverlabel.py b/plotly/validators/sankey/_hoverlabel.py index 274e3802ed..469ccc1f32 100644 --- a/plotly/validators/sankey/_hoverlabel.py +++ b/plotly/validators/sankey/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="sankey", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/sankey/_ids.py b/plotly/validators/sankey/_ids.py index 17f678fb7d..dc084d46fa 100644 --- a/plotly/validators/sankey/_ids.py +++ b/plotly/validators/sankey/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="sankey", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/_idssrc.py b/plotly/validators/sankey/_idssrc.py index b11c849c89..d5ba98db4b 100644 --- a/plotly/validators/sankey/_idssrc.py +++ b/plotly/validators/sankey/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="sankey", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/_legend.py b/plotly/validators/sankey/_legend.py index e67b2337e6..84261a731b 100644 --- a/plotly/validators/sankey/_legend.py +++ b/plotly/validators/sankey/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="sankey", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/sankey/_legendgrouptitle.py b/plotly/validators/sankey/_legendgrouptitle.py index 146731e416..2bd27295ea 100644 --- a/plotly/validators/sankey/_legendgrouptitle.py +++ b/plotly/validators/sankey/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="sankey", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/sankey/_legendrank.py b/plotly/validators/sankey/_legendrank.py index efca79efb6..6376d5715f 100644 --- a/plotly/validators/sankey/_legendrank.py +++ b/plotly/validators/sankey/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="sankey", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sankey/_legendwidth.py b/plotly/validators/sankey/_legendwidth.py index 1fe5d518ca..d4ec1a9986 100644 --- a/plotly/validators/sankey/_legendwidth.py +++ b/plotly/validators/sankey/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="sankey", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sankey/_link.py b/plotly/validators/sankey/_link.py index bf04e16e76..6710744d20 100644 --- a/plotly/validators/sankey/_link.py +++ b/plotly/validators/sankey/_link.py @@ -1,125 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinkValidator(_plotly_utils.basevalidators.CompoundValidator): +class LinkValidator(_bv.CompoundValidator): def __init__(self, plotly_name="link", parent_name="sankey", **kwargs): - super(LinkValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Link"), data_docs=kwargs.pop( "data_docs", """ - arrowlen - Sets the length (in px) of the links arrow, if - 0 no arrow will be drawn. - color - Sets the `link` color. It can be a single - value, or an array for specifying color for - each `link`. If `link.color` is omitted, then - by default, a translucent grey link will be - used. - colorscales - A tuple of :class:`plotly.graph_objects.sankey. - link.Colorscale` instances or dicts with - compatible properties - colorscaledefaults - When used in a template (as layout.template.dat - a.sankey.link.colorscaledefaults), sets the - default property values to use for elements of - sankey.link.colorscales - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - customdata - Assigns extra data to each link. - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - hovercolor - Sets the `link` hover color. It can be a single - value, or an array for specifying hover colors - for each `link`. If `link.hovercolor` is - omitted, then by default, links will become - slightly more opaque when hovered over. - hovercolorsrc - Sets the source reference on Chart Studio Cloud - for `hovercolor`. - hoverinfo - Determines which trace information appear when - hovering links. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.link.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Variables `source` and `target` are node - objects.Finally, the template string has access - to variables `value` and `label`. Anything - contained in tag `` is displayed in the - secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - label - The shown name of the link. - labelsrc - Sets the source reference on Chart Studio Cloud - for `label`. - line - :class:`plotly.graph_objects.sankey.link.Line` - instance or dict with compatible properties - source - An integer number `[0..nodes.length - 1]` that - represents the source node. - sourcesrc - Sets the source reference on Chart Studio Cloud - for `source`. - target - An integer number `[0..nodes.length - 1]` that - represents the target node. - targetsrc - Sets the source reference on Chart Studio Cloud - for `target`. - value - A numeric value representing the flow volume - value. - valuesrc - Sets the source reference on Chart Studio Cloud - for `value`. """, ), **kwargs, diff --git a/plotly/validators/sankey/_meta.py b/plotly/validators/sankey/_meta.py index b9c24c5929..1a90495247 100644 --- a/plotly/validators/sankey/_meta.py +++ b/plotly/validators/sankey/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="sankey", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sankey/_metasrc.py b/plotly/validators/sankey/_metasrc.py index 081283b280..c8481435a6 100644 --- a/plotly/validators/sankey/_metasrc.py +++ b/plotly/validators/sankey/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="sankey", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/_name.py b/plotly/validators/sankey/_name.py index ad0332850f..329e514b13 100644 --- a/plotly/validators/sankey/_name.py +++ b/plotly/validators/sankey/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="sankey", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sankey/_node.py b/plotly/validators/sankey/_node.py index 8454ce9285..0d9e8bceaf 100644 --- a/plotly/validators/sankey/_node.py +++ b/plotly/validators/sankey/_node.py @@ -1,109 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NodeValidator(_plotly_utils.basevalidators.CompoundValidator): +class NodeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="node", parent_name="sankey", **kwargs): - super(NodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Node"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the alignment method used to position the - nodes along the horizontal axis. - color - Sets the `node` color. It can be a single - value, or an array for specifying color for - each `node`. If `node.color` is omitted, then - the default `Plotly` color palette will be - cycled through to have a variety of colors. - These defaults are not fully opaque, to allow - some visibility of what is beneath the node. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - customdata - Assigns extra data to each node. - customdatasrc - Sets the source reference on Chart Studio Cloud - for `customdata`. - groups - Groups of nodes. Each group is defined by an - array with the indices of the nodes it - contains. Multiple groups can be specified. - hoverinfo - Determines which trace information appear when - hovering nodes. If `none` or `skip` are set, no - information is displayed upon hovering. But, if - `none` is set, click and hover events are still - fired. - hoverlabel - :class:`plotly.graph_objects.sankey.node.Hoverl - abel` instance or dict with compatible - properties - hovertemplate - Template string used for rendering the - information that appear on hover box. Note that - this will override `hoverinfo`. Variables are - inserted using %{variable}, for example "y: - %{y}" as well as %{xother}, {%_xother}, - {%_xother_}, {%xother_}. When showing info for - several points, "xother" will be added to those - with different x positions from the first - point. An underscore before or after - "(x|y)other" will add a space on that side, - only when this field is shown. Numbers are - formatted using d3-format's syntax - %{variable:d3-format}, for example "Price: - %{y:$.2f}". https://github.com/d3/d3- - format/tree/v1.4.5#d3-format for details on the - formatting syntax. Dates are formatted using - d3-time-format's syntax %{variable|d3-time- - format}, for example "Day: %{2019-01-01|%A}". - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format for details on - the date formatting syntax. The variables - available in `hovertemplate` are the ones - emitted as event data described at this link - https://plotly.com/javascript/plotlyjs- - events/#event-data. Additionally, every - attributes that can be specified per-point (the - ones that are `arrayOk: true`) are available. - Variables `sourceLinks` and `targetLinks` are - arrays of link objects.Finally, the template - string has access to variables `value` and - `label`. Anything contained in tag `` is - displayed in the secondary box, for example - "{fullData.name}". To hide the - secondary box completely, use an empty tag - ``. - hovertemplatesrc - Sets the source reference on Chart Studio Cloud - for `hovertemplate`. - label - The shown name of the node. - labelsrc - Sets the source reference on Chart Studio Cloud - for `label`. - line - :class:`plotly.graph_objects.sankey.node.Line` - instance or dict with compatible properties - pad - Sets the padding (in px) between the `nodes`. - thickness - Sets the thickness (in px) of the `nodes`. - x - The normalized horizontal position of the node. - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - The normalized vertical position of the node. - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. """, ), **kwargs, diff --git a/plotly/validators/sankey/_orientation.py b/plotly/validators/sankey/_orientation.py index 40ecb8b773..444229dd98 100644 --- a/plotly/validators/sankey/_orientation.py +++ b/plotly/validators/sankey/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="sankey", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/sankey/_selectedpoints.py b/plotly/validators/sankey/_selectedpoints.py index cd67a735ac..5fdc442ef6 100644 --- a/plotly/validators/sankey/_selectedpoints.py +++ b/plotly/validators/sankey/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="sankey", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/_stream.py b/plotly/validators/sankey/_stream.py index e834751cde..8346de636c 100644 --- a/plotly/validators/sankey/_stream.py +++ b/plotly/validators/sankey/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="sankey", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/sankey/_textfont.py b/plotly/validators/sankey/_textfont.py index ec33a088eb..c3f2e77ca0 100644 --- a/plotly/validators/sankey/_textfont.py +++ b/plotly/validators/sankey/_textfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="sankey", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/sankey/_uid.py b/plotly/validators/sankey/_uid.py index fc04ad24fb..db67951a26 100644 --- a/plotly/validators/sankey/_uid.py +++ b/plotly/validators/sankey/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="sankey", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/sankey/_uirevision.py b/plotly/validators/sankey/_uirevision.py index 9e35762607..802bbfa0d7 100644 --- a/plotly/validators/sankey/_uirevision.py +++ b/plotly/validators/sankey/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="sankey", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/_valueformat.py b/plotly/validators/sankey/_valueformat.py index ea67d39309..ccd69080f4 100644 --- a/plotly/validators/sankey/_valueformat.py +++ b/plotly/validators/sankey/_valueformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueformatValidator(_plotly_utils.basevalidators.StringValidator): +class ValueformatValidator(_bv.StringValidator): def __init__(self, plotly_name="valueformat", parent_name="sankey", **kwargs): - super(ValueformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/_valuesuffix.py b/plotly/validators/sankey/_valuesuffix.py index 2b452a6902..b4800ba283 100644 --- a/plotly/validators/sankey/_valuesuffix.py +++ b/plotly/validators/sankey/_valuesuffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesuffixValidator(_plotly_utils.basevalidators.StringValidator): +class ValuesuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="valuesuffix", parent_name="sankey", **kwargs): - super(ValuesuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/_visible.py b/plotly/validators/sankey/_visible.py index 67349bb0c5..758ae6423d 100644 --- a/plotly/validators/sankey/_visible.py +++ b/plotly/validators/sankey/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="sankey", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/sankey/domain/__init__.py b/plotly/validators/sankey/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/sankey/domain/__init__.py +++ b/plotly/validators/sankey/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/sankey/domain/_column.py b/plotly/validators/sankey/domain/_column.py index 0682b9ddcc..436490a057 100644 --- a/plotly/validators/sankey/domain/_column.py +++ b/plotly/validators/sankey/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="sankey.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sankey/domain/_row.py b/plotly/validators/sankey/domain/_row.py index 61904898d1..73f8157ef1 100644 --- a/plotly/validators/sankey/domain/_row.py +++ b/plotly/validators/sankey/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="sankey.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sankey/domain/_x.py b/plotly/validators/sankey/domain/_x.py index a4439e0d9a..97b57450af 100644 --- a/plotly/validators/sankey/domain/_x.py +++ b/plotly/validators/sankey/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="sankey.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/sankey/domain/_y.py b/plotly/validators/sankey/domain/_y.py index 7b27417cf5..3a04adfb80 100644 --- a/plotly/validators/sankey/domain/_y.py +++ b/plotly/validators/sankey/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="sankey.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/sankey/hoverlabel/__init__.py b/plotly/validators/sankey/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/sankey/hoverlabel/__init__.py +++ b/plotly/validators/sankey/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/sankey/hoverlabel/_align.py b/plotly/validators/sankey/hoverlabel/_align.py index 6eb102f7d4..b256cfa80f 100644 --- a/plotly/validators/sankey/hoverlabel/_align.py +++ b/plotly/validators/sankey/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="sankey.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/sankey/hoverlabel/_alignsrc.py b/plotly/validators/sankey/hoverlabel/_alignsrc.py index f37beff299..00a0e9e794 100644 --- a/plotly/validators/sankey/hoverlabel/_alignsrc.py +++ b/plotly/validators/sankey/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="sankey.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/_bgcolor.py b/plotly/validators/sankey/hoverlabel/_bgcolor.py index c515e878d6..18bab2bae9 100644 --- a/plotly/validators/sankey/hoverlabel/_bgcolor.py +++ b/plotly/validators/sankey/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sankey.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py b/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py index e82e40fdf0..577cd831dc 100644 --- a/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/sankey/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="sankey.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/_bordercolor.py b/plotly/validators/sankey/hoverlabel/_bordercolor.py index 58ad66911d..13bbb560dd 100644 --- a/plotly/validators/sankey/hoverlabel/_bordercolor.py +++ b/plotly/validators/sankey/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="sankey.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py b/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py index 1473c4760f..d6e2fdd6fc 100644 --- a/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/sankey/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="sankey.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/_font.py b/plotly/validators/sankey/hoverlabel/_font.py index bf27a49656..ca69452e4c 100644 --- a/plotly/validators/sankey/hoverlabel/_font.py +++ b/plotly/validators/sankey/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="sankey.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sankey/hoverlabel/_namelength.py b/plotly/validators/sankey/hoverlabel/_namelength.py index dcddc578c7..07bd606585 100644 --- a/plotly/validators/sankey/hoverlabel/_namelength.py +++ b/plotly/validators/sankey/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="sankey.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/sankey/hoverlabel/_namelengthsrc.py b/plotly/validators/sankey/hoverlabel/_namelengthsrc.py index c0dc818d58..4a9a59e8d3 100644 --- a/plotly/validators/sankey/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/sankey/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="sankey.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/__init__.py b/plotly/validators/sankey/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sankey/hoverlabel/font/__init__.py +++ b/plotly/validators/sankey/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/hoverlabel/font/_color.py b/plotly/validators/sankey/hoverlabel/font/_color.py index fa5012a6ba..342455b679 100644 --- a/plotly/validators/sankey/hoverlabel/font/_color.py +++ b/plotly/validators/sankey/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sankey.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/hoverlabel/font/_colorsrc.py b/plotly/validators/sankey/hoverlabel/font/_colorsrc.py index cd50f46e98..2286040db6 100644 --- a/plotly/validators/sankey/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_family.py b/plotly/validators/sankey/hoverlabel/font/_family.py index fbf81b801b..2e7dd5cbd1 100644 --- a/plotly/validators/sankey/hoverlabel/font/_family.py +++ b/plotly/validators/sankey/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sankey.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sankey/hoverlabel/font/_familysrc.py b/plotly/validators/sankey/hoverlabel/font/_familysrc.py index 7a965cd6e6..31fa5269f3 100644 --- a/plotly/validators/sankey/hoverlabel/font/_familysrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_lineposition.py b/plotly/validators/sankey/hoverlabel/font/_lineposition.py index 1d7d1e2a88..dc2808cfc7 100644 --- a/plotly/validators/sankey/hoverlabel/font/_lineposition.py +++ b/plotly/validators/sankey/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sankey.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sankey/hoverlabel/font/_linepositionsrc.py b/plotly/validators/sankey/hoverlabel/font/_linepositionsrc.py index c0abdb6157..0be6bf6576 100644 --- a/plotly/validators/sankey/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sankey.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_shadow.py b/plotly/validators/sankey/hoverlabel/font/_shadow.py index 6c8af66ff6..63ebfe4e06 100644 --- a/plotly/validators/sankey/hoverlabel/font/_shadow.py +++ b/plotly/validators/sankey/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sankey.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/hoverlabel/font/_shadowsrc.py b/plotly/validators/sankey/hoverlabel/font/_shadowsrc.py index 611023ae42..1a62a4c9c7 100644 --- a/plotly/validators/sankey/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_size.py b/plotly/validators/sankey/hoverlabel/font/_size.py index 2db6aad84d..e18b08d0f6 100644 --- a/plotly/validators/sankey/hoverlabel/font/_size.py +++ b/plotly/validators/sankey/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sankey.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sankey/hoverlabel/font/_sizesrc.py b/plotly/validators/sankey/hoverlabel/font/_sizesrc.py index 1e2d99dc81..3ef6858404 100644 --- a/plotly/validators/sankey/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_style.py b/plotly/validators/sankey/hoverlabel/font/_style.py index 7c1e5b85d7..b650629acd 100644 --- a/plotly/validators/sankey/hoverlabel/font/_style.py +++ b/plotly/validators/sankey/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sankey.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sankey/hoverlabel/font/_stylesrc.py b/plotly/validators/sankey/hoverlabel/font/_stylesrc.py index 049091162d..5c58762f86 100644 --- a/plotly/validators/sankey/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_textcase.py b/plotly/validators/sankey/hoverlabel/font/_textcase.py index d904a2257d..e4c4625dca 100644 --- a/plotly/validators/sankey/hoverlabel/font/_textcase.py +++ b/plotly/validators/sankey/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sankey.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sankey/hoverlabel/font/_textcasesrc.py b/plotly/validators/sankey/hoverlabel/font/_textcasesrc.py index 54227cb8dd..dbfbcdbb77 100644 --- a/plotly/validators/sankey/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_variant.py b/plotly/validators/sankey/hoverlabel/font/_variant.py index f648db56a0..7935406ba3 100644 --- a/plotly/validators/sankey/hoverlabel/font/_variant.py +++ b/plotly/validators/sankey/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sankey.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/sankey/hoverlabel/font/_variantsrc.py b/plotly/validators/sankey/hoverlabel/font/_variantsrc.py index 9a86416f1b..5530ff7ae3 100644 --- a/plotly/validators/sankey/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/hoverlabel/font/_weight.py b/plotly/validators/sankey/hoverlabel/font/_weight.py index b9f9cf32a4..70da1bb3ab 100644 --- a/plotly/validators/sankey/hoverlabel/font/_weight.py +++ b/plotly/validators/sankey/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sankey.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sankey/hoverlabel/font/_weightsrc.py b/plotly/validators/sankey/hoverlabel/font/_weightsrc.py index ef19f80f20..c5612ed75d 100644 --- a/plotly/validators/sankey/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/sankey/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sankey.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/legendgrouptitle/__init__.py b/plotly/validators/sankey/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/sankey/legendgrouptitle/__init__.py +++ b/plotly/validators/sankey/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/sankey/legendgrouptitle/_font.py b/plotly/validators/sankey/legendgrouptitle/_font.py index e5b84314e5..6cd2413bfe 100644 --- a/plotly/validators/sankey/legendgrouptitle/_font.py +++ b/plotly/validators/sankey/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="sankey.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/sankey/legendgrouptitle/_text.py b/plotly/validators/sankey/legendgrouptitle/_text.py index 0da2bdbadd..97837bb88e 100644 --- a/plotly/validators/sankey/legendgrouptitle/_text.py +++ b/plotly/validators/sankey/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="sankey.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sankey/legendgrouptitle/font/__init__.py b/plotly/validators/sankey/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/__init__.py +++ b/plotly/validators/sankey/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/legendgrouptitle/font/_color.py b/plotly/validators/sankey/legendgrouptitle/font/_color.py index d02c13ed52..e87983a2f9 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_color.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sankey.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sankey/legendgrouptitle/font/_family.py b/plotly/validators/sankey/legendgrouptitle/font/_family.py index 1c7721f28c..e288ef8dbf 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_family.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sankey.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sankey/legendgrouptitle/font/_lineposition.py b/plotly/validators/sankey/legendgrouptitle/font/_lineposition.py index b94a122918..c1ac88c1df 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sankey.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/sankey/legendgrouptitle/font/_shadow.py b/plotly/validators/sankey/legendgrouptitle/font/_shadow.py index c12d45b878..4589b37bd5 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sankey.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sankey/legendgrouptitle/font/_size.py b/plotly/validators/sankey/legendgrouptitle/font/_size.py index f4128c909c..18f6d22127 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_size.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sankey.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/sankey/legendgrouptitle/font/_style.py b/plotly/validators/sankey/legendgrouptitle/font/_style.py index 643c954783..ae5ee0509e 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_style.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sankey.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/sankey/legendgrouptitle/font/_textcase.py b/plotly/validators/sankey/legendgrouptitle/font/_textcase.py index e2e288b0ce..d70a1dda1a 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sankey.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/sankey/legendgrouptitle/font/_variant.py b/plotly/validators/sankey/legendgrouptitle/font/_variant.py index b51817c849..0191b93434 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_variant.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sankey.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/sankey/legendgrouptitle/font/_weight.py b/plotly/validators/sankey/legendgrouptitle/font/_weight.py index 2578cebc61..c6c90960d2 100644 --- a/plotly/validators/sankey/legendgrouptitle/font/_weight.py +++ b/plotly/validators/sankey/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sankey.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/sankey/link/__init__.py b/plotly/validators/sankey/link/__init__.py index 8305b5d1d3..3b101a070f 100644 --- a/plotly/validators/sankey/link/__init__.py +++ b/plotly/validators/sankey/link/__init__.py @@ -1,57 +1,31 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._valuesrc import ValuesrcValidator - from ._value import ValueValidator - from ._targetsrc import TargetsrcValidator - from ._target import TargetValidator - from ._sourcesrc import SourcesrcValidator - from ._source import SourceValidator - from ._line import LineValidator - from ._labelsrc import LabelsrcValidator - from ._label import LabelValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfo import HoverinfoValidator - from ._hovercolorsrc import HovercolorsrcValidator - from ._hovercolor import HovercolorValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorsrc import ColorsrcValidator - from ._colorscaledefaults import ColorscaledefaultsValidator - from ._colorscales import ColorscalesValidator - from ._color import ColorValidator - from ._arrowlen import ArrowlenValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._valuesrc.ValuesrcValidator", - "._value.ValueValidator", - "._targetsrc.TargetsrcValidator", - "._target.TargetValidator", - "._sourcesrc.SourcesrcValidator", - "._source.SourceValidator", - "._line.LineValidator", - "._labelsrc.LabelsrcValidator", - "._label.LabelValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfo.HoverinfoValidator", - "._hovercolorsrc.HovercolorsrcValidator", - "._hovercolor.HovercolorValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorsrc.ColorsrcValidator", - "._colorscaledefaults.ColorscaledefaultsValidator", - "._colorscales.ColorscalesValidator", - "._color.ColorValidator", - "._arrowlen.ArrowlenValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valuesrc.ValuesrcValidator", + "._value.ValueValidator", + "._targetsrc.TargetsrcValidator", + "._target.TargetValidator", + "._sourcesrc.SourcesrcValidator", + "._source.SourceValidator", + "._line.LineValidator", + "._labelsrc.LabelsrcValidator", + "._label.LabelValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfo.HoverinfoValidator", + "._hovercolorsrc.HovercolorsrcValidator", + "._hovercolor.HovercolorValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorsrc.ColorsrcValidator", + "._colorscaledefaults.ColorscaledefaultsValidator", + "._colorscales.ColorscalesValidator", + "._color.ColorValidator", + "._arrowlen.ArrowlenValidator", + ], +) diff --git a/plotly/validators/sankey/link/_arrowlen.py b/plotly/validators/sankey/link/_arrowlen.py index b3d9f5e276..6933005629 100644 --- a/plotly/validators/sankey/link/_arrowlen.py +++ b/plotly/validators/sankey/link/_arrowlen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrowlenValidator(_plotly_utils.basevalidators.NumberValidator): +class ArrowlenValidator(_bv.NumberValidator): def __init__(self, plotly_name="arrowlen", parent_name="sankey.link", **kwargs): - super(ArrowlenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sankey/link/_color.py b/plotly/validators/sankey/link/_color.py index d9bb10306b..6d8196c6b0 100644 --- a/plotly/validators/sankey/link/_color.py +++ b/plotly/validators/sankey/link/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sankey.link", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/_colorscaledefaults.py b/plotly/validators/sankey/link/_colorscaledefaults.py index e43c7c95c9..5dce1ca975 100644 --- a/plotly/validators/sankey/link/_colorscaledefaults.py +++ b/plotly/validators/sankey/link/_colorscaledefaults.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaledefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorscaledefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorscaledefaults", parent_name="sankey.link", **kwargs ): - super(ColorscaledefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Colorscale"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/sankey/link/_colorscales.py b/plotly/validators/sankey/link/_colorscales.py index a4b70322ac..0efa8a6bdc 100644 --- a/plotly/validators/sankey/link/_colorscales.py +++ b/plotly/validators/sankey/link/_colorscales.py @@ -1,57 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscalesValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class ColorscalesValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="colorscales", parent_name="sankey.link", **kwargs): - super(ColorscalesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Colorscale"), data_docs=kwargs.pop( "data_docs", """ - cmax - Sets the upper bound of the color domain. - cmin - Sets the lower bound of the color domain. - colorscale - Sets the colorscale. The colorscale must be an - array containing arrays mapping a normalized - value to an rgb, rgba, hex, hsl, hsv, or named - color string. At minimum, a mapping for the - lowest (0) and highest (1) values are required. - For example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use `cmin` and - `cmax`. Alternatively, `colorscale` may be a - palette name string of the following list: Blac - kbody,Bluered,Blues,Cividis,Earth,Electric,Gree - ns,Greys,Hot,Jet,Picnic,Portland,Rainbow,RdBu,R - eds,Viridis,YlGnBu,YlOrRd. - label - The label of the links to color based on their - concentration within a flow. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. """, ), **kwargs, diff --git a/plotly/validators/sankey/link/_colorsrc.py b/plotly/validators/sankey/link/_colorsrc.py index 23dfa88716..614f0864bc 100644 --- a/plotly/validators/sankey/link/_colorsrc.py +++ b/plotly/validators/sankey/link/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="sankey.link", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_customdata.py b/plotly/validators/sankey/link/_customdata.py index 93b888cbe6..88300d0c92 100644 --- a/plotly/validators/sankey/link/_customdata.py +++ b/plotly/validators/sankey/link/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="sankey.link", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_customdatasrc.py b/plotly/validators/sankey/link/_customdatasrc.py index 644e9e69dc..fdd6e329fc 100644 --- a/plotly/validators/sankey/link/_customdatasrc.py +++ b/plotly/validators/sankey/link/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="sankey.link", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_hovercolor.py b/plotly/validators/sankey/link/_hovercolor.py index d5ce4c2b15..f0374a4184 100644 --- a/plotly/validators/sankey/link/_hovercolor.py +++ b/plotly/validators/sankey/link/_hovercolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class HovercolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="hovercolor", parent_name="sankey.link", **kwargs): - super(HovercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/_hovercolorsrc.py b/plotly/validators/sankey/link/_hovercolorsrc.py index 027057cac4..ee8e183c63 100644 --- a/plotly/validators/sankey/link/_hovercolorsrc.py +++ b/plotly/validators/sankey/link/_hovercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovercolorsrc", parent_name="sankey.link", **kwargs ): - super(HovercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_hoverinfo.py b/plotly/validators/sankey/link/_hoverinfo.py index 67539c8a1d..120d1e0fcd 100644 --- a/plotly/validators/sankey/link/_hoverinfo.py +++ b/plotly/validators/sankey/link/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HoverinfoValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="hoverinfo", parent_name="sankey.link", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "none", "skip"]), **kwargs, diff --git a/plotly/validators/sankey/link/_hoverlabel.py b/plotly/validators/sankey/link/_hoverlabel.py index 3c16e4f345..fb0838dd0b 100644 --- a/plotly/validators/sankey/link/_hoverlabel.py +++ b/plotly/validators/sankey/link/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="sankey.link", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/sankey/link/_hovertemplate.py b/plotly/validators/sankey/link/_hovertemplate.py index bdcbf9e3b5..4dcc713914 100644 --- a/plotly/validators/sankey/link/_hovertemplate.py +++ b/plotly/validators/sankey/link/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="sankey.link", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/_hovertemplatesrc.py b/plotly/validators/sankey/link/_hovertemplatesrc.py index f46bdaa4a1..e59659b0d2 100644 --- a/plotly/validators/sankey/link/_hovertemplatesrc.py +++ b/plotly/validators/sankey/link/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="sankey.link", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_label.py b/plotly/validators/sankey/link/_label.py index 3e8f2b7605..bf9cf6bbdb 100644 --- a/plotly/validators/sankey/link/_label.py +++ b/plotly/validators/sankey/link/_label.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="label", parent_name="sankey.link", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_labelsrc.py b/plotly/validators/sankey/link/_labelsrc.py index 6f4908b823..266556ed8d 100644 --- a/plotly/validators/sankey/link/_labelsrc.py +++ b/plotly/validators/sankey/link/_labelsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelsrc", parent_name="sankey.link", **kwargs): - super(LabelsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_line.py b/plotly/validators/sankey/link/_line.py index d1c7160a30..711c4f5261 100644 --- a/plotly/validators/sankey/link/_line.py +++ b/plotly/validators/sankey/link/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="sankey.link", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the `line` around each - `link`. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the `line` around - each `link`. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/sankey/link/_source.py b/plotly/validators/sankey/link/_source.py index dd043fca01..948fb8ae3c 100644 --- a/plotly/validators/sankey/link/_source.py +++ b/plotly/validators/sankey/link/_source.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourceValidator(_plotly_utils.basevalidators.DataArrayValidator): +class SourceValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="source", parent_name="sankey.link", **kwargs): - super(SourceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_sourcesrc.py b/plotly/validators/sankey/link/_sourcesrc.py index 1f614cc76e..6ab62e7951 100644 --- a/plotly/validators/sankey/link/_sourcesrc.py +++ b/plotly/validators/sankey/link/_sourcesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SourcesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SourcesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sourcesrc", parent_name="sankey.link", **kwargs): - super(SourcesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_target.py b/plotly/validators/sankey/link/_target.py index 753a795b26..0b38b05caf 100644 --- a/plotly/validators/sankey/link/_target.py +++ b/plotly/validators/sankey/link/_target.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TargetValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TargetValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="target", parent_name="sankey.link", **kwargs): - super(TargetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_targetsrc.py b/plotly/validators/sankey/link/_targetsrc.py index 0ee7b2a4db..5cc5b20149 100644 --- a/plotly/validators/sankey/link/_targetsrc.py +++ b/plotly/validators/sankey/link/_targetsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TargetsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TargetsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="targetsrc", parent_name="sankey.link", **kwargs): - super(TargetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_value.py b/plotly/validators/sankey/link/_value.py index 8ab0b55d3e..807fb8dc77 100644 --- a/plotly/validators/sankey/link/_value.py +++ b/plotly/validators/sankey/link/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValueValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="value", parent_name="sankey.link", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/_valuesrc.py b/plotly/validators/sankey/link/_valuesrc.py index 421f12e3d4..76cbc085e7 100644 --- a/plotly/validators/sankey/link/_valuesrc.py +++ b/plotly/validators/sankey/link/_valuesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuesrc", parent_name="sankey.link", **kwargs): - super(ValuesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/colorscale/__init__.py b/plotly/validators/sankey/link/colorscale/__init__.py index a254f9c121..2a01143969 100644 --- a/plotly/validators/sankey/link/colorscale/__init__.py +++ b/plotly/validators/sankey/link/colorscale/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._label import LabelValidator - from ._colorscale import ColorscaleValidator - from ._cmin import CminValidator - from ._cmax import CmaxValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._label.LabelValidator", - "._colorscale.ColorscaleValidator", - "._cmin.CminValidator", - "._cmax.CmaxValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._label.LabelValidator", + "._colorscale.ColorscaleValidator", + "._cmin.CminValidator", + "._cmax.CmaxValidator", + ], +) diff --git a/plotly/validators/sankey/link/colorscale/_cmax.py b/plotly/validators/sankey/link/colorscale/_cmax.py index b353593e07..ecc00aa97f 100644 --- a/plotly/validators/sankey/link/colorscale/_cmax.py +++ b/plotly/validators/sankey/link/colorscale/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="sankey.link.colorscale", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/colorscale/_cmin.py b/plotly/validators/sankey/link/colorscale/_cmin.py index 876d83969c..12547f41ed 100644 --- a/plotly/validators/sankey/link/colorscale/_cmin.py +++ b/plotly/validators/sankey/link/colorscale/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="sankey.link.colorscale", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/colorscale/_colorscale.py b/plotly/validators/sankey/link/colorscale/_colorscale.py index 35d5c01920..538a14bc1d 100644 --- a/plotly/validators/sankey/link/colorscale/_colorscale.py +++ b/plotly/validators/sankey/link/colorscale/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="sankey.link.colorscale", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/sankey/link/colorscale/_label.py b/plotly/validators/sankey/link/colorscale/_label.py index 9be3de6a21..17a2333c67 100644 --- a/plotly/validators/sankey/link/colorscale/_label.py +++ b/plotly/validators/sankey/link/colorscale/_label.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__( self, plotly_name="label", parent_name="sankey.link.colorscale", **kwargs ): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/colorscale/_name.py b/plotly/validators/sankey/link/colorscale/_name.py index dcf794b4a9..043200cd61 100644 --- a/plotly/validators/sankey/link/colorscale/_name.py +++ b/plotly/validators/sankey/link/colorscale/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="sankey.link.colorscale", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/colorscale/_templateitemname.py b/plotly/validators/sankey/link/colorscale/_templateitemname.py index e916f97bfe..e856192c43 100644 --- a/plotly/validators/sankey/link/colorscale/_templateitemname.py +++ b/plotly/validators/sankey/link/colorscale/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="sankey.link.colorscale", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/__init__.py b/plotly/validators/sankey/link/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/sankey/link/hoverlabel/__init__.py +++ b/plotly/validators/sankey/link/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/sankey/link/hoverlabel/_align.py b/plotly/validators/sankey/link/hoverlabel/_align.py index 3ff1d4e270..5dcbabe2e9 100644 --- a/plotly/validators/sankey/link/hoverlabel/_align.py +++ b/plotly/validators/sankey/link/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="sankey.link.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/sankey/link/hoverlabel/_alignsrc.py b/plotly/validators/sankey/link/hoverlabel/_alignsrc.py index 50f3532e93..86b2b1e214 100644 --- a/plotly/validators/sankey/link/hoverlabel/_alignsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="sankey.link.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/_bgcolor.py b/plotly/validators/sankey/link/hoverlabel/_bgcolor.py index ee7d9dd453..dec6c4fd5a 100644 --- a/plotly/validators/sankey/link/hoverlabel/_bgcolor.py +++ b/plotly/validators/sankey/link/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sankey.link.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py b/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py index 3ac467a64a..b745239cb7 100644 --- a/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="sankey.link.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/_bordercolor.py b/plotly/validators/sankey/link/hoverlabel/_bordercolor.py index 74ffe40114..53549cb88c 100644 --- a/plotly/validators/sankey/link/hoverlabel/_bordercolor.py +++ b/plotly/validators/sankey/link/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="sankey.link.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py b/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py index 63d6a35537..07a28c92c4 100644 --- a/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="sankey.link.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/_font.py b/plotly/validators/sankey/link/hoverlabel/_font.py index 79ca7b1a7b..b5c06e3ded 100644 --- a/plotly/validators/sankey/link/hoverlabel/_font.py +++ b/plotly/validators/sankey/link/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="sankey.link.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sankey/link/hoverlabel/_namelength.py b/plotly/validators/sankey/link/hoverlabel/_namelength.py index 9008b94cde..c26508eb15 100644 --- a/plotly/validators/sankey/link/hoverlabel/_namelength.py +++ b/plotly/validators/sankey/link/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="sankey.link.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py b/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py index 70a235d33b..989804a2dd 100644 --- a/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="sankey.link.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/__init__.py b/plotly/validators/sankey/link/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/__init__.py +++ b/plotly/validators/sankey/link/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_color.py b/plotly/validators/sankey/link/hoverlabel/font/_color.py index 00aa579368..b38757d0ba 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_color.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py b/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py index b0dda7a535..3d3dff75a6 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_family.py b/plotly/validators/sankey/link/hoverlabel/font/_family.py index fc08e322b2..9f95c0765b 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_family.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py b/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py index df32dae0ab..40470a8b83 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_lineposition.py b/plotly/validators/sankey/link/hoverlabel/font/_lineposition.py index 2280559321..85d0baa5ab 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_lineposition.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sankey/link/hoverlabel/font/_linepositionsrc.py b/plotly/validators/sankey/link/hoverlabel/font/_linepositionsrc.py index 181f820a25..da2a137887 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_shadow.py b/plotly/validators/sankey/link/hoverlabel/font/_shadow.py index 910220d7f7..e157a7c5cf 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_shadow.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/hoverlabel/font/_shadowsrc.py b/plotly/validators/sankey/link/hoverlabel/font/_shadowsrc.py index 55701ddaa4..31e720c97f 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_size.py b/plotly/validators/sankey/link/hoverlabel/font/_size.py index 1ebcc88521..3f840c9a9a 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_size.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py b/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py index 4b6dcc6c1d..7057dfe148 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_style.py b/plotly/validators/sankey/link/hoverlabel/font/_style.py index 03146f4090..48cb04874d 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_style.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sankey/link/hoverlabel/font/_stylesrc.py b/plotly/validators/sankey/link/hoverlabel/font/_stylesrc.py index 631ad9eb4c..0f8b52aee6 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_textcase.py b/plotly/validators/sankey/link/hoverlabel/font/_textcase.py index 5bd609f5ae..c0ea777fea 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_textcase.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sankey/link/hoverlabel/font/_textcasesrc.py b/plotly/validators/sankey/link/hoverlabel/font/_textcasesrc.py index 3f7091b4d6..1257c20ab4 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_variant.py b/plotly/validators/sankey/link/hoverlabel/font/_variant.py index 40b47e8ed2..4a38dce568 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_variant.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/sankey/link/hoverlabel/font/_variantsrc.py b/plotly/validators/sankey/link/hoverlabel/font/_variantsrc.py index ae2d861985..b793c04d1c 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/hoverlabel/font/_weight.py b/plotly/validators/sankey/link/hoverlabel/font/_weight.py index 16a2d5319a..0215676f65 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_weight.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sankey.link.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sankey/link/hoverlabel/font/_weightsrc.py b/plotly/validators/sankey/link/hoverlabel/font/_weightsrc.py index f99fb456d7..36e701e4aa 100644 --- a/plotly/validators/sankey/link/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/sankey/link/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sankey.link.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/line/__init__.py b/plotly/validators/sankey/link/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/sankey/link/line/__init__.py +++ b/plotly/validators/sankey/link/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/link/line/_color.py b/plotly/validators/sankey/link/line/_color.py index 35020a81d8..9228ae195f 100644 --- a/plotly/validators/sankey/link/line/_color.py +++ b/plotly/validators/sankey/link/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sankey.link.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/link/line/_colorsrc.py b/plotly/validators/sankey/link/line/_colorsrc.py index 91c79d3b0c..551a339b3a 100644 --- a/plotly/validators/sankey/link/line/_colorsrc.py +++ b/plotly/validators/sankey/link/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sankey.link.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/link/line/_width.py b/plotly/validators/sankey/link/line/_width.py index 69cf8d4c75..bfd58df6d8 100644 --- a/plotly/validators/sankey/link/line/_width.py +++ b/plotly/validators/sankey/link/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="sankey.link.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sankey/link/line/_widthsrc.py b/plotly/validators/sankey/link/line/_widthsrc.py index b36b401b32..42c2383f33 100644 --- a/plotly/validators/sankey/link/line/_widthsrc.py +++ b/plotly/validators/sankey/link/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="sankey.link.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/__init__.py b/plotly/validators/sankey/node/__init__.py index 276f46d65c..5d472034bf 100644 --- a/plotly/validators/sankey/node/__init__.py +++ b/plotly/validators/sankey/node/__init__.py @@ -1,51 +1,28 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._ysrc import YsrcValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._x import XValidator - from ._thickness import ThicknessValidator - from ._pad import PadValidator - from ._line import LineValidator - from ._labelsrc import LabelsrcValidator - from ._label import LabelValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfo import HoverinfoValidator - from ._groups import GroupsValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._ysrc.YsrcValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._x.XValidator", - "._thickness.ThicknessValidator", - "._pad.PadValidator", - "._line.LineValidator", - "._labelsrc.LabelsrcValidator", - "._label.LabelValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfo.HoverinfoValidator", - "._groups.GroupsValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + "._thickness.ThicknessValidator", + "._pad.PadValidator", + "._line.LineValidator", + "._labelsrc.LabelsrcValidator", + "._label.LabelValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfo.HoverinfoValidator", + "._groups.GroupsValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/sankey/node/_align.py b/plotly/validators/sankey/node/_align.py index 8fb0e5d4ff..e89e63009f 100644 --- a/plotly/validators/sankey/node/_align.py +++ b/plotly/validators/sankey/node/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="sankey.node", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["justify", "left", "right", "center"]), **kwargs, diff --git a/plotly/validators/sankey/node/_color.py b/plotly/validators/sankey/node/_color.py index 38d96c1b5e..cfcb658e87 100644 --- a/plotly/validators/sankey/node/_color.py +++ b/plotly/validators/sankey/node/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sankey.node", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/_colorsrc.py b/plotly/validators/sankey/node/_colorsrc.py index 2ee3d54553..27889ed587 100644 --- a/plotly/validators/sankey/node/_colorsrc.py +++ b/plotly/validators/sankey/node/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="sankey.node", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_customdata.py b/plotly/validators/sankey/node/_customdata.py index 732a433fbc..3c003d3faf 100644 --- a/plotly/validators/sankey/node/_customdata.py +++ b/plotly/validators/sankey/node/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="sankey.node", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_customdatasrc.py b/plotly/validators/sankey/node/_customdatasrc.py index aa461679bf..0a880545e9 100644 --- a/plotly/validators/sankey/node/_customdatasrc.py +++ b/plotly/validators/sankey/node/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="sankey.node", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_groups.py b/plotly/validators/sankey/node/_groups.py index fbfeef94c4..7bb83c294d 100644 --- a/plotly/validators/sankey/node/_groups.py +++ b/plotly/validators/sankey/node/_groups.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GroupsValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class GroupsValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="groups", parent_name="sankey.node", **kwargs): - super(GroupsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dimensions=kwargs.pop("dimensions", 2), edit_type=kwargs.pop("edit_type", "calc"), free_length=kwargs.pop("free_length", True), diff --git a/plotly/validators/sankey/node/_hoverinfo.py b/plotly/validators/sankey/node/_hoverinfo.py index c2b14f208d..0c81c58dc3 100644 --- a/plotly/validators/sankey/node/_hoverinfo.py +++ b/plotly/validators/sankey/node/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class HoverinfoValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="hoverinfo", parent_name="sankey.node", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "none", "skip"]), **kwargs, diff --git a/plotly/validators/sankey/node/_hoverlabel.py b/plotly/validators/sankey/node/_hoverlabel.py index fb122b3de5..00c3f39854 100644 --- a/plotly/validators/sankey/node/_hoverlabel.py +++ b/plotly/validators/sankey/node/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="sankey.node", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/sankey/node/_hovertemplate.py b/plotly/validators/sankey/node/_hovertemplate.py index c3e7c48bd0..74fc64810a 100644 --- a/plotly/validators/sankey/node/_hovertemplate.py +++ b/plotly/validators/sankey/node/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="sankey.node", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/_hovertemplatesrc.py b/plotly/validators/sankey/node/_hovertemplatesrc.py index cb51f2d1be..5f15fb6fc4 100644 --- a/plotly/validators/sankey/node/_hovertemplatesrc.py +++ b/plotly/validators/sankey/node/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="sankey.node", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_label.py b/plotly/validators/sankey/node/_label.py index bfd193e6b3..9e65cc1dcc 100644 --- a/plotly/validators/sankey/node/_label.py +++ b/plotly/validators/sankey/node/_label.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="label", parent_name="sankey.node", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_labelsrc.py b/plotly/validators/sankey/node/_labelsrc.py index 1d838efc9a..da7ca5f7b4 100644 --- a/plotly/validators/sankey/node/_labelsrc.py +++ b/plotly/validators/sankey/node/_labelsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelsrc", parent_name="sankey.node", **kwargs): - super(LabelsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_line.py b/plotly/validators/sankey/node/_line.py index 12b142be92..a52c93b1b4 100644 --- a/plotly/validators/sankey/node/_line.py +++ b/plotly/validators/sankey/node/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="sankey.node", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the `line` around each - `node`. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the `line` around - each `node`. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/sankey/node/_pad.py b/plotly/validators/sankey/node/_pad.py index 4e0555f9fc..1a3a0126f5 100644 --- a/plotly/validators/sankey/node/_pad.py +++ b/plotly/validators/sankey/node/_pad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.NumberValidator): +class PadValidator(_bv.NumberValidator): def __init__(self, plotly_name="pad", parent_name="sankey.node", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sankey/node/_thickness.py b/plotly/validators/sankey/node/_thickness.py index 61278520d2..fffb5a8cdc 100644 --- a/plotly/validators/sankey/node/_thickness.py +++ b/plotly/validators/sankey/node/_thickness.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__(self, plotly_name="thickness", parent_name="sankey.node", **kwargs): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sankey/node/_x.py b/plotly/validators/sankey/node/_x.py index a3294d6e52..32441c68ba 100644 --- a/plotly/validators/sankey/node/_x.py +++ b/plotly/validators/sankey/node/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="sankey.node", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_xsrc.py b/plotly/validators/sankey/node/_xsrc.py index 8e8608365b..78306078f0 100644 --- a/plotly/validators/sankey/node/_xsrc.py +++ b/plotly/validators/sankey/node/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="sankey.node", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_y.py b/plotly/validators/sankey/node/_y.py index 427b5f8440..a9b8279dfb 100644 --- a/plotly/validators/sankey/node/_y.py +++ b/plotly/validators/sankey/node/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="sankey.node", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/node/_ysrc.py b/plotly/validators/sankey/node/_ysrc.py index 7f98949907..2585a0e229 100644 --- a/plotly/validators/sankey/node/_ysrc.py +++ b/plotly/validators/sankey/node/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="sankey.node", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/__init__.py b/plotly/validators/sankey/node/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/sankey/node/hoverlabel/__init__.py +++ b/plotly/validators/sankey/node/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/sankey/node/hoverlabel/_align.py b/plotly/validators/sankey/node/hoverlabel/_align.py index 3bfa41a8bd..3498927d02 100644 --- a/plotly/validators/sankey/node/hoverlabel/_align.py +++ b/plotly/validators/sankey/node/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="sankey.node.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/sankey/node/hoverlabel/_alignsrc.py b/plotly/validators/sankey/node/hoverlabel/_alignsrc.py index 634ace9bf4..61cc778d28 100644 --- a/plotly/validators/sankey/node/hoverlabel/_alignsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="sankey.node.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/_bgcolor.py b/plotly/validators/sankey/node/hoverlabel/_bgcolor.py index 262e5b9ef8..e0b0dca191 100644 --- a/plotly/validators/sankey/node/hoverlabel/_bgcolor.py +++ b/plotly/validators/sankey/node/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sankey.node.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py b/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py index dba4f6661a..eaebdc32eb 100644 --- a/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="sankey.node.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/_bordercolor.py b/plotly/validators/sankey/node/hoverlabel/_bordercolor.py index 126fdacddf..04b29d6a78 100644 --- a/plotly/validators/sankey/node/hoverlabel/_bordercolor.py +++ b/plotly/validators/sankey/node/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="sankey.node.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py b/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py index 56b9ad6e32..8313de648a 100644 --- a/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="sankey.node.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/_font.py b/plotly/validators/sankey/node/hoverlabel/_font.py index 23cb89b925..24e7a1b0c6 100644 --- a/plotly/validators/sankey/node/hoverlabel/_font.py +++ b/plotly/validators/sankey/node/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="sankey.node.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sankey/node/hoverlabel/_namelength.py b/plotly/validators/sankey/node/hoverlabel/_namelength.py index 2861043ecc..b3576d5f1f 100644 --- a/plotly/validators/sankey/node/hoverlabel/_namelength.py +++ b/plotly/validators/sankey/node/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="sankey.node.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py b/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py index accdb33406..9f59a08f64 100644 --- a/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="sankey.node.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/__init__.py b/plotly/validators/sankey/node/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/__init__.py +++ b/plotly/validators/sankey/node/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_color.py b/plotly/validators/sankey/node/hoverlabel/font/_color.py index 66768a82ba..ba35c8e1f9 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_color.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py b/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py index b7202c304b..6a7fbee1d5 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_family.py b/plotly/validators/sankey/node/hoverlabel/font/_family.py index 77d0a78ab0..63238e52d9 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_family.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py b/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py index 6aca70b020..7b6065f257 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_lineposition.py b/plotly/validators/sankey/node/hoverlabel/font/_lineposition.py index daf70f34a8..495991ee07 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_lineposition.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sankey/node/hoverlabel/font/_linepositionsrc.py b/plotly/validators/sankey/node/hoverlabel/font/_linepositionsrc.py index 19fd6d0b6f..fc1c9a6a03 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_shadow.py b/plotly/validators/sankey/node/hoverlabel/font/_shadow.py index ecf1fa534d..e4d79cb655 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_shadow.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/hoverlabel/font/_shadowsrc.py b/plotly/validators/sankey/node/hoverlabel/font/_shadowsrc.py index 7f7a8c66eb..78fd8e4344 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_size.py b/plotly/validators/sankey/node/hoverlabel/font/_size.py index 604fadb607..4ca9c8dce6 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_size.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py b/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py index 881e8afaf3..c202eca415 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_style.py b/plotly/validators/sankey/node/hoverlabel/font/_style.py index 842eb81fbe..7e8591a02e 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_style.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sankey/node/hoverlabel/font/_stylesrc.py b/plotly/validators/sankey/node/hoverlabel/font/_stylesrc.py index e7ad82d34d..b560458ff6 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_textcase.py b/plotly/validators/sankey/node/hoverlabel/font/_textcase.py index f216f8ec52..cbc18c8a1b 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_textcase.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sankey/node/hoverlabel/font/_textcasesrc.py b/plotly/validators/sankey/node/hoverlabel/font/_textcasesrc.py index a8a4ebdfba..70572125ea 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_variant.py b/plotly/validators/sankey/node/hoverlabel/font/_variant.py index 7c9899669a..23d457a030 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_variant.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/sankey/node/hoverlabel/font/_variantsrc.py b/plotly/validators/sankey/node/hoverlabel/font/_variantsrc.py index 63d7222579..771626d201 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/hoverlabel/font/_weight.py b/plotly/validators/sankey/node/hoverlabel/font/_weight.py index 27b24f234a..ba54cfa623 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_weight.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sankey.node.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sankey/node/hoverlabel/font/_weightsrc.py b/plotly/validators/sankey/node/hoverlabel/font/_weightsrc.py index bf7357c747..9b63052e20 100644 --- a/plotly/validators/sankey/node/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/sankey/node/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sankey.node.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/line/__init__.py b/plotly/validators/sankey/node/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/sankey/node/line/__init__.py +++ b/plotly/validators/sankey/node/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/node/line/_color.py b/plotly/validators/sankey/node/line/_color.py index a624332355..8a1634ecf4 100644 --- a/plotly/validators/sankey/node/line/_color.py +++ b/plotly/validators/sankey/node/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sankey.node.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sankey/node/line/_colorsrc.py b/plotly/validators/sankey/node/line/_colorsrc.py index 080e1036cc..03c7fd2ae0 100644 --- a/plotly/validators/sankey/node/line/_colorsrc.py +++ b/plotly/validators/sankey/node/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sankey.node.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/node/line/_width.py b/plotly/validators/sankey/node/line/_width.py index 4bf6758432..353ebdbfb7 100644 --- a/plotly/validators/sankey/node/line/_width.py +++ b/plotly/validators/sankey/node/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="sankey.node.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sankey/node/line/_widthsrc.py b/plotly/validators/sankey/node/line/_widthsrc.py index fa20b58773..4622c9717d 100644 --- a/plotly/validators/sankey/node/line/_widthsrc.py +++ b/plotly/validators/sankey/node/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="sankey.node.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sankey/stream/__init__.py b/plotly/validators/sankey/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/sankey/stream/__init__.py +++ b/plotly/validators/sankey/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/sankey/stream/_maxpoints.py b/plotly/validators/sankey/stream/_maxpoints.py index a1c24121ac..a698e23b51 100644 --- a/plotly/validators/sankey/stream/_maxpoints.py +++ b/plotly/validators/sankey/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="sankey.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sankey/stream/_token.py b/plotly/validators/sankey/stream/_token.py index f320836bc4..e2637cf3b5 100644 --- a/plotly/validators/sankey/stream/_token.py +++ b/plotly/validators/sankey/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="sankey.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sankey/textfont/__init__.py b/plotly/validators/sankey/textfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/sankey/textfont/__init__.py +++ b/plotly/validators/sankey/textfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sankey/textfont/_color.py b/plotly/validators/sankey/textfont/_color.py index 269cf114c2..90d2f16c8e 100644 --- a/plotly/validators/sankey/textfont/_color.py +++ b/plotly/validators/sankey/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sankey.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/textfont/_family.py b/plotly/validators/sankey/textfont/_family.py index 46acb450e8..ae16f4cd95 100644 --- a/plotly/validators/sankey/textfont/_family.py +++ b/plotly/validators/sankey/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="sankey.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sankey/textfont/_lineposition.py b/plotly/validators/sankey/textfont/_lineposition.py index 8db1857a8d..881d40a661 100644 --- a/plotly/validators/sankey/textfont/_lineposition.py +++ b/plotly/validators/sankey/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sankey.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/sankey/textfont/_shadow.py b/plotly/validators/sankey/textfont/_shadow.py index 57dadf284e..2c5ef694a5 100644 --- a/plotly/validators/sankey/textfont/_shadow.py +++ b/plotly/validators/sankey/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="sankey.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sankey/textfont/_size.py b/plotly/validators/sankey/textfont/_size.py index 4d3ccdd73a..947b6a955a 100644 --- a/plotly/validators/sankey/textfont/_size.py +++ b/plotly/validators/sankey/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="sankey.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/sankey/textfont/_style.py b/plotly/validators/sankey/textfont/_style.py index 04ee72afc6..8c71d340dd 100644 --- a/plotly/validators/sankey/textfont/_style.py +++ b/plotly/validators/sankey/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="sankey.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/sankey/textfont/_textcase.py b/plotly/validators/sankey/textfont/_textcase.py index 7e2a8788f6..23ad013e2e 100644 --- a/plotly/validators/sankey/textfont/_textcase.py +++ b/plotly/validators/sankey/textfont/_textcase.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textcase", parent_name="sankey.textfont", **kwargs): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/sankey/textfont/_variant.py b/plotly/validators/sankey/textfont/_variant.py index b61bd5ebd5..92ac7ca2f9 100644 --- a/plotly/validators/sankey/textfont/_variant.py +++ b/plotly/validators/sankey/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="sankey.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/sankey/textfont/_weight.py b/plotly/validators/sankey/textfont/_weight.py index 886b67fb3e..6d9445d6fc 100644 --- a/plotly/validators/sankey/textfont/_weight.py +++ b/plotly/validators/sankey/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="sankey.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter/__init__.py b/plotly/validators/scatter/__init__.py index e159bfe456..3788649bfd 100644 --- a/plotly/validators/scatter/__init__.py +++ b/plotly/validators/scatter/__init__.py @@ -1,161 +1,83 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._stackgroup import StackgroupValidator - from ._stackgaps import StackgapsValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetgroup import OffsetgroupValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._groupnorm import GroupnormValidator - from ._fillpattern import FillpatternValidator - from ._fillgradient import FillgradientValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._error_y import Error_YValidator - from ._error_x import Error_XValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._cliponaxis import CliponaxisValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._stackgroup.StackgroupValidator", - "._stackgaps.StackgapsValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetgroup.OffsetgroupValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._groupnorm.GroupnormValidator", - "._fillpattern.FillpatternValidator", - "._fillgradient.FillgradientValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._error_y.Error_YValidator", - "._error_x.Error_XValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._cliponaxis.CliponaxisValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._stackgroup.StackgroupValidator", + "._stackgaps.StackgapsValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._groupnorm.GroupnormValidator", + "._fillpattern.FillpatternValidator", + "._fillgradient.FillgradientValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/scatter/_alignmentgroup.py b/plotly/validators/scatter/_alignmentgroup.py index ca18b414bd..f68846dcd2 100644 --- a/plotly/validators/scatter/_alignmentgroup.py +++ b/plotly/validators/scatter/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="scatter", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_cliponaxis.py b/plotly/validators/scatter/_cliponaxis.py index 59c66acfef..7266c759fa 100644 --- a/plotly/validators/scatter/_cliponaxis.py +++ b/plotly/validators/scatter/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="scatter", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter/_connectgaps.py b/plotly/validators/scatter/_connectgaps.py index c4bd997167..baecc21dc3 100644 --- a/plotly/validators/scatter/_connectgaps.py +++ b/plotly/validators/scatter/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scatter", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_customdata.py b/plotly/validators/scatter/_customdata.py index 090b0d59f8..ae77ee47cd 100644 --- a/plotly/validators/scatter/_customdata.py +++ b/plotly/validators/scatter/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scatter", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_customdatasrc.py b/plotly/validators/scatter/_customdatasrc.py index 2706d06389..ca540c8a4c 100644 --- a/plotly/validators/scatter/_customdatasrc.py +++ b/plotly/validators/scatter/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="scatter", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_dx.py b/plotly/validators/scatter/_dx.py index 01b2f94bd8..3629a3fec0 100644 --- a/plotly/validators/scatter/_dx.py +++ b/plotly/validators/scatter/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="scatter", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/_dy.py b/plotly/validators/scatter/_dy.py index 21736ea402..7f24e80997 100644 --- a/plotly/validators/scatter/_dy.py +++ b/plotly/validators/scatter/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="scatter", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/_error_x.py b/plotly/validators/scatter/_error_x.py index e5346b58da..a5245bfe4c 100644 --- a/plotly/validators/scatter/_error_x.py +++ b/plotly/validators/scatter/_error_x.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_x", parent_name="scatter", **kwargs): - super(Error_XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorX"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scatter/_error_y.py b/plotly/validators/scatter/_error_y.py index e07a28ac01..c8a73af412 100644 --- a/plotly/validators/scatter/_error_y.py +++ b/plotly/validators/scatter/_error_y.py @@ -1,70 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_y", parent_name="scatter", **kwargs): - super(Error_YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorY"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scatter/_fill.py b/plotly/validators/scatter/_fill.py index d15757193c..3810709636 100644 --- a/plotly/validators/scatter/_fill.py +++ b/plotly/validators/scatter/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scatter", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/_fillcolor.py b/plotly/validators/scatter/_fillcolor.py index fe530a47c7..849d2d8afb 100644 --- a/plotly/validators/scatter/_fillcolor.py +++ b/plotly/validators/scatter/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scatter", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/_fillgradient.py b/plotly/validators/scatter/_fillgradient.py index 73720a9a9f..7cceb14a42 100644 --- a/plotly/validators/scatter/_fillgradient.py +++ b/plotly/validators/scatter/_fillgradient.py @@ -1,44 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillgradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class FillgradientValidator(_bv.CompoundValidator): def __init__(self, plotly_name="fillgradient", parent_name="scatter", **kwargs): - super(FillgradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Fillgradient"), data_docs=kwargs.pop( "data_docs", """ - colorscale - Sets the fill gradient colors as a color scale. - The color scale is interpreted as a gradient - applied in the direction specified by - "orientation", from the lowest to the highest - value of the scatter plot along that axis, or - from the center to the most distant point from - it, if orientation is "radial". - start - Sets the gradient start value. It is given as - the absolute position on the axis determined by - the orientiation. E.g., if orientation is - "horizontal", the gradient will be horizontal - and start from the x-position given by start. - If omitted, the gradient starts at the lowest - value of the trace along the respective axis. - Ignored if orientation is "radial". - stop - Sets the gradient end value. It is given as the - absolute position on the axis determined by the - orientiation. E.g., if orientation is - "horizontal", the gradient will be horizontal - and end at the x-position given by end. If - omitted, the gradient ends at the highest value - of the trace along the respective axis. Ignored - if orientation is "radial". - type - Sets the type/orientation of the color gradient - for the fill. Defaults to "none". """, ), **kwargs, diff --git a/plotly/validators/scatter/_fillpattern.py b/plotly/validators/scatter/_fillpattern.py index fdb1c740b3..ee5afab3ee 100644 --- a/plotly/validators/scatter/_fillpattern.py +++ b/plotly/validators/scatter/_fillpattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillpatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class FillpatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="fillpattern", parent_name="scatter", **kwargs): - super(FillpatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Fillpattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/scatter/_groupnorm.py b/plotly/validators/scatter/_groupnorm.py index 0632d4d67d..bfdb06504d 100644 --- a/plotly/validators/scatter/_groupnorm.py +++ b/plotly/validators/scatter/_groupnorm.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GroupnormValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class GroupnormValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="groupnorm", parent_name="scatter", **kwargs): - super(GroupnormValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["", "fraction", "percent"]), **kwargs, diff --git a/plotly/validators/scatter/_hoverinfo.py b/plotly/validators/scatter/_hoverinfo.py index 43634ee462..33c0cec5dc 100644 --- a/plotly/validators/scatter/_hoverinfo.py +++ b/plotly/validators/scatter/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scatter", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scatter/_hoverinfosrc.py b/plotly/validators/scatter/_hoverinfosrc.py index 06019dd614..4b33714f0e 100644 --- a/plotly/validators/scatter/_hoverinfosrc.py +++ b/plotly/validators/scatter/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="scatter", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_hoverlabel.py b/plotly/validators/scatter/_hoverlabel.py index 1b64a02fec..bca62eb964 100644 --- a/plotly/validators/scatter/_hoverlabel.py +++ b/plotly/validators/scatter/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scatter", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scatter/_hoveron.py b/plotly/validators/scatter/_hoveron.py index baabd08330..3799f46e3a 100644 --- a/plotly/validators/scatter/_hoveron.py +++ b/plotly/validators/scatter/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="scatter", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), flags=kwargs.pop("flags", ["points", "fills"]), **kwargs, diff --git a/plotly/validators/scatter/_hovertemplate.py b/plotly/validators/scatter/_hovertemplate.py index 52e197df31..f0a5329285 100644 --- a/plotly/validators/scatter/_hovertemplate.py +++ b/plotly/validators/scatter/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="scatter", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter/_hovertemplatesrc.py b/plotly/validators/scatter/_hovertemplatesrc.py index e627b9e02a..d491aba4e4 100644 --- a/plotly/validators/scatter/_hovertemplatesrc.py +++ b/plotly/validators/scatter/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="scatter", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_hovertext.py b/plotly/validators/scatter/_hovertext.py index 22b354ab60..3c5ab308fd 100644 --- a/plotly/validators/scatter/_hovertext.py +++ b/plotly/validators/scatter/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scatter", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/_hovertextsrc.py b/plotly/validators/scatter/_hovertextsrc.py index 81d223fb59..7e4aadf264 100644 --- a/plotly/validators/scatter/_hovertextsrc.py +++ b/plotly/validators/scatter/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="scatter", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_ids.py b/plotly/validators/scatter/_ids.py index c3cfad87ca..8a12dd1343 100644 --- a/plotly/validators/scatter/_ids.py +++ b/plotly/validators/scatter/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scatter", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/_idssrc.py b/plotly/validators/scatter/_idssrc.py index f0fe9f6452..8b83f2bb21 100644 --- a/plotly/validators/scatter/_idssrc.py +++ b/plotly/validators/scatter/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scatter", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_legend.py b/plotly/validators/scatter/_legend.py index d7dc121acf..78ce4efa4b 100644 --- a/plotly/validators/scatter/_legend.py +++ b/plotly/validators/scatter/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scatter", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/_legendgroup.py b/plotly/validators/scatter/_legendgroup.py index 9e1dfe1371..46292873cb 100644 --- a/plotly/validators/scatter/_legendgroup.py +++ b/plotly/validators/scatter/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scatter", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/_legendgrouptitle.py b/plotly/validators/scatter/_legendgrouptitle.py index 971b297a12..74b8daa5a0 100644 --- a/plotly/validators/scatter/_legendgrouptitle.py +++ b/plotly/validators/scatter/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="scatter", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scatter/_legendrank.py b/plotly/validators/scatter/_legendrank.py index e9c879ad94..589d1f8e97 100644 --- a/plotly/validators/scatter/_legendrank.py +++ b/plotly/validators/scatter/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scatter", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/_legendwidth.py b/plotly/validators/scatter/_legendwidth.py index 13ea667e05..01c8bd6f26 100644 --- a/plotly/validators/scatter/_legendwidth.py +++ b/plotly/validators/scatter/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scatter", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/_line.py b/plotly/validators/scatter/_line.py index b6d3c5fa7e..7888fc1fe1 100644 --- a/plotly/validators/scatter/_line.py +++ b/plotly/validators/scatter/_line.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatter", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - simplify - Simplifies lines by removing nearly-collinear - points. When transitioning lines, it may be - desirable to disable this so that the number of - points along the resulting SVG path is - unaffected. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scatter/_marker.py b/plotly/validators/scatter/_marker.py index 596ed6b44f..7b16271f57 100644 --- a/plotly/validators/scatter/_marker.py +++ b/plotly/validators/scatter/_marker.py @@ -1,164 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scatter", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter.marker.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scatter.marker.Gra - dient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatter.marker.Lin - e` instance or dict with compatible properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scatter/_meta.py b/plotly/validators/scatter/_meta.py index 32d824432a..5f32680f5c 100644 --- a/plotly/validators/scatter/_meta.py +++ b/plotly/validators/scatter/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scatter", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatter/_metasrc.py b/plotly/validators/scatter/_metasrc.py index c5066dbc4d..90a61ed3cd 100644 --- a/plotly/validators/scatter/_metasrc.py +++ b/plotly/validators/scatter/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scatter", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_mode.py b/plotly/validators/scatter/_mode.py index cdadf40778..f4cd206696 100644 --- a/plotly/validators/scatter/_mode.py +++ b/plotly/validators/scatter/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scatter", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scatter/_name.py b/plotly/validators/scatter/_name.py index 270756f04e..9d367ec6b6 100644 --- a/plotly/validators/scatter/_name.py +++ b/plotly/validators/scatter/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scatter", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/_offsetgroup.py b/plotly/validators/scatter/_offsetgroup.py index 562452b2fa..fdcf97396c 100644 --- a/plotly/validators/scatter/_offsetgroup.py +++ b/plotly/validators/scatter/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="scatter", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_opacity.py b/plotly/validators/scatter/_opacity.py index 4f6ca3e662..e0b7e9682f 100644 --- a/plotly/validators/scatter/_opacity.py +++ b/plotly/validators/scatter/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatter", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/_orientation.py b/plotly/validators/scatter/_orientation.py index 2594fcfa17..7808e3c8b2 100644 --- a/plotly/validators/scatter/_orientation.py +++ b/plotly/validators/scatter/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="scatter", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/scatter/_selected.py b/plotly/validators/scatter/_selected.py index b4064ab903..fe3f3bc047 100644 --- a/plotly/validators/scatter/_selected.py +++ b/plotly/validators/scatter/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scatter", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatter.selected.M - arker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.selected.T - extfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scatter/_selectedpoints.py b/plotly/validators/scatter/_selectedpoints.py index 4aa2fc147c..0c72775a79 100644 --- a/plotly/validators/scatter/_selectedpoints.py +++ b/plotly/validators/scatter/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="scatter", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_showlegend.py b/plotly/validators/scatter/_showlegend.py index 767864b227..e3404788d0 100644 --- a/plotly/validators/scatter/_showlegend.py +++ b/plotly/validators/scatter/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scatter", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/_stackgaps.py b/plotly/validators/scatter/_stackgaps.py index 3c2018ee41..62a18b392c 100644 --- a/plotly/validators/scatter/_stackgaps.py +++ b/plotly/validators/scatter/_stackgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StackgapsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StackgapsValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="stackgaps", parent_name="scatter", **kwargs): - super(StackgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["infer zero", "interpolate"]), **kwargs, diff --git a/plotly/validators/scatter/_stackgroup.py b/plotly/validators/scatter/_stackgroup.py index 0bc8462aa7..0698a7e02e 100644 --- a/plotly/validators/scatter/_stackgroup.py +++ b/plotly/validators/scatter/_stackgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StackgroupValidator(_plotly_utils.basevalidators.StringValidator): +class StackgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="stackgroup", parent_name="scatter", **kwargs): - super(StackgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_stream.py b/plotly/validators/scatter/_stream.py index cd45d6fc92..65487eb34c 100644 --- a/plotly/validators/scatter/_stream.py +++ b/plotly/validators/scatter/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatter", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scatter/_text.py b/plotly/validators/scatter/_text.py index 009be0982a..910051af0c 100644 --- a/plotly/validators/scatter/_text.py +++ b/plotly/validators/scatter/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scatter", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/_textfont.py b/plotly/validators/scatter/_textfont.py index 0bb1e18a7a..0e03f8e8e8 100644 --- a/plotly/validators/scatter/_textfont.py +++ b/plotly/validators/scatter/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scatter", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatter/_textposition.py b/plotly/validators/scatter/_textposition.py index 4a5ae5c9da..f1fda55826 100644 --- a/plotly/validators/scatter/_textposition.py +++ b/plotly/validators/scatter/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="scatter", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatter/_textpositionsrc.py b/plotly/validators/scatter/_textpositionsrc.py index c4b1798204..f49a1db23a 100644 --- a/plotly/validators/scatter/_textpositionsrc.py +++ b/plotly/validators/scatter/_textpositionsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textpositionsrc", parent_name="scatter", **kwargs): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_textsrc.py b/plotly/validators/scatter/_textsrc.py index d4173b0af3..cbe7b723f0 100644 --- a/plotly/validators/scatter/_textsrc.py +++ b/plotly/validators/scatter/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatter", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_texttemplate.py b/plotly/validators/scatter/_texttemplate.py index f95e1320db..330e43d49a 100644 --- a/plotly/validators/scatter/_texttemplate.py +++ b/plotly/validators/scatter/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="scatter", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/_texttemplatesrc.py b/plotly/validators/scatter/_texttemplatesrc.py index 948b3d67b7..e5e162a749 100644 --- a/plotly/validators/scatter/_texttemplatesrc.py +++ b/plotly/validators/scatter/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="scatter", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_uid.py b/plotly/validators/scatter/_uid.py index ff5ab866ba..d304a87a1a 100644 --- a/plotly/validators/scatter/_uid.py +++ b/plotly/validators/scatter/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scatter", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatter/_uirevision.py b/plotly/validators/scatter/_uirevision.py index 762dbccbfe..cb023298f2 100644 --- a/plotly/validators/scatter/_uirevision.py +++ b/plotly/validators/scatter/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scatter", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_unselected.py b/plotly/validators/scatter/_unselected.py index 3dd7715799..daed950cad 100644 --- a/plotly/validators/scatter/_unselected.py +++ b/plotly/validators/scatter/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scatter", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatter.unselected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatter.unselected - .Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scatter/_visible.py b/plotly/validators/scatter/_visible.py index 8a087b5671..03eb231dad 100644 --- a/plotly/validators/scatter/_visible.py +++ b/plotly/validators/scatter/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scatter", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scatter/_x.py b/plotly/validators/scatter/_x.py index 41178ffcc9..a1025480c5 100644 --- a/plotly/validators/scatter/_x.py +++ b/plotly/validators/scatter/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="scatter", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter/_x0.py b/plotly/validators/scatter/_x0.py index a07880bc94..508ad85786 100644 --- a/plotly/validators/scatter/_x0.py +++ b/plotly/validators/scatter/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="scatter", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter/_xaxis.py b/plotly/validators/scatter/_xaxis.py index a060bea706..3a4a596be0 100644 --- a/plotly/validators/scatter/_xaxis.py +++ b/plotly/validators/scatter/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="scatter", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter/_xcalendar.py b/plotly/validators/scatter/_xcalendar.py index caa42cc058..8be344613b 100644 --- a/plotly/validators/scatter/_xcalendar.py +++ b/plotly/validators/scatter/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="scatter", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/_xhoverformat.py b/plotly/validators/scatter/_xhoverformat.py index c7bf4af3c6..9d12b7277a 100644 --- a/plotly/validators/scatter/_xhoverformat.py +++ b/plotly/validators/scatter/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="scatter", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_xperiod.py b/plotly/validators/scatter/_xperiod.py index 4a3d78dba6..b93e093438 100644 --- a/plotly/validators/scatter/_xperiod.py +++ b/plotly/validators/scatter/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="scatter", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_xperiod0.py b/plotly/validators/scatter/_xperiod0.py index 033f8b73a2..7cad3a137e 100644 --- a/plotly/validators/scatter/_xperiod0.py +++ b/plotly/validators/scatter/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="scatter", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_xperiodalignment.py b/plotly/validators/scatter/_xperiodalignment.py index 3318575063..d96c61a869 100644 --- a/plotly/validators/scatter/_xperiodalignment.py +++ b/plotly/validators/scatter/_xperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xperiodalignment", parent_name="scatter", **kwargs): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/scatter/_xsrc.py b/plotly/validators/scatter/_xsrc.py index 81f0105c7e..8e75f42161 100644 --- a/plotly/validators/scatter/_xsrc.py +++ b/plotly/validators/scatter/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="scatter", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_y.py b/plotly/validators/scatter/_y.py index e7b80e1b11..a35e614701 100644 --- a/plotly/validators/scatter/_y.py +++ b/plotly/validators/scatter/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="scatter", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter/_y0.py b/plotly/validators/scatter/_y0.py index 8cc00eaedd..64ef034f1e 100644 --- a/plotly/validators/scatter/_y0.py +++ b/plotly/validators/scatter/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="scatter", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter/_yaxis.py b/plotly/validators/scatter/_yaxis.py index c1e40f7bda..0583399bdb 100644 --- a/plotly/validators/scatter/_yaxis.py +++ b/plotly/validators/scatter/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="scatter", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter/_ycalendar.py b/plotly/validators/scatter/_ycalendar.py index 3e0f9dab2c..b372348656 100644 --- a/plotly/validators/scatter/_ycalendar.py +++ b/plotly/validators/scatter/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="scatter", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/_yhoverformat.py b/plotly/validators/scatter/_yhoverformat.py index 4edd1f1c9d..38cfead020 100644 --- a/plotly/validators/scatter/_yhoverformat.py +++ b/plotly/validators/scatter/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="scatter", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_yperiod.py b/plotly/validators/scatter/_yperiod.py index c4657b1df7..dc9f3bcf2e 100644 --- a/plotly/validators/scatter/_yperiod.py +++ b/plotly/validators/scatter/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="scatter", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_yperiod0.py b/plotly/validators/scatter/_yperiod0.py index b4fb0416a2..eeb8a18710 100644 --- a/plotly/validators/scatter/_yperiod0.py +++ b/plotly/validators/scatter/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="scatter", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/_yperiodalignment.py b/plotly/validators/scatter/_yperiodalignment.py index 3ea1c231f0..4d0fb61c73 100644 --- a/plotly/validators/scatter/_yperiodalignment.py +++ b/plotly/validators/scatter/_yperiodalignment.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yperiodalignment", parent_name="scatter", **kwargs): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/scatter/_ysrc.py b/plotly/validators/scatter/_ysrc.py index cc2de3a27f..912b46e25e 100644 --- a/plotly/validators/scatter/_ysrc.py +++ b/plotly/validators/scatter/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="scatter", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/_zorder.py b/plotly/validators/scatter/_zorder.py index 5bb39056b5..b6d2781941 100644 --- a/plotly/validators/scatter/_zorder.py +++ b/plotly/validators/scatter/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="scatter", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/__init__.py b/plotly/validators/scatter/error_x/__init__.py index 2e3ce59d75..62838bdb73 100644 --- a/plotly/validators/scatter/error_x/__init__.py +++ b/plotly/validators/scatter/error_x/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._copy_ystyle import Copy_YstyleValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._copy_ystyle.Copy_YstyleValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scatter/error_x/_array.py b/plotly/validators/scatter/error_x/_array.py index 222cd9d2a3..466e16e920 100644 --- a/plotly/validators/scatter/error_x/_array.py +++ b/plotly/validators/scatter/error_x/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scatter.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_arrayminus.py b/plotly/validators/scatter/error_x/_arrayminus.py index 1fc78a4f5e..cf8e19187b 100644 --- a/plotly/validators/scatter/error_x/_arrayminus.py +++ b/plotly/validators/scatter/error_x/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scatter.error_x", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_arrayminussrc.py b/plotly/validators/scatter/error_x/_arrayminussrc.py index 91529e2573..be083debca 100644 --- a/plotly/validators/scatter/error_x/_arrayminussrc.py +++ b/plotly/validators/scatter/error_x/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scatter.error_x", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_arraysrc.py b/plotly/validators/scatter/error_x/_arraysrc.py index 5c18154586..006d549cbd 100644 --- a/plotly/validators/scatter/error_x/_arraysrc.py +++ b/plotly/validators/scatter/error_x/_arraysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="arraysrc", parent_name="scatter.error_x", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_color.py b/plotly/validators/scatter/error_x/_color.py index 6b3fe1a13d..8ce02c03d6 100644 --- a/plotly/validators/scatter/error_x/_color.py +++ b/plotly/validators/scatter/error_x/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_copy_ystyle.py b/plotly/validators/scatter/error_x/_copy_ystyle.py index bd5f336939..8acc08c400 100644 --- a/plotly/validators/scatter/error_x/_copy_ystyle.py +++ b/plotly/validators/scatter/error_x/_copy_ystyle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): +class Copy_YstyleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="copy_ystyle", parent_name="scatter.error_x", **kwargs ): - super(Copy_YstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_symmetric.py b/plotly/validators/scatter/error_x/_symmetric.py index df1d35d6a2..c26a8e09aa 100644 --- a/plotly/validators/scatter/error_x/_symmetric.py +++ b/plotly/validators/scatter/error_x/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scatter.error_x", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_thickness.py b/plotly/validators/scatter/error_x/_thickness.py index 9bc697502f..26379c3150 100644 --- a/plotly/validators/scatter/error_x/_thickness.py +++ b/plotly/validators/scatter/error_x/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter.error_x", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_x/_traceref.py b/plotly/validators/scatter/error_x/_traceref.py index 82f4ee39a4..7c3fe58634 100644 --- a/plotly/validators/scatter/error_x/_traceref.py +++ b/plotly/validators/scatter/error_x/_traceref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__(self, plotly_name="traceref", parent_name="scatter.error_x", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_x/_tracerefminus.py b/plotly/validators/scatter/error_x/_tracerefminus.py index 08827e0e6e..c3a14f8ed9 100644 --- a/plotly/validators/scatter/error_x/_tracerefminus.py +++ b/plotly/validators/scatter/error_x/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter.error_x", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_x/_type.py b/plotly/validators/scatter/error_x/_type.py index 2c43ca4fda..f5343d73ef 100644 --- a/plotly/validators/scatter/error_x/_type.py +++ b/plotly/validators/scatter/error_x/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scatter.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scatter/error_x/_value.py b/plotly/validators/scatter/error_x/_value.py index f4169d7342..6a4c0833a1 100644 --- a/plotly/validators/scatter/error_x/_value.py +++ b/plotly/validators/scatter/error_x/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scatter.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_x/_valueminus.py b/plotly/validators/scatter/error_x/_valueminus.py index 0077160bb2..d724d96394 100644 --- a/plotly/validators/scatter/error_x/_valueminus.py +++ b/plotly/validators/scatter/error_x/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scatter.error_x", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_x/_visible.py b/plotly/validators/scatter/error_x/_visible.py index 521cc72b4c..a51ee6f8f7 100644 --- a/plotly/validators/scatter/error_x/_visible.py +++ b/plotly/validators/scatter/error_x/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="scatter.error_x", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_x/_width.py b/plotly/validators/scatter/error_x/_width.py index 60a0920a86..f7ff84466d 100644 --- a/plotly/validators/scatter/error_x/_width.py +++ b/plotly/validators/scatter/error_x/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_y/__init__.py b/plotly/validators/scatter/error_y/__init__.py index eff09cd6a0..ea49850d5f 100644 --- a/plotly/validators/scatter/error_y/__init__.py +++ b/plotly/validators/scatter/error_y/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scatter/error_y/_array.py b/plotly/validators/scatter/error_y/_array.py index d8e7e3024b..d5de8bb047 100644 --- a/plotly/validators/scatter/error_y/_array.py +++ b/plotly/validators/scatter/error_y/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scatter.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_arrayminus.py b/plotly/validators/scatter/error_y/_arrayminus.py index 1f991a14b7..5a01e7c82f 100644 --- a/plotly/validators/scatter/error_y/_arrayminus.py +++ b/plotly/validators/scatter/error_y/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scatter.error_y", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_arrayminussrc.py b/plotly/validators/scatter/error_y/_arrayminussrc.py index 35b50b1995..6f186a439f 100644 --- a/plotly/validators/scatter/error_y/_arrayminussrc.py +++ b/plotly/validators/scatter/error_y/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scatter.error_y", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_arraysrc.py b/plotly/validators/scatter/error_y/_arraysrc.py index 144f5a1c97..d1e823af49 100644 --- a/plotly/validators/scatter/error_y/_arraysrc.py +++ b/plotly/validators/scatter/error_y/_arraysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="arraysrc", parent_name="scatter.error_y", **kwargs): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_color.py b/plotly/validators/scatter/error_y/_color.py index bcae05a8c2..52eaba6cf9 100644 --- a/plotly/validators/scatter/error_y/_color.py +++ b/plotly/validators/scatter/error_y/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_symmetric.py b/plotly/validators/scatter/error_y/_symmetric.py index 19e54a4589..23ae08f6f1 100644 --- a/plotly/validators/scatter/error_y/_symmetric.py +++ b/plotly/validators/scatter/error_y/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scatter.error_y", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_thickness.py b/plotly/validators/scatter/error_y/_thickness.py index d063d2dc85..05777c4025 100644 --- a/plotly/validators/scatter/error_y/_thickness.py +++ b/plotly/validators/scatter/error_y/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter.error_y", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_y/_traceref.py b/plotly/validators/scatter/error_y/_traceref.py index 8437b20f7d..847042f90b 100644 --- a/plotly/validators/scatter/error_y/_traceref.py +++ b/plotly/validators/scatter/error_y/_traceref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__(self, plotly_name="traceref", parent_name="scatter.error_y", **kwargs): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_y/_tracerefminus.py b/plotly/validators/scatter/error_y/_tracerefminus.py index d192f3ad44..ad80cdef7e 100644 --- a/plotly/validators/scatter/error_y/_tracerefminus.py +++ b/plotly/validators/scatter/error_y/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter.error_y", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_y/_type.py b/plotly/validators/scatter/error_y/_type.py index 88cbd1d9a3..3effe74d67 100644 --- a/plotly/validators/scatter/error_y/_type.py +++ b/plotly/validators/scatter/error_y/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scatter.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scatter/error_y/_value.py b/plotly/validators/scatter/error_y/_value.py index 62e538325d..63fc1f11d3 100644 --- a/plotly/validators/scatter/error_y/_value.py +++ b/plotly/validators/scatter/error_y/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scatter.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_y/_valueminus.py b/plotly/validators/scatter/error_y/_valueminus.py index 64d8c502bd..328b37a7d3 100644 --- a/plotly/validators/scatter/error_y/_valueminus.py +++ b/plotly/validators/scatter/error_y/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scatter.error_y", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/error_y/_visible.py b/plotly/validators/scatter/error_y/_visible.py index a6210764ea..0ad732c26a 100644 --- a/plotly/validators/scatter/error_y/_visible.py +++ b/plotly/validators/scatter/error_y/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="scatter.error_y", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/error_y/_width.py b/plotly/validators/scatter/error_y/_width.py index 0bba545099..c2ba3d3e50 100644 --- a/plotly/validators/scatter/error_y/_width.py +++ b/plotly/validators/scatter/error_y/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/fillgradient/__init__.py b/plotly/validators/scatter/fillgradient/__init__.py index 27798f1e38..a286cf0919 100644 --- a/plotly/validators/scatter/fillgradient/__init__.py +++ b/plotly/validators/scatter/fillgradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._type import TypeValidator - from ._stop import StopValidator - from ._start import StartValidator - from ._colorscale import ColorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._type.TypeValidator", - "._stop.StopValidator", - "._start.StartValidator", - "._colorscale.ColorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._type.TypeValidator", + "._stop.StopValidator", + "._start.StartValidator", + "._colorscale.ColorscaleValidator", + ], +) diff --git a/plotly/validators/scatter/fillgradient/_colorscale.py b/plotly/validators/scatter/fillgradient/_colorscale.py index 558b59c454..168280666a 100644 --- a/plotly/validators/scatter/fillgradient/_colorscale.py +++ b/plotly/validators/scatter/fillgradient/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter.fillgradient", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/fillgradient/_start.py b/plotly/validators/scatter/fillgradient/_start.py index 1b7209f2a0..3427e25ead 100644 --- a/plotly/validators/scatter/fillgradient/_start.py +++ b/plotly/validators/scatter/fillgradient/_start.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__( self, plotly_name="start", parent_name="scatter.fillgradient", **kwargs ): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/fillgradient/_stop.py b/plotly/validators/scatter/fillgradient/_stop.py index 7ec359aaef..7079826cf6 100644 --- a/plotly/validators/scatter/fillgradient/_stop.py +++ b/plotly/validators/scatter/fillgradient/_stop.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StopValidator(_plotly_utils.basevalidators.NumberValidator): +class StopValidator(_bv.NumberValidator): def __init__( self, plotly_name="stop", parent_name="scatter.fillgradient", **kwargs ): - super(StopValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/fillgradient/_type.py b/plotly/validators/scatter/fillgradient/_type.py index 1d3d80a00b..bfd724819c 100644 --- a/plotly/validators/scatter/fillgradient/_type.py +++ b/plotly/validators/scatter/fillgradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scatter.fillgradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), **kwargs, diff --git a/plotly/validators/scatter/fillpattern/__init__.py b/plotly/validators/scatter/fillpattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/scatter/fillpattern/__init__.py +++ b/plotly/validators/scatter/fillpattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatter/fillpattern/_bgcolor.py b/plotly/validators/scatter/fillpattern/_bgcolor.py index 6ff0c13525..887ce8f57e 100644 --- a/plotly/validators/scatter/fillpattern/_bgcolor.py +++ b/plotly/validators/scatter/fillpattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter.fillpattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/fillpattern/_bgcolorsrc.py b/plotly/validators/scatter/fillpattern/_bgcolorsrc.py index 584639630b..7bd93b7e40 100644 --- a/plotly/validators/scatter/fillpattern/_bgcolorsrc.py +++ b/plotly/validators/scatter/fillpattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scatter.fillpattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/fillpattern/_fgcolor.py b/plotly/validators/scatter/fillpattern/_fgcolor.py index 14d1c20917..318ff6230e 100644 --- a/plotly/validators/scatter/fillpattern/_fgcolor.py +++ b/plotly/validators/scatter/fillpattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="scatter.fillpattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/fillpattern/_fgcolorsrc.py b/plotly/validators/scatter/fillpattern/_fgcolorsrc.py index efa81555fd..ceb5c41f21 100644 --- a/plotly/validators/scatter/fillpattern/_fgcolorsrc.py +++ b/plotly/validators/scatter/fillpattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="scatter.fillpattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/fillpattern/_fgopacity.py b/plotly/validators/scatter/fillpattern/_fgopacity.py index 4b6c2237a1..509f5dd88c 100644 --- a/plotly/validators/scatter/fillpattern/_fgopacity.py +++ b/plotly/validators/scatter/fillpattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="scatter.fillpattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/fillpattern/_fillmode.py b/plotly/validators/scatter/fillpattern/_fillmode.py index bb46ec29df..b5e2cfe338 100644 --- a/plotly/validators/scatter/fillpattern/_fillmode.py +++ b/plotly/validators/scatter/fillpattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="scatter.fillpattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/scatter/fillpattern/_shape.py b/plotly/validators/scatter/fillpattern/_shape.py index 610cbf7aa6..229a0531b3 100644 --- a/plotly/validators/scatter/fillpattern/_shape.py +++ b/plotly/validators/scatter/fillpattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="scatter.fillpattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/scatter/fillpattern/_shapesrc.py b/plotly/validators/scatter/fillpattern/_shapesrc.py index a31925a4df..3f802037b6 100644 --- a/plotly/validators/scatter/fillpattern/_shapesrc.py +++ b/plotly/validators/scatter/fillpattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="scatter.fillpattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/fillpattern/_size.py b/plotly/validators/scatter/fillpattern/_size.py index 3275e1633e..b322ec8d8e 100644 --- a/plotly/validators/scatter/fillpattern/_size.py +++ b/plotly/validators/scatter/fillpattern/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scatter.fillpattern", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/fillpattern/_sizesrc.py b/plotly/validators/scatter/fillpattern/_sizesrc.py index 9927fe6e54..f0eb2e489a 100644 --- a/plotly/validators/scatter/fillpattern/_sizesrc.py +++ b/plotly/validators/scatter/fillpattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatter.fillpattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/fillpattern/_solidity.py b/plotly/validators/scatter/fillpattern/_solidity.py index 51b03b2efb..8881e40a1f 100644 --- a/plotly/validators/scatter/fillpattern/_solidity.py +++ b/plotly/validators/scatter/fillpattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="scatter.fillpattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scatter/fillpattern/_soliditysrc.py b/plotly/validators/scatter/fillpattern/_soliditysrc.py index 021727fed5..8c2d36e60d 100644 --- a/plotly/validators/scatter/fillpattern/_soliditysrc.py +++ b/plotly/validators/scatter/fillpattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="scatter.fillpattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/__init__.py b/plotly/validators/scatter/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scatter/hoverlabel/__init__.py +++ b/plotly/validators/scatter/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scatter/hoverlabel/_align.py b/plotly/validators/scatter/hoverlabel/_align.py index 77322a3818..5a6ba3347f 100644 --- a/plotly/validators/scatter/hoverlabel/_align.py +++ b/plotly/validators/scatter/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="scatter.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scatter/hoverlabel/_alignsrc.py b/plotly/validators/scatter/hoverlabel/_alignsrc.py index b93ed10f3e..c4a10e335e 100644 --- a/plotly/validators/scatter/hoverlabel/_alignsrc.py +++ b/plotly/validators/scatter/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scatter.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/_bgcolor.py b/plotly/validators/scatter/hoverlabel/_bgcolor.py index d1c3b31d94..ab6ab02d10 100644 --- a/plotly/validators/scatter/hoverlabel/_bgcolor.py +++ b/plotly/validators/scatter/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py b/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py index 6df63e17a0..a31c3a74d2 100644 --- a/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scatter/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scatter.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/_bordercolor.py b/plotly/validators/scatter/hoverlabel/_bordercolor.py index 479a9ea9ed..4488b796b8 100644 --- a/plotly/validators/scatter/hoverlabel/_bordercolor.py +++ b/plotly/validators/scatter/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatter.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py b/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py index 82d84690ba..9adc56ba33 100644 --- a/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scatter/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scatter.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/_font.py b/plotly/validators/scatter/hoverlabel/_font.py index 14da90933c..17a3c2294b 100644 --- a/plotly/validators/scatter/hoverlabel/_font.py +++ b/plotly/validators/scatter/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="scatter.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatter/hoverlabel/_namelength.py b/plotly/validators/scatter/hoverlabel/_namelength.py index b6833359f9..760069fddc 100644 --- a/plotly/validators/scatter/hoverlabel/_namelength.py +++ b/plotly/validators/scatter/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scatter.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scatter/hoverlabel/_namelengthsrc.py b/plotly/validators/scatter/hoverlabel/_namelengthsrc.py index aea5b68f3f..fffbfc3b6d 100644 --- a/plotly/validators/scatter/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scatter/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scatter.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/__init__.py b/plotly/validators/scatter/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatter/hoverlabel/font/__init__.py +++ b/plotly/validators/scatter/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter/hoverlabel/font/_color.py b/plotly/validators/scatter/hoverlabel/font/_color.py index 7125d00bde..75a9a7e16f 100644 --- a/plotly/validators/scatter/hoverlabel/font/_color.py +++ b/plotly/validators/scatter/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter/hoverlabel/font/_colorsrc.py b/plotly/validators/scatter/hoverlabel/font/_colorsrc.py index 8cda62bd6a..f49b148dd7 100644 --- a/plotly/validators/scatter/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_family.py b/plotly/validators/scatter/hoverlabel/font/_family.py index 784ac54faf..b61bf2a438 100644 --- a/plotly/validators/scatter/hoverlabel/font/_family.py +++ b/plotly/validators/scatter/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatter/hoverlabel/font/_familysrc.py b/plotly/validators/scatter/hoverlabel/font/_familysrc.py index 0913ae6199..345e402fa1 100644 --- a/plotly/validators/scatter/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_lineposition.py b/plotly/validators/scatter/hoverlabel/font/_lineposition.py index e1b7289c88..5aeb0110ab 100644 --- a/plotly/validators/scatter/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scatter/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatter/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scatter/hoverlabel/font/_linepositionsrc.py index 353399cf80..ca34b79acc 100644 --- a/plotly/validators/scatter/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatter.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_shadow.py b/plotly/validators/scatter/hoverlabel/font/_shadow.py index 583920befe..8a2b2cb70a 100644 --- a/plotly/validators/scatter/hoverlabel/font/_shadow.py +++ b/plotly/validators/scatter/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter/hoverlabel/font/_shadowsrc.py b/plotly/validators/scatter/hoverlabel/font/_shadowsrc.py index 244d554f1d..c306c8e3d1 100644 --- a/plotly/validators/scatter/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_size.py b/plotly/validators/scatter/hoverlabel/font/_size.py index 7f8af7de0f..61528726a4 100644 --- a/plotly/validators/scatter/hoverlabel/font/_size.py +++ b/plotly/validators/scatter/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatter/hoverlabel/font/_sizesrc.py b/plotly/validators/scatter/hoverlabel/font/_sizesrc.py index 3f415ba684..ee3d58eed0 100644 --- a/plotly/validators/scatter/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_style.py b/plotly/validators/scatter/hoverlabel/font/_style.py index 1b83932149..1267106df0 100644 --- a/plotly/validators/scatter/hoverlabel/font/_style.py +++ b/plotly/validators/scatter/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatter/hoverlabel/font/_stylesrc.py b/plotly/validators/scatter/hoverlabel/font/_stylesrc.py index f0c06fd8a3..ad893b8285 100644 --- a/plotly/validators/scatter/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_textcase.py b/plotly/validators/scatter/hoverlabel/font/_textcase.py index 258d009c54..0b391abb89 100644 --- a/plotly/validators/scatter/hoverlabel/font/_textcase.py +++ b/plotly/validators/scatter/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatter/hoverlabel/font/_textcasesrc.py b/plotly/validators/scatter/hoverlabel/font/_textcasesrc.py index c30fc3aad6..887d5f2e9f 100644 --- a/plotly/validators/scatter/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_variant.py b/plotly/validators/scatter/hoverlabel/font/_variant.py index 07dab09b74..f71744f588 100644 --- a/plotly/validators/scatter/hoverlabel/font/_variant.py +++ b/plotly/validators/scatter/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scatter/hoverlabel/font/_variantsrc.py b/plotly/validators/scatter/hoverlabel/font/_variantsrc.py index dc601ac91c..6c78c1e56c 100644 --- a/plotly/validators/scatter/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/hoverlabel/font/_weight.py b/plotly/validators/scatter/hoverlabel/font/_weight.py index eefe12fa98..949e12ffe7 100644 --- a/plotly/validators/scatter/hoverlabel/font/_weight.py +++ b/plotly/validators/scatter/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatter/hoverlabel/font/_weightsrc.py b/plotly/validators/scatter/hoverlabel/font/_weightsrc.py index 503445f8bc..05ff31dc60 100644 --- a/plotly/validators/scatter/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scatter/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatter.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/legendgrouptitle/__init__.py b/plotly/validators/scatter/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scatter/legendgrouptitle/__init__.py +++ b/plotly/validators/scatter/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scatter/legendgrouptitle/_font.py b/plotly/validators/scatter/legendgrouptitle/_font.py index c630f5b067..b7742bb596 100644 --- a/plotly/validators/scatter/legendgrouptitle/_font.py +++ b/plotly/validators/scatter/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter/legendgrouptitle/_text.py b/plotly/validators/scatter/legendgrouptitle/_text.py index 2f96abde4e..b3863858bc 100644 --- a/plotly/validators/scatter/legendgrouptitle/_text.py +++ b/plotly/validators/scatter/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatter.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/legendgrouptitle/font/__init__.py b/plotly/validators/scatter/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scatter/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter/legendgrouptitle/font/_color.py b/plotly/validators/scatter/legendgrouptitle/font/_color.py index 3e2d6a41cf..7435d1b410 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_color.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/legendgrouptitle/font/_family.py b/plotly/validators/scatter/legendgrouptitle/font/_family.py index 630d096579..b868b78612 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_family.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter/legendgrouptitle/font/_lineposition.py b/plotly/validators/scatter/legendgrouptitle/font/_lineposition.py index 0c761ffdfa..d51f444203 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter/legendgrouptitle/font/_shadow.py b/plotly/validators/scatter/legendgrouptitle/font/_shadow.py index eaa79c5221..ce97dc0b01 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/legendgrouptitle/font/_size.py b/plotly/validators/scatter/legendgrouptitle/font/_size.py index 131a6edd36..6cc79d9d68 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_size.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter/legendgrouptitle/font/_style.py b/plotly/validators/scatter/legendgrouptitle/font/_style.py index bb55cf3786..fcd088bf88 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_style.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter/legendgrouptitle/font/_textcase.py b/plotly/validators/scatter/legendgrouptitle/font/_textcase.py index 9cbda07f02..08b410f9b0 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter/legendgrouptitle/font/_variant.py b/plotly/validators/scatter/legendgrouptitle/font/_variant.py index 5e1f0ea60b..423d56a1c5 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/legendgrouptitle/font/_weight.py b/plotly/validators/scatter/legendgrouptitle/font/_weight.py index caca940630..5a82a87ff8 100644 --- a/plotly/validators/scatter/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scatter/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter/line/__init__.py b/plotly/validators/scatter/line/__init__.py index ddf365c6a4..95279b84d5 100644 --- a/plotly/validators/scatter/line/__init__.py +++ b/plotly/validators/scatter/line/__init__.py @@ -1,29 +1,17 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._simplify import SimplifyValidator - from ._shape import ShapeValidator - from ._dash import DashValidator - from ._color import ColorValidator - from ._backoffsrc import BackoffsrcValidator - from ._backoff import BackoffValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._simplify.SimplifyValidator", - "._shape.ShapeValidator", - "._dash.DashValidator", - "._color.ColorValidator", - "._backoffsrc.BackoffsrcValidator", - "._backoff.BackoffValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._simplify.SimplifyValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + "._backoffsrc.BackoffsrcValidator", + "._backoff.BackoffValidator", + ], +) diff --git a/plotly/validators/scatter/line/_backoff.py b/plotly/validators/scatter/line/_backoff.py index 35a35ceea4..c845d079bb 100644 --- a/plotly/validators/scatter/line/_backoff.py +++ b/plotly/validators/scatter/line/_backoff.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffValidator(_plotly_utils.basevalidators.NumberValidator): +class BackoffValidator(_bv.NumberValidator): def __init__(self, plotly_name="backoff", parent_name="scatter.line", **kwargs): - super(BackoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/line/_backoffsrc.py b/plotly/validators/scatter/line/_backoffsrc.py index ff71261707..1bfa9ae252 100644 --- a/plotly/validators/scatter/line/_backoffsrc.py +++ b/plotly/validators/scatter/line/_backoffsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BackoffsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="backoffsrc", parent_name="scatter.line", **kwargs): - super(BackoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/line/_color.py b/plotly/validators/scatter/line/_color.py index 80cb638daa..b847a16407 100644 --- a/plotly/validators/scatter/line/_color.py +++ b/plotly/validators/scatter/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/line/_dash.py b/plotly/validators/scatter/line/_dash.py index fb7fb9eaa9..0a3679698c 100644 --- a/plotly/validators/scatter/line/_dash.py +++ b/plotly/validators/scatter/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="scatter.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/scatter/line/_shape.py b/plotly/validators/scatter/line/_shape.py index 4b0f922990..0bd3dac54d 100644 --- a/plotly/validators/scatter/line/_shape.py +++ b/plotly/validators/scatter/line/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scatter.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["linear", "spline", "hv", "vh", "hvh", "vhv"]), **kwargs, diff --git a/plotly/validators/scatter/line/_simplify.py b/plotly/validators/scatter/line/_simplify.py index 5a2b92838b..d2fcd2f733 100644 --- a/plotly/validators/scatter/line/_simplify.py +++ b/plotly/validators/scatter/line/_simplify.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SimplifyValidator(_plotly_utils.basevalidators.BooleanValidator): +class SimplifyValidator(_bv.BooleanValidator): def __init__(self, plotly_name="simplify", parent_name="scatter.line", **kwargs): - super(SimplifyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter/line/_smoothing.py b/plotly/validators/scatter/line/_smoothing.py index 8bb515da45..31f4997162 100644 --- a/plotly/validators/scatter/line/_smoothing.py +++ b/plotly/validators/scatter/line/_smoothing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__(self, plotly_name="smoothing", parent_name="scatter.line", **kwargs): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/line/_width.py b/plotly/validators/scatter/line/_width.py index d85f619276..d80f95d568 100644 --- a/plotly/validators/scatter/line/_width.py +++ b/plotly/validators/scatter/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/marker/__init__.py b/plotly/validators/scatter/marker/__init__.py index 8434e73e3f..fea9868a7b 100644 --- a/plotly/validators/scatter/marker/__init__.py +++ b/plotly/validators/scatter/marker/__init__.py @@ -1,71 +1,38 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._standoffsrc import StandoffsrcValidator - from ._standoff import StandoffValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxdisplayed import MaxdisplayedValidator - from ._line import LineValidator - from ._gradient import GradientValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angleref import AnglerefValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._standoffsrc.StandoffsrcValidator", - "._standoff.StandoffValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxdisplayed.MaxdisplayedValidator", - "._line.LineValidator", - "._gradient.GradientValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angleref.AnglerefValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._standoffsrc.StandoffsrcValidator", + "._standoff.StandoffValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angleref.AnglerefValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scatter/marker/_angle.py b/plotly/validators/scatter/marker/_angle.py index f2cdb6cba3..928155def0 100644 --- a/plotly/validators/scatter/marker/_angle.py +++ b/plotly/validators/scatter/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__(self, plotly_name="angle", parent_name="scatter.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", False), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), diff --git a/plotly/validators/scatter/marker/_angleref.py b/plotly/validators/scatter/marker/_angleref.py index 885a961f20..7e20612ae8 100644 --- a/plotly/validators/scatter/marker/_angleref.py +++ b/plotly/validators/scatter/marker/_angleref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnglerefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="angleref", parent_name="scatter.marker", **kwargs): - super(AnglerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", False), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["previous", "up"]), diff --git a/plotly/validators/scatter/marker/_anglesrc.py b/plotly/validators/scatter/marker/_anglesrc.py index 232d4419b9..9977455545 100644 --- a/plotly/validators/scatter/marker/_anglesrc.py +++ b/plotly/validators/scatter/marker/_anglesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="anglesrc", parent_name="scatter.marker", **kwargs): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_autocolorscale.py b/plotly/validators/scatter/marker/_autocolorscale.py index 025d3d340d..7c787ed61c 100644 --- a/plotly/validators/scatter/marker/_autocolorscale.py +++ b/plotly/validators/scatter/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatter.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter/marker/_cauto.py b/plotly/validators/scatter/marker/_cauto.py index ad3a3e6c9b..35c01317cf 100644 --- a/plotly/validators/scatter/marker/_cauto.py +++ b/plotly/validators/scatter/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="scatter.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter/marker/_cmax.py b/plotly/validators/scatter/marker/_cmax.py index 213a3248c8..8e66e25348 100644 --- a/plotly/validators/scatter/marker/_cmax.py +++ b/plotly/validators/scatter/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatter.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter/marker/_cmid.py b/plotly/validators/scatter/marker/_cmid.py index bd71a27db7..c5ffb89104 100644 --- a/plotly/validators/scatter/marker/_cmid.py +++ b/plotly/validators/scatter/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scatter.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter/marker/_cmin.py b/plotly/validators/scatter/marker/_cmin.py index df94a4727f..137b9c01ae 100644 --- a/plotly/validators/scatter/marker/_cmin.py +++ b/plotly/validators/scatter/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scatter.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter/marker/_color.py b/plotly/validators/scatter/marker/_color.py index 0c5492a1dd..2c23e85c92 100644 --- a/plotly/validators/scatter/marker/_color.py +++ b/plotly/validators/scatter/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), diff --git a/plotly/validators/scatter/marker/_coloraxis.py b/plotly/validators/scatter/marker/_coloraxis.py index 74772c21c7..880e7ac784 100644 --- a/plotly/validators/scatter/marker/_coloraxis.py +++ b/plotly/validators/scatter/marker/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="scatter.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatter/marker/_colorbar.py b/plotly/validators/scatter/marker/_colorbar.py index fdbcf0aac8..4468e3fab1 100644 --- a/plotly/validators/scatter/marker/_colorbar.py +++ b/plotly/validators/scatter/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="scatter.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter.marker.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/_colorscale.py b/plotly/validators/scatter/marker/_colorscale.py index 1967b9999f..b319a468cb 100644 --- a/plotly/validators/scatter/marker/_colorscale.py +++ b/plotly/validators/scatter/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatter/marker/_colorsrc.py b/plotly/validators/scatter/marker/_colorsrc.py index 9ac999f477..a47ca524cb 100644 --- a/plotly/validators/scatter/marker/_colorsrc.py +++ b/plotly/validators/scatter/marker/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="scatter.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_gradient.py b/plotly/validators/scatter/marker/_gradient.py index a16c95a666..2df4098a0b 100644 --- a/plotly/validators/scatter/marker/_gradient.py +++ b/plotly/validators/scatter/marker/_gradient.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class GradientValidator(_bv.CompoundValidator): def __init__(self, plotly_name="gradient", parent_name="scatter.marker", **kwargs): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gradient"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/_line.py b/plotly/validators/scatter/marker/_line.py index 3702b2d832..10e473d9f9 100644 --- a/plotly/validators/scatter/marker/_line.py +++ b/plotly/validators/scatter/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatter.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/_maxdisplayed.py b/plotly/validators/scatter/marker/_maxdisplayed.py index 7819f8f40a..5c294c3274 100644 --- a/plotly/validators/scatter/marker/_maxdisplayed.py +++ b/plotly/validators/scatter/marker/_maxdisplayed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxdisplayedValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxdisplayed", parent_name="scatter.marker", **kwargs ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/_opacity.py b/plotly/validators/scatter/marker/_opacity.py index 7f10af8c31..d81987f784 100644 --- a/plotly/validators/scatter/marker/_opacity.py +++ b/plotly/validators/scatter/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatter.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), diff --git a/plotly/validators/scatter/marker/_opacitysrc.py b/plotly/validators/scatter/marker/_opacitysrc.py index 8e44976291..639437492e 100644 --- a/plotly/validators/scatter/marker/_opacitysrc.py +++ b/plotly/validators/scatter/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scatter.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_reversescale.py b/plotly/validators/scatter/marker/_reversescale.py index afd3f1be25..54d8e5588e 100644 --- a/plotly/validators/scatter/marker/_reversescale.py +++ b/plotly/validators/scatter/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_showscale.py b/plotly/validators/scatter/marker/_showscale.py index b1f1b7197c..3fc86ea0cc 100644 --- a/plotly/validators/scatter/marker/_showscale.py +++ b/plotly/validators/scatter/marker/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="scatter.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_size.py b/plotly/validators/scatter/marker/_size.py index c9bf9eb27f..2221171332 100644 --- a/plotly/validators/scatter/marker/_size.py +++ b/plotly/validators/scatter/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scatter.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), diff --git a/plotly/validators/scatter/marker/_sizemin.py b/plotly/validators/scatter/marker/_sizemin.py index a03781f33a..c988e66bcf 100644 --- a/plotly/validators/scatter/marker/_sizemin.py +++ b/plotly/validators/scatter/marker/_sizemin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizemin", parent_name="scatter.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/_sizemode.py b/plotly/validators/scatter/marker/_sizemode.py index f2fd3887f3..269ba2ff30 100644 --- a/plotly/validators/scatter/marker/_sizemode.py +++ b/plotly/validators/scatter/marker/_sizemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="sizemode", parent_name="scatter.marker", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scatter/marker/_sizeref.py b/plotly/validators/scatter/marker/_sizeref.py index 6741790a14..2664089454 100644 --- a/plotly/validators/scatter/marker/_sizeref.py +++ b/plotly/validators/scatter/marker/_sizeref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scatter.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_sizesrc.py b/plotly/validators/scatter/marker/_sizesrc.py index be0d9f2002..fc8ad819af 100644 --- a/plotly/validators/scatter/marker/_sizesrc.py +++ b/plotly/validators/scatter/marker/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="scatter.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_standoff.py b/plotly/validators/scatter/marker/_standoff.py index 65b594e7a8..44fa327735 100644 --- a/plotly/validators/scatter/marker/_standoff.py +++ b/plotly/validators/scatter/marker/_standoff.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__(self, plotly_name="standoff", parent_name="scatter.marker", **kwargs): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), diff --git a/plotly/validators/scatter/marker/_standoffsrc.py b/plotly/validators/scatter/marker/_standoffsrc.py index 5997eae1ad..caf90cb76d 100644 --- a/plotly/validators/scatter/marker/_standoffsrc.py +++ b/plotly/validators/scatter/marker/_standoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StandoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="standoffsrc", parent_name="scatter.marker", **kwargs ): - super(StandoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/_symbol.py b/plotly/validators/scatter/marker/_symbol.py index 3a364f7f52..5a36ba41a2 100644 --- a/plotly/validators/scatter/marker/_symbol.py +++ b/plotly/validators/scatter/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="scatter.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( diff --git a/plotly/validators/scatter/marker/_symbolsrc.py b/plotly/validators/scatter/marker/_symbolsrc.py index 13719d4570..fd1d52f0ed 100644 --- a/plotly/validators/scatter/marker/_symbolsrc.py +++ b/plotly/validators/scatter/marker/_symbolsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="symbolsrc", parent_name="scatter.marker", **kwargs): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/__init__.py b/plotly/validators/scatter/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scatter/marker/colorbar/__init__.py +++ b/plotly/validators/scatter/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatter/marker/colorbar/_bgcolor.py b/plotly/validators/scatter/marker/colorbar/_bgcolor.py index 8399887bb5..0d866ec869 100644 --- a/plotly/validators/scatter/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scatter/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_bordercolor.py b/plotly/validators/scatter/marker/colorbar/_bordercolor.py index 03657f4800..e59a902d59 100644 --- a/plotly/validators/scatter/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scatter/marker/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatter.marker.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_borderwidth.py b/plotly/validators/scatter/marker/colorbar/_borderwidth.py index 38ee39414c..797e80632e 100644 --- a/plotly/validators/scatter/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scatter/marker/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scatter.marker.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_dtick.py b/plotly/validators/scatter/marker/colorbar/_dtick.py index cd0eef9765..2e432585f1 100644 --- a/plotly/validators/scatter/marker/colorbar/_dtick.py +++ b/plotly/validators/scatter/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scatter.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_exponentformat.py b/plotly/validators/scatter/marker/colorbar/_exponentformat.py index d68dfcb484..8efc556b9d 100644 --- a/plotly/validators/scatter/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scatter/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scatter.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_labelalias.py b/plotly/validators/scatter/marker/colorbar/_labelalias.py index ba654ed7a4..d2e49f3e75 100644 --- a/plotly/validators/scatter/marker/colorbar/_labelalias.py +++ b/plotly/validators/scatter/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scatter.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_len.py b/plotly/validators/scatter/marker/colorbar/_len.py index 39628d302a..50af5bd536 100644 --- a/plotly/validators/scatter/marker/colorbar/_len.py +++ b/plotly/validators/scatter/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scatter.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_lenmode.py b/plotly/validators/scatter/marker/colorbar/_lenmode.py index ceb8cc60c3..0417e89258 100644 --- a/plotly/validators/scatter/marker/colorbar/_lenmode.py +++ b/plotly/validators/scatter/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scatter.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_minexponent.py b/plotly/validators/scatter/marker/colorbar/_minexponent.py index 5124bf48a2..a4f73b6b0d 100644 --- a/plotly/validators/scatter/marker/colorbar/_minexponent.py +++ b/plotly/validators/scatter/marker/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatter.marker.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_nticks.py b/plotly/validators/scatter/marker/colorbar/_nticks.py index 542f13d926..f221f84875 100644 --- a/plotly/validators/scatter/marker/colorbar/_nticks.py +++ b/plotly/validators/scatter/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scatter.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_orientation.py b/plotly/validators/scatter/marker/colorbar/_orientation.py index cc15904ff2..e7cb9bcb62 100644 --- a/plotly/validators/scatter/marker/colorbar/_orientation.py +++ b/plotly/validators/scatter/marker/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatter.marker.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_outlinecolor.py b/plotly/validators/scatter/marker/colorbar/_outlinecolor.py index 5f22c33174..b6fb79a795 100644 --- a/plotly/validators/scatter/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scatter/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scatter.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_outlinewidth.py b/plotly/validators/scatter/marker/colorbar/_outlinewidth.py index 0b8a2ae217..4bb4d491df 100644 --- a/plotly/validators/scatter/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scatter/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scatter.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_separatethousands.py b/plotly/validators/scatter/marker/colorbar/_separatethousands.py index 0db06d828e..9bed47a798 100644 --- a/plotly/validators/scatter/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scatter/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scatter.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_showexponent.py b/plotly/validators/scatter/marker/colorbar/_showexponent.py index 6cbcb649e0..466a1f64c6 100644 --- a/plotly/validators/scatter/marker/colorbar/_showexponent.py +++ b/plotly/validators/scatter/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatter.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_showticklabels.py b/plotly/validators/scatter/marker/colorbar/_showticklabels.py index 8d0e06d5fe..96ffa01504 100644 --- a/plotly/validators/scatter/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scatter/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scatter.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_showtickprefix.py b/plotly/validators/scatter/marker/colorbar/_showtickprefix.py index 3633be1961..f1c61905d2 100644 --- a/plotly/validators/scatter/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scatter/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scatter.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_showticksuffix.py b/plotly/validators/scatter/marker/colorbar/_showticksuffix.py index 8ed606588e..2ab647053a 100644 --- a/plotly/validators/scatter/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scatter/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatter.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_thickness.py b/plotly/validators/scatter/marker/colorbar/_thickness.py index cddf5855a5..b66debc86c 100644 --- a/plotly/validators/scatter/marker/colorbar/_thickness.py +++ b/plotly/validators/scatter/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_thicknessmode.py b/plotly/validators/scatter/marker/colorbar/_thicknessmode.py index 5f57990374..38cfb2cb86 100644 --- a/plotly/validators/scatter/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scatter/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatter.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_tick0.py b/plotly/validators/scatter/marker/colorbar/_tick0.py index 91825a2cbe..34a88ce789 100644 --- a/plotly/validators/scatter/marker/colorbar/_tick0.py +++ b/plotly/validators/scatter/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatter.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_tickangle.py b/plotly/validators/scatter/marker/colorbar/_tickangle.py index 36a38a2178..ed3964d1ec 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickangle.py +++ b/plotly/validators/scatter/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_tickcolor.py b/plotly/validators/scatter/marker/colorbar/_tickcolor.py index 18455234c8..c761a8eadc 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scatter/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_tickfont.py b/plotly/validators/scatter/marker/colorbar/_tickfont.py index dd40df2ece..aad9b578c6 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickfont.py +++ b/plotly/validators/scatter/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_tickformat.py b/plotly/validators/scatter/marker/colorbar/_tickformat.py index a7ff49a95d..f38ff18b35 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickformat.py +++ b/plotly/validators/scatter/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py index 25b1abc181..1b2a12d00f 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scatter/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scatter.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scatter/marker/colorbar/_tickformatstops.py b/plotly/validators/scatter/marker/colorbar/_tickformatstops.py index 8e9a4afcc7..d681904688 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scatter/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatter.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scatter/marker/colorbar/_ticklabeloverflow.py index 70aa30b39b..a4c298bb1e 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scatter/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scatter.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_ticklabelposition.py b/plotly/validators/scatter/marker/colorbar/_ticklabelposition.py index 86f5740c32..3818c8e3fe 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scatter/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scatter.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/marker/colorbar/_ticklabelstep.py b/plotly/validators/scatter/marker/colorbar/_ticklabelstep.py index 2d6694e778..5d8422b374 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scatter/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatter.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_ticklen.py b/plotly/validators/scatter/marker/colorbar/_ticklen.py index c8f1bd62cd..6d00cb22c3 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticklen.py +++ b/plotly/validators/scatter/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scatter.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_tickmode.py b/plotly/validators/scatter/marker/colorbar/_tickmode.py index b9f1b8d341..47e9bbfec1 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickmode.py +++ b/plotly/validators/scatter/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scatter/marker/colorbar/_tickprefix.py b/plotly/validators/scatter/marker/colorbar/_tickprefix.py index 26b171a4c9..34f5acae71 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scatter/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_ticks.py b/plotly/validators/scatter/marker/colorbar/_ticks.py index 2635fdb156..d07d3f7765 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticks.py +++ b/plotly/validators/scatter/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scatter.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_ticksuffix.py b/plotly/validators/scatter/marker/colorbar/_ticksuffix.py index 06f0fca10f..067e79e8e3 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scatter/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scatter.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_ticktext.py b/plotly/validators/scatter/marker/colorbar/_ticktext.py index 98f03d13e2..31fe62e702 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticktext.py +++ b/plotly/validators/scatter/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatter.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py b/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py index e5c860dfa6..b2d17ae91c 100644 --- a/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scatter/marker/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scatter.marker.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_tickvals.py b/plotly/validators/scatter/marker/colorbar/_tickvals.py index 67df929226..edb80fb76b 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickvals.py +++ b/plotly/validators/scatter/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py b/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py index da7f018792..35755af6c5 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scatter/marker/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_tickwidth.py b/plotly/validators/scatter/marker/colorbar/_tickwidth.py index 604f512473..13970bda92 100644 --- a/plotly/validators/scatter/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scatter/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatter.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_title.py b/plotly/validators/scatter/marker/colorbar/_title.py index 9b1439b3a9..2a12d7d60f 100644 --- a/plotly/validators/scatter/marker/colorbar/_title.py +++ b/plotly/validators/scatter/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scatter.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_x.py b/plotly/validators/scatter/marker/colorbar/_x.py index 374e27f0ef..9b5fbcb26c 100644 --- a/plotly/validators/scatter/marker/colorbar/_x.py +++ b/plotly/validators/scatter/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scatter.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_xanchor.py b/plotly/validators/scatter/marker/colorbar/_xanchor.py index 1573a09d65..a040804923 100644 --- a/plotly/validators/scatter/marker/colorbar/_xanchor.py +++ b/plotly/validators/scatter/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scatter.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_xpad.py b/plotly/validators/scatter/marker/colorbar/_xpad.py index 10c81c1c23..60e7850ea0 100644 --- a/plotly/validators/scatter/marker/colorbar/_xpad.py +++ b/plotly/validators/scatter/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatter.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_xref.py b/plotly/validators/scatter/marker/colorbar/_xref.py index ffceac8c47..84ed38e522 100644 --- a/plotly/validators/scatter/marker/colorbar/_xref.py +++ b/plotly/validators/scatter/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scatter.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_y.py b/plotly/validators/scatter/marker/colorbar/_y.py index 5a19c4bb25..5b77a65b06 100644 --- a/plotly/validators/scatter/marker/colorbar/_y.py +++ b/plotly/validators/scatter/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatter.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/_yanchor.py b/plotly/validators/scatter/marker/colorbar/_yanchor.py index 83e742fb2b..1749224cc3 100644 --- a/plotly/validators/scatter/marker/colorbar/_yanchor.py +++ b/plotly/validators/scatter/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatter.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_ypad.py b/plotly/validators/scatter/marker/colorbar/_ypad.py index 19901d1b40..eec9452fc6 100644 --- a/plotly/validators/scatter/marker/colorbar/_ypad.py +++ b/plotly/validators/scatter/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatter.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/_yref.py b/plotly/validators/scatter/marker/colorbar/_yref.py index 63fe32254f..38e9049574 100644 --- a/plotly/validators/scatter/marker/colorbar/_yref.py +++ b/plotly/validators/scatter/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scatter.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py b/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_color.py b/plotly/validators/scatter/marker/colorbar/tickfont/_color.py index 85548b7a2b..eafbc59f4b 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_family.py b/plotly/validators/scatter/marker/colorbar/tickfont/_family.py index 53c4140896..77e633dc4c 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scatter/marker/colorbar/tickfont/_lineposition.py index 2faff5b4a9..0f17ddb1ac 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scatter/marker/colorbar/tickfont/_shadow.py index 0cde2dc989..1b12be3454 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_size.py b/plotly/validators/scatter/marker/colorbar/tickfont/_size.py index b1c2d86c73..12e120a249 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_style.py b/plotly/validators/scatter/marker/colorbar/tickfont/_style.py index 6576e53fea..902ecf1e4d 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scatter/marker/colorbar/tickfont/_textcase.py index dac54fc6fa..e6fe43d7f7 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_variant.py b/plotly/validators/scatter/marker/colorbar/tickfont/_variant.py index 268d74686c..6c27c5f738 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/marker/colorbar/tickfont/_weight.py b/plotly/validators/scatter/marker/colorbar/tickfont/_weight.py index 6a9e1f198a..f2cfa1f05b 100644 --- a/plotly/validators/scatter/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scatter/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scatter/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py index c90cdf4df0..c4d5c7ea5a 100644 --- a/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scatter/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatter.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py index 060a29194a..e3fb7c8d24 100644 --- a/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scatter/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scatter.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py index 6d95858edd..a85e128a9d 100644 --- a/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scatter/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scatter.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py index a23eed0287..0812858f88 100644 --- a/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scatter/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scatter.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py index f0897036a7..02278ad0e1 100644 --- a/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scatter/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scatter.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/title/__init__.py b/plotly/validators/scatter/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scatter/marker/colorbar/title/__init__.py +++ b/plotly/validators/scatter/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scatter/marker/colorbar/title/_font.py b/plotly/validators/scatter/marker/colorbar/title/_font.py index 3862f5d7b2..7a7bd4c285 100644 --- a/plotly/validators/scatter/marker/colorbar/title/_font.py +++ b/plotly/validators/scatter/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/title/_side.py b/plotly/validators/scatter/marker/colorbar/title/_side.py index 42c6668e74..aa8e60970c 100644 --- a/plotly/validators/scatter/marker/colorbar/title/_side.py +++ b/plotly/validators/scatter/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatter.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/title/_text.py b/plotly/validators/scatter/marker/colorbar/title/_text.py index 6f709415e0..2c23c9e39b 100644 --- a/plotly/validators/scatter/marker/colorbar/title/_text.py +++ b/plotly/validators/scatter/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatter.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/title/font/__init__.py b/plotly/validators/scatter/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_color.py b/plotly/validators/scatter/marker/colorbar/title/font/_color.py index 73654ca655..ce6d91fddb 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_family.py b/plotly/validators/scatter/marker/colorbar/title/font/_family.py index a3555ac265..268f626e92 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scatter/marker/colorbar/title/font/_lineposition.py index 9adbdd11c7..5e926a8cde 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_shadow.py b/plotly/validators/scatter/marker/colorbar/title/font/_shadow.py index 7dd64d6978..819f74fc01 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_size.py b/plotly/validators/scatter/marker/colorbar/title/font/_size.py index f97d150a4a..23c08a3b57 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_style.py b/plotly/validators/scatter/marker/colorbar/title/font/_style.py index ae7a966d6b..0493be5ebc 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_textcase.py b/plotly/validators/scatter/marker/colorbar/title/font/_textcase.py index ba66bc23fc..0d67bebac4 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_variant.py b/plotly/validators/scatter/marker/colorbar/title/font/_variant.py index 569d383050..54ed7bf8eb 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter/marker/colorbar/title/font/_weight.py b/plotly/validators/scatter/marker/colorbar/title/font/_weight.py index b8660f270c..f178f32bb7 100644 --- a/plotly/validators/scatter/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scatter/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter/marker/gradient/__init__.py b/plotly/validators/scatter/marker/gradient/__init__.py index 624a280ea4..f5373e7822 100644 --- a/plotly/validators/scatter/marker/gradient/__init__.py +++ b/plotly/validators/scatter/marker/gradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._typesrc import TypesrcValidator - from ._type import TypeValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._typesrc.TypesrcValidator", - "._type.TypeValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter/marker/gradient/_color.py b/plotly/validators/scatter/marker/gradient/_color.py index 225a4231a2..40a2b7be11 100644 --- a/plotly/validators/scatter/marker/gradient/_color.py +++ b/plotly/validators/scatter/marker/gradient/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.marker.gradient", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/marker/gradient/_colorsrc.py b/plotly/validators/scatter/marker/gradient/_colorsrc.py index 8d15c7bf79..17dd54c408 100644 --- a/plotly/validators/scatter/marker/gradient/_colorsrc.py +++ b/plotly/validators/scatter/marker/gradient/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter.marker.gradient", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/gradient/_type.py b/plotly/validators/scatter/marker/gradient/_type.py index c042dc4720..9f02996e80 100644 --- a/plotly/validators/scatter/marker/gradient/_type.py +++ b/plotly/validators/scatter/marker/gradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scatter.marker.gradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), diff --git a/plotly/validators/scatter/marker/gradient/_typesrc.py b/plotly/validators/scatter/marker/gradient/_typesrc.py index 9a61056811..f53b66cf33 100644 --- a/plotly/validators/scatter/marker/gradient/_typesrc.py +++ b/plotly/validators/scatter/marker/gradient/_typesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TypesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scatter.marker.gradient", **kwargs ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/line/__init__.py b/plotly/validators/scatter/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scatter/marker/line/__init__.py +++ b/plotly/validators/scatter/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatter/marker/line/_autocolorscale.py b/plotly/validators/scatter/marker/line/_autocolorscale.py index f3573a2670..ce4d52423d 100644 --- a/plotly/validators/scatter/marker/line/_autocolorscale.py +++ b/plotly/validators/scatter/marker/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatter.marker.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter/marker/line/_cauto.py b/plotly/validators/scatter/marker/line/_cauto.py index 88661a2419..32b3dc39ce 100644 --- a/plotly/validators/scatter/marker/line/_cauto.py +++ b/plotly/validators/scatter/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatter.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter/marker/line/_cmax.py b/plotly/validators/scatter/marker/line/_cmax.py index 353b719082..fa4504c070 100644 --- a/plotly/validators/scatter/marker/line/_cmax.py +++ b/plotly/validators/scatter/marker/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatter.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter/marker/line/_cmid.py b/plotly/validators/scatter/marker/line/_cmid.py index ff5e31f556..5175b1998a 100644 --- a/plotly/validators/scatter/marker/line/_cmid.py +++ b/plotly/validators/scatter/marker/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scatter.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter/marker/line/_cmin.py b/plotly/validators/scatter/marker/line/_cmin.py index 29de8b74c5..28b1d09351 100644 --- a/plotly/validators/scatter/marker/line/_cmin.py +++ b/plotly/validators/scatter/marker/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scatter.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter/marker/line/_color.py b/plotly/validators/scatter/marker/line/_color.py index 63b13ff685..e45b08d5a4 100644 --- a/plotly/validators/scatter/marker/line/_color.py +++ b/plotly/validators/scatter/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), diff --git a/plotly/validators/scatter/marker/line/_coloraxis.py b/plotly/validators/scatter/marker/line/_coloraxis.py index 825e0a12a5..f4d1a0a624 100644 --- a/plotly/validators/scatter/marker/line/_coloraxis.py +++ b/plotly/validators/scatter/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatter.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatter/marker/line/_colorscale.py b/plotly/validators/scatter/marker/line/_colorscale.py index 24d642325f..09b3dac3fe 100644 --- a/plotly/validators/scatter/marker/line/_colorscale.py +++ b/plotly/validators/scatter/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatter/marker/line/_colorsrc.py b/plotly/validators/scatter/marker/line/_colorsrc.py index 76fbd64c8b..1d2f7a576d 100644 --- a/plotly/validators/scatter/marker/line/_colorsrc.py +++ b/plotly/validators/scatter/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/line/_reversescale.py b/plotly/validators/scatter/marker/line/_reversescale.py index e7a3797fe2..001fd45e2b 100644 --- a/plotly/validators/scatter/marker/line/_reversescale.py +++ b/plotly/validators/scatter/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter/marker/line/_width.py b/plotly/validators/scatter/marker/line/_width.py index d5794557aa..61fe97a06d 100644 --- a/plotly/validators/scatter/marker/line/_width.py +++ b/plotly/validators/scatter/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatter.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), diff --git a/plotly/validators/scatter/marker/line/_widthsrc.py b/plotly/validators/scatter/marker/line/_widthsrc.py index 3e71e64a15..c92ecf1958 100644 --- a/plotly/validators/scatter/marker/line/_widthsrc.py +++ b/plotly/validators/scatter/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scatter.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/selected/__init__.py b/plotly/validators/scatter/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatter/selected/__init__.py +++ b/plotly/validators/scatter/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatter/selected/_marker.py b/plotly/validators/scatter/selected/_marker.py index dce7eb58ad..749b0c7c6c 100644 --- a/plotly/validators/scatter/selected/_marker.py +++ b/plotly/validators/scatter/selected/_marker.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scatter.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatter/selected/_textfont.py b/plotly/validators/scatter/selected/_textfont.py index 0a4b2c7564..f55d2064f1 100644 --- a/plotly/validators/scatter/selected/_textfont.py +++ b/plotly/validators/scatter/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatter.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatter/selected/marker/__init__.py b/plotly/validators/scatter/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatter/selected/marker/__init__.py +++ b/plotly/validators/scatter/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatter/selected/marker/_color.py b/plotly/validators/scatter/selected/marker/_color.py index f3e57a99c2..24e090a3c3 100644 --- a/plotly/validators/scatter/selected/marker/_color.py +++ b/plotly/validators/scatter/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/selected/marker/_opacity.py b/plotly/validators/scatter/selected/marker/_opacity.py index e75d21d2c6..e8691d105b 100644 --- a/plotly/validators/scatter/selected/marker/_opacity.py +++ b/plotly/validators/scatter/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatter.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/selected/marker/_size.py b/plotly/validators/scatter/selected/marker/_size.py index ba6e41849d..90ff14a08a 100644 --- a/plotly/validators/scatter/selected/marker/_size.py +++ b/plotly/validators/scatter/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/selected/textfont/__init__.py b/plotly/validators/scatter/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatter/selected/textfont/__init__.py +++ b/plotly/validators/scatter/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatter/selected/textfont/_color.py b/plotly/validators/scatter/selected/textfont/_color.py index 1cdfaedc7a..6b11356d00 100644 --- a/plotly/validators/scatter/selected/textfont/_color.py +++ b/plotly/validators/scatter/selected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.selected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/stream/__init__.py b/plotly/validators/scatter/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scatter/stream/__init__.py +++ b/plotly/validators/scatter/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scatter/stream/_maxpoints.py b/plotly/validators/scatter/stream/_maxpoints.py index 0e1bcf3cbc..02f00c8641 100644 --- a/plotly/validators/scatter/stream/_maxpoints.py +++ b/plotly/validators/scatter/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="scatter.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/stream/_token.py b/plotly/validators/scatter/stream/_token.py index 112a934f65..c1e4ae46a9 100644 --- a/plotly/validators/scatter/stream/_token.py +++ b/plotly/validators/scatter/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="scatter.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter/textfont/__init__.py b/plotly/validators/scatter/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatter/textfont/__init__.py +++ b/plotly/validators/scatter/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter/textfont/_color.py b/plotly/validators/scatter/textfont/_color.py index f1ce7da825..c39cd03bee 100644 --- a/plotly/validators/scatter/textfont/_color.py +++ b/plotly/validators/scatter/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter/textfont/_colorsrc.py b/plotly/validators/scatter/textfont/_colorsrc.py index 573902c913..d4af203b7e 100644 --- a/plotly/validators/scatter/textfont/_colorsrc.py +++ b/plotly/validators/scatter/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_family.py b/plotly/validators/scatter/textfont/_family.py index 4ccd896264..2c2e3d960a 100644 --- a/plotly/validators/scatter/textfont/_family.py +++ b/plotly/validators/scatter/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="scatter.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatter/textfont/_familysrc.py b/plotly/validators/scatter/textfont/_familysrc.py index 7ada4031b4..cbc1c0c009 100644 --- a/plotly/validators/scatter/textfont/_familysrc.py +++ b/plotly/validators/scatter/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatter.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_lineposition.py b/plotly/validators/scatter/textfont/_lineposition.py index 589c2e32fb..1e68a84031 100644 --- a/plotly/validators/scatter/textfont/_lineposition.py +++ b/plotly/validators/scatter/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatter/textfont/_linepositionsrc.py b/plotly/validators/scatter/textfont/_linepositionsrc.py index 1e42a594dc..d47cd87992 100644 --- a/plotly/validators/scatter/textfont/_linepositionsrc.py +++ b/plotly/validators/scatter/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatter.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_shadow.py b/plotly/validators/scatter/textfont/_shadow.py index 7183993c6c..de9b190e93 100644 --- a/plotly/validators/scatter/textfont/_shadow.py +++ b/plotly/validators/scatter/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="scatter.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter/textfont/_shadowsrc.py b/plotly/validators/scatter/textfont/_shadowsrc.py index 50266bc55c..f26a158bb4 100644 --- a/plotly/validators/scatter/textfont/_shadowsrc.py +++ b/plotly/validators/scatter/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatter.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_size.py b/plotly/validators/scatter/textfont/_size.py index 73df2ed828..796adfde48 100644 --- a/plotly/validators/scatter/textfont/_size.py +++ b/plotly/validators/scatter/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scatter.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatter/textfont/_sizesrc.py b/plotly/validators/scatter/textfont/_sizesrc.py index 77c09ca8b2..b7a61802ca 100644 --- a/plotly/validators/scatter/textfont/_sizesrc.py +++ b/plotly/validators/scatter/textfont/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="scatter.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_style.py b/plotly/validators/scatter/textfont/_style.py index 46afb529fb..1a9b4dec7d 100644 --- a/plotly/validators/scatter/textfont/_style.py +++ b/plotly/validators/scatter/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="scatter.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatter/textfont/_stylesrc.py b/plotly/validators/scatter/textfont/_stylesrc.py index 3ae67d1036..e4a9c6c2c1 100644 --- a/plotly/validators/scatter/textfont/_stylesrc.py +++ b/plotly/validators/scatter/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatter.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_textcase.py b/plotly/validators/scatter/textfont/_textcase.py index 8c846d5139..492b5025c1 100644 --- a/plotly/validators/scatter/textfont/_textcase.py +++ b/plotly/validators/scatter/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatter/textfont/_textcasesrc.py b/plotly/validators/scatter/textfont/_textcasesrc.py index 17158530dd..0e6ac12abb 100644 --- a/plotly/validators/scatter/textfont/_textcasesrc.py +++ b/plotly/validators/scatter/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatter.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_variant.py b/plotly/validators/scatter/textfont/_variant.py index 239e307fe8..d4d2c4f7a9 100644 --- a/plotly/validators/scatter/textfont/_variant.py +++ b/plotly/validators/scatter/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="scatter.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatter/textfont/_variantsrc.py b/plotly/validators/scatter/textfont/_variantsrc.py index 69a43995bc..cb046ee84d 100644 --- a/plotly/validators/scatter/textfont/_variantsrc.py +++ b/plotly/validators/scatter/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatter.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/textfont/_weight.py b/plotly/validators/scatter/textfont/_weight.py index e3e1c3340a..f148ba8864 100644 --- a/plotly/validators/scatter/textfont/_weight.py +++ b/plotly/validators/scatter/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="scatter.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatter/textfont/_weightsrc.py b/plotly/validators/scatter/textfont/_weightsrc.py index fc3fedd3d6..07cdf1cbc6 100644 --- a/plotly/validators/scatter/textfont/_weightsrc.py +++ b/plotly/validators/scatter/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatter.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter/unselected/__init__.py b/plotly/validators/scatter/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatter/unselected/__init__.py +++ b/plotly/validators/scatter/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatter/unselected/_marker.py b/plotly/validators/scatter/unselected/_marker.py index 7cacde8ce7..5be68796e7 100644 --- a/plotly/validators/scatter/unselected/_marker.py +++ b/plotly/validators/scatter/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatter.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatter/unselected/_textfont.py b/plotly/validators/scatter/unselected/_textfont.py index 4ad7ec772f..3e648e1ac4 100644 --- a/plotly/validators/scatter/unselected/_textfont.py +++ b/plotly/validators/scatter/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatter.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatter/unselected/marker/__init__.py b/plotly/validators/scatter/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatter/unselected/marker/__init__.py +++ b/plotly/validators/scatter/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatter/unselected/marker/_color.py b/plotly/validators/scatter/unselected/marker/_color.py index 331c776b01..8cb38176f5 100644 --- a/plotly/validators/scatter/unselected/marker/_color.py +++ b/plotly/validators/scatter/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter/unselected/marker/_opacity.py b/plotly/validators/scatter/unselected/marker/_opacity.py index b0b5539463..8bed552e8e 100644 --- a/plotly/validators/scatter/unselected/marker/_opacity.py +++ b/plotly/validators/scatter/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatter.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter/unselected/marker/_size.py b/plotly/validators/scatter/unselected/marker/_size.py index 5b9c79a570..f48890cdc8 100644 --- a/plotly/validators/scatter/unselected/marker/_size.py +++ b/plotly/validators/scatter/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter/unselected/textfont/__init__.py b/plotly/validators/scatter/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatter/unselected/textfont/__init__.py +++ b/plotly/validators/scatter/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatter/unselected/textfont/_color.py b/plotly/validators/scatter/unselected/textfont/_color.py index ba4eda7a51..c5a53ac558 100644 --- a/plotly/validators/scatter/unselected/textfont/_color.py +++ b/plotly/validators/scatter/unselected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter.unselected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/__init__.py b/plotly/validators/scatter3d/__init__.py index c9a28b14c3..abc965ced2 100644 --- a/plotly/validators/scatter3d/__init__.py +++ b/plotly/validators/scatter3d/__init__.py @@ -1,123 +1,64 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._zcalendar import ZcalendarValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._surfacecolor import SurfacecolorValidator - from ._surfaceaxis import SurfaceaxisValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._projection import ProjectionValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._error_z import Error_ZValidator - from ._error_y import Error_YValidator - from ._error_x import Error_XValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._zcalendar.ZcalendarValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._surfacecolor.SurfacecolorValidator", - "._surfaceaxis.SurfaceaxisValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._projection.ProjectionValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._error_z.Error_ZValidator", - "._error_y.Error_YValidator", - "._error_x.Error_XValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._zcalendar.ZcalendarValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._surfacecolor.SurfacecolorValidator", + "._surfaceaxis.SurfaceaxisValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._projection.ProjectionValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._error_z.Error_ZValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], +) diff --git a/plotly/validators/scatter3d/_connectgaps.py b/plotly/validators/scatter3d/_connectgaps.py index 0c907c5d4c..82fa7211d7 100644 --- a/plotly/validators/scatter3d/_connectgaps.py +++ b/plotly/validators/scatter3d/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scatter3d", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_customdata.py b/plotly/validators/scatter3d/_customdata.py index e78c83272c..15a6ace604 100644 --- a/plotly/validators/scatter3d/_customdata.py +++ b/plotly/validators/scatter3d/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scatter3d", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_customdatasrc.py b/plotly/validators/scatter3d/_customdatasrc.py index eeaaa1b47d..f15578bfa2 100644 --- a/plotly/validators/scatter3d/_customdatasrc.py +++ b/plotly/validators/scatter3d/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="scatter3d", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_error_x.py b/plotly/validators/scatter3d/_error_x.py index 414c380877..391cda3946 100644 --- a/plotly/validators/scatter3d/_error_x.py +++ b/plotly/validators/scatter3d/_error_x.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_x", parent_name="scatter3d", **kwargs): - super(Error_XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorX"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_error_y.py b/plotly/validators/scatter3d/_error_y.py index dc2b70655a..06d51d32e7 100644 --- a/plotly/validators/scatter3d/_error_y.py +++ b/plotly/validators/scatter3d/_error_y.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_y", parent_name="scatter3d", **kwargs): - super(Error_YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorY"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_zstyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_error_z.py b/plotly/validators/scatter3d/_error_z.py index 35d4c03dd9..4fcbd78295 100644 --- a/plotly/validators/scatter3d/_error_z.py +++ b/plotly/validators/scatter3d/_error_z.py @@ -1,70 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_z", parent_name="scatter3d", **kwargs): - super(Error_ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorZ"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_hoverinfo.py b/plotly/validators/scatter3d/_hoverinfo.py index 3858928672..68818e272f 100644 --- a/plotly/validators/scatter3d/_hoverinfo.py +++ b/plotly/validators/scatter3d/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scatter3d", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scatter3d/_hoverinfosrc.py b/plotly/validators/scatter3d/_hoverinfosrc.py index 2e4ca6ac82..9d581b62f9 100644 --- a/plotly/validators/scatter3d/_hoverinfosrc.py +++ b/plotly/validators/scatter3d/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="scatter3d", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_hoverlabel.py b/plotly/validators/scatter3d/_hoverlabel.py index ab2ae97868..a526784421 100644 --- a/plotly/validators/scatter3d/_hoverlabel.py +++ b/plotly/validators/scatter3d/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scatter3d", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_hovertemplate.py b/plotly/validators/scatter3d/_hovertemplate.py index cab0520f7b..50a476ae6f 100644 --- a/plotly/validators/scatter3d/_hovertemplate.py +++ b/plotly/validators/scatter3d/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="scatter3d", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter3d/_hovertemplatesrc.py b/plotly/validators/scatter3d/_hovertemplatesrc.py index 6cd9ce9e21..7040c1f57d 100644 --- a/plotly/validators/scatter3d/_hovertemplatesrc.py +++ b/plotly/validators/scatter3d/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scatter3d", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_hovertext.py b/plotly/validators/scatter3d/_hovertext.py index ae55845ad8..7f8076d982 100644 --- a/plotly/validators/scatter3d/_hovertext.py +++ b/plotly/validators/scatter3d/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scatter3d", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter3d/_hovertextsrc.py b/plotly/validators/scatter3d/_hovertextsrc.py index 32aaaffc11..4aa27a419d 100644 --- a/plotly/validators/scatter3d/_hovertextsrc.py +++ b/plotly/validators/scatter3d/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="scatter3d", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_ids.py b/plotly/validators/scatter3d/_ids.py index db8096b52b..334b1d81ec 100644 --- a/plotly/validators/scatter3d/_ids.py +++ b/plotly/validators/scatter3d/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scatter3d", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_idssrc.py b/plotly/validators/scatter3d/_idssrc.py index 42574639cc..36b59c8c57 100644 --- a/plotly/validators/scatter3d/_idssrc.py +++ b/plotly/validators/scatter3d/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scatter3d", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_legend.py b/plotly/validators/scatter3d/_legend.py index 03291a667e..2f1cafdaca 100644 --- a/plotly/validators/scatter3d/_legend.py +++ b/plotly/validators/scatter3d/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scatter3d", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatter3d/_legendgroup.py b/plotly/validators/scatter3d/_legendgroup.py index f9e5ebd962..47fece2aa4 100644 --- a/plotly/validators/scatter3d/_legendgroup.py +++ b/plotly/validators/scatter3d/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scatter3d", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_legendgrouptitle.py b/plotly/validators/scatter3d/_legendgrouptitle.py index dd490f6a0e..1c5f5ddb00 100644 --- a/plotly/validators/scatter3d/_legendgrouptitle.py +++ b/plotly/validators/scatter3d/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scatter3d", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_legendrank.py b/plotly/validators/scatter3d/_legendrank.py index 014a5ea674..10d55fde93 100644 --- a/plotly/validators/scatter3d/_legendrank.py +++ b/plotly/validators/scatter3d/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scatter3d", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_legendwidth.py b/plotly/validators/scatter3d/_legendwidth.py index 943ae7c2dc..407cb59e5c 100644 --- a/plotly/validators/scatter3d/_legendwidth.py +++ b/plotly/validators/scatter3d/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scatter3d", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/_line.py b/plotly/validators/scatter3d/_line.py index 09dd280aec..71f1ba4b2b 100644 --- a/plotly/validators/scatter3d/_line.py +++ b/plotly/validators/scatter3d/_line.py @@ -1,105 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatter3d", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `line.colorscale`. Has an effect - only if in `line.color` is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `line.color`) or the bounds set in - `line.cmin` and `line.cmax` Has an effect only - if in `line.color` is set to a numerical array. - Defaults to `false` when `line.cmin` and - `line.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `line.cmin` and/or `line.cmax` to be - equidistant to this point. Has an effect only - if in `line.color` is set to a numerical array. - Value should have the same units as in - `line.color`. Has no effect when `line.cauto` - is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `line.color` is set to a - numerical array. Value should have the same - units as in `line.color` and if set, - `line.cmax` must be set as well. - color - Sets the line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `line.cmin` and `line.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.line.Col - orBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `line.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `line.cmin` and `line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - dash - Sets the dash style of the lines. - reversescale - Reverses the color mapping if true. Has an - effect only if in `line.color` is set to a - numerical array. If true, `line.cmin` will - correspond to the last color in the array and - `line.cmax` will correspond to the first color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `line.color` is set to a numerical array. - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_marker.py b/plotly/validators/scatter3d/_marker.py index 98a9dcf479..52f4d52f1c 100644 --- a/plotly/validators/scatter3d/_marker.py +++ b/plotly/validators/scatter3d/_marker.py @@ -1,136 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scatter3d", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatter3d.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.scatter3d.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. Note that the marker - opacity for scatter3d traces must be a scalar - value for performance reasons. To set a - blending opacity value (i.e. which is not - transparent), set "marker.color" to an rgba - color and use its alpha channel. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_meta.py b/plotly/validators/scatter3d/_meta.py index 4087a15364..b0d63712ed 100644 --- a/plotly/validators/scatter3d/_meta.py +++ b/plotly/validators/scatter3d/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scatter3d", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatter3d/_metasrc.py b/plotly/validators/scatter3d/_metasrc.py index cc1ee2d8c6..371296760a 100644 --- a/plotly/validators/scatter3d/_metasrc.py +++ b/plotly/validators/scatter3d/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scatter3d", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_mode.py b/plotly/validators/scatter3d/_mode.py index 2cbcd36a1d..6ab4c9f9ed 100644 --- a/plotly/validators/scatter3d/_mode.py +++ b/plotly/validators/scatter3d/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scatter3d", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scatter3d/_name.py b/plotly/validators/scatter3d/_name.py index cb0558f813..2f9b2d706e 100644 --- a/plotly/validators/scatter3d/_name.py +++ b/plotly/validators/scatter3d/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scatter3d", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_opacity.py b/plotly/validators/scatter3d/_opacity.py index 2223000e21..4506206b25 100644 --- a/plotly/validators/scatter3d/_opacity.py +++ b/plotly/validators/scatter3d/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatter3d", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/_projection.py b/plotly/validators/scatter3d/_projection.py index b3cc0fdbac..d535e5fd9f 100644 --- a/plotly/validators/scatter3d/_projection.py +++ b/plotly/validators/scatter3d/_projection.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ProjectionValidator(_plotly_utils.basevalidators.CompoundValidator): +class ProjectionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="projection", parent_name="scatter3d", **kwargs): - super(ProjectionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Projection"), data_docs=kwargs.pop( "data_docs", """ - x - :class:`plotly.graph_objects.scatter3d.projecti - on.X` instance or dict with compatible - properties - y - :class:`plotly.graph_objects.scatter3d.projecti - on.Y` instance or dict with compatible - properties - z - :class:`plotly.graph_objects.scatter3d.projecti - on.Z` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_scene.py b/plotly/validators/scatter3d/_scene.py index e06212869f..f2b639e7d6 100644 --- a/plotly/validators/scatter3d/_scene.py +++ b/plotly/validators/scatter3d/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="scatter3d", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scatter3d/_showlegend.py b/plotly/validators/scatter3d/_showlegend.py index 3e604c5e2f..c125def6b7 100644 --- a/plotly/validators/scatter3d/_showlegend.py +++ b/plotly/validators/scatter3d/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scatter3d", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_stream.py b/plotly/validators/scatter3d/_stream.py index 61ea3739a1..f5dbb110eb 100644 --- a/plotly/validators/scatter3d/_stream.py +++ b/plotly/validators/scatter3d/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatter3d", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_surfaceaxis.py b/plotly/validators/scatter3d/_surfaceaxis.py index 0c994a4113..99ddf1e103 100644 --- a/plotly/validators/scatter3d/_surfaceaxis.py +++ b/plotly/validators/scatter3d/_surfaceaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfaceaxisValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SurfaceaxisValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="surfaceaxis", parent_name="scatter3d", **kwargs): - super(SurfaceaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [-1, 0, 1, 2]), **kwargs, diff --git a/plotly/validators/scatter3d/_surfacecolor.py b/plotly/validators/scatter3d/_surfacecolor.py index af54219bb7..edc9be2b0c 100644 --- a/plotly/validators/scatter3d/_surfacecolor.py +++ b/plotly/validators/scatter3d/_surfacecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfacecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class SurfacecolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="surfacecolor", parent_name="scatter3d", **kwargs): - super(SurfacecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_text.py b/plotly/validators/scatter3d/_text.py index b892ce9880..ce421bab51 100644 --- a/plotly/validators/scatter3d/_text.py +++ b/plotly/validators/scatter3d/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scatter3d", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter3d/_textfont.py b/plotly/validators/scatter3d/_textfont.py index fbab9e734a..9f58c15e36 100644 --- a/plotly/validators/scatter3d/_textfont.py +++ b/plotly/validators/scatter3d/_textfont.py @@ -1,61 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scatter3d", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/_textposition.py b/plotly/validators/scatter3d/_textposition.py index 56164a1b15..6d2612bd32 100644 --- a/plotly/validators/scatter3d/_textposition.py +++ b/plotly/validators/scatter3d/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="scatter3d", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatter3d/_textpositionsrc.py b/plotly/validators/scatter3d/_textpositionsrc.py index 6ed87d9c2e..62062acc8e 100644 --- a/plotly/validators/scatter3d/_textpositionsrc.py +++ b/plotly/validators/scatter3d/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scatter3d", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_textsrc.py b/plotly/validators/scatter3d/_textsrc.py index 4219c5aa36..9bc7914c6f 100644 --- a/plotly/validators/scatter3d/_textsrc.py +++ b/plotly/validators/scatter3d/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatter3d", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_texttemplate.py b/plotly/validators/scatter3d/_texttemplate.py index 1bc2049844..26ee7adab6 100644 --- a/plotly/validators/scatter3d/_texttemplate.py +++ b/plotly/validators/scatter3d/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="scatter3d", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter3d/_texttemplatesrc.py b/plotly/validators/scatter3d/_texttemplatesrc.py index fa96152174..dfcd4bda71 100644 --- a/plotly/validators/scatter3d/_texttemplatesrc.py +++ b/plotly/validators/scatter3d/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scatter3d", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_uid.py b/plotly/validators/scatter3d/_uid.py index 19725b8303..42d2f5b65d 100644 --- a/plotly/validators/scatter3d/_uid.py +++ b/plotly/validators/scatter3d/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scatter3d", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_uirevision.py b/plotly/validators/scatter3d/_uirevision.py index 3781e14c22..40163f06a4 100644 --- a/plotly/validators/scatter3d/_uirevision.py +++ b/plotly/validators/scatter3d/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scatter3d", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_visible.py b/plotly/validators/scatter3d/_visible.py index 1bf2894bb0..c7bcd92637 100644 --- a/plotly/validators/scatter3d/_visible.py +++ b/plotly/validators/scatter3d/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scatter3d", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scatter3d/_x.py b/plotly/validators/scatter3d/_x.py index a7a59dc05c..3786fa057e 100644 --- a/plotly/validators/scatter3d/_x.py +++ b/plotly/validators/scatter3d/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="scatter3d", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_xcalendar.py b/plotly/validators/scatter3d/_xcalendar.py index 4233e10672..81533113e8 100644 --- a/plotly/validators/scatter3d/_xcalendar.py +++ b/plotly/validators/scatter3d/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="scatter3d", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/_xhoverformat.py b/plotly/validators/scatter3d/_xhoverformat.py index f434175bf9..42962eb973 100644 --- a/plotly/validators/scatter3d/_xhoverformat.py +++ b/plotly/validators/scatter3d/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="scatter3d", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_xsrc.py b/plotly/validators/scatter3d/_xsrc.py index fedd96d67d..f9f3a205eb 100644 --- a/plotly/validators/scatter3d/_xsrc.py +++ b/plotly/validators/scatter3d/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="scatter3d", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_y.py b/plotly/validators/scatter3d/_y.py index 3e92f7856b..3f1d5f76d0 100644 --- a/plotly/validators/scatter3d/_y.py +++ b/plotly/validators/scatter3d/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="scatter3d", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_ycalendar.py b/plotly/validators/scatter3d/_ycalendar.py index a3bb86e925..2fe2ecdf63 100644 --- a/plotly/validators/scatter3d/_ycalendar.py +++ b/plotly/validators/scatter3d/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="scatter3d", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/_yhoverformat.py b/plotly/validators/scatter3d/_yhoverformat.py index 2dec92fd01..047864061e 100644 --- a/plotly/validators/scatter3d/_yhoverformat.py +++ b/plotly/validators/scatter3d/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="scatter3d", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_ysrc.py b/plotly/validators/scatter3d/_ysrc.py index ee1d761a3d..35eeb1b581 100644 --- a/plotly/validators/scatter3d/_ysrc.py +++ b/plotly/validators/scatter3d/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="scatter3d", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_z.py b/plotly/validators/scatter3d/_z.py index 6827617087..ebef29302a 100644 --- a/plotly/validators/scatter3d/_z.py +++ b/plotly/validators/scatter3d/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="scatter3d", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_zcalendar.py b/plotly/validators/scatter3d/_zcalendar.py index 71a0b8a726..c29460977d 100644 --- a/plotly/validators/scatter3d/_zcalendar.py +++ b/plotly/validators/scatter3d/_zcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ZcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="zcalendar", parent_name="scatter3d", **kwargs): - super(ZcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/_zhoverformat.py b/plotly/validators/scatter3d/_zhoverformat.py index 543d7e8098..577c6fa152 100644 --- a/plotly/validators/scatter3d/_zhoverformat.py +++ b/plotly/validators/scatter3d/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="scatter3d", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/_zsrc.py b/plotly/validators/scatter3d/_zsrc.py index 35c1051cb5..25abfdb7ac 100644 --- a/plotly/validators/scatter3d/_zsrc.py +++ b/plotly/validators/scatter3d/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="scatter3d", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/__init__.py b/plotly/validators/scatter3d/error_x/__init__.py index ff9282973c..1572917759 100644 --- a/plotly/validators/scatter3d/error_x/__init__.py +++ b/plotly/validators/scatter3d/error_x/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._copy_zstyle import Copy_ZstyleValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._copy_zstyle.Copy_ZstyleValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_zstyle.Copy_ZstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scatter3d/error_x/_array.py b/plotly/validators/scatter3d/error_x/_array.py index e062504d97..a9eef67de4 100644 --- a/plotly/validators/scatter3d/error_x/_array.py +++ b/plotly/validators/scatter3d/error_x/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scatter3d.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_arrayminus.py b/plotly/validators/scatter3d/error_x/_arrayminus.py index 378e0cbb2c..09e0bc9319 100644 --- a/plotly/validators/scatter3d/error_x/_arrayminus.py +++ b/plotly/validators/scatter3d/error_x/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scatter3d.error_x", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_arrayminussrc.py b/plotly/validators/scatter3d/error_x/_arrayminussrc.py index edb69ba1c7..5e233d484a 100644 --- a/plotly/validators/scatter3d/error_x/_arrayminussrc.py +++ b/plotly/validators/scatter3d/error_x/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scatter3d.error_x", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_arraysrc.py b/plotly/validators/scatter3d/error_x/_arraysrc.py index cf4d8f7420..f76a29a435 100644 --- a/plotly/validators/scatter3d/error_x/_arraysrc.py +++ b/plotly/validators/scatter3d/error_x/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="scatter3d.error_x", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_color.py b/plotly/validators/scatter3d/error_x/_color.py index b634d53abc..39f0090f8b 100644 --- a/plotly/validators/scatter3d/error_x/_color.py +++ b/plotly/validators/scatter3d/error_x/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_copy_zstyle.py b/plotly/validators/scatter3d/error_x/_copy_zstyle.py index 683b9493b7..031e3a49e7 100644 --- a/plotly/validators/scatter3d/error_x/_copy_zstyle.py +++ b/plotly/validators/scatter3d/error_x/_copy_zstyle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Copy_ZstyleValidator(_plotly_utils.basevalidators.BooleanValidator): +class Copy_ZstyleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="copy_zstyle", parent_name="scatter3d.error_x", **kwargs ): - super(Copy_ZstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_symmetric.py b/plotly/validators/scatter3d/error_x/_symmetric.py index 4400e330ef..a1205795fe 100644 --- a/plotly/validators/scatter3d/error_x/_symmetric.py +++ b/plotly/validators/scatter3d/error_x/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scatter3d.error_x", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_thickness.py b/plotly/validators/scatter3d/error_x/_thickness.py index 8d9a6a1d7c..1eec2af4f1 100644 --- a/plotly/validators/scatter3d/error_x/_thickness.py +++ b/plotly/validators/scatter3d/error_x/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter3d.error_x", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_x/_traceref.py b/plotly/validators/scatter3d/error_x/_traceref.py index 29ab9e594a..0f197171f8 100644 --- a/plotly/validators/scatter3d/error_x/_traceref.py +++ b/plotly/validators/scatter3d/error_x/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="scatter3d.error_x", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_x/_tracerefminus.py b/plotly/validators/scatter3d/error_x/_tracerefminus.py index afc73820cb..656490b7d7 100644 --- a/plotly/validators/scatter3d/error_x/_tracerefminus.py +++ b/plotly/validators/scatter3d/error_x/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter3d.error_x", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_x/_type.py b/plotly/validators/scatter3d/error_x/_type.py index 381798c7ac..fe17141c18 100644 --- a/plotly/validators/scatter3d/error_x/_type.py +++ b/plotly/validators/scatter3d/error_x/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scatter3d.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scatter3d/error_x/_value.py b/plotly/validators/scatter3d/error_x/_value.py index 358b176e62..c589654f64 100644 --- a/plotly/validators/scatter3d/error_x/_value.py +++ b/plotly/validators/scatter3d/error_x/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scatter3d.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_x/_valueminus.py b/plotly/validators/scatter3d/error_x/_valueminus.py index 4664beb661..a231f7faaf 100644 --- a/plotly/validators/scatter3d/error_x/_valueminus.py +++ b/plotly/validators/scatter3d/error_x/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scatter3d.error_x", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_x/_visible.py b/plotly/validators/scatter3d/error_x/_visible.py index f69873fb04..0f05a429b6 100644 --- a/plotly/validators/scatter3d/error_x/_visible.py +++ b/plotly/validators/scatter3d/error_x/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="scatter3d.error_x", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_x/_width.py b/plotly/validators/scatter3d/error_x/_width.py index 253aca9e57..7ac14b04f6 100644 --- a/plotly/validators/scatter3d/error_x/_width.py +++ b/plotly/validators/scatter3d/error_x/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter3d.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/__init__.py b/plotly/validators/scatter3d/error_y/__init__.py index ff9282973c..1572917759 100644 --- a/plotly/validators/scatter3d/error_y/__init__.py +++ b/plotly/validators/scatter3d/error_y/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._copy_zstyle import Copy_ZstyleValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._copy_zstyle.Copy_ZstyleValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_zstyle.Copy_ZstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scatter3d/error_y/_array.py b/plotly/validators/scatter3d/error_y/_array.py index 67372cfcfd..f264de55ab 100644 --- a/plotly/validators/scatter3d/error_y/_array.py +++ b/plotly/validators/scatter3d/error_y/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scatter3d.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_arrayminus.py b/plotly/validators/scatter3d/error_y/_arrayminus.py index c24fe735de..3b04b0d42f 100644 --- a/plotly/validators/scatter3d/error_y/_arrayminus.py +++ b/plotly/validators/scatter3d/error_y/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scatter3d.error_y", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_arrayminussrc.py b/plotly/validators/scatter3d/error_y/_arrayminussrc.py index bba9b0a20c..f7e38845da 100644 --- a/plotly/validators/scatter3d/error_y/_arrayminussrc.py +++ b/plotly/validators/scatter3d/error_y/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scatter3d.error_y", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_arraysrc.py b/plotly/validators/scatter3d/error_y/_arraysrc.py index 47b7b6c275..e6cfba970b 100644 --- a/plotly/validators/scatter3d/error_y/_arraysrc.py +++ b/plotly/validators/scatter3d/error_y/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="scatter3d.error_y", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_color.py b/plotly/validators/scatter3d/error_y/_color.py index 0b63777fb3..97fea634c9 100644 --- a/plotly/validators/scatter3d/error_y/_color.py +++ b/plotly/validators/scatter3d/error_y/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_copy_zstyle.py b/plotly/validators/scatter3d/error_y/_copy_zstyle.py index e63722ce7f..1e8c73d2c2 100644 --- a/plotly/validators/scatter3d/error_y/_copy_zstyle.py +++ b/plotly/validators/scatter3d/error_y/_copy_zstyle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Copy_ZstyleValidator(_plotly_utils.basevalidators.BooleanValidator): +class Copy_ZstyleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="copy_zstyle", parent_name="scatter3d.error_y", **kwargs ): - super(Copy_ZstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_symmetric.py b/plotly/validators/scatter3d/error_y/_symmetric.py index df5b406e98..fb6d34382e 100644 --- a/plotly/validators/scatter3d/error_y/_symmetric.py +++ b/plotly/validators/scatter3d/error_y/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scatter3d.error_y", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_thickness.py b/plotly/validators/scatter3d/error_y/_thickness.py index 7324919049..a39b107014 100644 --- a/plotly/validators/scatter3d/error_y/_thickness.py +++ b/plotly/validators/scatter3d/error_y/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter3d.error_y", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/_traceref.py b/plotly/validators/scatter3d/error_y/_traceref.py index e78c278dce..bae32a9ea7 100644 --- a/plotly/validators/scatter3d/error_y/_traceref.py +++ b/plotly/validators/scatter3d/error_y/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="scatter3d.error_y", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/_tracerefminus.py b/plotly/validators/scatter3d/error_y/_tracerefminus.py index 2785c51742..7bc03d5aca 100644 --- a/plotly/validators/scatter3d/error_y/_tracerefminus.py +++ b/plotly/validators/scatter3d/error_y/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter3d.error_y", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/_type.py b/plotly/validators/scatter3d/error_y/_type.py index 4b0fd287f8..90fbb54eed 100644 --- a/plotly/validators/scatter3d/error_y/_type.py +++ b/plotly/validators/scatter3d/error_y/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scatter3d.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/_value.py b/plotly/validators/scatter3d/error_y/_value.py index dc722c8d4f..a8f65176fc 100644 --- a/plotly/validators/scatter3d/error_y/_value.py +++ b/plotly/validators/scatter3d/error_y/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scatter3d.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/_valueminus.py b/plotly/validators/scatter3d/error_y/_valueminus.py index a64a64f3a4..f8734d615f 100644 --- a/plotly/validators/scatter3d/error_y/_valueminus.py +++ b/plotly/validators/scatter3d/error_y/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scatter3d.error_y", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_y/_visible.py b/plotly/validators/scatter3d/error_y/_visible.py index a798aaabf7..72cdf61ba5 100644 --- a/plotly/validators/scatter3d/error_y/_visible.py +++ b/plotly/validators/scatter3d/error_y/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="scatter3d.error_y", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_y/_width.py b/plotly/validators/scatter3d/error_y/_width.py index d8b34cb7cf..6b0d0f31f7 100644 --- a/plotly/validators/scatter3d/error_y/_width.py +++ b/plotly/validators/scatter3d/error_y/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter3d.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/__init__.py b/plotly/validators/scatter3d/error_z/__init__.py index eff09cd6a0..ea49850d5f 100644 --- a/plotly/validators/scatter3d/error_z/__init__.py +++ b/plotly/validators/scatter3d/error_z/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scatter3d/error_z/_array.py b/plotly/validators/scatter3d/error_z/_array.py index 81159c4e10..aabf261cf0 100644 --- a/plotly/validators/scatter3d/error_z/_array.py +++ b/plotly/validators/scatter3d/error_z/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scatter3d.error_z", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_arrayminus.py b/plotly/validators/scatter3d/error_z/_arrayminus.py index 628266cca0..cb79016cd2 100644 --- a/plotly/validators/scatter3d/error_z/_arrayminus.py +++ b/plotly/validators/scatter3d/error_z/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scatter3d.error_z", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_arrayminussrc.py b/plotly/validators/scatter3d/error_z/_arrayminussrc.py index 354f09870f..91ae5ca2fd 100644 --- a/plotly/validators/scatter3d/error_z/_arrayminussrc.py +++ b/plotly/validators/scatter3d/error_z/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scatter3d.error_z", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_arraysrc.py b/plotly/validators/scatter3d/error_z/_arraysrc.py index 65a3f9aa8d..c980bb34b5 100644 --- a/plotly/validators/scatter3d/error_z/_arraysrc.py +++ b/plotly/validators/scatter3d/error_z/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="scatter3d.error_z", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_color.py b/plotly/validators/scatter3d/error_z/_color.py index 3decda02d7..c9cf396d0a 100644 --- a/plotly/validators/scatter3d/error_z/_color.py +++ b/plotly/validators/scatter3d/error_z/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.error_z", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_symmetric.py b/plotly/validators/scatter3d/error_z/_symmetric.py index d9afdfeeb1..a8f62b603b 100644 --- a/plotly/validators/scatter3d/error_z/_symmetric.py +++ b/plotly/validators/scatter3d/error_z/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scatter3d.error_z", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_thickness.py b/plotly/validators/scatter3d/error_z/_thickness.py index 6d43b0fe19..62dd2deef1 100644 --- a/plotly/validators/scatter3d/error_z/_thickness.py +++ b/plotly/validators/scatter3d/error_z/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter3d.error_z", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/_traceref.py b/plotly/validators/scatter3d/error_z/_traceref.py index 2776060047..a7faef9510 100644 --- a/plotly/validators/scatter3d/error_z/_traceref.py +++ b/plotly/validators/scatter3d/error_z/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="scatter3d.error_z", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/_tracerefminus.py b/plotly/validators/scatter3d/error_z/_tracerefminus.py index 93b615f9f2..5a7a823e1d 100644 --- a/plotly/validators/scatter3d/error_z/_tracerefminus.py +++ b/plotly/validators/scatter3d/error_z/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scatter3d.error_z", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/_type.py b/plotly/validators/scatter3d/error_z/_type.py index 187bc65b62..9afd129353 100644 --- a/plotly/validators/scatter3d/error_z/_type.py +++ b/plotly/validators/scatter3d/error_z/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scatter3d.error_z", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/_value.py b/plotly/validators/scatter3d/error_z/_value.py index 39a984336a..db01e617e6 100644 --- a/plotly/validators/scatter3d/error_z/_value.py +++ b/plotly/validators/scatter3d/error_z/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scatter3d.error_z", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/_valueminus.py b/plotly/validators/scatter3d/error_z/_valueminus.py index c1cfde01e7..2743da5703 100644 --- a/plotly/validators/scatter3d/error_z/_valueminus.py +++ b/plotly/validators/scatter3d/error_z/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scatter3d.error_z", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/error_z/_visible.py b/plotly/validators/scatter3d/error_z/_visible.py index 1f89124a6b..e19a2eb38f 100644 --- a/plotly/validators/scatter3d/error_z/_visible.py +++ b/plotly/validators/scatter3d/error_z/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="scatter3d.error_z", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/error_z/_width.py b/plotly/validators/scatter3d/error_z/_width.py index 2f96c52335..71c5d2b908 100644 --- a/plotly/validators/scatter3d/error_z/_width.py +++ b/plotly/validators/scatter3d/error_z/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter3d.error_z", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/hoverlabel/__init__.py b/plotly/validators/scatter3d/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scatter3d/hoverlabel/__init__.py +++ b/plotly/validators/scatter3d/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scatter3d/hoverlabel/_align.py b/plotly/validators/scatter3d/hoverlabel/_align.py index ac3e366008..52e48e5646 100644 --- a/plotly/validators/scatter3d/hoverlabel/_align.py +++ b/plotly/validators/scatter3d/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scatter3d.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scatter3d/hoverlabel/_alignsrc.py b/plotly/validators/scatter3d/hoverlabel/_alignsrc.py index de7eb695af..9ff16c4904 100644 --- a/plotly/validators/scatter3d/hoverlabel/_alignsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scatter3d.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/_bgcolor.py b/plotly/validators/scatter3d/hoverlabel/_bgcolor.py index abf7cb7658..c9ba87c4df 100644 --- a/plotly/validators/scatter3d/hoverlabel/_bgcolor.py +++ b/plotly/validators/scatter3d/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter3d.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py b/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py index 831c8c2bf4..ff5b17cf17 100644 --- a/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scatter3d.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/_bordercolor.py b/plotly/validators/scatter3d/hoverlabel/_bordercolor.py index 067ead44c9..da00186448 100644 --- a/plotly/validators/scatter3d/hoverlabel/_bordercolor.py +++ b/plotly/validators/scatter3d/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatter3d.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py b/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py index 246454f6cb..5f50ca89ec 100644 --- a/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scatter3d.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/_font.py b/plotly/validators/scatter3d/hoverlabel/_font.py index b403a6575b..f15c26dae9 100644 --- a/plotly/validators/scatter3d/hoverlabel/_font.py +++ b/plotly/validators/scatter3d/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter3d.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/hoverlabel/_namelength.py b/plotly/validators/scatter3d/hoverlabel/_namelength.py index b4a336dcf1..bb09fb27d6 100644 --- a/plotly/validators/scatter3d/hoverlabel/_namelength.py +++ b/plotly/validators/scatter3d/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scatter3d.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py b/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py index 934cac3d06..0119008c65 100644 --- a/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scatter3d.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/__init__.py b/plotly/validators/scatter3d/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/__init__.py +++ b/plotly/validators/scatter3d/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_color.py b/plotly/validators/scatter3d/hoverlabel/font/_color.py index f4d11d44e2..20fb9d269d 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_color.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py b/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py index fdd2201dec..c914737ace 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_family.py b/plotly/validators/scatter3d/hoverlabel/font/_family.py index 092fa88901..26de62d06e 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_family.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py b/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py index 38a22080e9..6147711b30 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_lineposition.py b/plotly/validators/scatter3d/hoverlabel/font/_lineposition.py index b8b6c7a943..3b54866ed5 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter3d.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatter3d/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scatter3d/hoverlabel/font/_linepositionsrc.py index 6f653a3ae9..b57922ad61 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatter3d.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_shadow.py b/plotly/validators/scatter3d/hoverlabel/font/_shadow.py index e2d9319a29..577dfc1dec 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_shadow.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatter3d/hoverlabel/font/_shadowsrc.py b/plotly/validators/scatter3d/hoverlabel/font/_shadowsrc.py index 129e918dfd..a34b5f1b9b 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_size.py b/plotly/validators/scatter3d/hoverlabel/font/_size.py index 9c2d7beb57..d9da600d2e 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_size.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py b/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py index b488b78541..80da5f7e35 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_style.py b/plotly/validators/scatter3d/hoverlabel/font/_style.py index 8ad74f1d0c..7e54dcad58 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_style.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatter3d/hoverlabel/font/_stylesrc.py b/plotly/validators/scatter3d/hoverlabel/font/_stylesrc.py index 40c4004d28..aff5b5eb02 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_textcase.py b/plotly/validators/scatter3d/hoverlabel/font/_textcase.py index e2da3580a9..e98b335ed0 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_textcase.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatter3d/hoverlabel/font/_textcasesrc.py b/plotly/validators/scatter3d/hoverlabel/font/_textcasesrc.py index 6114364f18..e94175c650 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatter3d.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_variant.py b/plotly/validators/scatter3d/hoverlabel/font/_variant.py index 59c3c355fc..3a33f9a022 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_variant.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scatter3d/hoverlabel/font/_variantsrc.py b/plotly/validators/scatter3d/hoverlabel/font/_variantsrc.py index 410565d42d..252a41b66f 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatter3d.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/hoverlabel/font/_weight.py b/plotly/validators/scatter3d/hoverlabel/font/_weight.py index 886493ab14..4bf16a50c0 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_weight.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatter3d/hoverlabel/font/_weightsrc.py b/plotly/validators/scatter3d/hoverlabel/font/_weightsrc.py index 02947a1c25..8473d0d7ce 100644 --- a/plotly/validators/scatter3d/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scatter3d/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatter3d.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/legendgrouptitle/__init__.py b/plotly/validators/scatter3d/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/__init__.py +++ b/plotly/validators/scatter3d/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scatter3d/legendgrouptitle/_font.py b/plotly/validators/scatter3d/legendgrouptitle/_font.py index eb137c8d6b..439a36d171 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/_font.py +++ b/plotly/validators/scatter3d/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter3d.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/legendgrouptitle/_text.py b/plotly/validators/scatter3d/legendgrouptitle/_text.py index 98e1fb5c43..e9b25de9db 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/_text.py +++ b/plotly/validators/scatter3d/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatter3d.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/__init__.py b/plotly/validators/scatter3d/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_color.py b/plotly/validators/scatter3d/legendgrouptitle/font/_color.py index 5ac3b6cede..e8412b40e5 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_color.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_family.py b/plotly/validators/scatter3d/legendgrouptitle/font/_family.py index 07bf7fa01d..b06a01a661 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_family.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_lineposition.py b/plotly/validators/scatter3d/legendgrouptitle/font/_lineposition.py index 465a0e60f7..d84af21633 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_shadow.py b/plotly/validators/scatter3d/legendgrouptitle/font/_shadow.py index d063b6285c..af850952b9 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_size.py b/plotly/validators/scatter3d/legendgrouptitle/font/_size.py index 2b99d89ee0..14131f60ca 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_size.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_style.py b/plotly/validators/scatter3d/legendgrouptitle/font/_style.py index c8f17514da..9bf60f6a9f 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_style.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_textcase.py b/plotly/validators/scatter3d/legendgrouptitle/font/_textcase.py index ef725dfc72..54c6df5c7d 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_variant.py b/plotly/validators/scatter3d/legendgrouptitle/font/_variant.py index 7ab5cfc52c..951dee3d9b 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/legendgrouptitle/font/_weight.py b/plotly/validators/scatter3d/legendgrouptitle/font/_weight.py index 50476f2fa9..8962e26d6b 100644 --- a/plotly/validators/scatter3d/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scatter3d/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter3d/line/__init__.py b/plotly/validators/scatter3d/line/__init__.py index acdb8a9fbc..680c0d2ac5 100644 --- a/plotly/validators/scatter3d/line/__init__.py +++ b/plotly/validators/scatter3d/line/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._dash import DashValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._dash.DashValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._dash.DashValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatter3d/line/_autocolorscale.py b/plotly/validators/scatter3d/line/_autocolorscale.py index 793e1e2f13..330632b8df 100644 --- a/plotly/validators/scatter3d/line/_autocolorscale.py +++ b/plotly/validators/scatter3d/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatter3d.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/line/_cauto.py b/plotly/validators/scatter3d/line/_cauto.py index c88ebf1d2b..2d3606a104 100644 --- a/plotly/validators/scatter3d/line/_cauto.py +++ b/plotly/validators/scatter3d/line/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="scatter3d.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/line/_cmax.py b/plotly/validators/scatter3d/line/_cmax.py index a4f17f84d5..8de06093e1 100644 --- a/plotly/validators/scatter3d/line/_cmax.py +++ b/plotly/validators/scatter3d/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatter3d.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter3d/line/_cmid.py b/plotly/validators/scatter3d/line/_cmid.py index 8a81d28242..3ba08165db 100644 --- a/plotly/validators/scatter3d/line/_cmid.py +++ b/plotly/validators/scatter3d/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scatter3d.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/line/_cmin.py b/plotly/validators/scatter3d/line/_cmin.py index 95ae39019b..79b486f19a 100644 --- a/plotly/validators/scatter3d/line/_cmin.py +++ b/plotly/validators/scatter3d/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scatter3d.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter3d/line/_color.py b/plotly/validators/scatter3d/line/_color.py index bc2ca01a1a..24a3b0b22f 100644 --- a/plotly/validators/scatter3d/line/_color.py +++ b/plotly/validators/scatter3d/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop("colorscale_path", "scatter3d.line.colorscale"), diff --git a/plotly/validators/scatter3d/line/_coloraxis.py b/plotly/validators/scatter3d/line/_coloraxis.py index c680d4e0a7..c5b97cf124 100644 --- a/plotly/validators/scatter3d/line/_coloraxis.py +++ b/plotly/validators/scatter3d/line/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="scatter3d.line", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatter3d/line/_colorbar.py b/plotly/validators/scatter3d/line/_colorbar.py index cdfe435f69..572bcc4207 100644 --- a/plotly/validators/scatter3d/line/_colorbar.py +++ b/plotly/validators/scatter3d/line/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="scatter3d.line", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.line.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.line.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - scatter3d.line.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.line.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/line/_colorscale.py b/plotly/validators/scatter3d/line/_colorscale.py index c8b8af4c59..b381f1c747 100644 --- a/plotly/validators/scatter3d/line/_colorscale.py +++ b/plotly/validators/scatter3d/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter3d.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatter3d/line/_colorsrc.py b/plotly/validators/scatter3d/line/_colorsrc.py index ba2f770b35..89e0a332ee 100644 --- a/plotly/validators/scatter3d/line/_colorsrc.py +++ b/plotly/validators/scatter3d/line/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="scatter3d.line", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/_dash.py b/plotly/validators/scatter3d/line/_dash.py index c0eebf312e..9e78540318 100644 --- a/plotly/validators/scatter3d/line/_dash.py +++ b/plotly/validators/scatter3d/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DashValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="dash", parent_name="scatter3d.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["dash", "dashdot", "dot", "longdash", "longdashdot", "solid"] diff --git a/plotly/validators/scatter3d/line/_reversescale.py b/plotly/validators/scatter3d/line/_reversescale.py index f5a3c6e270..ff591049ca 100644 --- a/plotly/validators/scatter3d/line/_reversescale.py +++ b/plotly/validators/scatter3d/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter3d.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/_showscale.py b/plotly/validators/scatter3d/line/_showscale.py index 52a8c6d436..c6edaca484 100644 --- a/plotly/validators/scatter3d/line/_showscale.py +++ b/plotly/validators/scatter3d/line/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="scatter3d.line", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/_width.py b/plotly/validators/scatter3d/line/_width.py index b983384a50..8c79cc8a3a 100644 --- a/plotly/validators/scatter3d/line/_width.py +++ b/plotly/validators/scatter3d/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatter3d.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/__init__.py b/plotly/validators/scatter3d/line/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scatter3d/line/colorbar/__init__.py +++ b/plotly/validators/scatter3d/line/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatter3d/line/colorbar/_bgcolor.py b/plotly/validators/scatter3d/line/colorbar/_bgcolor.py index 27be612729..d53e4a23fb 100644 --- a/plotly/validators/scatter3d/line/colorbar/_bgcolor.py +++ b/plotly/validators/scatter3d/line/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter3d.line.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_bordercolor.py b/plotly/validators/scatter3d/line/colorbar/_bordercolor.py index 09eaff48ed..fe7228c08b 100644 --- a/plotly/validators/scatter3d/line/colorbar/_bordercolor.py +++ b/plotly/validators/scatter3d/line/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatter3d.line.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_borderwidth.py b/plotly/validators/scatter3d/line/colorbar/_borderwidth.py index 27a09121cd..ef8e3aa023 100644 --- a/plotly/validators/scatter3d/line/colorbar/_borderwidth.py +++ b/plotly/validators/scatter3d/line/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scatter3d.line.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_dtick.py b/plotly/validators/scatter3d/line/colorbar/_dtick.py index 320e3d57cd..04b6c5d08e 100644 --- a/plotly/validators/scatter3d/line/colorbar/_dtick.py +++ b/plotly/validators/scatter3d/line/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scatter3d.line.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_exponentformat.py b/plotly/validators/scatter3d/line/colorbar/_exponentformat.py index 7be282c94d..6bfc079384 100644 --- a/plotly/validators/scatter3d/line/colorbar/_exponentformat.py +++ b/plotly/validators/scatter3d/line/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_labelalias.py b/plotly/validators/scatter3d/line/colorbar/_labelalias.py index 72131b932f..66f85023b8 100644 --- a/plotly/validators/scatter3d/line/colorbar/_labelalias.py +++ b/plotly/validators/scatter3d/line/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scatter3d.line.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_len.py b/plotly/validators/scatter3d/line/colorbar/_len.py index d532170efe..1a71059a2f 100644 --- a/plotly/validators/scatter3d/line/colorbar/_len.py +++ b/plotly/validators/scatter3d/line/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scatter3d.line.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_lenmode.py b/plotly/validators/scatter3d/line/colorbar/_lenmode.py index d33ac15a4b..56c455e084 100644 --- a/plotly/validators/scatter3d/line/colorbar/_lenmode.py +++ b/plotly/validators/scatter3d/line/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scatter3d.line.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_minexponent.py b/plotly/validators/scatter3d/line/colorbar/_minexponent.py index 5a6df8218c..6653428848 100644 --- a/plotly/validators/scatter3d/line/colorbar/_minexponent.py +++ b/plotly/validators/scatter3d/line/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatter3d.line.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_nticks.py b/plotly/validators/scatter3d/line/colorbar/_nticks.py index 9c9272ccc1..dd64c1d789 100644 --- a/plotly/validators/scatter3d/line/colorbar/_nticks.py +++ b/plotly/validators/scatter3d/line/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scatter3d.line.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_orientation.py b/plotly/validators/scatter3d/line/colorbar/_orientation.py index 7ca09a0384..2c6f03716c 100644 --- a/plotly/validators/scatter3d/line/colorbar/_orientation.py +++ b/plotly/validators/scatter3d/line/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatter3d.line.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py b/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py index c2093eb904..02c1dfdf67 100644 --- a/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py +++ b/plotly/validators/scatter3d/line/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py b/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py index 69791e51d7..e8c472de45 100644 --- a/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py +++ b/plotly/validators/scatter3d/line/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_separatethousands.py b/plotly/validators/scatter3d/line/colorbar/_separatethousands.py index fe675ecbcd..26139535e6 100644 --- a/plotly/validators/scatter3d/line/colorbar/_separatethousands.py +++ b/plotly/validators/scatter3d/line/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_showexponent.py b/plotly/validators/scatter3d/line/colorbar/_showexponent.py index 819d794be1..eea8510dba 100644 --- a/plotly/validators/scatter3d/line/colorbar/_showexponent.py +++ b/plotly/validators/scatter3d/line/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_showticklabels.py b/plotly/validators/scatter3d/line/colorbar/_showticklabels.py index 551093a97e..98330df198 100644 --- a/plotly/validators/scatter3d/line/colorbar/_showticklabels.py +++ b/plotly/validators/scatter3d/line/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py b/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py index 8db9b612ce..bebbd791c8 100644 --- a/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py +++ b/plotly/validators/scatter3d/line/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py b/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py index 896afabca4..aee6b119c4 100644 --- a/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py +++ b/plotly/validators/scatter3d/line/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_thickness.py b/plotly/validators/scatter3d/line/colorbar/_thickness.py index 7ceaa6c7f4..9621857eb4 100644 --- a/plotly/validators/scatter3d/line/colorbar/_thickness.py +++ b/plotly/validators/scatter3d/line/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter3d.line.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py b/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py index debf58bec9..7b5071a621 100644 --- a/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py +++ b/plotly/validators/scatter3d/line/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_tick0.py b/plotly/validators/scatter3d/line/colorbar/_tick0.py index b4b2be240e..b93cd0c5f5 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tick0.py +++ b/plotly/validators/scatter3d/line/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatter3d.line.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_tickangle.py b/plotly/validators/scatter3d/line/colorbar/_tickangle.py index 92093ca262..81a18e1f59 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickangle.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_tickcolor.py b/plotly/validators/scatter3d/line/colorbar/_tickcolor.py index 35e2f865f9..e2c01967fa 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickcolor.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_tickfont.py b/plotly/validators/scatter3d/line/colorbar/_tickfont.py index 9bb9b41d5c..dcd29680ab 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickfont.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_tickformat.py b/plotly/validators/scatter3d/line/colorbar/_tickformat.py index c4bcf7f10f..c6e73a2101 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickformat.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py b/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py index ea6356fb4a..521d65982c 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py b/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py index b1049f046a..3c17f19de7 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_ticklabeloverflow.py b/plotly/validators/scatter3d/line/colorbar/_ticklabeloverflow.py index 82cdc73882..a3fc49e526 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_ticklabelposition.py b/plotly/validators/scatter3d/line/colorbar/_ticklabelposition.py index ab23ea60bd..51e720cbea 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticklabelposition.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/line/colorbar/_ticklabelstep.py b/plotly/validators/scatter3d/line/colorbar/_ticklabelstep.py index 1f7122aaa8..f30d8239c8 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticklabelstep.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatter3d.line.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_ticklen.py b/plotly/validators/scatter3d/line/colorbar/_ticklen.py index b6a84f2010..162cfc47f3 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticklen.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_tickmode.py b/plotly/validators/scatter3d/line/colorbar/_tickmode.py index c848a97a72..0f2ab08e83 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickmode.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scatter3d/line/colorbar/_tickprefix.py b/plotly/validators/scatter3d/line/colorbar/_tickprefix.py index e7e412ba9e..ef45380fbb 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickprefix.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_ticks.py b/plotly/validators/scatter3d/line/colorbar/_ticks.py index 13f2a8d77a..2555ee55e9 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticks.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py b/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py index 8833af0e8c..5ba87cdda2 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_ticktext.py b/plotly/validators/scatter3d/line/colorbar/_ticktext.py index 3070d2c12e..9ff5a63400 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticktext.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py b/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py index 1605dbee81..3e30c529b5 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py +++ b/plotly/validators/scatter3d/line/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_tickvals.py b/plotly/validators/scatter3d/line/colorbar/_tickvals.py index 14a6766c5d..6549aab1e3 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickvals.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py b/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py index 100291f4c8..3573285d01 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_tickwidth.py b/plotly/validators/scatter3d/line/colorbar/_tickwidth.py index 088aab879d..c76ea77fe0 100644 --- a/plotly/validators/scatter3d/line/colorbar/_tickwidth.py +++ b/plotly/validators/scatter3d/line/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_title.py b/plotly/validators/scatter3d/line/colorbar/_title.py index f7d4a7d374..074f139a30 100644 --- a/plotly/validators/scatter3d/line/colorbar/_title.py +++ b/plotly/validators/scatter3d/line/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scatter3d.line.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_x.py b/plotly/validators/scatter3d/line/colorbar/_x.py index 17cf104506..23e802fd2d 100644 --- a/plotly/validators/scatter3d/line/colorbar/_x.py +++ b/plotly/validators/scatter3d/line/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scatter3d.line.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_xanchor.py b/plotly/validators/scatter3d/line/colorbar/_xanchor.py index 97e9d1f2ce..91cf458325 100644 --- a/plotly/validators/scatter3d/line/colorbar/_xanchor.py +++ b/plotly/validators/scatter3d/line/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scatter3d.line.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_xpad.py b/plotly/validators/scatter3d/line/colorbar/_xpad.py index fecd40ca8a..1759b22896 100644 --- a/plotly/validators/scatter3d/line/colorbar/_xpad.py +++ b/plotly/validators/scatter3d/line/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatter3d.line.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_xref.py b/plotly/validators/scatter3d/line/colorbar/_xref.py index 648c83b885..41f5994517 100644 --- a/plotly/validators/scatter3d/line/colorbar/_xref.py +++ b/plotly/validators/scatter3d/line/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scatter3d.line.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_y.py b/plotly/validators/scatter3d/line/colorbar/_y.py index de686f4892..ec60863c38 100644 --- a/plotly/validators/scatter3d/line/colorbar/_y.py +++ b/plotly/validators/scatter3d/line/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatter3d.line.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/_yanchor.py b/plotly/validators/scatter3d/line/colorbar/_yanchor.py index 2b8a8aafc0..ff42f24b05 100644 --- a/plotly/validators/scatter3d/line/colorbar/_yanchor.py +++ b/plotly/validators/scatter3d/line/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatter3d.line.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_ypad.py b/plotly/validators/scatter3d/line/colorbar/_ypad.py index b1c359f2f9..806292b20f 100644 --- a/plotly/validators/scatter3d/line/colorbar/_ypad.py +++ b/plotly/validators/scatter3d/line/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatter3d.line.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/_yref.py b/plotly/validators/scatter3d/line/colorbar/_yref.py index ff66e14184..9088529e7c 100644 --- a/plotly/validators/scatter3d/line/colorbar/_yref.py +++ b/plotly/validators/scatter3d/line/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scatter3d.line.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py b/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py index bfcf8616ac..d1ba530b76 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py index 5e17421c72..19dcd07380 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_lineposition.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_lineposition.py index 28c1bff5d5..332e37d412 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_shadow.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_shadow.py index 3a7c340d05..81c153d7f9 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py index 54e8aa0607..9fbde0a6bd 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_style.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_style.py index 3908d5f745..6866d9179d 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_style.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_textcase.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_textcase.py index ec21d07af3..1d0b773e1f 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_variant.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_variant.py index 3ef5c22223..8b64ed20cb 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_variant.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/line/colorbar/tickfont/_weight.py b/plotly/validators/scatter3d/line/colorbar/tickfont/_weight.py index d9227749df..328b045e09 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickfont/_weight.py +++ b/plotly/validators/scatter3d/line/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.line.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py b/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scatter3d/line/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py index 6be52c8f1f..5700755c54 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatter3d.line.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py index 68a27a7029..4074d6e036 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scatter3d.line.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py index 100dc1ed7d..12df1f2f48 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scatter3d.line.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py index e7db0d6ce5..805418da79 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scatter3d.line.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py index db86016fe8..60faa1048c 100644 --- a/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scatter3d/line/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scatter3d.line.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/title/__init__.py b/plotly/validators/scatter3d/line/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/__init__.py +++ b/plotly/validators/scatter3d/line/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scatter3d/line/colorbar/title/_font.py b/plotly/validators/scatter3d/line/colorbar/title/_font.py index 268e7c90c2..eac1b7b9c8 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/_font.py +++ b/plotly/validators/scatter3d/line/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter3d.line.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/title/_side.py b/plotly/validators/scatter3d/line/colorbar/title/_side.py index c5faf5f5b9..35f9230c60 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/_side.py +++ b/plotly/validators/scatter3d/line/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatter3d.line.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/title/_text.py b/plotly/validators/scatter3d/line/colorbar/title/_text.py index 789c9ef91e..0404365401 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/_text.py +++ b/plotly/validators/scatter3d/line/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatter3d.line.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py b/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_color.py b/plotly/validators/scatter3d/line/colorbar/title/font/_color.py index 684a609ed3..6a278acb8c 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_color.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_family.py b/plotly/validators/scatter3d/line/colorbar/title/font/_family.py index 85f9c97fd6..e77f0f4d51 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_family.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_lineposition.py b/plotly/validators/scatter3d/line/colorbar/title/font/_lineposition.py index b8b6be5933..35156bc5e8 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_shadow.py b/plotly/validators/scatter3d/line/colorbar/title/font/_shadow.py index f9377e6f60..65c1195813 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_shadow.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_size.py b/plotly/validators/scatter3d/line/colorbar/title/font/_size.py index a6a879261e..4c59b19e81 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_size.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_style.py b/plotly/validators/scatter3d/line/colorbar/title/font/_style.py index 7529684935..795f66b218 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_style.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_textcase.py b/plotly/validators/scatter3d/line/colorbar/title/font/_textcase.py index f17e5fddd9..0d4ddd08ff 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_textcase.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_variant.py b/plotly/validators/scatter3d/line/colorbar/title/font/_variant.py index ee491c87ea..162d811450 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_variant.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/line/colorbar/title/font/_weight.py b/plotly/validators/scatter3d/line/colorbar/title/font/_weight.py index 650dfcbe80..683288de8e 100644 --- a/plotly/validators/scatter3d/line/colorbar/title/font/_weight.py +++ b/plotly/validators/scatter3d/line/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.line.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter3d/marker/__init__.py b/plotly/validators/scatter3d/marker/__init__.py index df67bfdf21..94e235e239 100644 --- a/plotly/validators/scatter3d/marker/__init__.py +++ b/plotly/validators/scatter3d/marker/__init__.py @@ -1,55 +1,30 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatter3d/marker/_autocolorscale.py b/plotly/validators/scatter3d/marker/_autocolorscale.py index ea297da088..d7545ac6a3 100644 --- a/plotly/validators/scatter3d/marker/_autocolorscale.py +++ b/plotly/validators/scatter3d/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatter3d.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_cauto.py b/plotly/validators/scatter3d/marker/_cauto.py index d9b14ddc26..c9009398b3 100644 --- a/plotly/validators/scatter3d/marker/_cauto.py +++ b/plotly/validators/scatter3d/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="scatter3d.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_cmax.py b/plotly/validators/scatter3d/marker/_cmax.py index 1234c7b97e..17f888f5ea 100644 --- a/plotly/validators/scatter3d/marker/_cmax.py +++ b/plotly/validators/scatter3d/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatter3d.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_cmid.py b/plotly/validators/scatter3d/marker/_cmid.py index f61aa7dd02..8d31793d32 100644 --- a/plotly/validators/scatter3d/marker/_cmid.py +++ b/plotly/validators/scatter3d/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scatter3d.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_cmin.py b/plotly/validators/scatter3d/marker/_cmin.py index 409f8a398a..98e283e13a 100644 --- a/plotly/validators/scatter3d/marker/_cmin.py +++ b/plotly/validators/scatter3d/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scatter3d.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_color.py b/plotly/validators/scatter3d/marker/_color.py index 2a6fdad40e..256b7622f6 100644 --- a/plotly/validators/scatter3d/marker/_color.py +++ b/plotly/validators/scatter3d/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatter3d/marker/_coloraxis.py b/plotly/validators/scatter3d/marker/_coloraxis.py index afabb9845f..32f596c249 100644 --- a/plotly/validators/scatter3d/marker/_coloraxis.py +++ b/plotly/validators/scatter3d/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatter3d.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatter3d/marker/_colorbar.py b/plotly/validators/scatter3d/marker/_colorbar.py index 9a1043503d..87d4cd46f8 100644 --- a/plotly/validators/scatter3d/marker/_colorbar.py +++ b/plotly/validators/scatter3d/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scatter3d.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - 3d.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatter3d.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scatter3d.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatter3d.marker.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_colorscale.py b/plotly/validators/scatter3d/marker/_colorscale.py index eb80064c8c..5a53003c09 100644 --- a/plotly/validators/scatter3d/marker/_colorscale.py +++ b/plotly/validators/scatter3d/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter3d.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_colorsrc.py b/plotly/validators/scatter3d/marker/_colorsrc.py index 73389abbfb..6b446b62b2 100644 --- a/plotly/validators/scatter3d/marker/_colorsrc.py +++ b/plotly/validators/scatter3d/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter3d.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/_line.py b/plotly/validators/scatter3d/marker/_line.py index 4b51f5c59d..6e47d4d84e 100644 --- a/plotly/validators/scatter3d/marker/_line.py +++ b/plotly/validators/scatter3d/marker/_line.py @@ -1,101 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatter3d.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_opacity.py b/plotly/validators/scatter3d/marker/_opacity.py index aa924b93c1..53de6440a9 100644 --- a/plotly/validators/scatter3d/marker/_opacity.py +++ b/plotly/validators/scatter3d/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatter3d.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scatter3d/marker/_reversescale.py b/plotly/validators/scatter3d/marker/_reversescale.py index 1a24d8abe2..0130b0e607 100644 --- a/plotly/validators/scatter3d/marker/_reversescale.py +++ b/plotly/validators/scatter3d/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter3d.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/_showscale.py b/plotly/validators/scatter3d/marker/_showscale.py index 0b2bcadcab..7a590acd51 100644 --- a/plotly/validators/scatter3d/marker/_showscale.py +++ b/plotly/validators/scatter3d/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scatter3d.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/_size.py b/plotly/validators/scatter3d/marker/_size.py index 5a4ecf2958..8038918dc8 100644 --- a/plotly/validators/scatter3d/marker/_size.py +++ b/plotly/validators/scatter3d/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scatter3d.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/marker/_sizemin.py b/plotly/validators/scatter3d/marker/_sizemin.py index 746c694812..5e81136718 100644 --- a/plotly/validators/scatter3d/marker/_sizemin.py +++ b/plotly/validators/scatter3d/marker/_sizemin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizemin", parent_name="scatter3d.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_sizemode.py b/plotly/validators/scatter3d/marker/_sizemode.py index b51038d9ec..cd0af7d8b1 100644 --- a/plotly/validators/scatter3d/marker/_sizemode.py +++ b/plotly/validators/scatter3d/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scatter3d.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/_sizeref.py b/plotly/validators/scatter3d/marker/_sizeref.py index 854c81f769..6938476544 100644 --- a/plotly/validators/scatter3d/marker/_sizeref.py +++ b/plotly/validators/scatter3d/marker/_sizeref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/_sizesrc.py b/plotly/validators/scatter3d/marker/_sizesrc.py index e6c440d591..022c70fb2b 100644 --- a/plotly/validators/scatter3d/marker/_sizesrc.py +++ b/plotly/validators/scatter3d/marker/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="scatter3d.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/_symbol.py b/plotly/validators/scatter3d/marker/_symbol.py index 1f0b388195..64e435e26e 100644 --- a/plotly/validators/scatter3d/marker/_symbol.py +++ b/plotly/validators/scatter3d/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="scatter3d.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatter3d/marker/_symbolsrc.py b/plotly/validators/scatter3d/marker/_symbolsrc.py index bbf6d9ef5b..1ff5ceea89 100644 --- a/plotly/validators/scatter3d/marker/_symbolsrc.py +++ b/plotly/validators/scatter3d/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scatter3d.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/__init__.py b/plotly/validators/scatter3d/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scatter3d/marker/colorbar/__init__.py +++ b/plotly/validators/scatter3d/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py b/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py index b07fea5dc4..49d813bf7e 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scatter3d/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py b/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py index bd7c903ee6..9cd9d2933d 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scatter3d/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py b/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py index 26a4d2a2b6..c8f6f0a621 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scatter3d/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_dtick.py b/plotly/validators/scatter3d/marker/colorbar/_dtick.py index 90f82df075..60bf6ed9a6 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_dtick.py +++ b/plotly/validators/scatter3d/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py b/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py index 8cdba73d5a..a44bd9e0fe 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scatter3d/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_labelalias.py b/plotly/validators/scatter3d/marker/colorbar/_labelalias.py index 7b6256f59a..4757ecc5fb 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_labelalias.py +++ b/plotly/validators/scatter3d/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_len.py b/plotly/validators/scatter3d/marker/colorbar/_len.py index be818b6b48..30385d309e 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_len.py +++ b/plotly/validators/scatter3d/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_lenmode.py b/plotly/validators/scatter3d/marker/colorbar/_lenmode.py index 6528eefcc4..d7f1dbd23b 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_lenmode.py +++ b/plotly/validators/scatter3d/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_minexponent.py b/plotly/validators/scatter3d/marker/colorbar/_minexponent.py index 35f234bf43..799d29a556 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_minexponent.py +++ b/plotly/validators/scatter3d/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_nticks.py b/plotly/validators/scatter3d/marker/colorbar/_nticks.py index 70a97d4a7a..1e395e26cc 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_nticks.py +++ b/plotly/validators/scatter3d/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_orientation.py b/plotly/validators/scatter3d/marker/colorbar/_orientation.py index 7b302b54ee..2d38b24001 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_orientation.py +++ b/plotly/validators/scatter3d/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py b/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py index 9c8ad73cdc..cb52f52073 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scatter3d/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py b/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py index ea86bf2333..fda025619a 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scatter3d/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py b/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py index 1a9049e72e..a4df73ebf9 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scatter3d/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_showexponent.py b/plotly/validators/scatter3d/marker/colorbar/_showexponent.py index b5b6ab4871..bf212fec92 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_showexponent.py +++ b/plotly/validators/scatter3d/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py b/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py index ce6a9e4101..4b36a218ed 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scatter3d/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py b/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py index f47f6084ab..afca0c5513 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scatter3d/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py b/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py index 5d767f1cda..0302645adf 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scatter3d/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_thickness.py b/plotly/validators/scatter3d/marker/colorbar/_thickness.py index 29ab16d8f5..2d83631057 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_thickness.py +++ b/plotly/validators/scatter3d/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py b/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py index 71978b23ad..7f8422e144 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scatter3d/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_tick0.py b/plotly/validators/scatter3d/marker/colorbar/_tick0.py index 850a1d2da9..037a0aff70 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tick0.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickangle.py b/plotly/validators/scatter3d/marker/colorbar/_tickangle.py index 4eb3951dd7..6ca631c169 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickangle.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py b/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py index 12584141cb..a520f1ea31 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickfont.py b/plotly/validators/scatter3d/marker/colorbar/_tickfont.py index 394f2e011d..921a068f7b 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickfont.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickformat.py b/plotly/validators/scatter3d/marker/colorbar/_tickformat.py index 23844545c1..bf500d0dcd 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickformat.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py index 560d760668..63f58d80ba 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py b/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py index 095d278a54..196e02c31e 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scatter3d/marker/colorbar/_ticklabeloverflow.py index f0511cde01..4f647e3b4e 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticklabelposition.py b/plotly/validators/scatter3d/marker/colorbar/_ticklabelposition.py index d962f68faa..4b2ce3797b 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticklabelstep.py b/plotly/validators/scatter3d/marker/colorbar/_ticklabelstep.py index b00a4ed7e9..012446309d 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticklen.py b/plotly/validators/scatter3d/marker/colorbar/_ticklen.py index 1271ab1c2f..a4b0d55ebc 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticklen.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickmode.py b/plotly/validators/scatter3d/marker/colorbar/_tickmode.py index 3631269d0c..a9d090afeb 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickmode.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py b/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py index 7bf750cb78..103354fea5 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticks.py b/plotly/validators/scatter3d/marker/colorbar/_ticks.py index 316d4d91ee..82841bbf3c 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticks.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py b/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py index 847e197576..625fbad970 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticktext.py b/plotly/validators/scatter3d/marker/colorbar/_ticktext.py index 9352dae8f7..71ab69f1c9 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticktext.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py b/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py index 2d536e3df7..229029f1d3 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickvals.py b/plotly/validators/scatter3d/marker/colorbar/_tickvals.py index af9c28be75..6316561aa2 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickvals.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py b/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py index 1a964b8300..47e18e5582 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatter3d.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py b/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py index 2d330f06af..4a35b6aeac 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scatter3d/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_title.py b/plotly/validators/scatter3d/marker/colorbar/_title.py index 01c69afbeb..8db2b21d3c 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_title.py +++ b/plotly/validators/scatter3d/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_x.py b/plotly/validators/scatter3d/marker/colorbar/_x.py index bd73c2d214..43fc2a17c8 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_x.py +++ b/plotly/validators/scatter3d/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_xanchor.py b/plotly/validators/scatter3d/marker/colorbar/_xanchor.py index 44801e4193..52803d2f04 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_xanchor.py +++ b/plotly/validators/scatter3d/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_xpad.py b/plotly/validators/scatter3d/marker/colorbar/_xpad.py index 8311e32411..c3a2d2029d 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_xpad.py +++ b/plotly/validators/scatter3d/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_xref.py b/plotly/validators/scatter3d/marker/colorbar/_xref.py index 81b315ae11..d53acae7a6 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_xref.py +++ b/plotly/validators/scatter3d/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_y.py b/plotly/validators/scatter3d/marker/colorbar/_y.py index cfaef8d5c0..70b67ee2f5 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_y.py +++ b/plotly/validators/scatter3d/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/_yanchor.py b/plotly/validators/scatter3d/marker/colorbar/_yanchor.py index c13713f3da..1c7d710b98 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_yanchor.py +++ b/plotly/validators/scatter3d/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_ypad.py b/plotly/validators/scatter3d/marker/colorbar/_ypad.py index cc58b0eef2..25bc615234 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_ypad.py +++ b/plotly/validators/scatter3d/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/_yref.py b/plotly/validators/scatter3d/marker/colorbar/_yref.py index 7e6de12fbd..43f2d94869 100644 --- a/plotly/validators/scatter3d/marker/colorbar/_yref.py +++ b/plotly/validators/scatter3d/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scatter3d.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py index e347735936..9cd7804009 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py index be720be38b..f5de42f401 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_lineposition.py index 5bcac68e1e..0393aa57dd 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_shadow.py index e76c76bf0f..512a9898f8 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py index 40c753833a..242f7bc799 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_style.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_style.py index 27118e0776..43e7f2dc37 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_textcase.py index a2eaba214b..57dfd1a63e 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_variant.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_variant.py index 5f575b0ed4..4823eaeb49 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/marker/colorbar/tickfont/_weight.py b/plotly/validators/scatter3d/marker/colorbar/tickfont/_weight.py index 6f532507ba..6f271d0811 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py index 186c73e386..8029c09212 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatter3d.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py index d888ead133..2c97e0f932 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scatter3d.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py index 9b265afaad..6155e31dca 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scatter3d.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py index fa6a2b515e..5d21eac456 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scatter3d.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py index 57230795e7..20b62aea39 100644 --- a/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scatter3d/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scatter3d.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/title/__init__.py b/plotly/validators/scatter3d/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/__init__.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scatter3d/marker/colorbar/title/_font.py b/plotly/validators/scatter3d/marker/colorbar/title/_font.py index c465a43b95..0a6ad0e708 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/_font.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter3d.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/title/_side.py b/plotly/validators/scatter3d/marker/colorbar/title/_side.py index d8ad402b00..d1c2917ad8 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/_side.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatter3d.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/title/_text.py b/plotly/validators/scatter3d/marker/colorbar/title/_text.py index 8c10f4dd00..14eab8f19c 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/_text.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatter3d.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py b/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py index f7d28ef23f..77af324f37 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py index 91115a68b8..a2ff22e62d 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_lineposition.py index 9db07f906f..fac227cd9b 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_shadow.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_shadow.py index 2306bf9836..9cd7ebe30a 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py index 68a35db225..672784e055 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_style.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_style.py index ebf85e8695..bb7820f8d4 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_textcase.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_textcase.py index 01932bd667..0e17e6fc58 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_variant.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_variant.py index bdf5a60a34..422ccb22c9 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatter3d/marker/colorbar/title/font/_weight.py b/plotly/validators/scatter3d/marker/colorbar/title/font/_weight.py index 192a8f29d9..2e3df695a9 100644 --- a/plotly/validators/scatter3d/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scatter3d/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatter3d/marker/line/__init__.py b/plotly/validators/scatter3d/marker/line/__init__.py index cb1dba3be1..d59e454a39 100644 --- a/plotly/validators/scatter3d/marker/line/__init__.py +++ b/plotly/validators/scatter3d/marker/line/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatter3d/marker/line/_autocolorscale.py b/plotly/validators/scatter3d/marker/line/_autocolorscale.py index 7cbe677269..3b5fe04082 100644 --- a/plotly/validators/scatter3d/marker/line/_autocolorscale.py +++ b/plotly/validators/scatter3d/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatter3d.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/line/_cauto.py b/plotly/validators/scatter3d/marker/line/_cauto.py index 887a755de9..5b093ac9f2 100644 --- a/plotly/validators/scatter3d/marker/line/_cauto.py +++ b/plotly/validators/scatter3d/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatter3d.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/line/_cmax.py b/plotly/validators/scatter3d/marker/line/_cmax.py index a908489fbd..3bf394286e 100644 --- a/plotly/validators/scatter3d/marker/line/_cmax.py +++ b/plotly/validators/scatter3d/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatter3d.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/line/_cmid.py b/plotly/validators/scatter3d/marker/line/_cmid.py index dd572905b5..0a024d492d 100644 --- a/plotly/validators/scatter3d/marker/line/_cmid.py +++ b/plotly/validators/scatter3d/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatter3d.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/line/_cmin.py b/plotly/validators/scatter3d/marker/line/_cmin.py index 41440f586c..e0d0a70a84 100644 --- a/plotly/validators/scatter3d/marker/line/_cmin.py +++ b/plotly/validators/scatter3d/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scatter3d.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/line/_color.py b/plotly/validators/scatter3d/marker/line/_color.py index fcc741a456..15cabffb14 100644 --- a/plotly/validators/scatter3d/marker/line/_color.py +++ b/plotly/validators/scatter3d/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatter3d.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatter3d/marker/line/_coloraxis.py b/plotly/validators/scatter3d/marker/line/_coloraxis.py index 923c1cc9ce..8d936c0c01 100644 --- a/plotly/validators/scatter3d/marker/line/_coloraxis.py +++ b/plotly/validators/scatter3d/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatter3d.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatter3d/marker/line/_colorscale.py b/plotly/validators/scatter3d/marker/line/_colorscale.py index 786711f414..044b530c19 100644 --- a/plotly/validators/scatter3d/marker/line/_colorscale.py +++ b/plotly/validators/scatter3d/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatter3d.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatter3d/marker/line/_colorsrc.py b/plotly/validators/scatter3d/marker/line/_colorsrc.py index e83a33f52c..be8a97274f 100644 --- a/plotly/validators/scatter3d/marker/line/_colorsrc.py +++ b/plotly/validators/scatter3d/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter3d.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/line/_reversescale.py b/plotly/validators/scatter3d/marker/line/_reversescale.py index 51262d6806..24dba29bdb 100644 --- a/plotly/validators/scatter3d/marker/line/_reversescale.py +++ b/plotly/validators/scatter3d/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatter3d.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/marker/line/_width.py b/plotly/validators/scatter3d/marker/line/_width.py index af159b59eb..87df7901df 100644 --- a/plotly/validators/scatter3d/marker/line/_width.py +++ b/plotly/validators/scatter3d/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatter3d.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/__init__.py b/plotly/validators/scatter3d/projection/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/scatter3d/projection/__init__.py +++ b/plotly/validators/scatter3d/projection/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/scatter3d/projection/_x.py b/plotly/validators/scatter3d/projection/_x.py index 6560c649cf..7ea5fcf0cf 100644 --- a/plotly/validators/scatter3d/projection/_x.py +++ b/plotly/validators/scatter3d/projection/_x.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.CompoundValidator): +class XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="x", parent_name="scatter3d.projection", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "X"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the x axis. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/projection/_y.py b/plotly/validators/scatter3d/projection/_y.py index e6a83c5a1d..30f0296dde 100644 --- a/plotly/validators/scatter3d/projection/_y.py +++ b/plotly/validators/scatter3d/projection/_y.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.CompoundValidator): +class YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="y", parent_name="scatter3d.projection", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the y axis. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/projection/_z.py b/plotly/validators/scatter3d/projection/_z.py index db4b4de5a7..6967881395 100644 --- a/plotly/validators/scatter3d/projection/_z.py +++ b/plotly/validators/scatter3d/projection/_z.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="z", parent_name="scatter3d.projection", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Z"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the projection color. - scale - Sets the scale factor determining the size of - the projection marker points. - show - Sets whether or not projections are shown along - the z axis. """, ), **kwargs, diff --git a/plotly/validators/scatter3d/projection/x/__init__.py b/plotly/validators/scatter3d/projection/x/__init__.py index 45005776b7..1f45773815 100644 --- a/plotly/validators/scatter3d/projection/x/__init__.py +++ b/plotly/validators/scatter3d/projection/x/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._scale import ScaleValidator - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._scale.ScaleValidator", - "._opacity.OpacityValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._show.ShowValidator", "._scale.ScaleValidator", "._opacity.OpacityValidator"], +) diff --git a/plotly/validators/scatter3d/projection/x/_opacity.py b/plotly/validators/scatter3d/projection/x/_opacity.py index 44430fa0ab..414d5570ea 100644 --- a/plotly/validators/scatter3d/projection/x/_opacity.py +++ b/plotly/validators/scatter3d/projection/x/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatter3d.projection.x", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/x/_scale.py b/plotly/validators/scatter3d/projection/x/_scale.py index 8f945191c8..add3f305a1 100644 --- a/plotly/validators/scatter3d/projection/x/_scale.py +++ b/plotly/validators/scatter3d/projection/x/_scale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): +class ScaleValidator(_bv.NumberValidator): def __init__( self, plotly_name="scale", parent_name="scatter3d.projection.x", **kwargs ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/x/_show.py b/plotly/validators/scatter3d/projection/x/_show.py index f82418090d..2ca8084833 100644 --- a/plotly/validators/scatter3d/projection/x/_show.py +++ b/plotly/validators/scatter3d/projection/x/_show.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__( self, plotly_name="show", parent_name="scatter3d.projection.x", **kwargs ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/projection/y/__init__.py b/plotly/validators/scatter3d/projection/y/__init__.py index 45005776b7..1f45773815 100644 --- a/plotly/validators/scatter3d/projection/y/__init__.py +++ b/plotly/validators/scatter3d/projection/y/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._scale import ScaleValidator - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._scale.ScaleValidator", - "._opacity.OpacityValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._show.ShowValidator", "._scale.ScaleValidator", "._opacity.OpacityValidator"], +) diff --git a/plotly/validators/scatter3d/projection/y/_opacity.py b/plotly/validators/scatter3d/projection/y/_opacity.py index a65e91b201..f4c3a3333a 100644 --- a/plotly/validators/scatter3d/projection/y/_opacity.py +++ b/plotly/validators/scatter3d/projection/y/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatter3d.projection.y", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/y/_scale.py b/plotly/validators/scatter3d/projection/y/_scale.py index 2e5a922a6e..e9aca8ff6a 100644 --- a/plotly/validators/scatter3d/projection/y/_scale.py +++ b/plotly/validators/scatter3d/projection/y/_scale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): +class ScaleValidator(_bv.NumberValidator): def __init__( self, plotly_name="scale", parent_name="scatter3d.projection.y", **kwargs ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/y/_show.py b/plotly/validators/scatter3d/projection/y/_show.py index f75cd1bdd2..a1375e3f0c 100644 --- a/plotly/validators/scatter3d/projection/y/_show.py +++ b/plotly/validators/scatter3d/projection/y/_show.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__( self, plotly_name="show", parent_name="scatter3d.projection.y", **kwargs ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/projection/z/__init__.py b/plotly/validators/scatter3d/projection/z/__init__.py index 45005776b7..1f45773815 100644 --- a/plotly/validators/scatter3d/projection/z/__init__.py +++ b/plotly/validators/scatter3d/projection/z/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._scale import ScaleValidator - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._scale.ScaleValidator", - "._opacity.OpacityValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._show.ShowValidator", "._scale.ScaleValidator", "._opacity.OpacityValidator"], +) diff --git a/plotly/validators/scatter3d/projection/z/_opacity.py b/plotly/validators/scatter3d/projection/z/_opacity.py index 19883878d5..d2d3650a01 100644 --- a/plotly/validators/scatter3d/projection/z/_opacity.py +++ b/plotly/validators/scatter3d/projection/z/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatter3d.projection.z", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/z/_scale.py b/plotly/validators/scatter3d/projection/z/_scale.py index e8c0a9ccaa..5d0a880e79 100644 --- a/plotly/validators/scatter3d/projection/z/_scale.py +++ b/plotly/validators/scatter3d/projection/z/_scale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScaleValidator(_plotly_utils.basevalidators.NumberValidator): +class ScaleValidator(_bv.NumberValidator): def __init__( self, plotly_name="scale", parent_name="scatter3d.projection.z", **kwargs ): - super(ScaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/projection/z/_show.py b/plotly/validators/scatter3d/projection/z/_show.py index cca198fd3b..14e7128383 100644 --- a/plotly/validators/scatter3d/projection/z/_show.py +++ b/plotly/validators/scatter3d/projection/z/_show.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__( self, plotly_name="show", parent_name="scatter3d.projection.z", **kwargs ): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatter3d/stream/__init__.py b/plotly/validators/scatter3d/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scatter3d/stream/__init__.py +++ b/plotly/validators/scatter3d/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scatter3d/stream/_maxpoints.py b/plotly/validators/scatter3d/stream/_maxpoints.py index 4b7eeb3fc9..a0b7122add 100644 --- a/plotly/validators/scatter3d/stream/_maxpoints.py +++ b/plotly/validators/scatter3d/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scatter3d.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatter3d/stream/_token.py b/plotly/validators/scatter3d/stream/_token.py index d3e7111304..a666d8c8f1 100644 --- a/plotly/validators/scatter3d/stream/_token.py +++ b/plotly/validators/scatter3d/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="scatter3d.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatter3d/textfont/__init__.py b/plotly/validators/scatter3d/textfont/__init__.py index d87c37ff7a..35d589957b 100644 --- a/plotly/validators/scatter3d/textfont/__init__.py +++ b/plotly/validators/scatter3d/textfont/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatter3d/textfont/_color.py b/plotly/validators/scatter3d/textfont/_color.py index e109dffc11..301b2eeb64 100644 --- a/plotly/validators/scatter3d/textfont/_color.py +++ b/plotly/validators/scatter3d/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatter3d.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatter3d/textfont/_colorsrc.py b/plotly/validators/scatter3d/textfont/_colorsrc.py index 9a6e2c1408..8fa871118c 100644 --- a/plotly/validators/scatter3d/textfont/_colorsrc.py +++ b/plotly/validators/scatter3d/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatter3d.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/textfont/_family.py b/plotly/validators/scatter3d/textfont/_family.py index ecdb237563..1c3e548890 100644 --- a/plotly/validators/scatter3d/textfont/_family.py +++ b/plotly/validators/scatter3d/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatter3d.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatter3d/textfont/_familysrc.py b/plotly/validators/scatter3d/textfont/_familysrc.py index a74fed52cf..989cf6c456 100644 --- a/plotly/validators/scatter3d/textfont/_familysrc.py +++ b/plotly/validators/scatter3d/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatter3d.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/textfont/_size.py b/plotly/validators/scatter3d/textfont/_size.py index 78ca2c4c6e..9126ac4b0d 100644 --- a/plotly/validators/scatter3d/textfont/_size.py +++ b/plotly/validators/scatter3d/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scatter3d.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatter3d/textfont/_sizesrc.py b/plotly/validators/scatter3d/textfont/_sizesrc.py index e7e7084bce..ec27f3aafa 100644 --- a/plotly/validators/scatter3d/textfont/_sizesrc.py +++ b/plotly/validators/scatter3d/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatter3d.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/textfont/_style.py b/plotly/validators/scatter3d/textfont/_style.py index 2e73f475cf..98604e4290 100644 --- a/plotly/validators/scatter3d/textfont/_style.py +++ b/plotly/validators/scatter3d/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="scatter3d.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatter3d/textfont/_stylesrc.py b/plotly/validators/scatter3d/textfont/_stylesrc.py index 09ecec3319..0a4d831259 100644 --- a/plotly/validators/scatter3d/textfont/_stylesrc.py +++ b/plotly/validators/scatter3d/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatter3d.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/textfont/_variant.py b/plotly/validators/scatter3d/textfont/_variant.py index b239853ee7..5507f6620b 100644 --- a/plotly/validators/scatter3d/textfont/_variant.py +++ b/plotly/validators/scatter3d/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatter3d.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "small-caps"]), diff --git a/plotly/validators/scatter3d/textfont/_variantsrc.py b/plotly/validators/scatter3d/textfont/_variantsrc.py index 02945e49d6..6d827c1450 100644 --- a/plotly/validators/scatter3d/textfont/_variantsrc.py +++ b/plotly/validators/scatter3d/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatter3d.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatter3d/textfont/_weight.py b/plotly/validators/scatter3d/textfont/_weight.py index 138df0542b..0f9f643db7 100644 --- a/plotly/validators/scatter3d/textfont/_weight.py +++ b/plotly/validators/scatter3d/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatter3d.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatter3d/textfont/_weightsrc.py b/plotly/validators/scatter3d/textfont/_weightsrc.py index 23f242498d..d237b94018 100644 --- a/plotly/validators/scatter3d/textfont/_weightsrc.py +++ b/plotly/validators/scatter3d/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatter3d.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/__init__.py b/plotly/validators/scattercarpet/__init__.py index 2a6cd88e3e..4714c2ce84 100644 --- a/plotly/validators/scattercarpet/__init__.py +++ b/plotly/validators/scattercarpet/__init__.py @@ -1,113 +1,59 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._yaxis import YaxisValidator - from ._xaxis import XaxisValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._carpet import CarpetValidator - from ._bsrc import BsrcValidator - from ._b import BValidator - from ._asrc import AsrcValidator - from ._a import AValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._yaxis.YaxisValidator", - "._xaxis.XaxisValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._carpet.CarpetValidator", - "._bsrc.BsrcValidator", - "._b.BValidator", - "._asrc.AsrcValidator", - "._a.AValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._yaxis.YaxisValidator", + "._xaxis.XaxisValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._carpet.CarpetValidator", + "._bsrc.BsrcValidator", + "._b.BValidator", + "._asrc.AsrcValidator", + "._a.AValidator", + ], +) diff --git a/plotly/validators/scattercarpet/_a.py b/plotly/validators/scattercarpet/_a.py index 4b796e0f91..b0e3a9f180 100644 --- a/plotly/validators/scattercarpet/_a.py +++ b/plotly/validators/scattercarpet/_a.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): +class AValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="a", parent_name="scattercarpet", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_asrc.py b/plotly/validators/scattercarpet/_asrc.py index 3eef85462b..e9baa4967e 100644 --- a/plotly/validators/scattercarpet/_asrc.py +++ b/plotly/validators/scattercarpet/_asrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="asrc", parent_name="scattercarpet", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_b.py b/plotly/validators/scattercarpet/_b.py index 79de8dadc8..634dcd0afd 100644 --- a/plotly/validators/scattercarpet/_b.py +++ b/plotly/validators/scattercarpet/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): +class BValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="scattercarpet", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_bsrc.py b/plotly/validators/scattercarpet/_bsrc.py index 6f5305c0a4..10eb3cf3ac 100644 --- a/plotly/validators/scattercarpet/_bsrc.py +++ b/plotly/validators/scattercarpet/_bsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="bsrc", parent_name="scattercarpet", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_carpet.py b/plotly/validators/scattercarpet/_carpet.py index 55a5c7ebec..2a87fa025b 100644 --- a/plotly/validators/scattercarpet/_carpet.py +++ b/plotly/validators/scattercarpet/_carpet.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CarpetValidator(_plotly_utils.basevalidators.StringValidator): +class CarpetValidator(_bv.StringValidator): def __init__(self, plotly_name="carpet", parent_name="scattercarpet", **kwargs): - super(CarpetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_connectgaps.py b/plotly/validators/scattercarpet/_connectgaps.py index 6c2ea9c62e..4e3adb7bb3 100644 --- a/plotly/validators/scattercarpet/_connectgaps.py +++ b/plotly/validators/scattercarpet/_connectgaps.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scattercarpet", **kwargs ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_customdata.py b/plotly/validators/scattercarpet/_customdata.py index ff842872a0..a1c549e3e5 100644 --- a/plotly/validators/scattercarpet/_customdata.py +++ b/plotly/validators/scattercarpet/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scattercarpet", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_customdatasrc.py b/plotly/validators/scattercarpet/_customdatasrc.py index 3c77561a5a..42a925d772 100644 --- a/plotly/validators/scattercarpet/_customdatasrc.py +++ b/plotly/validators/scattercarpet/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="scattercarpet", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_fill.py b/plotly/validators/scattercarpet/_fill.py index 2d95e5b914..4a504d13d9 100644 --- a/plotly/validators/scattercarpet/_fill.py +++ b/plotly/validators/scattercarpet/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scattercarpet", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself", "tonext"]), **kwargs, diff --git a/plotly/validators/scattercarpet/_fillcolor.py b/plotly/validators/scattercarpet/_fillcolor.py index c2192e2df7..bf58cdf17a 100644 --- a/plotly/validators/scattercarpet/_fillcolor.py +++ b/plotly/validators/scattercarpet/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattercarpet", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_hoverinfo.py b/plotly/validators/scattercarpet/_hoverinfo.py index 96825bb1ff..60297c3bbb 100644 --- a/plotly/validators/scattercarpet/_hoverinfo.py +++ b/plotly/validators/scattercarpet/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scattercarpet", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scattercarpet/_hoverinfosrc.py b/plotly/validators/scattercarpet/_hoverinfosrc.py index de7c27c0d0..fce7f14b30 100644 --- a/plotly/validators/scattercarpet/_hoverinfosrc.py +++ b/plotly/validators/scattercarpet/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="scattercarpet", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_hoverlabel.py b/plotly/validators/scattercarpet/_hoverlabel.py index 55feac5cd2..b2553073cb 100644 --- a/plotly/validators/scattercarpet/_hoverlabel.py +++ b/plotly/validators/scattercarpet/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattercarpet", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_hoveron.py b/plotly/validators/scattercarpet/_hoveron.py index b1e9c27064..dd7ffbc0dc 100644 --- a/plotly/validators/scattercarpet/_hoveron.py +++ b/plotly/validators/scattercarpet/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="scattercarpet", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), flags=kwargs.pop("flags", ["points", "fills"]), **kwargs, diff --git a/plotly/validators/scattercarpet/_hovertemplate.py b/plotly/validators/scattercarpet/_hovertemplate.py index 87227d6b14..af8d93669c 100644 --- a/plotly/validators/scattercarpet/_hovertemplate.py +++ b/plotly/validators/scattercarpet/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scattercarpet", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattercarpet/_hovertemplatesrc.py b/plotly/validators/scattercarpet/_hovertemplatesrc.py index 7c3fbff16a..b13fbf1930 100644 --- a/plotly/validators/scattercarpet/_hovertemplatesrc.py +++ b/plotly/validators/scattercarpet/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattercarpet", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_hovertext.py b/plotly/validators/scattercarpet/_hovertext.py index 475715b067..004240fe9c 100644 --- a/plotly/validators/scattercarpet/_hovertext.py +++ b/plotly/validators/scattercarpet/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scattercarpet", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattercarpet/_hovertextsrc.py b/plotly/validators/scattercarpet/_hovertextsrc.py index 45549ca3b7..a4e1958be0 100644 --- a/plotly/validators/scattercarpet/_hovertextsrc.py +++ b/plotly/validators/scattercarpet/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="scattercarpet", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_ids.py b/plotly/validators/scattercarpet/_ids.py index 711905e858..87cb002905 100644 --- a/plotly/validators/scattercarpet/_ids.py +++ b/plotly/validators/scattercarpet/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scattercarpet", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_idssrc.py b/plotly/validators/scattercarpet/_idssrc.py index d3e11c606d..34bfb5951a 100644 --- a/plotly/validators/scattercarpet/_idssrc.py +++ b/plotly/validators/scattercarpet/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattercarpet", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_legend.py b/plotly/validators/scattercarpet/_legend.py index c018a7ae89..bcf5dbbad5 100644 --- a/plotly/validators/scattercarpet/_legend.py +++ b/plotly/validators/scattercarpet/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scattercarpet", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattercarpet/_legendgroup.py b/plotly/validators/scattercarpet/_legendgroup.py index 50558a8c53..ff27f01f9e 100644 --- a/plotly/validators/scattercarpet/_legendgroup.py +++ b/plotly/validators/scattercarpet/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="scattercarpet", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_legendgrouptitle.py b/plotly/validators/scattercarpet/_legendgrouptitle.py index ec57722f88..f5230e0f5f 100644 --- a/plotly/validators/scattercarpet/_legendgrouptitle.py +++ b/plotly/validators/scattercarpet/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattercarpet", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_legendrank.py b/plotly/validators/scattercarpet/_legendrank.py index 83cf20ad41..4e5f60109d 100644 --- a/plotly/validators/scattercarpet/_legendrank.py +++ b/plotly/validators/scattercarpet/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scattercarpet", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_legendwidth.py b/plotly/validators/scattercarpet/_legendwidth.py index 788e67a919..4c2ef57124 100644 --- a/plotly/validators/scattercarpet/_legendwidth.py +++ b/plotly/validators/scattercarpet/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="scattercarpet", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/_line.py b/plotly/validators/scattercarpet/_line.py index 41c1a8c2d1..ec60543dd1 100644 --- a/plotly/validators/scattercarpet/_line.py +++ b/plotly/validators/scattercarpet/_line.py @@ -1,44 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattercarpet", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_marker.py b/plotly/validators/scattercarpet/_marker.py index 80948b07de..d2c3d3841b 100644 --- a/plotly/validators/scattercarpet/_marker.py +++ b/plotly/validators/scattercarpet/_marker.py @@ -1,165 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattercarpet", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattercarpet.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scattercarpet.mark - er.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattercarpet.mark - er.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_meta.py b/plotly/validators/scattercarpet/_meta.py index 34e60c2266..0e28577c23 100644 --- a/plotly/validators/scattercarpet/_meta.py +++ b/plotly/validators/scattercarpet/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattercarpet", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattercarpet/_metasrc.py b/plotly/validators/scattercarpet/_metasrc.py index cba343cd37..11cad2e140 100644 --- a/plotly/validators/scattercarpet/_metasrc.py +++ b/plotly/validators/scattercarpet/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattercarpet", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_mode.py b/plotly/validators/scattercarpet/_mode.py index 4ee5a5940b..9ddeb26171 100644 --- a/plotly/validators/scattercarpet/_mode.py +++ b/plotly/validators/scattercarpet/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scattercarpet", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scattercarpet/_name.py b/plotly/validators/scattercarpet/_name.py index adbb32d849..b754eaf112 100644 --- a/plotly/validators/scattercarpet/_name.py +++ b/plotly/validators/scattercarpet/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scattercarpet", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_opacity.py b/plotly/validators/scattercarpet/_opacity.py index a8e1324beb..e112c54c95 100644 --- a/plotly/validators/scattercarpet/_opacity.py +++ b/plotly/validators/scattercarpet/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattercarpet", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/_selected.py b/plotly/validators/scattercarpet/_selected.py index 08bc9a5640..ce94eff9b7 100644 --- a/plotly/validators/scattercarpet/_selected.py +++ b/plotly/validators/scattercarpet/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattercarpet", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattercarpet.sele - cted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.sele - cted.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_selectedpoints.py b/plotly/validators/scattercarpet/_selectedpoints.py index f97bf902b5..12767e9385 100644 --- a/plotly/validators/scattercarpet/_selectedpoints.py +++ b/plotly/validators/scattercarpet/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scattercarpet", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_showlegend.py b/plotly/validators/scattercarpet/_showlegend.py index 2708b88f04..dc63d4cb62 100644 --- a/plotly/validators/scattercarpet/_showlegend.py +++ b/plotly/validators/scattercarpet/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scattercarpet", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_stream.py b/plotly/validators/scattercarpet/_stream.py index 9bd596b155..e6b4ada4b1 100644 --- a/plotly/validators/scattercarpet/_stream.py +++ b/plotly/validators/scattercarpet/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattercarpet", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_text.py b/plotly/validators/scattercarpet/_text.py index e035068b3d..e3590ffd0e 100644 --- a/plotly/validators/scattercarpet/_text.py +++ b/plotly/validators/scattercarpet/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scattercarpet", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattercarpet/_textfont.py b/plotly/validators/scattercarpet/_textfont.py index 83a3c45b01..f338c50da6 100644 --- a/plotly/validators/scattercarpet/_textfont.py +++ b/plotly/validators/scattercarpet/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattercarpet", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_textposition.py b/plotly/validators/scattercarpet/_textposition.py index c4089bffc6..715012c592 100644 --- a/plotly/validators/scattercarpet/_textposition.py +++ b/plotly/validators/scattercarpet/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scattercarpet", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattercarpet/_textpositionsrc.py b/plotly/validators/scattercarpet/_textpositionsrc.py index 937b7297b4..20881e3843 100644 --- a/plotly/validators/scattercarpet/_textpositionsrc.py +++ b/plotly/validators/scattercarpet/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scattercarpet", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_textsrc.py b/plotly/validators/scattercarpet/_textsrc.py index 09c2e079b8..771fbf5ee3 100644 --- a/plotly/validators/scattercarpet/_textsrc.py +++ b/plotly/validators/scattercarpet/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattercarpet", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_texttemplate.py b/plotly/validators/scattercarpet/_texttemplate.py index 33a9f07448..7a444b92a4 100644 --- a/plotly/validators/scattercarpet/_texttemplate.py +++ b/plotly/validators/scattercarpet/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scattercarpet", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattercarpet/_texttemplatesrc.py b/plotly/validators/scattercarpet/_texttemplatesrc.py index 4a80f38af8..c5a9974ab0 100644 --- a/plotly/validators/scattercarpet/_texttemplatesrc.py +++ b/plotly/validators/scattercarpet/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scattercarpet", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_uid.py b/plotly/validators/scattercarpet/_uid.py index 857394a80b..19013d0c86 100644 --- a/plotly/validators/scattercarpet/_uid.py +++ b/plotly/validators/scattercarpet/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattercarpet", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_uirevision.py b/plotly/validators/scattercarpet/_uirevision.py index a94337daaa..8272d45a18 100644 --- a/plotly/validators/scattercarpet/_uirevision.py +++ b/plotly/validators/scattercarpet/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattercarpet", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/_unselected.py b/plotly/validators/scattercarpet/_unselected.py index 505a46a304..201ad2c877 100644 --- a/plotly/validators/scattercarpet/_unselected.py +++ b/plotly/validators/scattercarpet/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattercarpet", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattercarpet.unse - lected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattercarpet.unse - lected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/_visible.py b/plotly/validators/scattercarpet/_visible.py index 5e71959c15..10cefef09d 100644 --- a/plotly/validators/scattercarpet/_visible.py +++ b/plotly/validators/scattercarpet/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattercarpet", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scattercarpet/_xaxis.py b/plotly/validators/scattercarpet/_xaxis.py index 020d54151a..d95451880f 100644 --- a/plotly/validators/scattercarpet/_xaxis.py +++ b/plotly/validators/scattercarpet/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="scattercarpet", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scattercarpet/_yaxis.py b/plotly/validators/scattercarpet/_yaxis.py index d31689ebd6..c5743779e2 100644 --- a/plotly/validators/scattercarpet/_yaxis.py +++ b/plotly/validators/scattercarpet/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="scattercarpet", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scattercarpet/_zorder.py b/plotly/validators/scattercarpet/_zorder.py index 2400b66a9a..ad6a41bd80 100644 --- a/plotly/validators/scattercarpet/_zorder.py +++ b/plotly/validators/scattercarpet/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="scattercarpet", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/__init__.py b/plotly/validators/scattercarpet/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scattercarpet/hoverlabel/__init__.py +++ b/plotly/validators/scattercarpet/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scattercarpet/hoverlabel/_align.py b/plotly/validators/scattercarpet/hoverlabel/_align.py index ac3a859e54..156dbe7f5c 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_align.py +++ b/plotly/validators/scattercarpet/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scattercarpet.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py b/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py index cd2f1c6f75..5dc0668110 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattercarpet.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py b/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py index 847dd1f80b..4d846debe5 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py +++ b/plotly/validators/scattercarpet/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattercarpet.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py b/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py index 5e2ab9797f..801f49c9fa 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattercarpet.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py b/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py index 281e0523ce..9b92e3d426 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py +++ b/plotly/validators/scattercarpet/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattercarpet.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py b/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py index 0eed31fd5d..0aab457f7d 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattercarpet.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/_font.py b/plotly/validators/scattercarpet/hoverlabel/_font.py index d418fca00a..cae70ce9ae 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_font.py +++ b/plotly/validators/scattercarpet/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattercarpet.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/hoverlabel/_namelength.py b/plotly/validators/scattercarpet/hoverlabel/_namelength.py index 514ea7487d..85612907ac 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_namelength.py +++ b/plotly/validators/scattercarpet/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattercarpet.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py b/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py index fb6f8c6fa1..003eaef27a 100644 --- a/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scattercarpet.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/__init__.py b/plotly/validators/scattercarpet/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/__init__.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_color.py b/plotly/validators/scattercarpet/hoverlabel/font/_color.py index d557187ed9..9b4ae6c114 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_color.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py index 734cc24535..cc86de7200 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_family.py b/plotly/validators/scattercarpet/hoverlabel/font/_family.py index a547b392d4..4b44c77397 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_family.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py index eb2bc2fc57..6e682006eb 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_lineposition.py b/plotly/validators/scattercarpet/hoverlabel/font/_lineposition.py index 7e124a93b8..5c0ba45ef0 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_linepositionsrc.py index c1f7a6b59a..7ac825baaa 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_shadow.py b/plotly/validators/scattercarpet/hoverlabel/font/_shadow.py index 2d8e98e33e..ea7652d07f 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_shadow.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_shadowsrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_shadowsrc.py index aa817b779a..2bba196bf1 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_size.py b/plotly/validators/scattercarpet/hoverlabel/font/_size.py index 4f55b7c689..c7a7ecc528 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_size.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py index 701c9f5ad4..37cd6c85b4 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_style.py b/plotly/validators/scattercarpet/hoverlabel/font/_style.py index 21ed336e5b..1b102afc56 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_style.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattercarpet.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_stylesrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_stylesrc.py index 3637136987..fa303b3f59 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_textcase.py b/plotly/validators/scattercarpet/hoverlabel/font/_textcase.py index efdb75fdf9..8bd61c1693 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_textcase.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_textcasesrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_textcasesrc.py index 52a89ee152..4d747044e7 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_variant.py b/plotly/validators/scattercarpet/hoverlabel/font/_variant.py index bf246b0ab5..5d7f4dba5a 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_variant.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_variantsrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_variantsrc.py index ec1ec0fdaf..c771605a3a 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_weight.py b/plotly/validators/scattercarpet/hoverlabel/font/_weight.py index ff9d32157c..5af9861f37 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_weight.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattercarpet/hoverlabel/font/_weightsrc.py b/plotly/validators/scattercarpet/hoverlabel/font/_weightsrc.py index 6bf9b80888..aed09295b1 100644 --- a/plotly/validators/scattercarpet/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scattercarpet/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattercarpet.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/legendgrouptitle/__init__.py b/plotly/validators/scattercarpet/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/__init__.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scattercarpet/legendgrouptitle/_font.py b/plotly/validators/scattercarpet/legendgrouptitle/_font.py index 84793aa2d0..3b558b0ecc 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/_font.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattercarpet.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/legendgrouptitle/_text.py b/plotly/validators/scattercarpet/legendgrouptitle/_text.py index 34a0c36b35..cf2e18a9a4 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/_text.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattercarpet.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/__init__.py b/plotly/validators/scattercarpet/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_color.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_color.py index 1e2b245519..fa9de4cede 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_color.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_family.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_family.py index a2fdecfcfe..2263d036f1 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_family.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_lineposition.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_lineposition.py index 2ee04a8466..73d46b2265 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_shadow.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_shadow.py index effe300f8b..a6901bcd1c 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_size.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_size.py index e3f4039149..b6672cf611 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_size.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_style.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_style.py index c198f0d601..ce56a77941 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_style.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_textcase.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_textcase.py index 589bef4389..cbd2b4e46f 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_variant.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_variant.py index 6ba0811864..9cc7d9416f 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattercarpet/legendgrouptitle/font/_weight.py b/plotly/validators/scattercarpet/legendgrouptitle/font/_weight.py index b8177744bc..7a63bde629 100644 --- a/plotly/validators/scattercarpet/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scattercarpet/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattercarpet.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattercarpet/line/__init__.py b/plotly/validators/scattercarpet/line/__init__.py index 7045562597..d9c0ff9500 100644 --- a/plotly/validators/scattercarpet/line/__init__.py +++ b/plotly/validators/scattercarpet/line/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._shape import ShapeValidator - from ._dash import DashValidator - from ._color import ColorValidator - from ._backoffsrc import BackoffsrcValidator - from ._backoff import BackoffValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._shape.ShapeValidator", - "._dash.DashValidator", - "._color.ColorValidator", - "._backoffsrc.BackoffsrcValidator", - "._backoff.BackoffValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + "._backoffsrc.BackoffsrcValidator", + "._backoff.BackoffValidator", + ], +) diff --git a/plotly/validators/scattercarpet/line/_backoff.py b/plotly/validators/scattercarpet/line/_backoff.py index 43a5882734..50a1235dea 100644 --- a/plotly/validators/scattercarpet/line/_backoff.py +++ b/plotly/validators/scattercarpet/line/_backoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffValidator(_plotly_utils.basevalidators.NumberValidator): +class BackoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="backoff", parent_name="scattercarpet.line", **kwargs ): - super(BackoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/line/_backoffsrc.py b/plotly/validators/scattercarpet/line/_backoffsrc.py index e7cfda5067..fa6f9d5402 100644 --- a/plotly/validators/scattercarpet/line/_backoffsrc.py +++ b/plotly/validators/scattercarpet/line/_backoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BackoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="backoffsrc", parent_name="scattercarpet.line", **kwargs ): - super(BackoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/line/_color.py b/plotly/validators/scattercarpet/line/_color.py index bddc763b1f..d916df2719 100644 --- a/plotly/validators/scattercarpet/line/_color.py +++ b/plotly/validators/scattercarpet/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattercarpet.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/line/_dash.py b/plotly/validators/scattercarpet/line/_dash.py index b4c7cab49d..15e24d1542 100644 --- a/plotly/validators/scattercarpet/line/_dash.py +++ b/plotly/validators/scattercarpet/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="scattercarpet.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/scattercarpet/line/_shape.py b/plotly/validators/scattercarpet/line/_shape.py index bf3b7d18d1..4fb4174069 100644 --- a/plotly/validators/scattercarpet/line/_shape.py +++ b/plotly/validators/scattercarpet/line/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scattercarpet.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["linear", "spline"]), **kwargs, diff --git a/plotly/validators/scattercarpet/line/_smoothing.py b/plotly/validators/scattercarpet/line/_smoothing.py index 246eb890d6..7b4fb148c8 100644 --- a/plotly/validators/scattercarpet/line/_smoothing.py +++ b/plotly/validators/scattercarpet/line/_smoothing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="scattercarpet.line", **kwargs ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/line/_width.py b/plotly/validators/scattercarpet/line/_width.py index 8f408e82de..fa7a8376aa 100644 --- a/plotly/validators/scattercarpet/line/_width.py +++ b/plotly/validators/scattercarpet/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattercarpet.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/__init__.py b/plotly/validators/scattercarpet/marker/__init__.py index 8434e73e3f..fea9868a7b 100644 --- a/plotly/validators/scattercarpet/marker/__init__.py +++ b/plotly/validators/scattercarpet/marker/__init__.py @@ -1,71 +1,38 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._standoffsrc import StandoffsrcValidator - from ._standoff import StandoffValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxdisplayed import MaxdisplayedValidator - from ._line import LineValidator - from ._gradient import GradientValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angleref import AnglerefValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._standoffsrc.StandoffsrcValidator", - "._standoff.StandoffValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxdisplayed.MaxdisplayedValidator", - "._line.LineValidator", - "._gradient.GradientValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angleref.AnglerefValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._standoffsrc.StandoffsrcValidator", + "._standoff.StandoffValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angleref.AnglerefValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/_angle.py b/plotly/validators/scattercarpet/marker/_angle.py index f5c125465f..adf29b9db9 100644 --- a/plotly/validators/scattercarpet/marker/_angle.py +++ b/plotly/validators/scattercarpet/marker/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__( self, plotly_name="angle", parent_name="scattercarpet.marker", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_angleref.py b/plotly/validators/scattercarpet/marker/_angleref.py index f41f56e480..c0cab6527e 100644 --- a/plotly/validators/scattercarpet/marker/_angleref.py +++ b/plotly/validators/scattercarpet/marker/_angleref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnglerefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="angleref", parent_name="scattercarpet.marker", **kwargs ): - super(AnglerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["previous", "up"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_anglesrc.py b/plotly/validators/scattercarpet/marker/_anglesrc.py index 3d469a5002..995e6e3dc1 100644 --- a/plotly/validators/scattercarpet/marker/_anglesrc.py +++ b/plotly/validators/scattercarpet/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scattercarpet.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_autocolorscale.py b/plotly/validators/scattercarpet/marker/_autocolorscale.py index a658bed956..c0d5a33db1 100644 --- a/plotly/validators/scattercarpet/marker/_autocolorscale.py +++ b/plotly/validators/scattercarpet/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattercarpet.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_cauto.py b/plotly/validators/scattercarpet/marker/_cauto.py index a405248471..0b2652e2ef 100644 --- a/plotly/validators/scattercarpet/marker/_cauto.py +++ b/plotly/validators/scattercarpet/marker/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattercarpet.marker", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_cmax.py b/plotly/validators/scattercarpet/marker/_cmax.py index 9e8f39a9e8..ea5d1891fa 100644 --- a/plotly/validators/scattercarpet/marker/_cmax.py +++ b/plotly/validators/scattercarpet/marker/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattercarpet.marker", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_cmid.py b/plotly/validators/scattercarpet/marker/_cmid.py index 56671938e9..eff76caac9 100644 --- a/plotly/validators/scattercarpet/marker/_cmid.py +++ b/plotly/validators/scattercarpet/marker/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattercarpet.marker", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_cmin.py b/plotly/validators/scattercarpet/marker/_cmin.py index 8a52fb98d2..616ae1b6e5 100644 --- a/plotly/validators/scattercarpet/marker/_cmin.py +++ b/plotly/validators/scattercarpet/marker/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scattercarpet.marker", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_color.py b/plotly/validators/scattercarpet/marker/_color.py index 1eeb4f0fb8..8282960261 100644 --- a/plotly/validators/scattercarpet/marker/_color.py +++ b/plotly/validators/scattercarpet/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattercarpet/marker/_coloraxis.py b/plotly/validators/scattercarpet/marker/_coloraxis.py index 4d245e514d..42f522a323 100644 --- a/plotly/validators/scattercarpet/marker/_coloraxis.py +++ b/plotly/validators/scattercarpet/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattercarpet.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattercarpet/marker/_colorbar.py b/plotly/validators/scattercarpet/marker/_colorbar.py index 8d2226095e..1f2f2daf7d 100644 --- a/plotly/validators/scattercarpet/marker/_colorbar.py +++ b/plotly/validators/scattercarpet/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scattercarpet.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - carpet.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattercarpet.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattercarpet.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattercarpet.mark - er.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_colorscale.py b/plotly/validators/scattercarpet/marker/_colorscale.py index 56ff5828de..fe1a250382 100644 --- a/plotly/validators/scattercarpet/marker/_colorscale.py +++ b/plotly/validators/scattercarpet/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattercarpet.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_colorsrc.py b/plotly/validators/scattercarpet/marker/_colorsrc.py index 4d3627fa2b..c560045cae 100644 --- a/plotly/validators/scattercarpet/marker/_colorsrc.py +++ b/plotly/validators/scattercarpet/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattercarpet.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_gradient.py b/plotly/validators/scattercarpet/marker/_gradient.py index 1571d45579..a912e57643 100644 --- a/plotly/validators/scattercarpet/marker/_gradient.py +++ b/plotly/validators/scattercarpet/marker/_gradient.py @@ -1,30 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class GradientValidator(_bv.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scattercarpet.marker", **kwargs ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gradient"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_line.py b/plotly/validators/scattercarpet/marker/_line.py index 2eb9d2be32..94c9465d38 100644 --- a/plotly/validators/scattercarpet/marker/_line.py +++ b/plotly/validators/scattercarpet/marker/_line.py @@ -1,106 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="scattercarpet.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_maxdisplayed.py b/plotly/validators/scattercarpet/marker/_maxdisplayed.py index 96fd3072a7..26de9de588 100644 --- a/plotly/validators/scattercarpet/marker/_maxdisplayed.py +++ b/plotly/validators/scattercarpet/marker/_maxdisplayed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxdisplayedValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxdisplayed", parent_name="scattercarpet.marker", **kwargs ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_opacity.py b/plotly/validators/scattercarpet/marker/_opacity.py index e2cdbb9100..c61a43a4a7 100644 --- a/plotly/validators/scattercarpet/marker/_opacity.py +++ b/plotly/validators/scattercarpet/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattercarpet.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattercarpet/marker/_opacitysrc.py b/plotly/validators/scattercarpet/marker/_opacitysrc.py index a60fee74c6..1f878685a7 100644 --- a/plotly/validators/scattercarpet/marker/_opacitysrc.py +++ b/plotly/validators/scattercarpet/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattercarpet.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_reversescale.py b/plotly/validators/scattercarpet/marker/_reversescale.py index 625ccb04bc..19f36dbee1 100644 --- a/plotly/validators/scattercarpet/marker/_reversescale.py +++ b/plotly/validators/scattercarpet/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattercarpet.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_showscale.py b/plotly/validators/scattercarpet/marker/_showscale.py index 4df21f8bf1..a10e267ed7 100644 --- a/plotly/validators/scattercarpet/marker/_showscale.py +++ b/plotly/validators/scattercarpet/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattercarpet.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_size.py b/plotly/validators/scattercarpet/marker/_size.py index 7676c02c7b..b89d69012e 100644 --- a/plotly/validators/scattercarpet/marker/_size.py +++ b/plotly/validators/scattercarpet/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/marker/_sizemin.py b/plotly/validators/scattercarpet/marker/_sizemin.py index 96c1fcdc8f..5ae3a055b2 100644 --- a/plotly/validators/scattercarpet/marker/_sizemin.py +++ b/plotly/validators/scattercarpet/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scattercarpet.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_sizemode.py b/plotly/validators/scattercarpet/marker/_sizemode.py index f710fc9750..feeddd8fb1 100644 --- a/plotly/validators/scattercarpet/marker/_sizemode.py +++ b/plotly/validators/scattercarpet/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattercarpet.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/_sizeref.py b/plotly/validators/scattercarpet/marker/_sizeref.py index 1e39279afb..a2e081c527 100644 --- a/plotly/validators/scattercarpet/marker/_sizeref.py +++ b/plotly/validators/scattercarpet/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scattercarpet.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_sizesrc.py b/plotly/validators/scattercarpet/marker/_sizesrc.py index b5e2938136..3ee879527c 100644 --- a/plotly/validators/scattercarpet/marker/_sizesrc.py +++ b/plotly/validators/scattercarpet/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattercarpet.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_standoff.py b/plotly/validators/scattercarpet/marker/_standoff.py index ca37ed66f1..e00579f9b6 100644 --- a/plotly/validators/scattercarpet/marker/_standoff.py +++ b/plotly/validators/scattercarpet/marker/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="scattercarpet.marker", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/marker/_standoffsrc.py b/plotly/validators/scattercarpet/marker/_standoffsrc.py index 096673f377..6181b0fede 100644 --- a/plotly/validators/scattercarpet/marker/_standoffsrc.py +++ b/plotly/validators/scattercarpet/marker/_standoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StandoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="standoffsrc", parent_name="scattercarpet.marker", **kwargs ): - super(StandoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/_symbol.py b/plotly/validators/scattercarpet/marker/_symbol.py index 8a66a7852f..09662129e2 100644 --- a/plotly/validators/scattercarpet/marker/_symbol.py +++ b/plotly/validators/scattercarpet/marker/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="symbol", parent_name="scattercarpet.marker", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( diff --git a/plotly/validators/scattercarpet/marker/_symbolsrc.py b/plotly/validators/scattercarpet/marker/_symbolsrc.py index 950142054a..aed0be00af 100644 --- a/plotly/validators/scattercarpet/marker/_symbolsrc.py +++ b/plotly/validators/scattercarpet/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattercarpet.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/__init__.py b/plotly/validators/scattercarpet/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/__init__.py +++ b/plotly/validators/scattercarpet/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py b/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py index 14d8d44017..7aa7e04ce9 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py b/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py index a7d81afb97..a8acf5dbad 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py b/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py index 6c14054c3a..7e26c7b5db 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_dtick.py b/plotly/validators/scattercarpet/marker/colorbar/_dtick.py index 52007629e8..54495c61f2 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_dtick.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py b/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py index 4b7ad45486..a40243bb8c 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_labelalias.py b/plotly/validators/scattercarpet/marker/colorbar/_labelalias.py index 54598bee82..2cdda3cc27 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_labelalias.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_len.py b/plotly/validators/scattercarpet/marker/colorbar/_len.py index 909c27f4c9..4762a09adb 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_len.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py b/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py index 1d950a183d..8a0460b8ba 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_lenmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_minexponent.py b/plotly/validators/scattercarpet/marker/colorbar/_minexponent.py index 899f52cd66..38e176a60b 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_minexponent.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_nticks.py b/plotly/validators/scattercarpet/marker/colorbar/_nticks.py index a27230d204..102b1ff728 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_nticks.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_nticks.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_orientation.py b/plotly/validators/scattercarpet/marker/colorbar/_orientation.py index d9747b0fc2..abc30a10c5 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_orientation.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py b/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py index 21c7ae72f0..377a709198 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py b/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py index 37b2931d50..efbfb6e514 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py b/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py index 47fe1ce672..bf749554be 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py b/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py index 021a46814f..bd39928630 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py b/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py index 4c739cf26a..e70e88f4db 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py b/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py index 756fdc9ccc..dd9e3a78d1 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py b/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py index 65362ecd76..53f22bd7c7 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_thickness.py b/plotly/validators/scattercarpet/marker/colorbar/_thickness.py index aa69d2bd9c..1ec08302df 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_thickness.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py b/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py index 1aff8c25b0..cb4f8d5635 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tick0.py b/plotly/validators/scattercarpet/marker/colorbar/_tick0.py index 49fb269ac4..2dab75f92e 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tick0.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py b/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py index 9a7ef6641b..db904fbf36 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py b/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py index 32df0b6588..f808fc6d2b 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py b/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py index 9404fe8207..bbe15dee58 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py b/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py index 52ca25092e..7af8ca0fc8 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py index c8a7fb0da0..9e8b7b563e 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py b/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py index 4bca67ff08..539a921968 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scattercarpet/marker/colorbar/_ticklabeloverflow.py index 44f5514fd4..da09c00437 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticklabelposition.py b/plotly/validators/scattercarpet/marker/colorbar/_ticklabelposition.py index b28a577be1..b286349566 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticklabelstep.py b/plotly/validators/scattercarpet/marker/colorbar/_ticklabelstep.py index 8d1dc0bb82..d9522d9410 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py b/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py index 24ae73ac23..3baa636218 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticklen.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py b/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py index 83c1465f4c..1c9fdb0f22 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py b/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py index 5a9b3158f5..f131274a6e 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticks.py b/plotly/validators/scattercarpet/marker/colorbar/_ticks.py index e1d9fd675e..4a1aa4ed83 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticks.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py b/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py index 7dd6d7ce8f..c9e569af27 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py b/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py index 9078cc68fd..47017cc352 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py b/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py index fe2d8279c5..9a29cf43b0 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py b/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py index 3773574430..7e07f02d26 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py b/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py index 2c49686ebf..61b5971c27 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py b/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py index a5c1a77906..4f4a9e475e 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_title.py b/plotly/validators/scattercarpet/marker/colorbar/_title.py index ff2d5ac949..77bbaac3b6 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_title.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_x.py b/plotly/validators/scattercarpet/marker/colorbar/_x.py index 16366085ee..6552e109fa 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_x.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py b/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py index 5d04c05e97..1e08c9b061 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_xanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_xpad.py b/plotly/validators/scattercarpet/marker/colorbar/_xpad.py index 1e67b49254..edb1a0f6ac 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_xpad.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_xref.py b/plotly/validators/scattercarpet/marker/colorbar/_xref.py index eab939038a..2eb9cf70ab 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_xref.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_y.py b/plotly/validators/scattercarpet/marker/colorbar/_y.py index e90c052704..256df53f07 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_y.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py b/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py index 186b5b7d51..d069ae65e0 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_yanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scattercarpet.marker.colorbar", **kwargs, ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_ypad.py b/plotly/validators/scattercarpet/marker/colorbar/_ypad.py index cfa15b511e..589fb69f6c 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_ypad.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/_yref.py b/plotly/validators/scattercarpet/marker/colorbar/_yref.py index 2fdab2766d..88a2a6ed58 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/_yref.py +++ b/plotly/validators/scattercarpet/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scattercarpet.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py index 4f3e47e6c1..bed6cb706e 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py index 8cf7e70ad8..40947ed468 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_lineposition.py index 79182f3836..df5d445ce3 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_shadow.py index 48ae865387..6cdfb27b1f 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py index 86e0c213fc..da9f8fb683 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_style.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_style.py index bf56014668..a1019474aa 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_textcase.py index bfcc614c34..7766c69a86 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_variant.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_variant.py index 12f482e4aa..adc1d73f8b 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_weight.py b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_weight.py index 082e9e3b9d..d38a6d813d 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattercarpet.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py index bcdb24c318..73f2a129a9 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattercarpet.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py index 09d124c1b2..1456510410 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattercarpet.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py index 63a065256f..8e9135a5d5 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scattercarpet.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py index 3d1a1841b0..875efd02d4 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scattercarpet.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py index 82f8fda17a..67f9c8963f 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scattercarpet/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scattercarpet.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py b/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/_font.py b/plotly/validators/scattercarpet/marker/colorbar/title/_font.py index f0906bbfb2..665f55ecc0 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/_font.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattercarpet.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/_side.py b/plotly/validators/scattercarpet/marker/colorbar/title/_side.py index 49917508db..84762b1455 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/_side.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattercarpet.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/_text.py b/plotly/validators/scattercarpet/marker/colorbar/title/_text.py index d5b74f2fad..e18a1638dc 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/_text.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattercarpet.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py index a7e6569fb5..2354070c45 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py index 46dd394b7d..23a5054afe 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_lineposition.py index 8b04ada878..ed2607c43a 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_shadow.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_shadow.py index 7da9153fb3..11b9abb19a 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py index 8237d52eca..3a3ba5463d 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_style.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_style.py index 512db0b933..42f071b215 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_textcase.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_textcase.py index 4f47cdf47f..79fdda340f 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_variant.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_variant.py index c552cc6172..6ae035734d 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattercarpet/marker/colorbar/title/font/_weight.py b/plotly/validators/scattercarpet/marker/colorbar/title/font/_weight.py index 8f4cc32565..0117977cdb 100644 --- a/plotly/validators/scattercarpet/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scattercarpet/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattercarpet.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattercarpet/marker/gradient/__init__.py b/plotly/validators/scattercarpet/marker/gradient/__init__.py index 624a280ea4..f5373e7822 100644 --- a/plotly/validators/scattercarpet/marker/gradient/__init__.py +++ b/plotly/validators/scattercarpet/marker/gradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._typesrc import TypesrcValidator - from ._type import TypeValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._typesrc.TypesrcValidator", - "._type.TypeValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/gradient/_color.py b/plotly/validators/scattercarpet/marker/gradient/_color.py index 44dfe26a2f..451aff6523 100644 --- a/plotly/validators/scattercarpet/marker/gradient/_color.py +++ b/plotly/validators/scattercarpet/marker/gradient/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.marker.gradient", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py b/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py index 96465db791..a83b53694a 100644 --- a/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py +++ b/plotly/validators/scattercarpet/marker/gradient/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattercarpet.marker.gradient", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/gradient/_type.py b/plotly/validators/scattercarpet/marker/gradient/_type.py index 43d6a2f59f..d22b3d2784 100644 --- a/plotly/validators/scattercarpet/marker/gradient/_type.py +++ b/plotly/validators/scattercarpet/marker/gradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scattercarpet.marker.gradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), diff --git a/plotly/validators/scattercarpet/marker/gradient/_typesrc.py b/plotly/validators/scattercarpet/marker/gradient/_typesrc.py index 6e33fa6383..7d588aff2c 100644 --- a/plotly/validators/scattercarpet/marker/gradient/_typesrc.py +++ b/plotly/validators/scattercarpet/marker/gradient/_typesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TypesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scattercarpet.marker.gradient", **kwargs, ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/line/__init__.py b/plotly/validators/scattercarpet/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scattercarpet/marker/line/__init__.py +++ b/plotly/validators/scattercarpet/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scattercarpet/marker/line/_autocolorscale.py b/plotly/validators/scattercarpet/marker/line/_autocolorscale.py index 003b42a478..fc825261a0 100644 --- a/plotly/validators/scattercarpet/marker/line/_autocolorscale.py +++ b/plotly/validators/scattercarpet/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattercarpet.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/line/_cauto.py b/plotly/validators/scattercarpet/marker/line/_cauto.py index 1792950d16..dec988d4b3 100644 --- a/plotly/validators/scattercarpet/marker/line/_cauto.py +++ b/plotly/validators/scattercarpet/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattercarpet.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/line/_cmax.py b/plotly/validators/scattercarpet/marker/line/_cmax.py index b2419e987d..9d5e728644 100644 --- a/plotly/validators/scattercarpet/marker/line/_cmax.py +++ b/plotly/validators/scattercarpet/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattercarpet.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/line/_cmid.py b/plotly/validators/scattercarpet/marker/line/_cmid.py index d755b2accd..5e31ec60c8 100644 --- a/plotly/validators/scattercarpet/marker/line/_cmid.py +++ b/plotly/validators/scattercarpet/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattercarpet.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/line/_cmin.py b/plotly/validators/scattercarpet/marker/line/_cmin.py index ea7443b0d2..760f8efe5b 100644 --- a/plotly/validators/scattercarpet/marker/line/_cmin.py +++ b/plotly/validators/scattercarpet/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scattercarpet.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/line/_color.py b/plotly/validators/scattercarpet/marker/line/_color.py index aa83de730b..6f7dc95485 100644 --- a/plotly/validators/scattercarpet/marker/line/_color.py +++ b/plotly/validators/scattercarpet/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattercarpet/marker/line/_coloraxis.py b/plotly/validators/scattercarpet/marker/line/_coloraxis.py index 9e081a9a23..27ae011f45 100644 --- a/plotly/validators/scattercarpet/marker/line/_coloraxis.py +++ b/plotly/validators/scattercarpet/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattercarpet.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattercarpet/marker/line/_colorscale.py b/plotly/validators/scattercarpet/marker/line/_colorscale.py index 651b0a448d..8fc9198923 100644 --- a/plotly/validators/scattercarpet/marker/line/_colorscale.py +++ b/plotly/validators/scattercarpet/marker/line/_colorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattercarpet.marker.line", **kwargs, ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattercarpet/marker/line/_colorsrc.py b/plotly/validators/scattercarpet/marker/line/_colorsrc.py index 205692ff6c..12076630dc 100644 --- a/plotly/validators/scattercarpet/marker/line/_colorsrc.py +++ b/plotly/validators/scattercarpet/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattercarpet.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/line/_reversescale.py b/plotly/validators/scattercarpet/marker/line/_reversescale.py index 8adeea7679..87c1007676 100644 --- a/plotly/validators/scattercarpet/marker/line/_reversescale.py +++ b/plotly/validators/scattercarpet/marker/line/_reversescale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattercarpet.marker.line", **kwargs, ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/marker/line/_width.py b/plotly/validators/scattercarpet/marker/line/_width.py index 16add7fbe9..47e94a346e 100644 --- a/plotly/validators/scattercarpet/marker/line/_width.py +++ b/plotly/validators/scattercarpet/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scattercarpet.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/marker/line/_widthsrc.py b/plotly/validators/scattercarpet/marker/line/_widthsrc.py index 9127cf566f..8aeec6338c 100644 --- a/plotly/validators/scattercarpet/marker/line/_widthsrc.py +++ b/plotly/validators/scattercarpet/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scattercarpet.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/selected/__init__.py b/plotly/validators/scattercarpet/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattercarpet/selected/__init__.py +++ b/plotly/validators/scattercarpet/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattercarpet/selected/_marker.py b/plotly/validators/scattercarpet/selected/_marker.py index 4ccd864da6..45283784b7 100644 --- a/plotly/validators/scattercarpet/selected/_marker.py +++ b/plotly/validators/scattercarpet/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattercarpet.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/selected/_textfont.py b/plotly/validators/scattercarpet/selected/_textfont.py index 512f1181c8..db53b48d41 100644 --- a/plotly/validators/scattercarpet/selected/_textfont.py +++ b/plotly/validators/scattercarpet/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattercarpet.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/selected/marker/__init__.py b/plotly/validators/scattercarpet/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattercarpet/selected/marker/__init__.py +++ b/plotly/validators/scattercarpet/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattercarpet/selected/marker/_color.py b/plotly/validators/scattercarpet/selected/marker/_color.py index af81930c0e..2965edbea2 100644 --- a/plotly/validators/scattercarpet/selected/marker/_color.py +++ b/plotly/validators/scattercarpet/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/selected/marker/_opacity.py b/plotly/validators/scattercarpet/selected/marker/_opacity.py index f6584e6cab..62d6d899dc 100644 --- a/plotly/validators/scattercarpet/selected/marker/_opacity.py +++ b/plotly/validators/scattercarpet/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattercarpet.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/selected/marker/_size.py b/plotly/validators/scattercarpet/selected/marker/_size.py index e6745d42a0..e08e24ddb3 100644 --- a/plotly/validators/scattercarpet/selected/marker/_size.py +++ b/plotly/validators/scattercarpet/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/selected/textfont/__init__.py b/plotly/validators/scattercarpet/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattercarpet/selected/textfont/__init__.py +++ b/plotly/validators/scattercarpet/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattercarpet/selected/textfont/_color.py b/plotly/validators/scattercarpet/selected/textfont/_color.py index fa97b35361..537d674283 100644 --- a/plotly/validators/scattercarpet/selected/textfont/_color.py +++ b/plotly/validators/scattercarpet/selected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.selected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/stream/__init__.py b/plotly/validators/scattercarpet/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scattercarpet/stream/__init__.py +++ b/plotly/validators/scattercarpet/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scattercarpet/stream/_maxpoints.py b/plotly/validators/scattercarpet/stream/_maxpoints.py index bb86d46112..9d639f1b30 100644 --- a/plotly/validators/scattercarpet/stream/_maxpoints.py +++ b/plotly/validators/scattercarpet/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattercarpet.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/stream/_token.py b/plotly/validators/scattercarpet/stream/_token.py index 4f70acb406..b3ccfd75a8 100644 --- a/plotly/validators/scattercarpet/stream/_token.py +++ b/plotly/validators/scattercarpet/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="scattercarpet.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattercarpet/textfont/__init__.py b/plotly/validators/scattercarpet/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattercarpet/textfont/__init__.py +++ b/plotly/validators/scattercarpet/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattercarpet/textfont/_color.py b/plotly/validators/scattercarpet/textfont/_color.py index 3758b5c9a2..c9fab0e11c 100644 --- a/plotly/validators/scattercarpet/textfont/_color.py +++ b/plotly/validators/scattercarpet/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattercarpet/textfont/_colorsrc.py b/plotly/validators/scattercarpet/textfont/_colorsrc.py index 185d6d538d..a56f190bfb 100644 --- a/plotly/validators/scattercarpet/textfont/_colorsrc.py +++ b/plotly/validators/scattercarpet/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattercarpet.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_family.py b/plotly/validators/scattercarpet/textfont/_family.py index 42020c181a..b470f37a6b 100644 --- a/plotly/validators/scattercarpet/textfont/_family.py +++ b/plotly/validators/scattercarpet/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattercarpet.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattercarpet/textfont/_familysrc.py b/plotly/validators/scattercarpet/textfont/_familysrc.py index 9570b6f228..6555f4dcfb 100644 --- a/plotly/validators/scattercarpet/textfont/_familysrc.py +++ b/plotly/validators/scattercarpet/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattercarpet.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_lineposition.py b/plotly/validators/scattercarpet/textfont/_lineposition.py index cc21e7cf70..203ae99aee 100644 --- a/plotly/validators/scattercarpet/textfont/_lineposition.py +++ b/plotly/validators/scattercarpet/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattercarpet.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattercarpet/textfont/_linepositionsrc.py b/plotly/validators/scattercarpet/textfont/_linepositionsrc.py index 3575b8c7f5..ebe8aab191 100644 --- a/plotly/validators/scattercarpet/textfont/_linepositionsrc.py +++ b/plotly/validators/scattercarpet/textfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattercarpet.textfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_shadow.py b/plotly/validators/scattercarpet/textfont/_shadow.py index 610a87df60..5e0f86d997 100644 --- a/plotly/validators/scattercarpet/textfont/_shadow.py +++ b/plotly/validators/scattercarpet/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattercarpet.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattercarpet/textfont/_shadowsrc.py b/plotly/validators/scattercarpet/textfont/_shadowsrc.py index 5f75f61463..84e5b35c68 100644 --- a/plotly/validators/scattercarpet/textfont/_shadowsrc.py +++ b/plotly/validators/scattercarpet/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattercarpet.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_size.py b/plotly/validators/scattercarpet/textfont/_size.py index 0d843093a5..b24c3fdf43 100644 --- a/plotly/validators/scattercarpet/textfont/_size.py +++ b/plotly/validators/scattercarpet/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattercarpet/textfont/_sizesrc.py b/plotly/validators/scattercarpet/textfont/_sizesrc.py index 4f2edf3fb3..3be3e45a90 100644 --- a/plotly/validators/scattercarpet/textfont/_sizesrc.py +++ b/plotly/validators/scattercarpet/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattercarpet.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_style.py b/plotly/validators/scattercarpet/textfont/_style.py index e35f2dba16..d482195563 100644 --- a/plotly/validators/scattercarpet/textfont/_style.py +++ b/plotly/validators/scattercarpet/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattercarpet.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattercarpet/textfont/_stylesrc.py b/plotly/validators/scattercarpet/textfont/_stylesrc.py index ace1520775..8b427d9a04 100644 --- a/plotly/validators/scattercarpet/textfont/_stylesrc.py +++ b/plotly/validators/scattercarpet/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattercarpet.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_textcase.py b/plotly/validators/scattercarpet/textfont/_textcase.py index 48d8d15990..7433ed2ddf 100644 --- a/plotly/validators/scattercarpet/textfont/_textcase.py +++ b/plotly/validators/scattercarpet/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattercarpet.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattercarpet/textfont/_textcasesrc.py b/plotly/validators/scattercarpet/textfont/_textcasesrc.py index 2c6b1d0e8e..4f4729e4a2 100644 --- a/plotly/validators/scattercarpet/textfont/_textcasesrc.py +++ b/plotly/validators/scattercarpet/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattercarpet.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_variant.py b/plotly/validators/scattercarpet/textfont/_variant.py index 87dfcc45f4..4e2a8689c3 100644 --- a/plotly/validators/scattercarpet/textfont/_variant.py +++ b/plotly/validators/scattercarpet/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattercarpet.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattercarpet/textfont/_variantsrc.py b/plotly/validators/scattercarpet/textfont/_variantsrc.py index 5ea2e23288..43b117a9f2 100644 --- a/plotly/validators/scattercarpet/textfont/_variantsrc.py +++ b/plotly/validators/scattercarpet/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattercarpet.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/textfont/_weight.py b/plotly/validators/scattercarpet/textfont/_weight.py index baf0015ead..789b6ee52e 100644 --- a/plotly/validators/scattercarpet/textfont/_weight.py +++ b/plotly/validators/scattercarpet/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattercarpet.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattercarpet/textfont/_weightsrc.py b/plotly/validators/scattercarpet/textfont/_weightsrc.py index bedc19e002..c0f10c6d7d 100644 --- a/plotly/validators/scattercarpet/textfont/_weightsrc.py +++ b/plotly/validators/scattercarpet/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattercarpet.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/unselected/__init__.py b/plotly/validators/scattercarpet/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattercarpet/unselected/__init__.py +++ b/plotly/validators/scattercarpet/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattercarpet/unselected/_marker.py b/plotly/validators/scattercarpet/unselected/_marker.py index d3cb334186..3347f84f87 100644 --- a/plotly/validators/scattercarpet/unselected/_marker.py +++ b/plotly/validators/scattercarpet/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattercarpet.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/unselected/_textfont.py b/plotly/validators/scattercarpet/unselected/_textfont.py index 6cc481316b..140dd7714c 100644 --- a/plotly/validators/scattercarpet/unselected/_textfont.py +++ b/plotly/validators/scattercarpet/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattercarpet.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattercarpet/unselected/marker/__init__.py b/plotly/validators/scattercarpet/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattercarpet/unselected/marker/__init__.py +++ b/plotly/validators/scattercarpet/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattercarpet/unselected/marker/_color.py b/plotly/validators/scattercarpet/unselected/marker/_color.py index 7c4d37b690..015b686bb0 100644 --- a/plotly/validators/scattercarpet/unselected/marker/_color.py +++ b/plotly/validators/scattercarpet/unselected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.unselected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattercarpet/unselected/marker/_opacity.py b/plotly/validators/scattercarpet/unselected/marker/_opacity.py index ac3a547829..01ec8def4e 100644 --- a/plotly/validators/scattercarpet/unselected/marker/_opacity.py +++ b/plotly/validators/scattercarpet/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattercarpet.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattercarpet/unselected/marker/_size.py b/plotly/validators/scattercarpet/unselected/marker/_size.py index 7cdfb46f46..9db049987a 100644 --- a/plotly/validators/scattercarpet/unselected/marker/_size.py +++ b/plotly/validators/scattercarpet/unselected/marker/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattercarpet.unselected.marker", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattercarpet/unselected/textfont/__init__.py b/plotly/validators/scattercarpet/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattercarpet/unselected/textfont/__init__.py +++ b/plotly/validators/scattercarpet/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattercarpet/unselected/textfont/_color.py b/plotly/validators/scattercarpet/unselected/textfont/_color.py index 5053e14f1d..c30caf3dd3 100644 --- a/plotly/validators/scattercarpet/unselected/textfont/_color.py +++ b/plotly/validators/scattercarpet/unselected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattercarpet.unselected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/__init__.py b/plotly/validators/scattergeo/__init__.py index fd1f0586a2..920b558fa0 100644 --- a/plotly/validators/scattergeo/__init__.py +++ b/plotly/validators/scattergeo/__init__.py @@ -1,115 +1,60 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._lonsrc import LonsrcValidator - from ._lon import LonValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._locationmode import LocationmodeValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._latsrc import LatsrcValidator - from ._lat import LatValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._geojson import GeojsonValidator - from ._geo import GeoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._featureidkey import FeatureidkeyValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._lonsrc.LonsrcValidator", - "._lon.LonValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._locationmode.LocationmodeValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._latsrc.LatsrcValidator", - "._lat.LatValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._geojson.GeojsonValidator", - "._geo.GeoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._featureidkey.FeatureidkeyValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._locationmode.LocationmodeValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._geojson.GeojsonValidator", + "._geo.GeoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._featureidkey.FeatureidkeyValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], +) diff --git a/plotly/validators/scattergeo/_connectgaps.py b/plotly/validators/scattergeo/_connectgaps.py index c0e43ad24c..7b5dff05cb 100644 --- a/plotly/validators/scattergeo/_connectgaps.py +++ b/plotly/validators/scattergeo/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scattergeo", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_customdata.py b/plotly/validators/scattergeo/_customdata.py index 987668b3b4..b384962961 100644 --- a/plotly/validators/scattergeo/_customdata.py +++ b/plotly/validators/scattergeo/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scattergeo", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_customdatasrc.py b/plotly/validators/scattergeo/_customdatasrc.py index 366b856e69..0d67319252 100644 --- a/plotly/validators/scattergeo/_customdatasrc.py +++ b/plotly/validators/scattergeo/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="scattergeo", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_featureidkey.py b/plotly/validators/scattergeo/_featureidkey.py index 285101b46a..ae51b15bf9 100644 --- a/plotly/validators/scattergeo/_featureidkey.py +++ b/plotly/validators/scattergeo/_featureidkey.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FeatureidkeyValidator(_plotly_utils.basevalidators.StringValidator): +class FeatureidkeyValidator(_bv.StringValidator): def __init__(self, plotly_name="featureidkey", parent_name="scattergeo", **kwargs): - super(FeatureidkeyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_fill.py b/plotly/validators/scattergeo/_fill.py index 477a0d953e..fba853c82c 100644 --- a/plotly/validators/scattergeo/_fill.py +++ b/plotly/validators/scattergeo/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scattergeo", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself"]), **kwargs, diff --git a/plotly/validators/scattergeo/_fillcolor.py b/plotly/validators/scattergeo/_fillcolor.py index a17e6188e0..6c91fc348a 100644 --- a/plotly/validators/scattergeo/_fillcolor.py +++ b/plotly/validators/scattergeo/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattergeo", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_geo.py b/plotly/validators/scattergeo/_geo.py index 7dab6184bc..7154e3f4e9 100644 --- a/plotly/validators/scattergeo/_geo.py +++ b/plotly/validators/scattergeo/_geo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeoValidator(_plotly_utils.basevalidators.SubplotidValidator): +class GeoValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="geo", parent_name="scattergeo", **kwargs): - super(GeoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "geo"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/_geojson.py b/plotly/validators/scattergeo/_geojson.py index b4e9705cd6..c442e70f6d 100644 --- a/plotly/validators/scattergeo/_geojson.py +++ b/plotly/validators/scattergeo/_geojson.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GeojsonValidator(_plotly_utils.basevalidators.AnyValidator): +class GeojsonValidator(_bv.AnyValidator): def __init__(self, plotly_name="geojson", parent_name="scattergeo", **kwargs): - super(GeojsonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_hoverinfo.py b/plotly/validators/scattergeo/_hoverinfo.py index be74e724e0..23e4398f30 100644 --- a/plotly/validators/scattergeo/_hoverinfo.py +++ b/plotly/validators/scattergeo/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scattergeo", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scattergeo/_hoverinfosrc.py b/plotly/validators/scattergeo/_hoverinfosrc.py index b2d4022c9d..3ef664c2f4 100644 --- a/plotly/validators/scattergeo/_hoverinfosrc.py +++ b/plotly/validators/scattergeo/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="scattergeo", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_hoverlabel.py b/plotly/validators/scattergeo/_hoverlabel.py index baedba345e..eee5e74ddf 100644 --- a/plotly/validators/scattergeo/_hoverlabel.py +++ b/plotly/validators/scattergeo/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattergeo", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_hovertemplate.py b/plotly/validators/scattergeo/_hovertemplate.py index a82de196e7..00eaabc1eb 100644 --- a/plotly/validators/scattergeo/_hovertemplate.py +++ b/plotly/validators/scattergeo/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="scattergeo", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/_hovertemplatesrc.py b/plotly/validators/scattergeo/_hovertemplatesrc.py index 2ce4f12778..30a3f2b5bb 100644 --- a/plotly/validators/scattergeo/_hovertemplatesrc.py +++ b/plotly/validators/scattergeo/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattergeo", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_hovertext.py b/plotly/validators/scattergeo/_hovertext.py index dd7d14a804..6110e9ef51 100644 --- a/plotly/validators/scattergeo/_hovertext.py +++ b/plotly/validators/scattergeo/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scattergeo", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/_hovertextsrc.py b/plotly/validators/scattergeo/_hovertextsrc.py index d8714f0bb3..16e71b262e 100644 --- a/plotly/validators/scattergeo/_hovertextsrc.py +++ b/plotly/validators/scattergeo/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="scattergeo", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_ids.py b/plotly/validators/scattergeo/_ids.py index fd17b831d6..77504ffa22 100644 --- a/plotly/validators/scattergeo/_ids.py +++ b/plotly/validators/scattergeo/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scattergeo", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_idssrc.py b/plotly/validators/scattergeo/_idssrc.py index 01e9b87c26..875b09733f 100644 --- a/plotly/validators/scattergeo/_idssrc.py +++ b/plotly/validators/scattergeo/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattergeo", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_lat.py b/plotly/validators/scattergeo/_lat.py index 2e1d76e027..9d13d9942b 100644 --- a/plotly/validators/scattergeo/_lat.py +++ b/plotly/validators/scattergeo/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lat", parent_name="scattergeo", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_latsrc.py b/plotly/validators/scattergeo/_latsrc.py index 8c4203afcd..a847767d6e 100644 --- a/plotly/validators/scattergeo/_latsrc.py +++ b/plotly/validators/scattergeo/_latsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="latsrc", parent_name="scattergeo", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_legend.py b/plotly/validators/scattergeo/_legend.py index 797123073a..b2f3bb08af 100644 --- a/plotly/validators/scattergeo/_legend.py +++ b/plotly/validators/scattergeo/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scattergeo", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattergeo/_legendgroup.py b/plotly/validators/scattergeo/_legendgroup.py index 6cf7d52220..5db6d97750 100644 --- a/plotly/validators/scattergeo/_legendgroup.py +++ b/plotly/validators/scattergeo/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scattergeo", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_legendgrouptitle.py b/plotly/validators/scattergeo/_legendgrouptitle.py index b106e0b799..7c127cab35 100644 --- a/plotly/validators/scattergeo/_legendgrouptitle.py +++ b/plotly/validators/scattergeo/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattergeo", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_legendrank.py b/plotly/validators/scattergeo/_legendrank.py index 9557cb7803..beb0c3d3ab 100644 --- a/plotly/validators/scattergeo/_legendrank.py +++ b/plotly/validators/scattergeo/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scattergeo", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_legendwidth.py b/plotly/validators/scattergeo/_legendwidth.py index 5c5c4d003e..c5dfa71dd0 100644 --- a/plotly/validators/scattergeo/_legendwidth.py +++ b/plotly/validators/scattergeo/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scattergeo", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/_line.py b/plotly/validators/scattergeo/_line.py index f820ef78af..1c85935f84 100644 --- a/plotly/validators/scattergeo/_line.py +++ b/plotly/validators/scattergeo/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattergeo", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_locationmode.py b/plotly/validators/scattergeo/_locationmode.py index fce0b83675..1400f95c7c 100644 --- a/plotly/validators/scattergeo/_locationmode.py +++ b/plotly/validators/scattergeo/_locationmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LocationmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="locationmode", parent_name="scattergeo", **kwargs): - super(LocationmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["ISO-3", "USA-states", "country names", "geojson-id"] diff --git a/plotly/validators/scattergeo/_locations.py b/plotly/validators/scattergeo/_locations.py index 36e7b05eb9..dec8a93ec3 100644 --- a/plotly/validators/scattergeo/_locations.py +++ b/plotly/validators/scattergeo/_locations.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="locations", parent_name="scattergeo", **kwargs): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_locationssrc.py b/plotly/validators/scattergeo/_locationssrc.py index 95db52e455..6ad9bd69aa 100644 --- a/plotly/validators/scattergeo/_locationssrc.py +++ b/plotly/validators/scattergeo/_locationssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="locationssrc", parent_name="scattergeo", **kwargs): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_lon.py b/plotly/validators/scattergeo/_lon.py index 32472916de..02d4ae8358 100644 --- a/plotly/validators/scattergeo/_lon.py +++ b/plotly/validators/scattergeo/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LonValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lon", parent_name="scattergeo", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_lonsrc.py b/plotly/validators/scattergeo/_lonsrc.py index c6ac8c5490..e0e5bf6d33 100644 --- a/plotly/validators/scattergeo/_lonsrc.py +++ b/plotly/validators/scattergeo/_lonsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LonsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lonsrc", parent_name="scattergeo", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_marker.py b/plotly/validators/scattergeo/_marker.py index 099726f979..2eb408798b 100644 --- a/plotly/validators/scattergeo/_marker.py +++ b/plotly/validators/scattergeo/_marker.py @@ -1,164 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattergeo", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - With "north", angle 0 points north based on the - current map projection. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergeo.marker. - ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scattergeo.marker. - Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattergeo.marker. - Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_meta.py b/plotly/validators/scattergeo/_meta.py index 01d11c35d7..965b7df930 100644 --- a/plotly/validators/scattergeo/_meta.py +++ b/plotly/validators/scattergeo/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattergeo", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattergeo/_metasrc.py b/plotly/validators/scattergeo/_metasrc.py index d192d8f267..2472bb8d97 100644 --- a/plotly/validators/scattergeo/_metasrc.py +++ b/plotly/validators/scattergeo/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattergeo", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_mode.py b/plotly/validators/scattergeo/_mode.py index 5a68eb3363..e14595e4ea 100644 --- a/plotly/validators/scattergeo/_mode.py +++ b/plotly/validators/scattergeo/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scattergeo", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scattergeo/_name.py b/plotly/validators/scattergeo/_name.py index 1a0640d841..c6bb8969f6 100644 --- a/plotly/validators/scattergeo/_name.py +++ b/plotly/validators/scattergeo/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scattergeo", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_opacity.py b/plotly/validators/scattergeo/_opacity.py index 2b21869bdb..5e13231732 100644 --- a/plotly/validators/scattergeo/_opacity.py +++ b/plotly/validators/scattergeo/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattergeo", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/_selected.py b/plotly/validators/scattergeo/_selected.py index e29d965717..c6f685c7b8 100644 --- a/plotly/validators/scattergeo/_selected.py +++ b/plotly/validators/scattergeo/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattergeo", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattergeo.selecte - d.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.selecte - d.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_selectedpoints.py b/plotly/validators/scattergeo/_selectedpoints.py index e74d6348cd..d398e0e447 100644 --- a/plotly/validators/scattergeo/_selectedpoints.py +++ b/plotly/validators/scattergeo/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scattergeo", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_showlegend.py b/plotly/validators/scattergeo/_showlegend.py index 03f7d79902..c523138e32 100644 --- a/plotly/validators/scattergeo/_showlegend.py +++ b/plotly/validators/scattergeo/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scattergeo", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_stream.py b/plotly/validators/scattergeo/_stream.py index 676215c7ed..99d126f785 100644 --- a/plotly/validators/scattergeo/_stream.py +++ b/plotly/validators/scattergeo/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattergeo", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_text.py b/plotly/validators/scattergeo/_text.py index 347d5bd236..5730967405 100644 --- a/plotly/validators/scattergeo/_text.py +++ b/plotly/validators/scattergeo/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scattergeo", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/_textfont.py b/plotly/validators/scattergeo/_textfont.py index 2a211359b8..633114a97c 100644 --- a/plotly/validators/scattergeo/_textfont.py +++ b/plotly/validators/scattergeo/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattergeo", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_textposition.py b/plotly/validators/scattergeo/_textposition.py index 2658b4e53e..ef518c255c 100644 --- a/plotly/validators/scattergeo/_textposition.py +++ b/plotly/validators/scattergeo/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="scattergeo", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattergeo/_textpositionsrc.py b/plotly/validators/scattergeo/_textpositionsrc.py index 7404f1c3ef..7311904515 100644 --- a/plotly/validators/scattergeo/_textpositionsrc.py +++ b/plotly/validators/scattergeo/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scattergeo", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_textsrc.py b/plotly/validators/scattergeo/_textsrc.py index 5621e1cd2e..ec242d01c8 100644 --- a/plotly/validators/scattergeo/_textsrc.py +++ b/plotly/validators/scattergeo/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattergeo", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_texttemplate.py b/plotly/validators/scattergeo/_texttemplate.py index e38dbc3de2..a12073378e 100644 --- a/plotly/validators/scattergeo/_texttemplate.py +++ b/plotly/validators/scattergeo/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="scattergeo", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/_texttemplatesrc.py b/plotly/validators/scattergeo/_texttemplatesrc.py index f31311935a..e80709db30 100644 --- a/plotly/validators/scattergeo/_texttemplatesrc.py +++ b/plotly/validators/scattergeo/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scattergeo", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_uid.py b/plotly/validators/scattergeo/_uid.py index de1ce3fd39..7d1f71d442 100644 --- a/plotly/validators/scattergeo/_uid.py +++ b/plotly/validators/scattergeo/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattergeo", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_uirevision.py b/plotly/validators/scattergeo/_uirevision.py index b96df6e52d..2f87eceec1 100644 --- a/plotly/validators/scattergeo/_uirevision.py +++ b/plotly/validators/scattergeo/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattergeo", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/_unselected.py b/plotly/validators/scattergeo/_unselected.py index 7f50cec248..e026e7ffc7 100644 --- a/plotly/validators/scattergeo/_unselected.py +++ b/plotly/validators/scattergeo/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattergeo", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattergeo.unselec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergeo.unselec - ted.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattergeo/_visible.py b/plotly/validators/scattergeo/_visible.py index d8ab0ebb17..957e3bf156 100644 --- a/plotly/validators/scattergeo/_visible.py +++ b/plotly/validators/scattergeo/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattergeo", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scattergeo/hoverlabel/__init__.py b/plotly/validators/scattergeo/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scattergeo/hoverlabel/__init__.py +++ b/plotly/validators/scattergeo/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scattergeo/hoverlabel/_align.py b/plotly/validators/scattergeo/hoverlabel/_align.py index 1f357e5487..74173a2e96 100644 --- a/plotly/validators/scattergeo/hoverlabel/_align.py +++ b/plotly/validators/scattergeo/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scattergeo.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scattergeo/hoverlabel/_alignsrc.py b/plotly/validators/scattergeo/hoverlabel/_alignsrc.py index 2efe0fc6dc..0e8dcbd417 100644 --- a/plotly/validators/scattergeo/hoverlabel/_alignsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattergeo.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/_bgcolor.py b/plotly/validators/scattergeo/hoverlabel/_bgcolor.py index 5fb6f19a4b..9b80c1fc42 100644 --- a/plotly/validators/scattergeo/hoverlabel/_bgcolor.py +++ b/plotly/validators/scattergeo/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattergeo.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py b/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py index 9d3cb4d62e..4d40ebc990 100644 --- a/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattergeo.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/_bordercolor.py b/plotly/validators/scattergeo/hoverlabel/_bordercolor.py index f61ad982fb..a93fbd3437 100644 --- a/plotly/validators/scattergeo/hoverlabel/_bordercolor.py +++ b/plotly/validators/scattergeo/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattergeo.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py b/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py index 5f52ba12ea..46bd5892f8 100644 --- a/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattergeo.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/_font.py b/plotly/validators/scattergeo/hoverlabel/_font.py index 17a3a00b5e..871b86fc5c 100644 --- a/plotly/validators/scattergeo/hoverlabel/_font.py +++ b/plotly/validators/scattergeo/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattergeo.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/hoverlabel/_namelength.py b/plotly/validators/scattergeo/hoverlabel/_namelength.py index 3568b4bfd8..c073c58020 100644 --- a/plotly/validators/scattergeo/hoverlabel/_namelength.py +++ b/plotly/validators/scattergeo/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattergeo.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py b/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py index e8ba385033..9bd9ffc2c6 100644 --- a/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scattergeo.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/__init__.py b/plotly/validators/scattergeo/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/__init__.py +++ b/plotly/validators/scattergeo/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_color.py b/plotly/validators/scattergeo/hoverlabel/font/_color.py index 865c8a3b52..4ef2b44022 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_color.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py b/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py index 9f4b61ec13..37a93e9a82 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_family.py b/plotly/validators/scattergeo/hoverlabel/font/_family.py index dca9574c24..3d4e488eac 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_family.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py b/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py index 6432ab515d..8b2901f6d9 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_lineposition.py b/plotly/validators/scattergeo/hoverlabel/font/_lineposition.py index 08a7544db1..f456894977 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattergeo/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scattergeo/hoverlabel/font/_linepositionsrc.py index 893b858bbd..9e61eb6679 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_shadow.py b/plotly/validators/scattergeo/hoverlabel/font/_shadow.py index 592cfb8128..4613d40766 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_shadow.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergeo/hoverlabel/font/_shadowsrc.py b/plotly/validators/scattergeo/hoverlabel/font/_shadowsrc.py index 685bcc5e5e..b528fc6c1e 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_size.py b/plotly/validators/scattergeo/hoverlabel/font/_size.py index 047977a1d7..a9d617867c 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_size.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py b/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py index 746b0e923d..9b4ac84f22 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_style.py b/plotly/validators/scattergeo/hoverlabel/font/_style.py index fb4bf5589c..9cba9aa4a4 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_style.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattergeo/hoverlabel/font/_stylesrc.py b/plotly/validators/scattergeo/hoverlabel/font/_stylesrc.py index 30a5242186..b8bc3d01f0 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_textcase.py b/plotly/validators/scattergeo/hoverlabel/font/_textcase.py index f46dcd091a..6fdb256dd3 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_textcase.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattergeo/hoverlabel/font/_textcasesrc.py b/plotly/validators/scattergeo/hoverlabel/font/_textcasesrc.py index 5aebd510dd..87e2bfddb9 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_variant.py b/plotly/validators/scattergeo/hoverlabel/font/_variant.py index 5d6f287fd0..325f8c0999 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_variant.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scattergeo/hoverlabel/font/_variantsrc.py b/plotly/validators/scattergeo/hoverlabel/font/_variantsrc.py index 58069c2454..60c69948c1 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/hoverlabel/font/_weight.py b/plotly/validators/scattergeo/hoverlabel/font/_weight.py index c98e65e0f1..dc737b6c6b 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_weight.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergeo.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattergeo/hoverlabel/font/_weightsrc.py b/plotly/validators/scattergeo/hoverlabel/font/_weightsrc.py index d4b422fe43..100f080c92 100644 --- a/plotly/validators/scattergeo/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scattergeo/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattergeo.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/legendgrouptitle/__init__.py b/plotly/validators/scattergeo/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/__init__.py +++ b/plotly/validators/scattergeo/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scattergeo/legendgrouptitle/_font.py b/plotly/validators/scattergeo/legendgrouptitle/_font.py index cf5af5ded5..5ad2c2778a 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/_font.py +++ b/plotly/validators/scattergeo/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattergeo.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/legendgrouptitle/_text.py b/plotly/validators/scattergeo/legendgrouptitle/_text.py index 205e8f7f39..e88642eeaf 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/_text.py +++ b/plotly/validators/scattergeo/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergeo.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/__init__.py b/plotly/validators/scattergeo/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_color.py b/plotly/validators/scattergeo/legendgrouptitle/font/_color.py index 2a5cacd593..ca42c158ea 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_color.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_family.py b/plotly/validators/scattergeo/legendgrouptitle/font/_family.py index 85adebfb28..a12529e2b7 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_family.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_lineposition.py b/plotly/validators/scattergeo/legendgrouptitle/font/_lineposition.py index bea3dba47c..1974db9600 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_shadow.py b/plotly/validators/scattergeo/legendgrouptitle/font/_shadow.py index 1373d48557..6fdfac24f5 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_size.py b/plotly/validators/scattergeo/legendgrouptitle/font/_size.py index 30df6561cb..cb0b76aecd 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_size.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_style.py b/plotly/validators/scattergeo/legendgrouptitle/font/_style.py index aa64318af2..481ba93aeb 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_style.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_textcase.py b/plotly/validators/scattergeo/legendgrouptitle/font/_textcase.py index 44d71906a5..2fcf874d6f 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_variant.py b/plotly/validators/scattergeo/legendgrouptitle/font/_variant.py index eb15ca13a7..395e59e156 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergeo/legendgrouptitle/font/_weight.py b/plotly/validators/scattergeo/legendgrouptitle/font/_weight.py index c5c20d9056..1e123ac144 100644 --- a/plotly/validators/scattergeo/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scattergeo/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergeo.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattergeo/line/__init__.py b/plotly/validators/scattergeo/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/scattergeo/line/__init__.py +++ b/plotly/validators/scattergeo/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattergeo/line/_color.py b/plotly/validators/scattergeo/line/_color.py index ef2f6ece50..0700219906 100644 --- a/plotly/validators/scattergeo/line/_color.py +++ b/plotly/validators/scattergeo/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergeo.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/line/_dash.py b/plotly/validators/scattergeo/line/_dash.py index 19e0141147..81426d93ed 100644 --- a/plotly/validators/scattergeo/line/_dash.py +++ b/plotly/validators/scattergeo/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="scattergeo.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/scattergeo/line/_width.py b/plotly/validators/scattergeo/line/_width.py index 67016792b0..e23f44c68e 100644 --- a/plotly/validators/scattergeo/line/_width.py +++ b/plotly/validators/scattergeo/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattergeo.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/__init__.py b/plotly/validators/scattergeo/marker/__init__.py index 48545a32a3..3db73a0afd 100644 --- a/plotly/validators/scattergeo/marker/__init__.py +++ b/plotly/validators/scattergeo/marker/__init__.py @@ -1,69 +1,37 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._standoffsrc import StandoffsrcValidator - from ._standoff import StandoffValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._gradient import GradientValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angleref import AnglerefValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._standoffsrc.StandoffsrcValidator", - "._standoff.StandoffValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._gradient.GradientValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angleref.AnglerefValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._standoffsrc.StandoffsrcValidator", + "._standoff.StandoffValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angleref.AnglerefValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/_angle.py b/plotly/validators/scattergeo/marker/_angle.py index 41e354fa56..1c7ea58d7e 100644 --- a/plotly/validators/scattergeo/marker/_angle.py +++ b/plotly/validators/scattergeo/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__(self, plotly_name="angle", parent_name="scattergeo.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_angleref.py b/plotly/validators/scattergeo/marker/_angleref.py index a92ef988e8..b3f3b2a92c 100644 --- a/plotly/validators/scattergeo/marker/_angleref.py +++ b/plotly/validators/scattergeo/marker/_angleref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnglerefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="angleref", parent_name="scattergeo.marker", **kwargs ): - super(AnglerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["previous", "up", "north"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_anglesrc.py b/plotly/validators/scattergeo/marker/_anglesrc.py index acc8a395e4..392aef4cb0 100644 --- a/plotly/validators/scattergeo/marker/_anglesrc.py +++ b/plotly/validators/scattergeo/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scattergeo.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_autocolorscale.py b/plotly/validators/scattergeo/marker/_autocolorscale.py index 31c823bf23..9705fd5a40 100644 --- a/plotly/validators/scattergeo/marker/_autocolorscale.py +++ b/plotly/validators/scattergeo/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattergeo.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_cauto.py b/plotly/validators/scattergeo/marker/_cauto.py index 5c0cfa5816..bec13579a0 100644 --- a/plotly/validators/scattergeo/marker/_cauto.py +++ b/plotly/validators/scattergeo/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="scattergeo.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_cmax.py b/plotly/validators/scattergeo/marker/_cmax.py index 5c67557638..ee7fabc7c8 100644 --- a/plotly/validators/scattergeo/marker/_cmax.py +++ b/plotly/validators/scattergeo/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scattergeo.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_cmid.py b/plotly/validators/scattergeo/marker/_cmid.py index 489b30b6c0..d78d7072ad 100644 --- a/plotly/validators/scattergeo/marker/_cmid.py +++ b/plotly/validators/scattergeo/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scattergeo.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_cmin.py b/plotly/validators/scattergeo/marker/_cmin.py index 26153b34e6..4a5e9fc740 100644 --- a/plotly/validators/scattergeo/marker/_cmin.py +++ b/plotly/validators/scattergeo/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scattergeo.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_color.py b/plotly/validators/scattergeo/marker/_color.py index 69ff579108..ed75925b25 100644 --- a/plotly/validators/scattergeo/marker/_color.py +++ b/plotly/validators/scattergeo/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergeo.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattergeo/marker/_coloraxis.py b/plotly/validators/scattergeo/marker/_coloraxis.py index cb110116e5..afe4f21e76 100644 --- a/plotly/validators/scattergeo/marker/_coloraxis.py +++ b/plotly/validators/scattergeo/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattergeo.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattergeo/marker/_colorbar.py b/plotly/validators/scattergeo/marker/_colorbar.py index 2911383b4e..cede4e25e3 100644 --- a/plotly/validators/scattergeo/marker/_colorbar.py +++ b/plotly/validators/scattergeo/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scattergeo.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - geo.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergeo.marker.colorbar.tickformatstopdefa - ults), sets the default property values to use - for elements of - scattergeo.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergeo.marker. - colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_colorscale.py b/plotly/validators/scattergeo/marker/_colorscale.py index 349b6f7c31..cdca4d0147 100644 --- a/plotly/validators/scattergeo/marker/_colorscale.py +++ b/plotly/validators/scattergeo/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattergeo.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_colorsrc.py b/plotly/validators/scattergeo/marker/_colorsrc.py index 1edf5b8dee..15a17ee2a6 100644 --- a/plotly/validators/scattergeo/marker/_colorsrc.py +++ b/plotly/validators/scattergeo/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergeo.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_gradient.py b/plotly/validators/scattergeo/marker/_gradient.py index 570e6cca8f..8e168dac52 100644 --- a/plotly/validators/scattergeo/marker/_gradient.py +++ b/plotly/validators/scattergeo/marker/_gradient.py @@ -1,30 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class GradientValidator(_bv.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scattergeo.marker", **kwargs ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gradient"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_line.py b/plotly/validators/scattergeo/marker/_line.py index 5e91543e30..2c44f457d7 100644 --- a/plotly/validators/scattergeo/marker/_line.py +++ b/plotly/validators/scattergeo/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattergeo.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_opacity.py b/plotly/validators/scattergeo/marker/_opacity.py index 06fe12c54a..52963047fd 100644 --- a/plotly/validators/scattergeo/marker/_opacity.py +++ b/plotly/validators/scattergeo/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattergeo.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattergeo/marker/_opacitysrc.py b/plotly/validators/scattergeo/marker/_opacitysrc.py index d497a11023..5ea089a936 100644 --- a/plotly/validators/scattergeo/marker/_opacitysrc.py +++ b/plotly/validators/scattergeo/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattergeo.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_reversescale.py b/plotly/validators/scattergeo/marker/_reversescale.py index 6eea92e3b6..8d57482446 100644 --- a/plotly/validators/scattergeo/marker/_reversescale.py +++ b/plotly/validators/scattergeo/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattergeo.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_showscale.py b/plotly/validators/scattergeo/marker/_showscale.py index 744f564e14..35737874a8 100644 --- a/plotly/validators/scattergeo/marker/_showscale.py +++ b/plotly/validators/scattergeo/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattergeo.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_size.py b/plotly/validators/scattergeo/marker/_size.py index 11d86d8926..ff780de440 100644 --- a/plotly/validators/scattergeo/marker/_size.py +++ b/plotly/validators/scattergeo/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattergeo.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/marker/_sizemin.py b/plotly/validators/scattergeo/marker/_sizemin.py index 6750f3c315..b15cd54c12 100644 --- a/plotly/validators/scattergeo/marker/_sizemin.py +++ b/plotly/validators/scattergeo/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scattergeo.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_sizemode.py b/plotly/validators/scattergeo/marker/_sizemode.py index 55e10e10ac..8ca5696004 100644 --- a/plotly/validators/scattergeo/marker/_sizemode.py +++ b/plotly/validators/scattergeo/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattergeo.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/_sizeref.py b/plotly/validators/scattergeo/marker/_sizeref.py index 9d40a1574c..2d50adb621 100644 --- a/plotly/validators/scattergeo/marker/_sizeref.py +++ b/plotly/validators/scattergeo/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scattergeo.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_sizesrc.py b/plotly/validators/scattergeo/marker/_sizesrc.py index b1a2f8ae52..1fe58823f0 100644 --- a/plotly/validators/scattergeo/marker/_sizesrc.py +++ b/plotly/validators/scattergeo/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattergeo.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_standoff.py b/plotly/validators/scattergeo/marker/_standoff.py index 41d5310068..3b27d0d779 100644 --- a/plotly/validators/scattergeo/marker/_standoff.py +++ b/plotly/validators/scattergeo/marker/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="scattergeo.marker", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/marker/_standoffsrc.py b/plotly/validators/scattergeo/marker/_standoffsrc.py index c9f8a8e3e0..06df3ca568 100644 --- a/plotly/validators/scattergeo/marker/_standoffsrc.py +++ b/plotly/validators/scattergeo/marker/_standoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StandoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="standoffsrc", parent_name="scattergeo.marker", **kwargs ): - super(StandoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/_symbol.py b/plotly/validators/scattergeo/marker/_symbol.py index 39e6e99eb0..388f349153 100644 --- a/plotly/validators/scattergeo/marker/_symbol.py +++ b/plotly/validators/scattergeo/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="scattergeo.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattergeo/marker/_symbolsrc.py b/plotly/validators/scattergeo/marker/_symbolsrc.py index e3c73ef93b..9504954def 100644 --- a/plotly/validators/scattergeo/marker/_symbolsrc.py +++ b/plotly/validators/scattergeo/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattergeo.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/__init__.py b/plotly/validators/scattergeo/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scattergeo/marker/colorbar/__init__.py +++ b/plotly/validators/scattergeo/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py b/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py index 542dab5a15..482e4c4952 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scattergeo/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py b/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py index f5f5e89df6..bd5e603571 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scattergeo/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py b/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py index 3ad242f0dd..2a826246cf 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scattergeo/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_dtick.py b/plotly/validators/scattergeo/marker/colorbar/_dtick.py index 0b815c4e5c..61e48eed60 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_dtick.py +++ b/plotly/validators/scattergeo/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py b/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py index 34ccf9c354..5a5bdc9eba 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scattergeo/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_labelalias.py b/plotly/validators/scattergeo/marker/colorbar/_labelalias.py index 91c6d0ca44..44b64b4f27 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_labelalias.py +++ b/plotly/validators/scattergeo/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_len.py b/plotly/validators/scattergeo/marker/colorbar/_len.py index 510e4ea6c3..2dc185a81d 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_len.py +++ b/plotly/validators/scattergeo/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_lenmode.py b/plotly/validators/scattergeo/marker/colorbar/_lenmode.py index becfdef4f4..ffaee714f1 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_lenmode.py +++ b/plotly/validators/scattergeo/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_minexponent.py b/plotly/validators/scattergeo/marker/colorbar/_minexponent.py index 1a6fab28ea..9adddd2200 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_minexponent.py +++ b/plotly/validators/scattergeo/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_nticks.py b/plotly/validators/scattergeo/marker/colorbar/_nticks.py index 2adc3e3c3a..c22bb1bb70 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_nticks.py +++ b/plotly/validators/scattergeo/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_orientation.py b/plotly/validators/scattergeo/marker/colorbar/_orientation.py index 81d6a01ed3..cae96ec3ff 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_orientation.py +++ b/plotly/validators/scattergeo/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py b/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py index 60fbda3250..cbe75eab33 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scattergeo/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py b/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py index 843bd102cc..d2ca66da0f 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scattergeo/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py b/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py index 3fb93ddea5..0aa90d496b 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scattergeo/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_showexponent.py b/plotly/validators/scattergeo/marker/colorbar/_showexponent.py index 5e26f90e50..e7e2f09271 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_showexponent.py +++ b/plotly/validators/scattergeo/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py b/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py index 923b5b5dcb..3461931991 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scattergeo/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py b/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py index a608eb4cf8..62568fbae3 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scattergeo/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py b/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py index 9cc80fbe78..584663b660 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scattergeo/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_thickness.py b/plotly/validators/scattergeo/marker/colorbar/_thickness.py index 45162e5711..8ef28e63b5 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_thickness.py +++ b/plotly/validators/scattergeo/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py b/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py index 4a388281b5..189b0b68fb 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scattergeo/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_tick0.py b/plotly/validators/scattergeo/marker/colorbar/_tick0.py index 289a703440..7134ee5085 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tick0.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickangle.py b/plotly/validators/scattergeo/marker/colorbar/_tickangle.py index b3d94ae0ce..661fa709bb 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickangle.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py b/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py index 3ab9ac35be..569a71991d 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickfont.py b/plotly/validators/scattergeo/marker/colorbar/_tickfont.py index 0c94c6b4b8..b380a62eb1 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickfont.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickformat.py b/plotly/validators/scattergeo/marker/colorbar/_tickformat.py index 0be2aa15b8..74931b65e7 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickformat.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py index 9bb452dc6f..4cb647ac9d 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py b/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py index 6743065713..2598aba0a2 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scattergeo/marker/colorbar/_ticklabeloverflow.py index 34f86220f8..73b032a8ae 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticklabelposition.py b/plotly/validators/scattergeo/marker/colorbar/_ticklabelposition.py index 5e17d47df7..bb91e64703 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticklabelstep.py b/plotly/validators/scattergeo/marker/colorbar/_ticklabelstep.py index 90546541cf..ea067086fa 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticklen.py b/plotly/validators/scattergeo/marker/colorbar/_ticklen.py index a4fadf9e42..235e3cabaf 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticklen.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickmode.py b/plotly/validators/scattergeo/marker/colorbar/_tickmode.py index 89714dbfdc..4635838f33 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickmode.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py b/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py index f94ac797d5..2517a0bc3e 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticks.py b/plotly/validators/scattergeo/marker/colorbar/_ticks.py index 2738cdbbf9..d57ed26a72 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticks.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py b/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py index eea82deeeb..fd02052ef6 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticktext.py b/plotly/validators/scattergeo/marker/colorbar/_ticktext.py index 66a7daa9be..afa48ab0ea 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticktext.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py b/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py index bf142a9902..c61c920b66 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickvals.py b/plotly/validators/scattergeo/marker/colorbar/_tickvals.py index 8cda6cdca3..bbd95907de 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickvals.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py b/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py index 9e539576cd..ba2c1d1ef6 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py b/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py index c7a9da8457..8b20fa29df 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scattergeo/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scattergeo.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_title.py b/plotly/validators/scattergeo/marker/colorbar/_title.py index c0c8aa7930..f365272f2f 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_title.py +++ b/plotly/validators/scattergeo/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_x.py b/plotly/validators/scattergeo/marker/colorbar/_x.py index 1455eb2ba1..1028c1809c 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_x.py +++ b/plotly/validators/scattergeo/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_xanchor.py b/plotly/validators/scattergeo/marker/colorbar/_xanchor.py index c307ddc6b7..00aeecbeaa 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_xanchor.py +++ b/plotly/validators/scattergeo/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_xpad.py b/plotly/validators/scattergeo/marker/colorbar/_xpad.py index a1c3586491..e6822b7c5a 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_xpad.py +++ b/plotly/validators/scattergeo/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_xref.py b/plotly/validators/scattergeo/marker/colorbar/_xref.py index 4083c0a82d..5533fd3df5 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_xref.py +++ b/plotly/validators/scattergeo/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_y.py b/plotly/validators/scattergeo/marker/colorbar/_y.py index 58d8c255ea..b337316fe9 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_y.py +++ b/plotly/validators/scattergeo/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/_yanchor.py b/plotly/validators/scattergeo/marker/colorbar/_yanchor.py index f032952444..9f029a9c61 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_yanchor.py +++ b/plotly/validators/scattergeo/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_ypad.py b/plotly/validators/scattergeo/marker/colorbar/_ypad.py index cdb9138895..0cb445160d 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_ypad.py +++ b/plotly/validators/scattergeo/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/_yref.py b/plotly/validators/scattergeo/marker/colorbar/_yref.py index 9700dda52b..dd7ae8c597 100644 --- a/plotly/validators/scattergeo/marker/colorbar/_yref.py +++ b/plotly/validators/scattergeo/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scattergeo.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py index cfbcf0432d..4c71444a99 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py index d117c3be72..f746aa5ed3 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_lineposition.py index 096059b890..e427a9f787 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_shadow.py index 724f84d1e7..60c2227f7c 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py index 5038fc69b9..5db6a775c8 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_style.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_style.py index 6249934b3f..1507028100 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_textcase.py index 93ae5498f6..794db9a781 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_variant.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_variant.py index 61823b398b..69d264ff45 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergeo/marker/colorbar/tickfont/_weight.py b/plotly/validators/scattergeo/marker/colorbar/tickfont/_weight.py index c7fab9d6ee..8e5fc8890d 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergeo.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py index f8fc7db8a2..ae34cfdf33 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattergeo.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py index c28d95d14a..aac760785f 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattergeo.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py index 2adabbf99e..4c7ad9f0e4 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scattergeo.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py index 6b840af6c7..8bf18404d7 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scattergeo.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py index f7a9e6442b..e5f64f4404 100644 --- a/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scattergeo/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scattergeo.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/title/__init__.py b/plotly/validators/scattergeo/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/__init__.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scattergeo/marker/colorbar/title/_font.py b/plotly/validators/scattergeo/marker/colorbar/title/_font.py index 268bc8171b..2cbfefebf4 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/_font.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattergeo.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/title/_side.py b/plotly/validators/scattergeo/marker/colorbar/title/_side.py index eafe0f4b2e..9c9486888e 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/_side.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattergeo.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/title/_text.py b/plotly/validators/scattergeo/marker/colorbar/title/_text.py index cddf13572d..6332bb61b9 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/_text.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergeo.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py b/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py index 43d8e2bb28..ef27c9d13e 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py index 501e4872ed..ac9204feb0 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_lineposition.py index 6d69755184..0910866579 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_shadow.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_shadow.py index 958aad8b8e..c566407887 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py index 282efc7c15..10ad947767 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_style.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_style.py index 0649c61012..f83cd4a874 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_textcase.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_textcase.py index 5306e1b6b7..86215dc75f 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_variant.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_variant.py index a9b5a72a91..30bf93013d 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergeo/marker/colorbar/title/font/_weight.py b/plotly/validators/scattergeo/marker/colorbar/title/font/_weight.py index cd304761a9..408a3fb19b 100644 --- a/plotly/validators/scattergeo/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scattergeo/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergeo.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattergeo/marker/gradient/__init__.py b/plotly/validators/scattergeo/marker/gradient/__init__.py index 624a280ea4..f5373e7822 100644 --- a/plotly/validators/scattergeo/marker/gradient/__init__.py +++ b/plotly/validators/scattergeo/marker/gradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._typesrc import TypesrcValidator - from ._type import TypeValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._typesrc.TypesrcValidator", - "._type.TypeValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/gradient/_color.py b/plotly/validators/scattergeo/marker/gradient/_color.py index d3b066ba0d..79c04ad948 100644 --- a/plotly/validators/scattergeo/marker/gradient/_color.py +++ b/plotly/validators/scattergeo/marker/gradient/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.marker.gradient", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/marker/gradient/_colorsrc.py b/plotly/validators/scattergeo/marker/gradient/_colorsrc.py index 9aba8d168e..cc39637c13 100644 --- a/plotly/validators/scattergeo/marker/gradient/_colorsrc.py +++ b/plotly/validators/scattergeo/marker/gradient/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergeo.marker.gradient", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/gradient/_type.py b/plotly/validators/scattergeo/marker/gradient/_type.py index 949b5d51ed..d659241f42 100644 --- a/plotly/validators/scattergeo/marker/gradient/_type.py +++ b/plotly/validators/scattergeo/marker/gradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scattergeo.marker.gradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), diff --git a/plotly/validators/scattergeo/marker/gradient/_typesrc.py b/plotly/validators/scattergeo/marker/gradient/_typesrc.py index 0f861dea55..616265e1d2 100644 --- a/plotly/validators/scattergeo/marker/gradient/_typesrc.py +++ b/plotly/validators/scattergeo/marker/gradient/_typesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TypesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scattergeo.marker.gradient", **kwargs ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/line/__init__.py b/plotly/validators/scattergeo/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scattergeo/marker/line/__init__.py +++ b/plotly/validators/scattergeo/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scattergeo/marker/line/_autocolorscale.py b/plotly/validators/scattergeo/marker/line/_autocolorscale.py index 720169fdaa..9a6ff2d05f 100644 --- a/plotly/validators/scattergeo/marker/line/_autocolorscale.py +++ b/plotly/validators/scattergeo/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattergeo.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/line/_cauto.py b/plotly/validators/scattergeo/marker/line/_cauto.py index 4721e6126d..784e15adc2 100644 --- a/plotly/validators/scattergeo/marker/line/_cauto.py +++ b/plotly/validators/scattergeo/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattergeo.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/line/_cmax.py b/plotly/validators/scattergeo/marker/line/_cmax.py index 8850ff110c..8d94900736 100644 --- a/plotly/validators/scattergeo/marker/line/_cmax.py +++ b/plotly/validators/scattergeo/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattergeo.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/line/_cmid.py b/plotly/validators/scattergeo/marker/line/_cmid.py index 8e8abc502d..6b8830f330 100644 --- a/plotly/validators/scattergeo/marker/line/_cmid.py +++ b/plotly/validators/scattergeo/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattergeo.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/line/_cmin.py b/plotly/validators/scattergeo/marker/line/_cmin.py index 5f101408b3..77caa2e540 100644 --- a/plotly/validators/scattergeo/marker/line/_cmin.py +++ b/plotly/validators/scattergeo/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scattergeo.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/line/_color.py b/plotly/validators/scattergeo/marker/line/_color.py index 88432183cc..e2980cf535 100644 --- a/plotly/validators/scattergeo/marker/line/_color.py +++ b/plotly/validators/scattergeo/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattergeo/marker/line/_coloraxis.py b/plotly/validators/scattergeo/marker/line/_coloraxis.py index 970ccb54eb..9fab20cc77 100644 --- a/plotly/validators/scattergeo/marker/line/_coloraxis.py +++ b/plotly/validators/scattergeo/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattergeo.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattergeo/marker/line/_colorscale.py b/plotly/validators/scattergeo/marker/line/_colorscale.py index dd35de5093..7fd544d8a7 100644 --- a/plotly/validators/scattergeo/marker/line/_colorscale.py +++ b/plotly/validators/scattergeo/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattergeo.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattergeo/marker/line/_colorsrc.py b/plotly/validators/scattergeo/marker/line/_colorsrc.py index 4938686eb7..fe10441534 100644 --- a/plotly/validators/scattergeo/marker/line/_colorsrc.py +++ b/plotly/validators/scattergeo/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergeo.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/line/_reversescale.py b/plotly/validators/scattergeo/marker/line/_reversescale.py index b03a417352..46a29a9f80 100644 --- a/plotly/validators/scattergeo/marker/line/_reversescale.py +++ b/plotly/validators/scattergeo/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattergeo.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/marker/line/_width.py b/plotly/validators/scattergeo/marker/line/_width.py index bd3b464df3..c1c0cbf557 100644 --- a/plotly/validators/scattergeo/marker/line/_width.py +++ b/plotly/validators/scattergeo/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scattergeo.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/marker/line/_widthsrc.py b/plotly/validators/scattergeo/marker/line/_widthsrc.py index a220ccac4f..3f16c04666 100644 --- a/plotly/validators/scattergeo/marker/line/_widthsrc.py +++ b/plotly/validators/scattergeo/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scattergeo.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/selected/__init__.py b/plotly/validators/scattergeo/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattergeo/selected/__init__.py +++ b/plotly/validators/scattergeo/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattergeo/selected/_marker.py b/plotly/validators/scattergeo/selected/_marker.py index de2a5a84a5..d73153ac64 100644 --- a/plotly/validators/scattergeo/selected/_marker.py +++ b/plotly/validators/scattergeo/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattergeo.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/selected/_textfont.py b/plotly/validators/scattergeo/selected/_textfont.py index 277e71fb0d..d5d57ccaa8 100644 --- a/plotly/validators/scattergeo/selected/_textfont.py +++ b/plotly/validators/scattergeo/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattergeo.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/selected/marker/__init__.py b/plotly/validators/scattergeo/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattergeo/selected/marker/__init__.py +++ b/plotly/validators/scattergeo/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattergeo/selected/marker/_color.py b/plotly/validators/scattergeo/selected/marker/_color.py index 2245425c1f..b5acfc5a0a 100644 --- a/plotly/validators/scattergeo/selected/marker/_color.py +++ b/plotly/validators/scattergeo/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/selected/marker/_opacity.py b/plotly/validators/scattergeo/selected/marker/_opacity.py index 9efef74d5b..9067b80acb 100644 --- a/plotly/validators/scattergeo/selected/marker/_opacity.py +++ b/plotly/validators/scattergeo/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattergeo.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/selected/marker/_size.py b/plotly/validators/scattergeo/selected/marker/_size.py index 3ff7ba82e9..c268ffa803 100644 --- a/plotly/validators/scattergeo/selected/marker/_size.py +++ b/plotly/validators/scattergeo/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergeo.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/selected/textfont/__init__.py b/plotly/validators/scattergeo/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattergeo/selected/textfont/__init__.py +++ b/plotly/validators/scattergeo/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattergeo/selected/textfont/_color.py b/plotly/validators/scattergeo/selected/textfont/_color.py index c2b99145aa..ae2ee6c5a7 100644 --- a/plotly/validators/scattergeo/selected/textfont/_color.py +++ b/plotly/validators/scattergeo/selected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.selected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/stream/__init__.py b/plotly/validators/scattergeo/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scattergeo/stream/__init__.py +++ b/plotly/validators/scattergeo/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scattergeo/stream/_maxpoints.py b/plotly/validators/scattergeo/stream/_maxpoints.py index cf37036b80..21b6875754 100644 --- a/plotly/validators/scattergeo/stream/_maxpoints.py +++ b/plotly/validators/scattergeo/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattergeo.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/stream/_token.py b/plotly/validators/scattergeo/stream/_token.py index 85a7a843dc..ea82ac94ba 100644 --- a/plotly/validators/scattergeo/stream/_token.py +++ b/plotly/validators/scattergeo/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="scattergeo.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergeo/textfont/__init__.py b/plotly/validators/scattergeo/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattergeo/textfont/__init__.py +++ b/plotly/validators/scattergeo/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergeo/textfont/_color.py b/plotly/validators/scattergeo/textfont/_color.py index b47cf7354b..6b9ea7091b 100644 --- a/plotly/validators/scattergeo/textfont/_color.py +++ b/plotly/validators/scattergeo/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/textfont/_colorsrc.py b/plotly/validators/scattergeo/textfont/_colorsrc.py index fc9c27618f..2b84592f2d 100644 --- a/plotly/validators/scattergeo/textfont/_colorsrc.py +++ b/plotly/validators/scattergeo/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergeo.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_family.py b/plotly/validators/scattergeo/textfont/_family.py index f430dcc8ad..5261b34032 100644 --- a/plotly/validators/scattergeo/textfont/_family.py +++ b/plotly/validators/scattergeo/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergeo.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattergeo/textfont/_familysrc.py b/plotly/validators/scattergeo/textfont/_familysrc.py index 1f69ccf331..dcb347caed 100644 --- a/plotly/validators/scattergeo/textfont/_familysrc.py +++ b/plotly/validators/scattergeo/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattergeo.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_lineposition.py b/plotly/validators/scattergeo/textfont/_lineposition.py index 7c75ee1c30..a5142a2edf 100644 --- a/plotly/validators/scattergeo/textfont/_lineposition.py +++ b/plotly/validators/scattergeo/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergeo.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattergeo/textfont/_linepositionsrc.py b/plotly/validators/scattergeo/textfont/_linepositionsrc.py index cc64cd4b60..f179dff15b 100644 --- a/plotly/validators/scattergeo/textfont/_linepositionsrc.py +++ b/plotly/validators/scattergeo/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattergeo.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_shadow.py b/plotly/validators/scattergeo/textfont/_shadow.py index e965b98a76..7b62c8f01b 100644 --- a/plotly/validators/scattergeo/textfont/_shadow.py +++ b/plotly/validators/scattergeo/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergeo.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergeo/textfont/_shadowsrc.py b/plotly/validators/scattergeo/textfont/_shadowsrc.py index 00b1ff806d..67f1b7563a 100644 --- a/plotly/validators/scattergeo/textfont/_shadowsrc.py +++ b/plotly/validators/scattergeo/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattergeo.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_size.py b/plotly/validators/scattergeo/textfont/_size.py index ccb0081aec..7050f9cf86 100644 --- a/plotly/validators/scattergeo/textfont/_size.py +++ b/plotly/validators/scattergeo/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattergeo.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattergeo/textfont/_sizesrc.py b/plotly/validators/scattergeo/textfont/_sizesrc.py index cacb06256d..756856fb26 100644 --- a/plotly/validators/scattergeo/textfont/_sizesrc.py +++ b/plotly/validators/scattergeo/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattergeo.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_style.py b/plotly/validators/scattergeo/textfont/_style.py index 04117efdac..50085c5473 100644 --- a/plotly/validators/scattergeo/textfont/_style.py +++ b/plotly/validators/scattergeo/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergeo.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattergeo/textfont/_stylesrc.py b/plotly/validators/scattergeo/textfont/_stylesrc.py index 24b12a7af0..09a304aae0 100644 --- a/plotly/validators/scattergeo/textfont/_stylesrc.py +++ b/plotly/validators/scattergeo/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattergeo.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_textcase.py b/plotly/validators/scattergeo/textfont/_textcase.py index b9f3e76797..4854423a12 100644 --- a/plotly/validators/scattergeo/textfont/_textcase.py +++ b/plotly/validators/scattergeo/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergeo.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattergeo/textfont/_textcasesrc.py b/plotly/validators/scattergeo/textfont/_textcasesrc.py index 7328a05beb..869f738cdb 100644 --- a/plotly/validators/scattergeo/textfont/_textcasesrc.py +++ b/plotly/validators/scattergeo/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattergeo.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_variant.py b/plotly/validators/scattergeo/textfont/_variant.py index 37f80c965e..89c27da2af 100644 --- a/plotly/validators/scattergeo/textfont/_variant.py +++ b/plotly/validators/scattergeo/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergeo.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattergeo/textfont/_variantsrc.py b/plotly/validators/scattergeo/textfont/_variantsrc.py index a425017c09..94cd84bfa7 100644 --- a/plotly/validators/scattergeo/textfont/_variantsrc.py +++ b/plotly/validators/scattergeo/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattergeo.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/textfont/_weight.py b/plotly/validators/scattergeo/textfont/_weight.py index fb6e0047fe..bbf9a6ee5c 100644 --- a/plotly/validators/scattergeo/textfont/_weight.py +++ b/plotly/validators/scattergeo/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergeo.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattergeo/textfont/_weightsrc.py b/plotly/validators/scattergeo/textfont/_weightsrc.py index bcd8e0c790..1fad8967f4 100644 --- a/plotly/validators/scattergeo/textfont/_weightsrc.py +++ b/plotly/validators/scattergeo/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattergeo.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergeo/unselected/__init__.py b/plotly/validators/scattergeo/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattergeo/unselected/__init__.py +++ b/plotly/validators/scattergeo/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattergeo/unselected/_marker.py b/plotly/validators/scattergeo/unselected/_marker.py index b233a796ce..6eeaf37a51 100644 --- a/plotly/validators/scattergeo/unselected/_marker.py +++ b/plotly/validators/scattergeo/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattergeo.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/unselected/_textfont.py b/plotly/validators/scattergeo/unselected/_textfont.py index 77957ee063..108ed8c1cd 100644 --- a/plotly/validators/scattergeo/unselected/_textfont.py +++ b/plotly/validators/scattergeo/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattergeo.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattergeo/unselected/marker/__init__.py b/plotly/validators/scattergeo/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattergeo/unselected/marker/__init__.py +++ b/plotly/validators/scattergeo/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattergeo/unselected/marker/_color.py b/plotly/validators/scattergeo/unselected/marker/_color.py index 9ea0805cd4..ca456b4099 100644 --- a/plotly/validators/scattergeo/unselected/marker/_color.py +++ b/plotly/validators/scattergeo/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergeo/unselected/marker/_opacity.py b/plotly/validators/scattergeo/unselected/marker/_opacity.py index 19887eb1d2..7822055548 100644 --- a/plotly/validators/scattergeo/unselected/marker/_opacity.py +++ b/plotly/validators/scattergeo/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattergeo.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergeo/unselected/marker/_size.py b/plotly/validators/scattergeo/unselected/marker/_size.py index 08f9fa7468..e29d595d69 100644 --- a/plotly/validators/scattergeo/unselected/marker/_size.py +++ b/plotly/validators/scattergeo/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergeo.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergeo/unselected/textfont/__init__.py b/plotly/validators/scattergeo/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattergeo/unselected/textfont/__init__.py +++ b/plotly/validators/scattergeo/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattergeo/unselected/textfont/_color.py b/plotly/validators/scattergeo/unselected/textfont/_color.py index 9785ddc3c6..061774fe74 100644 --- a/plotly/validators/scattergeo/unselected/textfont/_color.py +++ b/plotly/validators/scattergeo/unselected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergeo.unselected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/__init__.py b/plotly/validators/scattergl/__init__.py index 04ea09cc2c..af7ff671ae 100644 --- a/plotly/validators/scattergl/__init__.py +++ b/plotly/validators/scattergl/__init__.py @@ -1,139 +1,72 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._error_y import Error_YValidator - from ._error_x import Error_XValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._error_y.Error_YValidator", - "._error_x.Error_XValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._error_y.Error_YValidator", + "._error_x.Error_XValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], +) diff --git a/plotly/validators/scattergl/_connectgaps.py b/plotly/validators/scattergl/_connectgaps.py index a70abf6cfc..e1c27f0e1c 100644 --- a/plotly/validators/scattergl/_connectgaps.py +++ b/plotly/validators/scattergl/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scattergl", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_customdata.py b/plotly/validators/scattergl/_customdata.py index fbb73ffd14..da934f8cff 100644 --- a/plotly/validators/scattergl/_customdata.py +++ b/plotly/validators/scattergl/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scattergl", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_customdatasrc.py b/plotly/validators/scattergl/_customdatasrc.py index 6d8dfc82a7..f443f0da40 100644 --- a/plotly/validators/scattergl/_customdatasrc.py +++ b/plotly/validators/scattergl/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="scattergl", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_dx.py b/plotly/validators/scattergl/_dx.py index 29afcaacac..c576787d06 100644 --- a/plotly/validators/scattergl/_dx.py +++ b/plotly/validators/scattergl/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="scattergl", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_dy.py b/plotly/validators/scattergl/_dy.py index 5784a0ea37..5a00c3e1e7 100644 --- a/plotly/validators/scattergl/_dy.py +++ b/plotly/validators/scattergl/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="scattergl", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_error_x.py b/plotly/validators/scattergl/_error_x.py index ee8d67b439..3904aab9c4 100644 --- a/plotly/validators/scattergl/_error_x.py +++ b/plotly/validators/scattergl/_error_x.py @@ -1,72 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_XValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_x", parent_name="scattergl", **kwargs): - super(Error_XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorX"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - copy_ystyle - - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_error_y.py b/plotly/validators/scattergl/_error_y.py index d81c7c0ab2..a14fe6c511 100644 --- a/plotly/validators/scattergl/_error_y.py +++ b/plotly/validators/scattergl/_error_y.py @@ -1,70 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Error_YValidator(_plotly_utils.basevalidators.CompoundValidator): +class Error_YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="error_y", parent_name="scattergl", **kwargs): - super(Error_YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ErrorY"), data_docs=kwargs.pop( "data_docs", """ - array - Sets the data corresponding the length of each - error bar. Values are plotted relative to the - underlying data. - arrayminus - Sets the data corresponding the length of each - error bar in the bottom (left) direction for - vertical (horizontal) bars Values are plotted - relative to the underlying data. - arrayminussrc - Sets the source reference on Chart Studio Cloud - for `arrayminus`. - arraysrc - Sets the source reference on Chart Studio Cloud - for `array`. - color - Sets the stroke color of the error bars. - symmetric - Determines whether or not the error bars have - the same length in both direction (top/bottom - for vertical bars, left/right for horizontal - bars. - thickness - Sets the thickness (in px) of the error bars. - traceref - - tracerefminus - - type - Determines the rule used to generate the error - bars. If *constant`, the bar lengths are of a - constant value. Set this constant in `value`. - If "percent", the bar lengths correspond to a - percentage of underlying data. Set this - percentage in `value`. If "sqrt", the bar - lengths correspond to the square of the - underlying data. If "data", the bar lengths are - set with data set `array`. - value - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars. - valueminus - Sets the value of either the percentage (if - `type` is set to "percent") or the constant (if - `type` is set to "constant") corresponding to - the lengths of the error bars in the bottom - (left) direction for vertical (horizontal) bars - visible - Determines whether or not this set of error - bars is visible. - width - Sets the width (in px) of the cross-bar at both - ends of the error bars. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_fill.py b/plotly/validators/scattergl/_fill.py index 305e579d40..574f70b047 100644 --- a/plotly/validators/scattergl/_fill.py +++ b/plotly/validators/scattergl/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scattergl", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/_fillcolor.py b/plotly/validators/scattergl/_fillcolor.py index ac061262bd..4b888de02e 100644 --- a/plotly/validators/scattergl/_fillcolor.py +++ b/plotly/validators/scattergl/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattergl", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_hoverinfo.py b/plotly/validators/scattergl/_hoverinfo.py index 519542c0ef..4033616a5e 100644 --- a/plotly/validators/scattergl/_hoverinfo.py +++ b/plotly/validators/scattergl/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scattergl", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scattergl/_hoverinfosrc.py b/plotly/validators/scattergl/_hoverinfosrc.py index f78d07111d..24f840098c 100644 --- a/plotly/validators/scattergl/_hoverinfosrc.py +++ b/plotly/validators/scattergl/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="scattergl", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_hoverlabel.py b/plotly/validators/scattergl/_hoverlabel.py index 9da7b0a622..7d62aef607 100644 --- a/plotly/validators/scattergl/_hoverlabel.py +++ b/plotly/validators/scattergl/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattergl", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_hovertemplate.py b/plotly/validators/scattergl/_hovertemplate.py index 2a1385cc67..b798ebbf77 100644 --- a/plotly/validators/scattergl/_hovertemplate.py +++ b/plotly/validators/scattergl/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="scattergl", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergl/_hovertemplatesrc.py b/plotly/validators/scattergl/_hovertemplatesrc.py index 23f214e923..b3f2bd14be 100644 --- a/plotly/validators/scattergl/_hovertemplatesrc.py +++ b/plotly/validators/scattergl/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattergl", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_hovertext.py b/plotly/validators/scattergl/_hovertext.py index 703273d744..b8d9b64237 100644 --- a/plotly/validators/scattergl/_hovertext.py +++ b/plotly/validators/scattergl/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scattergl", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergl/_hovertextsrc.py b/plotly/validators/scattergl/_hovertextsrc.py index c92c51b6ae..e6e36d5fb3 100644 --- a/plotly/validators/scattergl/_hovertextsrc.py +++ b/plotly/validators/scattergl/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="scattergl", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_ids.py b/plotly/validators/scattergl/_ids.py index 3132909b27..9917e40e8e 100644 --- a/plotly/validators/scattergl/_ids.py +++ b/plotly/validators/scattergl/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scattergl", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_idssrc.py b/plotly/validators/scattergl/_idssrc.py index caf626ab39..36f2ccf50d 100644 --- a/plotly/validators/scattergl/_idssrc.py +++ b/plotly/validators/scattergl/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattergl", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_legend.py b/plotly/validators/scattergl/_legend.py index 00470557b8..368fd3510d 100644 --- a/plotly/validators/scattergl/_legend.py +++ b/plotly/validators/scattergl/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scattergl", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattergl/_legendgroup.py b/plotly/validators/scattergl/_legendgroup.py index eb5ffe79ff..74d6568d1d 100644 --- a/plotly/validators/scattergl/_legendgroup.py +++ b/plotly/validators/scattergl/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scattergl", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/_legendgrouptitle.py b/plotly/validators/scattergl/_legendgrouptitle.py index 2e7e69b864..792e3c3114 100644 --- a/plotly/validators/scattergl/_legendgrouptitle.py +++ b/plotly/validators/scattergl/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattergl", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_legendrank.py b/plotly/validators/scattergl/_legendrank.py index f172435d6c..0fee23fafe 100644 --- a/plotly/validators/scattergl/_legendrank.py +++ b/plotly/validators/scattergl/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scattergl", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/_legendwidth.py b/plotly/validators/scattergl/_legendwidth.py index 013254c07f..c9623607c8 100644 --- a/plotly/validators/scattergl/_legendwidth.py +++ b/plotly/validators/scattergl/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scattergl", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/_line.py b/plotly/validators/scattergl/_line.py index 33679f51fd..94008761bb 100644 --- a/plotly/validators/scattergl/_line.py +++ b/plotly/validators/scattergl/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattergl", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the style of the lines. - shape - Determines the line shape. The values - correspond to step-wise line shapes. - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scattergl/_marker.py b/plotly/validators/scattergl/_marker.py index 443a72f88f..3e5072cf09 100644 --- a/plotly/validators/scattergl/_marker.py +++ b/plotly/validators/scattergl/_marker.py @@ -1,144 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattergl", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattergl.marker.C - olorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.scattergl.marker.L - ine` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_meta.py b/plotly/validators/scattergl/_meta.py index 78ba55a4fd..21ed61d951 100644 --- a/plotly/validators/scattergl/_meta.py +++ b/plotly/validators/scattergl/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattergl", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattergl/_metasrc.py b/plotly/validators/scattergl/_metasrc.py index f249a9e3d6..464d686266 100644 --- a/plotly/validators/scattergl/_metasrc.py +++ b/plotly/validators/scattergl/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattergl", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_mode.py b/plotly/validators/scattergl/_mode.py index d2df1b28b7..61e6cbef89 100644 --- a/plotly/validators/scattergl/_mode.py +++ b/plotly/validators/scattergl/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scattergl", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scattergl/_name.py b/plotly/validators/scattergl/_name.py index c7616dc122..e07b10c5f9 100644 --- a/plotly/validators/scattergl/_name.py +++ b/plotly/validators/scattergl/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scattergl", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/_opacity.py b/plotly/validators/scattergl/_opacity.py index c4e81231ed..4d2202405b 100644 --- a/plotly/validators/scattergl/_opacity.py +++ b/plotly/validators/scattergl/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattergl", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergl/_selected.py b/plotly/validators/scattergl/_selected.py index eec415c9fd..e94ec081c2 100644 --- a/plotly/validators/scattergl/_selected.py +++ b/plotly/validators/scattergl/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattergl", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattergl.selected - .Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.selected - .Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattergl/_selectedpoints.py b/plotly/validators/scattergl/_selectedpoints.py index 42cce48d67..60497a9a06 100644 --- a/plotly/validators/scattergl/_selectedpoints.py +++ b/plotly/validators/scattergl/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="scattergl", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_showlegend.py b/plotly/validators/scattergl/_showlegend.py index 279ccc42b4..d447d5239f 100644 --- a/plotly/validators/scattergl/_showlegend.py +++ b/plotly/validators/scattergl/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scattergl", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/_stream.py b/plotly/validators/scattergl/_stream.py index 3e970d3dae..c78d580c30 100644 --- a/plotly/validators/scattergl/_stream.py +++ b/plotly/validators/scattergl/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattergl", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_text.py b/plotly/validators/scattergl/_text.py index b0880e0e5e..92cd822b98 100644 --- a/plotly/validators/scattergl/_text.py +++ b/plotly/validators/scattergl/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scattergl", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergl/_textfont.py b/plotly/validators/scattergl/_textfont.py index f16ddf6073..92e936b529 100644 --- a/plotly/validators/scattergl/_textfont.py +++ b/plotly/validators/scattergl/_textfont.py @@ -1,61 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattergl", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattergl/_textposition.py b/plotly/validators/scattergl/_textposition.py index 3869968829..0baf6805a5 100644 --- a/plotly/validators/scattergl/_textposition.py +++ b/plotly/validators/scattergl/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="scattergl", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattergl/_textpositionsrc.py b/plotly/validators/scattergl/_textpositionsrc.py index d3fb417e25..35cb94653b 100644 --- a/plotly/validators/scattergl/_textpositionsrc.py +++ b/plotly/validators/scattergl/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scattergl", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_textsrc.py b/plotly/validators/scattergl/_textsrc.py index e128ac8627..56d771b81f 100644 --- a/plotly/validators/scattergl/_textsrc.py +++ b/plotly/validators/scattergl/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattergl", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_texttemplate.py b/plotly/validators/scattergl/_texttemplate.py index 8b17b18e00..4fc8a90751 100644 --- a/plotly/validators/scattergl/_texttemplate.py +++ b/plotly/validators/scattergl/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="scattergl", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergl/_texttemplatesrc.py b/plotly/validators/scattergl/_texttemplatesrc.py index bf80209e3d..880cf658a5 100644 --- a/plotly/validators/scattergl/_texttemplatesrc.py +++ b/plotly/validators/scattergl/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scattergl", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_uid.py b/plotly/validators/scattergl/_uid.py index eaea0e754e..31a1c3d184 100644 --- a/plotly/validators/scattergl/_uid.py +++ b/plotly/validators/scattergl/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattergl", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattergl/_uirevision.py b/plotly/validators/scattergl/_uirevision.py index 1b3223dc8e..ab82b9c8f7 100644 --- a/plotly/validators/scattergl/_uirevision.py +++ b/plotly/validators/scattergl/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattergl", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_unselected.py b/plotly/validators/scattergl/_unselected.py index 180890de5c..922ee9890f 100644 --- a/plotly/validators/scattergl/_unselected.py +++ b/plotly/validators/scattergl/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattergl", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattergl.unselect - ed.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattergl.unselect - ed.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattergl/_visible.py b/plotly/validators/scattergl/_visible.py index 061d324b28..7b62cd006b 100644 --- a/plotly/validators/scattergl/_visible.py +++ b/plotly/validators/scattergl/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattergl", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scattergl/_x.py b/plotly/validators/scattergl/_x.py index 687854e2cb..066de424af 100644 --- a/plotly/validators/scattergl/_x.py +++ b/plotly/validators/scattergl/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="scattergl", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scattergl/_x0.py b/plotly/validators/scattergl/_x0.py index 315bf685b0..4eb46131b6 100644 --- a/plotly/validators/scattergl/_x0.py +++ b/plotly/validators/scattergl/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="scattergl", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scattergl/_xaxis.py b/plotly/validators/scattergl/_xaxis.py index 74b3fbdb3e..c58529001b 100644 --- a/plotly/validators/scattergl/_xaxis.py +++ b/plotly/validators/scattergl/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="scattergl", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scattergl/_xcalendar.py b/plotly/validators/scattergl/_xcalendar.py index 1f5e1f6f05..61647ed7f2 100644 --- a/plotly/validators/scattergl/_xcalendar.py +++ b/plotly/validators/scattergl/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="scattergl", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/_xhoverformat.py b/plotly/validators/scattergl/_xhoverformat.py index adf35f5cc1..198d27e3a8 100644 --- a/plotly/validators/scattergl/_xhoverformat.py +++ b/plotly/validators/scattergl/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="scattergl", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_xperiod.py b/plotly/validators/scattergl/_xperiod.py index 77f6b0cc2a..63a3669948 100644 --- a/plotly/validators/scattergl/_xperiod.py +++ b/plotly/validators/scattergl/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="scattergl", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_xperiod0.py b/plotly/validators/scattergl/_xperiod0.py index 51fabca429..ce4da40ef2 100644 --- a/plotly/validators/scattergl/_xperiod0.py +++ b/plotly/validators/scattergl/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="scattergl", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_xperiodalignment.py b/plotly/validators/scattergl/_xperiodalignment.py index 730b3d19cc..311b47f58b 100644 --- a/plotly/validators/scattergl/_xperiodalignment.py +++ b/plotly/validators/scattergl/_xperiodalignment.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xperiodalignment", parent_name="scattergl", **kwargs ): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/scattergl/_xsrc.py b/plotly/validators/scattergl/_xsrc.py index 6e5a2abd2d..625dff3b86 100644 --- a/plotly/validators/scattergl/_xsrc.py +++ b/plotly/validators/scattergl/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="scattergl", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/_y.py b/plotly/validators/scattergl/_y.py index 3315fa0e58..6254d3a346 100644 --- a/plotly/validators/scattergl/_y.py +++ b/plotly/validators/scattergl/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="scattergl", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scattergl/_y0.py b/plotly/validators/scattergl/_y0.py index 7490cc9948..4d909247bd 100644 --- a/plotly/validators/scattergl/_y0.py +++ b/plotly/validators/scattergl/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="scattergl", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scattergl/_yaxis.py b/plotly/validators/scattergl/_yaxis.py index 8f7eeccc89..0d7f41dee3 100644 --- a/plotly/validators/scattergl/_yaxis.py +++ b/plotly/validators/scattergl/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="scattergl", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/scattergl/_ycalendar.py b/plotly/validators/scattergl/_ycalendar.py index a08121dd1c..916d9007d2 100644 --- a/plotly/validators/scattergl/_ycalendar.py +++ b/plotly/validators/scattergl/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="scattergl", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/_yhoverformat.py b/plotly/validators/scattergl/_yhoverformat.py index db52c25c4c..6b2a72f058 100644 --- a/plotly/validators/scattergl/_yhoverformat.py +++ b/plotly/validators/scattergl/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="scattergl", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_yperiod.py b/plotly/validators/scattergl/_yperiod.py index 47848a1d0c..ae670a1cf6 100644 --- a/plotly/validators/scattergl/_yperiod.py +++ b/plotly/validators/scattergl/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="scattergl", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_yperiod0.py b/plotly/validators/scattergl/_yperiod0.py index e0922c549f..2297453faf 100644 --- a/plotly/validators/scattergl/_yperiod0.py +++ b/plotly/validators/scattergl/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="scattergl", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/_yperiodalignment.py b/plotly/validators/scattergl/_yperiodalignment.py index aaceb98999..78fbc8e69d 100644 --- a/plotly/validators/scattergl/_yperiodalignment.py +++ b/plotly/validators/scattergl/_yperiodalignment.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yperiodalignment", parent_name="scattergl", **kwargs ): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/scattergl/_ysrc.py b/plotly/validators/scattergl/_ysrc.py index 03941ca193..d91ab4af3d 100644 --- a/plotly/validators/scattergl/_ysrc.py +++ b/plotly/validators/scattergl/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="scattergl", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/__init__.py b/plotly/validators/scattergl/error_x/__init__.py index 2e3ce59d75..62838bdb73 100644 --- a/plotly/validators/scattergl/error_x/__init__.py +++ b/plotly/validators/scattergl/error_x/__init__.py @@ -1,43 +1,24 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._copy_ystyle import Copy_YstyleValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._copy_ystyle.Copy_YstyleValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._copy_ystyle.Copy_YstyleValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scattergl/error_x/_array.py b/plotly/validators/scattergl/error_x/_array.py index be20aefc10..2c3c9b3cd1 100644 --- a/plotly/validators/scattergl/error_x/_array.py +++ b/plotly/validators/scattergl/error_x/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scattergl.error_x", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_arrayminus.py b/plotly/validators/scattergl/error_x/_arrayminus.py index b63300b66c..1017efdd72 100644 --- a/plotly/validators/scattergl/error_x/_arrayminus.py +++ b/plotly/validators/scattergl/error_x/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scattergl.error_x", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_arrayminussrc.py b/plotly/validators/scattergl/error_x/_arrayminussrc.py index 4477fe6051..f32cfecbd9 100644 --- a/plotly/validators/scattergl/error_x/_arrayminussrc.py +++ b/plotly/validators/scattergl/error_x/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scattergl.error_x", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_arraysrc.py b/plotly/validators/scattergl/error_x/_arraysrc.py index e2202e8082..42dec1d220 100644 --- a/plotly/validators/scattergl/error_x/_arraysrc.py +++ b/plotly/validators/scattergl/error_x/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="scattergl.error_x", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_color.py b/plotly/validators/scattergl/error_x/_color.py index 3132dd3b1f..3b2c6a2de0 100644 --- a/plotly/validators/scattergl/error_x/_color.py +++ b/plotly/validators/scattergl/error_x/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergl.error_x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_copy_ystyle.py b/plotly/validators/scattergl/error_x/_copy_ystyle.py index 46fe448a12..01e941a250 100644 --- a/plotly/validators/scattergl/error_x/_copy_ystyle.py +++ b/plotly/validators/scattergl/error_x/_copy_ystyle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Copy_YstyleValidator(_plotly_utils.basevalidators.BooleanValidator): +class Copy_YstyleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="copy_ystyle", parent_name="scattergl.error_x", **kwargs ): - super(Copy_YstyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_symmetric.py b/plotly/validators/scattergl/error_x/_symmetric.py index e7146ec6ab..7e6eb6f77a 100644 --- a/plotly/validators/scattergl/error_x/_symmetric.py +++ b/plotly/validators/scattergl/error_x/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scattergl.error_x", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_thickness.py b/plotly/validators/scattergl/error_x/_thickness.py index 4243d737ae..d36201ac22 100644 --- a/plotly/validators/scattergl/error_x/_thickness.py +++ b/plotly/validators/scattergl/error_x/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattergl.error_x", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_x/_traceref.py b/plotly/validators/scattergl/error_x/_traceref.py index 074cda9e27..b73ed52b70 100644 --- a/plotly/validators/scattergl/error_x/_traceref.py +++ b/plotly/validators/scattergl/error_x/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="scattergl.error_x", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_x/_tracerefminus.py b/plotly/validators/scattergl/error_x/_tracerefminus.py index 2f41195b22..9ec0a3ef9f 100644 --- a/plotly/validators/scattergl/error_x/_tracerefminus.py +++ b/plotly/validators/scattergl/error_x/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scattergl.error_x", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_x/_type.py b/plotly/validators/scattergl/error_x/_type.py index 241572ccc8..b9ca4037c7 100644 --- a/plotly/validators/scattergl/error_x/_type.py +++ b/plotly/validators/scattergl/error_x/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scattergl.error_x", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scattergl/error_x/_value.py b/plotly/validators/scattergl/error_x/_value.py index 8c1d3b940b..ae87c52b0d 100644 --- a/plotly/validators/scattergl/error_x/_value.py +++ b/plotly/validators/scattergl/error_x/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scattergl.error_x", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_x/_valueminus.py b/plotly/validators/scattergl/error_x/_valueminus.py index 16dfe92a58..d540b8114b 100644 --- a/plotly/validators/scattergl/error_x/_valueminus.py +++ b/plotly/validators/scattergl/error_x/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scattergl.error_x", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_x/_visible.py b/plotly/validators/scattergl/error_x/_visible.py index 935ac688fd..c580000a18 100644 --- a/plotly/validators/scattergl/error_x/_visible.py +++ b/plotly/validators/scattergl/error_x/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="scattergl.error_x", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_x/_width.py b/plotly/validators/scattergl/error_x/_width.py index 97947239cd..e5c5191d56 100644 --- a/plotly/validators/scattergl/error_x/_width.py +++ b/plotly/validators/scattergl/error_x/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattergl.error_x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_y/__init__.py b/plotly/validators/scattergl/error_y/__init__.py index eff09cd6a0..ea49850d5f 100644 --- a/plotly/validators/scattergl/error_y/__init__.py +++ b/plotly/validators/scattergl/error_y/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._valueminus import ValueminusValidator - from ._value import ValueValidator - from ._type import TypeValidator - from ._tracerefminus import TracerefminusValidator - from ._traceref import TracerefValidator - from ._thickness import ThicknessValidator - from ._symmetric import SymmetricValidator - from ._color import ColorValidator - from ._arraysrc import ArraysrcValidator - from ._arrayminussrc import ArrayminussrcValidator - from ._arrayminus import ArrayminusValidator - from ._array import ArrayValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._valueminus.ValueminusValidator", - "._value.ValueValidator", - "._type.TypeValidator", - "._tracerefminus.TracerefminusValidator", - "._traceref.TracerefValidator", - "._thickness.ThicknessValidator", - "._symmetric.SymmetricValidator", - "._color.ColorValidator", - "._arraysrc.ArraysrcValidator", - "._arrayminussrc.ArrayminussrcValidator", - "._arrayminus.ArrayminusValidator", - "._array.ArrayValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._valueminus.ValueminusValidator", + "._value.ValueValidator", + "._type.TypeValidator", + "._tracerefminus.TracerefminusValidator", + "._traceref.TracerefValidator", + "._thickness.ThicknessValidator", + "._symmetric.SymmetricValidator", + "._color.ColorValidator", + "._arraysrc.ArraysrcValidator", + "._arrayminussrc.ArrayminussrcValidator", + "._arrayminus.ArrayminusValidator", + "._array.ArrayValidator", + ], +) diff --git a/plotly/validators/scattergl/error_y/_array.py b/plotly/validators/scattergl/error_y/_array.py index 5c79bf033b..06ab6e2d85 100644 --- a/plotly/validators/scattergl/error_y/_array.py +++ b/plotly/validators/scattergl/error_y/_array.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="array", parent_name="scattergl.error_y", **kwargs): - super(ArrayValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_arrayminus.py b/plotly/validators/scattergl/error_y/_arrayminus.py index 71d06081db..8af6506c00 100644 --- a/plotly/validators/scattergl/error_y/_arrayminus.py +++ b/plotly/validators/scattergl/error_y/_arrayminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminusValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ArrayminusValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="arrayminus", parent_name="scattergl.error_y", **kwargs ): - super(ArrayminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_arrayminussrc.py b/plotly/validators/scattergl/error_y/_arrayminussrc.py index 0a6d8ce67b..440368cce4 100644 --- a/plotly/validators/scattergl/error_y/_arrayminussrc.py +++ b/plotly/validators/scattergl/error_y/_arrayminussrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArrayminussrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArrayminussrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arrayminussrc", parent_name="scattergl.error_y", **kwargs ): - super(ArrayminussrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_arraysrc.py b/plotly/validators/scattergl/error_y/_arraysrc.py index efc0c68fee..7485bbe1a2 100644 --- a/plotly/validators/scattergl/error_y/_arraysrc.py +++ b/plotly/validators/scattergl/error_y/_arraysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ArraysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ArraysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="arraysrc", parent_name="scattergl.error_y", **kwargs ): - super(ArraysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_color.py b/plotly/validators/scattergl/error_y/_color.py index deb64661a9..d4ee225e6e 100644 --- a/plotly/validators/scattergl/error_y/_color.py +++ b/plotly/validators/scattergl/error_y/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergl.error_y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_symmetric.py b/plotly/validators/scattergl/error_y/_symmetric.py index bac7d733c2..b4621c7cf9 100644 --- a/plotly/validators/scattergl/error_y/_symmetric.py +++ b/plotly/validators/scattergl/error_y/_symmetric.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymmetricValidator(_plotly_utils.basevalidators.BooleanValidator): +class SymmetricValidator(_bv.BooleanValidator): def __init__( self, plotly_name="symmetric", parent_name="scattergl.error_y", **kwargs ): - super(SymmetricValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_thickness.py b/plotly/validators/scattergl/error_y/_thickness.py index 839b793bff..c2718dc6b5 100644 --- a/plotly/validators/scattergl/error_y/_thickness.py +++ b/plotly/validators/scattergl/error_y/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattergl.error_y", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_y/_traceref.py b/plotly/validators/scattergl/error_y/_traceref.py index 000f2f4d0a..803be442a3 100644 --- a/plotly/validators/scattergl/error_y/_traceref.py +++ b/plotly/validators/scattergl/error_y/_traceref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefValidator(_bv.IntegerValidator): def __init__( self, plotly_name="traceref", parent_name="scattergl.error_y", **kwargs ): - super(TracerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_y/_tracerefminus.py b/plotly/validators/scattergl/error_y/_tracerefminus.py index 6c3674fdcd..335803642f 100644 --- a/plotly/validators/scattergl/error_y/_tracerefminus.py +++ b/plotly/validators/scattergl/error_y/_tracerefminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TracerefminusValidator(_plotly_utils.basevalidators.IntegerValidator): +class TracerefminusValidator(_bv.IntegerValidator): def __init__( self, plotly_name="tracerefminus", parent_name="scattergl.error_y", **kwargs ): - super(TracerefminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_y/_type.py b/plotly/validators/scattergl/error_y/_type.py index f11b224b31..d4d661a4bc 100644 --- a/plotly/validators/scattergl/error_y/_type.py +++ b/plotly/validators/scattergl/error_y/_type.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="type", parent_name="scattergl.error_y", **kwargs): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["percent", "constant", "sqrt", "data"]), **kwargs, diff --git a/plotly/validators/scattergl/error_y/_value.py b/plotly/validators/scattergl/error_y/_value.py index 9049da893c..a77e1d38d6 100644 --- a/plotly/validators/scattergl/error_y/_value.py +++ b/plotly/validators/scattergl/error_y/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueValidator(_bv.NumberValidator): def __init__(self, plotly_name="value", parent_name="scattergl.error_y", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_y/_valueminus.py b/plotly/validators/scattergl/error_y/_valueminus.py index 696dd2e935..f28a840f21 100644 --- a/plotly/validators/scattergl/error_y/_valueminus.py +++ b/plotly/validators/scattergl/error_y/_valueminus.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueminusValidator(_plotly_utils.basevalidators.NumberValidator): +class ValueminusValidator(_bv.NumberValidator): def __init__( self, plotly_name="valueminus", parent_name="scattergl.error_y", **kwargs ): - super(ValueminusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/error_y/_visible.py b/plotly/validators/scattergl/error_y/_visible.py index 47565215e1..94bb480b17 100644 --- a/plotly/validators/scattergl/error_y/_visible.py +++ b/plotly/validators/scattergl/error_y/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="scattergl.error_y", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/error_y/_width.py b/plotly/validators/scattergl/error_y/_width.py index a2be97728e..1cfec4d949 100644 --- a/plotly/validators/scattergl/error_y/_width.py +++ b/plotly/validators/scattergl/error_y/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattergl.error_y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/hoverlabel/__init__.py b/plotly/validators/scattergl/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scattergl/hoverlabel/__init__.py +++ b/plotly/validators/scattergl/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scattergl/hoverlabel/_align.py b/plotly/validators/scattergl/hoverlabel/_align.py index 5e353ed762..2432e26e89 100644 --- a/plotly/validators/scattergl/hoverlabel/_align.py +++ b/plotly/validators/scattergl/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scattergl.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scattergl/hoverlabel/_alignsrc.py b/plotly/validators/scattergl/hoverlabel/_alignsrc.py index b227a50f19..481ed2afb3 100644 --- a/plotly/validators/scattergl/hoverlabel/_alignsrc.py +++ b/plotly/validators/scattergl/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattergl.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/_bgcolor.py b/plotly/validators/scattergl/hoverlabel/_bgcolor.py index 92a16d525a..f2fbacc86d 100644 --- a/plotly/validators/scattergl/hoverlabel/_bgcolor.py +++ b/plotly/validators/scattergl/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattergl.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py b/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py index b4b2dd872d..6a1438abde 100644 --- a/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scattergl/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattergl.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/_bordercolor.py b/plotly/validators/scattergl/hoverlabel/_bordercolor.py index cf2f457060..61c6449332 100644 --- a/plotly/validators/scattergl/hoverlabel/_bordercolor.py +++ b/plotly/validators/scattergl/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattergl.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py b/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py index c3e627140d..1bc6885fda 100644 --- a/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scattergl/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattergl.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/_font.py b/plotly/validators/scattergl/hoverlabel/_font.py index 83048b2ab9..1d57de1ab4 100644 --- a/plotly/validators/scattergl/hoverlabel/_font.py +++ b/plotly/validators/scattergl/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattergl.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattergl/hoverlabel/_namelength.py b/plotly/validators/scattergl/hoverlabel/_namelength.py index 51e5ddef73..cae2443981 100644 --- a/plotly/validators/scattergl/hoverlabel/_namelength.py +++ b/plotly/validators/scattergl/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattergl.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py b/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py index 2603013bea..dbe675a5f2 100644 --- a/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scattergl/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scattergl.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/__init__.py b/plotly/validators/scattergl/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattergl/hoverlabel/font/__init__.py +++ b/plotly/validators/scattergl/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergl/hoverlabel/font/_color.py b/plotly/validators/scattergl/hoverlabel/font/_color.py index 9fdecfe4ac..3c86e7dd96 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_color.py +++ b/plotly/validators/scattergl/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py b/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py index cc44b299d1..5e5f87269e 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_family.py b/plotly/validators/scattergl/hoverlabel/font/_family.py index b7a17b7673..f988b3b62f 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_family.py +++ b/plotly/validators/scattergl/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattergl/hoverlabel/font/_familysrc.py b/plotly/validators/scattergl/hoverlabel/font/_familysrc.py index 4bd1ceef76..3a6b26a343 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_lineposition.py b/plotly/validators/scattergl/hoverlabel/font/_lineposition.py index 5e0fba4fe0..5d287fc7bf 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scattergl/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergl.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattergl/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scattergl/hoverlabel/font/_linepositionsrc.py index b370f2026f..016f720a02 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattergl.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_shadow.py b/plotly/validators/scattergl/hoverlabel/font/_shadow.py index cc27d56441..64ad32ee2b 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_shadow.py +++ b/plotly/validators/scattergl/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattergl/hoverlabel/font/_shadowsrc.py b/plotly/validators/scattergl/hoverlabel/font/_shadowsrc.py index a4de930503..9d7e2fda7a 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_size.py b/plotly/validators/scattergl/hoverlabel/font/_size.py index d37b0821d2..799be596b0 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_size.py +++ b/plotly/validators/scattergl/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py b/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py index 0139bbf712..a06c2061d1 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_style.py b/plotly/validators/scattergl/hoverlabel/font/_style.py index 9d9b8a5039..b286621059 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_style.py +++ b/plotly/validators/scattergl/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattergl/hoverlabel/font/_stylesrc.py b/plotly/validators/scattergl/hoverlabel/font/_stylesrc.py index a24e9053f6..d27582f7a2 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_textcase.py b/plotly/validators/scattergl/hoverlabel/font/_textcase.py index bd0c1acf5b..a2065b851a 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_textcase.py +++ b/plotly/validators/scattergl/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattergl/hoverlabel/font/_textcasesrc.py b/plotly/validators/scattergl/hoverlabel/font/_textcasesrc.py index e27ded5952..dab3cd2f61 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattergl.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_variant.py b/plotly/validators/scattergl/hoverlabel/font/_variant.py index 556e668120..749ece95fd 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_variant.py +++ b/plotly/validators/scattergl/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scattergl/hoverlabel/font/_variantsrc.py b/plotly/validators/scattergl/hoverlabel/font/_variantsrc.py index 9a08390ed9..acb3bec7cc 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattergl.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/hoverlabel/font/_weight.py b/plotly/validators/scattergl/hoverlabel/font/_weight.py index b5d96016df..9cc17b21fd 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_weight.py +++ b/plotly/validators/scattergl/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattergl/hoverlabel/font/_weightsrc.py b/plotly/validators/scattergl/hoverlabel/font/_weightsrc.py index 7f361ca6de..3e70746811 100644 --- a/plotly/validators/scattergl/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scattergl/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattergl.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/legendgrouptitle/__init__.py b/plotly/validators/scattergl/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scattergl/legendgrouptitle/__init__.py +++ b/plotly/validators/scattergl/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scattergl/legendgrouptitle/_font.py b/plotly/validators/scattergl/legendgrouptitle/_font.py index a8b031d39a..4dff60d052 100644 --- a/plotly/validators/scattergl/legendgrouptitle/_font.py +++ b/plotly/validators/scattergl/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattergl.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattergl/legendgrouptitle/_text.py b/plotly/validators/scattergl/legendgrouptitle/_text.py index 5a10170cd9..692a1985d6 100644 --- a/plotly/validators/scattergl/legendgrouptitle/_text.py +++ b/plotly/validators/scattergl/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergl.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/legendgrouptitle/font/__init__.py b/plotly/validators/scattergl/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_color.py b/plotly/validators/scattergl/legendgrouptitle/font/_color.py index e388995652..d2f7afecdb 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_color.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_family.py b/plotly/validators/scattergl/legendgrouptitle/font/_family.py index 3e9c8cd0e1..e9a2eebbef 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_family.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_lineposition.py b/plotly/validators/scattergl/legendgrouptitle/font/_lineposition.py index 10b8e17f85..b3932eac1a 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_shadow.py b/plotly/validators/scattergl/legendgrouptitle/font/_shadow.py index ebf795d75f..59eaa7bc78 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_size.py b/plotly/validators/scattergl/legendgrouptitle/font/_size.py index b36e19c9b6..e73d38ba22 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_size.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_style.py b/plotly/validators/scattergl/legendgrouptitle/font/_style.py index 7c8fa72d52..a87f3a4607 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_style.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_textcase.py b/plotly/validators/scattergl/legendgrouptitle/font/_textcase.py index 8d4830c4e1..aa3c744626 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_variant.py b/plotly/validators/scattergl/legendgrouptitle/font/_variant.py index 23d6440924..40841db6cf 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/legendgrouptitle/font/_weight.py b/plotly/validators/scattergl/legendgrouptitle/font/_weight.py index 5347feaba0..772566cdab 100644 --- a/plotly/validators/scattergl/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scattergl/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergl.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattergl/line/__init__.py b/plotly/validators/scattergl/line/__init__.py index 84b4574bb5..e1adabc8b6 100644 --- a/plotly/validators/scattergl/line/__init__.py +++ b/plotly/validators/scattergl/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._shape import ShapeValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._shape.ShapeValidator", - "._dash.DashValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergl/line/_color.py b/plotly/validators/scattergl/line/_color.py index d8c0bc2f4b..0dbbb8ca19 100644 --- a/plotly/validators/scattergl/line/_color.py +++ b/plotly/validators/scattergl/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergl.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/line/_dash.py b/plotly/validators/scattergl/line/_dash.py index 795a071f5c..cd02b946e2 100644 --- a/plotly/validators/scattergl/line/_dash.py +++ b/plotly/validators/scattergl/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DashValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="dash", parent_name="scattergl.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["dash", "dashdot", "dot", "longdash", "longdashdot", "solid"] diff --git a/plotly/validators/scattergl/line/_shape.py b/plotly/validators/scattergl/line/_shape.py index 68faf0784e..edd5a30cd3 100644 --- a/plotly/validators/scattergl/line/_shape.py +++ b/plotly/validators/scattergl/line/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scattergl.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["linear", "hv", "vh", "hvh", "vhv"]), **kwargs, diff --git a/plotly/validators/scattergl/line/_width.py b/plotly/validators/scattergl/line/_width.py index 596fa48118..31b447932c 100644 --- a/plotly/validators/scattergl/line/_width.py +++ b/plotly/validators/scattergl/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattergl.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/__init__.py b/plotly/validators/scattergl/marker/__init__.py index dc48879d6b..ec56080f71 100644 --- a/plotly/validators/scattergl/marker/__init__.py +++ b/plotly/validators/scattergl/marker/__init__.py @@ -1,61 +1,33 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scattergl/marker/_angle.py b/plotly/validators/scattergl/marker/_angle.py index f8f8be37a3..aa14e44e4e 100644 --- a/plotly/validators/scattergl/marker/_angle.py +++ b/plotly/validators/scattergl/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__(self, plotly_name="angle", parent_name="scattergl.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergl/marker/_anglesrc.py b/plotly/validators/scattergl/marker/_anglesrc.py index f5de5f245b..ecfd112a19 100644 --- a/plotly/validators/scattergl/marker/_anglesrc.py +++ b/plotly/validators/scattergl/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scattergl.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_autocolorscale.py b/plotly/validators/scattergl/marker/_autocolorscale.py index d6cef03d2c..18426c1106 100644 --- a/plotly/validators/scattergl/marker/_autocolorscale.py +++ b/plotly/validators/scattergl/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattergl.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergl/marker/_cauto.py b/plotly/validators/scattergl/marker/_cauto.py index 7eac133d5a..27e71ca5af 100644 --- a/plotly/validators/scattergl/marker/_cauto.py +++ b/plotly/validators/scattergl/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="scattergl.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergl/marker/_cmax.py b/plotly/validators/scattergl/marker/_cmax.py index 8e7cdf28c7..213b6a4091 100644 --- a/plotly/validators/scattergl/marker/_cmax.py +++ b/plotly/validators/scattergl/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scattergl.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergl/marker/_cmid.py b/plotly/validators/scattergl/marker/_cmid.py index 1bbb08dbaa..732e843d67 100644 --- a/plotly/validators/scattergl/marker/_cmid.py +++ b/plotly/validators/scattergl/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scattergl.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergl/marker/_cmin.py b/plotly/validators/scattergl/marker/_cmin.py index 55eaee8892..0adadea16e 100644 --- a/plotly/validators/scattergl/marker/_cmin.py +++ b/plotly/validators/scattergl/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scattergl.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergl/marker/_color.py b/plotly/validators/scattergl/marker/_color.py index 4a05535545..812a79b6ad 100644 --- a/plotly/validators/scattergl/marker/_color.py +++ b/plotly/validators/scattergl/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergl.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattergl/marker/_coloraxis.py b/plotly/validators/scattergl/marker/_coloraxis.py index 77a6af97a8..e12bdbe1d8 100644 --- a/plotly/validators/scattergl/marker/_coloraxis.py +++ b/plotly/validators/scattergl/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattergl.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattergl/marker/_colorbar.py b/plotly/validators/scattergl/marker/_colorbar.py index 00e1faab3a..3b837eee85 100644 --- a/plotly/validators/scattergl/marker/_colorbar.py +++ b/plotly/validators/scattergl/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scattergl.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - gl.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattergl.marker.colorbar.tickformatstopdefau - lts), sets the default property values to use - for elements of - scattergl.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattergl.marker.c - olorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scattergl/marker/_colorscale.py b/plotly/validators/scattergl/marker/_colorscale.py index 0ed41b8304..824c1cc5d2 100644 --- a/plotly/validators/scattergl/marker/_colorscale.py +++ b/plotly/validators/scattergl/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattergl.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattergl/marker/_colorsrc.py b/plotly/validators/scattergl/marker/_colorsrc.py index 207f192dea..f667c5b15d 100644 --- a/plotly/validators/scattergl/marker/_colorsrc.py +++ b/plotly/validators/scattergl/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergl.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_line.py b/plotly/validators/scattergl/marker/_line.py index a3e7cee0c4..36f86765d5 100644 --- a/plotly/validators/scattergl/marker/_line.py +++ b/plotly/validators/scattergl/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattergl.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scattergl/marker/_opacity.py b/plotly/validators/scattergl/marker/_opacity.py index be04ecafdf..81817ef2d1 100644 --- a/plotly/validators/scattergl/marker/_opacity.py +++ b/plotly/validators/scattergl/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattergl.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattergl/marker/_opacitysrc.py b/plotly/validators/scattergl/marker/_opacitysrc.py index 14dc2bff35..ad91c78d86 100644 --- a/plotly/validators/scattergl/marker/_opacitysrc.py +++ b/plotly/validators/scattergl/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattergl.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_reversescale.py b/plotly/validators/scattergl/marker/_reversescale.py index 378b1c1623..4b7acd9775 100644 --- a/plotly/validators/scattergl/marker/_reversescale.py +++ b/plotly/validators/scattergl/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattergl.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_showscale.py b/plotly/validators/scattergl/marker/_showscale.py index ee96926696..bb517deffe 100644 --- a/plotly/validators/scattergl/marker/_showscale.py +++ b/plotly/validators/scattergl/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattergl.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_size.py b/plotly/validators/scattergl/marker/_size.py index fa36c53306..9eaddb5105 100644 --- a/plotly/validators/scattergl/marker/_size.py +++ b/plotly/validators/scattergl/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattergl.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergl/marker/_sizemin.py b/plotly/validators/scattergl/marker/_sizemin.py index 604a863209..182977e012 100644 --- a/plotly/validators/scattergl/marker/_sizemin.py +++ b/plotly/validators/scattergl/marker/_sizemin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizemin", parent_name="scattergl.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/_sizemode.py b/plotly/validators/scattergl/marker/_sizemode.py index 43f8e53b65..1aa9e1b22d 100644 --- a/plotly/validators/scattergl/marker/_sizemode.py +++ b/plotly/validators/scattergl/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattergl.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/_sizeref.py b/plotly/validators/scattergl/marker/_sizeref.py index 2924d289a0..7fe97f6191 100644 --- a/plotly/validators/scattergl/marker/_sizeref.py +++ b/plotly/validators/scattergl/marker/_sizeref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scattergl.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_sizesrc.py b/plotly/validators/scattergl/marker/_sizesrc.py index 9b9a60aa98..25819a3d26 100644 --- a/plotly/validators/scattergl/marker/_sizesrc.py +++ b/plotly/validators/scattergl/marker/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="scattergl.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/_symbol.py b/plotly/validators/scattergl/marker/_symbol.py index 6051312b15..9abcce84cb 100644 --- a/plotly/validators/scattergl/marker/_symbol.py +++ b/plotly/validators/scattergl/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="scattergl.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattergl/marker/_symbolsrc.py b/plotly/validators/scattergl/marker/_symbolsrc.py index c16808cf2e..e6a843dbc7 100644 --- a/plotly/validators/scattergl/marker/_symbolsrc.py +++ b/plotly/validators/scattergl/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattergl.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/__init__.py b/plotly/validators/scattergl/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scattergl/marker/colorbar/__init__.py +++ b/plotly/validators/scattergl/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scattergl/marker/colorbar/_bgcolor.py b/plotly/validators/scattergl/marker/colorbar/_bgcolor.py index 135dd3cfd4..b5bb346f45 100644 --- a/plotly/validators/scattergl/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scattergl/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattergl.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_bordercolor.py b/plotly/validators/scattergl/marker/colorbar/_bordercolor.py index d9c2e44eb3..cc343929dc 100644 --- a/plotly/validators/scattergl/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scattergl/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_borderwidth.py b/plotly/validators/scattergl/marker/colorbar/_borderwidth.py index 130dca6210..e97564be06 100644 --- a/plotly/validators/scattergl/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scattergl/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_dtick.py b/plotly/validators/scattergl/marker/colorbar/_dtick.py index 4355798ddf..e6100dd8ea 100644 --- a/plotly/validators/scattergl/marker/colorbar/_dtick.py +++ b/plotly/validators/scattergl/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scattergl.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_exponentformat.py b/plotly/validators/scattergl/marker/colorbar/_exponentformat.py index a463a3f59f..ea5cabe805 100644 --- a/plotly/validators/scattergl/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scattergl/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_labelalias.py b/plotly/validators/scattergl/marker/colorbar/_labelalias.py index 0437a94e35..7e360b9ec3 100644 --- a/plotly/validators/scattergl/marker/colorbar/_labelalias.py +++ b/plotly/validators/scattergl/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_len.py b/plotly/validators/scattergl/marker/colorbar/_len.py index b36aebe025..f2fc81279e 100644 --- a/plotly/validators/scattergl/marker/colorbar/_len.py +++ b/plotly/validators/scattergl/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scattergl.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_lenmode.py b/plotly/validators/scattergl/marker/colorbar/_lenmode.py index b4cb595849..441290ecbe 100644 --- a/plotly/validators/scattergl/marker/colorbar/_lenmode.py +++ b/plotly/validators/scattergl/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattergl.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_minexponent.py b/plotly/validators/scattergl/marker/colorbar/_minexponent.py index e7f39e7cf0..5de32aa337 100644 --- a/plotly/validators/scattergl/marker/colorbar/_minexponent.py +++ b/plotly/validators/scattergl/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_nticks.py b/plotly/validators/scattergl/marker/colorbar/_nticks.py index 0deba37b3f..3540cf6544 100644 --- a/plotly/validators/scattergl/marker/colorbar/_nticks.py +++ b/plotly/validators/scattergl/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scattergl.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_orientation.py b/plotly/validators/scattergl/marker/colorbar/_orientation.py index b954098131..10ba396d28 100644 --- a/plotly/validators/scattergl/marker/colorbar/_orientation.py +++ b/plotly/validators/scattergl/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py b/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py index 356a007386..380996182a 100644 --- a/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scattergl/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py b/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py index 21a1a30993..216e70465a 100644 --- a/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scattergl/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_separatethousands.py b/plotly/validators/scattergl/marker/colorbar/_separatethousands.py index 636945f9cc..918a3ca691 100644 --- a/plotly/validators/scattergl/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scattergl/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_showexponent.py b/plotly/validators/scattergl/marker/colorbar/_showexponent.py index 23ecc70023..309e9225bc 100644 --- a/plotly/validators/scattergl/marker/colorbar/_showexponent.py +++ b/plotly/validators/scattergl/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_showticklabels.py b/plotly/validators/scattergl/marker/colorbar/_showticklabels.py index c190c53c7e..61dcaf4d5e 100644 --- a/plotly/validators/scattergl/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scattergl/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py b/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py index 6698dee9d9..82491758dd 100644 --- a/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scattergl/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py b/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py index 68126cfd78..9d6163ed83 100644 --- a/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scattergl/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_thickness.py b/plotly/validators/scattergl/marker/colorbar/_thickness.py index cac68c1ac6..7225abfe9b 100644 --- a/plotly/validators/scattergl/marker/colorbar/_thickness.py +++ b/plotly/validators/scattergl/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattergl.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py b/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py index 9f617b8020..e5550e50db 100644 --- a/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scattergl/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_tick0.py b/plotly/validators/scattergl/marker/colorbar/_tick0.py index d65a6ee289..8bdbd40470 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tick0.py +++ b/plotly/validators/scattergl/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scattergl.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_tickangle.py b/plotly/validators/scattergl/marker/colorbar/_tickangle.py index 10f293b9d1..34b2433079 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickangle.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_tickcolor.py b/plotly/validators/scattergl/marker/colorbar/_tickcolor.py index c148975af2..0ebf99204c 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_tickfont.py b/plotly/validators/scattergl/marker/colorbar/_tickfont.py index fd20a78b8b..289f02b2a8 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickfont.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_tickformat.py b/plotly/validators/scattergl/marker/colorbar/_tickformat.py index 4a5d8610b5..0bd884c458 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickformat.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py index 30ec790193..e2a54d5963 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py b/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py index f30d2a4a4a..e6085859f4 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scattergl/marker/colorbar/_ticklabeloverflow.py index 0b49293c26..5a40470107 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_ticklabelposition.py b/plotly/validators/scattergl/marker/colorbar/_ticklabelposition.py index 9795603f44..ee66018ad1 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/marker/colorbar/_ticklabelstep.py b/plotly/validators/scattergl/marker/colorbar/_ticklabelstep.py index 4794f7a885..05b80b6b8b 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_ticklen.py b/plotly/validators/scattergl/marker/colorbar/_ticklen.py index b5ad722fd9..c8ce2690e4 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticklen.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_tickmode.py b/plotly/validators/scattergl/marker/colorbar/_tickmode.py index 40dc2dd7d3..45619d4394 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickmode.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scattergl/marker/colorbar/_tickprefix.py b/plotly/validators/scattergl/marker/colorbar/_tickprefix.py index 283b7622a1..4d33b82e51 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_ticks.py b/plotly/validators/scattergl/marker/colorbar/_ticks.py index a2205a0f1b..bf05d17735 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticks.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py b/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py index b226433c98..f19542d58d 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_ticktext.py b/plotly/validators/scattergl/marker/colorbar/_ticktext.py index 960bd449b8..9a69bfbad3 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticktext.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py b/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py index 17b6a51df5..aa725b8942 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scattergl/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_tickvals.py b/plotly/validators/scattergl/marker/colorbar/_tickvals.py index 1ba9c88cee..237213268a 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickvals.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py b/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py index a02708c119..e8d2a75338 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scattergl.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_tickwidth.py b/plotly/validators/scattergl/marker/colorbar/_tickwidth.py index c8e8eabfd8..48bb7c1569 100644 --- a/plotly/validators/scattergl/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scattergl/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_title.py b/plotly/validators/scattergl/marker/colorbar/_title.py index 30f10067d5..65461c6df1 100644 --- a/plotly/validators/scattergl/marker/colorbar/_title.py +++ b/plotly/validators/scattergl/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattergl.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_x.py b/plotly/validators/scattergl/marker/colorbar/_x.py index 7ee79fbade..251afc6c8b 100644 --- a/plotly/validators/scattergl/marker/colorbar/_x.py +++ b/plotly/validators/scattergl/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattergl.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_xanchor.py b/plotly/validators/scattergl/marker/colorbar/_xanchor.py index bbad4b4804..57b82af3fc 100644 --- a/plotly/validators/scattergl/marker/colorbar/_xanchor.py +++ b/plotly/validators/scattergl/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scattergl.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_xpad.py b/plotly/validators/scattergl/marker/colorbar/_xpad.py index 73ba29a90d..b8c5b9db0f 100644 --- a/plotly/validators/scattergl/marker/colorbar/_xpad.py +++ b/plotly/validators/scattergl/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattergl.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_xref.py b/plotly/validators/scattergl/marker/colorbar/_xref.py index e89ef2a372..3ecdd73440 100644 --- a/plotly/validators/scattergl/marker/colorbar/_xref.py +++ b/plotly/validators/scattergl/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattergl.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_y.py b/plotly/validators/scattergl/marker/colorbar/_y.py index 90c433894b..221496de78 100644 --- a/plotly/validators/scattergl/marker/colorbar/_y.py +++ b/plotly/validators/scattergl/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scattergl.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/_yanchor.py b/plotly/validators/scattergl/marker/colorbar/_yanchor.py index 3bddde3f8c..f4f5307453 100644 --- a/plotly/validators/scattergl/marker/colorbar/_yanchor.py +++ b/plotly/validators/scattergl/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scattergl.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_ypad.py b/plotly/validators/scattergl/marker/colorbar/_ypad.py index 2f9a1fc6e3..1031c92abf 100644 --- a/plotly/validators/scattergl/marker/colorbar/_ypad.py +++ b/plotly/validators/scattergl/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattergl.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/_yref.py b/plotly/validators/scattergl/marker/colorbar/_yref.py index 3daa43429e..4ef93b5025 100644 --- a/plotly/validators/scattergl/marker/colorbar/_yref.py +++ b/plotly/validators/scattergl/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scattergl.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py b/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py index d42e6d9c26..02bf89bcb3 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py index 7149bbeb0a..aeb3ff2794 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_lineposition.py index 3afc277723..a913ebf37f 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_shadow.py index 37401438b0..3f4e4efe50 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py index d11e00ace6..a5b72942b6 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_style.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_style.py index a022ed0e12..010b26ed53 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_textcase.py index af35c934a0..1416efe2d6 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_variant.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_variant.py index 84ecbf7194..0a659fd092 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/marker/colorbar/tickfont/_weight.py b/plotly/validators/scattergl/marker/colorbar/tickfont/_weight.py index dbffe74e52..e4df33689f 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scattergl/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergl.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scattergl/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py index dd58b4cf78..cf6e520db6 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py index df0313ac90..7d8598af6a 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py index 2fd7f9bf94..7b3a6c5696 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py index f9c49037dc..aa8cebc3c9 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py index 934607310f..ce4290e570 100644 --- a/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scattergl/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scattergl.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/title/__init__.py b/plotly/validators/scattergl/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/__init__.py +++ b/plotly/validators/scattergl/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scattergl/marker/colorbar/title/_font.py b/plotly/validators/scattergl/marker/colorbar/title/_font.py index c4fb853d76..29c957e4e1 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/_font.py +++ b/plotly/validators/scattergl/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattergl.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/title/_side.py b/plotly/validators/scattergl/marker/colorbar/title/_side.py index 70bd4ef602..c436ee65e9 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/_side.py +++ b/plotly/validators/scattergl/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattergl.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/title/_text.py b/plotly/validators/scattergl/marker/colorbar/title/_text.py index 0a927f15c5..6bb67ab0f8 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/_text.py +++ b/plotly/validators/scattergl/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattergl.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py b/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_color.py b/plotly/validators/scattergl/marker/colorbar/title/font/_color.py index 3a92d6f498..5dd7d507be 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_family.py b/plotly/validators/scattergl/marker/colorbar/title/font/_family.py index 9c17a335b7..18ac74fd2d 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scattergl/marker/colorbar/title/font/_lineposition.py index 910c905b08..4bd34c5c7d 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_shadow.py b/plotly/validators/scattergl/marker/colorbar/title/font/_shadow.py index 011c7519b4..f21f0fba08 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_size.py b/plotly/validators/scattergl/marker/colorbar/title/font/_size.py index 2f71c2933f..43394da66a 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_style.py b/plotly/validators/scattergl/marker/colorbar/title/font/_style.py index 188832bee2..a179c73c1b 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_textcase.py b/plotly/validators/scattergl/marker/colorbar/title/font/_textcase.py index 88f5e6353e..6066753581 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_variant.py b/plotly/validators/scattergl/marker/colorbar/title/font/_variant.py index 5758582fec..06b95bb271 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattergl/marker/colorbar/title/font/_weight.py b/plotly/validators/scattergl/marker/colorbar/title/font/_weight.py index 363c83bbc9..88eb0cdbb7 100644 --- a/plotly/validators/scattergl/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scattergl/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattergl.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattergl/marker/line/__init__.py b/plotly/validators/scattergl/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scattergl/marker/line/__init__.py +++ b/plotly/validators/scattergl/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scattergl/marker/line/_autocolorscale.py b/plotly/validators/scattergl/marker/line/_autocolorscale.py index 19028a7c26..aaaab3bed8 100644 --- a/plotly/validators/scattergl/marker/line/_autocolorscale.py +++ b/plotly/validators/scattergl/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattergl.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergl/marker/line/_cauto.py b/plotly/validators/scattergl/marker/line/_cauto.py index 007da2e667..c5c1e26ec6 100644 --- a/plotly/validators/scattergl/marker/line/_cauto.py +++ b/plotly/validators/scattergl/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattergl.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergl/marker/line/_cmax.py b/plotly/validators/scattergl/marker/line/_cmax.py index 6a343b7534..a39cadd2d8 100644 --- a/plotly/validators/scattergl/marker/line/_cmax.py +++ b/plotly/validators/scattergl/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattergl.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergl/marker/line/_cmid.py b/plotly/validators/scattergl/marker/line/_cmid.py index 43d7835e08..418b322270 100644 --- a/plotly/validators/scattergl/marker/line/_cmid.py +++ b/plotly/validators/scattergl/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattergl.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattergl/marker/line/_cmin.py b/plotly/validators/scattergl/marker/line/_cmin.py index f9218e27c3..233185a351 100644 --- a/plotly/validators/scattergl/marker/line/_cmin.py +++ b/plotly/validators/scattergl/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scattergl.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattergl/marker/line/_color.py b/plotly/validators/scattergl/marker/line/_color.py index f5cf89699b..8de805009d 100644 --- a/plotly/validators/scattergl/marker/line/_color.py +++ b/plotly/validators/scattergl/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattergl/marker/line/_coloraxis.py b/plotly/validators/scattergl/marker/line/_coloraxis.py index 3b9952080b..0bd8379c88 100644 --- a/plotly/validators/scattergl/marker/line/_coloraxis.py +++ b/plotly/validators/scattergl/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattergl.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattergl/marker/line/_colorscale.py b/plotly/validators/scattergl/marker/line/_colorscale.py index 34252afe15..c36aa1cd41 100644 --- a/plotly/validators/scattergl/marker/line/_colorscale.py +++ b/plotly/validators/scattergl/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattergl.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattergl/marker/line/_colorsrc.py b/plotly/validators/scattergl/marker/line/_colorsrc.py index d4ba88bda1..0397686878 100644 --- a/plotly/validators/scattergl/marker/line/_colorsrc.py +++ b/plotly/validators/scattergl/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergl.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/line/_reversescale.py b/plotly/validators/scattergl/marker/line/_reversescale.py index 5dd569a3cf..ad4dd7239c 100644 --- a/plotly/validators/scattergl/marker/line/_reversescale.py +++ b/plotly/validators/scattergl/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattergl.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/marker/line/_width.py b/plotly/validators/scattergl/marker/line/_width.py index 07beed70c6..529ab3335e 100644 --- a/plotly/validators/scattergl/marker/line/_width.py +++ b/plotly/validators/scattergl/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scattergl.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergl/marker/line/_widthsrc.py b/plotly/validators/scattergl/marker/line/_widthsrc.py index 6a958688f9..dc1950ac02 100644 --- a/plotly/validators/scattergl/marker/line/_widthsrc.py +++ b/plotly/validators/scattergl/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scattergl.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/selected/__init__.py b/plotly/validators/scattergl/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattergl/selected/__init__.py +++ b/plotly/validators/scattergl/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattergl/selected/_marker.py b/plotly/validators/scattergl/selected/_marker.py index 453b645ee0..309b14827f 100644 --- a/plotly/validators/scattergl/selected/_marker.py +++ b/plotly/validators/scattergl/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattergl.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattergl/selected/_textfont.py b/plotly/validators/scattergl/selected/_textfont.py index 991fe50840..49056a47c2 100644 --- a/plotly/validators/scattergl/selected/_textfont.py +++ b/plotly/validators/scattergl/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattergl.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattergl/selected/marker/__init__.py b/plotly/validators/scattergl/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattergl/selected/marker/__init__.py +++ b/plotly/validators/scattergl/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattergl/selected/marker/_color.py b/plotly/validators/scattergl/selected/marker/_color.py index 2d74f77641..30dc0cadf8 100644 --- a/plotly/validators/scattergl/selected/marker/_color.py +++ b/plotly/validators/scattergl/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/selected/marker/_opacity.py b/plotly/validators/scattergl/selected/marker/_opacity.py index 89e9327135..78e08b797b 100644 --- a/plotly/validators/scattergl/selected/marker/_opacity.py +++ b/plotly/validators/scattergl/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattergl.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergl/selected/marker/_size.py b/plotly/validators/scattergl/selected/marker/_size.py index 079f6596ee..1c334531f6 100644 --- a/plotly/validators/scattergl/selected/marker/_size.py +++ b/plotly/validators/scattergl/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergl.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/selected/textfont/__init__.py b/plotly/validators/scattergl/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattergl/selected/textfont/__init__.py +++ b/plotly/validators/scattergl/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattergl/selected/textfont/_color.py b/plotly/validators/scattergl/selected/textfont/_color.py index 2b0ddb4b80..326293b0b8 100644 --- a/plotly/validators/scattergl/selected/textfont/_color.py +++ b/plotly/validators/scattergl/selected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.selected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/stream/__init__.py b/plotly/validators/scattergl/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scattergl/stream/__init__.py +++ b/plotly/validators/scattergl/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scattergl/stream/_maxpoints.py b/plotly/validators/scattergl/stream/_maxpoints.py index 87bf0337c9..b517df18a0 100644 --- a/plotly/validators/scattergl/stream/_maxpoints.py +++ b/plotly/validators/scattergl/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattergl.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergl/stream/_token.py b/plotly/validators/scattergl/stream/_token.py index a0e77589f1..889ab8138d 100644 --- a/plotly/validators/scattergl/stream/_token.py +++ b/plotly/validators/scattergl/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="scattergl.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattergl/textfont/__init__.py b/plotly/validators/scattergl/textfont/__init__.py index d87c37ff7a..35d589957b 100644 --- a/plotly/validators/scattergl/textfont/__init__.py +++ b/plotly/validators/scattergl/textfont/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattergl/textfont/_color.py b/plotly/validators/scattergl/textfont/_color.py index 058ae70b60..a7f126b9eb 100644 --- a/plotly/validators/scattergl/textfont/_color.py +++ b/plotly/validators/scattergl/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattergl.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattergl/textfont/_colorsrc.py b/plotly/validators/scattergl/textfont/_colorsrc.py index 57213b2c66..44f1fad0c6 100644 --- a/plotly/validators/scattergl/textfont/_colorsrc.py +++ b/plotly/validators/scattergl/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattergl.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/textfont/_family.py b/plotly/validators/scattergl/textfont/_family.py index c3e8329ef2..f4d7f1c2f7 100644 --- a/plotly/validators/scattergl/textfont/_family.py +++ b/plotly/validators/scattergl/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattergl.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattergl/textfont/_familysrc.py b/plotly/validators/scattergl/textfont/_familysrc.py index 55b4c298e0..a9f4b5581a 100644 --- a/plotly/validators/scattergl/textfont/_familysrc.py +++ b/plotly/validators/scattergl/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattergl.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/textfont/_size.py b/plotly/validators/scattergl/textfont/_size.py index 62e1ccaa25..e3475da0bf 100644 --- a/plotly/validators/scattergl/textfont/_size.py +++ b/plotly/validators/scattergl/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattergl.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattergl/textfont/_sizesrc.py b/plotly/validators/scattergl/textfont/_sizesrc.py index d185e1f036..0649611b74 100644 --- a/plotly/validators/scattergl/textfont/_sizesrc.py +++ b/plotly/validators/scattergl/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattergl.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/textfont/_style.py b/plotly/validators/scattergl/textfont/_style.py index c4be2a3035..37aca70f63 100644 --- a/plotly/validators/scattergl/textfont/_style.py +++ b/plotly/validators/scattergl/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="scattergl.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattergl/textfont/_stylesrc.py b/plotly/validators/scattergl/textfont/_stylesrc.py index 2d64979609..f4255fbf0f 100644 --- a/plotly/validators/scattergl/textfont/_stylesrc.py +++ b/plotly/validators/scattergl/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattergl.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/textfont/_variant.py b/plotly/validators/scattergl/textfont/_variant.py index 8693fa2a37..5a13741d30 100644 --- a/plotly/validators/scattergl/textfont/_variant.py +++ b/plotly/validators/scattergl/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattergl.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "small-caps"]), diff --git a/plotly/validators/scattergl/textfont/_variantsrc.py b/plotly/validators/scattergl/textfont/_variantsrc.py index fac0bf44d0..cb2006600e 100644 --- a/plotly/validators/scattergl/textfont/_variantsrc.py +++ b/plotly/validators/scattergl/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattergl.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/textfont/_weight.py b/plotly/validators/scattergl/textfont/_weight.py index fa3d81512c..b4c05b76a1 100644 --- a/plotly/validators/scattergl/textfont/_weight.py +++ b/plotly/validators/scattergl/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class WeightValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="weight", parent_name="scattergl.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "bold"]), diff --git a/plotly/validators/scattergl/textfont/_weightsrc.py b/plotly/validators/scattergl/textfont/_weightsrc.py index f0a525f9ab..5e2cb926fa 100644 --- a/plotly/validators/scattergl/textfont/_weightsrc.py +++ b/plotly/validators/scattergl/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattergl.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattergl/unselected/__init__.py b/plotly/validators/scattergl/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattergl/unselected/__init__.py +++ b/plotly/validators/scattergl/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattergl/unselected/_marker.py b/plotly/validators/scattergl/unselected/_marker.py index 4b67a89b5e..6a73ca0d02 100644 --- a/plotly/validators/scattergl/unselected/_marker.py +++ b/plotly/validators/scattergl/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattergl.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattergl/unselected/_textfont.py b/plotly/validators/scattergl/unselected/_textfont.py index c34ebb48b2..4085b44b60 100644 --- a/plotly/validators/scattergl/unselected/_textfont.py +++ b/plotly/validators/scattergl/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattergl.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattergl/unselected/marker/__init__.py b/plotly/validators/scattergl/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattergl/unselected/marker/__init__.py +++ b/plotly/validators/scattergl/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattergl/unselected/marker/_color.py b/plotly/validators/scattergl/unselected/marker/_color.py index f6a9651ac8..704651c9ab 100644 --- a/plotly/validators/scattergl/unselected/marker/_color.py +++ b/plotly/validators/scattergl/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattergl/unselected/marker/_opacity.py b/plotly/validators/scattergl/unselected/marker/_opacity.py index d0a5049295..348e3c2491 100644 --- a/plotly/validators/scattergl/unselected/marker/_opacity.py +++ b/plotly/validators/scattergl/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattergl.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattergl/unselected/marker/_size.py b/plotly/validators/scattergl/unselected/marker/_size.py index 18e0e6eab6..cbd695d3f0 100644 --- a/plotly/validators/scattergl/unselected/marker/_size.py +++ b/plotly/validators/scattergl/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattergl.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattergl/unselected/textfont/__init__.py b/plotly/validators/scattergl/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattergl/unselected/textfont/__init__.py +++ b/plotly/validators/scattergl/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattergl/unselected/textfont/_color.py b/plotly/validators/scattergl/unselected/textfont/_color.py index 6527b051d2..87c7c295d0 100644 --- a/plotly/validators/scattergl/unselected/textfont/_color.py +++ b/plotly/validators/scattergl/unselected/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattergl.unselected.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/__init__.py b/plotly/validators/scattermap/__init__.py index 5abe04051d..8d6c1c2da7 100644 --- a/plotly/validators/scattermap/__init__.py +++ b/plotly/validators/scattermap/__init__.py @@ -1,107 +1,56 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._lonsrc import LonsrcValidator - from ._lon import LonValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._latsrc import LatsrcValidator - from ._lat import LatValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._cluster import ClusterValidator - from ._below import BelowValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._lonsrc.LonsrcValidator", - "._lon.LonValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._latsrc.LatsrcValidator", - "._lat.LatValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._cluster.ClusterValidator", - "._below.BelowValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cluster.ClusterValidator", + "._below.BelowValidator", + ], +) diff --git a/plotly/validators/scattermap/_below.py b/plotly/validators/scattermap/_below.py index 8f77832b6b..072b349b33 100644 --- a/plotly/validators/scattermap/_below.py +++ b/plotly/validators/scattermap/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="scattermap", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_cluster.py b/plotly/validators/scattermap/_cluster.py index f319ce45f4..98d1ff3610 100644 --- a/plotly/validators/scattermap/_cluster.py +++ b/plotly/validators/scattermap/_cluster.py @@ -1,48 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClusterValidator(_plotly_utils.basevalidators.CompoundValidator): +class ClusterValidator(_bv.CompoundValidator): def __init__(self, plotly_name="cluster", parent_name="scattermap", **kwargs): - super(ClusterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Cluster"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color for each cluster step. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - enabled - Determines whether clustering is enabled or - disabled. - maxzoom - Sets the maximum zoom level. At zoom levels - equal to or greater than this, points will - never be clustered. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - size - Sets the size for each cluster step. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - step - Sets how many points it takes to create a - cluster or advance to the next cluster step. - Use this in conjunction with arrays for `size` - and / or `color`. If an integer, steps start at - multiples of this number. If an array, each - step extends from the given value until one - less than the next value. - stepsrc - Sets the source reference on Chart Studio Cloud - for `step`. """, ), **kwargs, diff --git a/plotly/validators/scattermap/_connectgaps.py b/plotly/validators/scattermap/_connectgaps.py index f41f4971e8..0224eba7d8 100644 --- a/plotly/validators/scattermap/_connectgaps.py +++ b/plotly/validators/scattermap/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scattermap", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_customdata.py b/plotly/validators/scattermap/_customdata.py index d2052fc952..87576b61f6 100644 --- a/plotly/validators/scattermap/_customdata.py +++ b/plotly/validators/scattermap/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scattermap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_customdatasrc.py b/plotly/validators/scattermap/_customdatasrc.py index e9b8121ae0..78321c1eb2 100644 --- a/plotly/validators/scattermap/_customdatasrc.py +++ b/plotly/validators/scattermap/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="scattermap", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_fill.py b/plotly/validators/scattermap/_fill.py index cb9f598dc3..2b2c1d2a6c 100644 --- a/plotly/validators/scattermap/_fill.py +++ b/plotly/validators/scattermap/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scattermap", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself"]), **kwargs, diff --git a/plotly/validators/scattermap/_fillcolor.py b/plotly/validators/scattermap/_fillcolor.py index 6a63f142fd..cd12553f2d 100644 --- a/plotly/validators/scattermap/_fillcolor.py +++ b/plotly/validators/scattermap/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattermap", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_hoverinfo.py b/plotly/validators/scattermap/_hoverinfo.py index 0878641077..a118f21e0c 100644 --- a/plotly/validators/scattermap/_hoverinfo.py +++ b/plotly/validators/scattermap/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scattermap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scattermap/_hoverinfosrc.py b/plotly/validators/scattermap/_hoverinfosrc.py index 9ef6c55988..a5e7808bbd 100644 --- a/plotly/validators/scattermap/_hoverinfosrc.py +++ b/plotly/validators/scattermap/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="scattermap", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_hoverlabel.py b/plotly/validators/scattermap/_hoverlabel.py index e1fd26b410..e9d0cd61e5 100644 --- a/plotly/validators/scattermap/_hoverlabel.py +++ b/plotly/validators/scattermap/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattermap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scattermap/_hovertemplate.py b/plotly/validators/scattermap/_hovertemplate.py index f39a7558df..d0e821dafe 100644 --- a/plotly/validators/scattermap/_hovertemplate.py +++ b/plotly/validators/scattermap/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="scattermap", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/_hovertemplatesrc.py b/plotly/validators/scattermap/_hovertemplatesrc.py index 9764f51916..14e6ac55f0 100644 --- a/plotly/validators/scattermap/_hovertemplatesrc.py +++ b/plotly/validators/scattermap/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattermap", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_hovertext.py b/plotly/validators/scattermap/_hovertext.py index e61d5f85ce..7a9695a370 100644 --- a/plotly/validators/scattermap/_hovertext.py +++ b/plotly/validators/scattermap/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scattermap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/_hovertextsrc.py b/plotly/validators/scattermap/_hovertextsrc.py index df36fec355..7e68a9623f 100644 --- a/plotly/validators/scattermap/_hovertextsrc.py +++ b/plotly/validators/scattermap/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="scattermap", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_ids.py b/plotly/validators/scattermap/_ids.py index ade0b467b7..639e2d864a 100644 --- a/plotly/validators/scattermap/_ids.py +++ b/plotly/validators/scattermap/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scattermap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_idssrc.py b/plotly/validators/scattermap/_idssrc.py index 07e47d52a4..b88d29ed1f 100644 --- a/plotly/validators/scattermap/_idssrc.py +++ b/plotly/validators/scattermap/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattermap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_lat.py b/plotly/validators/scattermap/_lat.py index e1e7a21a61..53442e3f48 100644 --- a/plotly/validators/scattermap/_lat.py +++ b/plotly/validators/scattermap/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lat", parent_name="scattermap", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_latsrc.py b/plotly/validators/scattermap/_latsrc.py index fbd246064d..646106bc4c 100644 --- a/plotly/validators/scattermap/_latsrc.py +++ b/plotly/validators/scattermap/_latsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="latsrc", parent_name="scattermap", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_legend.py b/plotly/validators/scattermap/_legend.py index 60613e2997..1cad8b767f 100644 --- a/plotly/validators/scattermap/_legend.py +++ b/plotly/validators/scattermap/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scattermap", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattermap/_legendgroup.py b/plotly/validators/scattermap/_legendgroup.py index c15205a751..2e82f70313 100644 --- a/plotly/validators/scattermap/_legendgroup.py +++ b/plotly/validators/scattermap/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scattermap", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/_legendgrouptitle.py b/plotly/validators/scattermap/_legendgrouptitle.py index db44e123dc..422eb01757 100644 --- a/plotly/validators/scattermap/_legendgrouptitle.py +++ b/plotly/validators/scattermap/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattermap", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scattermap/_legendrank.py b/plotly/validators/scattermap/_legendrank.py index e2dd0ec25f..99c0eb511c 100644 --- a/plotly/validators/scattermap/_legendrank.py +++ b/plotly/validators/scattermap/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scattermap", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/_legendwidth.py b/plotly/validators/scattermap/_legendwidth.py index 498db23d30..1b6a33763b 100644 --- a/plotly/validators/scattermap/_legendwidth.py +++ b/plotly/validators/scattermap/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scattermap", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/_line.py b/plotly/validators/scattermap/_line.py index 6a31327cea..fb6f49a7df 100644 --- a/plotly/validators/scattermap/_line.py +++ b/plotly/validators/scattermap/_line.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattermap", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scattermap/_lon.py b/plotly/validators/scattermap/_lon.py index 66bda2b3d4..9b5e00aa3c 100644 --- a/plotly/validators/scattermap/_lon.py +++ b/plotly/validators/scattermap/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LonValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lon", parent_name="scattermap", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_lonsrc.py b/plotly/validators/scattermap/_lonsrc.py index 58e5abbd33..cd27019aeb 100644 --- a/plotly/validators/scattermap/_lonsrc.py +++ b/plotly/validators/scattermap/_lonsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LonsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lonsrc", parent_name="scattermap", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_marker.py b/plotly/validators/scattermap/_marker.py index f55e19922e..7eb7c5ed64 100644 --- a/plotly/validators/scattermap/_marker.py +++ b/plotly/validators/scattermap/_marker.py @@ -1,144 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattermap", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - allowoverlap - Flag to draw all symbols, even if they overlap. - angle - Sets the marker orientation from true North, in - degrees clockwise. When using the "auto" - default, no rotation would be applied in - perspective views which is different from using - a zero angle. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattermap.marker. - ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol. Full list: - https://www.map.com/maki-icons/ Note that the - array `marker.color` and `marker.size` are only - available for "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scattermap/_meta.py b/plotly/validators/scattermap/_meta.py index ff32888d94..0f51d54b99 100644 --- a/plotly/validators/scattermap/_meta.py +++ b/plotly/validators/scattermap/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattermap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattermap/_metasrc.py b/plotly/validators/scattermap/_metasrc.py index ce5b289bb6..c268937eda 100644 --- a/plotly/validators/scattermap/_metasrc.py +++ b/plotly/validators/scattermap/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattermap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_mode.py b/plotly/validators/scattermap/_mode.py index 68e75dbfd9..033dbe5890 100644 --- a/plotly/validators/scattermap/_mode.py +++ b/plotly/validators/scattermap/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scattermap", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scattermap/_name.py b/plotly/validators/scattermap/_name.py index d35e4dcc96..4ca78ac1b1 100644 --- a/plotly/validators/scattermap/_name.py +++ b/plotly/validators/scattermap/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scattermap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/_opacity.py b/plotly/validators/scattermap/_opacity.py index 18312c5b1d..0495fb57b0 100644 --- a/plotly/validators/scattermap/_opacity.py +++ b/plotly/validators/scattermap/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattermap", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/_selected.py b/plotly/validators/scattermap/_selected.py index dd8d4212dd..c9a114724e 100644 --- a/plotly/validators/scattermap/_selected.py +++ b/plotly/validators/scattermap/_selected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattermap", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattermap.selecte - d.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattermap/_selectedpoints.py b/plotly/validators/scattermap/_selectedpoints.py index c0ef752667..435d4c3e6c 100644 --- a/plotly/validators/scattermap/_selectedpoints.py +++ b/plotly/validators/scattermap/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scattermap", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/_showlegend.py b/plotly/validators/scattermap/_showlegend.py index 38eb4fa9db..4fd0d6fb66 100644 --- a/plotly/validators/scattermap/_showlegend.py +++ b/plotly/validators/scattermap/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scattermap", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/_stream.py b/plotly/validators/scattermap/_stream.py index d11f34a620..6154b1250c 100644 --- a/plotly/validators/scattermap/_stream.py +++ b/plotly/validators/scattermap/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattermap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scattermap/_subplot.py b/plotly/validators/scattermap/_subplot.py index b0b330dc89..0498801e00 100644 --- a/plotly/validators/scattermap/_subplot.py +++ b/plotly/validators/scattermap/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="scattermap", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "map"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/_text.py b/plotly/validators/scattermap/_text.py index 74fcb982a9..7414d64b63 100644 --- a/plotly/validators/scattermap/_text.py +++ b/plotly/validators/scattermap/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scattermap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/_textfont.py b/plotly/validators/scattermap/_textfont.py index 9fa68efa1f..05649620dd 100644 --- a/plotly/validators/scattermap/_textfont.py +++ b/plotly/validators/scattermap/_textfont.py @@ -1,41 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattermap", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermap/_textposition.py b/plotly/validators/scattermap/_textposition.py index 663d2f075c..25629104c7 100644 --- a/plotly/validators/scattermap/_textposition.py +++ b/plotly/validators/scattermap/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="scattermap", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattermap/_textsrc.py b/plotly/validators/scattermap/_textsrc.py index b11f4e2a83..d6f4142b0b 100644 --- a/plotly/validators/scattermap/_textsrc.py +++ b/plotly/validators/scattermap/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattermap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_texttemplate.py b/plotly/validators/scattermap/_texttemplate.py index 8bc4aebdf3..46a956316f 100644 --- a/plotly/validators/scattermap/_texttemplate.py +++ b/plotly/validators/scattermap/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="scattermap", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/_texttemplatesrc.py b/plotly/validators/scattermap/_texttemplatesrc.py index b2486f3047..644e50eca4 100644 --- a/plotly/validators/scattermap/_texttemplatesrc.py +++ b/plotly/validators/scattermap/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scattermap", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_uid.py b/plotly/validators/scattermap/_uid.py index 0a3b69d80a..757cbd3403 100644 --- a/plotly/validators/scattermap/_uid.py +++ b/plotly/validators/scattermap/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattermap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattermap/_uirevision.py b/plotly/validators/scattermap/_uirevision.py index 99c5357659..2273682dbe 100644 --- a/plotly/validators/scattermap/_uirevision.py +++ b/plotly/validators/scattermap/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattermap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/_unselected.py b/plotly/validators/scattermap/_unselected.py index deb45a81af..101b9086c4 100644 --- a/plotly/validators/scattermap/_unselected.py +++ b/plotly/validators/scattermap/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattermap", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattermap.unselec - ted.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattermap/_visible.py b/plotly/validators/scattermap/_visible.py index b8bf4a914b..74c8a1755a 100644 --- a/plotly/validators/scattermap/_visible.py +++ b/plotly/validators/scattermap/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattermap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scattermap/cluster/__init__.py b/plotly/validators/scattermap/cluster/__init__.py index e8f530f8e9..34fca2d007 100644 --- a/plotly/validators/scattermap/cluster/__init__.py +++ b/plotly/validators/scattermap/cluster/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._stepsrc import StepsrcValidator - from ._step import StepValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxzoom import MaxzoomValidator - from ._enabled import EnabledValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._stepsrc.StepsrcValidator", - "._step.StepValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxzoom.MaxzoomValidator", - "._enabled.EnabledValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._stepsrc.StepsrcValidator", + "._step.StepValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxzoom.MaxzoomValidator", + "._enabled.EnabledValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermap/cluster/_color.py b/plotly/validators/scattermap/cluster/_color.py index a6ce5aa7fd..a471535d9c 100644 --- a/plotly/validators/scattermap/cluster/_color.py +++ b/plotly/validators/scattermap/cluster/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattermap.cluster", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/cluster/_colorsrc.py b/plotly/validators/scattermap/cluster/_colorsrc.py index dea17ba84e..20c53294d1 100644 --- a/plotly/validators/scattermap/cluster/_colorsrc.py +++ b/plotly/validators/scattermap/cluster/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermap.cluster", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/cluster/_enabled.py b/plotly/validators/scattermap/cluster/_enabled.py index ad034a4ff8..03a61a4e4d 100644 --- a/plotly/validators/scattermap/cluster/_enabled.py +++ b/plotly/validators/scattermap/cluster/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattermap.cluster", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/cluster/_maxzoom.py b/plotly/validators/scattermap/cluster/_maxzoom.py index d993f17747..19763890a1 100644 --- a/plotly/validators/scattermap/cluster/_maxzoom.py +++ b/plotly/validators/scattermap/cluster/_maxzoom.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxzoomValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxzoom", parent_name="scattermap.cluster", **kwargs ): - super(MaxzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 24), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/cluster/_opacity.py b/plotly/validators/scattermap/cluster/_opacity.py index c5ef3dc0ff..75f712fce6 100644 --- a/plotly/validators/scattermap/cluster/_opacity.py +++ b/plotly/validators/scattermap/cluster/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermap.cluster", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattermap/cluster/_opacitysrc.py b/plotly/validators/scattermap/cluster/_opacitysrc.py index 0f94bb99a6..3f2a7d5afd 100644 --- a/plotly/validators/scattermap/cluster/_opacitysrc.py +++ b/plotly/validators/scattermap/cluster/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattermap.cluster", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/cluster/_size.py b/plotly/validators/scattermap/cluster/_size.py index d4b2a3d564..01c549016b 100644 --- a/plotly/validators/scattermap/cluster/_size.py +++ b/plotly/validators/scattermap/cluster/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattermap.cluster", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/cluster/_sizesrc.py b/plotly/validators/scattermap/cluster/_sizesrc.py index ae6e14f32a..993adf4443 100644 --- a/plotly/validators/scattermap/cluster/_sizesrc.py +++ b/plotly/validators/scattermap/cluster/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermap.cluster", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/cluster/_step.py b/plotly/validators/scattermap/cluster/_step.py index faf58a4925..e92977a636 100644 --- a/plotly/validators/scattermap/cluster/_step.py +++ b/plotly/validators/scattermap/cluster/_step.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepValidator(_plotly_utils.basevalidators.NumberValidator): +class StepValidator(_bv.NumberValidator): def __init__(self, plotly_name="step", parent_name="scattermap.cluster", **kwargs): - super(StepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattermap/cluster/_stepsrc.py b/plotly/validators/scattermap/cluster/_stepsrc.py index 2a7048bd55..a453b8c420 100644 --- a/plotly/validators/scattermap/cluster/_stepsrc.py +++ b/plotly/validators/scattermap/cluster/_stepsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StepsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stepsrc", parent_name="scattermap.cluster", **kwargs ): - super(StepsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/__init__.py b/plotly/validators/scattermap/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scattermap/hoverlabel/__init__.py +++ b/plotly/validators/scattermap/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scattermap/hoverlabel/_align.py b/plotly/validators/scattermap/hoverlabel/_align.py index 29b4e20d15..86932cc7ae 100644 --- a/plotly/validators/scattermap/hoverlabel/_align.py +++ b/plotly/validators/scattermap/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scattermap.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scattermap/hoverlabel/_alignsrc.py b/plotly/validators/scattermap/hoverlabel/_alignsrc.py index 9c881e4fb9..98696ac59a 100644 --- a/plotly/validators/scattermap/hoverlabel/_alignsrc.py +++ b/plotly/validators/scattermap/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattermap.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/_bgcolor.py b/plotly/validators/scattermap/hoverlabel/_bgcolor.py index 9bc27168a6..cc86ffaaa6 100644 --- a/plotly/validators/scattermap/hoverlabel/_bgcolor.py +++ b/plotly/validators/scattermap/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattermap.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermap/hoverlabel/_bgcolorsrc.py b/plotly/validators/scattermap/hoverlabel/_bgcolorsrc.py index 5d64e9c0cf..3aad24778d 100644 --- a/plotly/validators/scattermap/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scattermap/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattermap.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/_bordercolor.py b/plotly/validators/scattermap/hoverlabel/_bordercolor.py index 3596b43681..52e2f53760 100644 --- a/plotly/validators/scattermap/hoverlabel/_bordercolor.py +++ b/plotly/validators/scattermap/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattermap.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermap/hoverlabel/_bordercolorsrc.py b/plotly/validators/scattermap/hoverlabel/_bordercolorsrc.py index e14a490640..1766c00eca 100644 --- a/plotly/validators/scattermap/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scattermap/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattermap.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/_font.py b/plotly/validators/scattermap/hoverlabel/_font.py index 4df641bde9..24f91cc341 100644 --- a/plotly/validators/scattermap/hoverlabel/_font.py +++ b/plotly/validators/scattermap/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattermap.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattermap/hoverlabel/_namelength.py b/plotly/validators/scattermap/hoverlabel/_namelength.py index 8b7e7a0f5f..4dd8cff1ea 100644 --- a/plotly/validators/scattermap/hoverlabel/_namelength.py +++ b/plotly/validators/scattermap/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattermap.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattermap/hoverlabel/_namelengthsrc.py b/plotly/validators/scattermap/hoverlabel/_namelengthsrc.py index e5cf1ee286..47117831f6 100644 --- a/plotly/validators/scattermap/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scattermap/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scattermap.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/__init__.py b/plotly/validators/scattermap/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattermap/hoverlabel/font/__init__.py +++ b/plotly/validators/scattermap/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermap/hoverlabel/font/_color.py b/plotly/validators/scattermap/hoverlabel/font/_color.py index f4046c640e..b376274755 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_color.py +++ b/plotly/validators/scattermap/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermap/hoverlabel/font/_colorsrc.py b/plotly/validators/scattermap/hoverlabel/font/_colorsrc.py index 8eb3be0156..184b90115c 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_family.py b/plotly/validators/scattermap/hoverlabel/font/_family.py index e4da0804a6..7bdd5afbc4 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_family.py +++ b/plotly/validators/scattermap/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattermap/hoverlabel/font/_familysrc.py b/plotly/validators/scattermap/hoverlabel/font/_familysrc.py index 697e132de3..a31c652ab1 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_lineposition.py b/plotly/validators/scattermap/hoverlabel/font/_lineposition.py index 1da7c967b8..2a3a8a4d06 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scattermap/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattermap/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scattermap/hoverlabel/font/_linepositionsrc.py index 3e30fe6c37..74165616a1 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_shadow.py b/plotly/validators/scattermap/hoverlabel/font/_shadow.py index 5ea5c3b7d8..7b35227772 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_shadow.py +++ b/plotly/validators/scattermap/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermap/hoverlabel/font/_shadowsrc.py b/plotly/validators/scattermap/hoverlabel/font/_shadowsrc.py index a518996fa6..d33dd10b31 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_size.py b/plotly/validators/scattermap/hoverlabel/font/_size.py index 1b9fe472a2..405c7580ed 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_size.py +++ b/plotly/validators/scattermap/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattermap/hoverlabel/font/_sizesrc.py b/plotly/validators/scattermap/hoverlabel/font/_sizesrc.py index 1a16679b4e..8d928fb5eb 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_style.py b/plotly/validators/scattermap/hoverlabel/font/_style.py index 8f72f4481e..5990ac911f 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_style.py +++ b/plotly/validators/scattermap/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattermap/hoverlabel/font/_stylesrc.py b/plotly/validators/scattermap/hoverlabel/font/_stylesrc.py index a1f6b8b72c..440db4665b 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_textcase.py b/plotly/validators/scattermap/hoverlabel/font/_textcase.py index 4649ebd868..478937cd6b 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_textcase.py +++ b/plotly/validators/scattermap/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattermap/hoverlabel/font/_textcasesrc.py b/plotly/validators/scattermap/hoverlabel/font/_textcasesrc.py index 3b2add6053..fbf070f327 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_variant.py b/plotly/validators/scattermap/hoverlabel/font/_variant.py index 5c5693429c..66d7473209 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_variant.py +++ b/plotly/validators/scattermap/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scattermap/hoverlabel/font/_variantsrc.py b/plotly/validators/scattermap/hoverlabel/font/_variantsrc.py index c73d29a6db..9b2f2adaf1 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/hoverlabel/font/_weight.py b/plotly/validators/scattermap/hoverlabel/font/_weight.py index 4f06431b6f..3abce402e4 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_weight.py +++ b/plotly/validators/scattermap/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermap.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattermap/hoverlabel/font/_weightsrc.py b/plotly/validators/scattermap/hoverlabel/font/_weightsrc.py index 6152cc5287..0cc88f21b1 100644 --- a/plotly/validators/scattermap/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scattermap/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattermap.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/legendgrouptitle/__init__.py b/plotly/validators/scattermap/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scattermap/legendgrouptitle/__init__.py +++ b/plotly/validators/scattermap/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scattermap/legendgrouptitle/_font.py b/plotly/validators/scattermap/legendgrouptitle/_font.py index b4c3e7a89f..98db7fbc5e 100644 --- a/plotly/validators/scattermap/legendgrouptitle/_font.py +++ b/plotly/validators/scattermap/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattermap.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermap/legendgrouptitle/_text.py b/plotly/validators/scattermap/legendgrouptitle/_text.py index 2fef42c193..af3e048e49 100644 --- a/plotly/validators/scattermap/legendgrouptitle/_text.py +++ b/plotly/validators/scattermap/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattermap.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/legendgrouptitle/font/__init__.py b/plotly/validators/scattermap/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_color.py b/plotly/validators/scattermap/legendgrouptitle/font/_color.py index 4f0d423551..d60ae783c4 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_color.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_family.py b/plotly/validators/scattermap/legendgrouptitle/font/_family.py index 5b4f40932f..a2c9155095 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_family.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_lineposition.py b/plotly/validators/scattermap/legendgrouptitle/font/_lineposition.py index b98b6baafa..faf227a2fd 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_shadow.py b/plotly/validators/scattermap/legendgrouptitle/font/_shadow.py index 74ab48f8b0..2670e233f9 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_size.py b/plotly/validators/scattermap/legendgrouptitle/font/_size.py index 511f327a28..3d21665554 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_size.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_style.py b/plotly/validators/scattermap/legendgrouptitle/font/_style.py index cde691b49c..9fbfbba4dc 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_style.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_textcase.py b/plotly/validators/scattermap/legendgrouptitle/font/_textcase.py index 23ba65a998..dc7b03c2ed 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_variant.py b/plotly/validators/scattermap/legendgrouptitle/font/_variant.py index 7021092c3d..b0621c5896 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermap/legendgrouptitle/font/_weight.py b/plotly/validators/scattermap/legendgrouptitle/font/_weight.py index 9e6f2c9c81..8dacc3d63d 100644 --- a/plotly/validators/scattermap/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scattermap/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermap.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermap/line/__init__.py b/plotly/validators/scattermap/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/scattermap/line/__init__.py +++ b/plotly/validators/scattermap/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/scattermap/line/_color.py b/plotly/validators/scattermap/line/_color.py index ec51816317..e746ed7cca 100644 --- a/plotly/validators/scattermap/line/_color.py +++ b/plotly/validators/scattermap/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattermap.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/line/_width.py b/plotly/validators/scattermap/line/_width.py index 43b6ec3591..b3a15d0e9b 100644 --- a/plotly/validators/scattermap/line/_width.py +++ b/plotly/validators/scattermap/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattermap.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/__init__.py b/plotly/validators/scattermap/marker/__init__.py index 1560474e41..22d40af5a8 100644 --- a/plotly/validators/scattermap/marker/__init__.py +++ b/plotly/validators/scattermap/marker/__init__.py @@ -1,61 +1,33 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angle import AngleValidator - from ._allowoverlap import AllowoverlapValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angle.AngleValidator", - "._allowoverlap.AllowoverlapValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angle.AngleValidator", + "._allowoverlap.AllowoverlapValidator", + ], +) diff --git a/plotly/validators/scattermap/marker/_allowoverlap.py b/plotly/validators/scattermap/marker/_allowoverlap.py index 82eb588373..751a9e4892 100644 --- a/plotly/validators/scattermap/marker/_allowoverlap.py +++ b/plotly/validators/scattermap/marker/_allowoverlap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AllowoverlapValidator(_plotly_utils.basevalidators.BooleanValidator): +class AllowoverlapValidator(_bv.BooleanValidator): def __init__( self, plotly_name="allowoverlap", parent_name="scattermap.marker", **kwargs ): - super(AllowoverlapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_angle.py b/plotly/validators/scattermap/marker/_angle.py index c8888312e2..a1722c2383 100644 --- a/plotly/validators/scattermap/marker/_angle.py +++ b/plotly/validators/scattermap/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.NumberValidator): +class AngleValidator(_bv.NumberValidator): def __init__(self, plotly_name="angle", parent_name="scattermap.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/marker/_anglesrc.py b/plotly/validators/scattermap/marker/_anglesrc.py index 9b33c61f03..81b019a27d 100644 --- a/plotly/validators/scattermap/marker/_anglesrc.py +++ b/plotly/validators/scattermap/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scattermap.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_autocolorscale.py b/plotly/validators/scattermap/marker/_autocolorscale.py index aead9eaecc..619add3980 100644 --- a/plotly/validators/scattermap/marker/_autocolorscale.py +++ b/plotly/validators/scattermap/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattermap.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattermap/marker/_cauto.py b/plotly/validators/scattermap/marker/_cauto.py index 70a73b27b7..1149485f40 100644 --- a/plotly/validators/scattermap/marker/_cauto.py +++ b/plotly/validators/scattermap/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="scattermap.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattermap/marker/_cmax.py b/plotly/validators/scattermap/marker/_cmax.py index 4f7dd5fa23..828e04fa86 100644 --- a/plotly/validators/scattermap/marker/_cmax.py +++ b/plotly/validators/scattermap/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scattermap.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattermap/marker/_cmid.py b/plotly/validators/scattermap/marker/_cmid.py index 9f49629913..b2c01eee04 100644 --- a/plotly/validators/scattermap/marker/_cmid.py +++ b/plotly/validators/scattermap/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scattermap.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattermap/marker/_cmin.py b/plotly/validators/scattermap/marker/_cmin.py index 84c56d57c8..3c4cfcfb8f 100644 --- a/plotly/validators/scattermap/marker/_cmin.py +++ b/plotly/validators/scattermap/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scattermap.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattermap/marker/_color.py b/plotly/validators/scattermap/marker/_color.py index d4fefd2566..a32b638d86 100644 --- a/plotly/validators/scattermap/marker/_color.py +++ b/plotly/validators/scattermap/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattermap.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattermap/marker/_coloraxis.py b/plotly/validators/scattermap/marker/_coloraxis.py index 4cffb01936..6f6d2c8ef9 100644 --- a/plotly/validators/scattermap/marker/_coloraxis.py +++ b/plotly/validators/scattermap/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattermap.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattermap/marker/_colorbar.py b/plotly/validators/scattermap/marker/_colorbar.py index fc17b1b511..4c0618468c 100644 --- a/plotly/validators/scattermap/marker/_colorbar.py +++ b/plotly/validators/scattermap/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scattermap.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - map.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattermap.marker.colorbar.tickformatstopdefa - ults), sets the default property values to use - for elements of - scattermap.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermap.marker. - colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scattermap/marker/_colorscale.py b/plotly/validators/scattermap/marker/_colorscale.py index 2475facda1..12fa32d5dc 100644 --- a/plotly/validators/scattermap/marker/_colorscale.py +++ b/plotly/validators/scattermap/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattermap.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattermap/marker/_colorsrc.py b/plotly/validators/scattermap/marker/_colorsrc.py index 4e879f8043..acd7588fc3 100644 --- a/plotly/validators/scattermap/marker/_colorsrc.py +++ b/plotly/validators/scattermap/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermap.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_opacity.py b/plotly/validators/scattermap/marker/_opacity.py index 04896701e0..1f199dbe18 100644 --- a/plotly/validators/scattermap/marker/_opacity.py +++ b/plotly/validators/scattermap/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermap.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattermap/marker/_opacitysrc.py b/plotly/validators/scattermap/marker/_opacitysrc.py index b5d305f926..7ae6503520 100644 --- a/plotly/validators/scattermap/marker/_opacitysrc.py +++ b/plotly/validators/scattermap/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattermap.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_reversescale.py b/plotly/validators/scattermap/marker/_reversescale.py index af3e5abc21..6300f95402 100644 --- a/plotly/validators/scattermap/marker/_reversescale.py +++ b/plotly/validators/scattermap/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattermap.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_showscale.py b/plotly/validators/scattermap/marker/_showscale.py index 75fa2cc9eb..9980f4d66f 100644 --- a/plotly/validators/scattermap/marker/_showscale.py +++ b/plotly/validators/scattermap/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattermap.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_size.py b/plotly/validators/scattermap/marker/_size.py index 31c07b717e..7d16b82d72 100644 --- a/plotly/validators/scattermap/marker/_size.py +++ b/plotly/validators/scattermap/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattermap.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/marker/_sizemin.py b/plotly/validators/scattermap/marker/_sizemin.py index 2a7ccd99db..702ed086fd 100644 --- a/plotly/validators/scattermap/marker/_sizemin.py +++ b/plotly/validators/scattermap/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scattermap.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/_sizemode.py b/plotly/validators/scattermap/marker/_sizemode.py index 7bd38b5d49..8fc1cdf127 100644 --- a/plotly/validators/scattermap/marker/_sizemode.py +++ b/plotly/validators/scattermap/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattermap.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/_sizeref.py b/plotly/validators/scattermap/marker/_sizeref.py index 167ef979e3..b66cd30c6b 100644 --- a/plotly/validators/scattermap/marker/_sizeref.py +++ b/plotly/validators/scattermap/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scattermap.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_sizesrc.py b/plotly/validators/scattermap/marker/_sizesrc.py index 940dd1adc8..6de2865a6d 100644 --- a/plotly/validators/scattermap/marker/_sizesrc.py +++ b/plotly/validators/scattermap/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermap.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/_symbol.py b/plotly/validators/scattermap/marker/_symbol.py index 44ec16ec9c..0fc75b540d 100644 --- a/plotly/validators/scattermap/marker/_symbol.py +++ b/plotly/validators/scattermap/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): +class SymbolValidator(_bv.StringValidator): def __init__(self, plotly_name="symbol", parent_name="scattermap.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermap/marker/_symbolsrc.py b/plotly/validators/scattermap/marker/_symbolsrc.py index 878194d24f..3982ed0a4e 100644 --- a/plotly/validators/scattermap/marker/_symbolsrc.py +++ b/plotly/validators/scattermap/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattermap.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/__init__.py b/plotly/validators/scattermap/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scattermap/marker/colorbar/__init__.py +++ b/plotly/validators/scattermap/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scattermap/marker/colorbar/_bgcolor.py b/plotly/validators/scattermap/marker/colorbar/_bgcolor.py index 6cd837fae4..4f9f549be3 100644 --- a/plotly/validators/scattermap/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scattermap/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattermap.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_bordercolor.py b/plotly/validators/scattermap/marker/colorbar/_bordercolor.py index 817f4a3261..1ef5e919e4 100644 --- a/plotly/validators/scattermap/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scattermap/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_borderwidth.py b/plotly/validators/scattermap/marker/colorbar/_borderwidth.py index e13a66c045..5ca3b03a33 100644 --- a/plotly/validators/scattermap/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scattermap/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_dtick.py b/plotly/validators/scattermap/marker/colorbar/_dtick.py index 2107e5928c..a8c42b0967 100644 --- a/plotly/validators/scattermap/marker/colorbar/_dtick.py +++ b/plotly/validators/scattermap/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scattermap.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_exponentformat.py b/plotly/validators/scattermap/marker/colorbar/_exponentformat.py index ba0b8e0a60..2c54966457 100644 --- a/plotly/validators/scattermap/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scattermap/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_labelalias.py b/plotly/validators/scattermap/marker/colorbar/_labelalias.py index e787dba654..02ae9aeb24 100644 --- a/plotly/validators/scattermap/marker/colorbar/_labelalias.py +++ b/plotly/validators/scattermap/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_len.py b/plotly/validators/scattermap/marker/colorbar/_len.py index a7aa81599e..8e2683c54f 100644 --- a/plotly/validators/scattermap/marker/colorbar/_len.py +++ b/plotly/validators/scattermap/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scattermap.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_lenmode.py b/plotly/validators/scattermap/marker/colorbar/_lenmode.py index 27487baeff..e80f476c97 100644 --- a/plotly/validators/scattermap/marker/colorbar/_lenmode.py +++ b/plotly/validators/scattermap/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattermap.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_minexponent.py b/plotly/validators/scattermap/marker/colorbar/_minexponent.py index 7f3b748dae..32ff075029 100644 --- a/plotly/validators/scattermap/marker/colorbar/_minexponent.py +++ b/plotly/validators/scattermap/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_nticks.py b/plotly/validators/scattermap/marker/colorbar/_nticks.py index ce86070b2f..b38dd27ac9 100644 --- a/plotly/validators/scattermap/marker/colorbar/_nticks.py +++ b/plotly/validators/scattermap/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scattermap.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_orientation.py b/plotly/validators/scattermap/marker/colorbar/_orientation.py index 4df6303dfb..42b8d1a777 100644 --- a/plotly/validators/scattermap/marker/colorbar/_orientation.py +++ b/plotly/validators/scattermap/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_outlinecolor.py b/plotly/validators/scattermap/marker/colorbar/_outlinecolor.py index 0796630e3d..8923db43d7 100644 --- a/plotly/validators/scattermap/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scattermap/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_outlinewidth.py b/plotly/validators/scattermap/marker/colorbar/_outlinewidth.py index 049c4df1f8..445445d453 100644 --- a/plotly/validators/scattermap/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scattermap/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_separatethousands.py b/plotly/validators/scattermap/marker/colorbar/_separatethousands.py index b10abcb939..1794e7bbeb 100644 --- a/plotly/validators/scattermap/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scattermap/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_showexponent.py b/plotly/validators/scattermap/marker/colorbar/_showexponent.py index 6f17a280bf..4816bf445c 100644 --- a/plotly/validators/scattermap/marker/colorbar/_showexponent.py +++ b/plotly/validators/scattermap/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_showticklabels.py b/plotly/validators/scattermap/marker/colorbar/_showticklabels.py index ebce23113f..8b42f1c204 100644 --- a/plotly/validators/scattermap/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scattermap/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_showtickprefix.py b/plotly/validators/scattermap/marker/colorbar/_showtickprefix.py index 144c21773a..15e19f9e50 100644 --- a/plotly/validators/scattermap/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scattermap/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_showticksuffix.py b/plotly/validators/scattermap/marker/colorbar/_showticksuffix.py index 26473b2d46..aafbe8e094 100644 --- a/plotly/validators/scattermap/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scattermap/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_thickness.py b/plotly/validators/scattermap/marker/colorbar/_thickness.py index 3389d0ce71..085d569f7f 100644 --- a/plotly/validators/scattermap/marker/colorbar/_thickness.py +++ b/plotly/validators/scattermap/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_thicknessmode.py b/plotly/validators/scattermap/marker/colorbar/_thicknessmode.py index 2bbae3981e..659035754b 100644 --- a/plotly/validators/scattermap/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scattermap/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_tick0.py b/plotly/validators/scattermap/marker/colorbar/_tick0.py index a2fd5c42a5..ac6c0b613e 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tick0.py +++ b/plotly/validators/scattermap/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scattermap.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_tickangle.py b/plotly/validators/scattermap/marker/colorbar/_tickangle.py index 2e9082337c..9edea3f817 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickangle.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_tickcolor.py b/plotly/validators/scattermap/marker/colorbar/_tickcolor.py index 196a338238..d917f1a4f8 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_tickfont.py b/plotly/validators/scattermap/marker/colorbar/_tickfont.py index d8e66d22bf..1fa23ec513 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickfont.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_tickformat.py b/plotly/validators/scattermap/marker/colorbar/_tickformat.py index dfc46830a5..4e909a815a 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickformat.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scattermap/marker/colorbar/_tickformatstopdefaults.py index e8e646b654..17b03976a6 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scattermap/marker/colorbar/_tickformatstops.py b/plotly/validators/scattermap/marker/colorbar/_tickformatstops.py index 8213517155..d91620eb30 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scattermap/marker/colorbar/_ticklabeloverflow.py index 3fbb3a3861..e798466434 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_ticklabelposition.py b/plotly/validators/scattermap/marker/colorbar/_ticklabelposition.py index fa873a7fff..1b9ed444f3 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermap/marker/colorbar/_ticklabelstep.py b/plotly/validators/scattermap/marker/colorbar/_ticklabelstep.py index c6cc44d50e..4767af33f3 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_ticklen.py b/plotly/validators/scattermap/marker/colorbar/_ticklen.py index 0f2c0e9662..a33bdb5a2e 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticklen.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_tickmode.py b/plotly/validators/scattermap/marker/colorbar/_tickmode.py index cc7bfa57cb..5e145b34bb 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickmode.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scattermap/marker/colorbar/_tickprefix.py b/plotly/validators/scattermap/marker/colorbar/_tickprefix.py index 234d6b6977..df5af1534a 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_ticks.py b/plotly/validators/scattermap/marker/colorbar/_ticks.py index 9344604f83..afca9b98b5 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticks.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_ticksuffix.py b/plotly/validators/scattermap/marker/colorbar/_ticksuffix.py index c3853b8264..055f5fdb07 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_ticktext.py b/plotly/validators/scattermap/marker/colorbar/_ticktext.py index bf758dea21..2d06a4d69d 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticktext.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_ticktextsrc.py b/plotly/validators/scattermap/marker/colorbar/_ticktextsrc.py index 6ad9c7c950..0ee3f6a295 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scattermap/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_tickvals.py b/plotly/validators/scattermap/marker/colorbar/_tickvals.py index 971c1070ac..237d490416 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickvals.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_tickvalssrc.py b/plotly/validators/scattermap/marker/colorbar/_tickvalssrc.py index 1c8c6af3c8..37cb70068f 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_tickwidth.py b/plotly/validators/scattermap/marker/colorbar/_tickwidth.py index 99db01c8d1..5e0802b691 100644 --- a/plotly/validators/scattermap/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scattermap/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scattermap.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_title.py b/plotly/validators/scattermap/marker/colorbar/_title.py index fe3523b7fb..70ad8ad6bc 100644 --- a/plotly/validators/scattermap/marker/colorbar/_title.py +++ b/plotly/validators/scattermap/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattermap.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_x.py b/plotly/validators/scattermap/marker/colorbar/_x.py index a30ad917da..678d3e43d3 100644 --- a/plotly/validators/scattermap/marker/colorbar/_x.py +++ b/plotly/validators/scattermap/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattermap.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_xanchor.py b/plotly/validators/scattermap/marker/colorbar/_xanchor.py index bc329f9bfa..dfd7dc3e48 100644 --- a/plotly/validators/scattermap/marker/colorbar/_xanchor.py +++ b/plotly/validators/scattermap/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scattermap.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_xpad.py b/plotly/validators/scattermap/marker/colorbar/_xpad.py index 67d61b4fc9..28a1af402f 100644 --- a/plotly/validators/scattermap/marker/colorbar/_xpad.py +++ b/plotly/validators/scattermap/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattermap.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_xref.py b/plotly/validators/scattermap/marker/colorbar/_xref.py index 4b83341586..2f1e5676b8 100644 --- a/plotly/validators/scattermap/marker/colorbar/_xref.py +++ b/plotly/validators/scattermap/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattermap.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_y.py b/plotly/validators/scattermap/marker/colorbar/_y.py index 17d74d9cdc..08d4db4008 100644 --- a/plotly/validators/scattermap/marker/colorbar/_y.py +++ b/plotly/validators/scattermap/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scattermap.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/_yanchor.py b/plotly/validators/scattermap/marker/colorbar/_yanchor.py index 058a2451e5..9a67bc9283 100644 --- a/plotly/validators/scattermap/marker/colorbar/_yanchor.py +++ b/plotly/validators/scattermap/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scattermap.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_ypad.py b/plotly/validators/scattermap/marker/colorbar/_ypad.py index 25de673212..469629d47d 100644 --- a/plotly/validators/scattermap/marker/colorbar/_ypad.py +++ b/plotly/validators/scattermap/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattermap.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/_yref.py b/plotly/validators/scattermap/marker/colorbar/_yref.py index 692edeb58c..d59db34eeb 100644 --- a/plotly/validators/scattermap/marker/colorbar/_yref.py +++ b/plotly/validators/scattermap/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scattermap.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/__init__.py b/plotly/validators/scattermap/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_color.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_color.py index ec378db715..719a6a86a9 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_family.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_family.py index 2ce2c8a5ea..772c62c806 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_lineposition.py index c3e2c98e30..b9722f92d3 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_shadow.py index 6156893827..d9d1edb5f0 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_size.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_size.py index ea700bfec8..21bb37d694 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_style.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_style.py index d56e408d27..93341d05f0 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_textcase.py index 916d34bd90..8098212b2d 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_variant.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_variant.py index eee2dbe558..50b7d8282b 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermap/marker/colorbar/tickfont/_weight.py b/plotly/validators/scattermap/marker/colorbar/tickfont/_weight.py index eeb6bcd397..1fa0a64850 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scattermap/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermap.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermap/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scattermap/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scattermap/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_dtickrange.py index 7cba676b0d..be52fc99eb 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattermap.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_enabled.py index 999dd894ad..fd129e2340 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattermap.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_name.py index 43ca86bc53..36c4265f2a 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scattermap.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_templateitemname.py index 7b58f36a96..cf3cdbdf09 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scattermap.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_value.py index b685d10f29..bc1bb615f6 100644 --- a/plotly/validators/scattermap/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scattermap/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scattermap.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/title/__init__.py b/plotly/validators/scattermap/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/__init__.py +++ b/plotly/validators/scattermap/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scattermap/marker/colorbar/title/_font.py b/plotly/validators/scattermap/marker/colorbar/title/_font.py index cbdde43314..2ac2d1b22b 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/_font.py +++ b/plotly/validators/scattermap/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattermap.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/title/_side.py b/plotly/validators/scattermap/marker/colorbar/title/_side.py index 1006d026f4..f357b6b3fc 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/_side.py +++ b/plotly/validators/scattermap/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattermap.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/title/_text.py b/plotly/validators/scattermap/marker/colorbar/title/_text.py index b040699ac4..826c88e11b 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/_text.py +++ b/plotly/validators/scattermap/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattermap.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/__init__.py b/plotly/validators/scattermap/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_color.py b/plotly/validators/scattermap/marker/colorbar/title/font/_color.py index 36d0585ea8..6ee9c013c2 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_family.py b/plotly/validators/scattermap/marker/colorbar/title/font/_family.py index 857033b41d..aef9238f06 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scattermap/marker/colorbar/title/font/_lineposition.py index b6b54255eb..65b050e482 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_shadow.py b/plotly/validators/scattermap/marker/colorbar/title/font/_shadow.py index c1d0017aff..96ce7083d2 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_size.py b/plotly/validators/scattermap/marker/colorbar/title/font/_size.py index 45fa89752d..72b03e1002 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_style.py b/plotly/validators/scattermap/marker/colorbar/title/font/_style.py index f4e2a297b9..940a85c5ab 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_textcase.py b/plotly/validators/scattermap/marker/colorbar/title/font/_textcase.py index 3ea2d40295..d4c4be0d4a 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_variant.py b/plotly/validators/scattermap/marker/colorbar/title/font/_variant.py index ed5b4fb0e5..180ad12169 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermap/marker/colorbar/title/font/_weight.py b/plotly/validators/scattermap/marker/colorbar/title/font/_weight.py index b324e80448..029eb27538 100644 --- a/plotly/validators/scattermap/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scattermap/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermap.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermap/selected/__init__.py b/plotly/validators/scattermap/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/scattermap/selected/__init__.py +++ b/plotly/validators/scattermap/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattermap/selected/_marker.py b/plotly/validators/scattermap/selected/_marker.py index d8c13c04f0..65f6d1ebd4 100644 --- a/plotly/validators/scattermap/selected/_marker.py +++ b/plotly/validators/scattermap/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattermap.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattermap/selected/marker/__init__.py b/plotly/validators/scattermap/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattermap/selected/marker/__init__.py +++ b/plotly/validators/scattermap/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattermap/selected/marker/_color.py b/plotly/validators/scattermap/selected/marker/_color.py index 1be4f77e98..6f16e1a367 100644 --- a/plotly/validators/scattermap/selected/marker/_color.py +++ b/plotly/validators/scattermap/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/selected/marker/_opacity.py b/plotly/validators/scattermap/selected/marker/_opacity.py index ebc2f57c67..d9f0a96ced 100644 --- a/plotly/validators/scattermap/selected/marker/_opacity.py +++ b/plotly/validators/scattermap/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermap.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/selected/marker/_size.py b/plotly/validators/scattermap/selected/marker/_size.py index 0cad239bad..428d77eb8a 100644 --- a/plotly/validators/scattermap/selected/marker/_size.py +++ b/plotly/validators/scattermap/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermap.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermap/stream/__init__.py b/plotly/validators/scattermap/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scattermap/stream/__init__.py +++ b/plotly/validators/scattermap/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scattermap/stream/_maxpoints.py b/plotly/validators/scattermap/stream/_maxpoints.py index 3c805e0ae6..d85da6b8b8 100644 --- a/plotly/validators/scattermap/stream/_maxpoints.py +++ b/plotly/validators/scattermap/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattermap.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/stream/_token.py b/plotly/validators/scattermap/stream/_token.py index 1187bbf747..fedd3f7165 100644 --- a/plotly/validators/scattermap/stream/_token.py +++ b/plotly/validators/scattermap/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="scattermap.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermap/textfont/__init__.py b/plotly/validators/scattermap/textfont/__init__.py index 9301c0688c..13cbf9ae54 100644 --- a/plotly/validators/scattermap/textfont/__init__.py +++ b/plotly/validators/scattermap/textfont/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermap/textfont/_color.py b/plotly/validators/scattermap/textfont/_color.py index 995e394128..27c7d3da95 100644 --- a/plotly/validators/scattermap/textfont/_color.py +++ b/plotly/validators/scattermap/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/textfont/_family.py b/plotly/validators/scattermap/textfont/_family.py index e298237611..5b88c2809a 100644 --- a/plotly/validators/scattermap/textfont/_family.py +++ b/plotly/validators/scattermap/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermap.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermap/textfont/_size.py b/plotly/validators/scattermap/textfont/_size.py index 69c62feba4..5a3bdfb951 100644 --- a/plotly/validators/scattermap/textfont/_size.py +++ b/plotly/validators/scattermap/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattermap.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermap/textfont/_style.py b/plotly/validators/scattermap/textfont/_style.py index ca1f49fa28..098a024de2 100644 --- a/plotly/validators/scattermap/textfont/_style.py +++ b/plotly/validators/scattermap/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermap.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermap/textfont/_weight.py b/plotly/validators/scattermap/textfont/_weight.py index 27cf0506c5..25d51677b0 100644 --- a/plotly/validators/scattermap/textfont/_weight.py +++ b/plotly/validators/scattermap/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermap.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermap/unselected/__init__.py b/plotly/validators/scattermap/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/scattermap/unselected/__init__.py +++ b/plotly/validators/scattermap/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattermap/unselected/_marker.py b/plotly/validators/scattermap/unselected/_marker.py index 51971a7f67..b8000230cf 100644 --- a/plotly/validators/scattermap/unselected/_marker.py +++ b/plotly/validators/scattermap/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattermap.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattermap/unselected/marker/__init__.py b/plotly/validators/scattermap/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattermap/unselected/marker/__init__.py +++ b/plotly/validators/scattermap/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattermap/unselected/marker/_color.py b/plotly/validators/scattermap/unselected/marker/_color.py index 20c1ae57cb..49532186de 100644 --- a/plotly/validators/scattermap/unselected/marker/_color.py +++ b/plotly/validators/scattermap/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermap.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermap/unselected/marker/_opacity.py b/plotly/validators/scattermap/unselected/marker/_opacity.py index f1d964847a..897a24713e 100644 --- a/plotly/validators/scattermap/unselected/marker/_opacity.py +++ b/plotly/validators/scattermap/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermap.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermap/unselected/marker/_size.py b/plotly/validators/scattermap/unselected/marker/_size.py index 9a0a48c2c2..d3ffd3e4ea 100644 --- a/plotly/validators/scattermap/unselected/marker/_size.py +++ b/plotly/validators/scattermap/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermap.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/__init__.py b/plotly/validators/scattermapbox/__init__.py index 5abe04051d..8d6c1c2da7 100644 --- a/plotly/validators/scattermapbox/__init__.py +++ b/plotly/validators/scattermapbox/__init__.py @@ -1,107 +1,56 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._lonsrc import LonsrcValidator - from ._lon import LonValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._latsrc import LatsrcValidator - from ._lat import LatValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._cluster import ClusterValidator - from ._below import BelowValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._lonsrc.LonsrcValidator", - "._lon.LonValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._latsrc.LatsrcValidator", - "._lat.LatValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._cluster.ClusterValidator", - "._below.BelowValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._lonsrc.LonsrcValidator", + "._lon.LonValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._latsrc.LatsrcValidator", + "._lat.LatValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cluster.ClusterValidator", + "._below.BelowValidator", + ], +) diff --git a/plotly/validators/scattermapbox/_below.py b/plotly/validators/scattermapbox/_below.py index 342cd58748..4d3e3e16e2 100644 --- a/plotly/validators/scattermapbox/_below.py +++ b/plotly/validators/scattermapbox/_below.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BelowValidator(_plotly_utils.basevalidators.StringValidator): +class BelowValidator(_bv.StringValidator): def __init__(self, plotly_name="below", parent_name="scattermapbox", **kwargs): - super(BelowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_cluster.py b/plotly/validators/scattermapbox/_cluster.py index 3aa413320e..d96f4ff056 100644 --- a/plotly/validators/scattermapbox/_cluster.py +++ b/plotly/validators/scattermapbox/_cluster.py @@ -1,48 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ClusterValidator(_plotly_utils.basevalidators.CompoundValidator): +class ClusterValidator(_bv.CompoundValidator): def __init__(self, plotly_name="cluster", parent_name="scattermapbox", **kwargs): - super(ClusterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Cluster"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color for each cluster step. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - enabled - Determines whether clustering is enabled or - disabled. - maxzoom - Sets the maximum zoom level. At zoom levels - equal to or greater than this, points will - never be clustered. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - size - Sets the size for each cluster step. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - step - Sets how many points it takes to create a - cluster or advance to the next cluster step. - Use this in conjunction with arrays for `size` - and / or `color`. If an integer, steps start at - multiples of this number. If an array, each - step extends from the given value until one - less than the next value. - stepsrc - Sets the source reference on Chart Studio Cloud - for `step`. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_connectgaps.py b/plotly/validators/scattermapbox/_connectgaps.py index e7ccb84266..4c64970c43 100644 --- a/plotly/validators/scattermapbox/_connectgaps.py +++ b/plotly/validators/scattermapbox/_connectgaps.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scattermapbox", **kwargs ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_customdata.py b/plotly/validators/scattermapbox/_customdata.py index 25a7822f44..c5cf96fdb5 100644 --- a/plotly/validators/scattermapbox/_customdata.py +++ b/plotly/validators/scattermapbox/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scattermapbox", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_customdatasrc.py b/plotly/validators/scattermapbox/_customdatasrc.py index 9165d844bc..1bb4751c74 100644 --- a/plotly/validators/scattermapbox/_customdatasrc.py +++ b/plotly/validators/scattermapbox/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="scattermapbox", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_fill.py b/plotly/validators/scattermapbox/_fill.py index 61b0c4a024..b35f0c44b6 100644 --- a/plotly/validators/scattermapbox/_fill.py +++ b/plotly/validators/scattermapbox/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scattermapbox", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself"]), **kwargs, diff --git a/plotly/validators/scattermapbox/_fillcolor.py b/plotly/validators/scattermapbox/_fillcolor.py index 68509325dd..7789b90b4d 100644 --- a/plotly/validators/scattermapbox/_fillcolor.py +++ b/plotly/validators/scattermapbox/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattermapbox", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_hoverinfo.py b/plotly/validators/scattermapbox/_hoverinfo.py index 5f31c98bb4..c5dbfce610 100644 --- a/plotly/validators/scattermapbox/_hoverinfo.py +++ b/plotly/validators/scattermapbox/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scattermapbox", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scattermapbox/_hoverinfosrc.py b/plotly/validators/scattermapbox/_hoverinfosrc.py index ca674e9987..cbc059160e 100644 --- a/plotly/validators/scattermapbox/_hoverinfosrc.py +++ b/plotly/validators/scattermapbox/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="scattermapbox", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_hoverlabel.py b/plotly/validators/scattermapbox/_hoverlabel.py index d64d472690..4f31a2951b 100644 --- a/plotly/validators/scattermapbox/_hoverlabel.py +++ b/plotly/validators/scattermapbox/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattermapbox", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_hovertemplate.py b/plotly/validators/scattermapbox/_hovertemplate.py index e852a325e0..5d79897676 100644 --- a/plotly/validators/scattermapbox/_hovertemplate.py +++ b/plotly/validators/scattermapbox/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scattermapbox", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/_hovertemplatesrc.py b/plotly/validators/scattermapbox/_hovertemplatesrc.py index e9bd881f56..864bc78510 100644 --- a/plotly/validators/scattermapbox/_hovertemplatesrc.py +++ b/plotly/validators/scattermapbox/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattermapbox", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_hovertext.py b/plotly/validators/scattermapbox/_hovertext.py index 5551981a29..1d31872b29 100644 --- a/plotly/validators/scattermapbox/_hovertext.py +++ b/plotly/validators/scattermapbox/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scattermapbox", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/_hovertextsrc.py b/plotly/validators/scattermapbox/_hovertextsrc.py index 793d83d547..23dd34d961 100644 --- a/plotly/validators/scattermapbox/_hovertextsrc.py +++ b/plotly/validators/scattermapbox/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="scattermapbox", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_ids.py b/plotly/validators/scattermapbox/_ids.py index 69ed8265a6..d7786690a8 100644 --- a/plotly/validators/scattermapbox/_ids.py +++ b/plotly/validators/scattermapbox/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scattermapbox", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_idssrc.py b/plotly/validators/scattermapbox/_idssrc.py index ab8392b80c..48396baa65 100644 --- a/plotly/validators/scattermapbox/_idssrc.py +++ b/plotly/validators/scattermapbox/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattermapbox", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_lat.py b/plotly/validators/scattermapbox/_lat.py index b42e1bad00..3730cdb0b8 100644 --- a/plotly/validators/scattermapbox/_lat.py +++ b/plotly/validators/scattermapbox/_lat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lat", parent_name="scattermapbox", **kwargs): - super(LatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_latsrc.py b/plotly/validators/scattermapbox/_latsrc.py index 0b8b1ff55a..18307da81d 100644 --- a/plotly/validators/scattermapbox/_latsrc.py +++ b/plotly/validators/scattermapbox/_latsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="latsrc", parent_name="scattermapbox", **kwargs): - super(LatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_legend.py b/plotly/validators/scattermapbox/_legend.py index 61eda251e7..8bf4322a6a 100644 --- a/plotly/validators/scattermapbox/_legend.py +++ b/plotly/validators/scattermapbox/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scattermapbox", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattermapbox/_legendgroup.py b/plotly/validators/scattermapbox/_legendgroup.py index 3f0e17ae1b..759ea4ab99 100644 --- a/plotly/validators/scattermapbox/_legendgroup.py +++ b/plotly/validators/scattermapbox/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="scattermapbox", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_legendgrouptitle.py b/plotly/validators/scattermapbox/_legendgrouptitle.py index 081389079e..eabca11814 100644 --- a/plotly/validators/scattermapbox/_legendgrouptitle.py +++ b/plotly/validators/scattermapbox/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattermapbox", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_legendrank.py b/plotly/validators/scattermapbox/_legendrank.py index 9b6de458f8..987d08215c 100644 --- a/plotly/validators/scattermapbox/_legendrank.py +++ b/plotly/validators/scattermapbox/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scattermapbox", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_legendwidth.py b/plotly/validators/scattermapbox/_legendwidth.py index 30a7362088..2ed0f2d3b8 100644 --- a/plotly/validators/scattermapbox/_legendwidth.py +++ b/plotly/validators/scattermapbox/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="scattermapbox", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/_line.py b/plotly/validators/scattermapbox/_line.py index 0aa64d96a0..9ce4bc780c 100644 --- a/plotly/validators/scattermapbox/_line.py +++ b/plotly/validators/scattermapbox/_line.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattermapbox", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_lon.py b/plotly/validators/scattermapbox/_lon.py index 3b2bfb0d0f..4cb787c895 100644 --- a/plotly/validators/scattermapbox/_lon.py +++ b/plotly/validators/scattermapbox/_lon.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LonValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="lon", parent_name="scattermapbox", **kwargs): - super(LonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_lonsrc.py b/plotly/validators/scattermapbox/_lonsrc.py index 54262bf32d..0f7d104dc4 100644 --- a/plotly/validators/scattermapbox/_lonsrc.py +++ b/plotly/validators/scattermapbox/_lonsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LonsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LonsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="lonsrc", parent_name="scattermapbox", **kwargs): - super(LonsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_marker.py b/plotly/validators/scattermapbox/_marker.py index 40b321ce54..20d0284e58 100644 --- a/plotly/validators/scattermapbox/_marker.py +++ b/plotly/validators/scattermapbox/_marker.py @@ -1,144 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattermapbox", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - allowoverlap - Flag to draw all symbols, even if they overlap. - angle - Sets the marker orientation from true North, in - degrees clockwise. When using the "auto" - default, no rotation would be applied in - perspective views which is different from using - a zero angle. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattermapbox.mark - er.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol. Full list: - https://www.mapbox.com/maki-icons/ Note that - the array `marker.color` and `marker.size` are - only available for "circle" symbols. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_meta.py b/plotly/validators/scattermapbox/_meta.py index 359ee67e58..fe0e9fc072 100644 --- a/plotly/validators/scattermapbox/_meta.py +++ b/plotly/validators/scattermapbox/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattermapbox", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattermapbox/_metasrc.py b/plotly/validators/scattermapbox/_metasrc.py index bf6b4fca60..07e757e3ad 100644 --- a/plotly/validators/scattermapbox/_metasrc.py +++ b/plotly/validators/scattermapbox/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattermapbox", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_mode.py b/plotly/validators/scattermapbox/_mode.py index e0d4ef26e6..46fbacda13 100644 --- a/plotly/validators/scattermapbox/_mode.py +++ b/plotly/validators/scattermapbox/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scattermapbox", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scattermapbox/_name.py b/plotly/validators/scattermapbox/_name.py index 6088c21e6e..378bf37143 100644 --- a/plotly/validators/scattermapbox/_name.py +++ b/plotly/validators/scattermapbox/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scattermapbox", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_opacity.py b/plotly/validators/scattermapbox/_opacity.py index 3fdf247794..3c54de93f4 100644 --- a/plotly/validators/scattermapbox/_opacity.py +++ b/plotly/validators/scattermapbox/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattermapbox", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/_selected.py b/plotly/validators/scattermapbox/_selected.py index 5117d010b9..0990ecfe39 100644 --- a/plotly/validators/scattermapbox/_selected.py +++ b/plotly/validators/scattermapbox/_selected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattermapbox", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattermapbox.sele - cted.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_selectedpoints.py b/plotly/validators/scattermapbox/_selectedpoints.py index 284e50bebf..223fcb105f 100644 --- a/plotly/validators/scattermapbox/_selectedpoints.py +++ b/plotly/validators/scattermapbox/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scattermapbox", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_showlegend.py b/plotly/validators/scattermapbox/_showlegend.py index f1be8c5471..37fcaae514 100644 --- a/plotly/validators/scattermapbox/_showlegend.py +++ b/plotly/validators/scattermapbox/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scattermapbox", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_stream.py b/plotly/validators/scattermapbox/_stream.py index 5726a169f7..312d636a90 100644 --- a/plotly/validators/scattermapbox/_stream.py +++ b/plotly/validators/scattermapbox/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattermapbox", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_subplot.py b/plotly/validators/scattermapbox/_subplot.py index 3a32042c1b..94dc05b30d 100644 --- a/plotly/validators/scattermapbox/_subplot.py +++ b/plotly/validators/scattermapbox/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="scattermapbox", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "mapbox"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/_text.py b/plotly/validators/scattermapbox/_text.py index 3943319278..aafada8523 100644 --- a/plotly/validators/scattermapbox/_text.py +++ b/plotly/validators/scattermapbox/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scattermapbox", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/_textfont.py b/plotly/validators/scattermapbox/_textfont.py index 6bc7ab76fc..b43b8b1d09 100644 --- a/plotly/validators/scattermapbox/_textfont.py +++ b/plotly/validators/scattermapbox/_textfont.py @@ -1,41 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattermapbox", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_textposition.py b/plotly/validators/scattermapbox/_textposition.py index 14895ddd3a..74eba60501 100644 --- a/plotly/validators/scattermapbox/_textposition.py +++ b/plotly/validators/scattermapbox/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scattermapbox", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattermapbox/_textsrc.py b/plotly/validators/scattermapbox/_textsrc.py index 114f1560a5..6773e3d777 100644 --- a/plotly/validators/scattermapbox/_textsrc.py +++ b/plotly/validators/scattermapbox/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattermapbox", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_texttemplate.py b/plotly/validators/scattermapbox/_texttemplate.py index a41df0ba1f..85c7f9f597 100644 --- a/plotly/validators/scattermapbox/_texttemplate.py +++ b/plotly/validators/scattermapbox/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scattermapbox", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/_texttemplatesrc.py b/plotly/validators/scattermapbox/_texttemplatesrc.py index a49fbebb5f..c0c463dd09 100644 --- a/plotly/validators/scattermapbox/_texttemplatesrc.py +++ b/plotly/validators/scattermapbox/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scattermapbox", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_uid.py b/plotly/validators/scattermapbox/_uid.py index b8049e2a33..06ead5cc1b 100644 --- a/plotly/validators/scattermapbox/_uid.py +++ b/plotly/validators/scattermapbox/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattermapbox", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_uirevision.py b/plotly/validators/scattermapbox/_uirevision.py index 5bdf0a8435..d903d53e9a 100644 --- a/plotly/validators/scattermapbox/_uirevision.py +++ b/plotly/validators/scattermapbox/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattermapbox", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/_unselected.py b/plotly/validators/scattermapbox/_unselected.py index 3e4106cc45..25ac401077 100644 --- a/plotly/validators/scattermapbox/_unselected.py +++ b/plotly/validators/scattermapbox/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattermapbox", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattermapbox.unse - lected.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/_visible.py b/plotly/validators/scattermapbox/_visible.py index 85640767fd..df6ab05769 100644 --- a/plotly/validators/scattermapbox/_visible.py +++ b/plotly/validators/scattermapbox/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattermapbox", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scattermapbox/cluster/__init__.py b/plotly/validators/scattermapbox/cluster/__init__.py index e8f530f8e9..34fca2d007 100644 --- a/plotly/validators/scattermapbox/cluster/__init__.py +++ b/plotly/validators/scattermapbox/cluster/__init__.py @@ -1,33 +1,19 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._stepsrc import StepsrcValidator - from ._step import StepValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxzoom import MaxzoomValidator - from ._enabled import EnabledValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._stepsrc.StepsrcValidator", - "._step.StepValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxzoom.MaxzoomValidator", - "._enabled.EnabledValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._stepsrc.StepsrcValidator", + "._step.StepValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxzoom.MaxzoomValidator", + "._enabled.EnabledValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/cluster/_color.py b/plotly/validators/scattermapbox/cluster/_color.py index 6c6c0bf9eb..5721edc58e 100644 --- a/plotly/validators/scattermapbox/cluster/_color.py +++ b/plotly/validators/scattermapbox/cluster/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.cluster", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/cluster/_colorsrc.py b/plotly/validators/scattermapbox/cluster/_colorsrc.py index f433d59b6c..5cbe1b81be 100644 --- a/plotly/validators/scattermapbox/cluster/_colorsrc.py +++ b/plotly/validators/scattermapbox/cluster/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermapbox.cluster", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/cluster/_enabled.py b/plotly/validators/scattermapbox/cluster/_enabled.py index 52228a271c..abf43652b7 100644 --- a/plotly/validators/scattermapbox/cluster/_enabled.py +++ b/plotly/validators/scattermapbox/cluster/_enabled.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattermapbox.cluster", **kwargs ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/cluster/_maxzoom.py b/plotly/validators/scattermapbox/cluster/_maxzoom.py index 2cd73397ad..a031c4df5f 100644 --- a/plotly/validators/scattermapbox/cluster/_maxzoom.py +++ b/plotly/validators/scattermapbox/cluster/_maxzoom.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxzoomValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxzoomValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxzoom", parent_name="scattermapbox.cluster", **kwargs ): - super(MaxzoomValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 24), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/cluster/_opacity.py b/plotly/validators/scattermapbox/cluster/_opacity.py index a6d4ee5b68..a0e7cb3b3e 100644 --- a/plotly/validators/scattermapbox/cluster/_opacity.py +++ b/plotly/validators/scattermapbox/cluster/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermapbox.cluster", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattermapbox/cluster/_opacitysrc.py b/plotly/validators/scattermapbox/cluster/_opacitysrc.py index d4018d97cc..c9ff88cdf9 100644 --- a/plotly/validators/scattermapbox/cluster/_opacitysrc.py +++ b/plotly/validators/scattermapbox/cluster/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattermapbox.cluster", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/cluster/_size.py b/plotly/validators/scattermapbox/cluster/_size.py index a245ebc9c7..86eb1c70e0 100644 --- a/plotly/validators/scattermapbox/cluster/_size.py +++ b/plotly/validators/scattermapbox/cluster/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.cluster", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/cluster/_sizesrc.py b/plotly/validators/scattermapbox/cluster/_sizesrc.py index 27c6c40862..b09b852467 100644 --- a/plotly/validators/scattermapbox/cluster/_sizesrc.py +++ b/plotly/validators/scattermapbox/cluster/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermapbox.cluster", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/cluster/_step.py b/plotly/validators/scattermapbox/cluster/_step.py index 0a594ea83e..11a4acc24c 100644 --- a/plotly/validators/scattermapbox/cluster/_step.py +++ b/plotly/validators/scattermapbox/cluster/_step.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepValidator(_plotly_utils.basevalidators.NumberValidator): +class StepValidator(_bv.NumberValidator): def __init__( self, plotly_name="step", parent_name="scattermapbox.cluster", **kwargs ): - super(StepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattermapbox/cluster/_stepsrc.py b/plotly/validators/scattermapbox/cluster/_stepsrc.py index 84ecc5d400..7835456734 100644 --- a/plotly/validators/scattermapbox/cluster/_stepsrc.py +++ b/plotly/validators/scattermapbox/cluster/_stepsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StepsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StepsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stepsrc", parent_name="scattermapbox.cluster", **kwargs ): - super(StepsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/__init__.py b/plotly/validators/scattermapbox/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scattermapbox/hoverlabel/__init__.py +++ b/plotly/validators/scattermapbox/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scattermapbox/hoverlabel/_align.py b/plotly/validators/scattermapbox/hoverlabel/_align.py index 24685733a0..ff4a207a72 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_align.py +++ b/plotly/validators/scattermapbox/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scattermapbox.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py b/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py index 5e67693780..6cb74bb413 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattermapbox.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py b/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py index 156b67964a..28adeb50ac 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py +++ b/plotly/validators/scattermapbox/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattermapbox.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py b/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py index 4862094a46..79679a5952 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattermapbox.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py b/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py index b82358b22f..705e48c455 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py +++ b/plotly/validators/scattermapbox/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattermapbox.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py b/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py index bc74011de0..e3d497e3ba 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattermapbox.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/_font.py b/plotly/validators/scattermapbox/hoverlabel/_font.py index 34e7985b69..20fc1a8ede 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_font.py +++ b/plotly/validators/scattermapbox/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattermapbox.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/hoverlabel/_namelength.py b/plotly/validators/scattermapbox/hoverlabel/_namelength.py index 058521370b..453e6cd098 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_namelength.py +++ b/plotly/validators/scattermapbox/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattermapbox.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py b/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py index ac93f946a1..e576e1b0da 100644 --- a/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scattermapbox.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/__init__.py b/plotly/validators/scattermapbox/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/__init__.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_color.py b/plotly/validators/scattermapbox/hoverlabel/font/_color.py index c928d85290..2cd40d36cc 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_color.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py index e38b914014..09dd69907e 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_family.py b/plotly/validators/scattermapbox/hoverlabel/font/_family.py index dec710d015..d8d10258f0 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_family.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py index 62e3a52ab2..1f6ea06932 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_lineposition.py b/plotly/validators/scattermapbox/hoverlabel/font/_lineposition.py index db39de573e..a87c544012 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_linepositionsrc.py index 6c641b9a19..6ba39a996d 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_shadow.py b/plotly/validators/scattermapbox/hoverlabel/font/_shadow.py index a11ee19674..098944cff5 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_shadow.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_shadowsrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_shadowsrc.py index 2707a774c1..e3a8addce4 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_size.py b/plotly/validators/scattermapbox/hoverlabel/font/_size.py index 37d27b6036..b271b84e2f 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_size.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py index 9b6afe3673..362aa9063e 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_style.py b/plotly/validators/scattermapbox/hoverlabel/font/_style.py index e1210da03b..19bda67e07 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_style.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermapbox.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_stylesrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_stylesrc.py index eee1a358bb..f25efb91f4 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_textcase.py b/plotly/validators/scattermapbox/hoverlabel/font/_textcase.py index 16fdc9e43f..e3ce56ce63 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_textcase.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_textcasesrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_textcasesrc.py index 1e5e40a1aa..48582eb353 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_variant.py b/plotly/validators/scattermapbox/hoverlabel/font/_variant.py index 369bd37d37..da55055e72 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_variant.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_variantsrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_variantsrc.py index 07825ed06b..77b94ba2d2 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_weight.py b/plotly/validators/scattermapbox/hoverlabel/font/_weight.py index f328b6c815..99a142ea76 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_weight.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattermapbox/hoverlabel/font/_weightsrc.py b/plotly/validators/scattermapbox/hoverlabel/font/_weightsrc.py index d4aa53c03f..882bf3e5ee 100644 --- a/plotly/validators/scattermapbox/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scattermapbox/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattermapbox.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/legendgrouptitle/__init__.py b/plotly/validators/scattermapbox/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/__init__.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scattermapbox/legendgrouptitle/_font.py b/plotly/validators/scattermapbox/legendgrouptitle/_font.py index 22886c7bde..90f8455f75 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/_font.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattermapbox.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/legendgrouptitle/_text.py b/plotly/validators/scattermapbox/legendgrouptitle/_text.py index c7ec0e7df7..341cfb34f4 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/_text.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattermapbox.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/__init__.py b/plotly/validators/scattermapbox/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_color.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_color.py index c81df93eea..f98b4396b4 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_color.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_family.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_family.py index 06356e1d25..4dece390ac 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_family.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_lineposition.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_lineposition.py index 41d8ab8d5d..29203ad70b 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_shadow.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_shadow.py index a6cc0f7cf5..09fc14acf1 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_size.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_size.py index 5b0adee143..f6f7a9c5fe 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_size.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_style.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_style.py index 12e09d5e2a..d4930fea75 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_style.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_textcase.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_textcase.py index 641070956d..0d67979bce 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_variant.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_variant.py index 0d40d40456..45c3ed173c 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermapbox/legendgrouptitle/font/_weight.py b/plotly/validators/scattermapbox/legendgrouptitle/font/_weight.py index 5745bcb6b3..d53ae70772 100644 --- a/plotly/validators/scattermapbox/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scattermapbox/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermapbox.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermapbox/line/__init__.py b/plotly/validators/scattermapbox/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/scattermapbox/line/__init__.py +++ b/plotly/validators/scattermapbox/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/scattermapbox/line/_color.py b/plotly/validators/scattermapbox/line/_color.py index ff7c33b92c..a5120f7471 100644 --- a/plotly/validators/scattermapbox/line/_color.py +++ b/plotly/validators/scattermapbox/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattermapbox.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/line/_width.py b/plotly/validators/scattermapbox/line/_width.py index 53a9b22f03..013f202536 100644 --- a/plotly/validators/scattermapbox/line/_width.py +++ b/plotly/validators/scattermapbox/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattermapbox.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/__init__.py b/plotly/validators/scattermapbox/marker/__init__.py index 1560474e41..22d40af5a8 100644 --- a/plotly/validators/scattermapbox/marker/__init__.py +++ b/plotly/validators/scattermapbox/marker/__init__.py @@ -1,61 +1,33 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angle import AngleValidator - from ._allowoverlap import AllowoverlapValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angle.AngleValidator", - "._allowoverlap.AllowoverlapValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angle.AngleValidator", + "._allowoverlap.AllowoverlapValidator", + ], +) diff --git a/plotly/validators/scattermapbox/marker/_allowoverlap.py b/plotly/validators/scattermapbox/marker/_allowoverlap.py index f482b09656..d9e1ca816d 100644 --- a/plotly/validators/scattermapbox/marker/_allowoverlap.py +++ b/plotly/validators/scattermapbox/marker/_allowoverlap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AllowoverlapValidator(_plotly_utils.basevalidators.BooleanValidator): +class AllowoverlapValidator(_bv.BooleanValidator): def __init__( self, plotly_name="allowoverlap", parent_name="scattermapbox.marker", **kwargs ): - super(AllowoverlapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_angle.py b/plotly/validators/scattermapbox/marker/_angle.py index ab23633ab0..99b8c1662f 100644 --- a/plotly/validators/scattermapbox/marker/_angle.py +++ b/plotly/validators/scattermapbox/marker/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.NumberValidator): +class AngleValidator(_bv.NumberValidator): def __init__( self, plotly_name="angle", parent_name="scattermapbox.marker", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_anglesrc.py b/plotly/validators/scattermapbox/marker/_anglesrc.py index ba5d7fd6e1..35474851a6 100644 --- a/plotly/validators/scattermapbox/marker/_anglesrc.py +++ b/plotly/validators/scattermapbox/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scattermapbox.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_autocolorscale.py b/plotly/validators/scattermapbox/marker/_autocolorscale.py index 4ecfb4366b..72260deecb 100644 --- a/plotly/validators/scattermapbox/marker/_autocolorscale.py +++ b/plotly/validators/scattermapbox/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattermapbox.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_cauto.py b/plotly/validators/scattermapbox/marker/_cauto.py index 37252143c5..db882026d5 100644 --- a/plotly/validators/scattermapbox/marker/_cauto.py +++ b/plotly/validators/scattermapbox/marker/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattermapbox.marker", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_cmax.py b/plotly/validators/scattermapbox/marker/_cmax.py index 1a0755ee18..4756fb5f42 100644 --- a/plotly/validators/scattermapbox/marker/_cmax.py +++ b/plotly/validators/scattermapbox/marker/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattermapbox.marker", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_cmid.py b/plotly/validators/scattermapbox/marker/_cmid.py index b3066d3d19..46bb82d637 100644 --- a/plotly/validators/scattermapbox/marker/_cmid.py +++ b/plotly/validators/scattermapbox/marker/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattermapbox.marker", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_cmin.py b/plotly/validators/scattermapbox/marker/_cmin.py index a692239b7a..bffc94744c 100644 --- a/plotly/validators/scattermapbox/marker/_cmin.py +++ b/plotly/validators/scattermapbox/marker/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scattermapbox.marker", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_color.py b/plotly/validators/scattermapbox/marker/_color.py index baaf716071..9345c0b8a5 100644 --- a/plotly/validators/scattermapbox/marker/_color.py +++ b/plotly/validators/scattermapbox/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattermapbox/marker/_coloraxis.py b/plotly/validators/scattermapbox/marker/_coloraxis.py index a1a9a1b100..0444c26db0 100644 --- a/plotly/validators/scattermapbox/marker/_coloraxis.py +++ b/plotly/validators/scattermapbox/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattermapbox.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattermapbox/marker/_colorbar.py b/plotly/validators/scattermapbox/marker/_colorbar.py index 02a6f4a53b..e6658d4867 100644 --- a/plotly/validators/scattermapbox/marker/_colorbar.py +++ b/plotly/validators/scattermapbox/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scattermapbox.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - mapbox.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattermapbox.marker.colorbar.tickformatstopd - efaults), sets the default property values to - use for elements of - scattermapbox.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattermapbox.mark - er.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_colorscale.py b/plotly/validators/scattermapbox/marker/_colorscale.py index 5d6e900385..3736b7cd7d 100644 --- a/plotly/validators/scattermapbox/marker/_colorscale.py +++ b/plotly/validators/scattermapbox/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattermapbox.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_colorsrc.py b/plotly/validators/scattermapbox/marker/_colorsrc.py index 1d14de0360..22814c2096 100644 --- a/plotly/validators/scattermapbox/marker/_colorsrc.py +++ b/plotly/validators/scattermapbox/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattermapbox.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_opacity.py b/plotly/validators/scattermapbox/marker/_opacity.py index 63af24ea38..bf38d1e95e 100644 --- a/plotly/validators/scattermapbox/marker/_opacity.py +++ b/plotly/validators/scattermapbox/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermapbox.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattermapbox/marker/_opacitysrc.py b/plotly/validators/scattermapbox/marker/_opacitysrc.py index fae8de92ee..06ed706a2b 100644 --- a/plotly/validators/scattermapbox/marker/_opacitysrc.py +++ b/plotly/validators/scattermapbox/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattermapbox.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_reversescale.py b/plotly/validators/scattermapbox/marker/_reversescale.py index da3cec4596..d12ee1d153 100644 --- a/plotly/validators/scattermapbox/marker/_reversescale.py +++ b/plotly/validators/scattermapbox/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattermapbox.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_showscale.py b/plotly/validators/scattermapbox/marker/_showscale.py index deed75209c..1adf22a506 100644 --- a/plotly/validators/scattermapbox/marker/_showscale.py +++ b/plotly/validators/scattermapbox/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattermapbox.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_size.py b/plotly/validators/scattermapbox/marker/_size.py index b849fb9e4d..5713b7df86 100644 --- a/plotly/validators/scattermapbox/marker/_size.py +++ b/plotly/validators/scattermapbox/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/marker/_sizemin.py b/plotly/validators/scattermapbox/marker/_sizemin.py index 99ab7c9f6d..c9e28cf368 100644 --- a/plotly/validators/scattermapbox/marker/_sizemin.py +++ b/plotly/validators/scattermapbox/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scattermapbox.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_sizemode.py b/plotly/validators/scattermapbox/marker/_sizemode.py index 90963436da..336c685e27 100644 --- a/plotly/validators/scattermapbox/marker/_sizemode.py +++ b/plotly/validators/scattermapbox/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattermapbox.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_sizeref.py b/plotly/validators/scattermapbox/marker/_sizeref.py index 1d445bc8c5..c1ce9cbdc9 100644 --- a/plotly/validators/scattermapbox/marker/_sizeref.py +++ b/plotly/validators/scattermapbox/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scattermapbox.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_sizesrc.py b/plotly/validators/scattermapbox/marker/_sizesrc.py index ab1beb4479..3b4041d145 100644 --- a/plotly/validators/scattermapbox/marker/_sizesrc.py +++ b/plotly/validators/scattermapbox/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattermapbox.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/_symbol.py b/plotly/validators/scattermapbox/marker/_symbol.py index 9c80fe03ee..9b4e614a48 100644 --- a/plotly/validators/scattermapbox/marker/_symbol.py +++ b/plotly/validators/scattermapbox/marker/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.StringValidator): +class SymbolValidator(_bv.StringValidator): def __init__( self, plotly_name="symbol", parent_name="scattermapbox.marker", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/_symbolsrc.py b/plotly/validators/scattermapbox/marker/_symbolsrc.py index 5f7420b2ed..e3b3a98858 100644 --- a/plotly/validators/scattermapbox/marker/_symbolsrc.py +++ b/plotly/validators/scattermapbox/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattermapbox.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/__init__.py b/plotly/validators/scattermapbox/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/__init__.py +++ b/plotly/validators/scattermapbox/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py b/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py index 8814dce6ae..4d6c9c53ef 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py b/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py index a0c2f31c52..caaba4e98d 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py b/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py index 05bfba60b2..ec1624cff3 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_dtick.py b/plotly/validators/scattermapbox/marker/colorbar/_dtick.py index 889d22e0dd..a301f69606 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_dtick.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py b/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py index 544ccd42f1..7c95dfffc6 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_labelalias.py b/plotly/validators/scattermapbox/marker/colorbar/_labelalias.py index 6e6377d105..832ad656b4 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_labelalias.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_len.py b/plotly/validators/scattermapbox/marker/colorbar/_len.py index bb616a6eba..91982eb963 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_len.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py b/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py index 6e153f703f..fb75e42404 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_lenmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_minexponent.py b/plotly/validators/scattermapbox/marker/colorbar/_minexponent.py index ef71c761a2..dc5a90a7f8 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_minexponent.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_nticks.py b/plotly/validators/scattermapbox/marker/colorbar/_nticks.py index 97d42c2ddd..1c58a5c3c6 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_nticks.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_nticks.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_orientation.py b/plotly/validators/scattermapbox/marker/colorbar/_orientation.py index a6f4ffa077..db96a5ec08 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_orientation.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py b/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py index dd14654612..2018c93b5e 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py b/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py index 22d620f472..ac7153faca 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py b/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py index 985d88b922..d6f97fab23 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py b/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py index e90ffd4597..454f189e90 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py b/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py index ad97beef90..44f7efe030 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py b/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py index 25b434fced..4967dcbb86 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py b/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py index c589af00ae..86e93e0151 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_thickness.py b/plotly/validators/scattermapbox/marker/colorbar/_thickness.py index 5eb7fe1a5d..653ac580b0 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_thickness.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py b/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py index 9ef05efb71..afc5f4d312 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tick0.py b/plotly/validators/scattermapbox/marker/colorbar/_tick0.py index 9b55a9d711..710d5f153a 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tick0.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py b/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py index dac12d1d75..a685d8e867 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py b/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py index 249021e860..874b70b037 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py b/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py index 5c40d2e069..9123740aea 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py b/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py index 0461be192b..b65e2c1faa 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py index 016f41a4e5..894c5d9206 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py b/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py index 6238968da1..be1b6c22af 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scattermapbox/marker/colorbar/_ticklabeloverflow.py index e67a906f70..9183778aa1 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticklabelposition.py b/plotly/validators/scattermapbox/marker/colorbar/_ticklabelposition.py index 000ef26ca9..068864327a 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticklabelstep.py b/plotly/validators/scattermapbox/marker/colorbar/_ticklabelstep.py index e6018e8177..b0b2402072 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py b/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py index bb99120508..198b83bf41 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticklen.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py b/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py index bf215ec2a3..e9780c736a 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py b/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py index a0ad4f2208..a85d3722e6 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticks.py b/plotly/validators/scattermapbox/marker/colorbar/_ticks.py index 9f791227e7..9f03d82e11 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticks.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py b/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py index 8d6d433954..57894b8704 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py b/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py index e014e9a7f2..7be829421d 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py b/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py index a14270d8c9..d8d9d005d6 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py b/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py index bd23100f1f..ec65e3edb3 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py b/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py index dad32a9061..60bea35ec9 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py b/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py index 707db10c2d..f598a66a88 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_title.py b/plotly/validators/scattermapbox/marker/colorbar/_title.py index 49a801e77d..a0d3a08495 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_title.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_x.py b/plotly/validators/scattermapbox/marker/colorbar/_x.py index b69db6f0dd..d7302f309e 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_x.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py b/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py index c8b41866eb..8a93681c00 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_xanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_xpad.py b/plotly/validators/scattermapbox/marker/colorbar/_xpad.py index 927eb92734..3f2c4ff214 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_xpad.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_xref.py b/plotly/validators/scattermapbox/marker/colorbar/_xref.py index 5b6cb514da..862ea027d2 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_xref.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_y.py b/plotly/validators/scattermapbox/marker/colorbar/_y.py index c7278bb947..2cf6a2ff74 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_y.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py b/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py index d16724ad31..85718e50c8 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_yanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scattermapbox.marker.colorbar", **kwargs, ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_ypad.py b/plotly/validators/scattermapbox/marker/colorbar/_ypad.py index 45fea20706..3c3ec24704 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_ypad.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/_yref.py b/plotly/validators/scattermapbox/marker/colorbar/_yref.py index 57066bc980..3c53f673ad 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/_yref.py +++ b/plotly/validators/scattermapbox/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scattermapbox.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py index 2bd4a5b8e3..f954e323d8 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py index 588626adc9..977d3ef623 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_lineposition.py index d82dc01f54..2e4baabedb 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_shadow.py index 6791ef955a..c5706a27ca 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py index 84c35dfa2a..e6d6d86d02 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_style.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_style.py index 04326f0802..a2ebd1b91f 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_textcase.py index e760cb567b..36d1d465bc 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_variant.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_variant.py index 4ec92a3d75..ae6a1ab2d8 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_weight.py b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_weight.py index d95d63d916..dc177bc28e 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermapbox.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py index a2c64f5149..05e95d0cb1 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattermapbox.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py index 5e3cf3c33c..6f4a9cec47 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattermapbox.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py index 4eead7f875..8816500541 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scattermapbox.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py index bb80218d79..eaca4cb334 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scattermapbox.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py index d5f75ee344..b25b4ec878 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scattermapbox/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scattermapbox.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py b/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/_font.py b/plotly/validators/scattermapbox/marker/colorbar/title/_font.py index 43df02ece1..7c18eb2414 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/_font.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattermapbox.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/_side.py b/plotly/validators/scattermapbox/marker/colorbar/title/_side.py index ef865d826a..0523e22a53 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/_side.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattermapbox.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/_text.py b/plotly/validators/scattermapbox/marker/colorbar/title/_text.py index c4d741664a..6e341646ab 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/_text.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattermapbox.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py index 94e329b65a..f20a8a76ee 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py index b61a899f61..387cf05218 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_lineposition.py index 099125064b..138c098bbb 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_shadow.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_shadow.py index b7516dc0d1..3f5866a903 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py index c8b66f0d65..ca3ea62dd7 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_style.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_style.py index 8ca0d2b1a8..8871965db0 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_textcase.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_textcase.py index 35a853e61c..7fe9846275 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_variant.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_variant.py index 6cd676ba06..7259483f9b 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattermapbox/marker/colorbar/title/font/_weight.py b/plotly/validators/scattermapbox/marker/colorbar/title/font/_weight.py index dcd3608437..ae06032a55 100644 --- a/plotly/validators/scattermapbox/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scattermapbox/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermapbox.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermapbox/selected/__init__.py b/plotly/validators/scattermapbox/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/scattermapbox/selected/__init__.py +++ b/plotly/validators/scattermapbox/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattermapbox/selected/_marker.py b/plotly/validators/scattermapbox/selected/_marker.py index 08ca315c4e..407ef692f5 100644 --- a/plotly/validators/scattermapbox/selected/_marker.py +++ b/plotly/validators/scattermapbox/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattermapbox.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/selected/marker/__init__.py b/plotly/validators/scattermapbox/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattermapbox/selected/marker/__init__.py +++ b/plotly/validators/scattermapbox/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattermapbox/selected/marker/_color.py b/plotly/validators/scattermapbox/selected/marker/_color.py index 185120bea0..4f3b7edfd7 100644 --- a/plotly/validators/scattermapbox/selected/marker/_color.py +++ b/plotly/validators/scattermapbox/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/selected/marker/_opacity.py b/plotly/validators/scattermapbox/selected/marker/_opacity.py index 0f55127dd1..eb4fe056c5 100644 --- a/plotly/validators/scattermapbox/selected/marker/_opacity.py +++ b/plotly/validators/scattermapbox/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermapbox.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/selected/marker/_size.py b/plotly/validators/scattermapbox/selected/marker/_size.py index 25b9965675..b452121f45 100644 --- a/plotly/validators/scattermapbox/selected/marker/_size.py +++ b/plotly/validators/scattermapbox/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattermapbox/stream/__init__.py b/plotly/validators/scattermapbox/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scattermapbox/stream/__init__.py +++ b/plotly/validators/scattermapbox/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scattermapbox/stream/_maxpoints.py b/plotly/validators/scattermapbox/stream/_maxpoints.py index 9bf701a188..63fdb87e5f 100644 --- a/plotly/validators/scattermapbox/stream/_maxpoints.py +++ b/plotly/validators/scattermapbox/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattermapbox.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/stream/_token.py b/plotly/validators/scattermapbox/stream/_token.py index f8f1eecf70..ccb89e2546 100644 --- a/plotly/validators/scattermapbox/stream/_token.py +++ b/plotly/validators/scattermapbox/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="scattermapbox.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermapbox/textfont/__init__.py b/plotly/validators/scattermapbox/textfont/__init__.py index 9301c0688c..13cbf9ae54 100644 --- a/plotly/validators/scattermapbox/textfont/__init__.py +++ b/plotly/validators/scattermapbox/textfont/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattermapbox/textfont/_color.py b/plotly/validators/scattermapbox/textfont/_color.py index a53b249daf..469ef18aa5 100644 --- a/plotly/validators/scattermapbox/textfont/_color.py +++ b/plotly/validators/scattermapbox/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/textfont/_family.py b/plotly/validators/scattermapbox/textfont/_family.py index 3a44f274f4..5ec44b169f 100644 --- a/plotly/validators/scattermapbox/textfont/_family.py +++ b/plotly/validators/scattermapbox/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattermapbox.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattermapbox/textfont/_size.py b/plotly/validators/scattermapbox/textfont/_size.py index 7aacb69b4e..9b6c8aeb75 100644 --- a/plotly/validators/scattermapbox/textfont/_size.py +++ b/plotly/validators/scattermapbox/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattermapbox/textfont/_style.py b/plotly/validators/scattermapbox/textfont/_style.py index 199c1b0e5d..c659fbab34 100644 --- a/plotly/validators/scattermapbox/textfont/_style.py +++ b/plotly/validators/scattermapbox/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattermapbox.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattermapbox/textfont/_weight.py b/plotly/validators/scattermapbox/textfont/_weight.py index e9151373b6..3dcbdcf089 100644 --- a/plotly/validators/scattermapbox/textfont/_weight.py +++ b/plotly/validators/scattermapbox/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattermapbox.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattermapbox/unselected/__init__.py b/plotly/validators/scattermapbox/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/scattermapbox/unselected/__init__.py +++ b/plotly/validators/scattermapbox/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattermapbox/unselected/_marker.py b/plotly/validators/scattermapbox/unselected/_marker.py index 6c68d6b1da..739c1aa833 100644 --- a/plotly/validators/scattermapbox/unselected/_marker.py +++ b/plotly/validators/scattermapbox/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattermapbox.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattermapbox/unselected/marker/__init__.py b/plotly/validators/scattermapbox/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattermapbox/unselected/marker/__init__.py +++ b/plotly/validators/scattermapbox/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattermapbox/unselected/marker/_color.py b/plotly/validators/scattermapbox/unselected/marker/_color.py index 4f3e6683a5..b0d89d3bd8 100644 --- a/plotly/validators/scattermapbox/unselected/marker/_color.py +++ b/plotly/validators/scattermapbox/unselected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattermapbox.unselected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattermapbox/unselected/marker/_opacity.py b/plotly/validators/scattermapbox/unselected/marker/_opacity.py index 0a129ebed3..658979babc 100644 --- a/plotly/validators/scattermapbox/unselected/marker/_opacity.py +++ b/plotly/validators/scattermapbox/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattermapbox.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattermapbox/unselected/marker/_size.py b/plotly/validators/scattermapbox/unselected/marker/_size.py index 070575bab2..d100630252 100644 --- a/plotly/validators/scattermapbox/unselected/marker/_size.py +++ b/plotly/validators/scattermapbox/unselected/marker/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattermapbox.unselected.marker", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/__init__.py b/plotly/validators/scatterpolar/__init__.py index ce934b10c8..eeedcc82c2 100644 --- a/plotly/validators/scatterpolar/__init__.py +++ b/plotly/validators/scatterpolar/__init__.py @@ -1,119 +1,62 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._thetaunit import ThetaunitValidator - from ._thetasrc import ThetasrcValidator - from ._theta0 import Theta0Validator - from ._theta import ThetaValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._rsrc import RsrcValidator - from ._r0 import R0Validator - from ._r import RValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._dtheta import DthetaValidator - from ._dr import DrValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._cliponaxis import CliponaxisValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._thetaunit.ThetaunitValidator", - "._thetasrc.ThetasrcValidator", - "._theta0.Theta0Validator", - "._theta.ThetaValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._rsrc.RsrcValidator", - "._r0.R0Validator", - "._r.RValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._dtheta.DthetaValidator", - "._dr.DrValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._cliponaxis.CliponaxisValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._thetaunit.ThetaunitValidator", + "._thetasrc.ThetasrcValidator", + "._theta0.Theta0Validator", + "._theta.ThetaValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r0.R0Validator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._dtheta.DthetaValidator", + "._dr.DrValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + ], +) diff --git a/plotly/validators/scatterpolar/_cliponaxis.py b/plotly/validators/scatterpolar/_cliponaxis.py index 872c16df76..c5fead2c6b 100644 --- a/plotly/validators/scatterpolar/_cliponaxis.py +++ b/plotly/validators/scatterpolar/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="scatterpolar", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_connectgaps.py b/plotly/validators/scatterpolar/_connectgaps.py index 2ce3abc08b..f348eee980 100644 --- a/plotly/validators/scatterpolar/_connectgaps.py +++ b/plotly/validators/scatterpolar/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scatterpolar", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_customdata.py b/plotly/validators/scatterpolar/_customdata.py index e296fc3ed6..6256bda788 100644 --- a/plotly/validators/scatterpolar/_customdata.py +++ b/plotly/validators/scatterpolar/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scatterpolar", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_customdatasrc.py b/plotly/validators/scatterpolar/_customdatasrc.py index 037a8eabab..ebbcae762d 100644 --- a/plotly/validators/scatterpolar/_customdatasrc.py +++ b/plotly/validators/scatterpolar/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="scatterpolar", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_dr.py b/plotly/validators/scatterpolar/_dr.py index 490a577182..9b6457857b 100644 --- a/plotly/validators/scatterpolar/_dr.py +++ b/plotly/validators/scatterpolar/_dr.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DrValidator(_plotly_utils.basevalidators.NumberValidator): +class DrValidator(_bv.NumberValidator): def __init__(self, plotly_name="dr", parent_name="scatterpolar", **kwargs): - super(DrValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_dtheta.py b/plotly/validators/scatterpolar/_dtheta.py index 5ce55d9362..8e286037a4 100644 --- a/plotly/validators/scatterpolar/_dtheta.py +++ b/plotly/validators/scatterpolar/_dtheta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): +class DthetaValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtheta", parent_name="scatterpolar", **kwargs): - super(DthetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_fill.py b/plotly/validators/scatterpolar/_fill.py index b178f00dc0..b744218e4e 100644 --- a/plotly/validators/scatterpolar/_fill.py +++ b/plotly/validators/scatterpolar/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scatterpolar", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself", "tonext"]), **kwargs, diff --git a/plotly/validators/scatterpolar/_fillcolor.py b/plotly/validators/scatterpolar/_fillcolor.py index 86d6a4323c..411dc16445 100644 --- a/plotly/validators/scatterpolar/_fillcolor.py +++ b/plotly/validators/scatterpolar/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scatterpolar", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_hoverinfo.py b/plotly/validators/scatterpolar/_hoverinfo.py index f305caf8d9..e453dbd655 100644 --- a/plotly/validators/scatterpolar/_hoverinfo.py +++ b/plotly/validators/scatterpolar/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolar", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scatterpolar/_hoverinfosrc.py b/plotly/validators/scatterpolar/_hoverinfosrc.py index f2ad562a40..f29862d810 100644 --- a/plotly/validators/scatterpolar/_hoverinfosrc.py +++ b/plotly/validators/scatterpolar/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="scatterpolar", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_hoverlabel.py b/plotly/validators/scatterpolar/_hoverlabel.py index 34d686c02a..d41c1fb62c 100644 --- a/plotly/validators/scatterpolar/_hoverlabel.py +++ b/plotly/validators/scatterpolar/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scatterpolar", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_hoveron.py b/plotly/validators/scatterpolar/_hoveron.py index e25a3e9ae3..246b1edaf5 100644 --- a/plotly/validators/scatterpolar/_hoveron.py +++ b/plotly/validators/scatterpolar/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="scatterpolar", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), flags=kwargs.pop("flags", ["points", "fills"]), **kwargs, diff --git a/plotly/validators/scatterpolar/_hovertemplate.py b/plotly/validators/scatterpolar/_hovertemplate.py index 9d1d3b3a5a..f19831c65a 100644 --- a/plotly/validators/scatterpolar/_hovertemplate.py +++ b/plotly/validators/scatterpolar/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scatterpolar", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolar/_hovertemplatesrc.py b/plotly/validators/scatterpolar/_hovertemplatesrc.py index cac2b9a6cf..524ad9ed34 100644 --- a/plotly/validators/scatterpolar/_hovertemplatesrc.py +++ b/plotly/validators/scatterpolar/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scatterpolar", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_hovertext.py b/plotly/validators/scatterpolar/_hovertext.py index 2bb9f2ddea..5e17f682d5 100644 --- a/plotly/validators/scatterpolar/_hovertext.py +++ b/plotly/validators/scatterpolar/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scatterpolar", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterpolar/_hovertextsrc.py b/plotly/validators/scatterpolar/_hovertextsrc.py index 26ed5db61c..4b41826af0 100644 --- a/plotly/validators/scatterpolar/_hovertextsrc.py +++ b/plotly/validators/scatterpolar/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="scatterpolar", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_ids.py b/plotly/validators/scatterpolar/_ids.py index 29038b12f8..12e04c1e1f 100644 --- a/plotly/validators/scatterpolar/_ids.py +++ b/plotly/validators/scatterpolar/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scatterpolar", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_idssrc.py b/plotly/validators/scatterpolar/_idssrc.py index 8200590fbf..9ec202220c 100644 --- a/plotly/validators/scatterpolar/_idssrc.py +++ b/plotly/validators/scatterpolar/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scatterpolar", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_legend.py b/plotly/validators/scatterpolar/_legend.py index 7df05b2bf4..ab0b076a2b 100644 --- a/plotly/validators/scatterpolar/_legend.py +++ b/plotly/validators/scatterpolar/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scatterpolar", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterpolar/_legendgroup.py b/plotly/validators/scatterpolar/_legendgroup.py index a277480c6d..6f82cc5ca4 100644 --- a/plotly/validators/scatterpolar/_legendgroup.py +++ b/plotly/validators/scatterpolar/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scatterpolar", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_legendgrouptitle.py b/plotly/validators/scatterpolar/_legendgrouptitle.py index 635aef4a89..b130baee1e 100644 --- a/plotly/validators/scatterpolar/_legendgrouptitle.py +++ b/plotly/validators/scatterpolar/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scatterpolar", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_legendrank.py b/plotly/validators/scatterpolar/_legendrank.py index 7adfc62bea..6b1be34c6b 100644 --- a/plotly/validators/scatterpolar/_legendrank.py +++ b/plotly/validators/scatterpolar/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scatterpolar", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_legendwidth.py b/plotly/validators/scatterpolar/_legendwidth.py index 98c31328a3..4d1bad82a7 100644 --- a/plotly/validators/scatterpolar/_legendwidth.py +++ b/plotly/validators/scatterpolar/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scatterpolar", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/_line.py b/plotly/validators/scatterpolar/_line.py index f00547043e..07053d270c 100644 --- a/plotly/validators/scatterpolar/_line.py +++ b/plotly/validators/scatterpolar/_line.py @@ -1,44 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatterpolar", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_marker.py b/plotly/validators/scatterpolar/_marker.py index 3c74e0581c..424cad1b41 100644 --- a/plotly/validators/scatterpolar/_marker.py +++ b/plotly/validators/scatterpolar/_marker.py @@ -1,165 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scatterpolar", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolar.marke - r.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scatterpolar.marke - r.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterpolar.marke - r.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_meta.py b/plotly/validators/scatterpolar/_meta.py index 8830ce4f32..b32a636cf9 100644 --- a/plotly/validators/scatterpolar/_meta.py +++ b/plotly/validators/scatterpolar/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scatterpolar", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterpolar/_metasrc.py b/plotly/validators/scatterpolar/_metasrc.py index f553512402..d5429c6a79 100644 --- a/plotly/validators/scatterpolar/_metasrc.py +++ b/plotly/validators/scatterpolar/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scatterpolar", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_mode.py b/plotly/validators/scatterpolar/_mode.py index f210aeb4d6..c096edfcf3 100644 --- a/plotly/validators/scatterpolar/_mode.py +++ b/plotly/validators/scatterpolar/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scatterpolar", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scatterpolar/_name.py b/plotly/validators/scatterpolar/_name.py index 384b8ed0c0..876dc7c06b 100644 --- a/plotly/validators/scatterpolar/_name.py +++ b/plotly/validators/scatterpolar/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scatterpolar", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_opacity.py b/plotly/validators/scatterpolar/_opacity.py index ab052efe1c..b53df148fa 100644 --- a/plotly/validators/scatterpolar/_opacity.py +++ b/plotly/validators/scatterpolar/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatterpolar", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/_r.py b/plotly/validators/scatterpolar/_r.py index 53f8333394..7bdcb0af6c 100644 --- a/plotly/validators/scatterpolar/_r.py +++ b/plotly/validators/scatterpolar/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): +class RValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="r", parent_name="scatterpolar", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_r0.py b/plotly/validators/scatterpolar/_r0.py index b4d6b4bbd9..5914516157 100644 --- a/plotly/validators/scatterpolar/_r0.py +++ b/plotly/validators/scatterpolar/_r0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class R0Validator(_plotly_utils.basevalidators.AnyValidator): +class R0Validator(_bv.AnyValidator): def __init__(self, plotly_name="r0", parent_name="scatterpolar", **kwargs): - super(R0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_rsrc.py b/plotly/validators/scatterpolar/_rsrc.py index 8eb0208ffe..7950955728 100644 --- a/plotly/validators/scatterpolar/_rsrc.py +++ b/plotly/validators/scatterpolar/_rsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="rsrc", parent_name="scatterpolar", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_selected.py b/plotly/validators/scatterpolar/_selected.py index e8dbe83ed3..394a9a9123 100644 --- a/plotly/validators/scatterpolar/_selected.py +++ b/plotly/validators/scatterpolar/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scatterpolar", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatterpolar.selec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.selec - ted.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_selectedpoints.py b/plotly/validators/scatterpolar/_selectedpoints.py index 55f0d564b7..9f64805eb8 100644 --- a/plotly/validators/scatterpolar/_selectedpoints.py +++ b/plotly/validators/scatterpolar/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scatterpolar", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_showlegend.py b/plotly/validators/scatterpolar/_showlegend.py index d9de07e4fa..927a91530f 100644 --- a/plotly/validators/scatterpolar/_showlegend.py +++ b/plotly/validators/scatterpolar/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scatterpolar", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_stream.py b/plotly/validators/scatterpolar/_stream.py index 2de71662f4..06be7f6a86 100644 --- a/plotly/validators/scatterpolar/_stream.py +++ b/plotly/validators/scatterpolar/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatterpolar", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_subplot.py b/plotly/validators/scatterpolar/_subplot.py index fbe123aacb..1a68a6261d 100644 --- a/plotly/validators/scatterpolar/_subplot.py +++ b/plotly/validators/scatterpolar/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="scatterpolar", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "polar"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolar/_text.py b/plotly/validators/scatterpolar/_text.py index 9a0436e7ca..2b89dd67c0 100644 --- a/plotly/validators/scatterpolar/_text.py +++ b/plotly/validators/scatterpolar/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scatterpolar", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolar/_textfont.py b/plotly/validators/scatterpolar/_textfont.py index 83ad005595..73ee356f57 100644 --- a/plotly/validators/scatterpolar/_textfont.py +++ b/plotly/validators/scatterpolar/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scatterpolar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_textposition.py b/plotly/validators/scatterpolar/_textposition.py index af2f965b02..f4123cd9cc 100644 --- a/plotly/validators/scatterpolar/_textposition.py +++ b/plotly/validators/scatterpolar/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scatterpolar", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolar/_textpositionsrc.py b/plotly/validators/scatterpolar/_textpositionsrc.py index 043d299b8c..c2e44b0dfc 100644 --- a/plotly/validators/scatterpolar/_textpositionsrc.py +++ b/plotly/validators/scatterpolar/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scatterpolar", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_textsrc.py b/plotly/validators/scatterpolar/_textsrc.py index bc55ed515f..6fe891bbae 100644 --- a/plotly/validators/scatterpolar/_textsrc.py +++ b/plotly/validators/scatterpolar/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatterpolar", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_texttemplate.py b/plotly/validators/scatterpolar/_texttemplate.py index a7ae8286e0..6e54992931 100644 --- a/plotly/validators/scatterpolar/_texttemplate.py +++ b/plotly/validators/scatterpolar/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scatterpolar", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterpolar/_texttemplatesrc.py b/plotly/validators/scatterpolar/_texttemplatesrc.py index 04a2baf1d8..f086a5d702 100644 --- a/plotly/validators/scatterpolar/_texttemplatesrc.py +++ b/plotly/validators/scatterpolar/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scatterpolar", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_theta.py b/plotly/validators/scatterpolar/_theta.py index 23adbe475c..0037858809 100644 --- a/plotly/validators/scatterpolar/_theta.py +++ b/plotly/validators/scatterpolar/_theta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ThetaValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="theta", parent_name="scatterpolar", **kwargs): - super(ThetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_theta0.py b/plotly/validators/scatterpolar/_theta0.py index 83a0f5eaf2..142cabaff1 100644 --- a/plotly/validators/scatterpolar/_theta0.py +++ b/plotly/validators/scatterpolar/_theta0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): +class Theta0Validator(_bv.AnyValidator): def __init__(self, plotly_name="theta0", parent_name="scatterpolar", **kwargs): - super(Theta0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_thetasrc.py b/plotly/validators/scatterpolar/_thetasrc.py index 0e8742520e..4f533b05d0 100644 --- a/plotly/validators/scatterpolar/_thetasrc.py +++ b/plotly/validators/scatterpolar/_thetasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ThetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="thetasrc", parent_name="scatterpolar", **kwargs): - super(ThetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_thetaunit.py b/plotly/validators/scatterpolar/_thetaunit.py index 00b3e659a1..3637c684ba 100644 --- a/plotly/validators/scatterpolar/_thetaunit.py +++ b/plotly/validators/scatterpolar/_thetaunit.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThetaunitValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="thetaunit", parent_name="scatterpolar", **kwargs): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["radians", "degrees", "gradians"]), **kwargs, diff --git a/plotly/validators/scatterpolar/_uid.py b/plotly/validators/scatterpolar/_uid.py index 38e4bb0395..cb08013f89 100644 --- a/plotly/validators/scatterpolar/_uid.py +++ b/plotly/validators/scatterpolar/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scatterpolar", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_uirevision.py b/plotly/validators/scatterpolar/_uirevision.py index b73384f3e2..e1e5e1dc22 100644 --- a/plotly/validators/scatterpolar/_uirevision.py +++ b/plotly/validators/scatterpolar/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scatterpolar", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/_unselected.py b/plotly/validators/scatterpolar/_unselected.py index e9de499488..807b156a69 100644 --- a/plotly/validators/scatterpolar/_unselected.py +++ b/plotly/validators/scatterpolar/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scatterpolar", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolar.unsel - ected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/_visible.py b/plotly/validators/scatterpolar/_visible.py index 1ad4b0d317..806e501aa6 100644 --- a/plotly/validators/scatterpolar/_visible.py +++ b/plotly/validators/scatterpolar/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scatterpolar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scatterpolar/hoverlabel/__init__.py b/plotly/validators/scatterpolar/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scatterpolar/hoverlabel/__init__.py +++ b/plotly/validators/scatterpolar/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scatterpolar/hoverlabel/_align.py b/plotly/validators/scatterpolar/hoverlabel/_align.py index f644b79c86..d4091c57f6 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_align.py +++ b/plotly/validators/scatterpolar/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py b/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py index 1f7f885c91..589ff5f270 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py b/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py index 70798d1371..cc1bd33cb9 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py +++ b/plotly/validators/scatterpolar/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py b/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py index 27693751f7..31e0debdb9 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py b/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py index 7a8e4464af..a7f3c7eaae 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py +++ b/plotly/validators/scatterpolar/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py b/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py index 6ea006daf3..dbfc9ef659 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scatterpolar.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/_font.py b/plotly/validators/scatterpolar/hoverlabel/_font.py index 4a05248cd5..ae65cfe19f 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_font.py +++ b/plotly/validators/scatterpolar/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/hoverlabel/_namelength.py b/plotly/validators/scatterpolar/hoverlabel/_namelength.py index 8583d41a37..364a96a858 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_namelength.py +++ b/plotly/validators/scatterpolar/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scatterpolar.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py b/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py index 5e96de7148..7f93d143e0 100644 --- a/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scatterpolar.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/__init__.py b/plotly/validators/scatterpolar/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/__init__.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_color.py b/plotly/validators/scatterpolar/hoverlabel/font/_color.py index d68e5da77c..b339d07221 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_color.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py index b42ddfd73b..059bd33c7c 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_family.py b/plotly/validators/scatterpolar/hoverlabel/font/_family.py index e6452ba69a..dddd42160a 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_family.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolar.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py index e010d52797..6b78427c8d 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_lineposition.py b/plotly/validators/scatterpolar/hoverlabel/font/_lineposition.py index 5284ed58ca..af1244d800 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_linepositionsrc.py index eaa314685e..5263d8af63 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_shadow.py b/plotly/validators/scatterpolar/hoverlabel/font/_shadow.py index 2df5661de9..497e857036 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_shadow.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolar.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_shadowsrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_shadowsrc.py index 3e0250597f..aa534d38cd 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_size.py b/plotly/validators/scatterpolar/hoverlabel/font/_size.py index 7e447acd8d..c9056d3c3c 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_size.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py index 36579748bb..da5f62f753 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_style.py b/plotly/validators/scatterpolar/hoverlabel/font/_style.py index 830196b05a..8efa2f3410 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_style.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolar.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_stylesrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_stylesrc.py index 35dc9d3428..ef12359649 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_textcase.py b/plotly/validators/scatterpolar/hoverlabel/font/_textcase.py index 1cd3d9029b..9294b24de5 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_textcase.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_textcasesrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_textcasesrc.py index b43d5a7d76..69c62403e6 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_variant.py b/plotly/validators/scatterpolar/hoverlabel/font/_variant.py index 4ec491e0c3..08903f5191 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_variant.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_variantsrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_variantsrc.py index 1dd7157250..88ac0be934 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_weight.py b/plotly/validators/scatterpolar/hoverlabel/font/_weight.py index 6487cf1758..cb6e6195cf 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_weight.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolar.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatterpolar/hoverlabel/font/_weightsrc.py b/plotly/validators/scatterpolar/hoverlabel/font/_weightsrc.py index fb6602acb9..36a6c5de58 100644 --- a/plotly/validators/scatterpolar/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scatterpolar/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatterpolar.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/legendgrouptitle/__init__.py b/plotly/validators/scatterpolar/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/__init__.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scatterpolar/legendgrouptitle/_font.py b/plotly/validators/scatterpolar/legendgrouptitle/_font.py index f8bd85bba8..b4fded44e9 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/_font.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolar.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/legendgrouptitle/_text.py b/plotly/validators/scatterpolar/legendgrouptitle/_text.py index 410cc08e40..15a7d45501 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/_text.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatterpolar.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/__init__.py b/plotly/validators/scatterpolar/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_color.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_color.py index 88428b7edc..a5e1ed4034 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_color.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_family.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_family.py index 88a98857d9..aa1b1dabda 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_family.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_lineposition.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_lineposition.py index 8b5849971a..f8daa4631c 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_shadow.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_shadow.py index ef249affd9..892fdee398 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_size.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_size.py index 1890d9ba83..c22227acf1 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_size.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_style.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_style.py index 3f77014c81..f90f1fc7ad 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_style.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_textcase.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_textcase.py index 075103191e..02bce9988b 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_variant.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_variant.py index a812ce2c69..d2b1f2584f 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolar/legendgrouptitle/font/_weight.py b/plotly/validators/scatterpolar/legendgrouptitle/font/_weight.py index 98cf0fb359..56ff470c45 100644 --- a/plotly/validators/scatterpolar/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scatterpolar/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolar.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterpolar/line/__init__.py b/plotly/validators/scatterpolar/line/__init__.py index 7045562597..d9c0ff9500 100644 --- a/plotly/validators/scatterpolar/line/__init__.py +++ b/plotly/validators/scatterpolar/line/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._shape import ShapeValidator - from ._dash import DashValidator - from ._color import ColorValidator - from ._backoffsrc import BackoffsrcValidator - from ._backoff import BackoffValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._shape.ShapeValidator", - "._dash.DashValidator", - "._color.ColorValidator", - "._backoffsrc.BackoffsrcValidator", - "._backoff.BackoffValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + "._backoffsrc.BackoffsrcValidator", + "._backoff.BackoffValidator", + ], +) diff --git a/plotly/validators/scatterpolar/line/_backoff.py b/plotly/validators/scatterpolar/line/_backoff.py index 5117589815..781bccf6d7 100644 --- a/plotly/validators/scatterpolar/line/_backoff.py +++ b/plotly/validators/scatterpolar/line/_backoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffValidator(_plotly_utils.basevalidators.NumberValidator): +class BackoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="backoff", parent_name="scatterpolar.line", **kwargs ): - super(BackoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/line/_backoffsrc.py b/plotly/validators/scatterpolar/line/_backoffsrc.py index ed356ca0ab..427206f4a9 100644 --- a/plotly/validators/scatterpolar/line/_backoffsrc.py +++ b/plotly/validators/scatterpolar/line/_backoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BackoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="backoffsrc", parent_name="scatterpolar.line", **kwargs ): - super(BackoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/line/_color.py b/plotly/validators/scatterpolar/line/_color.py index 548a204b04..f058b78b76 100644 --- a/plotly/validators/scatterpolar/line/_color.py +++ b/plotly/validators/scatterpolar/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scatterpolar.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/line/_dash.py b/plotly/validators/scatterpolar/line/_dash.py index 4f76636892..f5b81e0c5e 100644 --- a/plotly/validators/scatterpolar/line/_dash.py +++ b/plotly/validators/scatterpolar/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="scatterpolar.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/scatterpolar/line/_shape.py b/plotly/validators/scatterpolar/line/_shape.py index d077eb0aca..b077718a22 100644 --- a/plotly/validators/scatterpolar/line/_shape.py +++ b/plotly/validators/scatterpolar/line/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scatterpolar.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["linear", "spline"]), **kwargs, diff --git a/plotly/validators/scatterpolar/line/_smoothing.py b/plotly/validators/scatterpolar/line/_smoothing.py index cc91e57322..3f3be4cf92 100644 --- a/plotly/validators/scatterpolar/line/_smoothing.py +++ b/plotly/validators/scatterpolar/line/_smoothing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="scatterpolar.line", **kwargs ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/line/_width.py b/plotly/validators/scatterpolar/line/_width.py index 68e1add29e..809e5052bd 100644 --- a/plotly/validators/scatterpolar/line/_width.py +++ b/plotly/validators/scatterpolar/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scatterpolar.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/__init__.py b/plotly/validators/scatterpolar/marker/__init__.py index 8434e73e3f..fea9868a7b 100644 --- a/plotly/validators/scatterpolar/marker/__init__.py +++ b/plotly/validators/scatterpolar/marker/__init__.py @@ -1,71 +1,38 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._standoffsrc import StandoffsrcValidator - from ._standoff import StandoffValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxdisplayed import MaxdisplayedValidator - from ._line import LineValidator - from ._gradient import GradientValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angleref import AnglerefValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._standoffsrc.StandoffsrcValidator", - "._standoff.StandoffValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxdisplayed.MaxdisplayedValidator", - "._line.LineValidator", - "._gradient.GradientValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angleref.AnglerefValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._standoffsrc.StandoffsrcValidator", + "._standoff.StandoffValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angleref.AnglerefValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/_angle.py b/plotly/validators/scatterpolar/marker/_angle.py index b1ddabbc6e..4ba62b2f78 100644 --- a/plotly/validators/scatterpolar/marker/_angle.py +++ b/plotly/validators/scatterpolar/marker/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__( self, plotly_name="angle", parent_name="scatterpolar.marker", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_angleref.py b/plotly/validators/scatterpolar/marker/_angleref.py index 57aea14862..794bb8e595 100644 --- a/plotly/validators/scatterpolar/marker/_angleref.py +++ b/plotly/validators/scatterpolar/marker/_angleref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnglerefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="angleref", parent_name="scatterpolar.marker", **kwargs ): - super(AnglerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["previous", "up"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_anglesrc.py b/plotly/validators/scatterpolar/marker/_anglesrc.py index 7d51138852..5bf50322d2 100644 --- a/plotly/validators/scatterpolar/marker/_anglesrc.py +++ b/plotly/validators/scatterpolar/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scatterpolar.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_autocolorscale.py b/plotly/validators/scatterpolar/marker/_autocolorscale.py index c3e038985f..661d02fd42 100644 --- a/plotly/validators/scatterpolar/marker/_autocolorscale.py +++ b/plotly/validators/scatterpolar/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatterpolar.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_cauto.py b/plotly/validators/scatterpolar/marker/_cauto.py index 7ab0b7f940..e48fcc6888 100644 --- a/plotly/validators/scatterpolar/marker/_cauto.py +++ b/plotly/validators/scatterpolar/marker/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterpolar.marker", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_cmax.py b/plotly/validators/scatterpolar/marker/_cmax.py index 50af1bb0a9..f882fdd078 100644 --- a/plotly/validators/scatterpolar/marker/_cmax.py +++ b/plotly/validators/scatterpolar/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scatterpolar.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_cmid.py b/plotly/validators/scatterpolar/marker/_cmid.py index 7287446e43..2e5dbde48e 100644 --- a/plotly/validators/scatterpolar/marker/_cmid.py +++ b/plotly/validators/scatterpolar/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scatterpolar.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_cmin.py b/plotly/validators/scatterpolar/marker/_cmin.py index 43137b8adc..d87b7d5d3d 100644 --- a/plotly/validators/scatterpolar/marker/_cmin.py +++ b/plotly/validators/scatterpolar/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scatterpolar.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_color.py b/plotly/validators/scatterpolar/marker/_color.py index 59776833f5..60bf76bfd5 100644 --- a/plotly/validators/scatterpolar/marker/_color.py +++ b/plotly/validators/scatterpolar/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatterpolar/marker/_coloraxis.py b/plotly/validators/scatterpolar/marker/_coloraxis.py index fa79c1f1d8..e2ca94c702 100644 --- a/plotly/validators/scatterpolar/marker/_coloraxis.py +++ b/plotly/validators/scatterpolar/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterpolar.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatterpolar/marker/_colorbar.py b/plotly/validators/scatterpolar/marker/_colorbar.py index c66e9bdbc8..6a412c95f7 100644 --- a/plotly/validators/scatterpolar/marker/_colorbar.py +++ b/plotly/validators/scatterpolar/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scatterpolar.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polar.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolar.marker.colorbar.tickformatstopde - faults), sets the default property values to - use for elements of - scatterpolar.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolar.marke - r.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_colorscale.py b/plotly/validators/scatterpolar/marker/_colorscale.py index b1b45eb08d..8b2551c627 100644 --- a/plotly/validators/scatterpolar/marker/_colorscale.py +++ b/plotly/validators/scatterpolar/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatterpolar.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_colorsrc.py b/plotly/validators/scatterpolar/marker/_colorsrc.py index 103f3da50a..fd43952138 100644 --- a/plotly/validators/scatterpolar/marker/_colorsrc.py +++ b/plotly/validators/scatterpolar/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolar.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_gradient.py b/plotly/validators/scatterpolar/marker/_gradient.py index 0aa1b3a9b5..a148f1a285 100644 --- a/plotly/validators/scatterpolar/marker/_gradient.py +++ b/plotly/validators/scatterpolar/marker/_gradient.py @@ -1,30 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class GradientValidator(_bv.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scatterpolar.marker", **kwargs ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gradient"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_line.py b/plotly/validators/scatterpolar/marker/_line.py index 931db1c169..3a24af99b0 100644 --- a/plotly/validators/scatterpolar/marker/_line.py +++ b/plotly/validators/scatterpolar/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatterpolar.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_maxdisplayed.py b/plotly/validators/scatterpolar/marker/_maxdisplayed.py index 0617e4ffaf..7154c8c6b2 100644 --- a/plotly/validators/scatterpolar/marker/_maxdisplayed.py +++ b/plotly/validators/scatterpolar/marker/_maxdisplayed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxdisplayedValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxdisplayed", parent_name="scatterpolar.marker", **kwargs ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_opacity.py b/plotly/validators/scatterpolar/marker/_opacity.py index a6ec77f0c2..f8d1329641 100644 --- a/plotly/validators/scatterpolar/marker/_opacity.py +++ b/plotly/validators/scatterpolar/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolar.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scatterpolar/marker/_opacitysrc.py b/plotly/validators/scatterpolar/marker/_opacitysrc.py index e121da35d6..02d9a1b175 100644 --- a/plotly/validators/scatterpolar/marker/_opacitysrc.py +++ b/plotly/validators/scatterpolar/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scatterpolar.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_reversescale.py b/plotly/validators/scatterpolar/marker/_reversescale.py index 81799268ea..60d3cf1710 100644 --- a/plotly/validators/scatterpolar/marker/_reversescale.py +++ b/plotly/validators/scatterpolar/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterpolar.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_showscale.py b/plotly/validators/scatterpolar/marker/_showscale.py index 487eef4bc1..84a532930b 100644 --- a/plotly/validators/scatterpolar/marker/_showscale.py +++ b/plotly/validators/scatterpolar/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scatterpolar.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_size.py b/plotly/validators/scatterpolar/marker/_size.py index faef3c0513..f33761f102 100644 --- a/plotly/validators/scatterpolar/marker/_size.py +++ b/plotly/validators/scatterpolar/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scatterpolar.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/marker/_sizemin.py b/plotly/validators/scatterpolar/marker/_sizemin.py index e92d29c5b1..d254d0f1ce 100644 --- a/plotly/validators/scatterpolar/marker/_sizemin.py +++ b/plotly/validators/scatterpolar/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scatterpolar.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_sizemode.py b/plotly/validators/scatterpolar/marker/_sizemode.py index 681132e801..4d0cbeef04 100644 --- a/plotly/validators/scatterpolar/marker/_sizemode.py +++ b/plotly/validators/scatterpolar/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scatterpolar.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/_sizeref.py b/plotly/validators/scatterpolar/marker/_sizeref.py index 532ee5babc..de09950264 100644 --- a/plotly/validators/scatterpolar/marker/_sizeref.py +++ b/plotly/validators/scatterpolar/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scatterpolar.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_sizesrc.py b/plotly/validators/scatterpolar/marker/_sizesrc.py index c83c0fb9e3..ae41214e38 100644 --- a/plotly/validators/scatterpolar/marker/_sizesrc.py +++ b/plotly/validators/scatterpolar/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterpolar.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_standoff.py b/plotly/validators/scatterpolar/marker/_standoff.py index 8626fd8622..76d6adca3a 100644 --- a/plotly/validators/scatterpolar/marker/_standoff.py +++ b/plotly/validators/scatterpolar/marker/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="scatterpolar.marker", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/marker/_standoffsrc.py b/plotly/validators/scatterpolar/marker/_standoffsrc.py index 0d39a01151..3f8b77931d 100644 --- a/plotly/validators/scatterpolar/marker/_standoffsrc.py +++ b/plotly/validators/scatterpolar/marker/_standoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StandoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="standoffsrc", parent_name="scatterpolar.marker", **kwargs ): - super(StandoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/_symbol.py b/plotly/validators/scatterpolar/marker/_symbol.py index a5f966b4e0..e45fe41730 100644 --- a/plotly/validators/scatterpolar/marker/_symbol.py +++ b/plotly/validators/scatterpolar/marker/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="symbol", parent_name="scatterpolar.marker", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolar/marker/_symbolsrc.py b/plotly/validators/scatterpolar/marker/_symbolsrc.py index cca11ce3bd..e496d1bc2e 100644 --- a/plotly/validators/scatterpolar/marker/_symbolsrc.py +++ b/plotly/validators/scatterpolar/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scatterpolar.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/__init__.py b/plotly/validators/scatterpolar/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/__init__.py +++ b/plotly/validators/scatterpolar/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py b/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py index 369334bfb5..06e0176f43 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py b/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py index 839c667653..d3da1a51dc 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py b/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py index 1b8fdc87bd..d130dd4681 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_dtick.py b/plotly/validators/scatterpolar/marker/colorbar/_dtick.py index cde376ddc5..d4cd12b99e 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_dtick.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py b/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py index cf5d267fac..f43c184bf0 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_labelalias.py b/plotly/validators/scatterpolar/marker/colorbar/_labelalias.py index 2d1f43a63e..884fc532b5 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_labelalias.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_len.py b/plotly/validators/scatterpolar/marker/colorbar/_len.py index 0f231cc177..42afbdd6cd 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_len.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py b/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py index 01231cc0c8..ec8faec1ec 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_lenmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_minexponent.py b/plotly/validators/scatterpolar/marker/colorbar/_minexponent.py index b9f7ca2831..cc7170691c 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_minexponent.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_nticks.py b/plotly/validators/scatterpolar/marker/colorbar/_nticks.py index b3c3f1250e..158a0efbfa 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_nticks.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_orientation.py b/plotly/validators/scatterpolar/marker/colorbar/_orientation.py index 5e66e34484..180c249cc3 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_orientation.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py b/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py index 409826a8b1..7cf926393e 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py b/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py index 8f65496f22..05546eee1e 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py b/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py index 9afad978eb..98828aaac4 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py b/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py index 45e2cd3856..8322e07581 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py b/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py index 73df462c9d..34d39cb184 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py b/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py index 91edb20c64..616024f629 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py b/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py index 61c284d797..01fd7d09d0 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_thickness.py b/plotly/validators/scatterpolar/marker/colorbar/_thickness.py index 0c5f61dd9c..eebb3c1431 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_thickness.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py b/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py index 11088a51c3..66d8b53499 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tick0.py b/plotly/validators/scatterpolar/marker/colorbar/_tick0.py index 1836fafb47..a3f4ca6e6a 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tick0.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py b/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py index 8a8169d525..0df694c2ae 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py b/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py index fe89e84efe..d0e8b6a716 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py b/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py index 909ac27440..dc237fbd67 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py b/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py index afb3579da3..fb2856eaa7 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py index 690ec44f09..48574107ce 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py b/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py index c1aeb909c1..b345bad24c 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scatterpolar/marker/colorbar/_ticklabeloverflow.py index 8306480a6b..b3ad94874c 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticklabelposition.py b/plotly/validators/scatterpolar/marker/colorbar/_ticklabelposition.py index bf3e04d6f6..ab5509ca7a 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticklabelstep.py b/plotly/validators/scatterpolar/marker/colorbar/_ticklabelstep.py index 57e3971bc0..74e59fd044 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py b/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py index e39d5f671a..2bb5c3b18a 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticklen.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py b/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py index b29f1f0858..a0c7db28e0 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py b/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py index 29b8554c3a..88c24cd630 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticks.py b/plotly/validators/scatterpolar/marker/colorbar/_ticks.py index c01020ca28..a3a28a8de6 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticks.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py b/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py index b92f8a2654..aa6ce19393 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py b/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py index 96a088bf1d..8e7ae5e81f 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py b/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py index f9eaa1a6de..cdcf03b640 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py b/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py index 3518fca02c..5319895a92 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py b/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py index ff360f9f3f..a6f526f79a 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py b/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py index f6eb514585..22dd7a30d1 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_title.py b/plotly/validators/scatterpolar/marker/colorbar/_title.py index 6dbf31d3f3..c6f9123cdf 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_title.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_x.py b/plotly/validators/scatterpolar/marker/colorbar/_x.py index 0213bbf93e..5ed08748cd 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_x.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py b/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py index b147918b65..fed02ca0d3 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_xanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_xpad.py b/plotly/validators/scatterpolar/marker/colorbar/_xpad.py index 47ddc37e40..80db3961f7 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_xpad.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_xref.py b/plotly/validators/scatterpolar/marker/colorbar/_xref.py index d8b81c0e7e..e0850ab168 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_xref.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_y.py b/plotly/validators/scatterpolar/marker/colorbar/_y.py index c05b8f6197..0f6665e55e 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_y.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py b/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py index bdcc264669..5e8bd5760f 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_yanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatterpolar.marker.colorbar", **kwargs, ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_ypad.py b/plotly/validators/scatterpolar/marker/colorbar/_ypad.py index 4f18f05c0d..a6096ebf40 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_ypad.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/_yref.py b/plotly/validators/scatterpolar/marker/colorbar/_yref.py index 65c2204556..d9b99c8349 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/_yref.py +++ b/plotly/validators/scatterpolar/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scatterpolar.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py index 98fe38deb5..71c857672f 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py index 9258bf18fd..719e723e3d 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_lineposition.py index e12a8b8aa6..485eaab616 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_shadow.py index 66b5db62db..992cd63486 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py index 58106cf78d..f4f6203fef 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_style.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_style.py index dabd91194f..2366fca32e 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_textcase.py index 204e60098d..cbfaf412f3 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_variant.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_variant.py index eb89b58b18..c1b0c583eb 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_weight.py b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_weight.py index 242bbb691f..66089f077f 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolar.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py index a1b613ab54..4787ba81fb 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py index 8acf4d3e1a..a1ac3d5d5b 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py index 33a13af789..ece83dbf54 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py index fd5824e581..0d2cbfe89c 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py index 7de1f4f0ff..ca6c6737b1 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scatterpolar/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scatterpolar.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py b/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/_font.py b/plotly/validators/scatterpolar/marker/colorbar/title/_font.py index fd5f5c5d1e..a06740ff5d 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/_font.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolar.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/_side.py b/plotly/validators/scatterpolar/marker/colorbar/title/_side.py index 7529e5d428..9aad37d869 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/_side.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatterpolar.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/_text.py b/plotly/validators/scatterpolar/marker/colorbar/title/_text.py index 4b1348b8ef..4c232c5867 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/_text.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatterpolar.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py index 51c11d76ca..b61b612fa1 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py index 252f435ffe..f69f89e37b 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_lineposition.py index 85f487da56..d1998699a9 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_shadow.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_shadow.py index 015f734790..7fed7ad9cc 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py index abbf09b1c2..716c6004c7 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_style.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_style.py index 0a3a5fda96..3668f2168d 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_textcase.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_textcase.py index 840f8b067b..f141690e68 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_variant.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_variant.py index ccb90fa3d3..ec421cc761 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolar/marker/colorbar/title/font/_weight.py b/plotly/validators/scatterpolar/marker/colorbar/title/font/_weight.py index fdbdf19623..ab339511f5 100644 --- a/plotly/validators/scatterpolar/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scatterpolar/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolar.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterpolar/marker/gradient/__init__.py b/plotly/validators/scatterpolar/marker/gradient/__init__.py index 624a280ea4..f5373e7822 100644 --- a/plotly/validators/scatterpolar/marker/gradient/__init__.py +++ b/plotly/validators/scatterpolar/marker/gradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._typesrc import TypesrcValidator - from ._type import TypeValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._typesrc.TypesrcValidator", - "._type.TypeValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/gradient/_color.py b/plotly/validators/scatterpolar/marker/gradient/_color.py index e9f1cd7602..12a8eb1c03 100644 --- a/plotly/validators/scatterpolar/marker/gradient/_color.py +++ b/plotly/validators/scatterpolar/marker/gradient/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.marker.gradient", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py b/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py index 5e4641014d..c58e4270a6 100644 --- a/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py +++ b/plotly/validators/scatterpolar/marker/gradient/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolar.marker.gradient", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/gradient/_type.py b/plotly/validators/scatterpolar/marker/gradient/_type.py index 18afa5a859..4ca9b4441f 100644 --- a/plotly/validators/scatterpolar/marker/gradient/_type.py +++ b/plotly/validators/scatterpolar/marker/gradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scatterpolar.marker.gradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), diff --git a/plotly/validators/scatterpolar/marker/gradient/_typesrc.py b/plotly/validators/scatterpolar/marker/gradient/_typesrc.py index 0771cd0f37..b45db3cbd8 100644 --- a/plotly/validators/scatterpolar/marker/gradient/_typesrc.py +++ b/plotly/validators/scatterpolar/marker/gradient/_typesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TypesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scatterpolar.marker.gradient", **kwargs, ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/line/__init__.py b/plotly/validators/scatterpolar/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scatterpolar/marker/line/__init__.py +++ b/plotly/validators/scatterpolar/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatterpolar/marker/line/_autocolorscale.py b/plotly/validators/scatterpolar/marker/line/_autocolorscale.py index 8886a4fe39..5839405adb 100644 --- a/plotly/validators/scatterpolar/marker/line/_autocolorscale.py +++ b/plotly/validators/scatterpolar/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatterpolar.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/line/_cauto.py b/plotly/validators/scatterpolar/marker/line/_cauto.py index 4cd7b0eae9..79b9b6f396 100644 --- a/plotly/validators/scatterpolar/marker/line/_cauto.py +++ b/plotly/validators/scatterpolar/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterpolar.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/line/_cmax.py b/plotly/validators/scatterpolar/marker/line/_cmax.py index d88729d1f3..86a6594caf 100644 --- a/plotly/validators/scatterpolar/marker/line/_cmax.py +++ b/plotly/validators/scatterpolar/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatterpolar.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/line/_cmid.py b/plotly/validators/scatterpolar/marker/line/_cmid.py index 24c0b2a276..a38a863864 100644 --- a/plotly/validators/scatterpolar/marker/line/_cmid.py +++ b/plotly/validators/scatterpolar/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterpolar.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/line/_cmin.py b/plotly/validators/scatterpolar/marker/line/_cmin.py index 6a56ae24e1..7eb1097a72 100644 --- a/plotly/validators/scatterpolar/marker/line/_cmin.py +++ b/plotly/validators/scatterpolar/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scatterpolar.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/line/_color.py b/plotly/validators/scatterpolar/marker/line/_color.py index 00d21ba7a9..feebfe5976 100644 --- a/plotly/validators/scatterpolar/marker/line/_color.py +++ b/plotly/validators/scatterpolar/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatterpolar/marker/line/_coloraxis.py b/plotly/validators/scatterpolar/marker/line/_coloraxis.py index 16bd03a936..9ef09cfdcd 100644 --- a/plotly/validators/scatterpolar/marker/line/_coloraxis.py +++ b/plotly/validators/scatterpolar/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterpolar.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatterpolar/marker/line/_colorscale.py b/plotly/validators/scatterpolar/marker/line/_colorscale.py index 4d6e4a88a8..4f1f874c66 100644 --- a/plotly/validators/scatterpolar/marker/line/_colorscale.py +++ b/plotly/validators/scatterpolar/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatterpolar.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatterpolar/marker/line/_colorsrc.py b/plotly/validators/scatterpolar/marker/line/_colorsrc.py index 2320bd185c..991f0e5722 100644 --- a/plotly/validators/scatterpolar/marker/line/_colorsrc.py +++ b/plotly/validators/scatterpolar/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolar.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/line/_reversescale.py b/plotly/validators/scatterpolar/marker/line/_reversescale.py index 5584bbf16d..d267b003f7 100644 --- a/plotly/validators/scatterpolar/marker/line/_reversescale.py +++ b/plotly/validators/scatterpolar/marker/line/_reversescale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterpolar.marker.line", **kwargs, ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/marker/line/_width.py b/plotly/validators/scatterpolar/marker/line/_width.py index acb0b43208..863db9c3df 100644 --- a/plotly/validators/scatterpolar/marker/line/_width.py +++ b/plotly/validators/scatterpolar/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatterpolar.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/marker/line/_widthsrc.py b/plotly/validators/scatterpolar/marker/line/_widthsrc.py index e8a5f6f4c1..cd5573074c 100644 --- a/plotly/validators/scatterpolar/marker/line/_widthsrc.py +++ b/plotly/validators/scatterpolar/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scatterpolar.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/selected/__init__.py b/plotly/validators/scatterpolar/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatterpolar/selected/__init__.py +++ b/plotly/validators/scatterpolar/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatterpolar/selected/_marker.py b/plotly/validators/scatterpolar/selected/_marker.py index d349aaa4cd..7e711dcc7e 100644 --- a/plotly/validators/scatterpolar/selected/_marker.py +++ b/plotly/validators/scatterpolar/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatterpolar.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/selected/_textfont.py b/plotly/validators/scatterpolar/selected/_textfont.py index 4a55f16440..5f168fe47b 100644 --- a/plotly/validators/scatterpolar/selected/_textfont.py +++ b/plotly/validators/scatterpolar/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatterpolar.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/selected/marker/__init__.py b/plotly/validators/scatterpolar/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatterpolar/selected/marker/__init__.py +++ b/plotly/validators/scatterpolar/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterpolar/selected/marker/_color.py b/plotly/validators/scatterpolar/selected/marker/_color.py index 8167b9d244..a1b6bb415f 100644 --- a/plotly/validators/scatterpolar/selected/marker/_color.py +++ b/plotly/validators/scatterpolar/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/selected/marker/_opacity.py b/plotly/validators/scatterpolar/selected/marker/_opacity.py index a0189a8d75..9d0649e4b0 100644 --- a/plotly/validators/scatterpolar/selected/marker/_opacity.py +++ b/plotly/validators/scatterpolar/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolar.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/selected/marker/_size.py b/plotly/validators/scatterpolar/selected/marker/_size.py index dd03c16399..308e3a52f0 100644 --- a/plotly/validators/scatterpolar/selected/marker/_size.py +++ b/plotly/validators/scatterpolar/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/selected/textfont/__init__.py b/plotly/validators/scatterpolar/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatterpolar/selected/textfont/__init__.py +++ b/plotly/validators/scatterpolar/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatterpolar/selected/textfont/_color.py b/plotly/validators/scatterpolar/selected/textfont/_color.py index 3e494a7669..a1016ec591 100644 --- a/plotly/validators/scatterpolar/selected/textfont/_color.py +++ b/plotly/validators/scatterpolar/selected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.selected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/stream/__init__.py b/plotly/validators/scatterpolar/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scatterpolar/stream/__init__.py +++ b/plotly/validators/scatterpolar/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scatterpolar/stream/_maxpoints.py b/plotly/validators/scatterpolar/stream/_maxpoints.py index aefe366398..484526dcd0 100644 --- a/plotly/validators/scatterpolar/stream/_maxpoints.py +++ b/plotly/validators/scatterpolar/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scatterpolar.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/stream/_token.py b/plotly/validators/scatterpolar/stream/_token.py index 61ca248d09..bf971511e8 100644 --- a/plotly/validators/scatterpolar/stream/_token.py +++ b/plotly/validators/scatterpolar/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="scatterpolar.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolar/textfont/__init__.py b/plotly/validators/scatterpolar/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatterpolar/textfont/__init__.py +++ b/plotly/validators/scatterpolar/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolar/textfont/_color.py b/plotly/validators/scatterpolar/textfont/_color.py index 5b5be0d804..387bc0c433 100644 --- a/plotly/validators/scatterpolar/textfont/_color.py +++ b/plotly/validators/scatterpolar/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterpolar/textfont/_colorsrc.py b/plotly/validators/scatterpolar/textfont/_colorsrc.py index 72028dfc3c..1755c8a1d0 100644 --- a/plotly/validators/scatterpolar/textfont/_colorsrc.py +++ b/plotly/validators/scatterpolar/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolar.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_family.py b/plotly/validators/scatterpolar/textfont/_family.py index 3ad5773b02..3ce30305b8 100644 --- a/plotly/validators/scatterpolar/textfont/_family.py +++ b/plotly/validators/scatterpolar/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolar.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatterpolar/textfont/_familysrc.py b/plotly/validators/scatterpolar/textfont/_familysrc.py index c9d16ed9a8..71f1d6ebe3 100644 --- a/plotly/validators/scatterpolar/textfont/_familysrc.py +++ b/plotly/validators/scatterpolar/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterpolar.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_lineposition.py b/plotly/validators/scatterpolar/textfont/_lineposition.py index 62b27fce53..f3d611c240 100644 --- a/plotly/validators/scatterpolar/textfont/_lineposition.py +++ b/plotly/validators/scatterpolar/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolar.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatterpolar/textfont/_linepositionsrc.py b/plotly/validators/scatterpolar/textfont/_linepositionsrc.py index 09fbd8e8b4..db07dd48bf 100644 --- a/plotly/validators/scatterpolar/textfont/_linepositionsrc.py +++ b/plotly/validators/scatterpolar/textfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatterpolar.textfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_shadow.py b/plotly/validators/scatterpolar/textfont/_shadow.py index 46b7b8f120..be041d19e4 100644 --- a/plotly/validators/scatterpolar/textfont/_shadow.py +++ b/plotly/validators/scatterpolar/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolar.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolar/textfont/_shadowsrc.py b/plotly/validators/scatterpolar/textfont/_shadowsrc.py index 8fc8eb3969..fbe77e5d7c 100644 --- a/plotly/validators/scatterpolar/textfont/_shadowsrc.py +++ b/plotly/validators/scatterpolar/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatterpolar.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_size.py b/plotly/validators/scatterpolar/textfont/_size.py index a2c7ac28d8..4c5e65a7ee 100644 --- a/plotly/validators/scatterpolar/textfont/_size.py +++ b/plotly/validators/scatterpolar/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatterpolar/textfont/_sizesrc.py b/plotly/validators/scatterpolar/textfont/_sizesrc.py index 31b4ae47c5..711a7531e8 100644 --- a/plotly/validators/scatterpolar/textfont/_sizesrc.py +++ b/plotly/validators/scatterpolar/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterpolar.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_style.py b/plotly/validators/scatterpolar/textfont/_style.py index b499f57cfb..672d8dfc0d 100644 --- a/plotly/validators/scatterpolar/textfont/_style.py +++ b/plotly/validators/scatterpolar/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolar.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatterpolar/textfont/_stylesrc.py b/plotly/validators/scatterpolar/textfont/_stylesrc.py index 4f69bfafda..4d45817a11 100644 --- a/plotly/validators/scatterpolar/textfont/_stylesrc.py +++ b/plotly/validators/scatterpolar/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatterpolar.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_textcase.py b/plotly/validators/scatterpolar/textfont/_textcase.py index a95d0d1805..500398e7a4 100644 --- a/plotly/validators/scatterpolar/textfont/_textcase.py +++ b/plotly/validators/scatterpolar/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolar.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatterpolar/textfont/_textcasesrc.py b/plotly/validators/scatterpolar/textfont/_textcasesrc.py index 6dbbc94a92..56747b5e2d 100644 --- a/plotly/validators/scatterpolar/textfont/_textcasesrc.py +++ b/plotly/validators/scatterpolar/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatterpolar.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_variant.py b/plotly/validators/scatterpolar/textfont/_variant.py index 0146ffb83e..826ed4318f 100644 --- a/plotly/validators/scatterpolar/textfont/_variant.py +++ b/plotly/validators/scatterpolar/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolar.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolar/textfont/_variantsrc.py b/plotly/validators/scatterpolar/textfont/_variantsrc.py index 8bdf4b6ff8..4f724f71f1 100644 --- a/plotly/validators/scatterpolar/textfont/_variantsrc.py +++ b/plotly/validators/scatterpolar/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatterpolar.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/textfont/_weight.py b/plotly/validators/scatterpolar/textfont/_weight.py index 516e7fa1d4..0234650b2d 100644 --- a/plotly/validators/scatterpolar/textfont/_weight.py +++ b/plotly/validators/scatterpolar/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolar.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatterpolar/textfont/_weightsrc.py b/plotly/validators/scatterpolar/textfont/_weightsrc.py index 666f9dedd0..2277962568 100644 --- a/plotly/validators/scatterpolar/textfont/_weightsrc.py +++ b/plotly/validators/scatterpolar/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatterpolar.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/unselected/__init__.py b/plotly/validators/scatterpolar/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatterpolar/unselected/__init__.py +++ b/plotly/validators/scatterpolar/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatterpolar/unselected/_marker.py b/plotly/validators/scatterpolar/unselected/_marker.py index 2915ef8e37..805f429235 100644 --- a/plotly/validators/scatterpolar/unselected/_marker.py +++ b/plotly/validators/scatterpolar/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatterpolar.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/unselected/_textfont.py b/plotly/validators/scatterpolar/unselected/_textfont.py index 6cb2721583..5778a6eeaf 100644 --- a/plotly/validators/scatterpolar/unselected/_textfont.py +++ b/plotly/validators/scatterpolar/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatterpolar.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatterpolar/unselected/marker/__init__.py b/plotly/validators/scatterpolar/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatterpolar/unselected/marker/__init__.py +++ b/plotly/validators/scatterpolar/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterpolar/unselected/marker/_color.py b/plotly/validators/scatterpolar/unselected/marker/_color.py index 4e05bc41ec..26ff9004d5 100644 --- a/plotly/validators/scatterpolar/unselected/marker/_color.py +++ b/plotly/validators/scatterpolar/unselected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.unselected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolar/unselected/marker/_opacity.py b/plotly/validators/scatterpolar/unselected/marker/_opacity.py index 412bfa9d3e..668f66eb89 100644 --- a/plotly/validators/scatterpolar/unselected/marker/_opacity.py +++ b/plotly/validators/scatterpolar/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolar.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolar/unselected/marker/_size.py b/plotly/validators/scatterpolar/unselected/marker/_size.py index 3d7f8e5c82..2ca02a526e 100644 --- a/plotly/validators/scatterpolar/unselected/marker/_size.py +++ b/plotly/validators/scatterpolar/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolar.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolar/unselected/textfont/__init__.py b/plotly/validators/scatterpolar/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatterpolar/unselected/textfont/__init__.py +++ b/plotly/validators/scatterpolar/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatterpolar/unselected/textfont/_color.py b/plotly/validators/scatterpolar/unselected/textfont/_color.py index 8c094235df..9ba28ea657 100644 --- a/plotly/validators/scatterpolar/unselected/textfont/_color.py +++ b/plotly/validators/scatterpolar/unselected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolar.unselected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/__init__.py b/plotly/validators/scatterpolargl/__init__.py index 69a11c033b..55efbc3b3b 100644 --- a/plotly/validators/scatterpolargl/__init__.py +++ b/plotly/validators/scatterpolargl/__init__.py @@ -1,115 +1,60 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._thetaunit import ThetaunitValidator - from ._thetasrc import ThetasrcValidator - from ._theta0 import Theta0Validator - from ._theta import ThetaValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._rsrc import RsrcValidator - from ._r0 import R0Validator - from ._r import RValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._dtheta import DthetaValidator - from ._dr import DrValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._thetaunit.ThetaunitValidator", - "._thetasrc.ThetasrcValidator", - "._theta0.Theta0Validator", - "._theta.ThetaValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._rsrc.RsrcValidator", - "._r0.R0Validator", - "._r.RValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._dtheta.DthetaValidator", - "._dr.DrValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._thetaunit.ThetaunitValidator", + "._thetasrc.ThetasrcValidator", + "._theta0.Theta0Validator", + "._theta.ThetaValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._rsrc.RsrcValidator", + "._r0.R0Validator", + "._r.RValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._dtheta.DthetaValidator", + "._dr.DrValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/_connectgaps.py b/plotly/validators/scatterpolargl/_connectgaps.py index cccb7f7ec6..f4ac507eda 100644 --- a/plotly/validators/scatterpolargl/_connectgaps.py +++ b/plotly/validators/scatterpolargl/_connectgaps.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scatterpolargl", **kwargs ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_customdata.py b/plotly/validators/scatterpolargl/_customdata.py index 60d2621cb3..445162ad58 100644 --- a/plotly/validators/scatterpolargl/_customdata.py +++ b/plotly/validators/scatterpolargl/_customdata.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="customdata", parent_name="scatterpolargl", **kwargs ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_customdatasrc.py b/plotly/validators/scatterpolargl/_customdatasrc.py index 1c8b8a6707..de46b59953 100644 --- a/plotly/validators/scatterpolargl/_customdatasrc.py +++ b/plotly/validators/scatterpolargl/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="scatterpolargl", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_dr.py b/plotly/validators/scatterpolargl/_dr.py index 0a3bc8ce68..6666824376 100644 --- a/plotly/validators/scatterpolargl/_dr.py +++ b/plotly/validators/scatterpolargl/_dr.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DrValidator(_plotly_utils.basevalidators.NumberValidator): +class DrValidator(_bv.NumberValidator): def __init__(self, plotly_name="dr", parent_name="scatterpolargl", **kwargs): - super(DrValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_dtheta.py b/plotly/validators/scatterpolargl/_dtheta.py index 30be934327..77111b336a 100644 --- a/plotly/validators/scatterpolargl/_dtheta.py +++ b/plotly/validators/scatterpolargl/_dtheta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DthetaValidator(_plotly_utils.basevalidators.NumberValidator): +class DthetaValidator(_bv.NumberValidator): def __init__(self, plotly_name="dtheta", parent_name="scatterpolargl", **kwargs): - super(DthetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_fill.py b/plotly/validators/scatterpolargl/_fill.py index 1cabd2cf5e..78a2132c2f 100644 --- a/plotly/validators/scatterpolargl/_fill.py +++ b/plotly/validators/scatterpolargl/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scatterpolargl", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolargl/_fillcolor.py b/plotly/validators/scatterpolargl/_fillcolor.py index 535873ca58..f89141fda0 100644 --- a/plotly/validators/scatterpolargl/_fillcolor.py +++ b/plotly/validators/scatterpolargl/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scatterpolargl", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_hoverinfo.py b/plotly/validators/scatterpolargl/_hoverinfo.py index 588fc3fb29..6a50cb3020 100644 --- a/plotly/validators/scatterpolargl/_hoverinfo.py +++ b/plotly/validators/scatterpolargl/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scatterpolargl", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scatterpolargl/_hoverinfosrc.py b/plotly/validators/scatterpolargl/_hoverinfosrc.py index e513c43a59..933c36bbdd 100644 --- a/plotly/validators/scatterpolargl/_hoverinfosrc.py +++ b/plotly/validators/scatterpolargl/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="scatterpolargl", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_hoverlabel.py b/plotly/validators/scatterpolargl/_hoverlabel.py index e69742b183..a9202f5112 100644 --- a/plotly/validators/scatterpolargl/_hoverlabel.py +++ b/plotly/validators/scatterpolargl/_hoverlabel.py @@ -1,52 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__( self, plotly_name="hoverlabel", parent_name="scatterpolargl", **kwargs ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_hovertemplate.py b/plotly/validators/scatterpolargl/_hovertemplate.py index f89ecbf1e6..f2247ecb0d 100644 --- a/plotly/validators/scatterpolargl/_hovertemplate.py +++ b/plotly/validators/scatterpolargl/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scatterpolargl", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_hovertemplatesrc.py b/plotly/validators/scatterpolargl/_hovertemplatesrc.py index 9b7f281087..9849e055f5 100644 --- a/plotly/validators/scatterpolargl/_hovertemplatesrc.py +++ b/plotly/validators/scatterpolargl/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scatterpolargl", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_hovertext.py b/plotly/validators/scatterpolargl/_hovertext.py index d2ce4af252..640647f984 100644 --- a/plotly/validators/scatterpolargl/_hovertext.py +++ b/plotly/validators/scatterpolargl/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scatterpolargl", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_hovertextsrc.py b/plotly/validators/scatterpolargl/_hovertextsrc.py index 5c1c5fb269..f07707951d 100644 --- a/plotly/validators/scatterpolargl/_hovertextsrc.py +++ b/plotly/validators/scatterpolargl/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="scatterpolargl", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_ids.py b/plotly/validators/scatterpolargl/_ids.py index ee1dde6be8..744f71c330 100644 --- a/plotly/validators/scatterpolargl/_ids.py +++ b/plotly/validators/scatterpolargl/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scatterpolargl", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_idssrc.py b/plotly/validators/scatterpolargl/_idssrc.py index d770e51f7b..c8fbbf4da9 100644 --- a/plotly/validators/scatterpolargl/_idssrc.py +++ b/plotly/validators/scatterpolargl/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scatterpolargl", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_legend.py b/plotly/validators/scatterpolargl/_legend.py index 3ea6bb917f..e6d8465432 100644 --- a/plotly/validators/scatterpolargl/_legend.py +++ b/plotly/validators/scatterpolargl/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scatterpolargl", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_legendgroup.py b/plotly/validators/scatterpolargl/_legendgroup.py index 6428e9f381..88536c4e05 100644 --- a/plotly/validators/scatterpolargl/_legendgroup.py +++ b/plotly/validators/scatterpolargl/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="scatterpolargl", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_legendgrouptitle.py b/plotly/validators/scatterpolargl/_legendgrouptitle.py index a136e1fd7b..9e3477efc8 100644 --- a/plotly/validators/scatterpolargl/_legendgrouptitle.py +++ b/plotly/validators/scatterpolargl/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scatterpolargl", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_legendrank.py b/plotly/validators/scatterpolargl/_legendrank.py index faee6bb2a5..9d48b0cd44 100644 --- a/plotly/validators/scatterpolargl/_legendrank.py +++ b/plotly/validators/scatterpolargl/_legendrank.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendrank", parent_name="scatterpolargl", **kwargs ): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_legendwidth.py b/plotly/validators/scatterpolargl/_legendwidth.py index 6d7c7f4fef..b695fbeed0 100644 --- a/plotly/validators/scatterpolargl/_legendwidth.py +++ b/plotly/validators/scatterpolargl/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="scatterpolargl", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/_line.py b/plotly/validators/scatterpolargl/_line.py index d446796f6e..473e7d51f5 100644 --- a/plotly/validators/scatterpolargl/_line.py +++ b/plotly/validators/scatterpolargl/_line.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatterpolargl", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the style of the lines. - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_marker.py b/plotly/validators/scatterpolargl/_marker.py index 42f96c14dc..3357d9b3ce 100644 --- a/plotly/validators/scatterpolargl/_marker.py +++ b/plotly/validators/scatterpolargl/_marker.py @@ -1,144 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scatterpolargl", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterpolargl.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.scatterpolargl.mar - ker.Line` instance or dict with compatible - properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_meta.py b/plotly/validators/scatterpolargl/_meta.py index c678fb42e8..edbe5fefa5 100644 --- a/plotly/validators/scatterpolargl/_meta.py +++ b/plotly/validators/scatterpolargl/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scatterpolargl", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_metasrc.py b/plotly/validators/scatterpolargl/_metasrc.py index 8998a22093..f088aaa4a2 100644 --- a/plotly/validators/scatterpolargl/_metasrc.py +++ b/plotly/validators/scatterpolargl/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scatterpolargl", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_mode.py b/plotly/validators/scatterpolargl/_mode.py index 94ce272fe4..d6240277ae 100644 --- a/plotly/validators/scatterpolargl/_mode.py +++ b/plotly/validators/scatterpolargl/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scatterpolargl", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scatterpolargl/_name.py b/plotly/validators/scatterpolargl/_name.py index 42efadd232..96c884b227 100644 --- a/plotly/validators/scatterpolargl/_name.py +++ b/plotly/validators/scatterpolargl/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scatterpolargl", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_opacity.py b/plotly/validators/scatterpolargl/_opacity.py index a1f2ba60f4..d67ad6d40a 100644 --- a/plotly/validators/scatterpolargl/_opacity.py +++ b/plotly/validators/scatterpolargl/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatterpolargl", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolargl/_r.py b/plotly/validators/scatterpolargl/_r.py index cb10a91a15..a85f9292f2 100644 --- a/plotly/validators/scatterpolargl/_r.py +++ b/plotly/validators/scatterpolargl/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.DataArrayValidator): +class RValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="r", parent_name="scatterpolargl", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_r0.py b/plotly/validators/scatterpolargl/_r0.py index 4c1171a07b..07b66173a0 100644 --- a/plotly/validators/scatterpolargl/_r0.py +++ b/plotly/validators/scatterpolargl/_r0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class R0Validator(_plotly_utils.basevalidators.AnyValidator): +class R0Validator(_bv.AnyValidator): def __init__(self, plotly_name="r0", parent_name="scatterpolargl", **kwargs): - super(R0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_rsrc.py b/plotly/validators/scatterpolargl/_rsrc.py index 956a53c674..81749f4dce 100644 --- a/plotly/validators/scatterpolargl/_rsrc.py +++ b/plotly/validators/scatterpolargl/_rsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="rsrc", parent_name="scatterpolargl", **kwargs): - super(RsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_selected.py b/plotly/validators/scatterpolargl/_selected.py index b3d87ae640..b03696d55e 100644 --- a/plotly/validators/scatterpolargl/_selected.py +++ b/plotly/validators/scatterpolargl/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scatterpolargl", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterpolargl.sel - ected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_selectedpoints.py b/plotly/validators/scatterpolargl/_selectedpoints.py index acd2459695..e4f619e88f 100644 --- a/plotly/validators/scatterpolargl/_selectedpoints.py +++ b/plotly/validators/scatterpolargl/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scatterpolargl", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_showlegend.py b/plotly/validators/scatterpolargl/_showlegend.py index 0c7ca9958c..c18ab95536 100644 --- a/plotly/validators/scatterpolargl/_showlegend.py +++ b/plotly/validators/scatterpolargl/_showlegend.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlegend", parent_name="scatterpolargl", **kwargs ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_stream.py b/plotly/validators/scatterpolargl/_stream.py index bc00dd1ffb..7def284251 100644 --- a/plotly/validators/scatterpolargl/_stream.py +++ b/plotly/validators/scatterpolargl/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatterpolargl", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_subplot.py b/plotly/validators/scatterpolargl/_subplot.py index 194566c8dd..9ad0e1b261 100644 --- a/plotly/validators/scatterpolargl/_subplot.py +++ b/plotly/validators/scatterpolargl/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="scatterpolargl", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "polar"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_text.py b/plotly/validators/scatterpolargl/_text.py index 8349035e09..ba45722ed5 100644 --- a/plotly/validators/scatterpolargl/_text.py +++ b/plotly/validators/scatterpolargl/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scatterpolargl", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_textfont.py b/plotly/validators/scatterpolargl/_textfont.py index 2fa609ae2b..6b9fabe0f0 100644 --- a/plotly/validators/scatterpolargl/_textfont.py +++ b/plotly/validators/scatterpolargl/_textfont.py @@ -1,61 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scatterpolargl", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_textposition.py b/plotly/validators/scatterpolargl/_textposition.py index 9f226bb746..b75d178435 100644 --- a/plotly/validators/scatterpolargl/_textposition.py +++ b/plotly/validators/scatterpolargl/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scatterpolargl", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolargl/_textpositionsrc.py b/plotly/validators/scatterpolargl/_textpositionsrc.py index 22dc7cd90c..38abe43925 100644 --- a/plotly/validators/scatterpolargl/_textpositionsrc.py +++ b/plotly/validators/scatterpolargl/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scatterpolargl", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_textsrc.py b/plotly/validators/scatterpolargl/_textsrc.py index c5b6cce44f..e5cd5eb534 100644 --- a/plotly/validators/scatterpolargl/_textsrc.py +++ b/plotly/validators/scatterpolargl/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatterpolargl", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_texttemplate.py b/plotly/validators/scatterpolargl/_texttemplate.py index 9157a4599f..7ce1f10763 100644 --- a/plotly/validators/scatterpolargl/_texttemplate.py +++ b/plotly/validators/scatterpolargl/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scatterpolargl", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterpolargl/_texttemplatesrc.py b/plotly/validators/scatterpolargl/_texttemplatesrc.py index 19af4d92ca..59a0b5fe8f 100644 --- a/plotly/validators/scatterpolargl/_texttemplatesrc.py +++ b/plotly/validators/scatterpolargl/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scatterpolargl", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_theta.py b/plotly/validators/scatterpolargl/_theta.py index f8b0c6f2fb..17761257da 100644 --- a/plotly/validators/scatterpolargl/_theta.py +++ b/plotly/validators/scatterpolargl/_theta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ThetaValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="theta", parent_name="scatterpolargl", **kwargs): - super(ThetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_theta0.py b/plotly/validators/scatterpolargl/_theta0.py index 0c72f22ef2..39e43e49f8 100644 --- a/plotly/validators/scatterpolargl/_theta0.py +++ b/plotly/validators/scatterpolargl/_theta0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Theta0Validator(_plotly_utils.basevalidators.AnyValidator): +class Theta0Validator(_bv.AnyValidator): def __init__(self, plotly_name="theta0", parent_name="scatterpolargl", **kwargs): - super(Theta0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_thetasrc.py b/plotly/validators/scatterpolargl/_thetasrc.py index f7d4de2bec..ff6bedf7f1 100644 --- a/plotly/validators/scatterpolargl/_thetasrc.py +++ b/plotly/validators/scatterpolargl/_thetasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ThetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="thetasrc", parent_name="scatterpolargl", **kwargs): - super(ThetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_thetaunit.py b/plotly/validators/scatterpolargl/_thetaunit.py index da5ecf2212..daac99a485 100644 --- a/plotly/validators/scatterpolargl/_thetaunit.py +++ b/plotly/validators/scatterpolargl/_thetaunit.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThetaunitValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThetaunitValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="thetaunit", parent_name="scatterpolargl", **kwargs): - super(ThetaunitValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["radians", "degrees", "gradians"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/_uid.py b/plotly/validators/scatterpolargl/_uid.py index 0207353fa1..69efbd31fa 100644 --- a/plotly/validators/scatterpolargl/_uid.py +++ b/plotly/validators/scatterpolargl/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scatterpolargl", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_uirevision.py b/plotly/validators/scatterpolargl/_uirevision.py index 3c9724ceb3..e9bf0bf957 100644 --- a/plotly/validators/scatterpolargl/_uirevision.py +++ b/plotly/validators/scatterpolargl/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="scatterpolargl", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/_unselected.py b/plotly/validators/scatterpolargl/_unselected.py index 23d1653ecc..4bcf3d7ccb 100644 --- a/plotly/validators/scatterpolargl/_unselected.py +++ b/plotly/validators/scatterpolargl/_unselected.py @@ -1,25 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__( self, plotly_name="unselected", parent_name="scatterpolargl", **kwargs ): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterpolargl.uns - elected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/_visible.py b/plotly/validators/scatterpolargl/_visible.py index ad4df38b62..3e5d795515 100644 --- a/plotly/validators/scatterpolargl/_visible.py +++ b/plotly/validators/scatterpolargl/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scatterpolargl", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/hoverlabel/__init__.py b/plotly/validators/scatterpolargl/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/__init__.py +++ b/plotly/validators/scatterpolargl/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/hoverlabel/_align.py b/plotly/validators/scatterpolargl/hoverlabel/_align.py index 581fd7b73e..fe4dcdc47e 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_align.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scatterpolargl.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py b/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py index 1eaba8a0e3..e6b7ef0491 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scatterpolargl.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py b/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py index 3c78ec33bb..45bfbd371d 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatterpolargl.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py b/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py index 68e5cf5459..3051e0adf0 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_bgcolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scatterpolargl.hoverlabel", **kwargs, ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py b/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py index d241dd98d7..71df4ff752 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterpolargl.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py b/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py index 5959a12051..39e99c27eb 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scatterpolargl.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/_font.py b/plotly/validators/scatterpolargl/hoverlabel/_font.py index 9d9dde2246..bfaf09ddc9 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_font.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolargl.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/hoverlabel/_namelength.py b/plotly/validators/scatterpolargl/hoverlabel/_namelength.py index 094244fbcb..8069123984 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_namelength.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_namelength.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scatterpolargl.hoverlabel", **kwargs, ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py b/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py index ddd7536408..a72d965150 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scatterpolargl.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py b/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_color.py b/plotly/validators/scatterpolargl/hoverlabel/font/_color.py index e032229b29..893483a02d 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_color.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py index 7f99e0e2ef..d941ad3893 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_family.py b/plotly/validators/scatterpolargl/hoverlabel/font/_family.py index 2dffd5f59f..95606545aa 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_family.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py index 10cd822bdb..4f3b0a0fa9 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_lineposition.py b/plotly/validators/scatterpolargl/hoverlabel/font/_lineposition.py index ffa1e5b9f5..248de806d1 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_linepositionsrc.py index 04259572c3..9c6d685362 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_shadow.py b/plotly/validators/scatterpolargl/hoverlabel/font/_shadow.py index 8710c9e2e6..6a5b4839ac 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_shadow.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_shadowsrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_shadowsrc.py index 415a0989c1..73dc7da3d4 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_size.py b/plotly/validators/scatterpolargl/hoverlabel/font/_size.py index 09fe04d11b..7fee07d5c8 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_size.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py index 15cfffdf36..431b110719 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_style.py b/plotly/validators/scatterpolargl/hoverlabel/font/_style.py index 4fbd959cf4..78b2945fbd 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_style.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_stylesrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_stylesrc.py index 06d3ec5d8d..4bfdc4e3a4 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_textcase.py b/plotly/validators/scatterpolargl/hoverlabel/font/_textcase.py index a594188644..ff96184eb9 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_textcase.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_textcasesrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_textcasesrc.py index 817f7e491f..56dcebd16d 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_variant.py b/plotly/validators/scatterpolargl/hoverlabel/font/_variant.py index b1c0f7f87d..ed00e68c28 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_variant.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_variantsrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_variantsrc.py index 20c53e56bd..959e4dd1b4 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_weight.py b/plotly/validators/scatterpolargl/hoverlabel/font/_weight.py index 476be0b801..34b630737f 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_weight.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatterpolargl/hoverlabel/font/_weightsrc.py b/plotly/validators/scatterpolargl/hoverlabel/font/_weightsrc.py index f7335b8adb..3e5fe25994 100644 --- a/plotly/validators/scatterpolargl/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scatterpolargl/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatterpolargl.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/__init__.py b/plotly/validators/scatterpolargl/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/__init__.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/_font.py b/plotly/validators/scatterpolargl/legendgrouptitle/_font.py index cf3f6ae10d..809a6bd4ed 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/_font.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolargl.legendgrouptitle", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/_text.py b/plotly/validators/scatterpolargl/legendgrouptitle/_text.py index 302aec3d03..ba759d6253 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/_text.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatterpolargl.legendgrouptitle", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/__init__.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_color.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_color.py index bec44d655a..fca751dcdf 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_color.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_family.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_family.py index ff304f1df2..05fd222150 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_family.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_lineposition.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_lineposition.py index ec11b86b84..b94e5873ae 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_shadow.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_shadow.py index 02a3e18a89..f461b7352a 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_size.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_size.py index 803f0ab644..a6b786bc8c 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_size.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_style.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_style.py index 073e80ae08..9d0afca01f 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_style.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_textcase.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_textcase.py index d948843907..ca38ff780f 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_variant.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_variant.py index b64253abf9..1bcf955414 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolargl/legendgrouptitle/font/_weight.py b/plotly/validators/scatterpolargl/legendgrouptitle/font/_weight.py index d8d1c09238..dcd7812dba 100644 --- a/plotly/validators/scatterpolargl/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scatterpolargl/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolargl.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterpolargl/line/__init__.py b/plotly/validators/scatterpolargl/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/scatterpolargl/line/__init__.py +++ b/plotly/validators/scatterpolargl/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterpolargl/line/_color.py b/plotly/validators/scatterpolargl/line/_color.py index 5425d65d94..ba79701ffe 100644 --- a/plotly/validators/scatterpolargl/line/_color.py +++ b/plotly/validators/scatterpolargl/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/line/_dash.py b/plotly/validators/scatterpolargl/line/_dash.py index 2d8af9699e..d3ae4a3c89 100644 --- a/plotly/validators/scatterpolargl/line/_dash.py +++ b/plotly/validators/scatterpolargl/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DashValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="dash", parent_name="scatterpolargl.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["dash", "dashdot", "dot", "longdash", "longdashdot", "solid"] diff --git a/plotly/validators/scatterpolargl/line/_width.py b/plotly/validators/scatterpolargl/line/_width.py index 10386997d3..ea3593684a 100644 --- a/plotly/validators/scatterpolargl/line/_width.py +++ b/plotly/validators/scatterpolargl/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatterpolargl.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/__init__.py b/plotly/validators/scatterpolargl/marker/__init__.py index dc48879d6b..ec56080f71 100644 --- a/plotly/validators/scatterpolargl/marker/__init__.py +++ b/plotly/validators/scatterpolargl/marker/__init__.py @@ -1,61 +1,33 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/marker/_angle.py b/plotly/validators/scatterpolargl/marker/_angle.py index 0786e64244..974aec8d28 100644 --- a/plotly/validators/scatterpolargl/marker/_angle.py +++ b/plotly/validators/scatterpolargl/marker/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__( self, plotly_name="angle", parent_name="scatterpolargl.marker", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_anglesrc.py b/plotly/validators/scatterpolargl/marker/_anglesrc.py index 3bb11c7d44..639789d2a9 100644 --- a/plotly/validators/scatterpolargl/marker/_anglesrc.py +++ b/plotly/validators/scatterpolargl/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scatterpolargl.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_autocolorscale.py b/plotly/validators/scatterpolargl/marker/_autocolorscale.py index cfada839f0..ab26943d0f 100644 --- a/plotly/validators/scatterpolargl/marker/_autocolorscale.py +++ b/plotly/validators/scatterpolargl/marker/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatterpolargl.marker", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_cauto.py b/plotly/validators/scatterpolargl/marker/_cauto.py index b2bbcbc1d9..3d3a8f69d0 100644 --- a/plotly/validators/scatterpolargl/marker/_cauto.py +++ b/plotly/validators/scatterpolargl/marker/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterpolargl.marker", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_cmax.py b/plotly/validators/scatterpolargl/marker/_cmax.py index e152101cdf..ddb096abde 100644 --- a/plotly/validators/scatterpolargl/marker/_cmax.py +++ b/plotly/validators/scatterpolargl/marker/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatterpolargl.marker", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_cmid.py b/plotly/validators/scatterpolargl/marker/_cmid.py index 4edfd2b916..9bb71fce75 100644 --- a/plotly/validators/scatterpolargl/marker/_cmid.py +++ b/plotly/validators/scatterpolargl/marker/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterpolargl.marker", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_cmin.py b/plotly/validators/scatterpolargl/marker/_cmin.py index 354d2eb549..18ef9aba31 100644 --- a/plotly/validators/scatterpolargl/marker/_cmin.py +++ b/plotly/validators/scatterpolargl/marker/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scatterpolargl.marker", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_color.py b/plotly/validators/scatterpolargl/marker/_color.py index 604b2db8ce..848af07c3d 100644 --- a/plotly/validators/scatterpolargl/marker/_color.py +++ b/plotly/validators/scatterpolargl/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatterpolargl/marker/_coloraxis.py b/plotly/validators/scatterpolargl/marker/_coloraxis.py index 7690c5ed27..ea3748574d 100644 --- a/plotly/validators/scatterpolargl/marker/_coloraxis.py +++ b/plotly/validators/scatterpolargl/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterpolargl.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatterpolargl/marker/_colorbar.py b/plotly/validators/scatterpolargl/marker/_colorbar.py index 10157a4e50..e7af974fbb 100644 --- a/plotly/validators/scatterpolargl/marker/_colorbar.py +++ b/plotly/validators/scatterpolargl/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scatterpolargl.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - polargl.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterpolargl.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterpolargl.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterpolargl.mar - ker.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_colorscale.py b/plotly/validators/scatterpolargl/marker/_colorscale.py index efbae52976..7daa0b0ef8 100644 --- a/plotly/validators/scatterpolargl/marker/_colorscale.py +++ b/plotly/validators/scatterpolargl/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatterpolargl.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_colorsrc.py b/plotly/validators/scatterpolargl/marker/_colorsrc.py index 6f144a3a87..fb6974490b 100644 --- a/plotly/validators/scatterpolargl/marker/_colorsrc.py +++ b/plotly/validators/scatterpolargl/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolargl.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_line.py b/plotly/validators/scatterpolargl/marker/_line.py index 855250ee55..a8c407bbc4 100644 --- a/plotly/validators/scatterpolargl/marker/_line.py +++ b/plotly/validators/scatterpolargl/marker/_line.py @@ -1,106 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="scatterpolargl.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_opacity.py b/plotly/validators/scatterpolargl/marker/_opacity.py index fe7cc64fc6..ea14ddec99 100644 --- a/plotly/validators/scatterpolargl/marker/_opacity.py +++ b/plotly/validators/scatterpolargl/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolargl.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scatterpolargl/marker/_opacitysrc.py b/plotly/validators/scatterpolargl/marker/_opacitysrc.py index 7c92ead162..dafe230ff3 100644 --- a/plotly/validators/scatterpolargl/marker/_opacitysrc.py +++ b/plotly/validators/scatterpolargl/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scatterpolargl.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_reversescale.py b/plotly/validators/scatterpolargl/marker/_reversescale.py index 150c91b51a..d758d13877 100644 --- a/plotly/validators/scatterpolargl/marker/_reversescale.py +++ b/plotly/validators/scatterpolargl/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterpolargl.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_showscale.py b/plotly/validators/scatterpolargl/marker/_showscale.py index 37fdb12aaa..83f3dd4147 100644 --- a/plotly/validators/scatterpolargl/marker/_showscale.py +++ b/plotly/validators/scatterpolargl/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scatterpolargl.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_size.py b/plotly/validators/scatterpolargl/marker/_size.py index 6dcd740486..e19335cd7f 100644 --- a/plotly/validators/scatterpolargl/marker/_size.py +++ b/plotly/validators/scatterpolargl/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolargl/marker/_sizemin.py b/plotly/validators/scatterpolargl/marker/_sizemin.py index 718b1ac635..2fc92bdef7 100644 --- a/plotly/validators/scatterpolargl/marker/_sizemin.py +++ b/plotly/validators/scatterpolargl/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scatterpolargl.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_sizemode.py b/plotly/validators/scatterpolargl/marker/_sizemode.py index 5794ca9709..02458affaf 100644 --- a/plotly/validators/scatterpolargl/marker/_sizemode.py +++ b/plotly/validators/scatterpolargl/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scatterpolargl.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/_sizeref.py b/plotly/validators/scatterpolargl/marker/_sizeref.py index 12545b4528..88b98ee9b3 100644 --- a/plotly/validators/scatterpolargl/marker/_sizeref.py +++ b/plotly/validators/scatterpolargl/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scatterpolargl.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_sizesrc.py b/plotly/validators/scatterpolargl/marker/_sizesrc.py index 9fde47c2f1..0b32d0d738 100644 --- a/plotly/validators/scatterpolargl/marker/_sizesrc.py +++ b/plotly/validators/scatterpolargl/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterpolargl.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/_symbol.py b/plotly/validators/scatterpolargl/marker/_symbol.py index 01d6ce5ffa..f4ca206d50 100644 --- a/plotly/validators/scatterpolargl/marker/_symbol.py +++ b/plotly/validators/scatterpolargl/marker/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="symbol", parent_name="scatterpolargl.marker", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatterpolargl/marker/_symbolsrc.py b/plotly/validators/scatterpolargl/marker/_symbolsrc.py index addb7620fa..dd61acbf60 100644 --- a/plotly/validators/scatterpolargl/marker/_symbolsrc.py +++ b/plotly/validators/scatterpolargl/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scatterpolargl.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/__init__.py b/plotly/validators/scatterpolargl/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/__init__.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py b/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py index 0aa1d9d11a..916ecce89f 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py b/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py index 53ae187d70..9fbec68858 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py b/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py index 55727f7355..57dcc90976 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py b/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py index 0a2c384263..cb237626bc 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_dtick.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py b/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py index b727d3f1f3..1bb25daf90 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_labelalias.py b/plotly/validators/scatterpolargl/marker/colorbar/_labelalias.py index 3a2cd2ce28..f3cf0bbccb 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_labelalias.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_len.py b/plotly/validators/scatterpolargl/marker/colorbar/_len.py index fb590c6f2e..b3b33b8280 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_len.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py b/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py index ef3b89f826..4ff1dd4b90 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_lenmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_minexponent.py b/plotly/validators/scatterpolargl/marker/colorbar/_minexponent.py index 34806203d4..85fd35dae3 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_minexponent.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py b/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py index 37bf0c0334..68ba8684b2 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_nticks.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_orientation.py b/plotly/validators/scatterpolargl/marker/colorbar/_orientation.py index 3120606811..5f3c6ea5ba 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_orientation.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py b/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py index 11088bdcd5..344322f87c 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py b/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py index 9adec39c76..cddb6eb9fa 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py b/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py index 2b53cb3a25..718a9b5d66 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py b/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py index 5bf26e83de..a5e7823736 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py b/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py index e134598888..5feef39bb5 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py b/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py index b23e3d3e72..6b46475da1 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py b/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py index 94f9a3c3f0..6fa0cf37f3 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py b/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py index c5f9c5b0fd..343d1665e7 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py b/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py index b9f7eb01d9..49b69419de 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py b/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py index c0aff472a1..11a2f6fa7e 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tick0.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py index 32d32209d7..17640ee65e 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py index 5e94d1d3f2..f20381ef67 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py index 1577d1e030..6573902bed 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py index 22d5e34405..76752348bf 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py index ab4f7d27d4..171305525c 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py index 297cf672b1..a13fa39585 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticklabeloverflow.py index c0eb345e75..bf00930ec9 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelposition.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelposition.py index 1d7517df0e..d3160ad83d 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelstep.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelstep.py index 524de877be..29abd7fd74 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py index abe82a47ee..84ce9ca3f8 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticklen.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py index 2300f93b01..ca89dc9023 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py index 217cf58325..1043d5384c 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py index 87dad9ddee..5fb9ce3f97 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticks.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py index 6db266133e..5ce874a330 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py index 974c6f228d..63f063dee7 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py b/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py index 60995c3f60..2f626fb8b8 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py index c00d01965c..f5db7d54fb 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py index 0ee181df15..7dd27173c9 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py b/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py index d31ef9fdbb..4a9d9dbd7c 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_title.py b/plotly/validators/scatterpolargl/marker/colorbar/_title.py index 405019d1db..3d9e8eaea6 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_title.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_title.py @@ -1,29 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_x.py b/plotly/validators/scatterpolargl/marker/colorbar/_x.py index 500bb0f522..9f1cc4ee59 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_x.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py b/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py index 3a0ac3b6e0..bfcd1ce2d6 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_xanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py b/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py index a7530c52da..52af337103 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_xref.py b/plotly/validators/scatterpolargl/marker/colorbar/_xref.py index 6493a71d06..d7ca76650f 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_xref.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_y.py b/plotly/validators/scatterpolargl/marker/colorbar/_y.py index 1b750e9468..ad2007d498 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_y.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py b/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py index bd3110cf99..f8d6e336cd 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_yanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatterpolargl.marker.colorbar", **kwargs, ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py b/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py index e969a6e3ba..135cb299a9 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/_yref.py b/plotly/validators/scatterpolargl/marker/colorbar/_yref.py index 70992277f9..2a584f7a9c 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/_yref.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scatterpolargl.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py index c677d8a539..c542f9d4f5 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py index 155839c394..0278d7c1a4 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_lineposition.py index f40a1b2773..bb9afeb19f 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_shadow.py index 4c47115a6f..5f554360d3 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py index c94da2248e..15c027eda1 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_style.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_style.py index a974cbb10b..6b0885aab1 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_textcase.py index 8afd7126fd..8b9f60b6b6 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_variant.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_variant.py index e6ad75a02f..28be8bad3f 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_weight.py b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_weight.py index cc8b325ba2..ac57b721c9 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolargl.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py index 49dd25a0f8..a0bb27a1cb 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatterpolargl.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py index 1917d88d12..02cda5c636 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scatterpolargl.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py index a564a55869..0dac806076 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scatterpolargl.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py index 371aedaa3b..793efa5135 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scatterpolargl.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py index 124bf5f2ae..550a6cc56e 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scatterpolargl.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py b/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py b/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py index 7dad7ac5c8..37476a2035 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterpolargl.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py b/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py index 37aaead6eb..28016d5b22 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatterpolargl.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py b/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py index f80e1772c2..9ced83df37 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatterpolargl.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py index 11527bab7f..39a2f41867 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py index 9590b50366..9ff1a51042 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_lineposition.py index f4fc804856..8207efcdd3 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_shadow.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_shadow.py index 0773bf3ad2..2e4ef403d3 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py index d025733a83..f7ba06e79e 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_style.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_style.py index 9e22f04ad2..090a826c8b 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_textcase.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_textcase.py index 0c4ed9eaf1..e616c829b4 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_variant.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_variant.py index 510666fe5b..685d28b5bd 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_weight.py b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_weight.py index 93bbbbc64b..620a533ff4 100644 --- a/plotly/validators/scatterpolargl/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scatterpolargl/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolargl.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterpolargl/marker/line/__init__.py b/plotly/validators/scatterpolargl/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scatterpolargl/marker/line/__init__.py +++ b/plotly/validators/scatterpolargl/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py b/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py index 237ee20b74..2bb9bfc2cf 100644 --- a/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py +++ b/plotly/validators/scatterpolargl/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatterpolargl.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/line/_cauto.py b/plotly/validators/scatterpolargl/marker/line/_cauto.py index 8a9802003d..295289215e 100644 --- a/plotly/validators/scatterpolargl/marker/line/_cauto.py +++ b/plotly/validators/scatterpolargl/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterpolargl.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/line/_cmax.py b/plotly/validators/scatterpolargl/marker/line/_cmax.py index 5fa90ee7f7..779ae2003d 100644 --- a/plotly/validators/scatterpolargl/marker/line/_cmax.py +++ b/plotly/validators/scatterpolargl/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatterpolargl.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/line/_cmid.py b/plotly/validators/scatterpolargl/marker/line/_cmid.py index a771e0afac..881c2c7cc7 100644 --- a/plotly/validators/scatterpolargl/marker/line/_cmid.py +++ b/plotly/validators/scatterpolargl/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterpolargl.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/line/_cmin.py b/plotly/validators/scatterpolargl/marker/line/_cmin.py index 4378230cf4..43f612a46b 100644 --- a/plotly/validators/scatterpolargl/marker/line/_cmin.py +++ b/plotly/validators/scatterpolargl/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scatterpolargl.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/line/_color.py b/plotly/validators/scatterpolargl/marker/line/_color.py index d918523795..32d398a645 100644 --- a/plotly/validators/scatterpolargl/marker/line/_color.py +++ b/plotly/validators/scatterpolargl/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatterpolargl/marker/line/_coloraxis.py b/plotly/validators/scatterpolargl/marker/line/_coloraxis.py index ec19924e32..12ab835567 100644 --- a/plotly/validators/scatterpolargl/marker/line/_coloraxis.py +++ b/plotly/validators/scatterpolargl/marker/line/_coloraxis.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterpolargl.marker.line", **kwargs, ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatterpolargl/marker/line/_colorscale.py b/plotly/validators/scatterpolargl/marker/line/_colorscale.py index b6d24bcc9a..237d7e5873 100644 --- a/plotly/validators/scatterpolargl/marker/line/_colorscale.py +++ b/plotly/validators/scatterpolargl/marker/line/_colorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatterpolargl.marker.line", **kwargs, ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatterpolargl/marker/line/_colorsrc.py b/plotly/validators/scatterpolargl/marker/line/_colorsrc.py index 7ce2f332cf..49f9c04269 100644 --- a/plotly/validators/scatterpolargl/marker/line/_colorsrc.py +++ b/plotly/validators/scatterpolargl/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolargl.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/line/_reversescale.py b/plotly/validators/scatterpolargl/marker/line/_reversescale.py index ca4fb9f077..d8c886c924 100644 --- a/plotly/validators/scatterpolargl/marker/line/_reversescale.py +++ b/plotly/validators/scatterpolargl/marker/line/_reversescale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterpolargl.marker.line", **kwargs, ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/marker/line/_width.py b/plotly/validators/scatterpolargl/marker/line/_width.py index c23ec49913..1be6fd5141 100644 --- a/plotly/validators/scatterpolargl/marker/line/_width.py +++ b/plotly/validators/scatterpolargl/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatterpolargl.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolargl/marker/line/_widthsrc.py b/plotly/validators/scatterpolargl/marker/line/_widthsrc.py index 5d95c6addc..002a4beaf8 100644 --- a/plotly/validators/scatterpolargl/marker/line/_widthsrc.py +++ b/plotly/validators/scatterpolargl/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scatterpolargl.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/selected/__init__.py b/plotly/validators/scatterpolargl/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatterpolargl/selected/__init__.py +++ b/plotly/validators/scatterpolargl/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatterpolargl/selected/_marker.py b/plotly/validators/scatterpolargl/selected/_marker.py index 5dea20dde1..520c79642f 100644 --- a/plotly/validators/scatterpolargl/selected/_marker.py +++ b/plotly/validators/scatterpolargl/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatterpolargl.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/selected/_textfont.py b/plotly/validators/scatterpolargl/selected/_textfont.py index 8fd5b5e964..0c49c96b52 100644 --- a/plotly/validators/scatterpolargl/selected/_textfont.py +++ b/plotly/validators/scatterpolargl/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatterpolargl.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/selected/marker/__init__.py b/plotly/validators/scatterpolargl/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatterpolargl/selected/marker/__init__.py +++ b/plotly/validators/scatterpolargl/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterpolargl/selected/marker/_color.py b/plotly/validators/scatterpolargl/selected/marker/_color.py index a9bf020057..443b6b3f9b 100644 --- a/plotly/validators/scatterpolargl/selected/marker/_color.py +++ b/plotly/validators/scatterpolargl/selected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.selected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/selected/marker/_opacity.py b/plotly/validators/scatterpolargl/selected/marker/_opacity.py index 92ab430857..4bc18c929d 100644 --- a/plotly/validators/scatterpolargl/selected/marker/_opacity.py +++ b/plotly/validators/scatterpolargl/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolargl.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolargl/selected/marker/_size.py b/plotly/validators/scatterpolargl/selected/marker/_size.py index ea17e71581..7e0f569712 100644 --- a/plotly/validators/scatterpolargl/selected/marker/_size.py +++ b/plotly/validators/scatterpolargl/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/selected/textfont/__init__.py b/plotly/validators/scatterpolargl/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatterpolargl/selected/textfont/__init__.py +++ b/plotly/validators/scatterpolargl/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatterpolargl/selected/textfont/_color.py b/plotly/validators/scatterpolargl/selected/textfont/_color.py index ff8a6ad2a6..d61bd1c866 100644 --- a/plotly/validators/scatterpolargl/selected/textfont/_color.py +++ b/plotly/validators/scatterpolargl/selected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.selected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/stream/__init__.py b/plotly/validators/scatterpolargl/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scatterpolargl/stream/__init__.py +++ b/plotly/validators/scatterpolargl/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scatterpolargl/stream/_maxpoints.py b/plotly/validators/scatterpolargl/stream/_maxpoints.py index eb57ec9279..a3b79c73df 100644 --- a/plotly/validators/scatterpolargl/stream/_maxpoints.py +++ b/plotly/validators/scatterpolargl/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scatterpolargl.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolargl/stream/_token.py b/plotly/validators/scatterpolargl/stream/_token.py index af7bd22853..62eeda09f7 100644 --- a/plotly/validators/scatterpolargl/stream/_token.py +++ b/plotly/validators/scatterpolargl/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="scatterpolargl.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterpolargl/textfont/__init__.py b/plotly/validators/scatterpolargl/textfont/__init__.py index d87c37ff7a..35d589957b 100644 --- a/plotly/validators/scatterpolargl/textfont/__init__.py +++ b/plotly/validators/scatterpolargl/textfont/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterpolargl/textfont/_color.py b/plotly/validators/scatterpolargl/textfont/_color.py index dcbf751a62..b04f0b37f0 100644 --- a/plotly/validators/scatterpolargl/textfont/_color.py +++ b/plotly/validators/scatterpolargl/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterpolargl/textfont/_colorsrc.py b/plotly/validators/scatterpolargl/textfont/_colorsrc.py index 77cc7e7ee7..25778548bb 100644 --- a/plotly/validators/scatterpolargl/textfont/_colorsrc.py +++ b/plotly/validators/scatterpolargl/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterpolargl.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/textfont/_family.py b/plotly/validators/scatterpolargl/textfont/_family.py index bd2fe4ffb3..3684a967ba 100644 --- a/plotly/validators/scatterpolargl/textfont/_family.py +++ b/plotly/validators/scatterpolargl/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterpolargl.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatterpolargl/textfont/_familysrc.py b/plotly/validators/scatterpolargl/textfont/_familysrc.py index 92e0eafd0c..ae5c19c5f0 100644 --- a/plotly/validators/scatterpolargl/textfont/_familysrc.py +++ b/plotly/validators/scatterpolargl/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterpolargl.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/textfont/_size.py b/plotly/validators/scatterpolargl/textfont/_size.py index ee455937da..f07533e18e 100644 --- a/plotly/validators/scatterpolargl/textfont/_size.py +++ b/plotly/validators/scatterpolargl/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatterpolargl/textfont/_sizesrc.py b/plotly/validators/scatterpolargl/textfont/_sizesrc.py index ba2dcde9fe..6b5b40a07f 100644 --- a/plotly/validators/scatterpolargl/textfont/_sizesrc.py +++ b/plotly/validators/scatterpolargl/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterpolargl.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/textfont/_style.py b/plotly/validators/scatterpolargl/textfont/_style.py index bce0696560..c5c50096ef 100644 --- a/plotly/validators/scatterpolargl/textfont/_style.py +++ b/plotly/validators/scatterpolargl/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterpolargl.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatterpolargl/textfont/_stylesrc.py b/plotly/validators/scatterpolargl/textfont/_stylesrc.py index 65266bbaf3..c685f31866 100644 --- a/plotly/validators/scatterpolargl/textfont/_stylesrc.py +++ b/plotly/validators/scatterpolargl/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatterpolargl.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/textfont/_variant.py b/plotly/validators/scatterpolargl/textfont/_variant.py index 8c733f88fe..e4cdda5ba9 100644 --- a/plotly/validators/scatterpolargl/textfont/_variant.py +++ b/plotly/validators/scatterpolargl/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterpolargl.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "small-caps"]), diff --git a/plotly/validators/scatterpolargl/textfont/_variantsrc.py b/plotly/validators/scatterpolargl/textfont/_variantsrc.py index 758cf70e36..8199511227 100644 --- a/plotly/validators/scatterpolargl/textfont/_variantsrc.py +++ b/plotly/validators/scatterpolargl/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatterpolargl.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/textfont/_weight.py b/plotly/validators/scatterpolargl/textfont/_weight.py index 31e017d920..516391b4be 100644 --- a/plotly/validators/scatterpolargl/textfont/_weight.py +++ b/plotly/validators/scatterpolargl/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class WeightValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="weight", parent_name="scatterpolargl.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "bold"]), diff --git a/plotly/validators/scatterpolargl/textfont/_weightsrc.py b/plotly/validators/scatterpolargl/textfont/_weightsrc.py index 30f16a76c0..cf0c3e4c67 100644 --- a/plotly/validators/scatterpolargl/textfont/_weightsrc.py +++ b/plotly/validators/scatterpolargl/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatterpolargl.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/unselected/__init__.py b/plotly/validators/scatterpolargl/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatterpolargl/unselected/__init__.py +++ b/plotly/validators/scatterpolargl/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatterpolargl/unselected/_marker.py b/plotly/validators/scatterpolargl/unselected/_marker.py index ccdb46067b..77d0916538 100644 --- a/plotly/validators/scatterpolargl/unselected/_marker.py +++ b/plotly/validators/scatterpolargl/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatterpolargl.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/unselected/_textfont.py b/plotly/validators/scatterpolargl/unselected/_textfont.py index cffe3868e6..d2f533b4d2 100644 --- a/plotly/validators/scatterpolargl/unselected/_textfont.py +++ b/plotly/validators/scatterpolargl/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatterpolargl.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatterpolargl/unselected/marker/__init__.py b/plotly/validators/scatterpolargl/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatterpolargl/unselected/marker/__init__.py +++ b/plotly/validators/scatterpolargl/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterpolargl/unselected/marker/_color.py b/plotly/validators/scatterpolargl/unselected/marker/_color.py index bd11226a27..b1860188a4 100644 --- a/plotly/validators/scatterpolargl/unselected/marker/_color.py +++ b/plotly/validators/scatterpolargl/unselected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.unselected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterpolargl/unselected/marker/_opacity.py b/plotly/validators/scatterpolargl/unselected/marker/_opacity.py index b358ec3a63..8a07a68a12 100644 --- a/plotly/validators/scatterpolargl/unselected/marker/_opacity.py +++ b/plotly/validators/scatterpolargl/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterpolargl.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterpolargl/unselected/marker/_size.py b/plotly/validators/scatterpolargl/unselected/marker/_size.py index 0472b66629..1dcd844933 100644 --- a/plotly/validators/scatterpolargl/unselected/marker/_size.py +++ b/plotly/validators/scatterpolargl/unselected/marker/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterpolargl.unselected.marker", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterpolargl/unselected/textfont/__init__.py b/plotly/validators/scatterpolargl/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatterpolargl/unselected/textfont/__init__.py +++ b/plotly/validators/scatterpolargl/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatterpolargl/unselected/textfont/_color.py b/plotly/validators/scatterpolargl/unselected/textfont/_color.py index b0a96db510..245724337b 100644 --- a/plotly/validators/scatterpolargl/unselected/textfont/_color.py +++ b/plotly/validators/scatterpolargl/unselected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterpolargl.unselected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/__init__.py b/plotly/validators/scattersmith/__init__.py index 4dc55c20dd..f9c038ac50 100644 --- a/plotly/validators/scattersmith/__init__.py +++ b/plotly/validators/scattersmith/__init__.py @@ -1,109 +1,57 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._realsrc import RealsrcValidator - from ._real import RealValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._imagsrc import ImagsrcValidator - from ._imag import ImagValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._connectgaps import ConnectgapsValidator - from ._cliponaxis import CliponaxisValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._realsrc.RealsrcValidator", - "._real.RealValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._imagsrc.ImagsrcValidator", - "._imag.ImagValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._connectgaps.ConnectgapsValidator", - "._cliponaxis.CliponaxisValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._realsrc.RealsrcValidator", + "._real.RealValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._imagsrc.ImagsrcValidator", + "._imag.ImagValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + ], +) diff --git a/plotly/validators/scattersmith/_cliponaxis.py b/plotly/validators/scattersmith/_cliponaxis.py index e1f3d15c17..fbf9d91698 100644 --- a/plotly/validators/scattersmith/_cliponaxis.py +++ b/plotly/validators/scattersmith/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="scattersmith", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_connectgaps.py b/plotly/validators/scattersmith/_connectgaps.py index b73157a5e4..5262bb6f74 100644 --- a/plotly/validators/scattersmith/_connectgaps.py +++ b/plotly/validators/scattersmith/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="scattersmith", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_customdata.py b/plotly/validators/scattersmith/_customdata.py index 0f78b1b1e8..84ffb9eef8 100644 --- a/plotly/validators/scattersmith/_customdata.py +++ b/plotly/validators/scattersmith/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="scattersmith", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_customdatasrc.py b/plotly/validators/scattersmith/_customdatasrc.py index e3926c00c4..d5e92ab47d 100644 --- a/plotly/validators/scattersmith/_customdatasrc.py +++ b/plotly/validators/scattersmith/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="scattersmith", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_fill.py b/plotly/validators/scattersmith/_fill.py index 609059e8cd..99d03cc936 100644 --- a/plotly/validators/scattersmith/_fill.py +++ b/plotly/validators/scattersmith/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scattersmith", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself", "tonext"]), **kwargs, diff --git a/plotly/validators/scattersmith/_fillcolor.py b/plotly/validators/scattersmith/_fillcolor.py index a89a150195..c31ba2e1e7 100644 --- a/plotly/validators/scattersmith/_fillcolor.py +++ b/plotly/validators/scattersmith/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scattersmith", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_hoverinfo.py b/plotly/validators/scattersmith/_hoverinfo.py index 4c3abd843a..edd3dc31c0 100644 --- a/plotly/validators/scattersmith/_hoverinfo.py +++ b/plotly/validators/scattersmith/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scattersmith", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scattersmith/_hoverinfosrc.py b/plotly/validators/scattersmith/_hoverinfosrc.py index 857c15a181..d3c5073f16 100644 --- a/plotly/validators/scattersmith/_hoverinfosrc.py +++ b/plotly/validators/scattersmith/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="scattersmith", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_hoverlabel.py b/plotly/validators/scattersmith/_hoverlabel.py index 0c663a14e2..8384b6de0a 100644 --- a/plotly/validators/scattersmith/_hoverlabel.py +++ b/plotly/validators/scattersmith/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattersmith", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_hoveron.py b/plotly/validators/scattersmith/_hoveron.py index c69f0afd6a..f740d25703 100644 --- a/plotly/validators/scattersmith/_hoveron.py +++ b/plotly/validators/scattersmith/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="scattersmith", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), flags=kwargs.pop("flags", ["points", "fills"]), **kwargs, diff --git a/plotly/validators/scattersmith/_hovertemplate.py b/plotly/validators/scattersmith/_hovertemplate.py index 377f0eaccc..e1475d49c6 100644 --- a/plotly/validators/scattersmith/_hovertemplate.py +++ b/plotly/validators/scattersmith/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scattersmith", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattersmith/_hovertemplatesrc.py b/plotly/validators/scattersmith/_hovertemplatesrc.py index af772a16e0..ab587f3323 100644 --- a/plotly/validators/scattersmith/_hovertemplatesrc.py +++ b/plotly/validators/scattersmith/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scattersmith", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_hovertext.py b/plotly/validators/scattersmith/_hovertext.py index 93e0099ed6..31286dd3ca 100644 --- a/plotly/validators/scattersmith/_hovertext.py +++ b/plotly/validators/scattersmith/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scattersmith", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattersmith/_hovertextsrc.py b/plotly/validators/scattersmith/_hovertextsrc.py index 8961c104a7..c022328594 100644 --- a/plotly/validators/scattersmith/_hovertextsrc.py +++ b/plotly/validators/scattersmith/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="scattersmith", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_ids.py b/plotly/validators/scattersmith/_ids.py index 7cddc08681..35c87184cf 100644 --- a/plotly/validators/scattersmith/_ids.py +++ b/plotly/validators/scattersmith/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scattersmith", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_idssrc.py b/plotly/validators/scattersmith/_idssrc.py index 7fb8e0fc0b..e01355ca47 100644 --- a/plotly/validators/scattersmith/_idssrc.py +++ b/plotly/validators/scattersmith/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scattersmith", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_imag.py b/plotly/validators/scattersmith/_imag.py index 4f01887bc4..361b1b8db2 100644 --- a/plotly/validators/scattersmith/_imag.py +++ b/plotly/validators/scattersmith/_imag.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImagValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ImagValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="imag", parent_name="scattersmith", **kwargs): - super(ImagValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_imagsrc.py b/plotly/validators/scattersmith/_imagsrc.py index ff13a3a5df..64c0b6f145 100644 --- a/plotly/validators/scattersmith/_imagsrc.py +++ b/plotly/validators/scattersmith/_imagsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ImagsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ImagsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="imagsrc", parent_name="scattersmith", **kwargs): - super(ImagsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_legend.py b/plotly/validators/scattersmith/_legend.py index 23e1c4365a..c145816c82 100644 --- a/plotly/validators/scattersmith/_legend.py +++ b/plotly/validators/scattersmith/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scattersmith", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattersmith/_legendgroup.py b/plotly/validators/scattersmith/_legendgroup.py index 368453d249..597ac4fc83 100644 --- a/plotly/validators/scattersmith/_legendgroup.py +++ b/plotly/validators/scattersmith/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="scattersmith", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_legendgrouptitle.py b/plotly/validators/scattersmith/_legendgrouptitle.py index acb3420da3..24763013ce 100644 --- a/plotly/validators/scattersmith/_legendgrouptitle.py +++ b/plotly/validators/scattersmith/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scattersmith", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_legendrank.py b/plotly/validators/scattersmith/_legendrank.py index 35a094d3c3..707c4e4ea5 100644 --- a/plotly/validators/scattersmith/_legendrank.py +++ b/plotly/validators/scattersmith/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="scattersmith", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_legendwidth.py b/plotly/validators/scattersmith/_legendwidth.py index e6e50f05b1..c2a97bc237 100644 --- a/plotly/validators/scattersmith/_legendwidth.py +++ b/plotly/validators/scattersmith/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="scattersmith", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/_line.py b/plotly/validators/scattersmith/_line.py index 4ac259e298..5c839d71ee 100644 --- a/plotly/validators/scattersmith/_line.py +++ b/plotly/validators/scattersmith/_line.py @@ -1,44 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattersmith", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_marker.py b/plotly/validators/scattersmith/_marker.py index 6fa3369025..8388375e92 100644 --- a/plotly/validators/scattersmith/_marker.py +++ b/plotly/validators/scattersmith/_marker.py @@ -1,165 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scattersmith", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scattersmith.marke - r.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scattersmith.marke - r.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scattersmith.marke - r.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_meta.py b/plotly/validators/scattersmith/_meta.py index 69af95441c..ed35f1bebc 100644 --- a/plotly/validators/scattersmith/_meta.py +++ b/plotly/validators/scattersmith/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scattersmith", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattersmith/_metasrc.py b/plotly/validators/scattersmith/_metasrc.py index 1959bb548a..c9f59aa434 100644 --- a/plotly/validators/scattersmith/_metasrc.py +++ b/plotly/validators/scattersmith/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scattersmith", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_mode.py b/plotly/validators/scattersmith/_mode.py index d0242190f1..91bb7554e2 100644 --- a/plotly/validators/scattersmith/_mode.py +++ b/plotly/validators/scattersmith/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scattersmith", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scattersmith/_name.py b/plotly/validators/scattersmith/_name.py index 2e9beb640d..9ec05c7e61 100644 --- a/plotly/validators/scattersmith/_name.py +++ b/plotly/validators/scattersmith/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scattersmith", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_opacity.py b/plotly/validators/scattersmith/_opacity.py index 75b3f6ca83..12c98e120e 100644 --- a/plotly/validators/scattersmith/_opacity.py +++ b/plotly/validators/scattersmith/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scattersmith", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/_real.py b/plotly/validators/scattersmith/_real.py index 4d4dec1ba0..b432575625 100644 --- a/plotly/validators/scattersmith/_real.py +++ b/plotly/validators/scattersmith/_real.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RealValidator(_plotly_utils.basevalidators.DataArrayValidator): +class RealValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="real", parent_name="scattersmith", **kwargs): - super(RealValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_realsrc.py b/plotly/validators/scattersmith/_realsrc.py index edf6152eeb..3d5c9a0c98 100644 --- a/plotly/validators/scattersmith/_realsrc.py +++ b/plotly/validators/scattersmith/_realsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RealsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class RealsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="realsrc", parent_name="scattersmith", **kwargs): - super(RealsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_selected.py b/plotly/validators/scattersmith/_selected.py index 4a4a25f102..58d657263e 100644 --- a/plotly/validators/scattersmith/_selected.py +++ b/plotly/validators/scattersmith/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scattersmith", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattersmith.selec - ted.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattersmith.selec - ted.Textfont` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_selectedpoints.py b/plotly/validators/scattersmith/_selectedpoints.py index 87215f1e39..f9f0462086 100644 --- a/plotly/validators/scattersmith/_selectedpoints.py +++ b/plotly/validators/scattersmith/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scattersmith", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_showlegend.py b/plotly/validators/scattersmith/_showlegend.py index f9161861a4..38a5dacd87 100644 --- a/plotly/validators/scattersmith/_showlegend.py +++ b/plotly/validators/scattersmith/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="scattersmith", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_stream.py b/plotly/validators/scattersmith/_stream.py index a529130430..cf87aae68e 100644 --- a/plotly/validators/scattersmith/_stream.py +++ b/plotly/validators/scattersmith/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scattersmith", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_subplot.py b/plotly/validators/scattersmith/_subplot.py index d75ef86441..4e05dc7380 100644 --- a/plotly/validators/scattersmith/_subplot.py +++ b/plotly/validators/scattersmith/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="scattersmith", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "smith"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattersmith/_text.py b/plotly/validators/scattersmith/_text.py index 101865d8e4..2354c57e9a 100644 --- a/plotly/validators/scattersmith/_text.py +++ b/plotly/validators/scattersmith/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scattersmith", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattersmith/_textfont.py b/plotly/validators/scattersmith/_textfont.py index 3ea78a2a41..9f5ba42e97 100644 --- a/plotly/validators/scattersmith/_textfont.py +++ b/plotly/validators/scattersmith/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattersmith", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_textposition.py b/plotly/validators/scattersmith/_textposition.py index 3a190a31ba..aceeaac724 100644 --- a/plotly/validators/scattersmith/_textposition.py +++ b/plotly/validators/scattersmith/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scattersmith", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattersmith/_textpositionsrc.py b/plotly/validators/scattersmith/_textpositionsrc.py index 4af940dae9..b23c074ebb 100644 --- a/plotly/validators/scattersmith/_textpositionsrc.py +++ b/plotly/validators/scattersmith/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scattersmith", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_textsrc.py b/plotly/validators/scattersmith/_textsrc.py index 2ce9eacdff..460a50448c 100644 --- a/plotly/validators/scattersmith/_textsrc.py +++ b/plotly/validators/scattersmith/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scattersmith", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_texttemplate.py b/plotly/validators/scattersmith/_texttemplate.py index 505facac7c..a28ed6ea60 100644 --- a/plotly/validators/scattersmith/_texttemplate.py +++ b/plotly/validators/scattersmith/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scattersmith", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattersmith/_texttemplatesrc.py b/plotly/validators/scattersmith/_texttemplatesrc.py index 441d2c7b84..4377de3282 100644 --- a/plotly/validators/scattersmith/_texttemplatesrc.py +++ b/plotly/validators/scattersmith/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scattersmith", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_uid.py b/plotly/validators/scattersmith/_uid.py index acc3461579..cbd631ad62 100644 --- a/plotly/validators/scattersmith/_uid.py +++ b/plotly/validators/scattersmith/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scattersmith", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_uirevision.py b/plotly/validators/scattersmith/_uirevision.py index 3d601797ca..55143a9d7a 100644 --- a/plotly/validators/scattersmith/_uirevision.py +++ b/plotly/validators/scattersmith/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="scattersmith", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/_unselected.py b/plotly/validators/scattersmith/_unselected.py index 6d231af560..df222ffe4a 100644 --- a/plotly/validators/scattersmith/_unselected.py +++ b/plotly/validators/scattersmith/_unselected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="scattersmith", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scattersmith.unsel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scattersmith.unsel - ected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scattersmith/_visible.py b/plotly/validators/scattersmith/_visible.py index 792e773077..919b7f89f2 100644 --- a/plotly/validators/scattersmith/_visible.py +++ b/plotly/validators/scattersmith/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattersmith", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scattersmith/hoverlabel/__init__.py b/plotly/validators/scattersmith/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scattersmith/hoverlabel/__init__.py +++ b/plotly/validators/scattersmith/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scattersmith/hoverlabel/_align.py b/plotly/validators/scattersmith/hoverlabel/_align.py index c816e1bbdc..808a3fde5e 100644 --- a/plotly/validators/scattersmith/hoverlabel/_align.py +++ b/plotly/validators/scattersmith/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scattersmith.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scattersmith/hoverlabel/_alignsrc.py b/plotly/validators/scattersmith/hoverlabel/_alignsrc.py index d78a97a65a..1e23a811de 100644 --- a/plotly/validators/scattersmith/hoverlabel/_alignsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scattersmith.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/_bgcolor.py b/plotly/validators/scattersmith/hoverlabel/_bgcolor.py index d829b8e005..5553c0e726 100644 --- a/plotly/validators/scattersmith/hoverlabel/_bgcolor.py +++ b/plotly/validators/scattersmith/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattersmith.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattersmith/hoverlabel/_bgcolorsrc.py b/plotly/validators/scattersmith/hoverlabel/_bgcolorsrc.py index b39d86edb6..7b58c36ee2 100644 --- a/plotly/validators/scattersmith/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scattersmith.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/_bordercolor.py b/plotly/validators/scattersmith/hoverlabel/_bordercolor.py index 5615f4299d..f8262f8857 100644 --- a/plotly/validators/scattersmith/hoverlabel/_bordercolor.py +++ b/plotly/validators/scattersmith/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattersmith.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattersmith/hoverlabel/_bordercolorsrc.py b/plotly/validators/scattersmith/hoverlabel/_bordercolorsrc.py index 0555f319ad..6591ecbc51 100644 --- a/plotly/validators/scattersmith/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scattersmith.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/_font.py b/plotly/validators/scattersmith/hoverlabel/_font.py index 1e45cbc488..c3d0fccbb9 100644 --- a/plotly/validators/scattersmith/hoverlabel/_font.py +++ b/plotly/validators/scattersmith/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattersmith.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/hoverlabel/_namelength.py b/plotly/validators/scattersmith/hoverlabel/_namelength.py index a933008bfd..2e72bd2906 100644 --- a/plotly/validators/scattersmith/hoverlabel/_namelength.py +++ b/plotly/validators/scattersmith/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scattersmith.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scattersmith/hoverlabel/_namelengthsrc.py b/plotly/validators/scattersmith/hoverlabel/_namelengthsrc.py index 1f25c113d6..90e53f4109 100644 --- a/plotly/validators/scattersmith/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scattersmith.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/__init__.py b/plotly/validators/scattersmith/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/__init__.py +++ b/plotly/validators/scattersmith/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_color.py b/plotly/validators/scattersmith/hoverlabel/font/_color.py index de5895dfa7..2742ba4965 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_color.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattersmith/hoverlabel/font/_colorsrc.py b/plotly/validators/scattersmith/hoverlabel/font/_colorsrc.py index a8b8649ede..ef0dd6d6f3 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_family.py b/plotly/validators/scattersmith/hoverlabel/font/_family.py index c38bffb551..dd58ce43a4 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_family.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattersmith.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattersmith/hoverlabel/font/_familysrc.py b/plotly/validators/scattersmith/hoverlabel/font/_familysrc.py index abdcd983bc..afe01e9ffb 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_lineposition.py b/plotly/validators/scattersmith/hoverlabel/font/_lineposition.py index 54283c721f..13ec697ba8 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattersmith/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scattersmith/hoverlabel/font/_linepositionsrc.py index c7726cf612..60824c4ef1 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_shadow.py b/plotly/validators/scattersmith/hoverlabel/font/_shadow.py index 292189be9f..413447967a 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_shadow.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattersmith.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scattersmith/hoverlabel/font/_shadowsrc.py b/plotly/validators/scattersmith/hoverlabel/font/_shadowsrc.py index 986d7e6af2..48a44fca1d 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_size.py b/plotly/validators/scattersmith/hoverlabel/font/_size.py index e350b7832a..2135329a99 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_size.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattersmith/hoverlabel/font/_sizesrc.py b/plotly/validators/scattersmith/hoverlabel/font/_sizesrc.py index 560d9da402..46f67ac30c 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_style.py b/plotly/validators/scattersmith/hoverlabel/font/_style.py index 978488a471..1145281dac 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_style.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattersmith.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattersmith/hoverlabel/font/_stylesrc.py b/plotly/validators/scattersmith/hoverlabel/font/_stylesrc.py index 8a5d3c08a3..d37ebdf17c 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_textcase.py b/plotly/validators/scattersmith/hoverlabel/font/_textcase.py index c07a37534b..a16350e090 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_textcase.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattersmith/hoverlabel/font/_textcasesrc.py b/plotly/validators/scattersmith/hoverlabel/font/_textcasesrc.py index 0648f02539..b139737e52 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_variant.py b/plotly/validators/scattersmith/hoverlabel/font/_variant.py index 783754f12e..8b3e56bd23 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_variant.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scattersmith/hoverlabel/font/_variantsrc.py b/plotly/validators/scattersmith/hoverlabel/font/_variantsrc.py index 2942701498..9cf89b327e 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/hoverlabel/font/_weight.py b/plotly/validators/scattersmith/hoverlabel/font/_weight.py index 016c16ebcd..328224ac34 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_weight.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattersmith.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattersmith/hoverlabel/font/_weightsrc.py b/plotly/validators/scattersmith/hoverlabel/font/_weightsrc.py index b26c491087..b78adee3ee 100644 --- a/plotly/validators/scattersmith/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scattersmith/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattersmith.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/legendgrouptitle/__init__.py b/plotly/validators/scattersmith/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/__init__.py +++ b/plotly/validators/scattersmith/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scattersmith/legendgrouptitle/_font.py b/plotly/validators/scattersmith/legendgrouptitle/_font.py index 824eae5c3a..6a6fd79307 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/_font.py +++ b/plotly/validators/scattersmith/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattersmith.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/legendgrouptitle/_text.py b/plotly/validators/scattersmith/legendgrouptitle/_text.py index 158418b540..6ef4f08be7 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/_text.py +++ b/plotly/validators/scattersmith/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattersmith.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/__init__.py b/plotly/validators/scattersmith/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_color.py b/plotly/validators/scattersmith/legendgrouptitle/font/_color.py index 248a6fe93c..369ea2ea21 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_color.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_family.py b/plotly/validators/scattersmith/legendgrouptitle/font/_family.py index 7de5f0d3d0..17e0a58797 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_family.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_lineposition.py b/plotly/validators/scattersmith/legendgrouptitle/font/_lineposition.py index 42faaf7b5e..bbb09cbcf6 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_shadow.py b/plotly/validators/scattersmith/legendgrouptitle/font/_shadow.py index fd5f34688c..36d17153ff 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_size.py b/plotly/validators/scattersmith/legendgrouptitle/font/_size.py index ef8f19c0ec..9a75a7e8d7 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_size.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_style.py b/plotly/validators/scattersmith/legendgrouptitle/font/_style.py index 06276d843e..be7510fc06 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_style.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_textcase.py b/plotly/validators/scattersmith/legendgrouptitle/font/_textcase.py index b4da3c7b4e..a46ce6a8b6 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_variant.py b/plotly/validators/scattersmith/legendgrouptitle/font/_variant.py index 833670afbe..5efd29c505 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattersmith/legendgrouptitle/font/_weight.py b/plotly/validators/scattersmith/legendgrouptitle/font/_weight.py index 5ebd3526ba..a92523e6bd 100644 --- a/plotly/validators/scattersmith/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scattersmith/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattersmith.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattersmith/line/__init__.py b/plotly/validators/scattersmith/line/__init__.py index 7045562597..d9c0ff9500 100644 --- a/plotly/validators/scattersmith/line/__init__.py +++ b/plotly/validators/scattersmith/line/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._shape import ShapeValidator - from ._dash import DashValidator - from ._color import ColorValidator - from ._backoffsrc import BackoffsrcValidator - from ._backoff import BackoffValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._shape.ShapeValidator", - "._dash.DashValidator", - "._color.ColorValidator", - "._backoffsrc.BackoffsrcValidator", - "._backoff.BackoffValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + "._backoffsrc.BackoffsrcValidator", + "._backoff.BackoffValidator", + ], +) diff --git a/plotly/validators/scattersmith/line/_backoff.py b/plotly/validators/scattersmith/line/_backoff.py index 80bb93c76d..66fcb0cad6 100644 --- a/plotly/validators/scattersmith/line/_backoff.py +++ b/plotly/validators/scattersmith/line/_backoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffValidator(_plotly_utils.basevalidators.NumberValidator): +class BackoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="backoff", parent_name="scattersmith.line", **kwargs ): - super(BackoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/line/_backoffsrc.py b/plotly/validators/scattersmith/line/_backoffsrc.py index 3eeac2b69b..022be46bc1 100644 --- a/plotly/validators/scattersmith/line/_backoffsrc.py +++ b/plotly/validators/scattersmith/line/_backoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BackoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="backoffsrc", parent_name="scattersmith.line", **kwargs ): - super(BackoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/line/_color.py b/plotly/validators/scattersmith/line/_color.py index 608f717d51..6dabc9eaef 100644 --- a/plotly/validators/scattersmith/line/_color.py +++ b/plotly/validators/scattersmith/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="scattersmith.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/line/_dash.py b/plotly/validators/scattersmith/line/_dash.py index d6a30b773e..6868147e1c 100644 --- a/plotly/validators/scattersmith/line/_dash.py +++ b/plotly/validators/scattersmith/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="scattersmith.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/scattersmith/line/_shape.py b/plotly/validators/scattersmith/line/_shape.py index 1a2d2b2e81..f7d29f56a8 100644 --- a/plotly/validators/scattersmith/line/_shape.py +++ b/plotly/validators/scattersmith/line/_shape.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="shape", parent_name="scattersmith.line", **kwargs): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["linear", "spline"]), **kwargs, diff --git a/plotly/validators/scattersmith/line/_smoothing.py b/plotly/validators/scattersmith/line/_smoothing.py index 99d35fb842..8db4609479 100644 --- a/plotly/validators/scattersmith/line/_smoothing.py +++ b/plotly/validators/scattersmith/line/_smoothing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="scattersmith.line", **kwargs ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/line/_width.py b/plotly/validators/scattersmith/line/_width.py index 901c20ec9c..1cda431284 100644 --- a/plotly/validators/scattersmith/line/_width.py +++ b/plotly/validators/scattersmith/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="scattersmith.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/__init__.py b/plotly/validators/scattersmith/marker/__init__.py index 8434e73e3f..fea9868a7b 100644 --- a/plotly/validators/scattersmith/marker/__init__.py +++ b/plotly/validators/scattersmith/marker/__init__.py @@ -1,71 +1,38 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._standoffsrc import StandoffsrcValidator - from ._standoff import StandoffValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxdisplayed import MaxdisplayedValidator - from ._line import LineValidator - from ._gradient import GradientValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angleref import AnglerefValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._standoffsrc.StandoffsrcValidator", - "._standoff.StandoffValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxdisplayed.MaxdisplayedValidator", - "._line.LineValidator", - "._gradient.GradientValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angleref.AnglerefValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._standoffsrc.StandoffsrcValidator", + "._standoff.StandoffValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angleref.AnglerefValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/_angle.py b/plotly/validators/scattersmith/marker/_angle.py index 03f5a3bd3e..33bcae300b 100644 --- a/plotly/validators/scattersmith/marker/_angle.py +++ b/plotly/validators/scattersmith/marker/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__( self, plotly_name="angle", parent_name="scattersmith.marker", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_angleref.py b/plotly/validators/scattersmith/marker/_angleref.py index f860dbd62b..803f83f95c 100644 --- a/plotly/validators/scattersmith/marker/_angleref.py +++ b/plotly/validators/scattersmith/marker/_angleref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnglerefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="angleref", parent_name="scattersmith.marker", **kwargs ): - super(AnglerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["previous", "up"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_anglesrc.py b/plotly/validators/scattersmith/marker/_anglesrc.py index da1b87b65d..bdaa643cfa 100644 --- a/plotly/validators/scattersmith/marker/_anglesrc.py +++ b/plotly/validators/scattersmith/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scattersmith.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_autocolorscale.py b/plotly/validators/scattersmith/marker/_autocolorscale.py index b98f7fee0e..6bbdcc7242 100644 --- a/plotly/validators/scattersmith/marker/_autocolorscale.py +++ b/plotly/validators/scattersmith/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattersmith.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_cauto.py b/plotly/validators/scattersmith/marker/_cauto.py index 71e550817e..259052c73a 100644 --- a/plotly/validators/scattersmith/marker/_cauto.py +++ b/plotly/validators/scattersmith/marker/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattersmith.marker", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_cmax.py b/plotly/validators/scattersmith/marker/_cmax.py index 04dd676a54..a25b11cc4b 100644 --- a/plotly/validators/scattersmith/marker/_cmax.py +++ b/plotly/validators/scattersmith/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="scattersmith.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_cmid.py b/plotly/validators/scattersmith/marker/_cmid.py index 563c1684ec..0c99bc20cf 100644 --- a/plotly/validators/scattersmith/marker/_cmid.py +++ b/plotly/validators/scattersmith/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="scattersmith.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_cmin.py b/plotly/validators/scattersmith/marker/_cmin.py index 32dab28d9e..962275e45d 100644 --- a/plotly/validators/scattersmith/marker/_cmin.py +++ b/plotly/validators/scattersmith/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="scattersmith.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_color.py b/plotly/validators/scattersmith/marker/_color.py index 20ac696935..bf6827c3dc 100644 --- a/plotly/validators/scattersmith/marker/_color.py +++ b/plotly/validators/scattersmith/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattersmith/marker/_coloraxis.py b/plotly/validators/scattersmith/marker/_coloraxis.py index f22d9a18d6..7874d2d2d1 100644 --- a/plotly/validators/scattersmith/marker/_coloraxis.py +++ b/plotly/validators/scattersmith/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattersmith.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattersmith/marker/_colorbar.py b/plotly/validators/scattersmith/marker/_colorbar.py index 39b75606ac..95000cdf17 100644 --- a/plotly/validators/scattersmith/marker/_colorbar.py +++ b/plotly/validators/scattersmith/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scattersmith.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - smith.marker.colorbar.Tickformatstop` instances - or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scattersmith.marker.colorbar.tickformatstopde - faults), sets the default property values to - use for elements of - scattersmith.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scattersmith.marke - r.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_colorscale.py b/plotly/validators/scattersmith/marker/_colorscale.py index c1f09c60d4..33723626b3 100644 --- a/plotly/validators/scattersmith/marker/_colorscale.py +++ b/plotly/validators/scattersmith/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattersmith.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_colorsrc.py b/plotly/validators/scattersmith/marker/_colorsrc.py index 1d2e5dccad..342957af1c 100644 --- a/plotly/validators/scattersmith/marker/_colorsrc.py +++ b/plotly/validators/scattersmith/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattersmith.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_gradient.py b/plotly/validators/scattersmith/marker/_gradient.py index 122adba5f9..ff40b15cb1 100644 --- a/plotly/validators/scattersmith/marker/_gradient.py +++ b/plotly/validators/scattersmith/marker/_gradient.py @@ -1,30 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class GradientValidator(_bv.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scattersmith.marker", **kwargs ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gradient"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_line.py b/plotly/validators/scattersmith/marker/_line.py index 772a824d57..578e26be7b 100644 --- a/plotly/validators/scattersmith/marker/_line.py +++ b/plotly/validators/scattersmith/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scattersmith.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_maxdisplayed.py b/plotly/validators/scattersmith/marker/_maxdisplayed.py index 30d6f881c7..8c8105a369 100644 --- a/plotly/validators/scattersmith/marker/_maxdisplayed.py +++ b/plotly/validators/scattersmith/marker/_maxdisplayed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxdisplayedValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxdisplayed", parent_name="scattersmith.marker", **kwargs ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_opacity.py b/plotly/validators/scattersmith/marker/_opacity.py index 7281ca07f9..0a96ffb8ce 100644 --- a/plotly/validators/scattersmith/marker/_opacity.py +++ b/plotly/validators/scattersmith/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattersmith.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scattersmith/marker/_opacitysrc.py b/plotly/validators/scattersmith/marker/_opacitysrc.py index f5517b3906..8868a27e53 100644 --- a/plotly/validators/scattersmith/marker/_opacitysrc.py +++ b/plotly/validators/scattersmith/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scattersmith.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_reversescale.py b/plotly/validators/scattersmith/marker/_reversescale.py index 35d280ff2a..106640c984 100644 --- a/plotly/validators/scattersmith/marker/_reversescale.py +++ b/plotly/validators/scattersmith/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattersmith.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_showscale.py b/plotly/validators/scattersmith/marker/_showscale.py index 68444e55d5..9d2852a502 100644 --- a/plotly/validators/scattersmith/marker/_showscale.py +++ b/plotly/validators/scattersmith/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scattersmith.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_size.py b/plotly/validators/scattersmith/marker/_size.py index 551e243250..3d985917c8 100644 --- a/plotly/validators/scattersmith/marker/_size.py +++ b/plotly/validators/scattersmith/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="scattersmith.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/marker/_sizemin.py b/plotly/validators/scattersmith/marker/_sizemin.py index 048b084947..fe4bf78280 100644 --- a/plotly/validators/scattersmith/marker/_sizemin.py +++ b/plotly/validators/scattersmith/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scattersmith.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_sizemode.py b/plotly/validators/scattersmith/marker/_sizemode.py index f0541aefc8..112db8d1a5 100644 --- a/plotly/validators/scattersmith/marker/_sizemode.py +++ b/plotly/validators/scattersmith/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scattersmith.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/_sizeref.py b/plotly/validators/scattersmith/marker/_sizeref.py index 0aaae965f1..c823ea5f2e 100644 --- a/plotly/validators/scattersmith/marker/_sizeref.py +++ b/plotly/validators/scattersmith/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scattersmith.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_sizesrc.py b/plotly/validators/scattersmith/marker/_sizesrc.py index a3fea8401e..489f6b42a4 100644 --- a/plotly/validators/scattersmith/marker/_sizesrc.py +++ b/plotly/validators/scattersmith/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattersmith.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_standoff.py b/plotly/validators/scattersmith/marker/_standoff.py index 3ca231c608..1f4630c0dd 100644 --- a/plotly/validators/scattersmith/marker/_standoff.py +++ b/plotly/validators/scattersmith/marker/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="scattersmith.marker", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/marker/_standoffsrc.py b/plotly/validators/scattersmith/marker/_standoffsrc.py index 9ed78205d1..5e6ac17122 100644 --- a/plotly/validators/scattersmith/marker/_standoffsrc.py +++ b/plotly/validators/scattersmith/marker/_standoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StandoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="standoffsrc", parent_name="scattersmith.marker", **kwargs ): - super(StandoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/_symbol.py b/plotly/validators/scattersmith/marker/_symbol.py index 4f599db26f..72fcf7cc14 100644 --- a/plotly/validators/scattersmith/marker/_symbol.py +++ b/plotly/validators/scattersmith/marker/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="symbol", parent_name="scattersmith.marker", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( diff --git a/plotly/validators/scattersmith/marker/_symbolsrc.py b/plotly/validators/scattersmith/marker/_symbolsrc.py index 094f0fea2d..2cbdcbaf61 100644 --- a/plotly/validators/scattersmith/marker/_symbolsrc.py +++ b/plotly/validators/scattersmith/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scattersmith.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/__init__.py b/plotly/validators/scattersmith/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scattersmith/marker/colorbar/__init__.py +++ b/plotly/validators/scattersmith/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/colorbar/_bgcolor.py b/plotly/validators/scattersmith/marker/colorbar/_bgcolor.py index ab36a8044b..32bd944d61 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scattersmith/marker/colorbar/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_bordercolor.py b/plotly/validators/scattersmith/marker/colorbar/_bordercolor.py index c632d9f239..b9198bd5cf 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scattersmith/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_borderwidth.py b/plotly/validators/scattersmith/marker/colorbar/_borderwidth.py index d9dc13fa68..335d932f25 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scattersmith/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_dtick.py b/plotly/validators/scattersmith/marker/colorbar/_dtick.py index 49db1612ea..6e4342bc3c 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_dtick.py +++ b/plotly/validators/scattersmith/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_exponentformat.py b/plotly/validators/scattersmith/marker/colorbar/_exponentformat.py index db5fd9e2dc..c21a7ba60f 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scattersmith/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_labelalias.py b/plotly/validators/scattersmith/marker/colorbar/_labelalias.py index 5fbf64a51b..6c6e9054c7 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_labelalias.py +++ b/plotly/validators/scattersmith/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_len.py b/plotly/validators/scattersmith/marker/colorbar/_len.py index 0574dc243d..e3fd3b809b 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_len.py +++ b/plotly/validators/scattersmith/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_lenmode.py b/plotly/validators/scattersmith/marker/colorbar/_lenmode.py index 8dcc4e35e7..651bac51a0 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_lenmode.py +++ b/plotly/validators/scattersmith/marker/colorbar/_lenmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_minexponent.py b/plotly/validators/scattersmith/marker/colorbar/_minexponent.py index 7bdc5373e4..e5276fd3e6 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_minexponent.py +++ b/plotly/validators/scattersmith/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_nticks.py b/plotly/validators/scattersmith/marker/colorbar/_nticks.py index 175fc2b250..920d874f75 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_nticks.py +++ b/plotly/validators/scattersmith/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_orientation.py b/plotly/validators/scattersmith/marker/colorbar/_orientation.py index fc84f94c07..78360a70d7 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_orientation.py +++ b/plotly/validators/scattersmith/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_outlinecolor.py b/plotly/validators/scattersmith/marker/colorbar/_outlinecolor.py index a1686cdc4d..e964ceca7d 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scattersmith/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_outlinewidth.py b/plotly/validators/scattersmith/marker/colorbar/_outlinewidth.py index 7acae47316..67f5f349a9 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scattersmith/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_separatethousands.py b/plotly/validators/scattersmith/marker/colorbar/_separatethousands.py index 81fffcc428..f9ff14a469 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scattersmith/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_showexponent.py b/plotly/validators/scattersmith/marker/colorbar/_showexponent.py index 6863443ac7..dfd0a52849 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_showexponent.py +++ b/plotly/validators/scattersmith/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_showticklabels.py b/plotly/validators/scattersmith/marker/colorbar/_showticklabels.py index 19d00ff714..4395deeaa6 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scattersmith/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_showtickprefix.py b/plotly/validators/scattersmith/marker/colorbar/_showtickprefix.py index b8cf6f7590..829c6c886b 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scattersmith/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py b/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py index a32b9875c7..645136ee40 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_thickness.py b/plotly/validators/scattersmith/marker/colorbar/_thickness.py index 6442b0b563..d4b00e28b6 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_thickness.py +++ b/plotly/validators/scattersmith/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_thicknessmode.py b/plotly/validators/scattersmith/marker/colorbar/_thicknessmode.py index 71ff988c68..3b8b02eadd 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scattersmith/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_tick0.py b/plotly/validators/scattersmith/marker/colorbar/_tick0.py index 297687f4fe..938656bfc3 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tick0.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickangle.py b/plotly/validators/scattersmith/marker/colorbar/_tickangle.py index b1eab89fc9..c55f8bd1cc 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickangle.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickcolor.py b/plotly/validators/scattersmith/marker/colorbar/_tickcolor.py index 79f0e32888..608d7dc105 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickfont.py b/plotly/validators/scattersmith/marker/colorbar/_tickfont.py index d3353310a5..48e6465033 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickfont.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickformat.py b/plotly/validators/scattersmith/marker/colorbar/_tickformat.py index 657f9d04db..9699c7cfd4 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickformat.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scattersmith/marker/colorbar/_tickformatstopdefaults.py index dffb72f1dd..ad2780096d 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickformatstops.py b/plotly/validators/scattersmith/marker/colorbar/_tickformatstops.py index 3c83565dd9..8b28c9592a 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scattersmith/marker/colorbar/_ticklabeloverflow.py index 966dd3da04..818f6ec208 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticklabelposition.py b/plotly/validators/scattersmith/marker/colorbar/_ticklabelposition.py index 8e97431ecf..2d7811d656 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticklabelstep.py b/plotly/validators/scattersmith/marker/colorbar/_ticklabelstep.py index d8dd166e5a..cce5c076e7 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticklen.py b/plotly/validators/scattersmith/marker/colorbar/_ticklen.py index 6104f526a7..e140879f59 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticklen.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticklen.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickmode.py b/plotly/validators/scattersmith/marker/colorbar/_tickmode.py index 314d1f836b..c32c34e61e 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickmode.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickprefix.py b/plotly/validators/scattersmith/marker/colorbar/_tickprefix.py index be28f50f45..a4005c5c7d 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticks.py b/plotly/validators/scattersmith/marker/colorbar/_ticks.py index 60218951b9..9095835868 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticks.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticksuffix.py b/plotly/validators/scattersmith/marker/colorbar/_ticksuffix.py index c26cc46b77..e367fc570e 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticktext.py b/plotly/validators/scattersmith/marker/colorbar/_ticktext.py index 558de2f8a0..930b0901f7 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticktext.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_ticktextsrc.py b/plotly/validators/scattersmith/marker/colorbar/_ticktextsrc.py index 51ee84e816..9f786dd359 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickvals.py b/plotly/validators/scattersmith/marker/colorbar/_tickvals.py index 7387a52b55..05ed836af8 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickvals.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickvalssrc.py b/plotly/validators/scattersmith/marker/colorbar/_tickvalssrc.py index 366e4a24f7..3a858c6279 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_tickwidth.py b/plotly/validators/scattersmith/marker/colorbar/_tickwidth.py index 3b9298e857..80f5904bb0 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scattersmith/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_title.py b/plotly/validators/scattersmith/marker/colorbar/_title.py index aed71e1281..d555586e66 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_title.py +++ b/plotly/validators/scattersmith/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_x.py b/plotly/validators/scattersmith/marker/colorbar/_x.py index af3835c7f1..87bad3de73 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_x.py +++ b/plotly/validators/scattersmith/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_xanchor.py b/plotly/validators/scattersmith/marker/colorbar/_xanchor.py index 9477800826..d7b676207a 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_xanchor.py +++ b/plotly/validators/scattersmith/marker/colorbar/_xanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_xpad.py b/plotly/validators/scattersmith/marker/colorbar/_xpad.py index a657626add..f4ec39a9ba 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_xpad.py +++ b/plotly/validators/scattersmith/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_xref.py b/plotly/validators/scattersmith/marker/colorbar/_xref.py index fb624aad7a..050341a320 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_xref.py +++ b/plotly/validators/scattersmith/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_y.py b/plotly/validators/scattersmith/marker/colorbar/_y.py index 95aaca685b..60c41cc8b8 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_y.py +++ b/plotly/validators/scattersmith/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/_yanchor.py b/plotly/validators/scattersmith/marker/colorbar/_yanchor.py index 9eedc5434d..b7c546695a 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_yanchor.py +++ b/plotly/validators/scattersmith/marker/colorbar/_yanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scattersmith.marker.colorbar", **kwargs, ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_ypad.py b/plotly/validators/scattersmith/marker/colorbar/_ypad.py index d50896ae18..7f4ca9ee27 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_ypad.py +++ b/plotly/validators/scattersmith/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/_yref.py b/plotly/validators/scattersmith/marker/colorbar/_yref.py index 03414cf3d1..dd7e536520 100644 --- a/plotly/validators/scattersmith/marker/colorbar/_yref.py +++ b/plotly/validators/scattersmith/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scattersmith.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/__init__.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_color.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_color.py index bf9df66b89..e025fa3fe0 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_family.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_family.py index 385c283696..8df5318946 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_lineposition.py index 8dd5518fd2..a0384d23aa 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_shadow.py index 767ef8a714..ab1c8ec518 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_size.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_size.py index 939d1c2987..ed84be50b2 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_style.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_style.py index 3fbdc2be21..6958a11b95 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_textcase.py index ceda28cf4f..36edae70ac 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_variant.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_variant.py index fdce8b89a4..c85bd24034 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattersmith/marker/colorbar/tickfont/_weight.py b/plotly/validators/scattersmith/marker/colorbar/tickfont/_weight.py index d4de6706c6..279d31e768 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattersmith.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_dtickrange.py index 6eec1c29a9..d053be9fa6 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_enabled.py index b78537b59c..b51f4a5dbc 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_name.py index 9685cb9162..5f7e64cdfd 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_templateitemname.py index a81277026e..1f2eff5151 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_value.py index 27dec553bd..bc0e1b6fdc 100644 --- a/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scattersmith/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scattersmith.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/title/__init__.py b/plotly/validators/scattersmith/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/__init__.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scattersmith/marker/colorbar/title/_font.py b/plotly/validators/scattersmith/marker/colorbar/title/_font.py index 5b3026b702..333002b384 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/_font.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scattersmith.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/title/_side.py b/plotly/validators/scattersmith/marker/colorbar/title/_side.py index 5473adebd6..aefbd4fa48 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/_side.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scattersmith.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/title/_text.py b/plotly/validators/scattersmith/marker/colorbar/title/_text.py index e90872971c..70ada69968 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/_text.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scattersmith.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/__init__.py b/plotly/validators/scattersmith/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_color.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_color.py index d435fa7382..3f2fb00d97 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_family.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_family.py index c5423d8b56..14e01d49b5 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_lineposition.py index c71ba74503..f66112fe76 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_shadow.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_shadow.py index 6cf4477346..8e0a2a485c 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_size.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_size.py index ad1f82dc48..4cd9cd6eac 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_style.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_style.py index ccd83bd0c7..ef0065c63e 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_textcase.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_textcase.py index a4a82415bd..2c70a94fec 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_variant.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_variant.py index e2f26dcf13..6af493b083 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scattersmith/marker/colorbar/title/font/_weight.py b/plotly/validators/scattersmith/marker/colorbar/title/font/_weight.py index 2a95ab9bd6..b7ca786266 100644 --- a/plotly/validators/scattersmith/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scattersmith/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattersmith.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scattersmith/marker/gradient/__init__.py b/plotly/validators/scattersmith/marker/gradient/__init__.py index 624a280ea4..f5373e7822 100644 --- a/plotly/validators/scattersmith/marker/gradient/__init__.py +++ b/plotly/validators/scattersmith/marker/gradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._typesrc import TypesrcValidator - from ._type import TypeValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._typesrc.TypesrcValidator", - "._type.TypeValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/gradient/_color.py b/plotly/validators/scattersmith/marker/gradient/_color.py index b3329069f7..bbbbda8402 100644 --- a/plotly/validators/scattersmith/marker/gradient/_color.py +++ b/plotly/validators/scattersmith/marker/gradient/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.marker.gradient", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattersmith/marker/gradient/_colorsrc.py b/plotly/validators/scattersmith/marker/gradient/_colorsrc.py index da5205ea1d..50512db8e1 100644 --- a/plotly/validators/scattersmith/marker/gradient/_colorsrc.py +++ b/plotly/validators/scattersmith/marker/gradient/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattersmith.marker.gradient", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/gradient/_type.py b/plotly/validators/scattersmith/marker/gradient/_type.py index 7e1b57489a..2398768c51 100644 --- a/plotly/validators/scattersmith/marker/gradient/_type.py +++ b/plotly/validators/scattersmith/marker/gradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scattersmith.marker.gradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), diff --git a/plotly/validators/scattersmith/marker/gradient/_typesrc.py b/plotly/validators/scattersmith/marker/gradient/_typesrc.py index 506010667d..3810327c32 100644 --- a/plotly/validators/scattersmith/marker/gradient/_typesrc.py +++ b/plotly/validators/scattersmith/marker/gradient/_typesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TypesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scattersmith.marker.gradient", **kwargs, ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/line/__init__.py b/plotly/validators/scattersmith/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scattersmith/marker/line/__init__.py +++ b/plotly/validators/scattersmith/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scattersmith/marker/line/_autocolorscale.py b/plotly/validators/scattersmith/marker/line/_autocolorscale.py index 59a82144e2..d6ba4f2114 100644 --- a/plotly/validators/scattersmith/marker/line/_autocolorscale.py +++ b/plotly/validators/scattersmith/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scattersmith.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/line/_cauto.py b/plotly/validators/scattersmith/marker/line/_cauto.py index b276e6d03b..859587da3f 100644 --- a/plotly/validators/scattersmith/marker/line/_cauto.py +++ b/plotly/validators/scattersmith/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scattersmith.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/line/_cmax.py b/plotly/validators/scattersmith/marker/line/_cmax.py index 60ede55a94..d80b3de45c 100644 --- a/plotly/validators/scattersmith/marker/line/_cmax.py +++ b/plotly/validators/scattersmith/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scattersmith.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/line/_cmid.py b/plotly/validators/scattersmith/marker/line/_cmid.py index 095df53ad7..12582a848f 100644 --- a/plotly/validators/scattersmith/marker/line/_cmid.py +++ b/plotly/validators/scattersmith/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scattersmith.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/line/_cmin.py b/plotly/validators/scattersmith/marker/line/_cmin.py index c67e10a032..4e0da8024d 100644 --- a/plotly/validators/scattersmith/marker/line/_cmin.py +++ b/plotly/validators/scattersmith/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scattersmith.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/line/_color.py b/plotly/validators/scattersmith/marker/line/_color.py index e02eaedbb1..1108f82a70 100644 --- a/plotly/validators/scattersmith/marker/line/_color.py +++ b/plotly/validators/scattersmith/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scattersmith/marker/line/_coloraxis.py b/plotly/validators/scattersmith/marker/line/_coloraxis.py index 356dccd2f1..f9604f2c66 100644 --- a/plotly/validators/scattersmith/marker/line/_coloraxis.py +++ b/plotly/validators/scattersmith/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scattersmith.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scattersmith/marker/line/_colorscale.py b/plotly/validators/scattersmith/marker/line/_colorscale.py index 7152d21e22..3e6e9e98a7 100644 --- a/plotly/validators/scattersmith/marker/line/_colorscale.py +++ b/plotly/validators/scattersmith/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scattersmith.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scattersmith/marker/line/_colorsrc.py b/plotly/validators/scattersmith/marker/line/_colorsrc.py index bc72bd6965..eabccc0f6a 100644 --- a/plotly/validators/scattersmith/marker/line/_colorsrc.py +++ b/plotly/validators/scattersmith/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattersmith.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/line/_reversescale.py b/plotly/validators/scattersmith/marker/line/_reversescale.py index beeaa71748..58fc402722 100644 --- a/plotly/validators/scattersmith/marker/line/_reversescale.py +++ b/plotly/validators/scattersmith/marker/line/_reversescale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scattersmith.marker.line", **kwargs, ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scattersmith/marker/line/_width.py b/plotly/validators/scattersmith/marker/line/_width.py index fe02330c97..7e873c7cea 100644 --- a/plotly/validators/scattersmith/marker/line/_width.py +++ b/plotly/validators/scattersmith/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scattersmith.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/marker/line/_widthsrc.py b/plotly/validators/scattersmith/marker/line/_widthsrc.py index 24e788d264..2829aa395b 100644 --- a/plotly/validators/scattersmith/marker/line/_widthsrc.py +++ b/plotly/validators/scattersmith/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scattersmith.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/selected/__init__.py b/plotly/validators/scattersmith/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattersmith/selected/__init__.py +++ b/plotly/validators/scattersmith/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattersmith/selected/_marker.py b/plotly/validators/scattersmith/selected/_marker.py index e7e2222d86..c7d57b83cf 100644 --- a/plotly/validators/scattersmith/selected/_marker.py +++ b/plotly/validators/scattersmith/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattersmith.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/selected/_textfont.py b/plotly/validators/scattersmith/selected/_textfont.py index 85be02c257..daf18ddbd1 100644 --- a/plotly/validators/scattersmith/selected/_textfont.py +++ b/plotly/validators/scattersmith/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattersmith.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/selected/marker/__init__.py b/plotly/validators/scattersmith/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattersmith/selected/marker/__init__.py +++ b/plotly/validators/scattersmith/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattersmith/selected/marker/_color.py b/plotly/validators/scattersmith/selected/marker/_color.py index 9a5ac6e248..642d63c190 100644 --- a/plotly/validators/scattersmith/selected/marker/_color.py +++ b/plotly/validators/scattersmith/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/selected/marker/_opacity.py b/plotly/validators/scattersmith/selected/marker/_opacity.py index 0531b2e4d5..bb66a5e65c 100644 --- a/plotly/validators/scattersmith/selected/marker/_opacity.py +++ b/plotly/validators/scattersmith/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattersmith.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/selected/marker/_size.py b/plotly/validators/scattersmith/selected/marker/_size.py index c376b99fa5..aaa76e3a93 100644 --- a/plotly/validators/scattersmith/selected/marker/_size.py +++ b/plotly/validators/scattersmith/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/selected/textfont/__init__.py b/plotly/validators/scattersmith/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattersmith/selected/textfont/__init__.py +++ b/plotly/validators/scattersmith/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattersmith/selected/textfont/_color.py b/plotly/validators/scattersmith/selected/textfont/_color.py index 8d72cb5067..df9e52ae39 100644 --- a/plotly/validators/scattersmith/selected/textfont/_color.py +++ b/plotly/validators/scattersmith/selected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.selected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/stream/__init__.py b/plotly/validators/scattersmith/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scattersmith/stream/__init__.py +++ b/plotly/validators/scattersmith/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scattersmith/stream/_maxpoints.py b/plotly/validators/scattersmith/stream/_maxpoints.py index 7825232868..72b92a24b3 100644 --- a/plotly/validators/scattersmith/stream/_maxpoints.py +++ b/plotly/validators/scattersmith/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scattersmith.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/stream/_token.py b/plotly/validators/scattersmith/stream/_token.py index e6b855c4d3..4791f259d9 100644 --- a/plotly/validators/scattersmith/stream/_token.py +++ b/plotly/validators/scattersmith/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="scattersmith.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scattersmith/textfont/__init__.py b/plotly/validators/scattersmith/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scattersmith/textfont/__init__.py +++ b/plotly/validators/scattersmith/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scattersmith/textfont/_color.py b/plotly/validators/scattersmith/textfont/_color.py index 2d7df6248c..ce1aa55780 100644 --- a/plotly/validators/scattersmith/textfont/_color.py +++ b/plotly/validators/scattersmith/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scattersmith/textfont/_colorsrc.py b/plotly/validators/scattersmith/textfont/_colorsrc.py index 667eedfbb0..67471ec71d 100644 --- a/plotly/validators/scattersmith/textfont/_colorsrc.py +++ b/plotly/validators/scattersmith/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scattersmith.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_family.py b/plotly/validators/scattersmith/textfont/_family.py index 1a6fba6024..968692fd9d 100644 --- a/plotly/validators/scattersmith/textfont/_family.py +++ b/plotly/validators/scattersmith/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scattersmith.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scattersmith/textfont/_familysrc.py b/plotly/validators/scattersmith/textfont/_familysrc.py index 977efaa6bf..925d9e4750 100644 --- a/plotly/validators/scattersmith/textfont/_familysrc.py +++ b/plotly/validators/scattersmith/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scattersmith.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_lineposition.py b/plotly/validators/scattersmith/textfont/_lineposition.py index 50e2c52ee7..61cdacbc8e 100644 --- a/plotly/validators/scattersmith/textfont/_lineposition.py +++ b/plotly/validators/scattersmith/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scattersmith.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scattersmith/textfont/_linepositionsrc.py b/plotly/validators/scattersmith/textfont/_linepositionsrc.py index c6d18cbf57..a502d08767 100644 --- a/plotly/validators/scattersmith/textfont/_linepositionsrc.py +++ b/plotly/validators/scattersmith/textfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scattersmith.textfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_shadow.py b/plotly/validators/scattersmith/textfont/_shadow.py index b740f255ff..1927a3d74d 100644 --- a/plotly/validators/scattersmith/textfont/_shadow.py +++ b/plotly/validators/scattersmith/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scattersmith.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scattersmith/textfont/_shadowsrc.py b/plotly/validators/scattersmith/textfont/_shadowsrc.py index fbef53827a..ae97558ca2 100644 --- a/plotly/validators/scattersmith/textfont/_shadowsrc.py +++ b/plotly/validators/scattersmith/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scattersmith.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_size.py b/plotly/validators/scattersmith/textfont/_size.py index 850a9f5a41..3197ed9ae2 100644 --- a/plotly/validators/scattersmith/textfont/_size.py +++ b/plotly/validators/scattersmith/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scattersmith/textfont/_sizesrc.py b/plotly/validators/scattersmith/textfont/_sizesrc.py index 195d58ff49..84c16f006d 100644 --- a/plotly/validators/scattersmith/textfont/_sizesrc.py +++ b/plotly/validators/scattersmith/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scattersmith.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_style.py b/plotly/validators/scattersmith/textfont/_style.py index 7b1cbdbd9e..92a381d8e5 100644 --- a/plotly/validators/scattersmith/textfont/_style.py +++ b/plotly/validators/scattersmith/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scattersmith.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scattersmith/textfont/_stylesrc.py b/plotly/validators/scattersmith/textfont/_stylesrc.py index 0ab8ead8c0..72e7d94a79 100644 --- a/plotly/validators/scattersmith/textfont/_stylesrc.py +++ b/plotly/validators/scattersmith/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scattersmith.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_textcase.py b/plotly/validators/scattersmith/textfont/_textcase.py index e5b6cfcb7f..22ccac5061 100644 --- a/plotly/validators/scattersmith/textfont/_textcase.py +++ b/plotly/validators/scattersmith/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scattersmith.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scattersmith/textfont/_textcasesrc.py b/plotly/validators/scattersmith/textfont/_textcasesrc.py index 96bf8ecc92..c3437eff5d 100644 --- a/plotly/validators/scattersmith/textfont/_textcasesrc.py +++ b/plotly/validators/scattersmith/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scattersmith.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_variant.py b/plotly/validators/scattersmith/textfont/_variant.py index 99f07ae525..8b01473ae4 100644 --- a/plotly/validators/scattersmith/textfont/_variant.py +++ b/plotly/validators/scattersmith/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scattersmith.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scattersmith/textfont/_variantsrc.py b/plotly/validators/scattersmith/textfont/_variantsrc.py index 9ed07409c8..a254f0c851 100644 --- a/plotly/validators/scattersmith/textfont/_variantsrc.py +++ b/plotly/validators/scattersmith/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scattersmith.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/textfont/_weight.py b/plotly/validators/scattersmith/textfont/_weight.py index a5c3a21479..d594b605be 100644 --- a/plotly/validators/scattersmith/textfont/_weight.py +++ b/plotly/validators/scattersmith/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scattersmith.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scattersmith/textfont/_weightsrc.py b/plotly/validators/scattersmith/textfont/_weightsrc.py index 79b0b8e24d..884ef097c9 100644 --- a/plotly/validators/scattersmith/textfont/_weightsrc.py +++ b/plotly/validators/scattersmith/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scattersmith.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scattersmith/unselected/__init__.py b/plotly/validators/scattersmith/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scattersmith/unselected/__init__.py +++ b/plotly/validators/scattersmith/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scattersmith/unselected/_marker.py b/plotly/validators/scattersmith/unselected/_marker.py index 85cc44ce84..6396050667 100644 --- a/plotly/validators/scattersmith/unselected/_marker.py +++ b/plotly/validators/scattersmith/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scattersmith.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/unselected/_textfont.py b/plotly/validators/scattersmith/unselected/_textfont.py index 771b5b0ebf..94884bb6ff 100644 --- a/plotly/validators/scattersmith/unselected/_textfont.py +++ b/plotly/validators/scattersmith/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scattersmith.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scattersmith/unselected/marker/__init__.py b/plotly/validators/scattersmith/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scattersmith/unselected/marker/__init__.py +++ b/plotly/validators/scattersmith/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scattersmith/unselected/marker/_color.py b/plotly/validators/scattersmith/unselected/marker/_color.py index e0d6c289ad..f0ea59b963 100644 --- a/plotly/validators/scattersmith/unselected/marker/_color.py +++ b/plotly/validators/scattersmith/unselected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.unselected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scattersmith/unselected/marker/_opacity.py b/plotly/validators/scattersmith/unselected/marker/_opacity.py index ddc2587b6e..e47b892151 100644 --- a/plotly/validators/scattersmith/unselected/marker/_opacity.py +++ b/plotly/validators/scattersmith/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scattersmith.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scattersmith/unselected/marker/_size.py b/plotly/validators/scattersmith/unselected/marker/_size.py index 1da3002a3e..989cabd7e2 100644 --- a/plotly/validators/scattersmith/unselected/marker/_size.py +++ b/plotly/validators/scattersmith/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scattersmith.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scattersmith/unselected/textfont/__init__.py b/plotly/validators/scattersmith/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scattersmith/unselected/textfont/__init__.py +++ b/plotly/validators/scattersmith/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scattersmith/unselected/textfont/_color.py b/plotly/validators/scattersmith/unselected/textfont/_color.py index 4d115b2276..f387c894f0 100644 --- a/plotly/validators/scattersmith/unselected/textfont/_color.py +++ b/plotly/validators/scattersmith/unselected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scattersmith.unselected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/__init__.py b/plotly/validators/scatterternary/__init__.py index e99da6064d..dbdfd03c85 100644 --- a/plotly/validators/scatterternary/__init__.py +++ b/plotly/validators/scatterternary/__init__.py @@ -1,115 +1,60 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._sum import SumValidator - from ._subplot import SubplotValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._mode import ModeValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._fill import FillValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._csrc import CsrcValidator - from ._connectgaps import ConnectgapsValidator - from ._cliponaxis import CliponaxisValidator - from ._c import CValidator - from ._bsrc import BsrcValidator - from ._b import BValidator - from ._asrc import AsrcValidator - from ._a import AValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._sum.SumValidator", - "._subplot.SubplotValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._mode.ModeValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._fill.FillValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._csrc.CsrcValidator", - "._connectgaps.ConnectgapsValidator", - "._cliponaxis.CliponaxisValidator", - "._c.CValidator", - "._bsrc.BsrcValidator", - "._b.BValidator", - "._asrc.AsrcValidator", - "._a.AValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._sum.SumValidator", + "._subplot.SubplotValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._mode.ModeValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._fill.FillValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._csrc.CsrcValidator", + "._connectgaps.ConnectgapsValidator", + "._cliponaxis.CliponaxisValidator", + "._c.CValidator", + "._bsrc.BsrcValidator", + "._b.BValidator", + "._asrc.AsrcValidator", + "._a.AValidator", + ], +) diff --git a/plotly/validators/scatterternary/_a.py b/plotly/validators/scatterternary/_a.py index 08598a3c4b..553dda2f3a 100644 --- a/plotly/validators/scatterternary/_a.py +++ b/plotly/validators/scatterternary/_a.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AValidator(_plotly_utils.basevalidators.DataArrayValidator): +class AValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="a", parent_name="scatterternary", **kwargs): - super(AValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_asrc.py b/plotly/validators/scatterternary/_asrc.py index 7720b3237a..d226163b59 100644 --- a/plotly/validators/scatterternary/_asrc.py +++ b/plotly/validators/scatterternary/_asrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="asrc", parent_name="scatterternary", **kwargs): - super(AsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_b.py b/plotly/validators/scatterternary/_b.py index 33bba83bef..9479fd5195 100644 --- a/plotly/validators/scatterternary/_b.py +++ b/plotly/validators/scatterternary/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.DataArrayValidator): +class BValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="scatterternary", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_bsrc.py b/plotly/validators/scatterternary/_bsrc.py index d7b8073487..4c1c28d13c 100644 --- a/plotly/validators/scatterternary/_bsrc.py +++ b/plotly/validators/scatterternary/_bsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="bsrc", parent_name="scatterternary", **kwargs): - super(BsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_c.py b/plotly/validators/scatterternary/_c.py index 2645f58995..74527bf1b9 100644 --- a/plotly/validators/scatterternary/_c.py +++ b/plotly/validators/scatterternary/_c.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="c", parent_name="scatterternary", **kwargs): - super(CValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_cliponaxis.py b/plotly/validators/scatterternary/_cliponaxis.py index 2f3bfa7669..0a70071e72 100644 --- a/plotly/validators/scatterternary/_cliponaxis.py +++ b/plotly/validators/scatterternary/_cliponaxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cliponaxis", parent_name="scatterternary", **kwargs ): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_connectgaps.py b/plotly/validators/scatterternary/_connectgaps.py index ba7f921065..27d0bda4d2 100644 --- a/plotly/validators/scatterternary/_connectgaps.py +++ b/plotly/validators/scatterternary/_connectgaps.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="connectgaps", parent_name="scatterternary", **kwargs ): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_csrc.py b/plotly/validators/scatterternary/_csrc.py index a069a6f4d0..580a539103 100644 --- a/plotly/validators/scatterternary/_csrc.py +++ b/plotly/validators/scatterternary/_csrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="csrc", parent_name="scatterternary", **kwargs): - super(CsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_customdata.py b/plotly/validators/scatterternary/_customdata.py index f2b28ef8b2..f071958bf1 100644 --- a/plotly/validators/scatterternary/_customdata.py +++ b/plotly/validators/scatterternary/_customdata.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="customdata", parent_name="scatterternary", **kwargs ): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_customdatasrc.py b/plotly/validators/scatterternary/_customdatasrc.py index d9996ad0bd..3322f18a5a 100644 --- a/plotly/validators/scatterternary/_customdatasrc.py +++ b/plotly/validators/scatterternary/_customdatasrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="customdatasrc", parent_name="scatterternary", **kwargs ): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_fill.py b/plotly/validators/scatterternary/_fill.py index e2ed1e2b46..50f37ac4a5 100644 --- a/plotly/validators/scatterternary/_fill.py +++ b/plotly/validators/scatterternary/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="fill", parent_name="scatterternary", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "toself", "tonext"]), **kwargs, diff --git a/plotly/validators/scatterternary/_fillcolor.py b/plotly/validators/scatterternary/_fillcolor.py index fbdff231f4..a5b21a646a 100644 --- a/plotly/validators/scatterternary/_fillcolor.py +++ b/plotly/validators/scatterternary/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="scatterternary", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_hoverinfo.py b/plotly/validators/scatterternary/_hoverinfo.py index 27475f88e2..93845e653d 100644 --- a/plotly/validators/scatterternary/_hoverinfo.py +++ b/plotly/validators/scatterternary/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="scatterternary", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/scatterternary/_hoverinfosrc.py b/plotly/validators/scatterternary/_hoverinfosrc.py index a20eb428dc..e9338119d9 100644 --- a/plotly/validators/scatterternary/_hoverinfosrc.py +++ b/plotly/validators/scatterternary/_hoverinfosrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hoverinfosrc", parent_name="scatterternary", **kwargs ): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_hoverlabel.py b/plotly/validators/scatterternary/_hoverlabel.py index 43bdb6a343..d48c45f748 100644 --- a/plotly/validators/scatterternary/_hoverlabel.py +++ b/plotly/validators/scatterternary/_hoverlabel.py @@ -1,52 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__( self, plotly_name="hoverlabel", parent_name="scatterternary", **kwargs ): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_hoveron.py b/plotly/validators/scatterternary/_hoveron.py index cd1cc12605..fb986bab90 100644 --- a/plotly/validators/scatterternary/_hoveron.py +++ b/plotly/validators/scatterternary/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="scatterternary", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), flags=kwargs.pop("flags", ["points", "fills"]), **kwargs, diff --git a/plotly/validators/scatterternary/_hovertemplate.py b/plotly/validators/scatterternary/_hovertemplate.py index 9639265c7f..3f22cd722a 100644 --- a/plotly/validators/scatterternary/_hovertemplate.py +++ b/plotly/validators/scatterternary/_hovertemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="hovertemplate", parent_name="scatterternary", **kwargs ): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterternary/_hovertemplatesrc.py b/plotly/validators/scatterternary/_hovertemplatesrc.py index d520e7a8a9..a3102860f7 100644 --- a/plotly/validators/scatterternary/_hovertemplatesrc.py +++ b/plotly/validators/scatterternary/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="scatterternary", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_hovertext.py b/plotly/validators/scatterternary/_hovertext.py index ebb4860039..225c6c5081 100644 --- a/plotly/validators/scatterternary/_hovertext.py +++ b/plotly/validators/scatterternary/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="scatterternary", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterternary/_hovertextsrc.py b/plotly/validators/scatterternary/_hovertextsrc.py index 07e3a737eb..29bc36f8d1 100644 --- a/plotly/validators/scatterternary/_hovertextsrc.py +++ b/plotly/validators/scatterternary/_hovertextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertextsrc", parent_name="scatterternary", **kwargs ): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_ids.py b/plotly/validators/scatterternary/_ids.py index f76d9012f7..8495f8ef5f 100644 --- a/plotly/validators/scatterternary/_ids.py +++ b/plotly/validators/scatterternary/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="scatterternary", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_idssrc.py b/plotly/validators/scatterternary/_idssrc.py index e9731d2a47..40da895c27 100644 --- a/plotly/validators/scatterternary/_idssrc.py +++ b/plotly/validators/scatterternary/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="scatterternary", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_legend.py b/plotly/validators/scatterternary/_legend.py index bcd44c345c..eb958161f2 100644 --- a/plotly/validators/scatterternary/_legend.py +++ b/plotly/validators/scatterternary/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="scatterternary", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterternary/_legendgroup.py b/plotly/validators/scatterternary/_legendgroup.py index dd65c0aad8..b3d6288994 100644 --- a/plotly/validators/scatterternary/_legendgroup.py +++ b/plotly/validators/scatterternary/_legendgroup.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__( self, plotly_name="legendgroup", parent_name="scatterternary", **kwargs ): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_legendgrouptitle.py b/plotly/validators/scatterternary/_legendgrouptitle.py index 57248571d5..6f4934c3e8 100644 --- a/plotly/validators/scatterternary/_legendgrouptitle.py +++ b/plotly/validators/scatterternary/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="scatterternary", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_legendrank.py b/plotly/validators/scatterternary/_legendrank.py index 098becd214..f729c633f3 100644 --- a/plotly/validators/scatterternary/_legendrank.py +++ b/plotly/validators/scatterternary/_legendrank.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendrank", parent_name="scatterternary", **kwargs ): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_legendwidth.py b/plotly/validators/scatterternary/_legendwidth.py index ee2c019616..293c7f970b 100644 --- a/plotly/validators/scatterternary/_legendwidth.py +++ b/plotly/validators/scatterternary/_legendwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="legendwidth", parent_name="scatterternary", **kwargs ): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/_line.py b/plotly/validators/scatterternary/_line.py index 89b69788e4..ba2091a0aa 100644 --- a/plotly/validators/scatterternary/_line.py +++ b/plotly/validators/scatterternary/_line.py @@ -1,44 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="scatterternary", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - backoff - Sets the line back off from the end point of - the nth line segment (in px). This option is - useful e.g. to avoid overlap with arrowhead - markers. With "auto" the lines would trim - before markers if `marker.angleref` is set to - "previous". - backoffsrc - Sets the source reference on Chart Studio Cloud - for `backoff`. - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - shape - Determines the line shape. With "spline" the - lines are drawn using spline interpolation. The - other available values correspond to step-wise - line shapes. - smoothing - Has an effect only if `shape` is set to - "spline" Sets the amount of smoothing. 0 - corresponds to no smoothing (equivalent to a - "linear" shape). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_marker.py b/plotly/validators/scatterternary/_marker.py index 9b8054bb24..295de23c33 100644 --- a/plotly/validators/scatterternary/_marker.py +++ b/plotly/validators/scatterternary/_marker.py @@ -1,165 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="scatterternary", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - angleref - Sets the reference for marker angle. With - "previous", angle 0 points along the line from - the previous point to this one. With "up", - angle 0 points toward the top of the screen. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.scatterternary.mar - ker.ColorBar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - gradient - :class:`plotly.graph_objects.scatterternary.mar - ker.Gradient` instance or dict with compatible - properties - line - :class:`plotly.graph_objects.scatterternary.mar - ker.Line` instance or dict with compatible - properties - maxdisplayed - Sets a maximum number of points to be drawn on - the graph. 0 corresponds to no limit. - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - standoff - Moves the marker away from the data point in - the direction of `angle` (in px). This can be - useful for example if you have another marker - at this location and you want to point an - arrowhead marker at it. - standoffsrc - Sets the source reference on Chart Studio Cloud - for `standoff`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_meta.py b/plotly/validators/scatterternary/_meta.py index 69bfc725f4..783d276c65 100644 --- a/plotly/validators/scatterternary/_meta.py +++ b/plotly/validators/scatterternary/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="scatterternary", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterternary/_metasrc.py b/plotly/validators/scatterternary/_metasrc.py index d13b6bcf44..fb38e1b265 100644 --- a/plotly/validators/scatterternary/_metasrc.py +++ b/plotly/validators/scatterternary/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="scatterternary", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_mode.py b/plotly/validators/scatterternary/_mode.py index 1aa4b5cfc7..aca0f8cadb 100644 --- a/plotly/validators/scatterternary/_mode.py +++ b/plotly/validators/scatterternary/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.FlaglistValidator): +class ModeValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="mode", parent_name="scatterternary", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["lines", "markers", "text"]), diff --git a/plotly/validators/scatterternary/_name.py b/plotly/validators/scatterternary/_name.py index eb186ec00a..bf4fa9c9aa 100644 --- a/plotly/validators/scatterternary/_name.py +++ b/plotly/validators/scatterternary/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="scatterternary", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_opacity.py b/plotly/validators/scatterternary/_opacity.py index 642e75917c..16b39fff1a 100644 --- a/plotly/validators/scatterternary/_opacity.py +++ b/plotly/validators/scatterternary/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="scatterternary", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/_selected.py b/plotly/validators/scatterternary/_selected.py index 4135f7c10d..04fde21c41 100644 --- a/plotly/validators/scatterternary/_selected.py +++ b/plotly/validators/scatterternary/_selected.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="scatterternary", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatterternary.sel - ected.Marker` instance or dict with compatible - properties - textfont - :class:`plotly.graph_objects.scatterternary.sel - ected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_selectedpoints.py b/plotly/validators/scatterternary/_selectedpoints.py index 9d46922968..3f6da24f73 100644 --- a/plotly/validators/scatterternary/_selectedpoints.py +++ b/plotly/validators/scatterternary/_selectedpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__( self, plotly_name="selectedpoints", parent_name="scatterternary", **kwargs ): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_showlegend.py b/plotly/validators/scatterternary/_showlegend.py index 6f279a66b0..9392a0a8ad 100644 --- a/plotly/validators/scatterternary/_showlegend.py +++ b/plotly/validators/scatterternary/_showlegend.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showlegend", parent_name="scatterternary", **kwargs ): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_stream.py b/plotly/validators/scatterternary/_stream.py index 8a3d755d8d..55d610a496 100644 --- a/plotly/validators/scatterternary/_stream.py +++ b/plotly/validators/scatterternary/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="scatterternary", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_subplot.py b/plotly/validators/scatterternary/_subplot.py index 295d547955..60f46ca2e3 100644 --- a/plotly/validators/scatterternary/_subplot.py +++ b/plotly/validators/scatterternary/_subplot.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SubplotValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SubplotValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="subplot", parent_name="scatterternary", **kwargs): - super(SubplotValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "ternary"), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterternary/_sum.py b/plotly/validators/scatterternary/_sum.py index 4440d0fd94..a4294250a6 100644 --- a/plotly/validators/scatterternary/_sum.py +++ b/plotly/validators/scatterternary/_sum.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SumValidator(_plotly_utils.basevalidators.NumberValidator): +class SumValidator(_bv.NumberValidator): def __init__(self, plotly_name="sum", parent_name="scatterternary", **kwargs): - super(SumValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/_text.py b/plotly/validators/scatterternary/_text.py index b200aa0f78..e228e0966d 100644 --- a/plotly/validators/scatterternary/_text.py +++ b/plotly/validators/scatterternary/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="scatterternary", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterternary/_textfont.py b/plotly/validators/scatterternary/_textfont.py index 47b1e2d529..4fd1c3b2fb 100644 --- a/plotly/validators/scatterternary/_textfont.py +++ b/plotly/validators/scatterternary/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scatterternary", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_textposition.py b/plotly/validators/scatterternary/_textposition.py index 16248fe050..e11f449328 100644 --- a/plotly/validators/scatterternary/_textposition.py +++ b/plotly/validators/scatterternary/_textposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textposition", parent_name="scatterternary", **kwargs ): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatterternary/_textpositionsrc.py b/plotly/validators/scatterternary/_textpositionsrc.py index 3a7d174012..6fbe6f3695 100644 --- a/plotly/validators/scatterternary/_textpositionsrc.py +++ b/plotly/validators/scatterternary/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="scatterternary", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_textsrc.py b/plotly/validators/scatterternary/_textsrc.py index 99ec7ea4fa..7b3199728e 100644 --- a/plotly/validators/scatterternary/_textsrc.py +++ b/plotly/validators/scatterternary/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="scatterternary", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_texttemplate.py b/plotly/validators/scatterternary/_texttemplate.py index c7b88d3cc3..ccb2cc91db 100644 --- a/plotly/validators/scatterternary/_texttemplate.py +++ b/plotly/validators/scatterternary/_texttemplate.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__( self, plotly_name="texttemplate", parent_name="scatterternary", **kwargs ): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterternary/_texttemplatesrc.py b/plotly/validators/scatterternary/_texttemplatesrc.py index a43ec40b7d..f995026c45 100644 --- a/plotly/validators/scatterternary/_texttemplatesrc.py +++ b/plotly/validators/scatterternary/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="scatterternary", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_uid.py b/plotly/validators/scatterternary/_uid.py index 16601f34a2..018d9e974e 100644 --- a/plotly/validators/scatterternary/_uid.py +++ b/plotly/validators/scatterternary/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="scatterternary", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_uirevision.py b/plotly/validators/scatterternary/_uirevision.py index 4e3e938b82..269cbbeb1c 100644 --- a/plotly/validators/scatterternary/_uirevision.py +++ b/plotly/validators/scatterternary/_uirevision.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__( self, plotly_name="uirevision", parent_name="scatterternary", **kwargs ): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/_unselected.py b/plotly/validators/scatterternary/_unselected.py index 62f94795f2..fb8aa20d2f 100644 --- a/plotly/validators/scatterternary/_unselected.py +++ b/plotly/validators/scatterternary/_unselected.py @@ -1,25 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__( self, plotly_name="unselected", parent_name="scatterternary", **kwargs ): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.scatterternary.uns - elected.Marker` instance or dict with - compatible properties - textfont - :class:`plotly.graph_objects.scatterternary.uns - elected.Textfont` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/scatterternary/_visible.py b/plotly/validators/scatterternary/_visible.py index e85ebda34f..56b692e8d7 100644 --- a/plotly/validators/scatterternary/_visible.py +++ b/plotly/validators/scatterternary/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scatterternary", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/scatterternary/hoverlabel/__init__.py b/plotly/validators/scatterternary/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/scatterternary/hoverlabel/__init__.py +++ b/plotly/validators/scatterternary/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/scatterternary/hoverlabel/_align.py b/plotly/validators/scatterternary/hoverlabel/_align.py index 47c6698b66..93c9f9eea3 100644 --- a/plotly/validators/scatterternary/hoverlabel/_align.py +++ b/plotly/validators/scatterternary/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scatterternary.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/scatterternary/hoverlabel/_alignsrc.py b/plotly/validators/scatterternary/hoverlabel/_alignsrc.py index cda87a56db..6fc31e7f82 100644 --- a/plotly/validators/scatterternary/hoverlabel/_alignsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="scatterternary.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/_bgcolor.py b/plotly/validators/scatterternary/hoverlabel/_bgcolor.py index 73d0137177..9035b8b27a 100644 --- a/plotly/validators/scatterternary/hoverlabel/_bgcolor.py +++ b/plotly/validators/scatterternary/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatterternary.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py b/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py index c42c0241a6..29f87b32e4 100644 --- a/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/_bgcolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="scatterternary.hoverlabel", **kwargs, ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/_bordercolor.py b/plotly/validators/scatterternary/hoverlabel/_bordercolor.py index 24d8499ddf..9b51a45656 100644 --- a/plotly/validators/scatterternary/hoverlabel/_bordercolor.py +++ b/plotly/validators/scatterternary/hoverlabel/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterternary.hoverlabel", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py b/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py index 90944c386f..7656ea103f 100644 --- a/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="scatterternary.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/_font.py b/plotly/validators/scatterternary/hoverlabel/_font.py index 770e212efe..ce6b9a7086 100644 --- a/plotly/validators/scatterternary/hoverlabel/_font.py +++ b/plotly/validators/scatterternary/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterternary.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/hoverlabel/_namelength.py b/plotly/validators/scatterternary/hoverlabel/_namelength.py index aa8051ff47..5d5f903f18 100644 --- a/plotly/validators/scatterternary/hoverlabel/_namelength.py +++ b/plotly/validators/scatterternary/hoverlabel/_namelength.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="scatterternary.hoverlabel", **kwargs, ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py b/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py index 05c3cd07cb..3e1f734c32 100644 --- a/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/_namelengthsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="scatterternary.hoverlabel", **kwargs, ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/__init__.py b/plotly/validators/scatterternary/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/__init__.py +++ b/plotly/validators/scatterternary/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_color.py b/plotly/validators/scatterternary/hoverlabel/font/_color.py index d1f685030c..0ede584c84 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_color.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py b/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py index 5566b9348f..5d224e56e5 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_family.py b/plotly/validators/scatterternary/hoverlabel/font/_family.py index 7c25acf03a..7ccc8aa0bd 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_family.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py b/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py index 5ca85d9e44..db6304ad6e 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_lineposition.py b/plotly/validators/scatterternary/hoverlabel/font/_lineposition.py index 6c96076c99..944b97c59d 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_lineposition.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatterternary/hoverlabel/font/_linepositionsrc.py b/plotly/validators/scatterternary/hoverlabel/font/_linepositionsrc.py index 70fe67db64..07b30a2446 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_shadow.py b/plotly/validators/scatterternary/hoverlabel/font/_shadow.py index bc731a7f1b..50844dc19e 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_shadow.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/scatterternary/hoverlabel/font/_shadowsrc.py b/plotly/validators/scatterternary/hoverlabel/font/_shadowsrc.py index 11da081380..d0ef08b223 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_size.py b/plotly/validators/scatterternary/hoverlabel/font/_size.py index 3dde4e07dd..55af0692b8 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_size.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py b/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py index 1d0dbb0fe3..943f8d7f0d 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_sizesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_style.py b/plotly/validators/scatterternary/hoverlabel/font/_style.py index 95c40664a8..1452205553 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_style.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatterternary/hoverlabel/font/_stylesrc.py b/plotly/validators/scatterternary/hoverlabel/font/_stylesrc.py index a2dd240b31..66dbe79b13 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_stylesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_textcase.py b/plotly/validators/scatterternary/hoverlabel/font/_textcase.py index 2fe944b707..b68f07840a 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_textcase.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatterternary/hoverlabel/font/_textcasesrc.py b/plotly/validators/scatterternary/hoverlabel/font/_textcasesrc.py index 0c60a0efec..6a7818fdcd 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_variant.py b/plotly/validators/scatterternary/hoverlabel/font/_variant.py index cae9918914..2203b5fb9c 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_variant.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/scatterternary/hoverlabel/font/_variantsrc.py b/plotly/validators/scatterternary/hoverlabel/font/_variantsrc.py index 0f31e19087..4ff2015928 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/hoverlabel/font/_weight.py b/plotly/validators/scatterternary/hoverlabel/font/_weight.py index d2c319ecf1..abed8b9068 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_weight.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatterternary/hoverlabel/font/_weightsrc.py b/plotly/validators/scatterternary/hoverlabel/font/_weightsrc.py index 1852068705..aa4f33ec23 100644 --- a/plotly/validators/scatterternary/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/scatterternary/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatterternary.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/legendgrouptitle/__init__.py b/plotly/validators/scatterternary/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/__init__.py +++ b/plotly/validators/scatterternary/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/scatterternary/legendgrouptitle/_font.py b/plotly/validators/scatterternary/legendgrouptitle/_font.py index ca7d2c203b..2892fb7e64 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/_font.py +++ b/plotly/validators/scatterternary/legendgrouptitle/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterternary.legendgrouptitle", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/legendgrouptitle/_text.py b/plotly/validators/scatterternary/legendgrouptitle/_text.py index 9899db85ba..27e4d945ee 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/_text.py +++ b/plotly/validators/scatterternary/legendgrouptitle/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatterternary.legendgrouptitle", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/__init__.py b/plotly/validators/scatterternary/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/__init__.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_color.py b/plotly/validators/scatterternary/legendgrouptitle/font/_color.py index 0b0dc5f82d..17ccd33bc5 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_color.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_family.py b/plotly/validators/scatterternary/legendgrouptitle/font/_family.py index 944fc53561..04109b638e 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_family.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_lineposition.py b/plotly/validators/scatterternary/legendgrouptitle/font/_lineposition.py index 8037a2cfc9..270b8f4e4e 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_shadow.py b/plotly/validators/scatterternary/legendgrouptitle/font/_shadow.py index 82e607cc1a..6c83bcf275 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_size.py b/plotly/validators/scatterternary/legendgrouptitle/font/_size.py index 9d224029fd..fd85908fe3 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_size.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_style.py b/plotly/validators/scatterternary/legendgrouptitle/font/_style.py index e08f8e552e..a7fba21462 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_style.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_textcase.py b/plotly/validators/scatterternary/legendgrouptitle/font/_textcase.py index 47e37b4b6d..18336952f0 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_variant.py b/plotly/validators/scatterternary/legendgrouptitle/font/_variant.py index 5b4004dcd5..ed29aa1cd0 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_variant.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterternary/legendgrouptitle/font/_weight.py b/plotly/validators/scatterternary/legendgrouptitle/font/_weight.py index e3dbdcaef3..746cd9de5d 100644 --- a/plotly/validators/scatterternary/legendgrouptitle/font/_weight.py +++ b/plotly/validators/scatterternary/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterternary.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterternary/line/__init__.py b/plotly/validators/scatterternary/line/__init__.py index 7045562597..d9c0ff9500 100644 --- a/plotly/validators/scatterternary/line/__init__.py +++ b/plotly/validators/scatterternary/line/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._smoothing import SmoothingValidator - from ._shape import ShapeValidator - from ._dash import DashValidator - from ._color import ColorValidator - from ._backoffsrc import BackoffsrcValidator - from ._backoff import BackoffValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._smoothing.SmoothingValidator", - "._shape.ShapeValidator", - "._dash.DashValidator", - "._color.ColorValidator", - "._backoffsrc.BackoffsrcValidator", - "._backoff.BackoffValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._smoothing.SmoothingValidator", + "._shape.ShapeValidator", + "._dash.DashValidator", + "._color.ColorValidator", + "._backoffsrc.BackoffsrcValidator", + "._backoff.BackoffValidator", + ], +) diff --git a/plotly/validators/scatterternary/line/_backoff.py b/plotly/validators/scatterternary/line/_backoff.py index d5b43ba156..d2e5edb3cc 100644 --- a/plotly/validators/scatterternary/line/_backoff.py +++ b/plotly/validators/scatterternary/line/_backoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffValidator(_plotly_utils.basevalidators.NumberValidator): +class BackoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="backoff", parent_name="scatterternary.line", **kwargs ): - super(BackoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/line/_backoffsrc.py b/plotly/validators/scatterternary/line/_backoffsrc.py index 6ddc4cd88a..3f59d394d0 100644 --- a/plotly/validators/scatterternary/line/_backoffsrc.py +++ b/plotly/validators/scatterternary/line/_backoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BackoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BackoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="backoffsrc", parent_name="scatterternary.line", **kwargs ): - super(BackoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/line/_color.py b/plotly/validators/scatterternary/line/_color.py index fe24f5e092..df1e3f54ec 100644 --- a/plotly/validators/scatterternary/line/_color.py +++ b/plotly/validators/scatterternary/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/line/_dash.py b/plotly/validators/scatterternary/line/_dash.py index 26e9f6a5fc..bd42556a83 100644 --- a/plotly/validators/scatterternary/line/_dash.py +++ b/plotly/validators/scatterternary/line/_dash.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__(self, plotly_name="dash", parent_name="scatterternary.line", **kwargs): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/scatterternary/line/_shape.py b/plotly/validators/scatterternary/line/_shape.py index 6597c45345..aeba4b1ce0 100644 --- a/plotly/validators/scatterternary/line/_shape.py +++ b/plotly/validators/scatterternary/line/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="scatterternary.line", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["linear", "spline"]), **kwargs, diff --git a/plotly/validators/scatterternary/line/_smoothing.py b/plotly/validators/scatterternary/line/_smoothing.py index 6360776842..32e206f65d 100644 --- a/plotly/validators/scatterternary/line/_smoothing.py +++ b/plotly/validators/scatterternary/line/_smoothing.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SmoothingValidator(_plotly_utils.basevalidators.NumberValidator): +class SmoothingValidator(_bv.NumberValidator): def __init__( self, plotly_name="smoothing", parent_name="scatterternary.line", **kwargs ): - super(SmoothingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1.3), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/line/_width.py b/plotly/validators/scatterternary/line/_width.py index a76cb30509..1dae115bc2 100644 --- a/plotly/validators/scatterternary/line/_width.py +++ b/plotly/validators/scatterternary/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatterternary.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/__init__.py b/plotly/validators/scatterternary/marker/__init__.py index 8434e73e3f..fea9868a7b 100644 --- a/plotly/validators/scatterternary/marker/__init__.py +++ b/plotly/validators/scatterternary/marker/__init__.py @@ -1,71 +1,38 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._standoffsrc import StandoffsrcValidator - from ._standoff import StandoffValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._maxdisplayed import MaxdisplayedValidator - from ._line import LineValidator - from ._gradient import GradientValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angleref import AnglerefValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._standoffsrc.StandoffsrcValidator", - "._standoff.StandoffValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._maxdisplayed.MaxdisplayedValidator", - "._line.LineValidator", - "._gradient.GradientValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angleref.AnglerefValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._standoffsrc.StandoffsrcValidator", + "._standoff.StandoffValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._line.LineValidator", + "._gradient.GradientValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angleref.AnglerefValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/_angle.py b/plotly/validators/scatterternary/marker/_angle.py index 6f2a84f2b7..ec163084f7 100644 --- a/plotly/validators/scatterternary/marker/_angle.py +++ b/plotly/validators/scatterternary/marker/_angle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__( self, plotly_name="angle", parent_name="scatterternary.marker", **kwargs ): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_angleref.py b/plotly/validators/scatterternary/marker/_angleref.py index bb44902ecc..f3933e957f 100644 --- a/plotly/validators/scatterternary/marker/_angleref.py +++ b/plotly/validators/scatterternary/marker/_angleref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglerefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AnglerefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="angleref", parent_name="scatterternary.marker", **kwargs ): - super(AnglerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["previous", "up"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_anglesrc.py b/plotly/validators/scatterternary/marker/_anglesrc.py index c4d56ab5af..24ebb097cc 100644 --- a/plotly/validators/scatterternary/marker/_anglesrc.py +++ b/plotly/validators/scatterternary/marker/_anglesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="anglesrc", parent_name="scatterternary.marker", **kwargs ): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_autocolorscale.py b/plotly/validators/scatterternary/marker/_autocolorscale.py index 7b5e495279..9bbb5fd30a 100644 --- a/plotly/validators/scatterternary/marker/_autocolorscale.py +++ b/plotly/validators/scatterternary/marker/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatterternary.marker", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_cauto.py b/plotly/validators/scatterternary/marker/_cauto.py index a66d68552f..29f9966adc 100644 --- a/plotly/validators/scatterternary/marker/_cauto.py +++ b/plotly/validators/scatterternary/marker/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterternary.marker", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_cmax.py b/plotly/validators/scatterternary/marker/_cmax.py index b48fb89947..c99d997ec8 100644 --- a/plotly/validators/scatterternary/marker/_cmax.py +++ b/plotly/validators/scatterternary/marker/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatterternary.marker", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_cmid.py b/plotly/validators/scatterternary/marker/_cmid.py index eb143f63a8..7354998812 100644 --- a/plotly/validators/scatterternary/marker/_cmid.py +++ b/plotly/validators/scatterternary/marker/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterternary.marker", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_cmin.py b/plotly/validators/scatterternary/marker/_cmin.py index 779be26fd3..c5b008b646 100644 --- a/plotly/validators/scatterternary/marker/_cmin.py +++ b/plotly/validators/scatterternary/marker/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scatterternary.marker", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_color.py b/plotly/validators/scatterternary/marker/_color.py index 7a2eb2063d..1509b56560 100644 --- a/plotly/validators/scatterternary/marker/_color.py +++ b/plotly/validators/scatterternary/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatterternary/marker/_coloraxis.py b/plotly/validators/scatterternary/marker/_coloraxis.py index 4256b63109..2a1c8d3821 100644 --- a/plotly/validators/scatterternary/marker/_coloraxis.py +++ b/plotly/validators/scatterternary/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterternary.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatterternary/marker/_colorbar.py b/plotly/validators/scatterternary/marker/_colorbar.py index ca8259e2ac..b46cbb9d2a 100644 --- a/plotly/validators/scatterternary/marker/_colorbar.py +++ b/plotly/validators/scatterternary/marker/_colorbar.py @@ -1,281 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__( self, plotly_name="colorbar", parent_name="scatterternary.marker", **kwargs ): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.scatter - ternary.marker.colorbar.Tickformatstop` - instances or dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.scatterternary.marker.colorbar.tickformatstop - defaults), sets the default property values to - use for elements of - scatterternary.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.scatterternary.mar - ker.colorbar.Title` instance or dict with - compatible properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_colorscale.py b/plotly/validators/scatterternary/marker/_colorscale.py index 41df3b9842..71c0e644d5 100644 --- a/plotly/validators/scatterternary/marker/_colorscale.py +++ b/plotly/validators/scatterternary/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatterternary.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_colorsrc.py b/plotly/validators/scatterternary/marker/_colorsrc.py index 0b98a3554d..e957b874dc 100644 --- a/plotly/validators/scatterternary/marker/_colorsrc.py +++ b/plotly/validators/scatterternary/marker/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterternary.marker", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_gradient.py b/plotly/validators/scatterternary/marker/_gradient.py index 9cdfc65250..ba7f0690b1 100644 --- a/plotly/validators/scatterternary/marker/_gradient.py +++ b/plotly/validators/scatterternary/marker/_gradient.py @@ -1,30 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class GradientValidator(_plotly_utils.basevalidators.CompoundValidator): +class GradientValidator(_bv.CompoundValidator): def __init__( self, plotly_name="gradient", parent_name="scatterternary.marker", **kwargs ): - super(GradientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Gradient"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the final color of the gradient fill: the - center color for radial, the right for - horizontal, or the bottom for vertical. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - type - Sets the type of gradient used to fill the - markers - typesrc - Sets the source reference on Chart Studio Cloud - for `type`. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_line.py b/plotly/validators/scatterternary/marker/_line.py index dbe66dd21a..7975f11a52 100644 --- a/plotly/validators/scatterternary/marker/_line.py +++ b/plotly/validators/scatterternary/marker/_line.py @@ -1,106 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="scatterternary.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_maxdisplayed.py b/plotly/validators/scatterternary/marker/_maxdisplayed.py index 9ea5d497f1..9ec585d953 100644 --- a/plotly/validators/scatterternary/marker/_maxdisplayed.py +++ b/plotly/validators/scatterternary/marker/_maxdisplayed.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdisplayedValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxdisplayedValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxdisplayed", parent_name="scatterternary.marker", **kwargs ): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_opacity.py b/plotly/validators/scatterternary/marker/_opacity.py index dca4a9a616..bfb4091847 100644 --- a/plotly/validators/scatterternary/marker/_opacity.py +++ b/plotly/validators/scatterternary/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterternary.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/scatterternary/marker/_opacitysrc.py b/plotly/validators/scatterternary/marker/_opacitysrc.py index 6d5545776b..c90bae97b8 100644 --- a/plotly/validators/scatterternary/marker/_opacitysrc.py +++ b/plotly/validators/scatterternary/marker/_opacitysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="opacitysrc", parent_name="scatterternary.marker", **kwargs ): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_reversescale.py b/plotly/validators/scatterternary/marker/_reversescale.py index 41a94e2b11..76d8ae945f 100644 --- a/plotly/validators/scatterternary/marker/_reversescale.py +++ b/plotly/validators/scatterternary/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterternary.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_showscale.py b/plotly/validators/scatterternary/marker/_showscale.py index 746368c459..5a7252e834 100644 --- a/plotly/validators/scatterternary/marker/_showscale.py +++ b/plotly/validators/scatterternary/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="scatterternary.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_size.py b/plotly/validators/scatterternary/marker/_size.py index 1a49faffdd..28e7ad505f 100644 --- a/plotly/validators/scatterternary/marker/_size.py +++ b/plotly/validators/scatterternary/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/marker/_sizemin.py b/plotly/validators/scatterternary/marker/_sizemin.py index e81d4795e5..4b68d069ee 100644 --- a/plotly/validators/scatterternary/marker/_sizemin.py +++ b/plotly/validators/scatterternary/marker/_sizemin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizemin", parent_name="scatterternary.marker", **kwargs ): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_sizemode.py b/plotly/validators/scatterternary/marker/_sizemode.py index 1c7f82297e..77c56211d6 100644 --- a/plotly/validators/scatterternary/marker/_sizemode.py +++ b/plotly/validators/scatterternary/marker/_sizemode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="sizemode", parent_name="scatterternary.marker", **kwargs ): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/_sizeref.py b/plotly/validators/scatterternary/marker/_sizeref.py index a6247e7157..aa0e4d2407 100644 --- a/plotly/validators/scatterternary/marker/_sizeref.py +++ b/plotly/validators/scatterternary/marker/_sizeref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__( self, plotly_name="sizeref", parent_name="scatterternary.marker", **kwargs ): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_sizesrc.py b/plotly/validators/scatterternary/marker/_sizesrc.py index f2b4591c92..ad56c39786 100644 --- a/plotly/validators/scatterternary/marker/_sizesrc.py +++ b/plotly/validators/scatterternary/marker/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterternary.marker", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_standoff.py b/plotly/validators/scatterternary/marker/_standoff.py index 3c8f448dcf..ee82b60740 100644 --- a/plotly/validators/scatterternary/marker/_standoff.py +++ b/plotly/validators/scatterternary/marker/_standoff.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffValidator(_plotly_utils.basevalidators.NumberValidator): +class StandoffValidator(_bv.NumberValidator): def __init__( self, plotly_name="standoff", parent_name="scatterternary.marker", **kwargs ): - super(StandoffValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/marker/_standoffsrc.py b/plotly/validators/scatterternary/marker/_standoffsrc.py index 9bb231531e..ad7d26414b 100644 --- a/plotly/validators/scatterternary/marker/_standoffsrc.py +++ b/plotly/validators/scatterternary/marker/_standoffsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StandoffsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StandoffsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="standoffsrc", parent_name="scatterternary.marker", **kwargs ): - super(StandoffsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/_symbol.py b/plotly/validators/scatterternary/marker/_symbol.py index 2760df6fc3..794f255d10 100644 --- a/plotly/validators/scatterternary/marker/_symbol.py +++ b/plotly/validators/scatterternary/marker/_symbol.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="symbol", parent_name="scatterternary.marker", **kwargs ): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( diff --git a/plotly/validators/scatterternary/marker/_symbolsrc.py b/plotly/validators/scatterternary/marker/_symbolsrc.py index 5961d93f06..cddcb25143 100644 --- a/plotly/validators/scatterternary/marker/_symbolsrc.py +++ b/plotly/validators/scatterternary/marker/_symbolsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="symbolsrc", parent_name="scatterternary.marker", **kwargs ): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/__init__.py b/plotly/validators/scatterternary/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/scatterternary/marker/colorbar/__init__.py +++ b/plotly/validators/scatterternary/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py b/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py index a5f1bcde73..9328898011 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py +++ b/plotly/validators/scatterternary/marker/colorbar/_bgcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py b/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py index 68bde61b93..aa2e63f2a0 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py +++ b/plotly/validators/scatterternary/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py b/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py index a763e29ae5..c416be94b5 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py +++ b/plotly/validators/scatterternary/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_dtick.py b/plotly/validators/scatterternary/marker/colorbar/_dtick.py index dafac71dd0..8dfbec141a 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_dtick.py +++ b/plotly/validators/scatterternary/marker/colorbar/_dtick.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py b/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py index 8d2587bf4e..60511ea98a 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py +++ b/plotly/validators/scatterternary/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_labelalias.py b/plotly/validators/scatterternary/marker/colorbar/_labelalias.py index 9f68b13f79..3f6029edc4 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_labelalias.py +++ b/plotly/validators/scatterternary/marker/colorbar/_labelalias.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_len.py b/plotly/validators/scatterternary/marker/colorbar/_len.py index 4154b57dfa..e496bafef8 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_len.py +++ b/plotly/validators/scatterternary/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_lenmode.py b/plotly/validators/scatterternary/marker/colorbar/_lenmode.py index e533009dfe..74491267fa 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_lenmode.py +++ b/plotly/validators/scatterternary/marker/colorbar/_lenmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_minexponent.py b/plotly/validators/scatterternary/marker/colorbar/_minexponent.py index fad0d9ba68..bf219b7521 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_minexponent.py +++ b/plotly/validators/scatterternary/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_nticks.py b/plotly/validators/scatterternary/marker/colorbar/_nticks.py index 728e6cf5fc..aec9a450ba 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_nticks.py +++ b/plotly/validators/scatterternary/marker/colorbar/_nticks.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_orientation.py b/plotly/validators/scatterternary/marker/colorbar/_orientation.py index 286b21193a..0fc7f1cecd 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_orientation.py +++ b/plotly/validators/scatterternary/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py b/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py index d9bc481ab8..ed5d34456c 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/scatterternary/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py b/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py index b9bbeb4364..8a772246df 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/scatterternary/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py b/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py index add26afaa0..670cd3b2a0 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py +++ b/plotly/validators/scatterternary/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_showexponent.py b/plotly/validators/scatterternary/marker/colorbar/_showexponent.py index a5e14a4535..7c27214f0f 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_showexponent.py +++ b/plotly/validators/scatterternary/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py b/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py index 7a4c0c2d57..889c2a0916 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py +++ b/plotly/validators/scatterternary/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py b/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py index 81fdbafe74..d77df36c66 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/scatterternary/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py b/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py index f7a0a8e9f0..ff501190aa 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/scatterternary/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_thickness.py b/plotly/validators/scatterternary/marker/colorbar/_thickness.py index f561a2d9f0..2735ea4362 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_thickness.py +++ b/plotly/validators/scatterternary/marker/colorbar/_thickness.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py b/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py index 47ebc27f78..d5d5b41233 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/scatterternary/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_tick0.py b/plotly/validators/scatterternary/marker/colorbar/_tick0.py index 3a3fcbad34..f57366eaa8 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tick0.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tick0.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickangle.py b/plotly/validators/scatterternary/marker/colorbar/_tickangle.py index 791e562c66..430fb827c8 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickangle.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickangle.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py b/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py index d29d47c772..57e3eb4de9 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickcolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickfont.py b/plotly/validators/scatterternary/marker/colorbar/_tickfont.py index 689519f931..15b14f783a 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickfont.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickfont.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickformat.py b/plotly/validators/scatterternary/marker/colorbar/_tickformat.py index 9ea655ae50..ca6bac95c2 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickformat.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py index d4b11fcdae..4e1e9b4e5f 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py b/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py index 72c737165e..6ddac3bb06 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/scatterternary/marker/colorbar/_ticklabeloverflow.py index 6669e91a36..bcc0efe42d 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticklabelposition.py b/plotly/validators/scatterternary/marker/colorbar/_ticklabelposition.py index 4d39a438ed..78a6efd399 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticklabelstep.py b/plotly/validators/scatterternary/marker/colorbar/_ticklabelstep.py index b802d1e2b1..7d02bd6293 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticklen.py b/plotly/validators/scatterternary/marker/colorbar/_ticklen.py index f841431665..10ce945e51 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticklen.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticklen.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickmode.py b/plotly/validators/scatterternary/marker/colorbar/_tickmode.py index 8e75129b7b..64550d68a0 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickmode.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py b/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py index ace5153659..a57594b1e7 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticks.py b/plotly/validators/scatterternary/marker/colorbar/_ticks.py index aa7022d228..77c33c4526 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticks.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticks.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py b/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py index bd0fb9078b..7d75f6c7bd 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticktext.py b/plotly/validators/scatterternary/marker/colorbar/_ticktext.py index e2660460ef..b4cb9828dd 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticktext.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticktext.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py b/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py index b4dc596547..6c2a94e3b3 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickvals.py b/plotly/validators/scatterternary/marker/colorbar/_tickvals.py index d031747d9a..1d8bb927bb 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickvals.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickvals.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py b/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py index f8ca43af11..4b25afbbd8 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py b/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py index 7bd99e66ec..d040e2d7fe 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py +++ b/plotly/validators/scatterternary/marker/colorbar/_tickwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_title.py b/plotly/validators/scatterternary/marker/colorbar/_title.py index e544abbc31..1e47c9cffe 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_title.py +++ b/plotly/validators/scatterternary/marker/colorbar/_title.py @@ -1,29 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_x.py b/plotly/validators/scatterternary/marker/colorbar/_x.py index fdb41ac315..328bde7f92 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_x.py +++ b/plotly/validators/scatterternary/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_xanchor.py b/plotly/validators/scatterternary/marker/colorbar/_xanchor.py index 9dd85a86c4..a19556093e 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_xanchor.py +++ b/plotly/validators/scatterternary/marker/colorbar/_xanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_xpad.py b/plotly/validators/scatterternary/marker/colorbar/_xpad.py index f1e619c8ac..f1fc678e10 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_xpad.py +++ b/plotly/validators/scatterternary/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_xref.py b/plotly/validators/scatterternary/marker/colorbar/_xref.py index 54adb56244..31cb3adbb7 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_xref.py +++ b/plotly/validators/scatterternary/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_y.py b/plotly/validators/scatterternary/marker/colorbar/_y.py index c8316d54f4..c11aaabe8f 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_y.py +++ b/plotly/validators/scatterternary/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/_yanchor.py b/plotly/validators/scatterternary/marker/colorbar/_yanchor.py index b66ded0811..652e6590d1 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_yanchor.py +++ b/plotly/validators/scatterternary/marker/colorbar/_yanchor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="scatterternary.marker.colorbar", **kwargs, ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_ypad.py b/plotly/validators/scatterternary/marker/colorbar/_ypad.py index 43026c0e12..e646c0b378 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_ypad.py +++ b/plotly/validators/scatterternary/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/_yref.py b/plotly/validators/scatterternary/marker/colorbar/_yref.py index 924845e30e..9457b7397f 100644 --- a/plotly/validators/scatterternary/marker/colorbar/_yref.py +++ b/plotly/validators/scatterternary/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="scatterternary.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py index ddf66061f1..da2971b136 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py index 02b7c44366..521e6b29b5 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_lineposition.py index b22d08713e..1dfa2ce210 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_shadow.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_shadow.py index 69fb503659..5877e8c51b 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py index 0346edfca6..3e6f63d419 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_style.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_style.py index a1ec53a0b0..937b76c3b0 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_textcase.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_textcase.py index 40529e80a6..76efdf4a22 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_variant.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_variant.py index ed4a088814..f5014b78cb 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterternary/marker/colorbar/tickfont/_weight.py b/plotly/validators/scatterternary/marker/colorbar/tickfont/_weight.py index a4bd6dee3b..b95e041701 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterternary.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py index 7efc9671de..29826cd02e 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="scatterternary.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py index 6a9232ca72..5e508c9b47 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="scatterternary.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py index 12ab2efb8b..b9c3457fee 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="scatterternary.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py index ca978ee694..0018fabcc0 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="scatterternary.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py index 1742dc5826..7ab8d4f75e 100644 --- a/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/scatterternary/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="scatterternary.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/title/__init__.py b/plotly/validators/scatterternary/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/__init__.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/scatterternary/marker/colorbar/title/_font.py b/plotly/validators/scatterternary/marker/colorbar/title/_font.py index f609564852..963803e39a 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/_font.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/_font.py @@ -1,63 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatterternary.marker.colorbar.title", **kwargs, ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/title/_side.py b/plotly/validators/scatterternary/marker/colorbar/title/_side.py index 3d6674215a..a20699a311 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/_side.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/_side.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="scatterternary.marker.colorbar.title", **kwargs, ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/title/_text.py b/plotly/validators/scatterternary/marker/colorbar/title/_text.py index a8deee2f04..faaf499077 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/_text.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/_text.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="scatterternary.marker.colorbar.title", **kwargs, ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py b/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py index 23db67cc0f..1759aed924 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py index 5f24924972..408ed7a923 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_lineposition.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_lineposition.py index a3544b10f4..245911a26b 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_shadow.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_shadow.py index c06abe2c91..425b622677 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py index 1a8c84ff3d..8a38b1fc61 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_style.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_style.py index 4a9923b997..9b6df373b9 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_style.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_textcase.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_textcase.py index a545b1cdd0..60dd6f61cd 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_variant.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_variant.py index 3d444fac79..0f9e66a6f1 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/scatterternary/marker/colorbar/title/font/_weight.py b/plotly/validators/scatterternary/marker/colorbar/title/font/_weight.py index 4cc8546703..f49d07f88f 100644 --- a/plotly/validators/scatterternary/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/scatterternary/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterternary.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/scatterternary/marker/gradient/__init__.py b/plotly/validators/scatterternary/marker/gradient/__init__.py index 624a280ea4..f5373e7822 100644 --- a/plotly/validators/scatterternary/marker/gradient/__init__.py +++ b/plotly/validators/scatterternary/marker/gradient/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._typesrc import TypesrcValidator - from ._type import TypeValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._typesrc.TypesrcValidator", - "._type.TypeValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._typesrc.TypesrcValidator", + "._type.TypeValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/gradient/_color.py b/plotly/validators/scatterternary/marker/gradient/_color.py index c6545dbf0e..5fa52511a1 100644 --- a/plotly/validators/scatterternary/marker/gradient/_color.py +++ b/plotly/validators/scatterternary/marker/gradient/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.marker.gradient", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterternary/marker/gradient/_colorsrc.py b/plotly/validators/scatterternary/marker/gradient/_colorsrc.py index 4d414b5318..4a69cb31c3 100644 --- a/plotly/validators/scatterternary/marker/gradient/_colorsrc.py +++ b/plotly/validators/scatterternary/marker/gradient/_colorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterternary.marker.gradient", **kwargs, ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/gradient/_type.py b/plotly/validators/scatterternary/marker/gradient/_type.py index c3ff683911..c852c50231 100644 --- a/plotly/validators/scatterternary/marker/gradient/_type.py +++ b/plotly/validators/scatterternary/marker/gradient/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="scatterternary.marker.gradient", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["radial", "horizontal", "vertical", "none"]), diff --git a/plotly/validators/scatterternary/marker/gradient/_typesrc.py b/plotly/validators/scatterternary/marker/gradient/_typesrc.py index 0ff73909d2..e0c852588a 100644 --- a/plotly/validators/scatterternary/marker/gradient/_typesrc.py +++ b/plotly/validators/scatterternary/marker/gradient/_typesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TypesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="typesrc", parent_name="scatterternary.marker.gradient", **kwargs, ): - super(TypesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/line/__init__.py b/plotly/validators/scatterternary/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/scatterternary/marker/line/__init__.py +++ b/plotly/validators/scatterternary/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/scatterternary/marker/line/_autocolorscale.py b/plotly/validators/scatterternary/marker/line/_autocolorscale.py index 3fdd491ba2..92af4ad91b 100644 --- a/plotly/validators/scatterternary/marker/line/_autocolorscale.py +++ b/plotly/validators/scatterternary/marker/line/_autocolorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="scatterternary.marker.line", **kwargs, ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/line/_cauto.py b/plotly/validators/scatterternary/marker/line/_cauto.py index bc0cc209d3..05bfde3f5b 100644 --- a/plotly/validators/scatterternary/marker/line/_cauto.py +++ b/plotly/validators/scatterternary/marker/line/_cauto.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__( self, plotly_name="cauto", parent_name="scatterternary.marker.line", **kwargs ): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/line/_cmax.py b/plotly/validators/scatterternary/marker/line/_cmax.py index af3ffedfed..02e4f6da31 100644 --- a/plotly/validators/scatterternary/marker/line/_cmax.py +++ b/plotly/validators/scatterternary/marker/line/_cmax.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmax", parent_name="scatterternary.marker.line", **kwargs ): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/line/_cmid.py b/plotly/validators/scatterternary/marker/line/_cmid.py index 5a7ff308b2..454562fa19 100644 --- a/plotly/validators/scatterternary/marker/line/_cmid.py +++ b/plotly/validators/scatterternary/marker/line/_cmid.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmid", parent_name="scatterternary.marker.line", **kwargs ): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/line/_cmin.py b/plotly/validators/scatterternary/marker/line/_cmin.py index 1dcd158cfc..a7f71d0722 100644 --- a/plotly/validators/scatterternary/marker/line/_cmin.py +++ b/plotly/validators/scatterternary/marker/line/_cmin.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__( self, plotly_name="cmin", parent_name="scatterternary.marker.line", **kwargs ): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/line/_color.py b/plotly/validators/scatterternary/marker/line/_color.py index b6d2040af5..ebf5488bfd 100644 --- a/plotly/validators/scatterternary/marker/line/_color.py +++ b/plotly/validators/scatterternary/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/scatterternary/marker/line/_coloraxis.py b/plotly/validators/scatterternary/marker/line/_coloraxis.py index daca94f888..673e458abc 100644 --- a/plotly/validators/scatterternary/marker/line/_coloraxis.py +++ b/plotly/validators/scatterternary/marker/line/_coloraxis.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="scatterternary.marker.line", **kwargs, ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/scatterternary/marker/line/_colorscale.py b/plotly/validators/scatterternary/marker/line/_colorscale.py index 3c68c9aa42..22838c94e2 100644 --- a/plotly/validators/scatterternary/marker/line/_colorscale.py +++ b/plotly/validators/scatterternary/marker/line/_colorscale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="scatterternary.marker.line", **kwargs, ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/scatterternary/marker/line/_colorsrc.py b/plotly/validators/scatterternary/marker/line/_colorsrc.py index 751ee4036f..5f72c29d2d 100644 --- a/plotly/validators/scatterternary/marker/line/_colorsrc.py +++ b/plotly/validators/scatterternary/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterternary.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/line/_reversescale.py b/plotly/validators/scatterternary/marker/line/_reversescale.py index bb8e425555..0f86704fb8 100644 --- a/plotly/validators/scatterternary/marker/line/_reversescale.py +++ b/plotly/validators/scatterternary/marker/line/_reversescale.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="scatterternary.marker.line", **kwargs, ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/scatterternary/marker/line/_width.py b/plotly/validators/scatterternary/marker/line/_width.py index c8107b3c4b..7a1add54ce 100644 --- a/plotly/validators/scatterternary/marker/line/_width.py +++ b/plotly/validators/scatterternary/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="scatterternary.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/marker/line/_widthsrc.py b/plotly/validators/scatterternary/marker/line/_widthsrc.py index b20747d128..aecedaa342 100644 --- a/plotly/validators/scatterternary/marker/line/_widthsrc.py +++ b/plotly/validators/scatterternary/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="scatterternary.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/selected/__init__.py b/plotly/validators/scatterternary/selected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatterternary/selected/__init__.py +++ b/plotly/validators/scatterternary/selected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatterternary/selected/_marker.py b/plotly/validators/scatterternary/selected/_marker.py index 3aacec97ad..d57bbff22e 100644 --- a/plotly/validators/scatterternary/selected/_marker.py +++ b/plotly/validators/scatterternary/selected/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatterternary.selected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/selected/_textfont.py b/plotly/validators/scatterternary/selected/_textfont.py index de5d9f18cc..0f89255ed9 100644 --- a/plotly/validators/scatterternary/selected/_textfont.py +++ b/plotly/validators/scatterternary/selected/_textfont.py @@ -1,19 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatterternary.selected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of selected points. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/selected/marker/__init__.py b/plotly/validators/scatterternary/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatterternary/selected/marker/__init__.py +++ b/plotly/validators/scatterternary/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterternary/selected/marker/_color.py b/plotly/validators/scatterternary/selected/marker/_color.py index 8cab348619..8fa7383c63 100644 --- a/plotly/validators/scatterternary/selected/marker/_color.py +++ b/plotly/validators/scatterternary/selected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.selected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/selected/marker/_opacity.py b/plotly/validators/scatterternary/selected/marker/_opacity.py index 894dba7849..a64b285e01 100644 --- a/plotly/validators/scatterternary/selected/marker/_opacity.py +++ b/plotly/validators/scatterternary/selected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterternary.selected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/selected/marker/_size.py b/plotly/validators/scatterternary/selected/marker/_size.py index 555f486eeb..6e85bfe3d3 100644 --- a/plotly/validators/scatterternary/selected/marker/_size.py +++ b/plotly/validators/scatterternary/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/selected/textfont/__init__.py b/plotly/validators/scatterternary/selected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatterternary/selected/textfont/__init__.py +++ b/plotly/validators/scatterternary/selected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatterternary/selected/textfont/_color.py b/plotly/validators/scatterternary/selected/textfont/_color.py index 1901554996..b984394709 100644 --- a/plotly/validators/scatterternary/selected/textfont/_color.py +++ b/plotly/validators/scatterternary/selected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.selected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/stream/__init__.py b/plotly/validators/scatterternary/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/scatterternary/stream/__init__.py +++ b/plotly/validators/scatterternary/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/scatterternary/stream/_maxpoints.py b/plotly/validators/scatterternary/stream/_maxpoints.py index 8a849f94a1..44bc6b8bc0 100644 --- a/plotly/validators/scatterternary/stream/_maxpoints.py +++ b/plotly/validators/scatterternary/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="scatterternary.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/stream/_token.py b/plotly/validators/scatterternary/stream/_token.py index 82f5aaf4a2..6992d0f2bb 100644 --- a/plotly/validators/scatterternary/stream/_token.py +++ b/plotly/validators/scatterternary/stream/_token.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__( self, plotly_name="token", parent_name="scatterternary.stream", **kwargs ): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/scatterternary/textfont/__init__.py b/plotly/validators/scatterternary/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/scatterternary/textfont/__init__.py +++ b/plotly/validators/scatterternary/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/scatterternary/textfont/_color.py b/plotly/validators/scatterternary/textfont/_color.py index 90febec549..609a01968c 100644 --- a/plotly/validators/scatterternary/textfont/_color.py +++ b/plotly/validators/scatterternary/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/scatterternary/textfont/_colorsrc.py b/plotly/validators/scatterternary/textfont/_colorsrc.py index 9d46b7ad0e..865a354df4 100644 --- a/plotly/validators/scatterternary/textfont/_colorsrc.py +++ b/plotly/validators/scatterternary/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="scatterternary.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_family.py b/plotly/validators/scatterternary/textfont/_family.py index b182ea7d8e..1d61cc965a 100644 --- a/plotly/validators/scatterternary/textfont/_family.py +++ b/plotly/validators/scatterternary/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="scatterternary.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/scatterternary/textfont/_familysrc.py b/plotly/validators/scatterternary/textfont/_familysrc.py index 94f6e83fd6..6b14e8850c 100644 --- a/plotly/validators/scatterternary/textfont/_familysrc.py +++ b/plotly/validators/scatterternary/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="scatterternary.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_lineposition.py b/plotly/validators/scatterternary/textfont/_lineposition.py index 992be4ebc4..d8832472b2 100644 --- a/plotly/validators/scatterternary/textfont/_lineposition.py +++ b/plotly/validators/scatterternary/textfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="scatterternary.textfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/scatterternary/textfont/_linepositionsrc.py b/plotly/validators/scatterternary/textfont/_linepositionsrc.py index a6041d57e0..86a6428767 100644 --- a/plotly/validators/scatterternary/textfont/_linepositionsrc.py +++ b/plotly/validators/scatterternary/textfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="scatterternary.textfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_shadow.py b/plotly/validators/scatterternary/textfont/_shadow.py index 4d31561d5f..4e198e3f6c 100644 --- a/plotly/validators/scatterternary/textfont/_shadow.py +++ b/plotly/validators/scatterternary/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="scatterternary.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/scatterternary/textfont/_shadowsrc.py b/plotly/validators/scatterternary/textfont/_shadowsrc.py index 763a155051..a5682e8d58 100644 --- a/plotly/validators/scatterternary/textfont/_shadowsrc.py +++ b/plotly/validators/scatterternary/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="scatterternary.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_size.py b/plotly/validators/scatterternary/textfont/_size.py index 20f8e18b05..f02b671369 100644 --- a/plotly/validators/scatterternary/textfont/_size.py +++ b/plotly/validators/scatterternary/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/scatterternary/textfont/_sizesrc.py b/plotly/validators/scatterternary/textfont/_sizesrc.py index f7f5de097c..d585f56d37 100644 --- a/plotly/validators/scatterternary/textfont/_sizesrc.py +++ b/plotly/validators/scatterternary/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="scatterternary.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_style.py b/plotly/validators/scatterternary/textfont/_style.py index 4846096ea9..91de0dd235 100644 --- a/plotly/validators/scatterternary/textfont/_style.py +++ b/plotly/validators/scatterternary/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="scatterternary.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/scatterternary/textfont/_stylesrc.py b/plotly/validators/scatterternary/textfont/_stylesrc.py index af6fffd866..ece4ee0eaa 100644 --- a/plotly/validators/scatterternary/textfont/_stylesrc.py +++ b/plotly/validators/scatterternary/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="scatterternary.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_textcase.py b/plotly/validators/scatterternary/textfont/_textcase.py index 3905767de2..2c24da9516 100644 --- a/plotly/validators/scatterternary/textfont/_textcase.py +++ b/plotly/validators/scatterternary/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="scatterternary.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/scatterternary/textfont/_textcasesrc.py b/plotly/validators/scatterternary/textfont/_textcasesrc.py index 77bce59e93..ed96635a5c 100644 --- a/plotly/validators/scatterternary/textfont/_textcasesrc.py +++ b/plotly/validators/scatterternary/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="scatterternary.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_variant.py b/plotly/validators/scatterternary/textfont/_variant.py index ee043cec84..7c1c30efe0 100644 --- a/plotly/validators/scatterternary/textfont/_variant.py +++ b/plotly/validators/scatterternary/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="scatterternary.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/scatterternary/textfont/_variantsrc.py b/plotly/validators/scatterternary/textfont/_variantsrc.py index a77c911fca..cb92aa5ad6 100644 --- a/plotly/validators/scatterternary/textfont/_variantsrc.py +++ b/plotly/validators/scatterternary/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="scatterternary.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/textfont/_weight.py b/plotly/validators/scatterternary/textfont/_weight.py index 705ed66672..e7bae6a59b 100644 --- a/plotly/validators/scatterternary/textfont/_weight.py +++ b/plotly/validators/scatterternary/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="scatterternary.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/scatterternary/textfont/_weightsrc.py b/plotly/validators/scatterternary/textfont/_weightsrc.py index f5d3fe0aa7..40fbee9e0e 100644 --- a/plotly/validators/scatterternary/textfont/_weightsrc.py +++ b/plotly/validators/scatterternary/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="scatterternary.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/scatterternary/unselected/__init__.py b/plotly/validators/scatterternary/unselected/__init__.py index 3b0aeed383..9d2a313b83 100644 --- a/plotly/validators/scatterternary/unselected/__init__.py +++ b/plotly/validators/scatterternary/unselected/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._textfont import TextfontValidator - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._textfont.TextfontValidator", "._marker.MarkerValidator"] +) diff --git a/plotly/validators/scatterternary/unselected/_marker.py b/plotly/validators/scatterternary/unselected/_marker.py index 69585dd5a8..188973de9a 100644 --- a/plotly/validators/scatterternary/unselected/_marker.py +++ b/plotly/validators/scatterternary/unselected/_marker.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="scatterternary.unselected", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/unselected/_textfont.py b/plotly/validators/scatterternary/unselected/_textfont.py index a997b31bc6..cf8f9f9ee1 100644 --- a/plotly/validators/scatterternary/unselected/_textfont.py +++ b/plotly/validators/scatterternary/unselected/_textfont.py @@ -1,20 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="textfont", parent_name="scatterternary.unselected", **kwargs ): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the text font color of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/scatterternary/unselected/marker/__init__.py b/plotly/validators/scatterternary/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/scatterternary/unselected/marker/__init__.py +++ b/plotly/validators/scatterternary/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/scatterternary/unselected/marker/_color.py b/plotly/validators/scatterternary/unselected/marker/_color.py index 664108c03b..4b11a5832f 100644 --- a/plotly/validators/scatterternary/unselected/marker/_color.py +++ b/plotly/validators/scatterternary/unselected/marker/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.unselected.marker", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/scatterternary/unselected/marker/_opacity.py b/plotly/validators/scatterternary/unselected/marker/_opacity.py index 42c59112a3..9c8ed9b7f2 100644 --- a/plotly/validators/scatterternary/unselected/marker/_opacity.py +++ b/plotly/validators/scatterternary/unselected/marker/_opacity.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="scatterternary.unselected.marker", **kwargs, ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/scatterternary/unselected/marker/_size.py b/plotly/validators/scatterternary/unselected/marker/_size.py index e893af5a05..7b05917bed 100644 --- a/plotly/validators/scatterternary/unselected/marker/_size.py +++ b/plotly/validators/scatterternary/unselected/marker/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="scatterternary.unselected.marker", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/scatterternary/unselected/textfont/__init__.py b/plotly/validators/scatterternary/unselected/textfont/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/scatterternary/unselected/textfont/__init__.py +++ b/plotly/validators/scatterternary/unselected/textfont/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/scatterternary/unselected/textfont/_color.py b/plotly/validators/scatterternary/unselected/textfont/_color.py index 299acd375a..a11a92a52c 100644 --- a/plotly/validators/scatterternary/unselected/textfont/_color.py +++ b/plotly/validators/scatterternary/unselected/textfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="scatterternary.unselected.textfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/__init__.py b/plotly/validators/splom/__init__.py index c928a1b08d..646d3f13c0 100644 --- a/plotly/validators/splom/__init__.py +++ b/plotly/validators/splom/__init__.py @@ -1,93 +1,49 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yhoverformat import YhoverformatValidator - from ._yaxes import YaxesValidator - from ._xhoverformat import XhoverformatValidator - from ._xaxes import XaxesValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showupperhalf import ShowupperhalfValidator - from ._showlowerhalf import ShowlowerhalfValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._marker import MarkerValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._dimensiondefaults import DimensiondefaultsValidator - from ._dimensions import DimensionsValidator - from ._diagonal import DiagonalValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yhoverformat.YhoverformatValidator", - "._yaxes.YaxesValidator", - "._xhoverformat.XhoverformatValidator", - "._xaxes.XaxesValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showupperhalf.ShowupperhalfValidator", - "._showlowerhalf.ShowlowerhalfValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._marker.MarkerValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._dimensiondefaults.DimensiondefaultsValidator", - "._dimensions.DimensionsValidator", - "._diagonal.DiagonalValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yhoverformat.YhoverformatValidator", + "._yaxes.YaxesValidator", + "._xhoverformat.XhoverformatValidator", + "._xaxes.XaxesValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showupperhalf.ShowupperhalfValidator", + "._showlowerhalf.ShowlowerhalfValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._marker.MarkerValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dimensiondefaults.DimensiondefaultsValidator", + "._dimensions.DimensionsValidator", + "._diagonal.DiagonalValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + ], +) diff --git a/plotly/validators/splom/_customdata.py b/plotly/validators/splom/_customdata.py index bb84b58a26..1fe407722c 100644 --- a/plotly/validators/splom/_customdata.py +++ b/plotly/validators/splom/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="splom", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/_customdatasrc.py b/plotly/validators/splom/_customdatasrc.py index 6edf744585..f0af2c7912 100644 --- a/plotly/validators/splom/_customdatasrc.py +++ b/plotly/validators/splom/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="splom", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_diagonal.py b/plotly/validators/splom/_diagonal.py index 34a3645a53..e85e48ffd8 100644 --- a/plotly/validators/splom/_diagonal.py +++ b/plotly/validators/splom/_diagonal.py @@ -1,18 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiagonalValidator(_plotly_utils.basevalidators.CompoundValidator): +class DiagonalValidator(_bv.CompoundValidator): def __init__(self, plotly_name="diagonal", parent_name="splom", **kwargs): - super(DiagonalValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Diagonal"), data_docs=kwargs.pop( "data_docs", """ - visible - Determines whether or not subplots on the - diagonal are displayed. """, ), **kwargs, diff --git a/plotly/validators/splom/_dimensiondefaults.py b/plotly/validators/splom/_dimensiondefaults.py index fa1e8792ab..65f3442ee1 100644 --- a/plotly/validators/splom/_dimensiondefaults.py +++ b/plotly/validators/splom/_dimensiondefaults.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DimensiondefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class DimensiondefaultsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="dimensiondefaults", parent_name="splom", **kwargs): - super(DimensiondefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Dimension"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/splom/_dimensions.py b/plotly/validators/splom/_dimensions.py index b8a3f24ce2..6a9f133608 100644 --- a/plotly/validators/splom/_dimensions.py +++ b/plotly/validators/splom/_dimensions.py @@ -1,52 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DimensionsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class DimensionsValidator(_bv.CompoundArrayValidator): def __init__(self, plotly_name="dimensions", parent_name="splom", **kwargs): - super(DimensionsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Dimension"), data_docs=kwargs.pop( "data_docs", """ - axis - :class:`plotly.graph_objects.splom.dimension.Ax - is` instance or dict with compatible properties - label - Sets the label corresponding to this splom - dimension. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - values - Sets the dimension values to be plotted. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. - visible - Determines whether or not this dimension is - shown on the graph. Note that even visible - false dimension contribute to the default grid - generate by this splom trace. """, ), **kwargs, diff --git a/plotly/validators/splom/_hoverinfo.py b/plotly/validators/splom/_hoverinfo.py index 1a7c9e97c8..e341d52dd8 100644 --- a/plotly/validators/splom/_hoverinfo.py +++ b/plotly/validators/splom/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="splom", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/splom/_hoverinfosrc.py b/plotly/validators/splom/_hoverinfosrc.py index f70aef653d..6d0e50b3dd 100644 --- a/plotly/validators/splom/_hoverinfosrc.py +++ b/plotly/validators/splom/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="splom", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_hoverlabel.py b/plotly/validators/splom/_hoverlabel.py index af691c9134..810b7aad4f 100644 --- a/plotly/validators/splom/_hoverlabel.py +++ b/plotly/validators/splom/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="splom", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/splom/_hovertemplate.py b/plotly/validators/splom/_hovertemplate.py index 0d3e29802f..5e84b05b0f 100644 --- a/plotly/validators/splom/_hovertemplate.py +++ b/plotly/validators/splom/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="splom", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/splom/_hovertemplatesrc.py b/plotly/validators/splom/_hovertemplatesrc.py index 4740238947..79d2350995 100644 --- a/plotly/validators/splom/_hovertemplatesrc.py +++ b/plotly/validators/splom/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="splom", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_hovertext.py b/plotly/validators/splom/_hovertext.py index 589166232a..c29786b957 100644 --- a/plotly/validators/splom/_hovertext.py +++ b/plotly/validators/splom/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="splom", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/splom/_hovertextsrc.py b/plotly/validators/splom/_hovertextsrc.py index f6ba891101..79da2359b2 100644 --- a/plotly/validators/splom/_hovertextsrc.py +++ b/plotly/validators/splom/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="splom", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_ids.py b/plotly/validators/splom/_ids.py index ff429d8363..1a3d3714bd 100644 --- a/plotly/validators/splom/_ids.py +++ b/plotly/validators/splom/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="splom", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/_idssrc.py b/plotly/validators/splom/_idssrc.py index e2cb23c6f4..d64f9b4629 100644 --- a/plotly/validators/splom/_idssrc.py +++ b/plotly/validators/splom/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="splom", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_legend.py b/plotly/validators/splom/_legend.py index fc4b71d197..d0949a9c7f 100644 --- a/plotly/validators/splom/_legend.py +++ b/plotly/validators/splom/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="splom", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/splom/_legendgroup.py b/plotly/validators/splom/_legendgroup.py index a923e4e8e6..fcb64c8478 100644 --- a/plotly/validators/splom/_legendgroup.py +++ b/plotly/validators/splom/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="splom", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/_legendgrouptitle.py b/plotly/validators/splom/_legendgrouptitle.py index 3afbc71dee..f5bd60878c 100644 --- a/plotly/validators/splom/_legendgrouptitle.py +++ b/plotly/validators/splom/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="splom", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/splom/_legendrank.py b/plotly/validators/splom/_legendrank.py index d58319e240..64c231a108 100644 --- a/plotly/validators/splom/_legendrank.py +++ b/plotly/validators/splom/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="splom", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/_legendwidth.py b/plotly/validators/splom/_legendwidth.py index 0003be76d4..1f1d0a58ea 100644 --- a/plotly/validators/splom/_legendwidth.py +++ b/plotly/validators/splom/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="splom", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/_marker.py b/plotly/validators/splom/_marker.py index 5f961fb6a2..3802cce2d4 100644 --- a/plotly/validators/splom/_marker.py +++ b/plotly/validators/splom/_marker.py @@ -1,143 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="splom", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - anglesrc - Sets the source reference on Chart Studio Cloud - for `angle`. - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if in `marker.color` is set to a - numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.color`) or the bounds set in - `marker.cmin` and `marker.cmax` Has an effect - only if in `marker.color` is set to a numerical - array. Defaults to `false` when `marker.cmin` - and `marker.cmax` are set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if in `marker.color` is set to a numerical - array. Value should have the same units as in - `marker.color`. Has no effect when - `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.color` is set to a - numerical array. Value should have the same - units as in `marker.color` and if set, - `marker.cmax` must be set as well. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.splom.marker.Color - Bar` instance or dict with compatible - properties - colorscale - Sets the colorscale. Has an effect only if in - `marker.color` is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - line - :class:`plotly.graph_objects.splom.marker.Line` - instance or dict with compatible properties - opacity - Sets the marker opacity. - opacitysrc - Sets the source reference on Chart Studio Cloud - for `opacity`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.color` is set to a - numerical array. If true, `marker.cmin` will - correspond to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - in `marker.color` is set to a numerical array. - size - Sets the marker size (in px). - sizemin - Has an effect only if `marker.size` is set to a - numerical array. Sets the minimum size (in px) - of the rendered marker points. - sizemode - Has an effect only if `marker.size` is set to a - numerical array. Sets the rule for which the - data in `size` is converted to pixels. - sizeref - Has an effect only if `marker.size` is set to a - numerical array. Sets the scale factor used to - determine the rendered size of marker points. - Use with `sizemin` and `sizemode`. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. - symbolsrc - Sets the source reference on Chart Studio Cloud - for `symbol`. """, ), **kwargs, diff --git a/plotly/validators/splom/_meta.py b/plotly/validators/splom/_meta.py index 69cd7c0766..970ec4f508 100644 --- a/plotly/validators/splom/_meta.py +++ b/plotly/validators/splom/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="splom", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/splom/_metasrc.py b/plotly/validators/splom/_metasrc.py index 14499f5542..a9f5e4819a 100644 --- a/plotly/validators/splom/_metasrc.py +++ b/plotly/validators/splom/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="splom", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_name.py b/plotly/validators/splom/_name.py index 1ba82b2a13..d8b97a02aa 100644 --- a/plotly/validators/splom/_name.py +++ b/plotly/validators/splom/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="splom", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/_opacity.py b/plotly/validators/splom/_opacity.py index a5e1910f6d..4292931ed1 100644 --- a/plotly/validators/splom/_opacity.py +++ b/plotly/validators/splom/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="splom", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/splom/_selected.py b/plotly/validators/splom/_selected.py index eaa18afd6f..d62e3e4bfc 100644 --- a/plotly/validators/splom/_selected.py +++ b/plotly/validators/splom/_selected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="splom", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.splom.selected.Mar - ker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/splom/_selectedpoints.py b/plotly/validators/splom/_selectedpoints.py index 05967761fa..f6ab71b66d 100644 --- a/plotly/validators/splom/_selectedpoints.py +++ b/plotly/validators/splom/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="splom", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/_showlegend.py b/plotly/validators/splom/_showlegend.py index 6d5851fcbc..807d0902f2 100644 --- a/plotly/validators/splom/_showlegend.py +++ b/plotly/validators/splom/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="splom", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/_showlowerhalf.py b/plotly/validators/splom/_showlowerhalf.py index a911c1a7be..08851349a2 100644 --- a/plotly/validators/splom/_showlowerhalf.py +++ b/plotly/validators/splom/_showlowerhalf.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlowerhalfValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlowerhalfValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlowerhalf", parent_name="splom", **kwargs): - super(ShowlowerhalfValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/_showupperhalf.py b/plotly/validators/splom/_showupperhalf.py index a529511fc8..e1972a29d9 100644 --- a/plotly/validators/splom/_showupperhalf.py +++ b/plotly/validators/splom/_showupperhalf.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowupperhalfValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowupperhalfValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showupperhalf", parent_name="splom", **kwargs): - super(ShowupperhalfValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/_stream.py b/plotly/validators/splom/_stream.py index 31939ba5fc..3375f59097 100644 --- a/plotly/validators/splom/_stream.py +++ b/plotly/validators/splom/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="splom", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/splom/_text.py b/plotly/validators/splom/_text.py index 2589d4f0fe..9253ccd563 100644 --- a/plotly/validators/splom/_text.py +++ b/plotly/validators/splom/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="splom", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/splom/_textsrc.py b/plotly/validators/splom/_textsrc.py index 8e06eb1ee8..2a40394c9c 100644 --- a/plotly/validators/splom/_textsrc.py +++ b/plotly/validators/splom/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="splom", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_uid.py b/plotly/validators/splom/_uid.py index 1cc68e7df4..8f9453b0d1 100644 --- a/plotly/validators/splom/_uid.py +++ b/plotly/validators/splom/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="splom", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/splom/_uirevision.py b/plotly/validators/splom/_uirevision.py index f09d2d5b34..320dfbab2e 100644 --- a/plotly/validators/splom/_uirevision.py +++ b/plotly/validators/splom/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="splom", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_unselected.py b/plotly/validators/splom/_unselected.py index 8924bc4a9e..a22f9ee39c 100644 --- a/plotly/validators/splom/_unselected.py +++ b/plotly/validators/splom/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="splom", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.splom.unselected.M - arker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/splom/_visible.py b/plotly/validators/splom/_visible.py index 1b9b886ff6..626603a284 100644 --- a/plotly/validators/splom/_visible.py +++ b/plotly/validators/splom/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="splom", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/splom/_xaxes.py b/plotly/validators/splom/_xaxes.py index 9ecc6cad2c..48ed1d97b3 100644 --- a/plotly/validators/splom/_xaxes.py +++ b/plotly/validators/splom/_xaxes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XaxesValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="xaxes", parent_name="splom", **kwargs): - super(XaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/splom/_xhoverformat.py b/plotly/validators/splom/_xhoverformat.py index 0bbc2f7731..96df59efd4 100644 --- a/plotly/validators/splom/_xhoverformat.py +++ b/plotly/validators/splom/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="splom", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/_yaxes.py b/plotly/validators/splom/_yaxes.py index 3395d06ba2..a6ad999f10 100644 --- a/plotly/validators/splom/_yaxes.py +++ b/plotly/validators/splom/_yaxes.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxesValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YaxesValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="yaxes", parent_name="splom", **kwargs): - super(YaxesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), free_length=kwargs.pop("free_length", True), items=kwargs.pop( diff --git a/plotly/validators/splom/_yhoverformat.py b/plotly/validators/splom/_yhoverformat.py index ec06738729..d75c23c039 100644 --- a/plotly/validators/splom/_yhoverformat.py +++ b/plotly/validators/splom/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="splom", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/diagonal/__init__.py b/plotly/validators/splom/diagonal/__init__.py index 5a516ae482..a4f17d4d69 100644 --- a/plotly/validators/splom/diagonal/__init__.py +++ b/plotly/validators/splom/diagonal/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._visible.VisibleValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._visible.VisibleValidator"] +) diff --git a/plotly/validators/splom/diagonal/_visible.py b/plotly/validators/splom/diagonal/_visible.py index 6b6d3dfadb..3662def778 100644 --- a/plotly/validators/splom/diagonal/_visible.py +++ b/plotly/validators/splom/diagonal/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="splom.diagonal", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/__init__.py b/plotly/validators/splom/dimension/__init__.py index ca97d79c70..c6314c58ec 100644 --- a/plotly/validators/splom/dimension/__init__.py +++ b/plotly/validators/splom/dimension/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._label import LabelValidator - from ._axis import AxisValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._label.LabelValidator", - "._axis.AxisValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._label.LabelValidator", + "._axis.AxisValidator", + ], +) diff --git a/plotly/validators/splom/dimension/_axis.py b/plotly/validators/splom/dimension/_axis.py index 22c3620305..f207bef4c2 100644 --- a/plotly/validators/splom/dimension/_axis.py +++ b/plotly/validators/splom/dimension/_axis.py @@ -1,25 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AxisValidator(_plotly_utils.basevalidators.CompoundValidator): +class AxisValidator(_bv.CompoundValidator): def __init__(self, plotly_name="axis", parent_name="splom.dimension", **kwargs): - super(AxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Axis"), data_docs=kwargs.pop( "data_docs", """ - matches - Determines whether or not the x & y axes - generated by this dimension match. Equivalent - to setting the `matches` axis attribute in the - layout with the correct axis id. - type - Sets the axis type for this dimension's - generated x and y axes. Note that the axis - `type` values set in layout take precedence - over this attribute. """, ), **kwargs, diff --git a/plotly/validators/splom/dimension/_label.py b/plotly/validators/splom/dimension/_label.py index 35e6cd00d5..0f9df35a5f 100644 --- a/plotly/validators/splom/dimension/_label.py +++ b/plotly/validators/splom/dimension/_label.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelValidator(_plotly_utils.basevalidators.StringValidator): +class LabelValidator(_bv.StringValidator): def __init__(self, plotly_name="label", parent_name="splom.dimension", **kwargs): - super(LabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/_name.py b/plotly/validators/splom/dimension/_name.py index 6881e387cb..b5030a5b9a 100644 --- a/plotly/validators/splom/dimension/_name.py +++ b/plotly/validators/splom/dimension/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="splom.dimension", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/_templateitemname.py b/plotly/validators/splom/dimension/_templateitemname.py index 0e4c08a0b7..5777a4c7b8 100644 --- a/plotly/validators/splom/dimension/_templateitemname.py +++ b/plotly/validators/splom/dimension/_templateitemname.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="splom.dimension", **kwargs ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/_values.py b/plotly/validators/splom/dimension/_values.py index b87cbc0478..37ec1ca567 100644 --- a/plotly/validators/splom/dimension/_values.py +++ b/plotly/validators/splom/dimension/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="splom.dimension", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/_valuessrc.py b/plotly/validators/splom/dimension/_valuessrc.py index b714089493..2775b3e237 100644 --- a/plotly/validators/splom/dimension/_valuessrc.py +++ b/plotly/validators/splom/dimension/_valuessrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="valuessrc", parent_name="splom.dimension", **kwargs ): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/_visible.py b/plotly/validators/splom/dimension/_visible.py index 694a4a9f1c..4af301ddf1 100644 --- a/plotly/validators/splom/dimension/_visible.py +++ b/plotly/validators/splom/dimension/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="splom.dimension", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/axis/__init__.py b/plotly/validators/splom/dimension/axis/__init__.py index 23af7f078b..e3f50a459f 100644 --- a/plotly/validators/splom/dimension/axis/__init__.py +++ b/plotly/validators/splom/dimension/axis/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._type import TypeValidator - from ._matches import MatchesValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._type.TypeValidator", "._matches.MatchesValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._type.TypeValidator", "._matches.MatchesValidator"] +) diff --git a/plotly/validators/splom/dimension/axis/_matches.py b/plotly/validators/splom/dimension/axis/_matches.py index 5c407abd3c..d3c8c8f89d 100644 --- a/plotly/validators/splom/dimension/axis/_matches.py +++ b/plotly/validators/splom/dimension/axis/_matches.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MatchesValidator(_plotly_utils.basevalidators.BooleanValidator): +class MatchesValidator(_bv.BooleanValidator): def __init__( self, plotly_name="matches", parent_name="splom.dimension.axis", **kwargs ): - super(MatchesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/dimension/axis/_type.py b/plotly/validators/splom/dimension/axis/_type.py index d13a210ba3..d7b69e4e4d 100644 --- a/plotly/validators/splom/dimension/axis/_type.py +++ b/plotly/validators/splom/dimension/axis/_type.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TypeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="type", parent_name="splom.dimension.axis", **kwargs ): - super(TypeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["linear", "log", "date", "category"]), **kwargs, diff --git a/plotly/validators/splom/hoverlabel/__init__.py b/plotly/validators/splom/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/splom/hoverlabel/__init__.py +++ b/plotly/validators/splom/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/splom/hoverlabel/_align.py b/plotly/validators/splom/hoverlabel/_align.py index 2e65581183..4ebe9ae4b2 100644 --- a/plotly/validators/splom/hoverlabel/_align.py +++ b/plotly/validators/splom/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="splom.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/splom/hoverlabel/_alignsrc.py b/plotly/validators/splom/hoverlabel/_alignsrc.py index f75de77e65..5daf37a098 100644 --- a/plotly/validators/splom/hoverlabel/_alignsrc.py +++ b/plotly/validators/splom/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="splom.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/_bgcolor.py b/plotly/validators/splom/hoverlabel/_bgcolor.py index a5dff7ed55..433642990f 100644 --- a/plotly/validators/splom/hoverlabel/_bgcolor.py +++ b/plotly/validators/splom/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="splom.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/splom/hoverlabel/_bgcolorsrc.py b/plotly/validators/splom/hoverlabel/_bgcolorsrc.py index 16232f6f22..b5c9302e5b 100644 --- a/plotly/validators/splom/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/splom/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="splom.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/_bordercolor.py b/plotly/validators/splom/hoverlabel/_bordercolor.py index 6e1a1ad6f7..5d5c9d677b 100644 --- a/plotly/validators/splom/hoverlabel/_bordercolor.py +++ b/plotly/validators/splom/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="splom.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/splom/hoverlabel/_bordercolorsrc.py b/plotly/validators/splom/hoverlabel/_bordercolorsrc.py index 624d249273..6186a1465c 100644 --- a/plotly/validators/splom/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/splom/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="splom.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/_font.py b/plotly/validators/splom/hoverlabel/_font.py index a4de3b5e6b..e309867e31 100644 --- a/plotly/validators/splom/hoverlabel/_font.py +++ b/plotly/validators/splom/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="splom.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/splom/hoverlabel/_namelength.py b/plotly/validators/splom/hoverlabel/_namelength.py index 6b3b90d145..f6e3bbaae9 100644 --- a/plotly/validators/splom/hoverlabel/_namelength.py +++ b/plotly/validators/splom/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="splom.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/splom/hoverlabel/_namelengthsrc.py b/plotly/validators/splom/hoverlabel/_namelengthsrc.py index 1f80b25de4..fcce0126bc 100644 --- a/plotly/validators/splom/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/splom/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="splom.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/__init__.py b/plotly/validators/splom/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/splom/hoverlabel/font/__init__.py +++ b/plotly/validators/splom/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/splom/hoverlabel/font/_color.py b/plotly/validators/splom/hoverlabel/font/_color.py index 1c9b31a8b0..86da4de2af 100644 --- a/plotly/validators/splom/hoverlabel/font/_color.py +++ b/plotly/validators/splom/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="splom.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/splom/hoverlabel/font/_colorsrc.py b/plotly/validators/splom/hoverlabel/font/_colorsrc.py index d40713c94a..01f30d1b91 100644 --- a/plotly/validators/splom/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/splom/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_family.py b/plotly/validators/splom/hoverlabel/font/_family.py index 2fec99fb1c..2397297d2e 100644 --- a/plotly/validators/splom/hoverlabel/font/_family.py +++ b/plotly/validators/splom/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="splom.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/splom/hoverlabel/font/_familysrc.py b/plotly/validators/splom/hoverlabel/font/_familysrc.py index 6b1c3dc32a..34cd0e3e02 100644 --- a/plotly/validators/splom/hoverlabel/font/_familysrc.py +++ b/plotly/validators/splom/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_lineposition.py b/plotly/validators/splom/hoverlabel/font/_lineposition.py index e8e714420f..76d137d6fd 100644 --- a/plotly/validators/splom/hoverlabel/font/_lineposition.py +++ b/plotly/validators/splom/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="splom.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/splom/hoverlabel/font/_linepositionsrc.py b/plotly/validators/splom/hoverlabel/font/_linepositionsrc.py index e0a04dfec7..e60d6ed3d4 100644 --- a/plotly/validators/splom/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/splom/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="splom.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_shadow.py b/plotly/validators/splom/hoverlabel/font/_shadow.py index f17a3ec80c..7a2c418244 100644 --- a/plotly/validators/splom/hoverlabel/font/_shadow.py +++ b/plotly/validators/splom/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="splom.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/splom/hoverlabel/font/_shadowsrc.py b/plotly/validators/splom/hoverlabel/font/_shadowsrc.py index 1cb26553e6..947486306c 100644 --- a/plotly/validators/splom/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/splom/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_size.py b/plotly/validators/splom/hoverlabel/font/_size.py index 6a5866dcba..0015e5f93d 100644 --- a/plotly/validators/splom/hoverlabel/font/_size.py +++ b/plotly/validators/splom/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/splom/hoverlabel/font/_sizesrc.py b/plotly/validators/splom/hoverlabel/font/_sizesrc.py index d52034c43f..1f965cdaea 100644 --- a/plotly/validators/splom/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/splom/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_style.py b/plotly/validators/splom/hoverlabel/font/_style.py index 4e683bac21..beb19bd24b 100644 --- a/plotly/validators/splom/hoverlabel/font/_style.py +++ b/plotly/validators/splom/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="splom.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/splom/hoverlabel/font/_stylesrc.py b/plotly/validators/splom/hoverlabel/font/_stylesrc.py index 887cb812ac..8535062b1e 100644 --- a/plotly/validators/splom/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/splom/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_textcase.py b/plotly/validators/splom/hoverlabel/font/_textcase.py index 1fa3bde0a0..4ac499c5fd 100644 --- a/plotly/validators/splom/hoverlabel/font/_textcase.py +++ b/plotly/validators/splom/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="splom.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/splom/hoverlabel/font/_textcasesrc.py b/plotly/validators/splom/hoverlabel/font/_textcasesrc.py index b8d3ebccf6..1799d1680e 100644 --- a/plotly/validators/splom/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/splom/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_variant.py b/plotly/validators/splom/hoverlabel/font/_variant.py index 16010ab3a0..960060824a 100644 --- a/plotly/validators/splom/hoverlabel/font/_variant.py +++ b/plotly/validators/splom/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="splom.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/splom/hoverlabel/font/_variantsrc.py b/plotly/validators/splom/hoverlabel/font/_variantsrc.py index e2c6a15a2d..a1e7191043 100644 --- a/plotly/validators/splom/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/splom/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/hoverlabel/font/_weight.py b/plotly/validators/splom/hoverlabel/font/_weight.py index 97e775eb2a..00c8ff5287 100644 --- a/plotly/validators/splom/hoverlabel/font/_weight.py +++ b/plotly/validators/splom/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="splom.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/splom/hoverlabel/font/_weightsrc.py b/plotly/validators/splom/hoverlabel/font/_weightsrc.py index d5c2dab59f..138bec7a4e 100644 --- a/plotly/validators/splom/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/splom/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="splom.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/legendgrouptitle/__init__.py b/plotly/validators/splom/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/splom/legendgrouptitle/__init__.py +++ b/plotly/validators/splom/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/splom/legendgrouptitle/_font.py b/plotly/validators/splom/legendgrouptitle/_font.py index 0778a27c67..c283a5ec22 100644 --- a/plotly/validators/splom/legendgrouptitle/_font.py +++ b/plotly/validators/splom/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="splom.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/splom/legendgrouptitle/_text.py b/plotly/validators/splom/legendgrouptitle/_text.py index 068195ae94..047502e6ec 100644 --- a/plotly/validators/splom/legendgrouptitle/_text.py +++ b/plotly/validators/splom/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="splom.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/legendgrouptitle/font/__init__.py b/plotly/validators/splom/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/splom/legendgrouptitle/font/__init__.py +++ b/plotly/validators/splom/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/splom/legendgrouptitle/font/_color.py b/plotly/validators/splom/legendgrouptitle/font/_color.py index c9af0573d3..6f3cc6c6c8 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_color.py +++ b/plotly/validators/splom/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/legendgrouptitle/font/_family.py b/plotly/validators/splom/legendgrouptitle/font/_family.py index d12123cfab..8322785f61 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_family.py +++ b/plotly/validators/splom/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/splom/legendgrouptitle/font/_lineposition.py b/plotly/validators/splom/legendgrouptitle/font/_lineposition.py index fc08c346fb..106cc51a10 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/splom/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="splom.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/splom/legendgrouptitle/font/_shadow.py b/plotly/validators/splom/legendgrouptitle/font/_shadow.py index e3fa9947fb..51faecc7b0 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/splom/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/splom/legendgrouptitle/font/_size.py b/plotly/validators/splom/legendgrouptitle/font/_size.py index 1f35087921..567bdd21a2 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_size.py +++ b/plotly/validators/splom/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/splom/legendgrouptitle/font/_style.py b/plotly/validators/splom/legendgrouptitle/font/_style.py index f9c6156b86..f5aa7f557e 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_style.py +++ b/plotly/validators/splom/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/splom/legendgrouptitle/font/_textcase.py b/plotly/validators/splom/legendgrouptitle/font/_textcase.py index 5f6c664090..b3d7b27950 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/splom/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="splom.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/splom/legendgrouptitle/font/_variant.py b/plotly/validators/splom/legendgrouptitle/font/_variant.py index 1c8dc0128a..4840985072 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_variant.py +++ b/plotly/validators/splom/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/splom/legendgrouptitle/font/_weight.py b/plotly/validators/splom/legendgrouptitle/font/_weight.py index e3dfbebe92..495971020c 100644 --- a/plotly/validators/splom/legendgrouptitle/font/_weight.py +++ b/plotly/validators/splom/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="splom.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/splom/marker/__init__.py b/plotly/validators/splom/marker/__init__.py index dc48879d6b..ec56080f71 100644 --- a/plotly/validators/splom/marker/__init__.py +++ b/plotly/validators/splom/marker/__init__.py @@ -1,61 +1,33 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbolsrc import SymbolsrcValidator - from ._symbol import SymbolValidator - from ._sizesrc import SizesrcValidator - from ._sizeref import SizerefValidator - from ._sizemode import SizemodeValidator - from ._sizemin import SizeminValidator - from ._size import SizeValidator - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._opacitysrc import OpacitysrcValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator - from ._anglesrc import AnglesrcValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbolsrc.SymbolsrcValidator", - "._symbol.SymbolValidator", - "._sizesrc.SizesrcValidator", - "._sizeref.SizerefValidator", - "._sizemode.SizemodeValidator", - "._sizemin.SizeminValidator", - "._size.SizeValidator", - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._opacitysrc.OpacitysrcValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - "._anglesrc.AnglesrcValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbolsrc.SymbolsrcValidator", + "._symbol.SymbolValidator", + "._sizesrc.SizesrcValidator", + "._sizeref.SizerefValidator", + "._sizemode.SizemodeValidator", + "._sizemin.SizeminValidator", + "._size.SizeValidator", + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._opacitysrc.OpacitysrcValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + "._anglesrc.AnglesrcValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/splom/marker/_angle.py b/plotly/validators/splom/marker/_angle.py index 0707622c4e..5966355bd7 100644 --- a/plotly/validators/splom/marker/_angle.py +++ b/plotly/validators/splom/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__(self, plotly_name="angle", parent_name="splom.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/splom/marker/_anglesrc.py b/plotly/validators/splom/marker/_anglesrc.py index 30150404d3..542f596e4c 100644 --- a/plotly/validators/splom/marker/_anglesrc.py +++ b/plotly/validators/splom/marker/_anglesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AnglesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AnglesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="anglesrc", parent_name="splom.marker", **kwargs): - super(AnglesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_autocolorscale.py b/plotly/validators/splom/marker/_autocolorscale.py index 7a3bb603c3..728acd7a5c 100644 --- a/plotly/validators/splom/marker/_autocolorscale.py +++ b/plotly/validators/splom/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="splom.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/splom/marker/_cauto.py b/plotly/validators/splom/marker/_cauto.py index 0bb31d5097..11f8744a4a 100644 --- a/plotly/validators/splom/marker/_cauto.py +++ b/plotly/validators/splom/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="splom.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/splom/marker/_cmax.py b/plotly/validators/splom/marker/_cmax.py index 02076794b3..aa0d1cf557 100644 --- a/plotly/validators/splom/marker/_cmax.py +++ b/plotly/validators/splom/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="splom.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/splom/marker/_cmid.py b/plotly/validators/splom/marker/_cmid.py index d1793b5394..c86d654d1d 100644 --- a/plotly/validators/splom/marker/_cmid.py +++ b/plotly/validators/splom/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="splom.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/splom/marker/_cmin.py b/plotly/validators/splom/marker/_cmin.py index 7abcddd496..f3728fa04d 100644 --- a/plotly/validators/splom/marker/_cmin.py +++ b/plotly/validators/splom/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="splom.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/splom/marker/_color.py b/plotly/validators/splom/marker/_color.py index ee03eae599..94828e78b7 100644 --- a/plotly/validators/splom/marker/_color.py +++ b/plotly/validators/splom/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="splom.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), colorscale_path=kwargs.pop("colorscale_path", "splom.marker.colorscale"), diff --git a/plotly/validators/splom/marker/_coloraxis.py b/plotly/validators/splom/marker/_coloraxis.py index 415a215400..b46bfec10c 100644 --- a/plotly/validators/splom/marker/_coloraxis.py +++ b/plotly/validators/splom/marker/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="splom.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/splom/marker/_colorbar.py b/plotly/validators/splom/marker/_colorbar.py index 460b64e8b2..5014910590 100644 --- a/plotly/validators/splom/marker/_colorbar.py +++ b/plotly/validators/splom/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="splom.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.splom.m - arker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.splom.marker.colorbar.tickformatstopdefaults) - , sets the default property values to use for - elements of - splom.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.splom.marker.color - bar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/splom/marker/_colorscale.py b/plotly/validators/splom/marker/_colorscale.py index 55b208ed82..8954081775 100644 --- a/plotly/validators/splom/marker/_colorscale.py +++ b/plotly/validators/splom/marker/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="splom.marker", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/splom/marker/_colorsrc.py b/plotly/validators/splom/marker/_colorsrc.py index 4388f7b138..f8c8fb64f4 100644 --- a/plotly/validators/splom/marker/_colorsrc.py +++ b/plotly/validators/splom/marker/_colorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="splom.marker", **kwargs): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_line.py b/plotly/validators/splom/marker/_line.py index 2e9e061b0f..07ca96bebf 100644 --- a/plotly/validators/splom/marker/_line.py +++ b/plotly/validators/splom/marker/_line.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="splom.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.line.colorscale`. Has an - effect only if in `marker.line.color` is set to - a numerical array. In case `colorscale` is - unspecified or `autocolorscale` is true, the - default palette will be chosen according to - whether numbers in the `color` array are all - positive, all negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - in `marker.line.color`) or the bounds set in - `marker.line.cmin` and `marker.line.cmax` Has - an effect only if in `marker.line.color` is set - to a numerical array. Defaults to `false` when - `marker.line.cmin` and `marker.line.cmax` are - set by the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmin` must be set as well. - cmid - Sets the mid-point of the color domain by - scaling `marker.line.cmin` and/or - `marker.line.cmax` to be equidistant to this - point. Has an effect only if in - `marker.line.color` is set to a numerical - array. Value should have the same units as in - `marker.line.color`. Has no effect when - `marker.line.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if in `marker.line.color` is set - to a numerical array. Value should have the - same units as in `marker.line.color` and if - set, `marker.line.cmax` must be set as well. - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorscale - Sets the colorscale. Has an effect only if in - `marker.line.color` is set to a numerical - array. The colorscale must be an array - containing arrays mapping a normalized value to - an rgb, rgba, hex, hsl, hsv, or named color - string. At minimum, a mapping for the lowest - (0) and highest (1) values are required. For - example, `[[0, 'rgb(0,0,255)'], [1, - 'rgb(255,0,0)']]`. To control the bounds of the - colorscale in color space, use - `marker.line.cmin` and `marker.line.cmax`. - Alternatively, `colorscale` may be a palette - name string of the following list: Blackbody,Bl - uered,Blues,Cividis,Earth,Electric,Greens,Greys - ,Hot,Jet,Picnic,Portland,Rainbow,RdBu,Reds,Viri - dis,YlGnBu,YlOrRd. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - reversescale - Reverses the color mapping if true. Has an - effect only if in `marker.line.color` is set to - a numerical array. If true, `marker.line.cmin` - will correspond to the last color in the array - and `marker.line.cmax` will correspond to the - first color. - width - Sets the width (in px) of the lines bounding - the marker points. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/splom/marker/_opacity.py b/plotly/validators/splom/marker/_opacity.py index adf1a014c1..03cc2c2241 100644 --- a/plotly/validators/splom/marker/_opacity.py +++ b/plotly/validators/splom/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="splom.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/splom/marker/_opacitysrc.py b/plotly/validators/splom/marker/_opacitysrc.py index 0e0f2d021f..7becdc7290 100644 --- a/plotly/validators/splom/marker/_opacitysrc.py +++ b/plotly/validators/splom/marker/_opacitysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OpacitysrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="opacitysrc", parent_name="splom.marker", **kwargs): - super(OpacitysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_reversescale.py b/plotly/validators/splom/marker/_reversescale.py index 0991e079c1..30e1b9cd6a 100644 --- a/plotly/validators/splom/marker/_reversescale.py +++ b/plotly/validators/splom/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="splom.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_showscale.py b/plotly/validators/splom/marker/_showscale.py index 6b1ef8c040..8673be50a5 100644 --- a/plotly/validators/splom/marker/_showscale.py +++ b/plotly/validators/splom/marker/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="splom.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_size.py b/plotly/validators/splom/marker/_size.py index 5c07388eb0..2f785dea43 100644 --- a/plotly/validators/splom/marker/_size.py +++ b/plotly/validators/splom/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="splom.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "markerSize"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/splom/marker/_sizemin.py b/plotly/validators/splom/marker/_sizemin.py index 8c932263cb..404eae8cc0 100644 --- a/plotly/validators/splom/marker/_sizemin.py +++ b/plotly/validators/splom/marker/_sizemin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeminValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeminValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizemin", parent_name="splom.marker", **kwargs): - super(SizeminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/_sizemode.py b/plotly/validators/splom/marker/_sizemode.py index 88dbe2bdde..c9fd1f54cb 100644 --- a/plotly/validators/splom/marker/_sizemode.py +++ b/plotly/validators/splom/marker/_sizemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SizemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="sizemode", parent_name="splom.marker", **kwargs): - super(SizemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["diameter", "area"]), **kwargs, diff --git a/plotly/validators/splom/marker/_sizeref.py b/plotly/validators/splom/marker/_sizeref.py index e9eac46744..5b84dcc53c 100644 --- a/plotly/validators/splom/marker/_sizeref.py +++ b/plotly/validators/splom/marker/_sizeref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="splom.marker", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_sizesrc.py b/plotly/validators/splom/marker/_sizesrc.py index 5650926522..962dcaa09a 100644 --- a/plotly/validators/splom/marker/_sizesrc.py +++ b/plotly/validators/splom/marker/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="splom.marker", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/_symbol.py b/plotly/validators/splom/marker/_symbol.py index 84a640a528..7c3583c7a0 100644 --- a/plotly/validators/splom/marker/_symbol.py +++ b/plotly/validators/splom/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="splom.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( diff --git a/plotly/validators/splom/marker/_symbolsrc.py b/plotly/validators/splom/marker/_symbolsrc.py index 86d12111d3..05109d5cf6 100644 --- a/plotly/validators/splom/marker/_symbolsrc.py +++ b/plotly/validators/splom/marker/_symbolsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SymbolsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="symbolsrc", parent_name="splom.marker", **kwargs): - super(SymbolsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/__init__.py b/plotly/validators/splom/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/splom/marker/colorbar/__init__.py +++ b/plotly/validators/splom/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/splom/marker/colorbar/_bgcolor.py b/plotly/validators/splom/marker/colorbar/_bgcolor.py index 1bdd0f6f7f..953b5ffe36 100644 --- a/plotly/validators/splom/marker/colorbar/_bgcolor.py +++ b/plotly/validators/splom/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="splom.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_bordercolor.py b/plotly/validators/splom/marker/colorbar/_bordercolor.py index eefab3b63d..99a2d19f07 100644 --- a/plotly/validators/splom/marker/colorbar/_bordercolor.py +++ b/plotly/validators/splom/marker/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="splom.marker.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_borderwidth.py b/plotly/validators/splom/marker/colorbar/_borderwidth.py index a015405f39..d19cfac7f5 100644 --- a/plotly/validators/splom/marker/colorbar/_borderwidth.py +++ b/plotly/validators/splom/marker/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="splom.marker.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_dtick.py b/plotly/validators/splom/marker/colorbar/_dtick.py index 94137c6ead..eaad172c42 100644 --- a/plotly/validators/splom/marker/colorbar/_dtick.py +++ b/plotly/validators/splom/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="splom.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_exponentformat.py b/plotly/validators/splom/marker/colorbar/_exponentformat.py index e2006f3c63..6902dca0af 100644 --- a/plotly/validators/splom/marker/colorbar/_exponentformat.py +++ b/plotly/validators/splom/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="splom.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_labelalias.py b/plotly/validators/splom/marker/colorbar/_labelalias.py index b8740d3f6a..91ae2dd63c 100644 --- a/plotly/validators/splom/marker/colorbar/_labelalias.py +++ b/plotly/validators/splom/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="splom.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_len.py b/plotly/validators/splom/marker/colorbar/_len.py index 8ee1cb546e..781374068e 100644 --- a/plotly/validators/splom/marker/colorbar/_len.py +++ b/plotly/validators/splom/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="splom.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_lenmode.py b/plotly/validators/splom/marker/colorbar/_lenmode.py index 0211dd3958..38d7402c16 100644 --- a/plotly/validators/splom/marker/colorbar/_lenmode.py +++ b/plotly/validators/splom/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="splom.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_minexponent.py b/plotly/validators/splom/marker/colorbar/_minexponent.py index 549eb3f52c..2cfb679f7d 100644 --- a/plotly/validators/splom/marker/colorbar/_minexponent.py +++ b/plotly/validators/splom/marker/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="splom.marker.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_nticks.py b/plotly/validators/splom/marker/colorbar/_nticks.py index a239eadbbd..1de6e076ae 100644 --- a/plotly/validators/splom/marker/colorbar/_nticks.py +++ b/plotly/validators/splom/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="splom.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_orientation.py b/plotly/validators/splom/marker/colorbar/_orientation.py index 19f759b36c..45c2f6fbbe 100644 --- a/plotly/validators/splom/marker/colorbar/_orientation.py +++ b/plotly/validators/splom/marker/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="splom.marker.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_outlinecolor.py b/plotly/validators/splom/marker/colorbar/_outlinecolor.py index 3798c06e1e..aa18df08c3 100644 --- a/plotly/validators/splom/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/splom/marker/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="splom.marker.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_outlinewidth.py b/plotly/validators/splom/marker/colorbar/_outlinewidth.py index 3e53fb8835..fbb832c496 100644 --- a/plotly/validators/splom/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/splom/marker/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="splom.marker.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_separatethousands.py b/plotly/validators/splom/marker/colorbar/_separatethousands.py index dc2166b023..3f234a247c 100644 --- a/plotly/validators/splom/marker/colorbar/_separatethousands.py +++ b/plotly/validators/splom/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="splom.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_showexponent.py b/plotly/validators/splom/marker/colorbar/_showexponent.py index c54679d11c..22e779390b 100644 --- a/plotly/validators/splom/marker/colorbar/_showexponent.py +++ b/plotly/validators/splom/marker/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="splom.marker.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_showticklabels.py b/plotly/validators/splom/marker/colorbar/_showticklabels.py index c1784f6af3..cac1c33c2d 100644 --- a/plotly/validators/splom/marker/colorbar/_showticklabels.py +++ b/plotly/validators/splom/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="splom.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_showtickprefix.py b/plotly/validators/splom/marker/colorbar/_showtickprefix.py index 2d321d623a..1842251c57 100644 --- a/plotly/validators/splom/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/splom/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="splom.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_showticksuffix.py b/plotly/validators/splom/marker/colorbar/_showticksuffix.py index 85a946ed6d..71e4137b9e 100644 --- a/plotly/validators/splom/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/splom/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="splom.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_thickness.py b/plotly/validators/splom/marker/colorbar/_thickness.py index 35c28eb477..1c8e35eb64 100644 --- a/plotly/validators/splom/marker/colorbar/_thickness.py +++ b/plotly/validators/splom/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="splom.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_thicknessmode.py b/plotly/validators/splom/marker/colorbar/_thicknessmode.py index 0cd70fbd3a..e8dc870c58 100644 --- a/plotly/validators/splom/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/splom/marker/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="splom.marker.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_tick0.py b/plotly/validators/splom/marker/colorbar/_tick0.py index 7a74854f3d..f9f547e8c3 100644 --- a/plotly/validators/splom/marker/colorbar/_tick0.py +++ b/plotly/validators/splom/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="splom.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_tickangle.py b/plotly/validators/splom/marker/colorbar/_tickangle.py index 8d11937075..89158f8c73 100644 --- a/plotly/validators/splom/marker/colorbar/_tickangle.py +++ b/plotly/validators/splom/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="splom.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_tickcolor.py b/plotly/validators/splom/marker/colorbar/_tickcolor.py index f8ef3c17e4..81f51bea14 100644 --- a/plotly/validators/splom/marker/colorbar/_tickcolor.py +++ b/plotly/validators/splom/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="splom.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_tickfont.py b/plotly/validators/splom/marker/colorbar/_tickfont.py index 8e67cf664a..b150f69185 100644 --- a/plotly/validators/splom/marker/colorbar/_tickfont.py +++ b/plotly/validators/splom/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="splom.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_tickformat.py b/plotly/validators/splom/marker/colorbar/_tickformat.py index 0c64f5d479..750a9726a3 100644 --- a/plotly/validators/splom/marker/colorbar/_tickformat.py +++ b/plotly/validators/splom/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="splom.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py index 9bf1ed3b6f..47f6bb0dc4 100644 --- a/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/splom/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="splom.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/splom/marker/colorbar/_tickformatstops.py b/plotly/validators/splom/marker/colorbar/_tickformatstops.py index 19be3efb3b..7cfaee0ea4 100644 --- a/plotly/validators/splom/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/splom/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="splom.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/splom/marker/colorbar/_ticklabeloverflow.py index 03ceb0340c..746f20273b 100644 --- a/plotly/validators/splom/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/splom/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="splom.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_ticklabelposition.py b/plotly/validators/splom/marker/colorbar/_ticklabelposition.py index 4ea1237a4b..1839c8ac49 100644 --- a/plotly/validators/splom/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/splom/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="splom.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/splom/marker/colorbar/_ticklabelstep.py b/plotly/validators/splom/marker/colorbar/_ticklabelstep.py index 60e50e822c..764a801aba 100644 --- a/plotly/validators/splom/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/splom/marker/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="splom.marker.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_ticklen.py b/plotly/validators/splom/marker/colorbar/_ticklen.py index 9a20020f2a..e2b4674e60 100644 --- a/plotly/validators/splom/marker/colorbar/_ticklen.py +++ b/plotly/validators/splom/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="splom.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_tickmode.py b/plotly/validators/splom/marker/colorbar/_tickmode.py index 3e72251527..8e782c97f8 100644 --- a/plotly/validators/splom/marker/colorbar/_tickmode.py +++ b/plotly/validators/splom/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="splom.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/splom/marker/colorbar/_tickprefix.py b/plotly/validators/splom/marker/colorbar/_tickprefix.py index b03ca3b227..ba64af6d15 100644 --- a/plotly/validators/splom/marker/colorbar/_tickprefix.py +++ b/plotly/validators/splom/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="splom.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_ticks.py b/plotly/validators/splom/marker/colorbar/_ticks.py index b6d261c447..f48862540e 100644 --- a/plotly/validators/splom/marker/colorbar/_ticks.py +++ b/plotly/validators/splom/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="splom.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_ticksuffix.py b/plotly/validators/splom/marker/colorbar/_ticksuffix.py index 5b3795956a..86690bfb5c 100644 --- a/plotly/validators/splom/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/splom/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="splom.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_ticktext.py b/plotly/validators/splom/marker/colorbar/_ticktext.py index 8e4b0ecde4..56612d71d4 100644 --- a/plotly/validators/splom/marker/colorbar/_ticktext.py +++ b/plotly/validators/splom/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="splom.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_ticktextsrc.py b/plotly/validators/splom/marker/colorbar/_ticktextsrc.py index bad3971079..8f26adac03 100644 --- a/plotly/validators/splom/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/splom/marker/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="splom.marker.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_tickvals.py b/plotly/validators/splom/marker/colorbar/_tickvals.py index 885a2e359a..7d9447e1f0 100644 --- a/plotly/validators/splom/marker/colorbar/_tickvals.py +++ b/plotly/validators/splom/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="splom.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_tickvalssrc.py b/plotly/validators/splom/marker/colorbar/_tickvalssrc.py index dd9bb74dc4..4258f8b250 100644 --- a/plotly/validators/splom/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/splom/marker/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="splom.marker.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_tickwidth.py b/plotly/validators/splom/marker/colorbar/_tickwidth.py index 968c61efc4..513c80eda7 100644 --- a/plotly/validators/splom/marker/colorbar/_tickwidth.py +++ b/plotly/validators/splom/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="splom.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_title.py b/plotly/validators/splom/marker/colorbar/_title.py index 009b868098..5f70edc772 100644 --- a/plotly/validators/splom/marker/colorbar/_title.py +++ b/plotly/validators/splom/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="splom.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_x.py b/plotly/validators/splom/marker/colorbar/_x.py index 86781bea2d..ff35e9f8f6 100644 --- a/plotly/validators/splom/marker/colorbar/_x.py +++ b/plotly/validators/splom/marker/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="splom.marker.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_xanchor.py b/plotly/validators/splom/marker/colorbar/_xanchor.py index 2c6c0315a7..5b58e9cf00 100644 --- a/plotly/validators/splom/marker/colorbar/_xanchor.py +++ b/plotly/validators/splom/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="splom.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_xpad.py b/plotly/validators/splom/marker/colorbar/_xpad.py index 4a67e6ecb2..95a7abd8c7 100644 --- a/plotly/validators/splom/marker/colorbar/_xpad.py +++ b/plotly/validators/splom/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="splom.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_xref.py b/plotly/validators/splom/marker/colorbar/_xref.py index 85a16f86e6..d1aaebbd98 100644 --- a/plotly/validators/splom/marker/colorbar/_xref.py +++ b/plotly/validators/splom/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="splom.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_y.py b/plotly/validators/splom/marker/colorbar/_y.py index 1ce993457d..dbde4d81cc 100644 --- a/plotly/validators/splom/marker/colorbar/_y.py +++ b/plotly/validators/splom/marker/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="splom.marker.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/_yanchor.py b/plotly/validators/splom/marker/colorbar/_yanchor.py index db3ddd987e..84f8dc729e 100644 --- a/plotly/validators/splom/marker/colorbar/_yanchor.py +++ b/plotly/validators/splom/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="splom.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_ypad.py b/plotly/validators/splom/marker/colorbar/_ypad.py index 3f1ab55e29..c1326bff85 100644 --- a/plotly/validators/splom/marker/colorbar/_ypad.py +++ b/plotly/validators/splom/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="splom.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/_yref.py b/plotly/validators/splom/marker/colorbar/_yref.py index 9570dca062..ad5f1679d1 100644 --- a/plotly/validators/splom/marker/colorbar/_yref.py +++ b/plotly/validators/splom/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="splom.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/tickfont/__init__.py b/plotly/validators/splom/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_color.py b/plotly/validators/splom/marker/colorbar/tickfont/_color.py index 70b08dec01..1dbe5544ea 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_family.py b/plotly/validators/splom/marker/colorbar/tickfont/_family.py index 4e92631969..d7c0491836 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/splom/marker/colorbar/tickfont/_lineposition.py index a6e4d7db42..b84372a338 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_shadow.py b/plotly/validators/splom/marker/colorbar/tickfont/_shadow.py index 36be360614..f973b88c37 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_size.py b/plotly/validators/splom/marker/colorbar/tickfont/_size.py index f5edd4bd9f..411b7cd183 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.marker.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_style.py b/plotly/validators/splom/marker/colorbar/tickfont/_style.py index 4cfece7d15..fb6abe5815 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_textcase.py b/plotly/validators/splom/marker/colorbar/tickfont/_textcase.py index 57827e8cfb..78f819f1e7 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_variant.py b/plotly/validators/splom/marker/colorbar/tickfont/_variant.py index 9b719133d9..836686fa27 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/splom/marker/colorbar/tickfont/_weight.py b/plotly/validators/splom/marker/colorbar/tickfont/_weight.py index 217ce3f41c..1e7fbe7ba9 100644 --- a/plotly/validators/splom/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/splom/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="splom.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/splom/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py index 063702eb05..853c08280d 100644 --- a/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/splom/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="splom.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py index 34d90d696e..4d53bdafbb 100644 --- a/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/splom/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="splom.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py b/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py index a63e1fc7a4..855e2e2b6f 100644 --- a/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/splom/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="splom.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py index 7d8c32d9c0..20c5e2c577 100644 --- a/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/splom/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="splom.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py b/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py index 778cba3e88..9934af0871 100644 --- a/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/splom/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="splom.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/title/__init__.py b/plotly/validators/splom/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/splom/marker/colorbar/title/__init__.py +++ b/plotly/validators/splom/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/splom/marker/colorbar/title/_font.py b/plotly/validators/splom/marker/colorbar/title/_font.py index 2fe8f613e4..6259f1b9fd 100644 --- a/plotly/validators/splom/marker/colorbar/title/_font.py +++ b/plotly/validators/splom/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="splom.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/title/_side.py b/plotly/validators/splom/marker/colorbar/title/_side.py index 27ffa9f8b6..37eabd3446 100644 --- a/plotly/validators/splom/marker/colorbar/title/_side.py +++ b/plotly/validators/splom/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="splom.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/title/_text.py b/plotly/validators/splom/marker/colorbar/title/_text.py index 319d24b380..0d956a2a24 100644 --- a/plotly/validators/splom/marker/colorbar/title/_text.py +++ b/plotly/validators/splom/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="splom.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/title/font/__init__.py b/plotly/validators/splom/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/splom/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/splom/marker/colorbar/title/font/_color.py b/plotly/validators/splom/marker/colorbar/title/font/_color.py index 883525b62f..4fe131b731 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_color.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/title/font/_family.py b/plotly/validators/splom/marker/colorbar/title/font/_family.py index dd90640b54..466ba049d1 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_family.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/splom/marker/colorbar/title/font/_lineposition.py b/plotly/validators/splom/marker/colorbar/title/font/_lineposition.py index b02be928ed..9daaab6de2 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/splom/marker/colorbar/title/font/_shadow.py b/plotly/validators/splom/marker/colorbar/title/font/_shadow.py index 0dd2f9a954..f4a68107aa 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/splom/marker/colorbar/title/font/_size.py b/plotly/validators/splom/marker/colorbar/title/font/_size.py index 37341fbf42..45667602c2 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_size.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/title/font/_style.py b/plotly/validators/splom/marker/colorbar/title/font/_style.py index e0fa35e0a0..ce59c36090 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_style.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/title/font/_textcase.py b/plotly/validators/splom/marker/colorbar/title/font/_textcase.py index 7c20ad1a3b..73736a1fcd 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/splom/marker/colorbar/title/font/_variant.py b/plotly/validators/splom/marker/colorbar/title/font/_variant.py index 3729a3900e..e87371c22c 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/splom/marker/colorbar/title/font/_weight.py b/plotly/validators/splom/marker/colorbar/title/font/_weight.py index 9b7e501e88..caed511e64 100644 --- a/plotly/validators/splom/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/splom/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="splom.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/splom/marker/line/__init__.py b/plotly/validators/splom/marker/line/__init__.py index facbe33f88..4ba3ea340b 100644 --- a/plotly/validators/splom/marker/line/__init__.py +++ b/plotly/validators/splom/marker/line/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._reversescale import ReversescaleValidator - from ._colorsrc import ColorsrcValidator - from ._colorscale import ColorscaleValidator - from ._coloraxis import ColoraxisValidator - from ._color import ColorValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._reversescale.ReversescaleValidator", - "._colorsrc.ColorsrcValidator", - "._colorscale.ColorscaleValidator", - "._coloraxis.ColoraxisValidator", - "._color.ColorValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._reversescale.ReversescaleValidator", + "._colorsrc.ColorsrcValidator", + "._colorscale.ColorscaleValidator", + "._coloraxis.ColoraxisValidator", + "._color.ColorValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/splom/marker/line/_autocolorscale.py b/plotly/validators/splom/marker/line/_autocolorscale.py index 99950c8a33..dd0e533bde 100644 --- a/plotly/validators/splom/marker/line/_autocolorscale.py +++ b/plotly/validators/splom/marker/line/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="splom.marker.line", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/splom/marker/line/_cauto.py b/plotly/validators/splom/marker/line/_cauto.py index 66f346df8e..82fc598cc6 100644 --- a/plotly/validators/splom/marker/line/_cauto.py +++ b/plotly/validators/splom/marker/line/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="splom.marker.line", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/splom/marker/line/_cmax.py b/plotly/validators/splom/marker/line/_cmax.py index 4b38566d8f..d2e3f116b8 100644 --- a/plotly/validators/splom/marker/line/_cmax.py +++ b/plotly/validators/splom/marker/line/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="splom.marker.line", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/splom/marker/line/_cmid.py b/plotly/validators/splom/marker/line/_cmid.py index b1277f8e3e..8d68eaf5e6 100644 --- a/plotly/validators/splom/marker/line/_cmid.py +++ b/plotly/validators/splom/marker/line/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="splom.marker.line", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/splom/marker/line/_cmin.py b/plotly/validators/splom/marker/line/_cmin.py index e6e9e4b1cc..3de09c45cf 100644 --- a/plotly/validators/splom/marker/line/_cmin.py +++ b/plotly/validators/splom/marker/line/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="splom.marker.line", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/splom/marker/line/_color.py b/plotly/validators/splom/marker/line/_color.py index 5924e45bda..724bad0ed2 100644 --- a/plotly/validators/splom/marker/line/_color.py +++ b/plotly/validators/splom/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="splom.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), colorscale_path=kwargs.pop( diff --git a/plotly/validators/splom/marker/line/_coloraxis.py b/plotly/validators/splom/marker/line/_coloraxis.py index 8cb2af6690..6662537e2a 100644 --- a/plotly/validators/splom/marker/line/_coloraxis.py +++ b/plotly/validators/splom/marker/line/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="splom.marker.line", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/splom/marker/line/_colorscale.py b/plotly/validators/splom/marker/line/_colorscale.py index e5dc89a528..5dd3b62985 100644 --- a/plotly/validators/splom/marker/line/_colorscale.py +++ b/plotly/validators/splom/marker/line/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="splom.marker.line", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/splom/marker/line/_colorsrc.py b/plotly/validators/splom/marker/line/_colorsrc.py index 9f3b739388..cc98df87d7 100644 --- a/plotly/validators/splom/marker/line/_colorsrc.py +++ b/plotly/validators/splom/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="splom.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/marker/line/_reversescale.py b/plotly/validators/splom/marker/line/_reversescale.py index 8777171cf8..03f439f41e 100644 --- a/plotly/validators/splom/marker/line/_reversescale.py +++ b/plotly/validators/splom/marker/line/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="splom.marker.line", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/splom/marker/line/_width.py b/plotly/validators/splom/marker/line/_width.py index 67fad79c09..4551304262 100644 --- a/plotly/validators/splom/marker/line/_width.py +++ b/plotly/validators/splom/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="splom.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/splom/marker/line/_widthsrc.py b/plotly/validators/splom/marker/line/_widthsrc.py index 5a7df83ac6..63b67e8bad 100644 --- a/plotly/validators/splom/marker/line/_widthsrc.py +++ b/plotly/validators/splom/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="splom.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/splom/selected/__init__.py b/plotly/validators/splom/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/splom/selected/__init__.py +++ b/plotly/validators/splom/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/splom/selected/_marker.py b/plotly/validators/splom/selected/_marker.py index dfdfc3e2da..29a502b78a 100644 --- a/plotly/validators/splom/selected/_marker.py +++ b/plotly/validators/splom/selected/_marker.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="splom.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/splom/selected/marker/__init__.py b/plotly/validators/splom/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/splom/selected/marker/__init__.py +++ b/plotly/validators/splom/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/splom/selected/marker/_color.py b/plotly/validators/splom/selected/marker/_color.py index 4c6eb7afc4..e87ddec98f 100644 --- a/plotly/validators/splom/selected/marker/_color.py +++ b/plotly/validators/splom/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="splom.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/selected/marker/_opacity.py b/plotly/validators/splom/selected/marker/_opacity.py index f91c2704b6..c75b93f002 100644 --- a/plotly/validators/splom/selected/marker/_opacity.py +++ b/plotly/validators/splom/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="splom.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/splom/selected/marker/_size.py b/plotly/validators/splom/selected/marker/_size.py index 455a2833ea..a36c53feab 100644 --- a/plotly/validators/splom/selected/marker/_size.py +++ b/plotly/validators/splom/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/splom/stream/__init__.py b/plotly/validators/splom/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/splom/stream/__init__.py +++ b/plotly/validators/splom/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/splom/stream/_maxpoints.py b/plotly/validators/splom/stream/_maxpoints.py index 6c15796af5..8b6800c936 100644 --- a/plotly/validators/splom/stream/_maxpoints.py +++ b/plotly/validators/splom/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="splom.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/splom/stream/_token.py b/plotly/validators/splom/stream/_token.py index 095a71fb22..ee18398784 100644 --- a/plotly/validators/splom/stream/_token.py +++ b/plotly/validators/splom/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="splom.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/splom/unselected/__init__.py b/plotly/validators/splom/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/splom/unselected/__init__.py +++ b/plotly/validators/splom/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/splom/unselected/_marker.py b/plotly/validators/splom/unselected/_marker.py index 5030c7a350..08368d367f 100644 --- a/plotly/validators/splom/unselected/_marker.py +++ b/plotly/validators/splom/unselected/_marker.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="splom.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/splom/unselected/marker/__init__.py b/plotly/validators/splom/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/splom/unselected/marker/__init__.py +++ b/plotly/validators/splom/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/splom/unselected/marker/_color.py b/plotly/validators/splom/unselected/marker/_color.py index a20e158b1e..0d2f9da60d 100644 --- a/plotly/validators/splom/unselected/marker/_color.py +++ b/plotly/validators/splom/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="splom.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/splom/unselected/marker/_opacity.py b/plotly/validators/splom/unselected/marker/_opacity.py index 85453eb5c8..56854a1f5a 100644 --- a/plotly/validators/splom/unselected/marker/_opacity.py +++ b/plotly/validators/splom/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="splom.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/splom/unselected/marker/_size.py b/plotly/validators/splom/unselected/marker/_size.py index 5f80f39c7b..b802653eb7 100644 --- a/plotly/validators/splom/unselected/marker/_size.py +++ b/plotly/validators/splom/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="splom.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/__init__.py b/plotly/validators/streamtube/__init__.py index 7d348e38db..fe2655fb12 100644 --- a/plotly/validators/streamtube/__init__.py +++ b/plotly/validators/streamtube/__init__.py @@ -1,131 +1,68 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._x import XValidator - from ._wsrc import WsrcValidator - from ._whoverformat import WhoverformatValidator - from ._w import WValidator - from ._vsrc import VsrcValidator - from ._visible import VisibleValidator - from ._vhoverformat import VhoverformatValidator - from ._v import VValidator - from ._usrc import UsrcValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._uhoverformat import UhoverformatValidator - from ._u import UValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._starts import StartsValidator - from ._sizeref import SizerefValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._reversescale import ReversescaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._maxdisplayed import MaxdisplayedValidator - from ._lightposition import LightpositionValidator - from ._lighting import LightingValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._x.XValidator", - "._wsrc.WsrcValidator", - "._whoverformat.WhoverformatValidator", - "._w.WValidator", - "._vsrc.VsrcValidator", - "._visible.VisibleValidator", - "._vhoverformat.VhoverformatValidator", - "._v.VValidator", - "._usrc.UsrcValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._uhoverformat.UhoverformatValidator", - "._u.UValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._starts.StartsValidator", - "._sizeref.SizerefValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._reversescale.ReversescaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._maxdisplayed.MaxdisplayedValidator", - "._lightposition.LightpositionValidator", - "._lighting.LightingValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._x.XValidator", + "._wsrc.WsrcValidator", + "._whoverformat.WhoverformatValidator", + "._w.WValidator", + "._vsrc.VsrcValidator", + "._visible.VisibleValidator", + "._vhoverformat.VhoverformatValidator", + "._v.VValidator", + "._usrc.UsrcValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._uhoverformat.UhoverformatValidator", + "._u.UValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._starts.StartsValidator", + "._sizeref.SizerefValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdisplayed.MaxdisplayedValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/streamtube/_autocolorscale.py b/plotly/validators/streamtube/_autocolorscale.py index e447511e6f..373b0b2fb3 100644 --- a/plotly/validators/streamtube/_autocolorscale.py +++ b/plotly/validators/streamtube/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="streamtube", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/streamtube/_cauto.py b/plotly/validators/streamtube/_cauto.py index 414e80020a..d9f423541e 100644 --- a/plotly/validators/streamtube/_cauto.py +++ b/plotly/validators/streamtube/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="streamtube", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/streamtube/_cmax.py b/plotly/validators/streamtube/_cmax.py index 43ceb30505..fe3184b8cc 100644 --- a/plotly/validators/streamtube/_cmax.py +++ b/plotly/validators/streamtube/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="streamtube", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/streamtube/_cmid.py b/plotly/validators/streamtube/_cmid.py index 8c5d588529..ec9971d8fd 100644 --- a/plotly/validators/streamtube/_cmid.py +++ b/plotly/validators/streamtube/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="streamtube", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/streamtube/_cmin.py b/plotly/validators/streamtube/_cmin.py index ceaf33c30a..72d9bd234a 100644 --- a/plotly/validators/streamtube/_cmin.py +++ b/plotly/validators/streamtube/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="streamtube", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/streamtube/_coloraxis.py b/plotly/validators/streamtube/_coloraxis.py index 611512d151..a06ab63140 100644 --- a/plotly/validators/streamtube/_coloraxis.py +++ b/plotly/validators/streamtube/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="streamtube", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/streamtube/_colorbar.py b/plotly/validators/streamtube/_colorbar.py index bc5426a7d3..c77301ac72 100644 --- a/plotly/validators/streamtube/_colorbar.py +++ b/plotly/validators/streamtube/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="streamtube", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.streamt - ube.colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.streamtube.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of streamtube.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.streamtube.colorba - r.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_colorscale.py b/plotly/validators/streamtube/_colorscale.py index 11f29c538b..f3181d40bd 100644 --- a/plotly/validators/streamtube/_colorscale.py +++ b/plotly/validators/streamtube/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="streamtube", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/streamtube/_customdata.py b/plotly/validators/streamtube/_customdata.py index 4425ae6ee6..64d7768450 100644 --- a/plotly/validators/streamtube/_customdata.py +++ b/plotly/validators/streamtube/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="streamtube", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_customdatasrc.py b/plotly/validators/streamtube/_customdatasrc.py index 5c11d487e0..5531dfc0bd 100644 --- a/plotly/validators/streamtube/_customdatasrc.py +++ b/plotly/validators/streamtube/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="streamtube", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_hoverinfo.py b/plotly/validators/streamtube/_hoverinfo.py index 45d16d16d5..c81150b32b 100644 --- a/plotly/validators/streamtube/_hoverinfo.py +++ b/plotly/validators/streamtube/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="streamtube", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/streamtube/_hoverinfosrc.py b/plotly/validators/streamtube/_hoverinfosrc.py index 4394473d4b..9199299f1d 100644 --- a/plotly/validators/streamtube/_hoverinfosrc.py +++ b/plotly/validators/streamtube/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="streamtube", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_hoverlabel.py b/plotly/validators/streamtube/_hoverlabel.py index 53844d700d..5ff800be0a 100644 --- a/plotly/validators/streamtube/_hoverlabel.py +++ b/plotly/validators/streamtube/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="streamtube", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_hovertemplate.py b/plotly/validators/streamtube/_hovertemplate.py index 4b569bdfd8..5964d1ccb8 100644 --- a/plotly/validators/streamtube/_hovertemplate.py +++ b/plotly/validators/streamtube/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="streamtube", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/streamtube/_hovertemplatesrc.py b/plotly/validators/streamtube/_hovertemplatesrc.py index 01f77c33d2..45ebb6ae01 100644 --- a/plotly/validators/streamtube/_hovertemplatesrc.py +++ b/plotly/validators/streamtube/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="streamtube", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_hovertext.py b/plotly/validators/streamtube/_hovertext.py index 99c3fe86c3..63ef96fe2e 100644 --- a/plotly/validators/streamtube/_hovertext.py +++ b/plotly/validators/streamtube/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="streamtube", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_ids.py b/plotly/validators/streamtube/_ids.py index adf0b313b9..2253cb5467 100644 --- a/plotly/validators/streamtube/_ids.py +++ b/plotly/validators/streamtube/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="streamtube", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_idssrc.py b/plotly/validators/streamtube/_idssrc.py index 0c1cdbb318..f377940dd6 100644 --- a/plotly/validators/streamtube/_idssrc.py +++ b/plotly/validators/streamtube/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="streamtube", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_legend.py b/plotly/validators/streamtube/_legend.py index b1f936142d..080451efa4 100644 --- a/plotly/validators/streamtube/_legend.py +++ b/plotly/validators/streamtube/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="streamtube", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/streamtube/_legendgroup.py b/plotly/validators/streamtube/_legendgroup.py index 218ac4ec09..5f3363e46d 100644 --- a/plotly/validators/streamtube/_legendgroup.py +++ b/plotly/validators/streamtube/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="streamtube", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/_legendgrouptitle.py b/plotly/validators/streamtube/_legendgrouptitle.py index 569c818373..9fd095ff86 100644 --- a/plotly/validators/streamtube/_legendgrouptitle.py +++ b/plotly/validators/streamtube/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="streamtube", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_legendrank.py b/plotly/validators/streamtube/_legendrank.py index 76556da110..2bfe28681b 100644 --- a/plotly/validators/streamtube/_legendrank.py +++ b/plotly/validators/streamtube/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="streamtube", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/_legendwidth.py b/plotly/validators/streamtube/_legendwidth.py index faaea815d4..8b68dfa1c6 100644 --- a/plotly/validators/streamtube/_legendwidth.py +++ b/plotly/validators/streamtube/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="streamtube", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/_lighting.py b/plotly/validators/streamtube/_lighting.py index ba907df800..557f338385 100644 --- a/plotly/validators/streamtube/_lighting.py +++ b/plotly/validators/streamtube/_lighting.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lighting", parent_name="streamtube", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lighting"), data_docs=kwargs.pop( "data_docs", """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_lightposition.py b/plotly/validators/streamtube/_lightposition.py index e60f1e5fe0..96d3c881f9 100644 --- a/plotly/validators/streamtube/_lightposition.py +++ b/plotly/validators/streamtube/_lightposition.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightpositionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="streamtube", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lightposition"), data_docs=kwargs.pop( "data_docs", """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_maxdisplayed.py b/plotly/validators/streamtube/_maxdisplayed.py index 248040d0d4..e440e9b4c3 100644 --- a/plotly/validators/streamtube/_maxdisplayed.py +++ b/plotly/validators/streamtube/_maxdisplayed.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdisplayedValidator(_plotly_utils.basevalidators.IntegerValidator): +class MaxdisplayedValidator(_bv.IntegerValidator): def __init__(self, plotly_name="maxdisplayed", parent_name="streamtube", **kwargs): - super(MaxdisplayedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/_meta.py b/plotly/validators/streamtube/_meta.py index 186fe35729..a93ec68dd5 100644 --- a/plotly/validators/streamtube/_meta.py +++ b/plotly/validators/streamtube/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="streamtube", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/streamtube/_metasrc.py b/plotly/validators/streamtube/_metasrc.py index c886449d3b..5b0f0b30e3 100644 --- a/plotly/validators/streamtube/_metasrc.py +++ b/plotly/validators/streamtube/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="streamtube", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_name.py b/plotly/validators/streamtube/_name.py index 003840f163..625403b8cc 100644 --- a/plotly/validators/streamtube/_name.py +++ b/plotly/validators/streamtube/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="streamtube", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/_opacity.py b/plotly/validators/streamtube/_opacity.py index 4ae578cf1e..2a3a1e3ad1 100644 --- a/plotly/validators/streamtube/_opacity.py +++ b/plotly/validators/streamtube/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="streamtube", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/_reversescale.py b/plotly/validators/streamtube/_reversescale.py index ae47d52088..d0c643f61c 100644 --- a/plotly/validators/streamtube/_reversescale.py +++ b/plotly/validators/streamtube/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="streamtube", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/streamtube/_scene.py b/plotly/validators/streamtube/_scene.py index d822a1afcb..5b003bb411 100644 --- a/plotly/validators/streamtube/_scene.py +++ b/plotly/validators/streamtube/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="streamtube", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/streamtube/_showlegend.py b/plotly/validators/streamtube/_showlegend.py index b61d95f0c9..57bb5db3f9 100644 --- a/plotly/validators/streamtube/_showlegend.py +++ b/plotly/validators/streamtube/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="streamtube", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/_showscale.py b/plotly/validators/streamtube/_showscale.py index 3603ae703d..e8b8cdafb2 100644 --- a/plotly/validators/streamtube/_showscale.py +++ b/plotly/validators/streamtube/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="streamtube", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_sizeref.py b/plotly/validators/streamtube/_sizeref.py index 355171d41f..fab34a9232 100644 --- a/plotly/validators/streamtube/_sizeref.py +++ b/plotly/validators/streamtube/_sizeref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): +class SizerefValidator(_bv.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="streamtube", **kwargs): - super(SizerefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/_starts.py b/plotly/validators/streamtube/_starts.py index 0ec1167db4..d0b728263e 100644 --- a/plotly/validators/streamtube/_starts.py +++ b/plotly/validators/streamtube/_starts.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartsValidator(_plotly_utils.basevalidators.CompoundValidator): +class StartsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="starts", parent_name="streamtube", **kwargs): - super(StartsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Starts"), data_docs=kwargs.pop( "data_docs", """ - x - Sets the x components of the starting position - of the streamtubes - xsrc - Sets the source reference on Chart Studio Cloud - for `x`. - y - Sets the y components of the starting position - of the streamtubes - ysrc - Sets the source reference on Chart Studio Cloud - for `y`. - z - Sets the z components of the starting position - of the streamtubes - zsrc - Sets the source reference on Chart Studio Cloud - for `z`. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_stream.py b/plotly/validators/streamtube/_stream.py index 3e5eb1763c..3c4e5d216a 100644 --- a/plotly/validators/streamtube/_stream.py +++ b/plotly/validators/streamtube/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="streamtube", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/streamtube/_text.py b/plotly/validators/streamtube/_text.py index 3951ed05ab..c0579ed94f 100644 --- a/plotly/validators/streamtube/_text.py +++ b/plotly/validators/streamtube/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="streamtube", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_u.py b/plotly/validators/streamtube/_u.py index e7ec4cc382..8009675e8b 100644 --- a/plotly/validators/streamtube/_u.py +++ b/plotly/validators/streamtube/_u.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UValidator(_plotly_utils.basevalidators.DataArrayValidator): +class UValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="u", parent_name="streamtube", **kwargs): - super(UValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_uhoverformat.py b/plotly/validators/streamtube/_uhoverformat.py index 4b16121790..c24d63f866 100644 --- a/plotly/validators/streamtube/_uhoverformat.py +++ b/plotly/validators/streamtube/_uhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class UhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="uhoverformat", parent_name="streamtube", **kwargs): - super(UhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_uid.py b/plotly/validators/streamtube/_uid.py index 9938691c23..d47690ee40 100644 --- a/plotly/validators/streamtube/_uid.py +++ b/plotly/validators/streamtube/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="streamtube", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/streamtube/_uirevision.py b/plotly/validators/streamtube/_uirevision.py index a33d8dd6d6..60a98b8a62 100644 --- a/plotly/validators/streamtube/_uirevision.py +++ b/plotly/validators/streamtube/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="streamtube", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_usrc.py b/plotly/validators/streamtube/_usrc.py index e9de223849..ad2b1cdac6 100644 --- a/plotly/validators/streamtube/_usrc.py +++ b/plotly/validators/streamtube/_usrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class UsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="usrc", parent_name="streamtube", **kwargs): - super(UsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_v.py b/plotly/validators/streamtube/_v.py index 0131b6abb1..8560d5d681 100644 --- a/plotly/validators/streamtube/_v.py +++ b/plotly/validators/streamtube/_v.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VValidator(_plotly_utils.basevalidators.DataArrayValidator): +class VValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="v", parent_name="streamtube", **kwargs): - super(VValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_vhoverformat.py b/plotly/validators/streamtube/_vhoverformat.py index 3be49278bb..bb01c4ccd9 100644 --- a/plotly/validators/streamtube/_vhoverformat.py +++ b/plotly/validators/streamtube/_vhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class VhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="vhoverformat", parent_name="streamtube", **kwargs): - super(VhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_visible.py b/plotly/validators/streamtube/_visible.py index 2c718733e8..ce92b8351d 100644 --- a/plotly/validators/streamtube/_visible.py +++ b/plotly/validators/streamtube/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="streamtube", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/streamtube/_vsrc.py b/plotly/validators/streamtube/_vsrc.py index db01a54b0c..105f042698 100644 --- a/plotly/validators/streamtube/_vsrc.py +++ b/plotly/validators/streamtube/_vsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="vsrc", parent_name="streamtube", **kwargs): - super(VsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_w.py b/plotly/validators/streamtube/_w.py index 9350bc9678..7d0a32b117 100644 --- a/plotly/validators/streamtube/_w.py +++ b/plotly/validators/streamtube/_w.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WValidator(_plotly_utils.basevalidators.DataArrayValidator): +class WValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="w", parent_name="streamtube", **kwargs): - super(WValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/_whoverformat.py b/plotly/validators/streamtube/_whoverformat.py index d78f9bce9a..6ad66c30e9 100644 --- a/plotly/validators/streamtube/_whoverformat.py +++ b/plotly/validators/streamtube/_whoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class WhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="whoverformat", parent_name="streamtube", **kwargs): - super(WhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_wsrc.py b/plotly/validators/streamtube/_wsrc.py index d75a7cd8a0..014290432c 100644 --- a/plotly/validators/streamtube/_wsrc.py +++ b/plotly/validators/streamtube/_wsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="wsrc", parent_name="streamtube", **kwargs): - super(WsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_x.py b/plotly/validators/streamtube/_x.py index b294dd179e..e432c67129 100644 --- a/plotly/validators/streamtube/_x.py +++ b/plotly/validators/streamtube/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="streamtube", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/streamtube/_xhoverformat.py b/plotly/validators/streamtube/_xhoverformat.py index 0228a1c2a6..204c409aa0 100644 --- a/plotly/validators/streamtube/_xhoverformat.py +++ b/plotly/validators/streamtube/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="streamtube", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_xsrc.py b/plotly/validators/streamtube/_xsrc.py index 50f8d922ae..3fd4cd95db 100644 --- a/plotly/validators/streamtube/_xsrc.py +++ b/plotly/validators/streamtube/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="streamtube", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_y.py b/plotly/validators/streamtube/_y.py index e7da1a0ec0..a5f026d81f 100644 --- a/plotly/validators/streamtube/_y.py +++ b/plotly/validators/streamtube/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="streamtube", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/streamtube/_yhoverformat.py b/plotly/validators/streamtube/_yhoverformat.py index 41799faa34..37e66a6ef6 100644 --- a/plotly/validators/streamtube/_yhoverformat.py +++ b/plotly/validators/streamtube/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="streamtube", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_ysrc.py b/plotly/validators/streamtube/_ysrc.py index cd48e23479..64a41f1972 100644 --- a/plotly/validators/streamtube/_ysrc.py +++ b/plotly/validators/streamtube/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="streamtube", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_z.py b/plotly/validators/streamtube/_z.py index 65b3ff9f01..3f82e93c63 100644 --- a/plotly/validators/streamtube/_z.py +++ b/plotly/validators/streamtube/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="streamtube", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/streamtube/_zhoverformat.py b/plotly/validators/streamtube/_zhoverformat.py index a14d8c71b4..6b4ca844b1 100644 --- a/plotly/validators/streamtube/_zhoverformat.py +++ b/plotly/validators/streamtube/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="streamtube", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/_zsrc.py b/plotly/validators/streamtube/_zsrc.py index 8f49330813..48fd654183 100644 --- a/plotly/validators/streamtube/_zsrc.py +++ b/plotly/validators/streamtube/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="streamtube", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/__init__.py b/plotly/validators/streamtube/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/streamtube/colorbar/__init__.py +++ b/plotly/validators/streamtube/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/streamtube/colorbar/_bgcolor.py b/plotly/validators/streamtube/colorbar/_bgcolor.py index afc98aa58c..ac847adc37 100644 --- a/plotly/validators/streamtube/colorbar/_bgcolor.py +++ b/plotly/validators/streamtube/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="streamtube.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_bordercolor.py b/plotly/validators/streamtube/colorbar/_bordercolor.py index 88c898dc75..fad1c6d79f 100644 --- a/plotly/validators/streamtube/colorbar/_bordercolor.py +++ b/plotly/validators/streamtube/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="streamtube.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_borderwidth.py b/plotly/validators/streamtube/colorbar/_borderwidth.py index 96b856de1d..e8a16e5945 100644 --- a/plotly/validators/streamtube/colorbar/_borderwidth.py +++ b/plotly/validators/streamtube/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="streamtube.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_dtick.py b/plotly/validators/streamtube/colorbar/_dtick.py index 853af5c2d8..2f09764aa3 100644 --- a/plotly/validators/streamtube/colorbar/_dtick.py +++ b/plotly/validators/streamtube/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="streamtube.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_exponentformat.py b/plotly/validators/streamtube/colorbar/_exponentformat.py index bfe98963f5..6a8daa2b6a 100644 --- a/plotly/validators/streamtube/colorbar/_exponentformat.py +++ b/plotly/validators/streamtube/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="streamtube.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_labelalias.py b/plotly/validators/streamtube/colorbar/_labelalias.py index 38050c0e4d..498450128f 100644 --- a/plotly/validators/streamtube/colorbar/_labelalias.py +++ b/plotly/validators/streamtube/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="streamtube.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_len.py b/plotly/validators/streamtube/colorbar/_len.py index 936737c866..cb72533803 100644 --- a/plotly/validators/streamtube/colorbar/_len.py +++ b/plotly/validators/streamtube/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="streamtube.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_lenmode.py b/plotly/validators/streamtube/colorbar/_lenmode.py index 02b6395cf2..71b79a5a17 100644 --- a/plotly/validators/streamtube/colorbar/_lenmode.py +++ b/plotly/validators/streamtube/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="streamtube.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_minexponent.py b/plotly/validators/streamtube/colorbar/_minexponent.py index 830e04a948..8639769cff 100644 --- a/plotly/validators/streamtube/colorbar/_minexponent.py +++ b/plotly/validators/streamtube/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="streamtube.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_nticks.py b/plotly/validators/streamtube/colorbar/_nticks.py index b54fdb29cf..aed01e17e7 100644 --- a/plotly/validators/streamtube/colorbar/_nticks.py +++ b/plotly/validators/streamtube/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="streamtube.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_orientation.py b/plotly/validators/streamtube/colorbar/_orientation.py index f9b5c827f8..1142604cd3 100644 --- a/plotly/validators/streamtube/colorbar/_orientation.py +++ b/plotly/validators/streamtube/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="streamtube.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_outlinecolor.py b/plotly/validators/streamtube/colorbar/_outlinecolor.py index c8a4679d8b..63c5b6d6ea 100644 --- a/plotly/validators/streamtube/colorbar/_outlinecolor.py +++ b/plotly/validators/streamtube/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="streamtube.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_outlinewidth.py b/plotly/validators/streamtube/colorbar/_outlinewidth.py index 753a45ac36..8009b3b570 100644 --- a/plotly/validators/streamtube/colorbar/_outlinewidth.py +++ b/plotly/validators/streamtube/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="streamtube.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_separatethousands.py b/plotly/validators/streamtube/colorbar/_separatethousands.py index d6f9766ed8..3d585bcb68 100644 --- a/plotly/validators/streamtube/colorbar/_separatethousands.py +++ b/plotly/validators/streamtube/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="streamtube.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_showexponent.py b/plotly/validators/streamtube/colorbar/_showexponent.py index 703ce133ff..aa19070eb6 100644 --- a/plotly/validators/streamtube/colorbar/_showexponent.py +++ b/plotly/validators/streamtube/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="streamtube.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_showticklabels.py b/plotly/validators/streamtube/colorbar/_showticklabels.py index fc429b3d55..c2c3984fa0 100644 --- a/plotly/validators/streamtube/colorbar/_showticklabels.py +++ b/plotly/validators/streamtube/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="streamtube.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_showtickprefix.py b/plotly/validators/streamtube/colorbar/_showtickprefix.py index cc8e45420d..d9c5ab51c7 100644 --- a/plotly/validators/streamtube/colorbar/_showtickprefix.py +++ b/plotly/validators/streamtube/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="streamtube.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_showticksuffix.py b/plotly/validators/streamtube/colorbar/_showticksuffix.py index f23db30ca6..dd29375f14 100644 --- a/plotly/validators/streamtube/colorbar/_showticksuffix.py +++ b/plotly/validators/streamtube/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="streamtube.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_thickness.py b/plotly/validators/streamtube/colorbar/_thickness.py index 3e63ef6c3e..12f9884d13 100644 --- a/plotly/validators/streamtube/colorbar/_thickness.py +++ b/plotly/validators/streamtube/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="streamtube.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_thicknessmode.py b/plotly/validators/streamtube/colorbar/_thicknessmode.py index d20234921d..90ffed1f62 100644 --- a/plotly/validators/streamtube/colorbar/_thicknessmode.py +++ b/plotly/validators/streamtube/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="streamtube.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_tick0.py b/plotly/validators/streamtube/colorbar/_tick0.py index 8dbe26870b..25f157f7ff 100644 --- a/plotly/validators/streamtube/colorbar/_tick0.py +++ b/plotly/validators/streamtube/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="streamtube.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_tickangle.py b/plotly/validators/streamtube/colorbar/_tickangle.py index cb7849a949..3e14d069ee 100644 --- a/plotly/validators/streamtube/colorbar/_tickangle.py +++ b/plotly/validators/streamtube/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="streamtube.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_tickcolor.py b/plotly/validators/streamtube/colorbar/_tickcolor.py index 3bacdd2502..6ce83f8078 100644 --- a/plotly/validators/streamtube/colorbar/_tickcolor.py +++ b/plotly/validators/streamtube/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="streamtube.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_tickfont.py b/plotly/validators/streamtube/colorbar/_tickfont.py index 4df707496b..007b2be813 100644 --- a/plotly/validators/streamtube/colorbar/_tickfont.py +++ b/plotly/validators/streamtube/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="streamtube.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_tickformat.py b/plotly/validators/streamtube/colorbar/_tickformat.py index d234c524ce..4345e1afb2 100644 --- a/plotly/validators/streamtube/colorbar/_tickformat.py +++ b/plotly/validators/streamtube/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="streamtube.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py b/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py index 9de961159d..a5b2ad401a 100644 --- a/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/streamtube/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="streamtube.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/streamtube/colorbar/_tickformatstops.py b/plotly/validators/streamtube/colorbar/_tickformatstops.py index 0957e2e880..1b734c07e4 100644 --- a/plotly/validators/streamtube/colorbar/_tickformatstops.py +++ b/plotly/validators/streamtube/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="streamtube.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_ticklabeloverflow.py b/plotly/validators/streamtube/colorbar/_ticklabeloverflow.py index 52c9ad0a53..071b5ebabe 100644 --- a/plotly/validators/streamtube/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/streamtube/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="streamtube.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_ticklabelposition.py b/plotly/validators/streamtube/colorbar/_ticklabelposition.py index ab5387fcbb..0011298d5f 100644 --- a/plotly/validators/streamtube/colorbar/_ticklabelposition.py +++ b/plotly/validators/streamtube/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="streamtube.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/streamtube/colorbar/_ticklabelstep.py b/plotly/validators/streamtube/colorbar/_ticklabelstep.py index ecae40d6c6..449cb17f95 100644 --- a/plotly/validators/streamtube/colorbar/_ticklabelstep.py +++ b/plotly/validators/streamtube/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="streamtube.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_ticklen.py b/plotly/validators/streamtube/colorbar/_ticklen.py index 266630d9b3..c333d8efef 100644 --- a/plotly/validators/streamtube/colorbar/_ticklen.py +++ b/plotly/validators/streamtube/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="streamtube.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_tickmode.py b/plotly/validators/streamtube/colorbar/_tickmode.py index 54c7415636..965d7e71e9 100644 --- a/plotly/validators/streamtube/colorbar/_tickmode.py +++ b/plotly/validators/streamtube/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="streamtube.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/streamtube/colorbar/_tickprefix.py b/plotly/validators/streamtube/colorbar/_tickprefix.py index eb39238f81..5da264d8d7 100644 --- a/plotly/validators/streamtube/colorbar/_tickprefix.py +++ b/plotly/validators/streamtube/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="streamtube.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_ticks.py b/plotly/validators/streamtube/colorbar/_ticks.py index c93ec6b675..9d2fe80f3a 100644 --- a/plotly/validators/streamtube/colorbar/_ticks.py +++ b/plotly/validators/streamtube/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="streamtube.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_ticksuffix.py b/plotly/validators/streamtube/colorbar/_ticksuffix.py index 9b54f6ea12..4d1f2aae86 100644 --- a/plotly/validators/streamtube/colorbar/_ticksuffix.py +++ b/plotly/validators/streamtube/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="streamtube.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_ticktext.py b/plotly/validators/streamtube/colorbar/_ticktext.py index 286aaa6dd0..ebf0ab05a1 100644 --- a/plotly/validators/streamtube/colorbar/_ticktext.py +++ b/plotly/validators/streamtube/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="streamtube.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_ticktextsrc.py b/plotly/validators/streamtube/colorbar/_ticktextsrc.py index 7490c4121c..df4bb4b82f 100644 --- a/plotly/validators/streamtube/colorbar/_ticktextsrc.py +++ b/plotly/validators/streamtube/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="streamtube.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_tickvals.py b/plotly/validators/streamtube/colorbar/_tickvals.py index ae08112a36..f94076cb2f 100644 --- a/plotly/validators/streamtube/colorbar/_tickvals.py +++ b/plotly/validators/streamtube/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="streamtube.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_tickvalssrc.py b/plotly/validators/streamtube/colorbar/_tickvalssrc.py index d48f952d1a..332f9b23b4 100644 --- a/plotly/validators/streamtube/colorbar/_tickvalssrc.py +++ b/plotly/validators/streamtube/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="streamtube.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_tickwidth.py b/plotly/validators/streamtube/colorbar/_tickwidth.py index 3378a533a7..85f4c0b0fc 100644 --- a/plotly/validators/streamtube/colorbar/_tickwidth.py +++ b/plotly/validators/streamtube/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="streamtube.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_title.py b/plotly/validators/streamtube/colorbar/_title.py index 38ba2860ec..8d51aa9864 100644 --- a/plotly/validators/streamtube/colorbar/_title.py +++ b/plotly/validators/streamtube/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="streamtube.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_x.py b/plotly/validators/streamtube/colorbar/_x.py index e4542c802c..7e26c4a464 100644 --- a/plotly/validators/streamtube/colorbar/_x.py +++ b/plotly/validators/streamtube/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="streamtube.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_xanchor.py b/plotly/validators/streamtube/colorbar/_xanchor.py index 3961418b38..343d705015 100644 --- a/plotly/validators/streamtube/colorbar/_xanchor.py +++ b/plotly/validators/streamtube/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="streamtube.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_xpad.py b/plotly/validators/streamtube/colorbar/_xpad.py index a41acacf46..d3520d985f 100644 --- a/plotly/validators/streamtube/colorbar/_xpad.py +++ b/plotly/validators/streamtube/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="streamtube.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_xref.py b/plotly/validators/streamtube/colorbar/_xref.py index cf7c201969..2a30982bcf 100644 --- a/plotly/validators/streamtube/colorbar/_xref.py +++ b/plotly/validators/streamtube/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="streamtube.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_y.py b/plotly/validators/streamtube/colorbar/_y.py index 199ce881f5..4d42f5fb64 100644 --- a/plotly/validators/streamtube/colorbar/_y.py +++ b/plotly/validators/streamtube/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="streamtube.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/_yanchor.py b/plotly/validators/streamtube/colorbar/_yanchor.py index 03ea8e8f6e..92c1aba6c4 100644 --- a/plotly/validators/streamtube/colorbar/_yanchor.py +++ b/plotly/validators/streamtube/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="streamtube.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_ypad.py b/plotly/validators/streamtube/colorbar/_ypad.py index df6fc24f56..b2476c3d21 100644 --- a/plotly/validators/streamtube/colorbar/_ypad.py +++ b/plotly/validators/streamtube/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="streamtube.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/_yref.py b/plotly/validators/streamtube/colorbar/_yref.py index f5f79c3944..8e1719d763 100644 --- a/plotly/validators/streamtube/colorbar/_yref.py +++ b/plotly/validators/streamtube/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="streamtube.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/tickfont/__init__.py b/plotly/validators/streamtube/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/__init__.py +++ b/plotly/validators/streamtube/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/streamtube/colorbar/tickfont/_color.py b/plotly/validators/streamtube/colorbar/tickfont/_color.py index b266daf4b8..7f7d6026c7 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_color.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="streamtube.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/tickfont/_family.py b/plotly/validators/streamtube/colorbar/tickfont/_family.py index 5448e5df4d..d047f786ff 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_family.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="streamtube.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/streamtube/colorbar/tickfont/_lineposition.py b/plotly/validators/streamtube/colorbar/tickfont/_lineposition.py index 0b725a4f29..c8ffa77b5d 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="streamtube.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/streamtube/colorbar/tickfont/_shadow.py b/plotly/validators/streamtube/colorbar/tickfont/_shadow.py index 6851575d89..8b2de6bb03 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_shadow.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="streamtube.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/tickfont/_size.py b/plotly/validators/streamtube/colorbar/tickfont/_size.py index 609ac6bba2..163dc2cea5 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_size.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="streamtube.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/tickfont/_style.py b/plotly/validators/streamtube/colorbar/tickfont/_style.py index 2493839ba4..58f549aafa 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_style.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="streamtube.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/tickfont/_textcase.py b/plotly/validators/streamtube/colorbar/tickfont/_textcase.py index f4e3f93c1a..803b0717ef 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_textcase.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="streamtube.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/tickfont/_variant.py b/plotly/validators/streamtube/colorbar/tickfont/_variant.py index 4daa5c3dfa..2d90f10fd9 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_variant.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="streamtube.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/streamtube/colorbar/tickfont/_weight.py b/plotly/validators/streamtube/colorbar/tickfont/_weight.py index 6fdd15cb38..080266edf2 100644 --- a/plotly/validators/streamtube/colorbar/tickfont/_weight.py +++ b/plotly/validators/streamtube/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="streamtube.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py b/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/streamtube/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py index af746a9b3b..c6cc41b67f 100644 --- a/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/streamtube/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="streamtube.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py b/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py index 2265ce9016..acf568c4b8 100644 --- a/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/streamtube/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="streamtube.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/tickformatstop/_name.py b/plotly/validators/streamtube/colorbar/tickformatstop/_name.py index a8d2f59123..f1fd882303 100644 --- a/plotly/validators/streamtube/colorbar/tickformatstop/_name.py +++ b/plotly/validators/streamtube/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="streamtube.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py index 2a35f59074..ea4be892b3 100644 --- a/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/streamtube/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="streamtube.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/tickformatstop/_value.py b/plotly/validators/streamtube/colorbar/tickformatstop/_value.py index a5fdf0e353..d5a38c5798 100644 --- a/plotly/validators/streamtube/colorbar/tickformatstop/_value.py +++ b/plotly/validators/streamtube/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="streamtube.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/title/__init__.py b/plotly/validators/streamtube/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/streamtube/colorbar/title/__init__.py +++ b/plotly/validators/streamtube/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/streamtube/colorbar/title/_font.py b/plotly/validators/streamtube/colorbar/title/_font.py index d19e9c81be..f506942985 100644 --- a/plotly/validators/streamtube/colorbar/title/_font.py +++ b/plotly/validators/streamtube/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="streamtube.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/title/_side.py b/plotly/validators/streamtube/colorbar/title/_side.py index c4f0623fbc..a44e5edf2e 100644 --- a/plotly/validators/streamtube/colorbar/title/_side.py +++ b/plotly/validators/streamtube/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="streamtube.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/title/_text.py b/plotly/validators/streamtube/colorbar/title/_text.py index 8d512cca5c..d7e4177c32 100644 --- a/plotly/validators/streamtube/colorbar/title/_text.py +++ b/plotly/validators/streamtube/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="streamtube.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/title/font/__init__.py b/plotly/validators/streamtube/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/streamtube/colorbar/title/font/__init__.py +++ b/plotly/validators/streamtube/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/streamtube/colorbar/title/font/_color.py b/plotly/validators/streamtube/colorbar/title/font/_color.py index f2fc38ccc7..6b9c3268dd 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_color.py +++ b/plotly/validators/streamtube/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/title/font/_family.py b/plotly/validators/streamtube/colorbar/title/font/_family.py index e75df89ff9..ad542ea229 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_family.py +++ b/plotly/validators/streamtube/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/streamtube/colorbar/title/font/_lineposition.py b/plotly/validators/streamtube/colorbar/title/font/_lineposition.py index 9e6ca38eca..7e128299c3 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_lineposition.py +++ b/plotly/validators/streamtube/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/streamtube/colorbar/title/font/_shadow.py b/plotly/validators/streamtube/colorbar/title/font/_shadow.py index 587598b204..f5dd2e0fb1 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_shadow.py +++ b/plotly/validators/streamtube/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/streamtube/colorbar/title/font/_size.py b/plotly/validators/streamtube/colorbar/title/font/_size.py index a7389c84e5..8e333ff750 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_size.py +++ b/plotly/validators/streamtube/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="streamtube.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/title/font/_style.py b/plotly/validators/streamtube/colorbar/title/font/_style.py index 7f91a29b8a..81138255ab 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_style.py +++ b/plotly/validators/streamtube/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/title/font/_textcase.py b/plotly/validators/streamtube/colorbar/title/font/_textcase.py index 4cd96b7a78..e071b4622a 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_textcase.py +++ b/plotly/validators/streamtube/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/streamtube/colorbar/title/font/_variant.py b/plotly/validators/streamtube/colorbar/title/font/_variant.py index 934164529d..7f3715542e 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_variant.py +++ b/plotly/validators/streamtube/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/streamtube/colorbar/title/font/_weight.py b/plotly/validators/streamtube/colorbar/title/font/_weight.py index 333929a4ad..1d14b9d566 100644 --- a/plotly/validators/streamtube/colorbar/title/font/_weight.py +++ b/plotly/validators/streamtube/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="streamtube.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/streamtube/hoverlabel/__init__.py b/plotly/validators/streamtube/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/streamtube/hoverlabel/__init__.py +++ b/plotly/validators/streamtube/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/streamtube/hoverlabel/_align.py b/plotly/validators/streamtube/hoverlabel/_align.py index 7a97ab4791..b460ef93dc 100644 --- a/plotly/validators/streamtube/hoverlabel/_align.py +++ b/plotly/validators/streamtube/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="streamtube.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/streamtube/hoverlabel/_alignsrc.py b/plotly/validators/streamtube/hoverlabel/_alignsrc.py index d4bc995a27..bf5e929664 100644 --- a/plotly/validators/streamtube/hoverlabel/_alignsrc.py +++ b/plotly/validators/streamtube/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="streamtube.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/_bgcolor.py b/plotly/validators/streamtube/hoverlabel/_bgcolor.py index 0c4bf0011b..374c1c1bbb 100644 --- a/plotly/validators/streamtube/hoverlabel/_bgcolor.py +++ b/plotly/validators/streamtube/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="streamtube.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py b/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py index 83e8e277e6..b2a6e764f3 100644 --- a/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/streamtube/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="streamtube.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/_bordercolor.py b/plotly/validators/streamtube/hoverlabel/_bordercolor.py index 884601f84f..3d0564d098 100644 --- a/plotly/validators/streamtube/hoverlabel/_bordercolor.py +++ b/plotly/validators/streamtube/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="streamtube.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py b/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py index f3fadd7dbc..bd5e4df166 100644 --- a/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/streamtube/hoverlabel/_bordercolorsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="streamtube.hoverlabel", **kwargs, ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/_font.py b/plotly/validators/streamtube/hoverlabel/_font.py index d1b009c235..bdac6000e1 100644 --- a/plotly/validators/streamtube/hoverlabel/_font.py +++ b/plotly/validators/streamtube/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="streamtube.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/streamtube/hoverlabel/_namelength.py b/plotly/validators/streamtube/hoverlabel/_namelength.py index ea97dc7131..f75ee11589 100644 --- a/plotly/validators/streamtube/hoverlabel/_namelength.py +++ b/plotly/validators/streamtube/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="streamtube.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py b/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py index 1ad3589a87..33479898e1 100644 --- a/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/streamtube/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="streamtube.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/__init__.py b/plotly/validators/streamtube/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/streamtube/hoverlabel/font/__init__.py +++ b/plotly/validators/streamtube/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/streamtube/hoverlabel/font/_color.py b/plotly/validators/streamtube/hoverlabel/font/_color.py index a5d0e209b0..541d116dad 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_color.py +++ b/plotly/validators/streamtube/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py b/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py index 90a7db2a22..fe1b202806 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_family.py b/plotly/validators/streamtube/hoverlabel/font/_family.py index fa1be324f8..65e34dab54 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_family.py +++ b/plotly/validators/streamtube/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/streamtube/hoverlabel/font/_familysrc.py b/plotly/validators/streamtube/hoverlabel/font/_familysrc.py index 5b4e9b4dcf..4cb324a8b3 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_familysrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_familysrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_lineposition.py b/plotly/validators/streamtube/hoverlabel/font/_lineposition.py index 8af081cd03..73c35a1bc8 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_lineposition.py +++ b/plotly/validators/streamtube/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/streamtube/hoverlabel/font/_linepositionsrc.py b/plotly/validators/streamtube/hoverlabel/font/_linepositionsrc.py index 97bb7baba3..f15c152879 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_shadow.py b/plotly/validators/streamtube/hoverlabel/font/_shadow.py index 264548d918..bb86fb6e3c 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_shadow.py +++ b/plotly/validators/streamtube/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/streamtube/hoverlabel/font/_shadowsrc.py b/plotly/validators/streamtube/hoverlabel/font/_shadowsrc.py index 81dd157788..c7a64a1aba 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_shadowsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_size.py b/plotly/validators/streamtube/hoverlabel/font/_size.py index 8eea091125..599a70f098 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_size.py +++ b/plotly/validators/streamtube/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py b/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py index 164eb1a2bc..b2dc54bace 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_style.py b/plotly/validators/streamtube/hoverlabel/font/_style.py index dfaaa9b4ad..b85f3dd46b 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_style.py +++ b/plotly/validators/streamtube/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/streamtube/hoverlabel/font/_stylesrc.py b/plotly/validators/streamtube/hoverlabel/font/_stylesrc.py index db3dce1262..dbbd42e32a 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_textcase.py b/plotly/validators/streamtube/hoverlabel/font/_textcase.py index 2aab50e6b3..6e707ccd81 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_textcase.py +++ b/plotly/validators/streamtube/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/streamtube/hoverlabel/font/_textcasesrc.py b/plotly/validators/streamtube/hoverlabel/font/_textcasesrc.py index 723d482e8e..5eebfcb564 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_variant.py b/plotly/validators/streamtube/hoverlabel/font/_variant.py index 1e28a3e07c..eab33b637c 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_variant.py +++ b/plotly/validators/streamtube/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/streamtube/hoverlabel/font/_variantsrc.py b/plotly/validators/streamtube/hoverlabel/font/_variantsrc.py index 5ecc7d01f2..cef33a0945 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/hoverlabel/font/_weight.py b/plotly/validators/streamtube/hoverlabel/font/_weight.py index 47d7dd2c65..16fa66b75f 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_weight.py +++ b/plotly/validators/streamtube/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="streamtube.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/streamtube/hoverlabel/font/_weightsrc.py b/plotly/validators/streamtube/hoverlabel/font/_weightsrc.py index cd61852b96..fa62fcffda 100644 --- a/plotly/validators/streamtube/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/streamtube/hoverlabel/font/_weightsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="streamtube.hoverlabel.font", **kwargs, ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/legendgrouptitle/__init__.py b/plotly/validators/streamtube/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/streamtube/legendgrouptitle/__init__.py +++ b/plotly/validators/streamtube/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/streamtube/legendgrouptitle/_font.py b/plotly/validators/streamtube/legendgrouptitle/_font.py index 04536700bd..8d9f5c14fd 100644 --- a/plotly/validators/streamtube/legendgrouptitle/_font.py +++ b/plotly/validators/streamtube/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="streamtube.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/streamtube/legendgrouptitle/_text.py b/plotly/validators/streamtube/legendgrouptitle/_text.py index bad6ae8ab0..f34094332a 100644 --- a/plotly/validators/streamtube/legendgrouptitle/_text.py +++ b/plotly/validators/streamtube/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="streamtube.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/legendgrouptitle/font/__init__.py b/plotly/validators/streamtube/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/__init__.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_color.py b/plotly/validators/streamtube/legendgrouptitle/font/_color.py index d73d77840a..6760396175 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_color.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_family.py b/plotly/validators/streamtube/legendgrouptitle/font/_family.py index b32fdbf7ed..bb631148c5 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_family.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_lineposition.py b/plotly/validators/streamtube/legendgrouptitle/font/_lineposition.py index d8606aedea..c36229e9d2 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_shadow.py b/plotly/validators/streamtube/legendgrouptitle/font/_shadow.py index a9d134e9f9..13775a7a0d 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_size.py b/plotly/validators/streamtube/legendgrouptitle/font/_size.py index 013cca6758..0058111497 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_size.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_style.py b/plotly/validators/streamtube/legendgrouptitle/font/_style.py index 3cc8892356..1e8d0690a4 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_style.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_textcase.py b/plotly/validators/streamtube/legendgrouptitle/font/_textcase.py index 8c471e0506..8e8d057b31 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_variant.py b/plotly/validators/streamtube/legendgrouptitle/font/_variant.py index 5fabf7041f..a9686af974 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_variant.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/streamtube/legendgrouptitle/font/_weight.py b/plotly/validators/streamtube/legendgrouptitle/font/_weight.py index d1a49bc4c5..3226fc20c7 100644 --- a/plotly/validators/streamtube/legendgrouptitle/font/_weight.py +++ b/plotly/validators/streamtube/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="streamtube.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/streamtube/lighting/__init__.py b/plotly/validators/streamtube/lighting/__init__.py index 028351f35d..1f11e1b86f 100644 --- a/plotly/validators/streamtube/lighting/__init__.py +++ b/plotly/validators/streamtube/lighting/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._vertexnormalsepsilon import VertexnormalsepsilonValidator - from ._specular import SpecularValidator - from ._roughness import RoughnessValidator - from ._fresnel import FresnelValidator - from ._facenormalsepsilon import FacenormalsepsilonValidator - from ._diffuse import DiffuseValidator - from ._ambient import AmbientValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._vertexnormalsepsilon.VertexnormalsepsilonValidator", - "._specular.SpecularValidator", - "._roughness.RoughnessValidator", - "._fresnel.FresnelValidator", - "._facenormalsepsilon.FacenormalsepsilonValidator", - "._diffuse.DiffuseValidator", - "._ambient.AmbientValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], +) diff --git a/plotly/validators/streamtube/lighting/_ambient.py b/plotly/validators/streamtube/lighting/_ambient.py index 91c4b1dd65..f87b6f9ae0 100644 --- a/plotly/validators/streamtube/lighting/_ambient.py +++ b/plotly/validators/streamtube/lighting/_ambient.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): +class AmbientValidator(_bv.NumberValidator): def __init__( self, plotly_name="ambient", parent_name="streamtube.lighting", **kwargs ): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lighting/_diffuse.py b/plotly/validators/streamtube/lighting/_diffuse.py index 694f92711c..fd1be0b2c1 100644 --- a/plotly/validators/streamtube/lighting/_diffuse.py +++ b/plotly/validators/streamtube/lighting/_diffuse.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): +class DiffuseValidator(_bv.NumberValidator): def __init__( self, plotly_name="diffuse", parent_name="streamtube.lighting", **kwargs ): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lighting/_facenormalsepsilon.py b/plotly/validators/streamtube/lighting/_facenormalsepsilon.py index f539684c31..4ebaaa0662 100644 --- a/plotly/validators/streamtube/lighting/_facenormalsepsilon.py +++ b/plotly/validators/streamtube/lighting/_facenormalsepsilon.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class FacenormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="facenormalsepsilon", parent_name="streamtube.lighting", **kwargs, ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lighting/_fresnel.py b/plotly/validators/streamtube/lighting/_fresnel.py index 7ec6c70a9f..c39b34ca05 100644 --- a/plotly/validators/streamtube/lighting/_fresnel.py +++ b/plotly/validators/streamtube/lighting/_fresnel.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): +class FresnelValidator(_bv.NumberValidator): def __init__( self, plotly_name="fresnel", parent_name="streamtube.lighting", **kwargs ): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lighting/_roughness.py b/plotly/validators/streamtube/lighting/_roughness.py index 84fa2510e8..668fc71a9a 100644 --- a/plotly/validators/streamtube/lighting/_roughness.py +++ b/plotly/validators/streamtube/lighting/_roughness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): +class RoughnessValidator(_bv.NumberValidator): def __init__( self, plotly_name="roughness", parent_name="streamtube.lighting", **kwargs ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lighting/_specular.py b/plotly/validators/streamtube/lighting/_specular.py index 8bc1809b80..a2519bac04 100644 --- a/plotly/validators/streamtube/lighting/_specular.py +++ b/plotly/validators/streamtube/lighting/_specular.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): +class SpecularValidator(_bv.NumberValidator): def __init__( self, plotly_name="specular", parent_name="streamtube.lighting", **kwargs ): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py b/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py index d56096b8aa..dddba4b72e 100644 --- a/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py +++ b/plotly/validators/streamtube/lighting/_vertexnormalsepsilon.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class VertexnormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="vertexnormalsepsilon", parent_name="streamtube.lighting", **kwargs, ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/lightposition/__init__.py b/plotly/validators/streamtube/lightposition/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/streamtube/lightposition/__init__.py +++ b/plotly/validators/streamtube/lightposition/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/streamtube/lightposition/_x.py b/plotly/validators/streamtube/lightposition/_x.py index e583064a69..fcc9c3d037 100644 --- a/plotly/validators/streamtube/lightposition/_x.py +++ b/plotly/validators/streamtube/lightposition/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="streamtube.lightposition", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/streamtube/lightposition/_y.py b/plotly/validators/streamtube/lightposition/_y.py index 55b229236e..6572edda84 100644 --- a/plotly/validators/streamtube/lightposition/_y.py +++ b/plotly/validators/streamtube/lightposition/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="streamtube.lightposition", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/streamtube/lightposition/_z.py b/plotly/validators/streamtube/lightposition/_z.py index 05a973d150..2443347f0e 100644 --- a/plotly/validators/streamtube/lightposition/_z.py +++ b/plotly/validators/streamtube/lightposition/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__( self, plotly_name="z", parent_name="streamtube.lightposition", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/streamtube/starts/__init__.py b/plotly/validators/streamtube/starts/__init__.py index f8bd4cce32..e12e8cfa54 100644 --- a/plotly/validators/streamtube/starts/__init__.py +++ b/plotly/validators/streamtube/starts/__init__.py @@ -1,25 +1,15 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._x.XValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._x.XValidator", + ], +) diff --git a/plotly/validators/streamtube/starts/_x.py b/plotly/validators/streamtube/starts/_x.py index 21517e9c87..febdd2e873 100644 --- a/plotly/validators/streamtube/starts/_x.py +++ b/plotly/validators/streamtube/starts/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="streamtube.starts", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/starts/_xsrc.py b/plotly/validators/streamtube/starts/_xsrc.py index 050c3bf377..391ba37afc 100644 --- a/plotly/validators/streamtube/starts/_xsrc.py +++ b/plotly/validators/streamtube/starts/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="streamtube.starts", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/starts/_y.py b/plotly/validators/streamtube/starts/_y.py index fed95cc221..3d4cf329f6 100644 --- a/plotly/validators/streamtube/starts/_y.py +++ b/plotly/validators/streamtube/starts/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="streamtube.starts", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/starts/_ysrc.py b/plotly/validators/streamtube/starts/_ysrc.py index 1d3857fe37..7626ebd469 100644 --- a/plotly/validators/streamtube/starts/_ysrc.py +++ b/plotly/validators/streamtube/starts/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="streamtube.starts", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/starts/_z.py b/plotly/validators/streamtube/starts/_z.py index 9157648b92..64d163ec84 100644 --- a/plotly/validators/streamtube/starts/_z.py +++ b/plotly/validators/streamtube/starts/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="streamtube.starts", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/streamtube/starts/_zsrc.py b/plotly/validators/streamtube/starts/_zsrc.py index 39774cae13..331d1bf03d 100644 --- a/plotly/validators/streamtube/starts/_zsrc.py +++ b/plotly/validators/streamtube/starts/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="streamtube.starts", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/streamtube/stream/__init__.py b/plotly/validators/streamtube/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/streamtube/stream/__init__.py +++ b/plotly/validators/streamtube/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/streamtube/stream/_maxpoints.py b/plotly/validators/streamtube/stream/_maxpoints.py index 6fbbf14b7a..8088ac829d 100644 --- a/plotly/validators/streamtube/stream/_maxpoints.py +++ b/plotly/validators/streamtube/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="streamtube.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/streamtube/stream/_token.py b/plotly/validators/streamtube/stream/_token.py index 7601d6059c..e8ba75d2f4 100644 --- a/plotly/validators/streamtube/stream/_token.py +++ b/plotly/validators/streamtube/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="streamtube.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sunburst/__init__.py b/plotly/validators/sunburst/__init__.py index d9043d98c9..cabb216815 100644 --- a/plotly/validators/sunburst/__init__.py +++ b/plotly/validators/sunburst/__init__.py @@ -1,109 +1,57 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._sort import SortValidator - from ._rotation import RotationValidator - from ._root import RootValidator - from ._parentssrc import ParentssrcValidator - from ._parents import ParentsValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._maxdepth import MaxdepthValidator - from ._marker import MarkerValidator - from ._level import LevelValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._leaf import LeafValidator - from ._labelssrc import LabelssrcValidator - from ._labels import LabelsValidator - from ._insidetextorientation import InsidetextorientationValidator - from ._insidetextfont import InsidetextfontValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._domain import DomainValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._count import CountValidator - from ._branchvalues import BranchvaluesValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._sort.SortValidator", - "._rotation.RotationValidator", - "._root.RootValidator", - "._parentssrc.ParentssrcValidator", - "._parents.ParentsValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._maxdepth.MaxdepthValidator", - "._marker.MarkerValidator", - "._level.LevelValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._leaf.LeafValidator", - "._labelssrc.LabelssrcValidator", - "._labels.LabelsValidator", - "._insidetextorientation.InsidetextorientationValidator", - "._insidetextfont.InsidetextfontValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._domain.DomainValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._count.CountValidator", - "._branchvalues.BranchvaluesValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sort.SortValidator", + "._rotation.RotationValidator", + "._root.RootValidator", + "._parentssrc.ParentssrcValidator", + "._parents.ParentsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdepth.MaxdepthValidator", + "._marker.MarkerValidator", + "._level.LevelValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._leaf.LeafValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._insidetextorientation.InsidetextorientationValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._count.CountValidator", + "._branchvalues.BranchvaluesValidator", + ], +) diff --git a/plotly/validators/sunburst/_branchvalues.py b/plotly/validators/sunburst/_branchvalues.py index f582862fe8..4028248c57 100644 --- a/plotly/validators/sunburst/_branchvalues.py +++ b/plotly/validators/sunburst/_branchvalues.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BranchvaluesValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="branchvalues", parent_name="sunburst", **kwargs): - super(BranchvaluesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["remainder", "total"]), **kwargs, diff --git a/plotly/validators/sunburst/_count.py b/plotly/validators/sunburst/_count.py index 7e7fe0be92..863565ab27 100644 --- a/plotly/validators/sunburst/_count.py +++ b/plotly/validators/sunburst/_count.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): +class CountValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="count", parent_name="sunburst", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), flags=kwargs.pop("flags", ["branches", "leaves"]), **kwargs, diff --git a/plotly/validators/sunburst/_customdata.py b/plotly/validators/sunburst/_customdata.py index 17e9fe6ee5..29edbc89a8 100644 --- a/plotly/validators/sunburst/_customdata.py +++ b/plotly/validators/sunburst/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="sunburst", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/_customdatasrc.py b/plotly/validators/sunburst/_customdatasrc.py index a9c5f70248..040a4049c9 100644 --- a/plotly/validators/sunburst/_customdatasrc.py +++ b/plotly/validators/sunburst/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="sunburst", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_domain.py b/plotly/validators/sunburst/_domain.py index d672a365b2..9156dca7e1 100644 --- a/plotly/validators/sunburst/_domain.py +++ b/plotly/validators/sunburst/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="sunburst", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this sunburst trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this sunburst trace . - x - Sets the horizontal domain of this sunburst - trace (in plot fraction). - y - Sets the vertical domain of this sunburst trace - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/sunburst/_hoverinfo.py b/plotly/validators/sunburst/_hoverinfo.py index 07c37ca50a..ffc7b9e5d0 100644 --- a/plotly/validators/sunburst/_hoverinfo.py +++ b/plotly/validators/sunburst/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="sunburst", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/sunburst/_hoverinfosrc.py b/plotly/validators/sunburst/_hoverinfosrc.py index 585ab2ef8c..d981d22582 100644 --- a/plotly/validators/sunburst/_hoverinfosrc.py +++ b/plotly/validators/sunburst/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="sunburst", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_hoverlabel.py b/plotly/validators/sunburst/_hoverlabel.py index 73670017cf..52f2512d3d 100644 --- a/plotly/validators/sunburst/_hoverlabel.py +++ b/plotly/validators/sunburst/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="sunburst", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_hovertemplate.py b/plotly/validators/sunburst/_hovertemplate.py index b6e22e6f6a..1f365daf37 100644 --- a/plotly/validators/sunburst/_hovertemplate.py +++ b/plotly/validators/sunburst/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="sunburst", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/sunburst/_hovertemplatesrc.py b/plotly/validators/sunburst/_hovertemplatesrc.py index 1e06df2b27..c29d22e017 100644 --- a/plotly/validators/sunburst/_hovertemplatesrc.py +++ b/plotly/validators/sunburst/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="sunburst", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_hovertext.py b/plotly/validators/sunburst/_hovertext.py index c8fb7d296b..f946617d47 100644 --- a/plotly/validators/sunburst/_hovertext.py +++ b/plotly/validators/sunburst/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="sunburst", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/sunburst/_hovertextsrc.py b/plotly/validators/sunburst/_hovertextsrc.py index 9e337848b6..f54fc94e7b 100644 --- a/plotly/validators/sunburst/_hovertextsrc.py +++ b/plotly/validators/sunburst/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="sunburst", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_ids.py b/plotly/validators/sunburst/_ids.py index dea85dbf88..f0331efbf9 100644 --- a/plotly/validators/sunburst/_ids.py +++ b/plotly/validators/sunburst/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="sunburst", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/sunburst/_idssrc.py b/plotly/validators/sunburst/_idssrc.py index 4c2dd0799e..514cb40b3d 100644 --- a/plotly/validators/sunburst/_idssrc.py +++ b/plotly/validators/sunburst/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="sunburst", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_insidetextfont.py b/plotly/validators/sunburst/_insidetextfont.py index 738ae174e9..f000260dba 100644 --- a/plotly/validators/sunburst/_insidetextfont.py +++ b/plotly/validators/sunburst/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="sunburst", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_insidetextorientation.py b/plotly/validators/sunburst/_insidetextorientation.py index 35bf93598d..a61f1a40f3 100644 --- a/plotly/validators/sunburst/_insidetextorientation.py +++ b/plotly/validators/sunburst/_insidetextorientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextorientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class InsidetextorientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="insidetextorientation", parent_name="sunburst", **kwargs ): - super(InsidetextorientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["horizontal", "radial", "tangential", "auto"]), **kwargs, diff --git a/plotly/validators/sunburst/_labels.py b/plotly/validators/sunburst/_labels.py index cbd0903612..70115ca448 100644 --- a/plotly/validators/sunburst/_labels.py +++ b/plotly/validators/sunburst/_labels.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="labels", parent_name="sunburst", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/_labelssrc.py b/plotly/validators/sunburst/_labelssrc.py index f0d5a2020b..57e5950332 100644 --- a/plotly/validators/sunburst/_labelssrc.py +++ b/plotly/validators/sunburst/_labelssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelssrc", parent_name="sunburst", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_leaf.py b/plotly/validators/sunburst/_leaf.py index 86802bbc38..40ca736011 100644 --- a/plotly/validators/sunburst/_leaf.py +++ b/plotly/validators/sunburst/_leaf.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LeafValidator(_plotly_utils.basevalidators.CompoundValidator): +class LeafValidator(_bv.CompoundValidator): def __init__(self, plotly_name="leaf", parent_name="sunburst", **kwargs): - super(LeafValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Leaf"), data_docs=kwargs.pop( "data_docs", """ - opacity - Sets the opacity of the leaves. With colorscale - it is defaulted to 1; otherwise it is defaulted - to 0.7 """, ), **kwargs, diff --git a/plotly/validators/sunburst/_legend.py b/plotly/validators/sunburst/_legend.py index 69b12723c9..ba24067833 100644 --- a/plotly/validators/sunburst/_legend.py +++ b/plotly/validators/sunburst/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="sunburst", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/sunburst/_legendgrouptitle.py b/plotly/validators/sunburst/_legendgrouptitle.py index 156715d524..073ceb248b 100644 --- a/plotly/validators/sunburst/_legendgrouptitle.py +++ b/plotly/validators/sunburst/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="sunburst", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_legendrank.py b/plotly/validators/sunburst/_legendrank.py index 609dd0629b..b817d2f9dd 100644 --- a/plotly/validators/sunburst/_legendrank.py +++ b/plotly/validators/sunburst/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="sunburst", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sunburst/_legendwidth.py b/plotly/validators/sunburst/_legendwidth.py index 711dd7303c..31ddfb9070 100644 --- a/plotly/validators/sunburst/_legendwidth.py +++ b/plotly/validators/sunburst/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="sunburst", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/_level.py b/plotly/validators/sunburst/_level.py index 40fac68e06..2ea6fed3c3 100644 --- a/plotly/validators/sunburst/_level.py +++ b/plotly/validators/sunburst/_level.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LevelValidator(_plotly_utils.basevalidators.AnyValidator): +class LevelValidator(_bv.AnyValidator): def __init__(self, plotly_name="level", parent_name="sunburst", **kwargs): - super(LevelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/_marker.py b/plotly/validators/sunburst/_marker.py index 66df8a9065..864a0f4e9a 100644 --- a/plotly/validators/sunburst/_marker.py +++ b/plotly/validators/sunburst/_marker.py @@ -1,104 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="sunburst", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colors is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colors is - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colors is set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.sunburst.marker.Co - lorBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colors is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - line - :class:`plotly.graph_objects.sunburst.marker.Li - ne` instance or dict with compatible properties - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if colors is set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colors is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_maxdepth.py b/plotly/validators/sunburst/_maxdepth.py index c6ee5cd93b..6fced22256 100644 --- a/plotly/validators/sunburst/_maxdepth.py +++ b/plotly/validators/sunburst/_maxdepth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): +class MaxdepthValidator(_bv.IntegerValidator): def __init__(self, plotly_name="maxdepth", parent_name="sunburst", **kwargs): - super(MaxdepthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/sunburst/_meta.py b/plotly/validators/sunburst/_meta.py index 864d4533a2..c022060207 100644 --- a/plotly/validators/sunburst/_meta.py +++ b/plotly/validators/sunburst/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="sunburst", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/_metasrc.py b/plotly/validators/sunburst/_metasrc.py index ccf1cd3547..9cb3f6ff5a 100644 --- a/plotly/validators/sunburst/_metasrc.py +++ b/plotly/validators/sunburst/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="sunburst", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_name.py b/plotly/validators/sunburst/_name.py index 2c25c5ac7b..8f150b5e02 100644 --- a/plotly/validators/sunburst/_name.py +++ b/plotly/validators/sunburst/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="sunburst", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sunburst/_opacity.py b/plotly/validators/sunburst/_opacity.py index 488c57ccf3..0187138fa3 100644 --- a/plotly/validators/sunburst/_opacity.py +++ b/plotly/validators/sunburst/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="sunburst", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sunburst/_outsidetextfont.py b/plotly/validators/sunburst/_outsidetextfont.py index ce6dbcf5c4..4a1357149d 100644 --- a/plotly/validators/sunburst/_outsidetextfont.py +++ b/plotly/validators/sunburst/_outsidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="outsidetextfont", parent_name="sunburst", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_parents.py b/plotly/validators/sunburst/_parents.py index ec357a89b2..13a2bbac3d 100644 --- a/plotly/validators/sunburst/_parents.py +++ b/plotly/validators/sunburst/_parents.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ParentsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="parents", parent_name="sunburst", **kwargs): - super(ParentsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/_parentssrc.py b/plotly/validators/sunburst/_parentssrc.py index 588258225e..b875f3c471 100644 --- a/plotly/validators/sunburst/_parentssrc.py +++ b/plotly/validators/sunburst/_parentssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ParentssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="parentssrc", parent_name="sunburst", **kwargs): - super(ParentssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_root.py b/plotly/validators/sunburst/_root.py index c6bd9958d5..21bb404d3b 100644 --- a/plotly/validators/sunburst/_root.py +++ b/plotly/validators/sunburst/_root.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RootValidator(_plotly_utils.basevalidators.CompoundValidator): +class RootValidator(_bv.CompoundValidator): def __init__(self, plotly_name="root", parent_name="sunburst", **kwargs): - super(RootValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Root"), data_docs=kwargs.pop( "data_docs", """ - color - sets the color of the root node for a - sunburst/treemap/icicle trace. this has no - effect when a colorscale is used to set the - markers. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_rotation.py b/plotly/validators/sunburst/_rotation.py index 5901d309ba..7516d7f23b 100644 --- a/plotly/validators/sunburst/_rotation.py +++ b/plotly/validators/sunburst/_rotation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RotationValidator(_plotly_utils.basevalidators.AngleValidator): +class RotationValidator(_bv.AngleValidator): def __init__(self, plotly_name="rotation", parent_name="sunburst", **kwargs): - super(RotationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/sunburst/_sort.py b/plotly/validators/sunburst/_sort.py index b9d50d9b27..bc84a49c33 100644 --- a/plotly/validators/sunburst/_sort.py +++ b/plotly/validators/sunburst/_sort.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SortValidator(_plotly_utils.basevalidators.BooleanValidator): +class SortValidator(_bv.BooleanValidator): def __init__(self, plotly_name="sort", parent_name="sunburst", **kwargs): - super(SortValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/_stream.py b/plotly/validators/sunburst/_stream.py index 5904eadc86..cee54d5452 100644 --- a/plotly/validators/sunburst/_stream.py +++ b/plotly/validators/sunburst/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="sunburst", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_text.py b/plotly/validators/sunburst/_text.py index 44352df7c3..5ba5e7a92a 100644 --- a/plotly/validators/sunburst/_text.py +++ b/plotly/validators/sunburst/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="sunburst", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/sunburst/_textfont.py b/plotly/validators/sunburst/_textfont.py index a714cf28ac..84452d1b95 100644 --- a/plotly/validators/sunburst/_textfont.py +++ b/plotly/validators/sunburst/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="sunburst", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/_textinfo.py b/plotly/validators/sunburst/_textinfo.py index 291ebd9777..a902714d0f 100644 --- a/plotly/validators/sunburst/_textinfo.py +++ b/plotly/validators/sunburst/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="sunburst", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop( diff --git a/plotly/validators/sunburst/_textsrc.py b/plotly/validators/sunburst/_textsrc.py index b29c5c3b39..b85e671b6f 100644 --- a/plotly/validators/sunburst/_textsrc.py +++ b/plotly/validators/sunburst/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="sunburst", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_texttemplate.py b/plotly/validators/sunburst/_texttemplate.py index dd42c111f1..7ddb3ed887 100644 --- a/plotly/validators/sunburst/_texttemplate.py +++ b/plotly/validators/sunburst/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="sunburst", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/_texttemplatesrc.py b/plotly/validators/sunburst/_texttemplatesrc.py index 4399075678..a47dd7ad47 100644 --- a/plotly/validators/sunburst/_texttemplatesrc.py +++ b/plotly/validators/sunburst/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="sunburst", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_uid.py b/plotly/validators/sunburst/_uid.py index a54edf3e26..d7f08858f5 100644 --- a/plotly/validators/sunburst/_uid.py +++ b/plotly/validators/sunburst/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="sunburst", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/_uirevision.py b/plotly/validators/sunburst/_uirevision.py index faf0777971..9e530df51c 100644 --- a/plotly/validators/sunburst/_uirevision.py +++ b/plotly/validators/sunburst/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="sunburst", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_values.py b/plotly/validators/sunburst/_values.py index b93a212bd0..5e8bff40bf 100644 --- a/plotly/validators/sunburst/_values.py +++ b/plotly/validators/sunburst/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="sunburst", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/_valuessrc.py b/plotly/validators/sunburst/_valuessrc.py index 57531eeccc..489f4310c2 100644 --- a/plotly/validators/sunburst/_valuessrc.py +++ b/plotly/validators/sunburst/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="sunburst", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/_visible.py b/plotly/validators/sunburst/_visible.py index 5739918a08..1091133029 100644 --- a/plotly/validators/sunburst/_visible.py +++ b/plotly/validators/sunburst/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="sunburst", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/sunburst/domain/__init__.py b/plotly/validators/sunburst/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/sunburst/domain/__init__.py +++ b/plotly/validators/sunburst/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/sunburst/domain/_column.py b/plotly/validators/sunburst/domain/_column.py index b58b9cd70e..af3ad3fded 100644 --- a/plotly/validators/sunburst/domain/_column.py +++ b/plotly/validators/sunburst/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="sunburst.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/domain/_row.py b/plotly/validators/sunburst/domain/_row.py index 8b01201605..dc18ee3e97 100644 --- a/plotly/validators/sunburst/domain/_row.py +++ b/plotly/validators/sunburst/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="sunburst.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/domain/_x.py b/plotly/validators/sunburst/domain/_x.py index 85cec608b3..94c331b3dd 100644 --- a/plotly/validators/sunburst/domain/_x.py +++ b/plotly/validators/sunburst/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="sunburst.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/sunburst/domain/_y.py b/plotly/validators/sunburst/domain/_y.py index 95bca9f0a1..84acf1d486 100644 --- a/plotly/validators/sunburst/domain/_y.py +++ b/plotly/validators/sunburst/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="sunburst.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/sunburst/hoverlabel/__init__.py b/plotly/validators/sunburst/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/sunburst/hoverlabel/__init__.py +++ b/plotly/validators/sunburst/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/sunburst/hoverlabel/_align.py b/plotly/validators/sunburst/hoverlabel/_align.py index c9f720c28a..67261095d2 100644 --- a/plotly/validators/sunburst/hoverlabel/_align.py +++ b/plotly/validators/sunburst/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="sunburst.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/sunburst/hoverlabel/_alignsrc.py b/plotly/validators/sunburst/hoverlabel/_alignsrc.py index 13a285a6fe..147798504a 100644 --- a/plotly/validators/sunburst/hoverlabel/_alignsrc.py +++ b/plotly/validators/sunburst/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="sunburst.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/_bgcolor.py b/plotly/validators/sunburst/hoverlabel/_bgcolor.py index b31ba2a11c..e6e318c20f 100644 --- a/plotly/validators/sunburst/hoverlabel/_bgcolor.py +++ b/plotly/validators/sunburst/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sunburst.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py b/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py index d5962aed9a..aa145cb647 100644 --- a/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/sunburst/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="sunburst.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/_bordercolor.py b/plotly/validators/sunburst/hoverlabel/_bordercolor.py index 41f140d4bc..12b8f431a3 100644 --- a/plotly/validators/sunburst/hoverlabel/_bordercolor.py +++ b/plotly/validators/sunburst/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="sunburst.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py b/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py index e323bf060b..9d6f739bdd 100644 --- a/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/sunburst/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="sunburst.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/_font.py b/plotly/validators/sunburst/hoverlabel/_font.py index 5ef53fd987..228c981213 100644 --- a/plotly/validators/sunburst/hoverlabel/_font.py +++ b/plotly/validators/sunburst/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="sunburst.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/hoverlabel/_namelength.py b/plotly/validators/sunburst/hoverlabel/_namelength.py index 105cb2d420..7447c8aa8e 100644 --- a/plotly/validators/sunburst/hoverlabel/_namelength.py +++ b/plotly/validators/sunburst/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="sunburst.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py b/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py index 0e5cdec7d0..81bab69663 100644 --- a/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/sunburst/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="sunburst.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/__init__.py b/plotly/validators/sunburst/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sunburst/hoverlabel/font/__init__.py +++ b/plotly/validators/sunburst/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/hoverlabel/font/_color.py b/plotly/validators/sunburst/hoverlabel/font/_color.py index 730a09336d..d45f360413 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_color.py +++ b/plotly/validators/sunburst/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py b/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py index de2de9cced..268db909e2 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_family.py b/plotly/validators/sunburst/hoverlabel/font/_family.py index 7a1cd94cf6..8def7282d7 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_family.py +++ b/plotly/validators/sunburst/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sunburst/hoverlabel/font/_familysrc.py b/plotly/validators/sunburst/hoverlabel/font/_familysrc.py index f12637e4e1..26bc62e9bf 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_familysrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_lineposition.py b/plotly/validators/sunburst/hoverlabel/font/_lineposition.py index 46e7efca88..41c75019b0 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_lineposition.py +++ b/plotly/validators/sunburst/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sunburst/hoverlabel/font/_linepositionsrc.py b/plotly/validators/sunburst/hoverlabel/font/_linepositionsrc.py index e1bbba4147..c94ae39ae8 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sunburst.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_shadow.py b/plotly/validators/sunburst/hoverlabel/font/_shadow.py index f0c47bd0c6..e23024841d 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_shadow.py +++ b/plotly/validators/sunburst/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/sunburst/hoverlabel/font/_shadowsrc.py b/plotly/validators/sunburst/hoverlabel/font/_shadowsrc.py index ce378b6b5b..660a14b498 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_size.py b/plotly/validators/sunburst/hoverlabel/font/_size.py index 4bc210dbc5..d1b75451c2 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_size.py +++ b/plotly/validators/sunburst/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py b/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py index 895c82a382..d978aaabc8 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_style.py b/plotly/validators/sunburst/hoverlabel/font/_style.py index 2a2a0a51b7..a52ecc0923 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_style.py +++ b/plotly/validators/sunburst/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sunburst/hoverlabel/font/_stylesrc.py b/plotly/validators/sunburst/hoverlabel/font/_stylesrc.py index a7b0693276..8a3b91d2fb 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_textcase.py b/plotly/validators/sunburst/hoverlabel/font/_textcase.py index 4ddc55875d..3b908a9c49 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_textcase.py +++ b/plotly/validators/sunburst/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sunburst/hoverlabel/font/_textcasesrc.py b/plotly/validators/sunburst/hoverlabel/font/_textcasesrc.py index 4ed4a55a1e..7f8dbf90c0 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sunburst.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_variant.py b/plotly/validators/sunburst/hoverlabel/font/_variant.py index 413cd6d41a..c9cc986023 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_variant.py +++ b/plotly/validators/sunburst/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/sunburst/hoverlabel/font/_variantsrc.py b/plotly/validators/sunburst/hoverlabel/font/_variantsrc.py index 03f0e55564..4ae9cef61d 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/hoverlabel/font/_weight.py b/plotly/validators/sunburst/hoverlabel/font/_weight.py index c2111d2d1e..a85c30559c 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_weight.py +++ b/plotly/validators/sunburst/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sunburst/hoverlabel/font/_weightsrc.py b/plotly/validators/sunburst/hoverlabel/font/_weightsrc.py index 7a618843be..9488a496e7 100644 --- a/plotly/validators/sunburst/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/sunburst/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sunburst.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/__init__.py b/plotly/validators/sunburst/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sunburst/insidetextfont/__init__.py +++ b/plotly/validators/sunburst/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/insidetextfont/_color.py b/plotly/validators/sunburst/insidetextfont/_color.py index 22a384794d..d5b03169d0 100644 --- a/plotly/validators/sunburst/insidetextfont/_color.py +++ b/plotly/validators/sunburst/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/insidetextfont/_colorsrc.py b/plotly/validators/sunburst/insidetextfont/_colorsrc.py index b04e7eeb11..d93624d480 100644 --- a/plotly/validators/sunburst/insidetextfont/_colorsrc.py +++ b/plotly/validators/sunburst/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_family.py b/plotly/validators/sunburst/insidetextfont/_family.py index 93036eb31d..bbc574e1eb 100644 --- a/plotly/validators/sunburst/insidetextfont/_family.py +++ b/plotly/validators/sunburst/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sunburst.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sunburst/insidetextfont/_familysrc.py b/plotly/validators/sunburst/insidetextfont/_familysrc.py index 429179e06f..f004ab33ee 100644 --- a/plotly/validators/sunburst/insidetextfont/_familysrc.py +++ b/plotly/validators/sunburst/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_lineposition.py b/plotly/validators/sunburst/insidetextfont/_lineposition.py index 38e7c51c17..9848dbc3be 100644 --- a/plotly/validators/sunburst/insidetextfont/_lineposition.py +++ b/plotly/validators/sunburst/insidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.insidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sunburst/insidetextfont/_linepositionsrc.py b/plotly/validators/sunburst/insidetextfont/_linepositionsrc.py index 59cbac91ad..0fb9829f6a 100644 --- a/plotly/validators/sunburst/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/sunburst/insidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sunburst.insidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_shadow.py b/plotly/validators/sunburst/insidetextfont/_shadow.py index 08dc43c0ca..d687aa0d9f 100644 --- a/plotly/validators/sunburst/insidetextfont/_shadow.py +++ b/plotly/validators/sunburst/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sunburst.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/insidetextfont/_shadowsrc.py b/plotly/validators/sunburst/insidetextfont/_shadowsrc.py index 52ee525962..142951f6ee 100644 --- a/plotly/validators/sunburst/insidetextfont/_shadowsrc.py +++ b/plotly/validators/sunburst/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_size.py b/plotly/validators/sunburst/insidetextfont/_size.py index 66c078779d..0874145e2c 100644 --- a/plotly/validators/sunburst/insidetextfont/_size.py +++ b/plotly/validators/sunburst/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sunburst/insidetextfont/_sizesrc.py b/plotly/validators/sunburst/insidetextfont/_sizesrc.py index 9e51b0b4aa..be3b237665 100644 --- a/plotly/validators/sunburst/insidetextfont/_sizesrc.py +++ b/plotly/validators/sunburst/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_style.py b/plotly/validators/sunburst/insidetextfont/_style.py index 0febc6aab3..3260b8cebc 100644 --- a/plotly/validators/sunburst/insidetextfont/_style.py +++ b/plotly/validators/sunburst/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sunburst.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sunburst/insidetextfont/_stylesrc.py b/plotly/validators/sunburst/insidetextfont/_stylesrc.py index ec0d6af2c1..c6703d675a 100644 --- a/plotly/validators/sunburst/insidetextfont/_stylesrc.py +++ b/plotly/validators/sunburst/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_textcase.py b/plotly/validators/sunburst/insidetextfont/_textcase.py index dc3f44719d..a4bf1146ad 100644 --- a/plotly/validators/sunburst/insidetextfont/_textcase.py +++ b/plotly/validators/sunburst/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sunburst/insidetextfont/_textcasesrc.py b/plotly/validators/sunburst/insidetextfont/_textcasesrc.py index 3469a81417..187bcd97f7 100644 --- a/plotly/validators/sunburst/insidetextfont/_textcasesrc.py +++ b/plotly/validators/sunburst/insidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_variant.py b/plotly/validators/sunburst/insidetextfont/_variant.py index 634e44f12c..757727a709 100644 --- a/plotly/validators/sunburst/insidetextfont/_variant.py +++ b/plotly/validators/sunburst/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/sunburst/insidetextfont/_variantsrc.py b/plotly/validators/sunburst/insidetextfont/_variantsrc.py index b8d7a449a9..0104659504 100644 --- a/plotly/validators/sunburst/insidetextfont/_variantsrc.py +++ b/plotly/validators/sunburst/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/insidetextfont/_weight.py b/plotly/validators/sunburst/insidetextfont/_weight.py index 738f0a2e8c..9e9d47432c 100644 --- a/plotly/validators/sunburst/insidetextfont/_weight.py +++ b/plotly/validators/sunburst/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sunburst/insidetextfont/_weightsrc.py b/plotly/validators/sunburst/insidetextfont/_weightsrc.py index 531a6e7dfe..853d4891b1 100644 --- a/plotly/validators/sunburst/insidetextfont/_weightsrc.py +++ b/plotly/validators/sunburst/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sunburst.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/leaf/__init__.py b/plotly/validators/sunburst/leaf/__init__.py index 049134a716..ea80a8a0f0 100644 --- a/plotly/validators/sunburst/leaf/__init__.py +++ b/plotly/validators/sunburst/leaf/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._opacity import OpacityValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._opacity.OpacityValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._opacity.OpacityValidator"] +) diff --git a/plotly/validators/sunburst/leaf/_opacity.py b/plotly/validators/sunburst/leaf/_opacity.py index c94ca5f0b0..7024a029b4 100644 --- a/plotly/validators/sunburst/leaf/_opacity.py +++ b/plotly/validators/sunburst/leaf/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="sunburst.leaf", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sunburst/legendgrouptitle/__init__.py b/plotly/validators/sunburst/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/sunburst/legendgrouptitle/__init__.py +++ b/plotly/validators/sunburst/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/sunburst/legendgrouptitle/_font.py b/plotly/validators/sunburst/legendgrouptitle/_font.py index 9d5e255537..f7af255930 100644 --- a/plotly/validators/sunburst/legendgrouptitle/_font.py +++ b/plotly/validators/sunburst/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="sunburst.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/sunburst/legendgrouptitle/_text.py b/plotly/validators/sunburst/legendgrouptitle/_text.py index bef05fabef..90aee13863 100644 --- a/plotly/validators/sunburst/legendgrouptitle/_text.py +++ b/plotly/validators/sunburst/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="sunburst.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sunburst/legendgrouptitle/font/__init__.py b/plotly/validators/sunburst/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/__init__.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_color.py b/plotly/validators/sunburst/legendgrouptitle/font/_color.py index 90e05f8908..8aad8e7ea6 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_color.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_family.py b/plotly/validators/sunburst/legendgrouptitle/font/_family.py index 93d20ea04d..438293f1eb 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_family.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_lineposition.py b/plotly/validators/sunburst/legendgrouptitle/font/_lineposition.py index af49a88dd4..29b06dd6f6 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_shadow.py b/plotly/validators/sunburst/legendgrouptitle/font/_shadow.py index b087a703a4..1daa6febd8 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_size.py b/plotly/validators/sunburst/legendgrouptitle/font/_size.py index a7242afa19..a32899ea68 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_size.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_style.py b/plotly/validators/sunburst/legendgrouptitle/font/_style.py index c38fd9932d..78d2b24434 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_style.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_textcase.py b/plotly/validators/sunburst/legendgrouptitle/font/_textcase.py index c75360a2ef..cc0241ea76 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_variant.py b/plotly/validators/sunburst/legendgrouptitle/font/_variant.py index 80b57e2624..1ec2f9dc64 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_variant.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/sunburst/legendgrouptitle/font/_weight.py b/plotly/validators/sunburst/legendgrouptitle/font/_weight.py index b88e981ae5..5fd01d719a 100644 --- a/plotly/validators/sunburst/legendgrouptitle/font/_weight.py +++ b/plotly/validators/sunburst/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/sunburst/marker/__init__.py b/plotly/validators/sunburst/marker/__init__.py index e04f18cc55..a739102172 100644 --- a/plotly/validators/sunburst/marker/__init__.py +++ b/plotly/validators/sunburst/marker/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._pattern import PatternValidator - from ._line import LineValidator - from ._colorssrc import ColorssrcValidator - from ._colorscale import ColorscaleValidator - from ._colors import ColorsValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._pattern.PatternValidator", - "._line.LineValidator", - "._colorssrc.ColorssrcValidator", - "._colorscale.ColorscaleValidator", - "._colors.ColorsValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pattern.PatternValidator", + "._line.LineValidator", + "._colorssrc.ColorssrcValidator", + "._colorscale.ColorscaleValidator", + "._colors.ColorsValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/_autocolorscale.py b/plotly/validators/sunburst/marker/_autocolorscale.py index 907251dd1e..41f384787c 100644 --- a/plotly/validators/sunburst/marker/_autocolorscale.py +++ b/plotly/validators/sunburst/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="sunburst.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/sunburst/marker/_cauto.py b/plotly/validators/sunburst/marker/_cauto.py index 0ca2cb6afd..63a5027274 100644 --- a/plotly/validators/sunburst/marker/_cauto.py +++ b/plotly/validators/sunburst/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="sunburst.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/sunburst/marker/_cmax.py b/plotly/validators/sunburst/marker/_cmax.py index 2966493d56..10cf292b0c 100644 --- a/plotly/validators/sunburst/marker/_cmax.py +++ b/plotly/validators/sunburst/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="sunburst.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/sunburst/marker/_cmid.py b/plotly/validators/sunburst/marker/_cmid.py index f19d947818..632d61aba6 100644 --- a/plotly/validators/sunburst/marker/_cmid.py +++ b/plotly/validators/sunburst/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="sunburst.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/sunburst/marker/_cmin.py b/plotly/validators/sunburst/marker/_cmin.py index 156c1eed15..410ce7342e 100644 --- a/plotly/validators/sunburst/marker/_cmin.py +++ b/plotly/validators/sunburst/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="sunburst.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/sunburst/marker/_coloraxis.py b/plotly/validators/sunburst/marker/_coloraxis.py index fcc558e6af..fce9350b30 100644 --- a/plotly/validators/sunburst/marker/_coloraxis.py +++ b/plotly/validators/sunburst/marker/_coloraxis.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__( self, plotly_name="coloraxis", parent_name="sunburst.marker", **kwargs ): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/sunburst/marker/_colorbar.py b/plotly/validators/sunburst/marker/_colorbar.py index b1eef13139..9e5953ac57 100644 --- a/plotly/validators/sunburst/marker/_colorbar.py +++ b/plotly/validators/sunburst/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="sunburst.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.sunburs - t.marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.sunburst.marker.colorbar.tickformatstopdefaul - ts), sets the default property values to use - for elements of - sunburst.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.sunburst.marker.co - lorbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/_colors.py b/plotly/validators/sunburst/marker/_colors.py index f367c8ca25..38f92b2e89 100644 --- a/plotly/validators/sunburst/marker/_colors.py +++ b/plotly/validators/sunburst/marker/_colors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="colors", parent_name="sunburst.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/_colorscale.py b/plotly/validators/sunburst/marker/_colorscale.py index eab681b1ab..9725863bef 100644 --- a/plotly/validators/sunburst/marker/_colorscale.py +++ b/plotly/validators/sunburst/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="sunburst.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/sunburst/marker/_colorssrc.py b/plotly/validators/sunburst/marker/_colorssrc.py index d4df61796f..75c1acd80c 100644 --- a/plotly/validators/sunburst/marker/_colorssrc.py +++ b/plotly/validators/sunburst/marker/_colorssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorssrc", parent_name="sunburst.marker", **kwargs ): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/_line.py b/plotly/validators/sunburst/marker/_line.py index 8eb5361f0f..3206b3cca3 100644 --- a/plotly/validators/sunburst/marker/_line.py +++ b/plotly/validators/sunburst/marker/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="sunburst.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/_pattern.py b/plotly/validators/sunburst/marker/_pattern.py index ed80bc7a1d..43fae607e7 100644 --- a/plotly/validators/sunburst/marker/_pattern.py +++ b/plotly/validators/sunburst/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="sunburst.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/_reversescale.py b/plotly/validators/sunburst/marker/_reversescale.py index 7b18c163fe..857d1bc762 100644 --- a/plotly/validators/sunburst/marker/_reversescale.py +++ b/plotly/validators/sunburst/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="sunburst.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/_showscale.py b/plotly/validators/sunburst/marker/_showscale.py index e38dd3b74c..a3f8cffaf1 100644 --- a/plotly/validators/sunburst/marker/_showscale.py +++ b/plotly/validators/sunburst/marker/_showscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showscale", parent_name="sunburst.marker", **kwargs ): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/__init__.py b/plotly/validators/sunburst/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/sunburst/marker/colorbar/__init__.py +++ b/plotly/validators/sunburst/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/colorbar/_bgcolor.py b/plotly/validators/sunburst/marker/colorbar/_bgcolor.py index 1043e79a3c..a1709951d1 100644 --- a/plotly/validators/sunburst/marker/colorbar/_bgcolor.py +++ b/plotly/validators/sunburst/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sunburst.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_bordercolor.py b/plotly/validators/sunburst/marker/colorbar/_bordercolor.py index 4acb211dc7..5e74162231 100644 --- a/plotly/validators/sunburst/marker/colorbar/_bordercolor.py +++ b/plotly/validators/sunburst/marker/colorbar/_bordercolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_borderwidth.py b/plotly/validators/sunburst/marker/colorbar/_borderwidth.py index c0c408d8e2..5c574b767f 100644 --- a/plotly/validators/sunburst/marker/colorbar/_borderwidth.py +++ b/plotly/validators/sunburst/marker/colorbar/_borderwidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_dtick.py b/plotly/validators/sunburst/marker/colorbar/_dtick.py index 8b9b11464c..f04ea5f273 100644 --- a/plotly/validators/sunburst/marker/colorbar/_dtick.py +++ b/plotly/validators/sunburst/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="sunburst.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_exponentformat.py b/plotly/validators/sunburst/marker/colorbar/_exponentformat.py index 4b9c182be7..591efed7c7 100644 --- a/plotly/validators/sunburst/marker/colorbar/_exponentformat.py +++ b/plotly/validators/sunburst/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_labelalias.py b/plotly/validators/sunburst/marker/colorbar/_labelalias.py index 66f92a5291..1e6821fadf 100644 --- a/plotly/validators/sunburst/marker/colorbar/_labelalias.py +++ b/plotly/validators/sunburst/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="sunburst.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_len.py b/plotly/validators/sunburst/marker/colorbar/_len.py index 75feed54b8..b21a4aeefc 100644 --- a/plotly/validators/sunburst/marker/colorbar/_len.py +++ b/plotly/validators/sunburst/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="sunburst.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_lenmode.py b/plotly/validators/sunburst/marker/colorbar/_lenmode.py index 2adbc472ac..860d738772 100644 --- a/plotly/validators/sunburst/marker/colorbar/_lenmode.py +++ b/plotly/validators/sunburst/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="sunburst.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_minexponent.py b/plotly/validators/sunburst/marker/colorbar/_minexponent.py index 6ae8c82ab0..d383ff8f35 100644 --- a/plotly/validators/sunburst/marker/colorbar/_minexponent.py +++ b/plotly/validators/sunburst/marker/colorbar/_minexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_nticks.py b/plotly/validators/sunburst/marker/colorbar/_nticks.py index ea512197b2..d576674a32 100644 --- a/plotly/validators/sunburst/marker/colorbar/_nticks.py +++ b/plotly/validators/sunburst/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="sunburst.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_orientation.py b/plotly/validators/sunburst/marker/colorbar/_orientation.py index ed4374024e..c9c6f312ec 100644 --- a/plotly/validators/sunburst/marker/colorbar/_orientation.py +++ b/plotly/validators/sunburst/marker/colorbar/_orientation.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py b/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py index 629132344f..5233b52f1c 100644 --- a/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/sunburst/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py b/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py index 4d4d0a1a9f..402d8b9624 100644 --- a/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/sunburst/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_separatethousands.py b/plotly/validators/sunburst/marker/colorbar/_separatethousands.py index de569f65d8..b5301b4c6a 100644 --- a/plotly/validators/sunburst/marker/colorbar/_separatethousands.py +++ b/plotly/validators/sunburst/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_showexponent.py b/plotly/validators/sunburst/marker/colorbar/_showexponent.py index 86bb429545..92a78f3fa4 100644 --- a/plotly/validators/sunburst/marker/colorbar/_showexponent.py +++ b/plotly/validators/sunburst/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_showticklabels.py b/plotly/validators/sunburst/marker/colorbar/_showticklabels.py index 6e7e65192a..4d367a0637 100644 --- a/plotly/validators/sunburst/marker/colorbar/_showticklabels.py +++ b/plotly/validators/sunburst/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py b/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py index 1e5209c89c..26c3eaf416 100644 --- a/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/sunburst/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py b/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py index b68a63b875..78e541d421 100644 --- a/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_thickness.py b/plotly/validators/sunburst/marker/colorbar/_thickness.py index 3639b54764..b06ae53e8a 100644 --- a/plotly/validators/sunburst/marker/colorbar/_thickness.py +++ b/plotly/validators/sunburst/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="sunburst.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py b/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py index 64d78435af..41cbc583e2 100644 --- a/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/sunburst/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_tick0.py b/plotly/validators/sunburst/marker/colorbar/_tick0.py index 8ef2248d49..291ad9d1d1 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tick0.py +++ b/plotly/validators/sunburst/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="sunburst.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_tickangle.py b/plotly/validators/sunburst/marker/colorbar/_tickangle.py index d6dbde38c9..c837230a82 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickangle.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_tickcolor.py b/plotly/validators/sunburst/marker/colorbar/_tickcolor.py index 21016b9563..223efeb51e 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickcolor.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_tickfont.py b/plotly/validators/sunburst/marker/colorbar/_tickfont.py index 0cd6af182d..66d0c7d10a 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickfont.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_tickformat.py b/plotly/validators/sunburst/marker/colorbar/_tickformat.py index 0233267d2a..bf976f68c4 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickformat.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py index 7d7919712a..11fa3f2336 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py b/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py index 6fa5908772..df994c7589 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/sunburst/marker/colorbar/_ticklabeloverflow.py index 66cf6193d8..494bb72324 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_ticklabelposition.py b/plotly/validators/sunburst/marker/colorbar/_ticklabelposition.py index 3adb10606f..2395c78e08 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/sunburst/marker/colorbar/_ticklabelstep.py b/plotly/validators/sunburst/marker/colorbar/_ticklabelstep.py index 2f1a3aed54..1db5651e1c 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_ticklen.py b/plotly/validators/sunburst/marker/colorbar/_ticklen.py index b0c351ffc1..b9bd7f42a4 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticklen.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_tickmode.py b/plotly/validators/sunburst/marker/colorbar/_tickmode.py index 140f252e05..b3bc466c9c 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickmode.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/sunburst/marker/colorbar/_tickprefix.py b/plotly/validators/sunburst/marker/colorbar/_tickprefix.py index 428f8de93b..0bf08c3077 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickprefix.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_ticks.py b/plotly/validators/sunburst/marker/colorbar/_ticks.py index e2b39e7dc3..003bcdab4d 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticks.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py b/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py index 33cec19861..b166be8793 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_ticktext.py b/plotly/validators/sunburst/marker/colorbar/_ticktext.py index 0973a3d379..6bda9ac5f8 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticktext.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py b/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py index e09f4e6ffb..6626450b55 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/sunburst/marker/colorbar/_ticktextsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_tickvals.py b/plotly/validators/sunburst/marker/colorbar/_tickvals.py index b8384e696b..a5828950fb 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickvals.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py b/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py index 9d7a541742..5716a3c49f 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickvalssrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="sunburst.marker.colorbar", **kwargs, ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_tickwidth.py b/plotly/validators/sunburst/marker/colorbar/_tickwidth.py index 188d4fc820..5616a488a7 100644 --- a/plotly/validators/sunburst/marker/colorbar/_tickwidth.py +++ b/plotly/validators/sunburst/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_title.py b/plotly/validators/sunburst/marker/colorbar/_title.py index 99929b9146..b657f35ba1 100644 --- a/plotly/validators/sunburst/marker/colorbar/_title.py +++ b/plotly/validators/sunburst/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="sunburst.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_x.py b/plotly/validators/sunburst/marker/colorbar/_x.py index e0af9666a7..37ab68d1bb 100644 --- a/plotly/validators/sunburst/marker/colorbar/_x.py +++ b/plotly/validators/sunburst/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="sunburst.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_xanchor.py b/plotly/validators/sunburst/marker/colorbar/_xanchor.py index cdeff8f79e..9e49b00020 100644 --- a/plotly/validators/sunburst/marker/colorbar/_xanchor.py +++ b/plotly/validators/sunburst/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="sunburst.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_xpad.py b/plotly/validators/sunburst/marker/colorbar/_xpad.py index 3bfa75bf58..112c936ba2 100644 --- a/plotly/validators/sunburst/marker/colorbar/_xpad.py +++ b/plotly/validators/sunburst/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="sunburst.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_xref.py b/plotly/validators/sunburst/marker/colorbar/_xref.py index 36c8a29249..2a65e2e0a0 100644 --- a/plotly/validators/sunburst/marker/colorbar/_xref.py +++ b/plotly/validators/sunburst/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="sunburst.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_y.py b/plotly/validators/sunburst/marker/colorbar/_y.py index 1ef98a59b0..159f162873 100644 --- a/plotly/validators/sunburst/marker/colorbar/_y.py +++ b/plotly/validators/sunburst/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="sunburst.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/_yanchor.py b/plotly/validators/sunburst/marker/colorbar/_yanchor.py index f27f2f1a18..d43e7c4b37 100644 --- a/plotly/validators/sunburst/marker/colorbar/_yanchor.py +++ b/plotly/validators/sunburst/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="sunburst.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_ypad.py b/plotly/validators/sunburst/marker/colorbar/_ypad.py index 791f4bf0e8..da2bd41dca 100644 --- a/plotly/validators/sunburst/marker/colorbar/_ypad.py +++ b/plotly/validators/sunburst/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="sunburst.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/_yref.py b/plotly/validators/sunburst/marker/colorbar/_yref.py index bb79a74d64..9c94a0c445 100644 --- a/plotly/validators/sunburst/marker/colorbar/_yref.py +++ b/plotly/validators/sunburst/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="sunburst.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py b/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py index d3174864c3..951fcf5937 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py index c38169c73e..852eca22b7 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_lineposition.py index b789db5d38..6a03468209 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_shadow.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_shadow.py index 9e9480be05..0c94551796 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py index d70d53872f..e67d09170e 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_style.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_style.py index ddfecba7fc..dd0d7ce368 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_textcase.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_textcase.py index fefd97ce10..00a13ecd79 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_variant.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_variant.py index cac7249d6c..5ad444f936 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/sunburst/marker/colorbar/tickfont/_weight.py b/plotly/validators/sunburst/marker/colorbar/tickfont/_weight.py index 8cb54be75b..dcce4df7a5 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/sunburst/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/sunburst/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py index ed5f11d7d0..74e1b520f6 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="sunburst.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py index 208c4b212c..38a6523959 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="sunburst.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py index e451ae1c98..503f2e458e 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="sunburst.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py index 411f073559..01af05207a 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="sunburst.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py index 44239fd2d5..8419350820 100644 --- a/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/sunburst/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="sunburst.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/title/__init__.py b/plotly/validators/sunburst/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/__init__.py +++ b/plotly/validators/sunburst/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/sunburst/marker/colorbar/title/_font.py b/plotly/validators/sunburst/marker/colorbar/title/_font.py index cb67eb292e..f7d4f684eb 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/_font.py +++ b/plotly/validators/sunburst/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="sunburst.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/title/_side.py b/plotly/validators/sunburst/marker/colorbar/title/_side.py index 3f8e59df1d..0bc2314bea 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/_side.py +++ b/plotly/validators/sunburst/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="sunburst.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/title/_text.py b/plotly/validators/sunburst/marker/colorbar/title/_text.py index ac982c808a..3f1501248e 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/_text.py +++ b/plotly/validators/sunburst/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="sunburst.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py b/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_color.py b/plotly/validators/sunburst/marker/colorbar/title/font/_color.py index e092c4556d..5c8bdcb306 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_color.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_family.py b/plotly/validators/sunburst/marker/colorbar/title/font/_family.py index 327ed80785..339a5d3422 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_family.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_lineposition.py b/plotly/validators/sunburst/marker/colorbar/title/font/_lineposition.py index 6da04101fb..196852e824 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_shadow.py b/plotly/validators/sunburst/marker/colorbar/title/font/_shadow.py index 966f1c9550..670bd130cf 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_size.py b/plotly/validators/sunburst/marker/colorbar/title/font/_size.py index cb35c6a22e..589035f8f1 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_size.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_style.py b/plotly/validators/sunburst/marker/colorbar/title/font/_style.py index 1495d2cc54..55906c30e2 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_style.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_textcase.py b/plotly/validators/sunburst/marker/colorbar/title/font/_textcase.py index f1422536bc..ef87a0a78e 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_variant.py b/plotly/validators/sunburst/marker/colorbar/title/font/_variant.py index 92cb0df319..a13d0299d6 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/sunburst/marker/colorbar/title/font/_weight.py b/plotly/validators/sunburst/marker/colorbar/title/font/_weight.py index 1440fea37a..b8f0806b2b 100644 --- a/plotly/validators/sunburst/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/sunburst/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/sunburst/marker/line/__init__.py b/plotly/validators/sunburst/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/sunburst/marker/line/__init__.py +++ b/plotly/validators/sunburst/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/line/_color.py b/plotly/validators/sunburst/marker/line/_color.py index 7259244bbc..cbc6407724 100644 --- a/plotly/validators/sunburst/marker/line/_color.py +++ b/plotly/validators/sunburst/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/sunburst/marker/line/_colorsrc.py b/plotly/validators/sunburst/marker/line/_colorsrc.py index 51c7ee759b..1d4f46821c 100644 --- a/plotly/validators/sunburst/marker/line/_colorsrc.py +++ b/plotly/validators/sunburst/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sunburst.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/line/_width.py b/plotly/validators/sunburst/marker/line/_width.py index 2eb546fdf7..696c3c8585 100644 --- a/plotly/validators/sunburst/marker/line/_width.py +++ b/plotly/validators/sunburst/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="sunburst.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sunburst/marker/line/_widthsrc.py b/plotly/validators/sunburst/marker/line/_widthsrc.py index 370a9a0a2b..62f1b8c2d4 100644 --- a/plotly/validators/sunburst/marker/line/_widthsrc.py +++ b/plotly/validators/sunburst/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="sunburst.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/pattern/__init__.py b/plotly/validators/sunburst/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/sunburst/marker/pattern/__init__.py +++ b/plotly/validators/sunburst/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/sunburst/marker/pattern/_bgcolor.py b/plotly/validators/sunburst/marker/pattern/_bgcolor.py index f8d91e0bc5..6e566cd847 100644 --- a/plotly/validators/sunburst/marker/pattern/_bgcolor.py +++ b/plotly/validators/sunburst/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sunburst.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/sunburst/marker/pattern/_bgcolorsrc.py b/plotly/validators/sunburst/marker/pattern/_bgcolorsrc.py index 6ac1252463..ed293aba19 100644 --- a/plotly/validators/sunburst/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/sunburst/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="sunburst.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/pattern/_fgcolor.py b/plotly/validators/sunburst/marker/pattern/_fgcolor.py index 061047f411..9980a23437 100644 --- a/plotly/validators/sunburst/marker/pattern/_fgcolor.py +++ b/plotly/validators/sunburst/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="sunburst.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/sunburst/marker/pattern/_fgcolorsrc.py b/plotly/validators/sunburst/marker/pattern/_fgcolorsrc.py index 86c3ff70ae..c4acf7dfc2 100644 --- a/plotly/validators/sunburst/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/sunburst/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="sunburst.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/pattern/_fgopacity.py b/plotly/validators/sunburst/marker/pattern/_fgopacity.py index 8d49e47301..4d37b38b6d 100644 --- a/plotly/validators/sunburst/marker/pattern/_fgopacity.py +++ b/plotly/validators/sunburst/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="sunburst.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sunburst/marker/pattern/_fillmode.py b/plotly/validators/sunburst/marker/pattern/_fillmode.py index f2fb4c7fba..9033108227 100644 --- a/plotly/validators/sunburst/marker/pattern/_fillmode.py +++ b/plotly/validators/sunburst/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="sunburst.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/sunburst/marker/pattern/_shape.py b/plotly/validators/sunburst/marker/pattern/_shape.py index 5780376c00..4ec6c7c8a5 100644 --- a/plotly/validators/sunburst/marker/pattern/_shape.py +++ b/plotly/validators/sunburst/marker/pattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="sunburst.marker.pattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/sunburst/marker/pattern/_shapesrc.py b/plotly/validators/sunburst/marker/pattern/_shapesrc.py index eea033eee0..be29d7d057 100644 --- a/plotly/validators/sunburst/marker/pattern/_shapesrc.py +++ b/plotly/validators/sunburst/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="sunburst.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/pattern/_size.py b/plotly/validators/sunburst/marker/pattern/_size.py index 1b9a310941..f02733cf8d 100644 --- a/plotly/validators/sunburst/marker/pattern/_size.py +++ b/plotly/validators/sunburst/marker/pattern/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.marker.pattern", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sunburst/marker/pattern/_sizesrc.py b/plotly/validators/sunburst/marker/pattern/_sizesrc.py index 1ef91bc2cd..131d31be3a 100644 --- a/plotly/validators/sunburst/marker/pattern/_sizesrc.py +++ b/plotly/validators/sunburst/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sunburst.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/marker/pattern/_solidity.py b/plotly/validators/sunburst/marker/pattern/_solidity.py index 12819d300b..b17839c563 100644 --- a/plotly/validators/sunburst/marker/pattern/_solidity.py +++ b/plotly/validators/sunburst/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="sunburst.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/sunburst/marker/pattern/_soliditysrc.py b/plotly/validators/sunburst/marker/pattern/_soliditysrc.py index 6d9fb3e830..13aeefa0c8 100644 --- a/plotly/validators/sunburst/marker/pattern/_soliditysrc.py +++ b/plotly/validators/sunburst/marker/pattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="sunburst.marker.pattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/__init__.py b/plotly/validators/sunburst/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sunburst/outsidetextfont/__init__.py +++ b/plotly/validators/sunburst/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/outsidetextfont/_color.py b/plotly/validators/sunburst/outsidetextfont/_color.py index 618dc20b58..7f34ef3d8c 100644 --- a/plotly/validators/sunburst/outsidetextfont/_color.py +++ b/plotly/validators/sunburst/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="sunburst.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/outsidetextfont/_colorsrc.py b/plotly/validators/sunburst/outsidetextfont/_colorsrc.py index bf53315de5..f3e95a6aff 100644 --- a/plotly/validators/sunburst/outsidetextfont/_colorsrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_family.py b/plotly/validators/sunburst/outsidetextfont/_family.py index 8fbbfbc9d9..bfd109058c 100644 --- a/plotly/validators/sunburst/outsidetextfont/_family.py +++ b/plotly/validators/sunburst/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="sunburst.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sunburst/outsidetextfont/_familysrc.py b/plotly/validators/sunburst/outsidetextfont/_familysrc.py index 58f057f269..b78acafe0b 100644 --- a/plotly/validators/sunburst/outsidetextfont/_familysrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_lineposition.py b/plotly/validators/sunburst/outsidetextfont/_lineposition.py index 0b62f102b0..fbcd282828 100644 --- a/plotly/validators/sunburst/outsidetextfont/_lineposition.py +++ b/plotly/validators/sunburst/outsidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.outsidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sunburst/outsidetextfont/_linepositionsrc.py b/plotly/validators/sunburst/outsidetextfont/_linepositionsrc.py index 7fe11e3b07..42a5ef321b 100644 --- a/plotly/validators/sunburst/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sunburst.outsidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_shadow.py b/plotly/validators/sunburst/outsidetextfont/_shadow.py index de55ec56a0..56727f437a 100644 --- a/plotly/validators/sunburst/outsidetextfont/_shadow.py +++ b/plotly/validators/sunburst/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="sunburst.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/outsidetextfont/_shadowsrc.py b/plotly/validators/sunburst/outsidetextfont/_shadowsrc.py index 6538ba4f37..801aebf11a 100644 --- a/plotly/validators/sunburst/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_size.py b/plotly/validators/sunburst/outsidetextfont/_size.py index 88045be5d9..740e5a2e5b 100644 --- a/plotly/validators/sunburst/outsidetextfont/_size.py +++ b/plotly/validators/sunburst/outsidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="sunburst.outsidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sunburst/outsidetextfont/_sizesrc.py b/plotly/validators/sunburst/outsidetextfont/_sizesrc.py index 7ce3cd0b01..0951e9dacc 100644 --- a/plotly/validators/sunburst/outsidetextfont/_sizesrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_style.py b/plotly/validators/sunburst/outsidetextfont/_style.py index b738e2adca..3435522265 100644 --- a/plotly/validators/sunburst/outsidetextfont/_style.py +++ b/plotly/validators/sunburst/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="sunburst.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sunburst/outsidetextfont/_stylesrc.py b/plotly/validators/sunburst/outsidetextfont/_stylesrc.py index 5970a7c900..b508c1a1a8 100644 --- a/plotly/validators/sunburst/outsidetextfont/_stylesrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_textcase.py b/plotly/validators/sunburst/outsidetextfont/_textcase.py index bd1485a8f8..2c0a878b8b 100644 --- a/plotly/validators/sunburst/outsidetextfont/_textcase.py +++ b/plotly/validators/sunburst/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sunburst/outsidetextfont/_textcasesrc.py b/plotly/validators/sunburst/outsidetextfont/_textcasesrc.py index 30e1b58e18..02ca677463 100644 --- a/plotly/validators/sunburst/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sunburst.outsidetextfont", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_variant.py b/plotly/validators/sunburst/outsidetextfont/_variant.py index 99568568b1..9b4e5e9c27 100644 --- a/plotly/validators/sunburst/outsidetextfont/_variant.py +++ b/plotly/validators/sunburst/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/sunburst/outsidetextfont/_variantsrc.py b/plotly/validators/sunburst/outsidetextfont/_variantsrc.py index 7439ad94ab..2b309c61dd 100644 --- a/plotly/validators/sunburst/outsidetextfont/_variantsrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/outsidetextfont/_weight.py b/plotly/validators/sunburst/outsidetextfont/_weight.py index ea8e41fb94..37da65b39b 100644 --- a/plotly/validators/sunburst/outsidetextfont/_weight.py +++ b/plotly/validators/sunburst/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="sunburst.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sunburst/outsidetextfont/_weightsrc.py b/plotly/validators/sunburst/outsidetextfont/_weightsrc.py index 4fcad2c6f3..fd152dfc12 100644 --- a/plotly/validators/sunburst/outsidetextfont/_weightsrc.py +++ b/plotly/validators/sunburst/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sunburst.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/root/__init__.py b/plotly/validators/sunburst/root/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/sunburst/root/__init__.py +++ b/plotly/validators/sunburst/root/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/sunburst/root/_color.py b/plotly/validators/sunburst/root/_color.py index 1951f74c86..cfd723ff3c 100644 --- a/plotly/validators/sunburst/root/_color.py +++ b/plotly/validators/sunburst/root/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sunburst.root", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/sunburst/stream/__init__.py b/plotly/validators/sunburst/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/sunburst/stream/__init__.py +++ b/plotly/validators/sunburst/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/sunburst/stream/_maxpoints.py b/plotly/validators/sunburst/stream/_maxpoints.py index cd47572c89..390f69f457 100644 --- a/plotly/validators/sunburst/stream/_maxpoints.py +++ b/plotly/validators/sunburst/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="sunburst.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/sunburst/stream/_token.py b/plotly/validators/sunburst/stream/_token.py index 091ed637ad..435e04e257 100644 --- a/plotly/validators/sunburst/stream/_token.py +++ b/plotly/validators/sunburst/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="sunburst.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/sunburst/textfont/__init__.py b/plotly/validators/sunburst/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/sunburst/textfont/__init__.py +++ b/plotly/validators/sunburst/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/sunburst/textfont/_color.py b/plotly/validators/sunburst/textfont/_color.py index fe64ae72ae..415eb5bc30 100644 --- a/plotly/validators/sunburst/textfont/_color.py +++ b/plotly/validators/sunburst/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="sunburst.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/textfont/_colorsrc.py b/plotly/validators/sunburst/textfont/_colorsrc.py index 50e32573ab..9a7295c670 100644 --- a/plotly/validators/sunburst/textfont/_colorsrc.py +++ b/plotly/validators/sunburst/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="sunburst.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_family.py b/plotly/validators/sunburst/textfont/_family.py index 824eac9228..08a8aea201 100644 --- a/plotly/validators/sunburst/textfont/_family.py +++ b/plotly/validators/sunburst/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="sunburst.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/sunburst/textfont/_familysrc.py b/plotly/validators/sunburst/textfont/_familysrc.py index 68f6395e05..fd42a94982 100644 --- a/plotly/validators/sunburst/textfont/_familysrc.py +++ b/plotly/validators/sunburst/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="sunburst.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_lineposition.py b/plotly/validators/sunburst/textfont/_lineposition.py index 431cfe1948..4e60f3cf65 100644 --- a/plotly/validators/sunburst/textfont/_lineposition.py +++ b/plotly/validators/sunburst/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="sunburst.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/sunburst/textfont/_linepositionsrc.py b/plotly/validators/sunburst/textfont/_linepositionsrc.py index 643d9038e7..373f3603a5 100644 --- a/plotly/validators/sunburst/textfont/_linepositionsrc.py +++ b/plotly/validators/sunburst/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="sunburst.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_shadow.py b/plotly/validators/sunburst/textfont/_shadow.py index a6fc5cc334..34dea3018d 100644 --- a/plotly/validators/sunburst/textfont/_shadow.py +++ b/plotly/validators/sunburst/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="sunburst.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/sunburst/textfont/_shadowsrc.py b/plotly/validators/sunburst/textfont/_shadowsrc.py index 1c4ce5742a..93450367af 100644 --- a/plotly/validators/sunburst/textfont/_shadowsrc.py +++ b/plotly/validators/sunburst/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="sunburst.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_size.py b/plotly/validators/sunburst/textfont/_size.py index 9de566216a..a8b6dc4f05 100644 --- a/plotly/validators/sunburst/textfont/_size.py +++ b/plotly/validators/sunburst/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="sunburst.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/sunburst/textfont/_sizesrc.py b/plotly/validators/sunburst/textfont/_sizesrc.py index a905bc4e1a..e557eaecee 100644 --- a/plotly/validators/sunburst/textfont/_sizesrc.py +++ b/plotly/validators/sunburst/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="sunburst.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_style.py b/plotly/validators/sunburst/textfont/_style.py index 03b5bc8eea..356558ec67 100644 --- a/plotly/validators/sunburst/textfont/_style.py +++ b/plotly/validators/sunburst/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="sunburst.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/sunburst/textfont/_stylesrc.py b/plotly/validators/sunburst/textfont/_stylesrc.py index 37ad923128..ee4e4c4cd2 100644 --- a/plotly/validators/sunburst/textfont/_stylesrc.py +++ b/plotly/validators/sunburst/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="sunburst.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_textcase.py b/plotly/validators/sunburst/textfont/_textcase.py index 5c067a17a3..b985458c7f 100644 --- a/plotly/validators/sunburst/textfont/_textcase.py +++ b/plotly/validators/sunburst/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="sunburst.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/sunburst/textfont/_textcasesrc.py b/plotly/validators/sunburst/textfont/_textcasesrc.py index 956e24f6ba..aca4a2c8b8 100644 --- a/plotly/validators/sunburst/textfont/_textcasesrc.py +++ b/plotly/validators/sunburst/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="sunburst.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_variant.py b/plotly/validators/sunburst/textfont/_variant.py index e66745c9a1..a21d3afc0d 100644 --- a/plotly/validators/sunburst/textfont/_variant.py +++ b/plotly/validators/sunburst/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="sunburst.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/sunburst/textfont/_variantsrc.py b/plotly/validators/sunburst/textfont/_variantsrc.py index d18b211b1d..e35e77edae 100644 --- a/plotly/validators/sunburst/textfont/_variantsrc.py +++ b/plotly/validators/sunburst/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="sunburst.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/sunburst/textfont/_weight.py b/plotly/validators/sunburst/textfont/_weight.py index 6af8ff1de2..fcccffaf15 100644 --- a/plotly/validators/sunburst/textfont/_weight.py +++ b/plotly/validators/sunburst/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="sunburst.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/sunburst/textfont/_weightsrc.py b/plotly/validators/sunburst/textfont/_weightsrc.py index 58a08ca775..eb52f384c0 100644 --- a/plotly/validators/sunburst/textfont/_weightsrc.py +++ b/plotly/validators/sunburst/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="sunburst.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/__init__.py b/plotly/validators/surface/__init__.py index 40b7043b3f..e8de2a5652 100644 --- a/plotly/validators/surface/__init__.py +++ b/plotly/validators/surface/__init__.py @@ -1,129 +1,67 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._zcalendar import ZcalendarValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._ycalendar import YcalendarValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xcalendar import XcalendarValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._surfacecolorsrc import SurfacecolorsrcValidator - from ._surfacecolor import SurfacecolorValidator - from ._stream import StreamValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._reversescale import ReversescaleValidator - from ._opacityscale import OpacityscaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lightposition import LightpositionValidator - from ._lighting import LightingValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._hidesurface import HidesurfaceValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contours import ContoursValidator - from ._connectgaps import ConnectgapsValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._zcalendar.ZcalendarValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._ycalendar.YcalendarValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xcalendar.XcalendarValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._surfacecolorsrc.SurfacecolorsrcValidator", - "._surfacecolor.SurfacecolorValidator", - "._stream.StreamValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._reversescale.ReversescaleValidator", - "._opacityscale.OpacityscaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lightposition.LightpositionValidator", - "._lighting.LightingValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._hidesurface.HidesurfaceValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contours.ContoursValidator", - "._connectgaps.ConnectgapsValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._zcalendar.ZcalendarValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._ycalendar.YcalendarValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xcalendar.XcalendarValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._surfacecolorsrc.SurfacecolorsrcValidator", + "._surfacecolor.SurfacecolorValidator", + "._stream.StreamValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacityscale.OpacityscaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._hidesurface.HidesurfaceValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contours.ContoursValidator", + "._connectgaps.ConnectgapsValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/surface/_autocolorscale.py b/plotly/validators/surface/_autocolorscale.py index 55d2a95c89..3d747e7312 100644 --- a/plotly/validators/surface/_autocolorscale.py +++ b/plotly/validators/surface/_autocolorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="surface", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/surface/_cauto.py b/plotly/validators/surface/_cauto.py index c81de2d7d1..28b0d14652 100644 --- a/plotly/validators/surface/_cauto.py +++ b/plotly/validators/surface/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="surface", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/surface/_cmax.py b/plotly/validators/surface/_cmax.py index b30c134a9e..f373ed516d 100644 --- a/plotly/validators/surface/_cmax.py +++ b/plotly/validators/surface/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="surface", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/surface/_cmid.py b/plotly/validators/surface/_cmid.py index 1a54a57a3d..efe0e9e318 100644 --- a/plotly/validators/surface/_cmid.py +++ b/plotly/validators/surface/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="surface", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/surface/_cmin.py b/plotly/validators/surface/_cmin.py index c1aa2e56f4..2b40067a69 100644 --- a/plotly/validators/surface/_cmin.py +++ b/plotly/validators/surface/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="surface", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/surface/_coloraxis.py b/plotly/validators/surface/_coloraxis.py index 715e9b74ea..9db9c1bd87 100644 --- a/plotly/validators/surface/_coloraxis.py +++ b/plotly/validators/surface/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="surface", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/surface/_colorbar.py b/plotly/validators/surface/_colorbar.py index 3c44f0d95a..d03597e00d 100644 --- a/plotly/validators/surface/_colorbar.py +++ b/plotly/validators/surface/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="surface", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.surface - .colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.surface.colorbar.tickformatstopdefaults), - sets the default property values to use for - elements of surface.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.surface.colorbar.T - itle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/surface/_colorscale.py b/plotly/validators/surface/_colorscale.py index 3e84ea5019..a595e305f5 100644 --- a/plotly/validators/surface/_colorscale.py +++ b/plotly/validators/surface/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="surface", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/surface/_connectgaps.py b/plotly/validators/surface/_connectgaps.py index 325f8b5177..5548ce9627 100644 --- a/plotly/validators/surface/_connectgaps.py +++ b/plotly/validators/surface/_connectgaps.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectgapsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ConnectgapsValidator(_bv.BooleanValidator): def __init__(self, plotly_name="connectgaps", parent_name="surface", **kwargs): - super(ConnectgapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_contours.py b/plotly/validators/surface/_contours.py index 64b9d76500..32868c872a 100644 --- a/plotly/validators/surface/_contours.py +++ b/plotly/validators/surface/_contours.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContoursValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContoursValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contours", parent_name="surface", **kwargs): - super(ContoursValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contours"), data_docs=kwargs.pop( "data_docs", """ - x - :class:`plotly.graph_objects.surface.contours.X - ` instance or dict with compatible properties - y - :class:`plotly.graph_objects.surface.contours.Y - ` instance or dict with compatible properties - z - :class:`plotly.graph_objects.surface.contours.Z - ` instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/surface/_customdata.py b/plotly/validators/surface/_customdata.py index 927f92ca98..189e3670d6 100644 --- a/plotly/validators/surface/_customdata.py +++ b/plotly/validators/surface/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="surface", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_customdatasrc.py b/plotly/validators/surface/_customdatasrc.py index 4c155c3ac9..9d29f76114 100644 --- a/plotly/validators/surface/_customdatasrc.py +++ b/plotly/validators/surface/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="surface", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_hidesurface.py b/plotly/validators/surface/_hidesurface.py index 843e689b25..519188118a 100644 --- a/plotly/validators/surface/_hidesurface.py +++ b/plotly/validators/surface/_hidesurface.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HidesurfaceValidator(_plotly_utils.basevalidators.BooleanValidator): +class HidesurfaceValidator(_bv.BooleanValidator): def __init__(self, plotly_name="hidesurface", parent_name="surface", **kwargs): - super(HidesurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_hoverinfo.py b/plotly/validators/surface/_hoverinfo.py index 08201b827b..f2dbf8a34d 100644 --- a/plotly/validators/surface/_hoverinfo.py +++ b/plotly/validators/surface/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="surface", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/surface/_hoverinfosrc.py b/plotly/validators/surface/_hoverinfosrc.py index 6151bfce3f..ecab2b195e 100644 --- a/plotly/validators/surface/_hoverinfosrc.py +++ b/plotly/validators/surface/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="surface", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_hoverlabel.py b/plotly/validators/surface/_hoverlabel.py index ed1443d419..63bb154be9 100644 --- a/plotly/validators/surface/_hoverlabel.py +++ b/plotly/validators/surface/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="surface", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/surface/_hovertemplate.py b/plotly/validators/surface/_hovertemplate.py index 01360fe634..55dc827aa2 100644 --- a/plotly/validators/surface/_hovertemplate.py +++ b/plotly/validators/surface/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="surface", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/surface/_hovertemplatesrc.py b/plotly/validators/surface/_hovertemplatesrc.py index 4c0b9dbd7a..d636a33e00 100644 --- a/plotly/validators/surface/_hovertemplatesrc.py +++ b/plotly/validators/surface/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="surface", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_hovertext.py b/plotly/validators/surface/_hovertext.py index 6a3924dca8..a2425c468d 100644 --- a/plotly/validators/surface/_hovertext.py +++ b/plotly/validators/surface/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="surface", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/surface/_hovertextsrc.py b/plotly/validators/surface/_hovertextsrc.py index fffad20418..3facc88456 100644 --- a/plotly/validators/surface/_hovertextsrc.py +++ b/plotly/validators/surface/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="surface", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_ids.py b/plotly/validators/surface/_ids.py index 8d262374ca..4742972a7f 100644 --- a/plotly/validators/surface/_ids.py +++ b/plotly/validators/surface/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="surface", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_idssrc.py b/plotly/validators/surface/_idssrc.py index 120219f052..679e017069 100644 --- a/plotly/validators/surface/_idssrc.py +++ b/plotly/validators/surface/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="surface", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_legend.py b/plotly/validators/surface/_legend.py index a115a224a1..48895e1dd8 100644 --- a/plotly/validators/surface/_legend.py +++ b/plotly/validators/surface/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="surface", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/surface/_legendgroup.py b/plotly/validators/surface/_legendgroup.py index cb6a472991..61b49bf530 100644 --- a/plotly/validators/surface/_legendgroup.py +++ b/plotly/validators/surface/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="surface", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/surface/_legendgrouptitle.py b/plotly/validators/surface/_legendgrouptitle.py index 755f4a0a0d..ed6e4396dd 100644 --- a/plotly/validators/surface/_legendgrouptitle.py +++ b/plotly/validators/surface/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="surface", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/surface/_legendrank.py b/plotly/validators/surface/_legendrank.py index e61724aed9..5b25b4a84b 100644 --- a/plotly/validators/surface/_legendrank.py +++ b/plotly/validators/surface/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="surface", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/surface/_legendwidth.py b/plotly/validators/surface/_legendwidth.py index 378cf94212..7a19d9bd64 100644 --- a/plotly/validators/surface/_legendwidth.py +++ b/plotly/validators/surface/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="surface", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/_lighting.py b/plotly/validators/surface/_lighting.py index 4f23020b13..6fd809af4a 100644 --- a/plotly/validators/surface/_lighting.py +++ b/plotly/validators/surface/_lighting.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lighting", parent_name="surface", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lighting"), data_docs=kwargs.pop( "data_docs", """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. """, ), **kwargs, diff --git a/plotly/validators/surface/_lightposition.py b/plotly/validators/surface/_lightposition.py index afe16abe30..b613148e6a 100644 --- a/plotly/validators/surface/_lightposition.py +++ b/plotly/validators/surface/_lightposition.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightpositionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="surface", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lightposition"), data_docs=kwargs.pop( "data_docs", """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. """, ), **kwargs, diff --git a/plotly/validators/surface/_meta.py b/plotly/validators/surface/_meta.py index 49f1f2ab85..02bd356c6b 100644 --- a/plotly/validators/surface/_meta.py +++ b/plotly/validators/surface/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="surface", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/surface/_metasrc.py b/plotly/validators/surface/_metasrc.py index 9c4ac1208a..1c2e379854 100644 --- a/plotly/validators/surface/_metasrc.py +++ b/plotly/validators/surface/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="surface", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_name.py b/plotly/validators/surface/_name.py index b3187def7c..f29cd97d1c 100644 --- a/plotly/validators/surface/_name.py +++ b/plotly/validators/surface/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="surface", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/surface/_opacity.py b/plotly/validators/surface/_opacity.py index 35c6228dc9..b10e2db472 100644 --- a/plotly/validators/surface/_opacity.py +++ b/plotly/validators/surface/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="surface", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/_opacityscale.py b/plotly/validators/surface/_opacityscale.py index 5da2a11699..3072c65b33 100644 --- a/plotly/validators/surface/_opacityscale.py +++ b/plotly/validators/surface/_opacityscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): +class OpacityscaleValidator(_bv.AnyValidator): def __init__(self, plotly_name="opacityscale", parent_name="surface", **kwargs): - super(OpacityscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_reversescale.py b/plotly/validators/surface/_reversescale.py index bfcb6bb868..d43ec30a87 100644 --- a/plotly/validators/surface/_reversescale.py +++ b/plotly/validators/surface/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="surface", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_scene.py b/plotly/validators/surface/_scene.py index 577b43383f..ff866ae926 100644 --- a/plotly/validators/surface/_scene.py +++ b/plotly/validators/surface/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="surface", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/surface/_showlegend.py b/plotly/validators/surface/_showlegend.py index adb306f49b..b1dabfc5e2 100644 --- a/plotly/validators/surface/_showlegend.py +++ b/plotly/validators/surface/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="surface", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_showscale.py b/plotly/validators/surface/_showscale.py index 78ed00ab45..f7b0a82f63 100644 --- a/plotly/validators/surface/_showscale.py +++ b/plotly/validators/surface/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="surface", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_stream.py b/plotly/validators/surface/_stream.py index e430f93c14..90a4e08e08 100644 --- a/plotly/validators/surface/_stream.py +++ b/plotly/validators/surface/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="surface", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/surface/_surfacecolor.py b/plotly/validators/surface/_surfacecolor.py index a1fc1c2399..cf32563844 100644 --- a/plotly/validators/surface/_surfacecolor.py +++ b/plotly/validators/surface/_surfacecolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfacecolorValidator(_plotly_utils.basevalidators.DataArrayValidator): +class SurfacecolorValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="surfacecolor", parent_name="surface", **kwargs): - super(SurfacecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_surfacecolorsrc.py b/plotly/validators/surface/_surfacecolorsrc.py index 4b32c7921d..c697c16d42 100644 --- a/plotly/validators/surface/_surfacecolorsrc.py +++ b/plotly/validators/surface/_surfacecolorsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfacecolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SurfacecolorsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="surfacecolorsrc", parent_name="surface", **kwargs): - super(SurfacecolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_text.py b/plotly/validators/surface/_text.py index 82acec27e5..a9baa96a1b 100644 --- a/plotly/validators/surface/_text.py +++ b/plotly/validators/surface/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="surface", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/surface/_textsrc.py b/plotly/validators/surface/_textsrc.py index ceb4ad83e3..549354b009 100644 --- a/plotly/validators/surface/_textsrc.py +++ b/plotly/validators/surface/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="surface", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_uid.py b/plotly/validators/surface/_uid.py index cf39253676..d4ded05577 100644 --- a/plotly/validators/surface/_uid.py +++ b/plotly/validators/surface/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="surface", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/surface/_uirevision.py b/plotly/validators/surface/_uirevision.py index a73886aec1..36b4db2fb5 100644 --- a/plotly/validators/surface/_uirevision.py +++ b/plotly/validators/surface/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="surface", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_visible.py b/plotly/validators/surface/_visible.py index 195bf46452..e80e0349fd 100644 --- a/plotly/validators/surface/_visible.py +++ b/plotly/validators/surface/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="surface", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/surface/_x.py b/plotly/validators/surface/_x.py index 8e0fcca70f..90b5f609fe 100644 --- a/plotly/validators/surface/_x.py +++ b/plotly/validators/surface/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="surface", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/surface/_xcalendar.py b/plotly/validators/surface/_xcalendar.py index 6ff4e55627..559969a1bc 100644 --- a/plotly/validators/surface/_xcalendar.py +++ b/plotly/validators/surface/_xcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xcalendar", parent_name="surface", **kwargs): - super(XcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/_xhoverformat.py b/plotly/validators/surface/_xhoverformat.py index 572d0e381d..16bae64af4 100644 --- a/plotly/validators/surface/_xhoverformat.py +++ b/plotly/validators/surface/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="surface", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_xsrc.py b/plotly/validators/surface/_xsrc.py index be5d340c63..23593f0486 100644 --- a/plotly/validators/surface/_xsrc.py +++ b/plotly/validators/surface/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="surface", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_y.py b/plotly/validators/surface/_y.py index 36b913dc26..547107cc68 100644 --- a/plotly/validators/surface/_y.py +++ b/plotly/validators/surface/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="surface", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/surface/_ycalendar.py b/plotly/validators/surface/_ycalendar.py index 22cb7e6eec..1b3583354d 100644 --- a/plotly/validators/surface/_ycalendar.py +++ b/plotly/validators/surface/_ycalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="surface", **kwargs): - super(YcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/_yhoverformat.py b/plotly/validators/surface/_yhoverformat.py index 6dbf2b0b16..7dcb773934 100644 --- a/plotly/validators/surface/_yhoverformat.py +++ b/plotly/validators/surface/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="surface", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_ysrc.py b/plotly/validators/surface/_ysrc.py index 72ccfc7c1d..29955b9ea2 100644 --- a/plotly/validators/surface/_ysrc.py +++ b/plotly/validators/surface/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="surface", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/_z.py b/plotly/validators/surface/_z.py index 63e2248577..1aeae8758a 100644 --- a/plotly/validators/surface/_z.py +++ b/plotly/validators/surface/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="surface", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/surface/_zcalendar.py b/plotly/validators/surface/_zcalendar.py index cf8f0cb457..a28127c16a 100644 --- a/plotly/validators/surface/_zcalendar.py +++ b/plotly/validators/surface/_zcalendar.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ZcalendarValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="zcalendar", parent_name="surface", **kwargs): - super(ZcalendarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/_zhoverformat.py b/plotly/validators/surface/_zhoverformat.py index f391c4dae0..f35538f5ab 100644 --- a/plotly/validators/surface/_zhoverformat.py +++ b/plotly/validators/surface/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="surface", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/_zsrc.py b/plotly/validators/surface/_zsrc.py index 9b3afad8a6..1be628004e 100644 --- a/plotly/validators/surface/_zsrc.py +++ b/plotly/validators/surface/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="surface", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/__init__.py b/plotly/validators/surface/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/surface/colorbar/__init__.py +++ b/plotly/validators/surface/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/surface/colorbar/_bgcolor.py b/plotly/validators/surface/colorbar/_bgcolor.py index 347b775fc9..b2ad06607b 100644 --- a/plotly/validators/surface/colorbar/_bgcolor.py +++ b/plotly/validators/surface/colorbar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="surface.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_bordercolor.py b/plotly/validators/surface/colorbar/_bordercolor.py index 397bcdbd7e..4f9d5c4354 100644 --- a/plotly/validators/surface/colorbar/_bordercolor.py +++ b/plotly/validators/surface/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="surface.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_borderwidth.py b/plotly/validators/surface/colorbar/_borderwidth.py index df71518269..e42ae53a7d 100644 --- a/plotly/validators/surface/colorbar/_borderwidth.py +++ b/plotly/validators/surface/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="surface.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_dtick.py b/plotly/validators/surface/colorbar/_dtick.py index 99f7460026..71d956d8ad 100644 --- a/plotly/validators/surface/colorbar/_dtick.py +++ b/plotly/validators/surface/colorbar/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="surface.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/surface/colorbar/_exponentformat.py b/plotly/validators/surface/colorbar/_exponentformat.py index fdda588a3d..ece3c4ef94 100644 --- a/plotly/validators/surface/colorbar/_exponentformat.py +++ b/plotly/validators/surface/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="surface.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_labelalias.py b/plotly/validators/surface/colorbar/_labelalias.py index fa93a36542..2f86174001 100644 --- a/plotly/validators/surface/colorbar/_labelalias.py +++ b/plotly/validators/surface/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="surface.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_len.py b/plotly/validators/surface/colorbar/_len.py index 0e1dec3307..179edd37d8 100644 --- a/plotly/validators/surface/colorbar/_len.py +++ b/plotly/validators/surface/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="surface.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_lenmode.py b/plotly/validators/surface/colorbar/_lenmode.py index 4fa61c9104..de1efe41ab 100644 --- a/plotly/validators/surface/colorbar/_lenmode.py +++ b/plotly/validators/surface/colorbar/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="surface.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_minexponent.py b/plotly/validators/surface/colorbar/_minexponent.py index ba247a0b5e..5f83072ebe 100644 --- a/plotly/validators/surface/colorbar/_minexponent.py +++ b/plotly/validators/surface/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="surface.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_nticks.py b/plotly/validators/surface/colorbar/_nticks.py index 3538f4f9cf..b6c0214ea4 100644 --- a/plotly/validators/surface/colorbar/_nticks.py +++ b/plotly/validators/surface/colorbar/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="surface.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_orientation.py b/plotly/validators/surface/colorbar/_orientation.py index 5cde0fffda..9c2e14a1d1 100644 --- a/plotly/validators/surface/colorbar/_orientation.py +++ b/plotly/validators/surface/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="surface.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_outlinecolor.py b/plotly/validators/surface/colorbar/_outlinecolor.py index 867c91b9ee..ba4b494372 100644 --- a/plotly/validators/surface/colorbar/_outlinecolor.py +++ b/plotly/validators/surface/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="surface.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_outlinewidth.py b/plotly/validators/surface/colorbar/_outlinewidth.py index 25237789a4..e5e4cf6955 100644 --- a/plotly/validators/surface/colorbar/_outlinewidth.py +++ b/plotly/validators/surface/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="surface.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_separatethousands.py b/plotly/validators/surface/colorbar/_separatethousands.py index b87aaa1ec5..dc14114906 100644 --- a/plotly/validators/surface/colorbar/_separatethousands.py +++ b/plotly/validators/surface/colorbar/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="surface.colorbar", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_showexponent.py b/plotly/validators/surface/colorbar/_showexponent.py index f550e2d130..c4b6317b5b 100644 --- a/plotly/validators/surface/colorbar/_showexponent.py +++ b/plotly/validators/surface/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="surface.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_showticklabels.py b/plotly/validators/surface/colorbar/_showticklabels.py index e390cd3179..f339598d9d 100644 --- a/plotly/validators/surface/colorbar/_showticklabels.py +++ b/plotly/validators/surface/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="surface.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_showtickprefix.py b/plotly/validators/surface/colorbar/_showtickprefix.py index 6d885d5eb3..af307281e0 100644 --- a/plotly/validators/surface/colorbar/_showtickprefix.py +++ b/plotly/validators/surface/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="surface.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_showticksuffix.py b/plotly/validators/surface/colorbar/_showticksuffix.py index badcbc1aef..83f219c2a5 100644 --- a/plotly/validators/surface/colorbar/_showticksuffix.py +++ b/plotly/validators/surface/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="surface.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_thickness.py b/plotly/validators/surface/colorbar/_thickness.py index d7c3653725..a68ff498d4 100644 --- a/plotly/validators/surface/colorbar/_thickness.py +++ b/plotly/validators/surface/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="surface.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_thicknessmode.py b/plotly/validators/surface/colorbar/_thicknessmode.py index a22707a503..2d6f94b19b 100644 --- a/plotly/validators/surface/colorbar/_thicknessmode.py +++ b/plotly/validators/surface/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="surface.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_tick0.py b/plotly/validators/surface/colorbar/_tick0.py index 085fba0c26..952bffd065 100644 --- a/plotly/validators/surface/colorbar/_tick0.py +++ b/plotly/validators/surface/colorbar/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="surface.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/surface/colorbar/_tickangle.py b/plotly/validators/surface/colorbar/_tickangle.py index 2f42c3b45f..b7617710ad 100644 --- a/plotly/validators/surface/colorbar/_tickangle.py +++ b/plotly/validators/surface/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="surface.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_tickcolor.py b/plotly/validators/surface/colorbar/_tickcolor.py index de3e69a30b..68bfbc166e 100644 --- a/plotly/validators/surface/colorbar/_tickcolor.py +++ b/plotly/validators/surface/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="surface.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_tickfont.py b/plotly/validators/surface/colorbar/_tickfont.py index d7b2771886..f99c861e19 100644 --- a/plotly/validators/surface/colorbar/_tickfont.py +++ b/plotly/validators/surface/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="surface.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/surface/colorbar/_tickformat.py b/plotly/validators/surface/colorbar/_tickformat.py index 0f2bce4c26..ea6ab02464 100644 --- a/plotly/validators/surface/colorbar/_tickformat.py +++ b/plotly/validators/surface/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="surface.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_tickformatstopdefaults.py b/plotly/validators/surface/colorbar/_tickformatstopdefaults.py index fcb062415e..900f03527a 100644 --- a/plotly/validators/surface/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/surface/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="surface.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/surface/colorbar/_tickformatstops.py b/plotly/validators/surface/colorbar/_tickformatstops.py index dc74a0a085..4647da9d27 100644 --- a/plotly/validators/surface/colorbar/_tickformatstops.py +++ b/plotly/validators/surface/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="surface.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/surface/colorbar/_ticklabeloverflow.py b/plotly/validators/surface/colorbar/_ticklabeloverflow.py index 846f99797d..dd50f83d17 100644 --- a/plotly/validators/surface/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/surface/colorbar/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="surface.colorbar", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_ticklabelposition.py b/plotly/validators/surface/colorbar/_ticklabelposition.py index 46adb4d330..e694f9ab17 100644 --- a/plotly/validators/surface/colorbar/_ticklabelposition.py +++ b/plotly/validators/surface/colorbar/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="surface.colorbar", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/colorbar/_ticklabelstep.py b/plotly/validators/surface/colorbar/_ticklabelstep.py index 5cf8e9ff1e..85e941b25b 100644 --- a/plotly/validators/surface/colorbar/_ticklabelstep.py +++ b/plotly/validators/surface/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="surface.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/surface/colorbar/_ticklen.py b/plotly/validators/surface/colorbar/_ticklen.py index 64473b78cd..082a9ed4b8 100644 --- a/plotly/validators/surface/colorbar/_ticklen.py +++ b/plotly/validators/surface/colorbar/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="surface.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_tickmode.py b/plotly/validators/surface/colorbar/_tickmode.py index 5888d00bcd..086a82f1c7 100644 --- a/plotly/validators/surface/colorbar/_tickmode.py +++ b/plotly/validators/surface/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="surface.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/surface/colorbar/_tickprefix.py b/plotly/validators/surface/colorbar/_tickprefix.py index 8b34891075..d42ff81cef 100644 --- a/plotly/validators/surface/colorbar/_tickprefix.py +++ b/plotly/validators/surface/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="surface.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_ticks.py b/plotly/validators/surface/colorbar/_ticks.py index f7a88a41fe..04155fb5ed 100644 --- a/plotly/validators/surface/colorbar/_ticks.py +++ b/plotly/validators/surface/colorbar/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="surface.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_ticksuffix.py b/plotly/validators/surface/colorbar/_ticksuffix.py index 0c22129bf2..69582778a5 100644 --- a/plotly/validators/surface/colorbar/_ticksuffix.py +++ b/plotly/validators/surface/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="surface.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_ticktext.py b/plotly/validators/surface/colorbar/_ticktext.py index b549c78cb8..14a73e638b 100644 --- a/plotly/validators/surface/colorbar/_ticktext.py +++ b/plotly/validators/surface/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="surface.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_ticktextsrc.py b/plotly/validators/surface/colorbar/_ticktextsrc.py index e710666358..2c215b9d51 100644 --- a/plotly/validators/surface/colorbar/_ticktextsrc.py +++ b/plotly/validators/surface/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="surface.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_tickvals.py b/plotly/validators/surface/colorbar/_tickvals.py index db11e4e965..b3d21ee16b 100644 --- a/plotly/validators/surface/colorbar/_tickvals.py +++ b/plotly/validators/surface/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="surface.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_tickvalssrc.py b/plotly/validators/surface/colorbar/_tickvalssrc.py index 44d6f05835..f189c0216d 100644 --- a/plotly/validators/surface/colorbar/_tickvalssrc.py +++ b/plotly/validators/surface/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="surface.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_tickwidth.py b/plotly/validators/surface/colorbar/_tickwidth.py index dc0d68cfea..10d362c9cd 100644 --- a/plotly/validators/surface/colorbar/_tickwidth.py +++ b/plotly/validators/surface/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="surface.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_title.py b/plotly/validators/surface/colorbar/_title.py index c2a8477966..d94d86da2a 100644 --- a/plotly/validators/surface/colorbar/_title.py +++ b/plotly/validators/surface/colorbar/_title.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="surface.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/surface/colorbar/_x.py b/plotly/validators/surface/colorbar/_x.py index f2433ba51f..aaf209d877 100644 --- a/plotly/validators/surface/colorbar/_x.py +++ b/plotly/validators/surface/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="surface.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_xanchor.py b/plotly/validators/surface/colorbar/_xanchor.py index dd11663b19..5e0969a876 100644 --- a/plotly/validators/surface/colorbar/_xanchor.py +++ b/plotly/validators/surface/colorbar/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="surface.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_xpad.py b/plotly/validators/surface/colorbar/_xpad.py index 234b9cb0a7..01db102eba 100644 --- a/plotly/validators/surface/colorbar/_xpad.py +++ b/plotly/validators/surface/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="surface.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_xref.py b/plotly/validators/surface/colorbar/_xref.py index 37310ea18f..4d232ea2c9 100644 --- a/plotly/validators/surface/colorbar/_xref.py +++ b/plotly/validators/surface/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="surface.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_y.py b/plotly/validators/surface/colorbar/_y.py index a61e202d46..60f5bf1e3c 100644 --- a/plotly/validators/surface/colorbar/_y.py +++ b/plotly/validators/surface/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="surface.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/_yanchor.py b/plotly/validators/surface/colorbar/_yanchor.py index 4f166ac0a4..24844d0e12 100644 --- a/plotly/validators/surface/colorbar/_yanchor.py +++ b/plotly/validators/surface/colorbar/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="surface.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/_ypad.py b/plotly/validators/surface/colorbar/_ypad.py index 83bcbbf0d1..30f44bdc1f 100644 --- a/plotly/validators/surface/colorbar/_ypad.py +++ b/plotly/validators/surface/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="surface.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/colorbar/_yref.py b/plotly/validators/surface/colorbar/_yref.py index 7813d9608a..45a07537a6 100644 --- a/plotly/validators/surface/colorbar/_yref.py +++ b/plotly/validators/surface/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="surface.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/tickfont/__init__.py b/plotly/validators/surface/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/surface/colorbar/tickfont/__init__.py +++ b/plotly/validators/surface/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/colorbar/tickfont/_color.py b/plotly/validators/surface/colorbar/tickfont/_color.py index d94875ba4e..decc99d767 100644 --- a/plotly/validators/surface/colorbar/tickfont/_color.py +++ b/plotly/validators/surface/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="surface.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/tickfont/_family.py b/plotly/validators/surface/colorbar/tickfont/_family.py index 339678ab7a..880b8a0047 100644 --- a/plotly/validators/surface/colorbar/tickfont/_family.py +++ b/plotly/validators/surface/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="surface.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/surface/colorbar/tickfont/_lineposition.py b/plotly/validators/surface/colorbar/tickfont/_lineposition.py index 903df46726..cf9cd6319f 100644 --- a/plotly/validators/surface/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/surface/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="surface.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/surface/colorbar/tickfont/_shadow.py b/plotly/validators/surface/colorbar/tickfont/_shadow.py index e897804d22..bd5e64f75b 100644 --- a/plotly/validators/surface/colorbar/tickfont/_shadow.py +++ b/plotly/validators/surface/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="surface.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/tickfont/_size.py b/plotly/validators/surface/colorbar/tickfont/_size.py index 6ae380621c..b553ce646c 100644 --- a/plotly/validators/surface/colorbar/tickfont/_size.py +++ b/plotly/validators/surface/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="surface.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/surface/colorbar/tickfont/_style.py b/plotly/validators/surface/colorbar/tickfont/_style.py index 9e82158e34..cede6be6b4 100644 --- a/plotly/validators/surface/colorbar/tickfont/_style.py +++ b/plotly/validators/surface/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="surface.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/tickfont/_textcase.py b/plotly/validators/surface/colorbar/tickfont/_textcase.py index d2b5d07908..72b9683547 100644 --- a/plotly/validators/surface/colorbar/tickfont/_textcase.py +++ b/plotly/validators/surface/colorbar/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="surface.colorbar.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/tickfont/_variant.py b/plotly/validators/surface/colorbar/tickfont/_variant.py index 98c0924cd0..c7fe58095c 100644 --- a/plotly/validators/surface/colorbar/tickfont/_variant.py +++ b/plotly/validators/surface/colorbar/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="surface.colorbar.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/colorbar/tickfont/_weight.py b/plotly/validators/surface/colorbar/tickfont/_weight.py index a9f87ea24b..883294e7a9 100644 --- a/plotly/validators/surface/colorbar/tickfont/_weight.py +++ b/plotly/validators/surface/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="surface.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/surface/colorbar/tickformatstop/__init__.py b/plotly/validators/surface/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/surface/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/surface/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py index 0f248ccb24..f5e5360121 100644 --- a/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/surface/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="surface.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/surface/colorbar/tickformatstop/_enabled.py b/plotly/validators/surface/colorbar/tickformatstop/_enabled.py index 84b62260ad..7ea0399892 100644 --- a/plotly/validators/surface/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/surface/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="surface.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/tickformatstop/_name.py b/plotly/validators/surface/colorbar/tickformatstop/_name.py index e6b6b6041c..361e944dc6 100644 --- a/plotly/validators/surface/colorbar/tickformatstop/_name.py +++ b/plotly/validators/surface/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="surface.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py index 04942555e7..04148773c3 100644 --- a/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/surface/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="surface.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/tickformatstop/_value.py b/plotly/validators/surface/colorbar/tickformatstop/_value.py index b1c1157055..0442c117f2 100644 --- a/plotly/validators/surface/colorbar/tickformatstop/_value.py +++ b/plotly/validators/surface/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="surface.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/title/__init__.py b/plotly/validators/surface/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/surface/colorbar/title/__init__.py +++ b/plotly/validators/surface/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/surface/colorbar/title/_font.py b/plotly/validators/surface/colorbar/title/_font.py index 645f5975ee..dbda8039ec 100644 --- a/plotly/validators/surface/colorbar/title/_font.py +++ b/plotly/validators/surface/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="surface.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/surface/colorbar/title/_side.py b/plotly/validators/surface/colorbar/title/_side.py index 214d84670b..6db7ea05c0 100644 --- a/plotly/validators/surface/colorbar/title/_side.py +++ b/plotly/validators/surface/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="surface.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/title/_text.py b/plotly/validators/surface/colorbar/title/_text.py index 7c7176e55d..46d3a63007 100644 --- a/plotly/validators/surface/colorbar/title/_text.py +++ b/plotly/validators/surface/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="surface.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/title/font/__init__.py b/plotly/validators/surface/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/surface/colorbar/title/font/__init__.py +++ b/plotly/validators/surface/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/colorbar/title/font/_color.py b/plotly/validators/surface/colorbar/title/font/_color.py index 3c3d1ce8a8..c48dad6ee1 100644 --- a/plotly/validators/surface/colorbar/title/font/_color.py +++ b/plotly/validators/surface/colorbar/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="surface.colorbar.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/title/font/_family.py b/plotly/validators/surface/colorbar/title/font/_family.py index 12e6ac4b4a..88c03b5f01 100644 --- a/plotly/validators/surface/colorbar/title/font/_family.py +++ b/plotly/validators/surface/colorbar/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="surface.colorbar.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/surface/colorbar/title/font/_lineposition.py b/plotly/validators/surface/colorbar/title/font/_lineposition.py index a81df7c10b..3a5772b3ce 100644 --- a/plotly/validators/surface/colorbar/title/font/_lineposition.py +++ b/plotly/validators/surface/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="surface.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/surface/colorbar/title/font/_shadow.py b/plotly/validators/surface/colorbar/title/font/_shadow.py index 78b38bd59e..3a77f54e81 100644 --- a/plotly/validators/surface/colorbar/title/font/_shadow.py +++ b/plotly/validators/surface/colorbar/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="surface.colorbar.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/colorbar/title/font/_size.py b/plotly/validators/surface/colorbar/title/font/_size.py index eb8b13fc82..0d808f5482 100644 --- a/plotly/validators/surface/colorbar/title/font/_size.py +++ b/plotly/validators/surface/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="surface.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/surface/colorbar/title/font/_style.py b/plotly/validators/surface/colorbar/title/font/_style.py index bce651c0ee..dcc797f73b 100644 --- a/plotly/validators/surface/colorbar/title/font/_style.py +++ b/plotly/validators/surface/colorbar/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="surface.colorbar.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/title/font/_textcase.py b/plotly/validators/surface/colorbar/title/font/_textcase.py index 1d27cc91db..6d19bcbd42 100644 --- a/plotly/validators/surface/colorbar/title/font/_textcase.py +++ b/plotly/validators/surface/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="surface.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/surface/colorbar/title/font/_variant.py b/plotly/validators/surface/colorbar/title/font/_variant.py index 48aa54ec37..4c11601292 100644 --- a/plotly/validators/surface/colorbar/title/font/_variant.py +++ b/plotly/validators/surface/colorbar/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="surface.colorbar.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/colorbar/title/font/_weight.py b/plotly/validators/surface/colorbar/title/font/_weight.py index d7ccd0ac14..33877f3351 100644 --- a/plotly/validators/surface/colorbar/title/font/_weight.py +++ b/plotly/validators/surface/colorbar/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="surface.colorbar.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/surface/contours/__init__.py b/plotly/validators/surface/contours/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/surface/contours/__init__.py +++ b/plotly/validators/surface/contours/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/surface/contours/_x.py b/plotly/validators/surface/contours/_x.py index fc0f918267..a4dec6fe30 100644 --- a/plotly/validators/surface/contours/_x.py +++ b/plotly/validators/surface/contours/_x.py @@ -1,48 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.CompoundValidator): +class XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="x", parent_name="surface.contours", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "X"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the x dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.x - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the x dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. """, ), **kwargs, diff --git a/plotly/validators/surface/contours/_y.py b/plotly/validators/surface/contours/_y.py index 55fac81d76..00f098d87b 100644 --- a/plotly/validators/surface/contours/_y.py +++ b/plotly/validators/surface/contours/_y.py @@ -1,48 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.CompoundValidator): +class YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="y", parent_name="surface.contours", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the y dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.y - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the y dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. """, ), **kwargs, diff --git a/plotly/validators/surface/contours/_z.py b/plotly/validators/surface/contours/_z.py index f6fb2eaba4..d866559ce0 100644 --- a/plotly/validators/surface/contours/_z.py +++ b/plotly/validators/surface/contours/_z.py @@ -1,48 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="z", parent_name="surface.contours", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Z"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour lines. - end - Sets the end contour level value. Must be more - than `contours.start` - highlight - Determines whether or not contour lines about - the z dimension are highlighted on hover. - highlightcolor - Sets the color of the highlighted contour - lines. - highlightwidth - Sets the width of the highlighted contour - lines. - project - :class:`plotly.graph_objects.surface.contours.z - .Project` instance or dict with compatible - properties - show - Determines whether or not contour lines about - the z dimension are drawn. - size - Sets the step between each contour level. Must - be positive. - start - Sets the starting contour level value. Must be - less than `contours.end` - usecolormap - An alternate to "color". Determines whether or - not the contour lines are colored using the - trace "colorscale". - width - Sets the width of the contour lines. """, ), **kwargs, diff --git a/plotly/validators/surface/contours/x/__init__.py b/plotly/validators/surface/contours/x/__init__.py index 33ec40f709..acb3f03b3a 100644 --- a/plotly/validators/surface/contours/x/__init__.py +++ b/plotly/validators/surface/contours/x/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._usecolormap import UsecolormapValidator - from ._start import StartValidator - from ._size import SizeValidator - from ._show import ShowValidator - from ._project import ProjectValidator - from ._highlightwidth import HighlightwidthValidator - from ._highlightcolor import HighlightcolorValidator - from ._highlight import HighlightValidator - from ._end import EndValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._usecolormap.UsecolormapValidator", - "._start.StartValidator", - "._size.SizeValidator", - "._show.ShowValidator", - "._project.ProjectValidator", - "._highlightwidth.HighlightwidthValidator", - "._highlightcolor.HighlightcolorValidator", - "._highlight.HighlightValidator", - "._end.EndValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._usecolormap.UsecolormapValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._show.ShowValidator", + "._project.ProjectValidator", + "._highlightwidth.HighlightwidthValidator", + "._highlightcolor.HighlightcolorValidator", + "._highlight.HighlightValidator", + "._end.EndValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/contours/x/_color.py b/plotly/validators/surface/contours/x/_color.py index 002dc1556d..e78514ebdc 100644 --- a/plotly/validators/surface/contours/x/_color.py +++ b/plotly/validators/surface/contours/x/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="surface.contours.x", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_end.py b/plotly/validators/surface/contours/x/_end.py index 64d54254ca..7f7300173f 100644 --- a/plotly/validators/surface/contours/x/_end.py +++ b/plotly/validators/surface/contours/x/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.NumberValidator): +class EndValidator(_bv.NumberValidator): def __init__(self, plotly_name="end", parent_name="surface.contours.x", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_highlight.py b/plotly/validators/surface/contours/x/_highlight.py index 8b512d97ca..642a894f4b 100644 --- a/plotly/validators/surface/contours/x/_highlight.py +++ b/plotly/validators/surface/contours/x/_highlight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): +class HighlightValidator(_bv.BooleanValidator): def __init__( self, plotly_name="highlight", parent_name="surface.contours.x", **kwargs ): - super(HighlightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_highlightcolor.py b/plotly/validators/surface/contours/x/_highlightcolor.py index 051a6b8087..13a8c21e4e 100644 --- a/plotly/validators/surface/contours/x/_highlightcolor.py +++ b/plotly/validators/surface/contours/x/_highlightcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class HighlightcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="highlightcolor", parent_name="surface.contours.x", **kwargs ): - super(HighlightcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_highlightwidth.py b/plotly/validators/surface/contours/x/_highlightwidth.py index b155d79a66..86a0eb9e4e 100644 --- a/plotly/validators/surface/contours/x/_highlightwidth.py +++ b/plotly/validators/surface/contours/x/_highlightwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class HighlightwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="highlightwidth", parent_name="surface.contours.x", **kwargs ): - super(HighlightwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/contours/x/_project.py b/plotly/validators/surface/contours/x/_project.py index 3556f084f1..22e21d83c5 100644 --- a/plotly/validators/surface/contours/x/_project.py +++ b/plotly/validators/surface/contours/x/_project.py @@ -1,35 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): +class ProjectValidator(_bv.CompoundValidator): def __init__( self, plotly_name="project", parent_name="surface.contours.x", **kwargs ): - super(ProjectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Project"), data_docs=kwargs.pop( "data_docs", """ - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. """, ), **kwargs, diff --git a/plotly/validators/surface/contours/x/_show.py b/plotly/validators/surface/contours/x/_show.py index a39b7561cf..b975de5877 100644 --- a/plotly/validators/surface/contours/x/_show.py +++ b/plotly/validators/surface/contours/x/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="surface.contours.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_size.py b/plotly/validators/surface/contours/x/_size.py index 2cee0c2106..e81964a9fe 100644 --- a/plotly/validators/surface/contours/x/_size.py +++ b/plotly/validators/surface/contours/x/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="surface.contours.x", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/contours/x/_start.py b/plotly/validators/surface/contours/x/_start.py index 20584c2974..6674d7034d 100644 --- a/plotly/validators/surface/contours/x/_start.py +++ b/plotly/validators/surface/contours/x/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__(self, plotly_name="start", parent_name="surface.contours.x", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_usecolormap.py b/plotly/validators/surface/contours/x/_usecolormap.py index 9fc46fa72f..a2400eeae9 100644 --- a/plotly/validators/surface/contours/x/_usecolormap.py +++ b/plotly/validators/surface/contours/x/_usecolormap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): +class UsecolormapValidator(_bv.BooleanValidator): def __init__( self, plotly_name="usecolormap", parent_name="surface.contours.x", **kwargs ): - super(UsecolormapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/_width.py b/plotly/validators/surface/contours/x/_width.py index c286e20564..3e98fe5828 100644 --- a/plotly/validators/surface/contours/x/_width.py +++ b/plotly/validators/surface/contours/x/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="surface.contours.x", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/contours/x/project/__init__.py b/plotly/validators/surface/contours/x/project/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/surface/contours/x/project/__init__.py +++ b/plotly/validators/surface/contours/x/project/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/surface/contours/x/project/_x.py b/plotly/validators/surface/contours/x/project/_x.py index 78261dc908..f64dc8d4c2 100644 --- a/plotly/validators/surface/contours/x/project/_x.py +++ b/plotly/validators/surface/contours/x/project/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.BooleanValidator): +class XValidator(_bv.BooleanValidator): def __init__( self, plotly_name="x", parent_name="surface.contours.x.project", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/project/_y.py b/plotly/validators/surface/contours/x/project/_y.py index f07a832172..94de09b0bf 100644 --- a/plotly/validators/surface/contours/x/project/_y.py +++ b/plotly/validators/surface/contours/x/project/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.BooleanValidator): +class YValidator(_bv.BooleanValidator): def __init__( self, plotly_name="y", parent_name="surface.contours.x.project", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/x/project/_z.py b/plotly/validators/surface/contours/x/project/_z.py index 672eb35d4f..8fa9ed49f1 100644 --- a/plotly/validators/surface/contours/x/project/_z.py +++ b/plotly/validators/surface/contours/x/project/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZValidator(_bv.BooleanValidator): def __init__( self, plotly_name="z", parent_name="surface.contours.x.project", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/__init__.py b/plotly/validators/surface/contours/y/__init__.py index 33ec40f709..acb3f03b3a 100644 --- a/plotly/validators/surface/contours/y/__init__.py +++ b/plotly/validators/surface/contours/y/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._usecolormap import UsecolormapValidator - from ._start import StartValidator - from ._size import SizeValidator - from ._show import ShowValidator - from ._project import ProjectValidator - from ._highlightwidth import HighlightwidthValidator - from ._highlightcolor import HighlightcolorValidator - from ._highlight import HighlightValidator - from ._end import EndValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._usecolormap.UsecolormapValidator", - "._start.StartValidator", - "._size.SizeValidator", - "._show.ShowValidator", - "._project.ProjectValidator", - "._highlightwidth.HighlightwidthValidator", - "._highlightcolor.HighlightcolorValidator", - "._highlight.HighlightValidator", - "._end.EndValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._usecolormap.UsecolormapValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._show.ShowValidator", + "._project.ProjectValidator", + "._highlightwidth.HighlightwidthValidator", + "._highlightcolor.HighlightcolorValidator", + "._highlight.HighlightValidator", + "._end.EndValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/contours/y/_color.py b/plotly/validators/surface/contours/y/_color.py index fe9b7c44fd..6ded1ab875 100644 --- a/plotly/validators/surface/contours/y/_color.py +++ b/plotly/validators/surface/contours/y/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="surface.contours.y", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_end.py b/plotly/validators/surface/contours/y/_end.py index 8d5b5dbdbe..db4f1261cb 100644 --- a/plotly/validators/surface/contours/y/_end.py +++ b/plotly/validators/surface/contours/y/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.NumberValidator): +class EndValidator(_bv.NumberValidator): def __init__(self, plotly_name="end", parent_name="surface.contours.y", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_highlight.py b/plotly/validators/surface/contours/y/_highlight.py index bebc1cf6c1..58052735ba 100644 --- a/plotly/validators/surface/contours/y/_highlight.py +++ b/plotly/validators/surface/contours/y/_highlight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): +class HighlightValidator(_bv.BooleanValidator): def __init__( self, plotly_name="highlight", parent_name="surface.contours.y", **kwargs ): - super(HighlightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_highlightcolor.py b/plotly/validators/surface/contours/y/_highlightcolor.py index d32aede784..2d048ca531 100644 --- a/plotly/validators/surface/contours/y/_highlightcolor.py +++ b/plotly/validators/surface/contours/y/_highlightcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class HighlightcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="highlightcolor", parent_name="surface.contours.y", **kwargs ): - super(HighlightcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_highlightwidth.py b/plotly/validators/surface/contours/y/_highlightwidth.py index 8ad526d3e7..583ad726ab 100644 --- a/plotly/validators/surface/contours/y/_highlightwidth.py +++ b/plotly/validators/surface/contours/y/_highlightwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class HighlightwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="highlightwidth", parent_name="surface.contours.y", **kwargs ): - super(HighlightwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/contours/y/_project.py b/plotly/validators/surface/contours/y/_project.py index e908bc8855..f227554399 100644 --- a/plotly/validators/surface/contours/y/_project.py +++ b/plotly/validators/surface/contours/y/_project.py @@ -1,35 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): +class ProjectValidator(_bv.CompoundValidator): def __init__( self, plotly_name="project", parent_name="surface.contours.y", **kwargs ): - super(ProjectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Project"), data_docs=kwargs.pop( "data_docs", """ - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. """, ), **kwargs, diff --git a/plotly/validators/surface/contours/y/_show.py b/plotly/validators/surface/contours/y/_show.py index cc9fd3403d..2433fbf614 100644 --- a/plotly/validators/surface/contours/y/_show.py +++ b/plotly/validators/surface/contours/y/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="surface.contours.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_size.py b/plotly/validators/surface/contours/y/_size.py index a198eae3bf..f12e9be48d 100644 --- a/plotly/validators/surface/contours/y/_size.py +++ b/plotly/validators/surface/contours/y/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="surface.contours.y", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/contours/y/_start.py b/plotly/validators/surface/contours/y/_start.py index d222ddbc63..1a17743a3f 100644 --- a/plotly/validators/surface/contours/y/_start.py +++ b/plotly/validators/surface/contours/y/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__(self, plotly_name="start", parent_name="surface.contours.y", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_usecolormap.py b/plotly/validators/surface/contours/y/_usecolormap.py index e28376b3c6..a4c6e21afe 100644 --- a/plotly/validators/surface/contours/y/_usecolormap.py +++ b/plotly/validators/surface/contours/y/_usecolormap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): +class UsecolormapValidator(_bv.BooleanValidator): def __init__( self, plotly_name="usecolormap", parent_name="surface.contours.y", **kwargs ): - super(UsecolormapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/_width.py b/plotly/validators/surface/contours/y/_width.py index 7371004e57..a70c4fa295 100644 --- a/plotly/validators/surface/contours/y/_width.py +++ b/plotly/validators/surface/contours/y/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="surface.contours.y", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/contours/y/project/__init__.py b/plotly/validators/surface/contours/y/project/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/surface/contours/y/project/__init__.py +++ b/plotly/validators/surface/contours/y/project/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/surface/contours/y/project/_x.py b/plotly/validators/surface/contours/y/project/_x.py index d56533c2f6..201b957912 100644 --- a/plotly/validators/surface/contours/y/project/_x.py +++ b/plotly/validators/surface/contours/y/project/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.BooleanValidator): +class XValidator(_bv.BooleanValidator): def __init__( self, plotly_name="x", parent_name="surface.contours.y.project", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/project/_y.py b/plotly/validators/surface/contours/y/project/_y.py index 17ba4e3dbd..2b8b56ddc3 100644 --- a/plotly/validators/surface/contours/y/project/_y.py +++ b/plotly/validators/surface/contours/y/project/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.BooleanValidator): +class YValidator(_bv.BooleanValidator): def __init__( self, plotly_name="y", parent_name="surface.contours.y.project", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/y/project/_z.py b/plotly/validators/surface/contours/y/project/_z.py index 429e4d4e74..9a77dac1d1 100644 --- a/plotly/validators/surface/contours/y/project/_z.py +++ b/plotly/validators/surface/contours/y/project/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZValidator(_bv.BooleanValidator): def __init__( self, plotly_name="z", parent_name="surface.contours.y.project", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/__init__.py b/plotly/validators/surface/contours/z/__init__.py index 33ec40f709..acb3f03b3a 100644 --- a/plotly/validators/surface/contours/z/__init__.py +++ b/plotly/validators/surface/contours/z/__init__.py @@ -1,35 +1,20 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._usecolormap import UsecolormapValidator - from ._start import StartValidator - from ._size import SizeValidator - from ._show import ShowValidator - from ._project import ProjectValidator - from ._highlightwidth import HighlightwidthValidator - from ._highlightcolor import HighlightcolorValidator - from ._highlight import HighlightValidator - from ._end import EndValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._usecolormap.UsecolormapValidator", - "._start.StartValidator", - "._size.SizeValidator", - "._show.ShowValidator", - "._project.ProjectValidator", - "._highlightwidth.HighlightwidthValidator", - "._highlightcolor.HighlightcolorValidator", - "._highlight.HighlightValidator", - "._end.EndValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._usecolormap.UsecolormapValidator", + "._start.StartValidator", + "._size.SizeValidator", + "._show.ShowValidator", + "._project.ProjectValidator", + "._highlightwidth.HighlightwidthValidator", + "._highlightcolor.HighlightcolorValidator", + "._highlight.HighlightValidator", + "._end.EndValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/contours/z/_color.py b/plotly/validators/surface/contours/z/_color.py index 503fb13cde..8c594a0de7 100644 --- a/plotly/validators/surface/contours/z/_color.py +++ b/plotly/validators/surface/contours/z/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="surface.contours.z", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_end.py b/plotly/validators/surface/contours/z/_end.py index 8f0eee7939..7c136d31b7 100644 --- a/plotly/validators/surface/contours/z/_end.py +++ b/plotly/validators/surface/contours/z/_end.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EndValidator(_plotly_utils.basevalidators.NumberValidator): +class EndValidator(_bv.NumberValidator): def __init__(self, plotly_name="end", parent_name="surface.contours.z", **kwargs): - super(EndValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_highlight.py b/plotly/validators/surface/contours/z/_highlight.py index 607e3a771a..251b834509 100644 --- a/plotly/validators/surface/contours/z/_highlight.py +++ b/plotly/validators/surface/contours/z/_highlight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightValidator(_plotly_utils.basevalidators.BooleanValidator): +class HighlightValidator(_bv.BooleanValidator): def __init__( self, plotly_name="highlight", parent_name="surface.contours.z", **kwargs ): - super(HighlightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_highlightcolor.py b/plotly/validators/surface/contours/z/_highlightcolor.py index a78c3b82f6..89b3db14ee 100644 --- a/plotly/validators/surface/contours/z/_highlightcolor.py +++ b/plotly/validators/surface/contours/z/_highlightcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class HighlightcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="highlightcolor", parent_name="surface.contours.z", **kwargs ): - super(HighlightcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_highlightwidth.py b/plotly/validators/surface/contours/z/_highlightwidth.py index c0261d705f..1bfede1121 100644 --- a/plotly/validators/surface/contours/z/_highlightwidth.py +++ b/plotly/validators/surface/contours/z/_highlightwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HighlightwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class HighlightwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="highlightwidth", parent_name="surface.contours.z", **kwargs ): - super(HighlightwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/contours/z/_project.py b/plotly/validators/surface/contours/z/_project.py index b009d95f2c..ba2d47aad2 100644 --- a/plotly/validators/surface/contours/z/_project.py +++ b/plotly/validators/surface/contours/z/_project.py @@ -1,35 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ProjectValidator(_plotly_utils.basevalidators.CompoundValidator): +class ProjectValidator(_bv.CompoundValidator): def __init__( self, plotly_name="project", parent_name="surface.contours.z", **kwargs ): - super(ProjectValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Project"), data_docs=kwargs.pop( "data_docs", """ - x - Determines whether or not these contour lines - are projected on the x plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - y - Determines whether or not these contour lines - are projected on the y plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. - z - Determines whether or not these contour lines - are projected on the z plane. If `highlight` is - set to True (the default), the projected lines - are shown on hover. If `show` is set to True, - the projected lines are shown in permanence. """, ), **kwargs, diff --git a/plotly/validators/surface/contours/z/_show.py b/plotly/validators/surface/contours/z/_show.py index 00460b96e0..30ad4e5fc7 100644 --- a/plotly/validators/surface/contours/z/_show.py +++ b/plotly/validators/surface/contours/z/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="surface.contours.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_size.py b/plotly/validators/surface/contours/z/_size.py index 4944df31a1..c0e4a25f4f 100644 --- a/plotly/validators/surface/contours/z/_size.py +++ b/plotly/validators/surface/contours/z/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="surface.contours.z", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/surface/contours/z/_start.py b/plotly/validators/surface/contours/z/_start.py index 0c5a3610e8..753139409f 100644 --- a/plotly/validators/surface/contours/z/_start.py +++ b/plotly/validators/surface/contours/z/_start.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StartValidator(_plotly_utils.basevalidators.NumberValidator): +class StartValidator(_bv.NumberValidator): def __init__(self, plotly_name="start", parent_name="surface.contours.z", **kwargs): - super(StartValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_usecolormap.py b/plotly/validators/surface/contours/z/_usecolormap.py index 1486dd1c4b..90df4615ba 100644 --- a/plotly/validators/surface/contours/z/_usecolormap.py +++ b/plotly/validators/surface/contours/z/_usecolormap.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UsecolormapValidator(_plotly_utils.basevalidators.BooleanValidator): +class UsecolormapValidator(_bv.BooleanValidator): def __init__( self, plotly_name="usecolormap", parent_name="surface.contours.z", **kwargs ): - super(UsecolormapValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/_width.py b/plotly/validators/surface/contours/z/_width.py index da40cada43..bd8bdb3b1e 100644 --- a/plotly/validators/surface/contours/z/_width.py +++ b/plotly/validators/surface/contours/z/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="surface.contours.z", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/contours/z/project/__init__.py b/plotly/validators/surface/contours/z/project/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/surface/contours/z/project/__init__.py +++ b/plotly/validators/surface/contours/z/project/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/surface/contours/z/project/_x.py b/plotly/validators/surface/contours/z/project/_x.py index 10817247bd..72167d152b 100644 --- a/plotly/validators/surface/contours/z/project/_x.py +++ b/plotly/validators/surface/contours/z/project/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.BooleanValidator): +class XValidator(_bv.BooleanValidator): def __init__( self, plotly_name="x", parent_name="surface.contours.z.project", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/project/_y.py b/plotly/validators/surface/contours/z/project/_y.py index 04bdd6db18..8678c7b71a 100644 --- a/plotly/validators/surface/contours/z/project/_y.py +++ b/plotly/validators/surface/contours/z/project/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.BooleanValidator): +class YValidator(_bv.BooleanValidator): def __init__( self, plotly_name="y", parent_name="surface.contours.z.project", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/contours/z/project/_z.py b/plotly/validators/surface/contours/z/project/_z.py index 6624e0a54c..66e7740ab4 100644 --- a/plotly/validators/surface/contours/z/project/_z.py +++ b/plotly/validators/surface/contours/z/project/_z.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.BooleanValidator): +class ZValidator(_bv.BooleanValidator): def __init__( self, plotly_name="z", parent_name="surface.contours.z.project", **kwargs ): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/__init__.py b/plotly/validators/surface/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/surface/hoverlabel/__init__.py +++ b/plotly/validators/surface/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/surface/hoverlabel/_align.py b/plotly/validators/surface/hoverlabel/_align.py index 9ebf06ad24..f7304f677d 100644 --- a/plotly/validators/surface/hoverlabel/_align.py +++ b/plotly/validators/surface/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="surface.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/surface/hoverlabel/_alignsrc.py b/plotly/validators/surface/hoverlabel/_alignsrc.py index 73dc56fc66..2d7ca1621a 100644 --- a/plotly/validators/surface/hoverlabel/_alignsrc.py +++ b/plotly/validators/surface/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="surface.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/_bgcolor.py b/plotly/validators/surface/hoverlabel/_bgcolor.py index 0eb08e4f58..757e5393cf 100644 --- a/plotly/validators/surface/hoverlabel/_bgcolor.py +++ b/plotly/validators/surface/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="surface.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/surface/hoverlabel/_bgcolorsrc.py b/plotly/validators/surface/hoverlabel/_bgcolorsrc.py index 8d92a3197d..7950cdf036 100644 --- a/plotly/validators/surface/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/surface/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="surface.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/_bordercolor.py b/plotly/validators/surface/hoverlabel/_bordercolor.py index b1cc181344..019472ac60 100644 --- a/plotly/validators/surface/hoverlabel/_bordercolor.py +++ b/plotly/validators/surface/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="surface.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/surface/hoverlabel/_bordercolorsrc.py b/plotly/validators/surface/hoverlabel/_bordercolorsrc.py index f2130256b3..efa62821f9 100644 --- a/plotly/validators/surface/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/surface/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="surface.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/_font.py b/plotly/validators/surface/hoverlabel/_font.py index 3ea601f1d1..1fb669bd6c 100644 --- a/plotly/validators/surface/hoverlabel/_font.py +++ b/plotly/validators/surface/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="surface.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/surface/hoverlabel/_namelength.py b/plotly/validators/surface/hoverlabel/_namelength.py index 8c31e73cad..6b1c0fde63 100644 --- a/plotly/validators/surface/hoverlabel/_namelength.py +++ b/plotly/validators/surface/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="surface.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/surface/hoverlabel/_namelengthsrc.py b/plotly/validators/surface/hoverlabel/_namelengthsrc.py index 4986ece4f0..a67bc25f77 100644 --- a/plotly/validators/surface/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/surface/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="surface.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/__init__.py b/plotly/validators/surface/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/surface/hoverlabel/font/__init__.py +++ b/plotly/validators/surface/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/hoverlabel/font/_color.py b/plotly/validators/surface/hoverlabel/font/_color.py index 5f70ffc3aa..f4225a30a9 100644 --- a/plotly/validators/surface/hoverlabel/font/_color.py +++ b/plotly/validators/surface/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="surface.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/surface/hoverlabel/font/_colorsrc.py b/plotly/validators/surface/hoverlabel/font/_colorsrc.py index 8a1dde6a8a..2a408e68f6 100644 --- a/plotly/validators/surface/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/surface/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_family.py b/plotly/validators/surface/hoverlabel/font/_family.py index ddc7097f01..b7f0e7ea81 100644 --- a/plotly/validators/surface/hoverlabel/font/_family.py +++ b/plotly/validators/surface/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="surface.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/surface/hoverlabel/font/_familysrc.py b/plotly/validators/surface/hoverlabel/font/_familysrc.py index 9692a4ad06..f86d63a4a6 100644 --- a/plotly/validators/surface/hoverlabel/font/_familysrc.py +++ b/plotly/validators/surface/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_lineposition.py b/plotly/validators/surface/hoverlabel/font/_lineposition.py index f3b6f34008..15ccc567a3 100644 --- a/plotly/validators/surface/hoverlabel/font/_lineposition.py +++ b/plotly/validators/surface/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="surface.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/surface/hoverlabel/font/_linepositionsrc.py b/plotly/validators/surface/hoverlabel/font/_linepositionsrc.py index 9607b5b683..fba3a14f0e 100644 --- a/plotly/validators/surface/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/surface/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="surface.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_shadow.py b/plotly/validators/surface/hoverlabel/font/_shadow.py index 93645f9b13..331ebb95af 100644 --- a/plotly/validators/surface/hoverlabel/font/_shadow.py +++ b/plotly/validators/surface/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="surface.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/surface/hoverlabel/font/_shadowsrc.py b/plotly/validators/surface/hoverlabel/font/_shadowsrc.py index da928bc941..6c1db25b96 100644 --- a/plotly/validators/surface/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/surface/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_size.py b/plotly/validators/surface/hoverlabel/font/_size.py index 37db804cd4..99b0448439 100644 --- a/plotly/validators/surface/hoverlabel/font/_size.py +++ b/plotly/validators/surface/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="surface.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/surface/hoverlabel/font/_sizesrc.py b/plotly/validators/surface/hoverlabel/font/_sizesrc.py index ab277d81b2..fab56789f1 100644 --- a/plotly/validators/surface/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/surface/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_style.py b/plotly/validators/surface/hoverlabel/font/_style.py index 929677faad..dc96c4190e 100644 --- a/plotly/validators/surface/hoverlabel/font/_style.py +++ b/plotly/validators/surface/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="surface.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/surface/hoverlabel/font/_stylesrc.py b/plotly/validators/surface/hoverlabel/font/_stylesrc.py index 4c786bb71d..ec290d7589 100644 --- a/plotly/validators/surface/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/surface/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_textcase.py b/plotly/validators/surface/hoverlabel/font/_textcase.py index 7ed30753ac..f056966a26 100644 --- a/plotly/validators/surface/hoverlabel/font/_textcase.py +++ b/plotly/validators/surface/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="surface.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/surface/hoverlabel/font/_textcasesrc.py b/plotly/validators/surface/hoverlabel/font/_textcasesrc.py index 67078c6a50..d972f8be8a 100644 --- a/plotly/validators/surface/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/surface/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_variant.py b/plotly/validators/surface/hoverlabel/font/_variant.py index 622951225a..dabfc13c7c 100644 --- a/plotly/validators/surface/hoverlabel/font/_variant.py +++ b/plotly/validators/surface/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="surface.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/surface/hoverlabel/font/_variantsrc.py b/plotly/validators/surface/hoverlabel/font/_variantsrc.py index 2c85217f26..fe44c226e4 100644 --- a/plotly/validators/surface/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/surface/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/hoverlabel/font/_weight.py b/plotly/validators/surface/hoverlabel/font/_weight.py index bc3cc2c751..975af81e06 100644 --- a/plotly/validators/surface/hoverlabel/font/_weight.py +++ b/plotly/validators/surface/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="surface.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/surface/hoverlabel/font/_weightsrc.py b/plotly/validators/surface/hoverlabel/font/_weightsrc.py index 21e71021fc..9316cfd792 100644 --- a/plotly/validators/surface/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/surface/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="surface.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/surface/legendgrouptitle/__init__.py b/plotly/validators/surface/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/surface/legendgrouptitle/__init__.py +++ b/plotly/validators/surface/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/surface/legendgrouptitle/_font.py b/plotly/validators/surface/legendgrouptitle/_font.py index 33091b7e8a..29ea025e7d 100644 --- a/plotly/validators/surface/legendgrouptitle/_font.py +++ b/plotly/validators/surface/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="surface.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/surface/legendgrouptitle/_text.py b/plotly/validators/surface/legendgrouptitle/_text.py index b96eb50a20..996e4fe2bb 100644 --- a/plotly/validators/surface/legendgrouptitle/_text.py +++ b/plotly/validators/surface/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="surface.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/surface/legendgrouptitle/font/__init__.py b/plotly/validators/surface/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/surface/legendgrouptitle/font/__init__.py +++ b/plotly/validators/surface/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/surface/legendgrouptitle/font/_color.py b/plotly/validators/surface/legendgrouptitle/font/_color.py index 486e451f60..e9283653e7 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_color.py +++ b/plotly/validators/surface/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="surface.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/surface/legendgrouptitle/font/_family.py b/plotly/validators/surface/legendgrouptitle/font/_family.py index 0f0329363d..a7277ae419 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_family.py +++ b/plotly/validators/surface/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="surface.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/surface/legendgrouptitle/font/_lineposition.py b/plotly/validators/surface/legendgrouptitle/font/_lineposition.py index 56258b9c5a..dc9a264f82 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/surface/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="surface.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/surface/legendgrouptitle/font/_shadow.py b/plotly/validators/surface/legendgrouptitle/font/_shadow.py index 3f8e4ed0e5..9266ba97a1 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/surface/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="surface.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/surface/legendgrouptitle/font/_size.py b/plotly/validators/surface/legendgrouptitle/font/_size.py index 7fd39e739a..dcf89ca98b 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_size.py +++ b/plotly/validators/surface/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="surface.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/surface/legendgrouptitle/font/_style.py b/plotly/validators/surface/legendgrouptitle/font/_style.py index 6b8b863f57..b747d1207b 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_style.py +++ b/plotly/validators/surface/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="surface.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/surface/legendgrouptitle/font/_textcase.py b/plotly/validators/surface/legendgrouptitle/font/_textcase.py index 4d6491fe7f..cf5133e53d 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/surface/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="surface.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/surface/legendgrouptitle/font/_variant.py b/plotly/validators/surface/legendgrouptitle/font/_variant.py index 4b2c0b3d69..773a48ad79 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_variant.py +++ b/plotly/validators/surface/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="surface.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/surface/legendgrouptitle/font/_weight.py b/plotly/validators/surface/legendgrouptitle/font/_weight.py index 1348b1f9a9..327a61d3cc 100644 --- a/plotly/validators/surface/legendgrouptitle/font/_weight.py +++ b/plotly/validators/surface/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="surface.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/surface/lighting/__init__.py b/plotly/validators/surface/lighting/__init__.py index 4b1f88d495..b45310f05d 100644 --- a/plotly/validators/surface/lighting/__init__.py +++ b/plotly/validators/surface/lighting/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._specular import SpecularValidator - from ._roughness import RoughnessValidator - from ._fresnel import FresnelValidator - from ._diffuse import DiffuseValidator - from ._ambient import AmbientValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._specular.SpecularValidator", - "._roughness.RoughnessValidator", - "._fresnel.FresnelValidator", - "._diffuse.DiffuseValidator", - "._ambient.AmbientValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], +) diff --git a/plotly/validators/surface/lighting/_ambient.py b/plotly/validators/surface/lighting/_ambient.py index 5e75d71b58..6efe388b2b 100644 --- a/plotly/validators/surface/lighting/_ambient.py +++ b/plotly/validators/surface/lighting/_ambient.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): +class AmbientValidator(_bv.NumberValidator): def __init__(self, plotly_name="ambient", parent_name="surface.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/lighting/_diffuse.py b/plotly/validators/surface/lighting/_diffuse.py index 0ffec526cc..1cf4073591 100644 --- a/plotly/validators/surface/lighting/_diffuse.py +++ b/plotly/validators/surface/lighting/_diffuse.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): +class DiffuseValidator(_bv.NumberValidator): def __init__(self, plotly_name="diffuse", parent_name="surface.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/lighting/_fresnel.py b/plotly/validators/surface/lighting/_fresnel.py index 13b7a78cd9..4070d416b0 100644 --- a/plotly/validators/surface/lighting/_fresnel.py +++ b/plotly/validators/surface/lighting/_fresnel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): +class FresnelValidator(_bv.NumberValidator): def __init__(self, plotly_name="fresnel", parent_name="surface.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/lighting/_roughness.py b/plotly/validators/surface/lighting/_roughness.py index 71e6ab35e0..c848e8be4a 100644 --- a/plotly/validators/surface/lighting/_roughness.py +++ b/plotly/validators/surface/lighting/_roughness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): +class RoughnessValidator(_bv.NumberValidator): def __init__( self, plotly_name="roughness", parent_name="surface.lighting", **kwargs ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/lighting/_specular.py b/plotly/validators/surface/lighting/_specular.py index ed5b3a4501..989b33b761 100644 --- a/plotly/validators/surface/lighting/_specular.py +++ b/plotly/validators/surface/lighting/_specular.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): +class SpecularValidator(_bv.NumberValidator): def __init__( self, plotly_name="specular", parent_name="surface.lighting", **kwargs ): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/lightposition/__init__.py b/plotly/validators/surface/lightposition/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/surface/lightposition/__init__.py +++ b/plotly/validators/surface/lightposition/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/surface/lightposition/_x.py b/plotly/validators/surface/lightposition/_x.py index 4687347dab..e2d178e8d3 100644 --- a/plotly/validators/surface/lightposition/_x.py +++ b/plotly/validators/surface/lightposition/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="surface.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/surface/lightposition/_y.py b/plotly/validators/surface/lightposition/_y.py index 4483bdfa35..1f60e421f2 100644 --- a/plotly/validators/surface/lightposition/_y.py +++ b/plotly/validators/surface/lightposition/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="surface.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/surface/lightposition/_z.py b/plotly/validators/surface/lightposition/_z.py index 3ac43ff185..b4d7e77e18 100644 --- a/plotly/validators/surface/lightposition/_z.py +++ b/plotly/validators/surface/lightposition/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__(self, plotly_name="z", parent_name="surface.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/surface/stream/__init__.py b/plotly/validators/surface/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/surface/stream/__init__.py +++ b/plotly/validators/surface/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/surface/stream/_maxpoints.py b/plotly/validators/surface/stream/_maxpoints.py index 30586cc2ad..b2da1efc9f 100644 --- a/plotly/validators/surface/stream/_maxpoints.py +++ b/plotly/validators/surface/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="surface.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/surface/stream/_token.py b/plotly/validators/surface/stream/_token.py index cf9ac25d0d..033854cc82 100644 --- a/plotly/validators/surface/stream/_token.py +++ b/plotly/validators/surface/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="surface.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/table/__init__.py b/plotly/validators/table/__init__.py index 7889805704..587fb4fab6 100644 --- a/plotly/validators/table/__init__.py +++ b/plotly/validators/table/__init__.py @@ -1,63 +1,34 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._stream import StreamValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._header import HeaderValidator - from ._domain import DomainValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._columnwidthsrc import ColumnwidthsrcValidator - from ._columnwidth import ColumnwidthValidator - from ._columnordersrc import ColumnordersrcValidator - from ._columnorder import ColumnorderValidator - from ._cells import CellsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._stream.StreamValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._header.HeaderValidator", - "._domain.DomainValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._columnwidthsrc.ColumnwidthsrcValidator", - "._columnwidth.ColumnwidthValidator", - "._columnordersrc.ColumnordersrcValidator", - "._columnorder.ColumnorderValidator", - "._cells.CellsValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._stream.StreamValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._header.HeaderValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._columnwidthsrc.ColumnwidthsrcValidator", + "._columnwidth.ColumnwidthValidator", + "._columnordersrc.ColumnordersrcValidator", + "._columnorder.ColumnorderValidator", + "._cells.CellsValidator", + ], +) diff --git a/plotly/validators/table/_cells.py b/plotly/validators/table/_cells.py index d10e321b87..9075cc2da4 100644 --- a/plotly/validators/table/_cells.py +++ b/plotly/validators/table/_cells.py @@ -1,64 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CellsValidator(_plotly_utils.basevalidators.CompoundValidator): +class CellsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="cells", parent_name="table", **kwargs): - super(CellsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Cells"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - fill - :class:`plotly.graph_objects.table.cells.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.cells.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - formatsrc - Sets the source reference on Chart Studio Cloud - for `format`. - height - The height of cells. - line - :class:`plotly.graph_objects.table.cells.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for `prefix`. - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for `suffix`. - values - Cell values. `values[m][n]` represents the - value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. """, ), **kwargs, diff --git a/plotly/validators/table/_columnorder.py b/plotly/validators/table/_columnorder.py index d8bb272d04..77ddcaa3f7 100644 --- a/plotly/validators/table/_columnorder.py +++ b/plotly/validators/table/_columnorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnorderValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColumnorderValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="columnorder", parent_name="table", **kwargs): - super(ColumnorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/_columnordersrc.py b/plotly/validators/table/_columnordersrc.py index a587f90037..8e51657367 100644 --- a/plotly/validators/table/_columnordersrc.py +++ b/plotly/validators/table/_columnordersrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnordersrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColumnordersrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="columnordersrc", parent_name="table", **kwargs): - super(ColumnordersrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_columnwidth.py b/plotly/validators/table/_columnwidth.py index 1b6613ef47..fef3c2fb93 100644 --- a/plotly/validators/table/_columnwidth.py +++ b/plotly/validators/table/_columnwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class ColumnwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="columnwidth", parent_name="table", **kwargs): - super(ColumnwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/_columnwidthsrc.py b/plotly/validators/table/_columnwidthsrc.py index 7e5ab66159..17c5a1edaa 100644 --- a/plotly/validators/table/_columnwidthsrc.py +++ b/plotly/validators/table/_columnwidthsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnwidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColumnwidthsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="columnwidthsrc", parent_name="table", **kwargs): - super(ColumnwidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_customdata.py b/plotly/validators/table/_customdata.py index 4134afcb64..120a7506fb 100644 --- a/plotly/validators/table/_customdata.py +++ b/plotly/validators/table/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="table", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/_customdatasrc.py b/plotly/validators/table/_customdatasrc.py index 885523ec26..c083472cea 100644 --- a/plotly/validators/table/_customdatasrc.py +++ b/plotly/validators/table/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="table", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_domain.py b/plotly/validators/table/_domain.py index b6f7ae0df0..030345c9f6 100644 --- a/plotly/validators/table/_domain.py +++ b/plotly/validators/table/_domain.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="table", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this table trace . - row - If there is a layout grid, use the domain for - this row in the grid for this table trace . - x - Sets the horizontal domain of this table trace - (in plot fraction). - y - Sets the vertical domain of this table trace - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/table/_header.py b/plotly/validators/table/_header.py index c770173340..e3064eab82 100644 --- a/plotly/validators/table/_header.py +++ b/plotly/validators/table/_header.py @@ -1,64 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeaderValidator(_plotly_utils.basevalidators.CompoundValidator): +class HeaderValidator(_bv.CompoundValidator): def __init__(self, plotly_name="header", parent_name="table", **kwargs): - super(HeaderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Header"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the `text` - within the box. Has an effect only if `text` - spans two or more lines (i.e. `text` contains - one or more
HTML tags) or if an explicit - width is set to override the text width. - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - fill - :class:`plotly.graph_objects.table.header.Fill` - instance or dict with compatible properties - font - :class:`plotly.graph_objects.table.header.Font` - instance or dict with compatible properties - format - Sets the cell value formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. - formatsrc - Sets the source reference on Chart Studio Cloud - for `format`. - height - The height of cells. - line - :class:`plotly.graph_objects.table.header.Line` - instance or dict with compatible properties - prefix - Prefix for cell values. - prefixsrc - Sets the source reference on Chart Studio Cloud - for `prefix`. - suffix - Suffix for cell values. - suffixsrc - Sets the source reference on Chart Studio Cloud - for `suffix`. - values - Header cell values. `values[m][n]` represents - the value of the `n`th point in column `m`, - therefore the `values[m]` vector length for all - columns must be the same (longer vectors will - be truncated). Each value must be a finite - number or a string. - valuessrc - Sets the source reference on Chart Studio Cloud - for `values`. """, ), **kwargs, diff --git a/plotly/validators/table/_hoverinfo.py b/plotly/validators/table/_hoverinfo.py index d9ce649c20..149c423a1d 100644 --- a/plotly/validators/table/_hoverinfo.py +++ b/plotly/validators/table/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="table", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/table/_hoverinfosrc.py b/plotly/validators/table/_hoverinfosrc.py index bbf2a457af..4dfdb2b7a8 100644 --- a/plotly/validators/table/_hoverinfosrc.py +++ b/plotly/validators/table/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="table", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_hoverlabel.py b/plotly/validators/table/_hoverlabel.py index 91bd52b527..f67de5d687 100644 --- a/plotly/validators/table/_hoverlabel.py +++ b/plotly/validators/table/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="table", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/table/_ids.py b/plotly/validators/table/_ids.py index 1c1e35af4f..bab0348d36 100644 --- a/plotly/validators/table/_ids.py +++ b/plotly/validators/table/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="table", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/_idssrc.py b/plotly/validators/table/_idssrc.py index 4cf3a58534..48d6faeaf5 100644 --- a/plotly/validators/table/_idssrc.py +++ b/plotly/validators/table/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="table", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_legend.py b/plotly/validators/table/_legend.py index 4f520f8c5f..507b28fe26 100644 --- a/plotly/validators/table/_legend.py +++ b/plotly/validators/table/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="table", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/table/_legendgrouptitle.py b/plotly/validators/table/_legendgrouptitle.py index 3cff9a2b5a..0b206aeabb 100644 --- a/plotly/validators/table/_legendgrouptitle.py +++ b/plotly/validators/table/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="table", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/table/_legendrank.py b/plotly/validators/table/_legendrank.py index cdc05d6610..d6ab5b55a1 100644 --- a/plotly/validators/table/_legendrank.py +++ b/plotly/validators/table/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="table", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/table/_legendwidth.py b/plotly/validators/table/_legendwidth.py index 05d4aa6a48..8783f6dda3 100644 --- a/plotly/validators/table/_legendwidth.py +++ b/plotly/validators/table/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="table", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/table/_meta.py b/plotly/validators/table/_meta.py index cf96295102..01e25a8fe7 100644 --- a/plotly/validators/table/_meta.py +++ b/plotly/validators/table/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="table", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/table/_metasrc.py b/plotly/validators/table/_metasrc.py index 351b170042..34189f3ed2 100644 --- a/plotly/validators/table/_metasrc.py +++ b/plotly/validators/table/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="table", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_name.py b/plotly/validators/table/_name.py index 2dbd45d6c7..c28f2ad46b 100644 --- a/plotly/validators/table/_name.py +++ b/plotly/validators/table/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="table", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/table/_stream.py b/plotly/validators/table/_stream.py index baf66dfefd..bf1f9039cf 100644 --- a/plotly/validators/table/_stream.py +++ b/plotly/validators/table/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="table", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/table/_uid.py b/plotly/validators/table/_uid.py index b9e7ad15ef..f422d61c1d 100644 --- a/plotly/validators/table/_uid.py +++ b/plotly/validators/table/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="table", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/table/_uirevision.py b/plotly/validators/table/_uirevision.py index f3130e2fab..232d6e90a9 100644 --- a/plotly/validators/table/_uirevision.py +++ b/plotly/validators/table/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="table", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/_visible.py b/plotly/validators/table/_visible.py index 052383310d..1e3c226c98 100644 --- a/plotly/validators/table/_visible.py +++ b/plotly/validators/table/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="table", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/table/cells/__init__.py b/plotly/validators/table/cells/__init__.py index ee416ebc74..5c655b3ec7 100644 --- a/plotly/validators/table/cells/__init__.py +++ b/plotly/validators/table/cells/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._suffixsrc import SuffixsrcValidator - from ._suffix import SuffixValidator - from ._prefixsrc import PrefixsrcValidator - from ._prefix import PrefixValidator - from ._line import LineValidator - from ._height import HeightValidator - from ._formatsrc import FormatsrcValidator - from ._format import FormatValidator - from ._font import FontValidator - from ._fill import FillValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._suffixsrc.SuffixsrcValidator", - "._suffix.SuffixValidator", - "._prefixsrc.PrefixsrcValidator", - "._prefix.PrefixValidator", - "._line.LineValidator", - "._height.HeightValidator", - "._formatsrc.FormatsrcValidator", - "._format.FormatValidator", - "._font.FontValidator", - "._fill.FillValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._suffixsrc.SuffixsrcValidator", + "._suffix.SuffixValidator", + "._prefixsrc.PrefixsrcValidator", + "._prefix.PrefixValidator", + "._line.LineValidator", + "._height.HeightValidator", + "._formatsrc.FormatsrcValidator", + "._format.FormatValidator", + "._font.FontValidator", + "._fill.FillValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/table/cells/_align.py b/plotly/validators/table/cells/_align.py index b308ee1aa8..596f9842d4 100644 --- a/plotly/validators/table/cells/_align.py +++ b/plotly/validators/table/cells/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="table.cells", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), diff --git a/plotly/validators/table/cells/_alignsrc.py b/plotly/validators/table/cells/_alignsrc.py index 6d1aaaad79..8c57b4c41d 100644 --- a/plotly/validators/table/cells/_alignsrc.py +++ b/plotly/validators/table/cells/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="table.cells", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/_fill.py b/plotly/validators/table/cells/_fill.py index a920b6da1e..e8e57fddc0 100644 --- a/plotly/validators/table/cells/_fill.py +++ b/plotly/validators/table/cells/_fill.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): +class FillValidator(_bv.CompoundValidator): def __init__(self, plotly_name="fill", parent_name="table.cells", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Fill"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. """, ), **kwargs, diff --git a/plotly/validators/table/cells/_font.py b/plotly/validators/table/cells/_font.py index d14f5db38d..94b9d10855 100644 --- a/plotly/validators/table/cells/_font.py +++ b/plotly/validators/table/cells/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="table.cells", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/table/cells/_format.py b/plotly/validators/table/cells/_format.py index 8bef0b48e2..ef8bd43334 100644 --- a/plotly/validators/table/cells/_format.py +++ b/plotly/validators/table/cells/_format.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FormatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class FormatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="format", parent_name="table.cells", **kwargs): - super(FormatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/cells/_formatsrc.py b/plotly/validators/table/cells/_formatsrc.py index 392c1be551..70b80c8828 100644 --- a/plotly/validators/table/cells/_formatsrc.py +++ b/plotly/validators/table/cells/_formatsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FormatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="formatsrc", parent_name="table.cells", **kwargs): - super(FormatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/_height.py b/plotly/validators/table/cells/_height.py index 1fa6451b95..15c5eef4ee 100644 --- a/plotly/validators/table/cells/_height.py +++ b/plotly/validators/table/cells/_height.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): +class HeightValidator(_bv.NumberValidator): def __init__(self, plotly_name="height", parent_name="table.cells", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/cells/_line.py b/plotly/validators/table/cells/_line.py index 8b6ee12b62..33f564551b 100644 --- a/plotly/validators/table/cells/_line.py +++ b/plotly/validators/table/cells/_line.py @@ -1,25 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="table.cells", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/table/cells/_prefix.py b/plotly/validators/table/cells/_prefix.py index 89717a324e..a1911d54fd 100644 --- a/plotly/validators/table/cells/_prefix.py +++ b/plotly/validators/table/cells/_prefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): +class PrefixValidator(_bv.StringValidator): def __init__(self, plotly_name="prefix", parent_name="table.cells", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/_prefixsrc.py b/plotly/validators/table/cells/_prefixsrc.py index 40f2e263b7..71000c1b77 100644 --- a/plotly/validators/table/cells/_prefixsrc.py +++ b/plotly/validators/table/cells/_prefixsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class PrefixsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="prefixsrc", parent_name="table.cells", **kwargs): - super(PrefixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/_suffix.py b/plotly/validators/table/cells/_suffix.py index f16451e849..35c075d9e7 100644 --- a/plotly/validators/table/cells/_suffix.py +++ b/plotly/validators/table/cells/_suffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): +class SuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="suffix", parent_name="table.cells", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/_suffixsrc.py b/plotly/validators/table/cells/_suffixsrc.py index 8ecd8c61e5..18f71108e1 100644 --- a/plotly/validators/table/cells/_suffixsrc.py +++ b/plotly/validators/table/cells/_suffixsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SuffixsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="suffixsrc", parent_name="table.cells", **kwargs): - super(SuffixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/_values.py b/plotly/validators/table/cells/_values.py index f6f78ee5f1..332c127434 100644 --- a/plotly/validators/table/cells/_values.py +++ b/plotly/validators/table/cells/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="table.cells", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/cells/_valuessrc.py b/plotly/validators/table/cells/_valuessrc.py index a8952102fd..8f9f4227e7 100644 --- a/plotly/validators/table/cells/_valuessrc.py +++ b/plotly/validators/table/cells/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="table.cells", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/fill/__init__.py b/plotly/validators/table/cells/fill/__init__.py index 4ca11d9882..8cd95cefa3 100644 --- a/plotly/validators/table/cells/fill/__init__.py +++ b/plotly/validators/table/cells/fill/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/table/cells/fill/_color.py b/plotly/validators/table/cells/fill/_color.py index 962490f29c..b4f1ba9a95 100644 --- a/plotly/validators/table/cells/fill/_color.py +++ b/plotly/validators/table/cells/fill/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="table.cells.fill", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/fill/_colorsrc.py b/plotly/validators/table/cells/fill/_colorsrc.py index d25afc1a1b..c23ea8be69 100644 --- a/plotly/validators/table/cells/fill/_colorsrc.py +++ b/plotly/validators/table/cells/fill/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.cells.fill", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/__init__.py b/plotly/validators/table/cells/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/table/cells/font/__init__.py +++ b/plotly/validators/table/cells/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/table/cells/font/_color.py b/plotly/validators/table/cells/font/_color.py index a50ae569f0..1f60cd841a 100644 --- a/plotly/validators/table/cells/font/_color.py +++ b/plotly/validators/table/cells/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="table.cells.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/font/_colorsrc.py b/plotly/validators/table/cells/font/_colorsrc.py index 024189dd00..07bb6de904 100644 --- a/plotly/validators/table/cells/font/_colorsrc.py +++ b/plotly/validators/table/cells/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.cells.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_family.py b/plotly/validators/table/cells/font/_family.py index 8ba12c83d8..6c37b4a755 100644 --- a/plotly/validators/table/cells/font/_family.py +++ b/plotly/validators/table/cells/font/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="table.cells.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/table/cells/font/_familysrc.py b/plotly/validators/table/cells/font/_familysrc.py index e797c33dd4..6339e6b174 100644 --- a/plotly/validators/table/cells/font/_familysrc.py +++ b/plotly/validators/table/cells/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="table.cells.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_lineposition.py b/plotly/validators/table/cells/font/_lineposition.py index 104fec7d27..0ecc16ba10 100644 --- a/plotly/validators/table/cells/font/_lineposition.py +++ b/plotly/validators/table/cells/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="table.cells.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/table/cells/font/_linepositionsrc.py b/plotly/validators/table/cells/font/_linepositionsrc.py index ae4b47fb29..ff0ba4f934 100644 --- a/plotly/validators/table/cells/font/_linepositionsrc.py +++ b/plotly/validators/table/cells/font/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="table.cells.font", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_shadow.py b/plotly/validators/table/cells/font/_shadow.py index 96e4bd524b..cdc2c87851 100644 --- a/plotly/validators/table/cells/font/_shadow.py +++ b/plotly/validators/table/cells/font/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="table.cells.font", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/font/_shadowsrc.py b/plotly/validators/table/cells/font/_shadowsrc.py index 7129742835..906c488c71 100644 --- a/plotly/validators/table/cells/font/_shadowsrc.py +++ b/plotly/validators/table/cells/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="table.cells.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_size.py b/plotly/validators/table/cells/font/_size.py index 2a30886b39..cf04cd9f31 100644 --- a/plotly/validators/table/cells/font/_size.py +++ b/plotly/validators/table/cells/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="table.cells.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/table/cells/font/_sizesrc.py b/plotly/validators/table/cells/font/_sizesrc.py index d7293d0b01..ae26a69b62 100644 --- a/plotly/validators/table/cells/font/_sizesrc.py +++ b/plotly/validators/table/cells/font/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="table.cells.font", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_style.py b/plotly/validators/table/cells/font/_style.py index 041da23bb2..d1fa9f260a 100644 --- a/plotly/validators/table/cells/font/_style.py +++ b/plotly/validators/table/cells/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="table.cells.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/table/cells/font/_stylesrc.py b/plotly/validators/table/cells/font/_stylesrc.py index a96f133e1a..335d693e64 100644 --- a/plotly/validators/table/cells/font/_stylesrc.py +++ b/plotly/validators/table/cells/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="table.cells.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_textcase.py b/plotly/validators/table/cells/font/_textcase.py index d6dfda9532..c3121f0a27 100644 --- a/plotly/validators/table/cells/font/_textcase.py +++ b/plotly/validators/table/cells/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="table.cells.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/table/cells/font/_textcasesrc.py b/plotly/validators/table/cells/font/_textcasesrc.py index 93a17496f2..3e317b8fe6 100644 --- a/plotly/validators/table/cells/font/_textcasesrc.py +++ b/plotly/validators/table/cells/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="table.cells.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_variant.py b/plotly/validators/table/cells/font/_variant.py index 78a36f3cb6..38994e8a4e 100644 --- a/plotly/validators/table/cells/font/_variant.py +++ b/plotly/validators/table/cells/font/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="table.cells.font", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/table/cells/font/_variantsrc.py b/plotly/validators/table/cells/font/_variantsrc.py index f01f825711..013e2ddfb0 100644 --- a/plotly/validators/table/cells/font/_variantsrc.py +++ b/plotly/validators/table/cells/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="table.cells.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/font/_weight.py b/plotly/validators/table/cells/font/_weight.py index e33f086352..6946b8e1a2 100644 --- a/plotly/validators/table/cells/font/_weight.py +++ b/plotly/validators/table/cells/font/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="table.cells.font", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/table/cells/font/_weightsrc.py b/plotly/validators/table/cells/font/_weightsrc.py index 9384af94bd..32f43f1e73 100644 --- a/plotly/validators/table/cells/font/_weightsrc.py +++ b/plotly/validators/table/cells/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="table.cells.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/line/__init__.py b/plotly/validators/table/cells/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/table/cells/line/__init__.py +++ b/plotly/validators/table/cells/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/table/cells/line/_color.py b/plotly/validators/table/cells/line/_color.py index a6d3742eb3..2fbf256423 100644 --- a/plotly/validators/table/cells/line/_color.py +++ b/plotly/validators/table/cells/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="table.cells.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/line/_colorsrc.py b/plotly/validators/table/cells/line/_colorsrc.py index c5b5fa2dae..1b79a3a67b 100644 --- a/plotly/validators/table/cells/line/_colorsrc.py +++ b/plotly/validators/table/cells/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.cells.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/cells/line/_width.py b/plotly/validators/table/cells/line/_width.py index 91eb7283d8..14d0e9742c 100644 --- a/plotly/validators/table/cells/line/_width.py +++ b/plotly/validators/table/cells/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="table.cells.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/cells/line/_widthsrc.py b/plotly/validators/table/cells/line/_widthsrc.py index 9b5a8f49be..4a5239f64b 100644 --- a/plotly/validators/table/cells/line/_widthsrc.py +++ b/plotly/validators/table/cells/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="table.cells.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/domain/__init__.py b/plotly/validators/table/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/table/domain/__init__.py +++ b/plotly/validators/table/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/table/domain/_column.py b/plotly/validators/table/domain/_column.py index 156d700b3b..76b1efe506 100644 --- a/plotly/validators/table/domain/_column.py +++ b/plotly/validators/table/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="table.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/table/domain/_row.py b/plotly/validators/table/domain/_row.py index da82ffd2b6..f924d5d2e1 100644 --- a/plotly/validators/table/domain/_row.py +++ b/plotly/validators/table/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="table.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/table/domain/_x.py b/plotly/validators/table/domain/_x.py index 52e6b1ca54..ef2de8f4c6 100644 --- a/plotly/validators/table/domain/_x.py +++ b/plotly/validators/table/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="table.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/table/domain/_y.py b/plotly/validators/table/domain/_y.py index 63b7b7efb2..e038d0992d 100644 --- a/plotly/validators/table/domain/_y.py +++ b/plotly/validators/table/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="table.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/table/header/__init__.py b/plotly/validators/table/header/__init__.py index ee416ebc74..5c655b3ec7 100644 --- a/plotly/validators/table/header/__init__.py +++ b/plotly/validators/table/header/__init__.py @@ -1,41 +1,23 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._suffixsrc import SuffixsrcValidator - from ._suffix import SuffixValidator - from ._prefixsrc import PrefixsrcValidator - from ._prefix import PrefixValidator - from ._line import LineValidator - from ._height import HeightValidator - from ._formatsrc import FormatsrcValidator - from ._format import FormatValidator - from ._font import FontValidator - from ._fill import FillValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._suffixsrc.SuffixsrcValidator", - "._suffix.SuffixValidator", - "._prefixsrc.PrefixsrcValidator", - "._prefix.PrefixValidator", - "._line.LineValidator", - "._height.HeightValidator", - "._formatsrc.FormatsrcValidator", - "._format.FormatValidator", - "._font.FontValidator", - "._fill.FillValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._suffixsrc.SuffixsrcValidator", + "._suffix.SuffixValidator", + "._prefixsrc.PrefixsrcValidator", + "._prefix.PrefixValidator", + "._line.LineValidator", + "._height.HeightValidator", + "._formatsrc.FormatsrcValidator", + "._format.FormatValidator", + "._font.FontValidator", + "._fill.FillValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/table/header/_align.py b/plotly/validators/table/header/_align.py index 2af19d99cc..e691a9a206 100644 --- a/plotly/validators/table/header/_align.py +++ b/plotly/validators/table/header/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="table.header", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), diff --git a/plotly/validators/table/header/_alignsrc.py b/plotly/validators/table/header/_alignsrc.py index a9c3bc2a2f..beb304ec2e 100644 --- a/plotly/validators/table/header/_alignsrc.py +++ b/plotly/validators/table/header/_alignsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="alignsrc", parent_name="table.header", **kwargs): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/_fill.py b/plotly/validators/table/header/_fill.py index 6915fff645..377b457de3 100644 --- a/plotly/validators/table/header/_fill.py +++ b/plotly/validators/table/header/_fill.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.CompoundValidator): +class FillValidator(_bv.CompoundValidator): def __init__(self, plotly_name="fill", parent_name="table.header", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Fill"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the cell fill color. It accepts either a - specific color or an array of colors or a 2D - array of colors. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. """, ), **kwargs, diff --git a/plotly/validators/table/header/_font.py b/plotly/validators/table/header/_font.py index fde9095312..77b77c32ed 100644 --- a/plotly/validators/table/header/_font.py +++ b/plotly/validators/table/header/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="table.header", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/table/header/_format.py b/plotly/validators/table/header/_format.py index 5047c435f6..f7b8ab68e1 100644 --- a/plotly/validators/table/header/_format.py +++ b/plotly/validators/table/header/_format.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FormatValidator(_plotly_utils.basevalidators.DataArrayValidator): +class FormatValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="format", parent_name="table.header", **kwargs): - super(FormatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/header/_formatsrc.py b/plotly/validators/table/header/_formatsrc.py index 924627ec95..4a3cd1fb77 100644 --- a/plotly/validators/table/header/_formatsrc.py +++ b/plotly/validators/table/header/_formatsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FormatsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FormatsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="formatsrc", parent_name="table.header", **kwargs): - super(FormatsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/_height.py b/plotly/validators/table/header/_height.py index 3505048fbb..15b254a98d 100644 --- a/plotly/validators/table/header/_height.py +++ b/plotly/validators/table/header/_height.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HeightValidator(_plotly_utils.basevalidators.NumberValidator): +class HeightValidator(_bv.NumberValidator): def __init__(self, plotly_name="height", parent_name="table.header", **kwargs): - super(HeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/header/_line.py b/plotly/validators/table/header/_line.py index b581d1d256..93884444d8 100644 --- a/plotly/validators/table/header/_line.py +++ b/plotly/validators/table/header/_line.py @@ -1,25 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="table.header", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/table/header/_prefix.py b/plotly/validators/table/header/_prefix.py index c75a1c3790..3240f46952 100644 --- a/plotly/validators/table/header/_prefix.py +++ b/plotly/validators/table/header/_prefix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixValidator(_plotly_utils.basevalidators.StringValidator): +class PrefixValidator(_bv.StringValidator): def __init__(self, plotly_name="prefix", parent_name="table.header", **kwargs): - super(PrefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/_prefixsrc.py b/plotly/validators/table/header/_prefixsrc.py index be254fa034..dc207b7906 100644 --- a/plotly/validators/table/header/_prefixsrc.py +++ b/plotly/validators/table/header/_prefixsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PrefixsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class PrefixsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="prefixsrc", parent_name="table.header", **kwargs): - super(PrefixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/_suffix.py b/plotly/validators/table/header/_suffix.py index 3445b69565..9d072afdaf 100644 --- a/plotly/validators/table/header/_suffix.py +++ b/plotly/validators/table/header/_suffix.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixValidator(_plotly_utils.basevalidators.StringValidator): +class SuffixValidator(_bv.StringValidator): def __init__(self, plotly_name="suffix", parent_name="table.header", **kwargs): - super(SuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/_suffixsrc.py b/plotly/validators/table/header/_suffixsrc.py index c813136c38..a5b7196c81 100644 --- a/plotly/validators/table/header/_suffixsrc.py +++ b/plotly/validators/table/header/_suffixsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SuffixsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SuffixsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="suffixsrc", parent_name="table.header", **kwargs): - super(SuffixsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/_values.py b/plotly/validators/table/header/_values.py index 07db22cd12..37ed6430a5 100644 --- a/plotly/validators/table/header/_values.py +++ b/plotly/validators/table/header/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="table.header", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/table/header/_valuessrc.py b/plotly/validators/table/header/_valuessrc.py index fbefbfc0f5..1b0f3c41a6 100644 --- a/plotly/validators/table/header/_valuessrc.py +++ b/plotly/validators/table/header/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="table.header", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/fill/__init__.py b/plotly/validators/table/header/fill/__init__.py index 4ca11d9882..8cd95cefa3 100644 --- a/plotly/validators/table/header/fill/__init__.py +++ b/plotly/validators/table/header/fill/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._colorsrc.ColorsrcValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/table/header/fill/_color.py b/plotly/validators/table/header/fill/_color.py index 4839e8bae7..235f82af60 100644 --- a/plotly/validators/table/header/fill/_color.py +++ b/plotly/validators/table/header/fill/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="table.header.fill", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/fill/_colorsrc.py b/plotly/validators/table/header/fill/_colorsrc.py index 102e12fd41..f6dc83cc60 100644 --- a/plotly/validators/table/header/fill/_colorsrc.py +++ b/plotly/validators/table/header/fill/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.header.fill", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/__init__.py b/plotly/validators/table/header/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/table/header/font/__init__.py +++ b/plotly/validators/table/header/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/table/header/font/_color.py b/plotly/validators/table/header/font/_color.py index 4bb1d920f1..b2852998ac 100644 --- a/plotly/validators/table/header/font/_color.py +++ b/plotly/validators/table/header/font/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="table.header.font", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/font/_colorsrc.py b/plotly/validators/table/header/font/_colorsrc.py index 7033c88f7d..ab6cebba9f 100644 --- a/plotly/validators/table/header/font/_colorsrc.py +++ b/plotly/validators/table/header/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.header.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_family.py b/plotly/validators/table/header/font/_family.py index d14a289e27..3e8ef24412 100644 --- a/plotly/validators/table/header/font/_family.py +++ b/plotly/validators/table/header/font/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="table.header.font", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/table/header/font/_familysrc.py b/plotly/validators/table/header/font/_familysrc.py index 75365c3bec..2e8be2cc30 100644 --- a/plotly/validators/table/header/font/_familysrc.py +++ b/plotly/validators/table/header/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="table.header.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_lineposition.py b/plotly/validators/table/header/font/_lineposition.py index 8ff6f8563b..3af37ba2f6 100644 --- a/plotly/validators/table/header/font/_lineposition.py +++ b/plotly/validators/table/header/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="table.header.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/table/header/font/_linepositionsrc.py b/plotly/validators/table/header/font/_linepositionsrc.py index fabb57303a..34248f4362 100644 --- a/plotly/validators/table/header/font/_linepositionsrc.py +++ b/plotly/validators/table/header/font/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="table.header.font", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_shadow.py b/plotly/validators/table/header/font/_shadow.py index 2f052f5b24..2e73611c27 100644 --- a/plotly/validators/table/header/font/_shadow.py +++ b/plotly/validators/table/header/font/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="table.header.font", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/font/_shadowsrc.py b/plotly/validators/table/header/font/_shadowsrc.py index 21021b12d5..dba63b36e5 100644 --- a/plotly/validators/table/header/font/_shadowsrc.py +++ b/plotly/validators/table/header/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="table.header.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_size.py b/plotly/validators/table/header/font/_size.py index db20534ee8..27b0c64a34 100644 --- a/plotly/validators/table/header/font/_size.py +++ b/plotly/validators/table/header/font/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="table.header.font", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/table/header/font/_sizesrc.py b/plotly/validators/table/header/font/_sizesrc.py index 2e5020740e..2c6cd009a1 100644 --- a/plotly/validators/table/header/font/_sizesrc.py +++ b/plotly/validators/table/header/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="table.header.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_style.py b/plotly/validators/table/header/font/_style.py index 92b380f61a..6f4e7d6052 100644 --- a/plotly/validators/table/header/font/_style.py +++ b/plotly/validators/table/header/font/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="table.header.font", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/table/header/font/_stylesrc.py b/plotly/validators/table/header/font/_stylesrc.py index e5ab5d8d3c..e2ea2aed1f 100644 --- a/plotly/validators/table/header/font/_stylesrc.py +++ b/plotly/validators/table/header/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="table.header.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_textcase.py b/plotly/validators/table/header/font/_textcase.py index de189c2a2f..12198f5abd 100644 --- a/plotly/validators/table/header/font/_textcase.py +++ b/plotly/validators/table/header/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="table.header.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/table/header/font/_textcasesrc.py b/plotly/validators/table/header/font/_textcasesrc.py index eb2231e793..86a00d2fdc 100644 --- a/plotly/validators/table/header/font/_textcasesrc.py +++ b/plotly/validators/table/header/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="table.header.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_variant.py b/plotly/validators/table/header/font/_variant.py index 9c36f6833d..d7afa9ae97 100644 --- a/plotly/validators/table/header/font/_variant.py +++ b/plotly/validators/table/header/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="table.header.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/table/header/font/_variantsrc.py b/plotly/validators/table/header/font/_variantsrc.py index 96382858d6..c050651eea 100644 --- a/plotly/validators/table/header/font/_variantsrc.py +++ b/plotly/validators/table/header/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="table.header.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/font/_weight.py b/plotly/validators/table/header/font/_weight.py index 7a60a24058..478d8e596b 100644 --- a/plotly/validators/table/header/font/_weight.py +++ b/plotly/validators/table/header/font/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="table.header.font", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/table/header/font/_weightsrc.py b/plotly/validators/table/header/font/_weightsrc.py index f2ce925903..32a14af610 100644 --- a/plotly/validators/table/header/font/_weightsrc.py +++ b/plotly/validators/table/header/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="table.header.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/line/__init__.py b/plotly/validators/table/header/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/table/header/line/__init__.py +++ b/plotly/validators/table/header/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/table/header/line/_color.py b/plotly/validators/table/header/line/_color.py index 07faaa67cc..f34c18d6e1 100644 --- a/plotly/validators/table/header/line/_color.py +++ b/plotly/validators/table/header/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="table.header.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/line/_colorsrc.py b/plotly/validators/table/header/line/_colorsrc.py index 7c82cb4ee6..bbf771b633 100644 --- a/plotly/validators/table/header/line/_colorsrc.py +++ b/plotly/validators/table/header/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.header.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/header/line/_width.py b/plotly/validators/table/header/line/_width.py index fadf260e77..e41bf1de08 100644 --- a/plotly/validators/table/header/line/_width.py +++ b/plotly/validators/table/header/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="table.header.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/table/header/line/_widthsrc.py b/plotly/validators/table/header/line/_widthsrc.py index d9e2d43cf8..b93a9ff2b9 100644 --- a/plotly/validators/table/header/line/_widthsrc.py +++ b/plotly/validators/table/header/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="table.header.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/__init__.py b/plotly/validators/table/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/table/hoverlabel/__init__.py +++ b/plotly/validators/table/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/table/hoverlabel/_align.py b/plotly/validators/table/hoverlabel/_align.py index 6aed79e48c..4e0fd6d57c 100644 --- a/plotly/validators/table/hoverlabel/_align.py +++ b/plotly/validators/table/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="table.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/table/hoverlabel/_alignsrc.py b/plotly/validators/table/hoverlabel/_alignsrc.py index ed2df3a516..2536953ddf 100644 --- a/plotly/validators/table/hoverlabel/_alignsrc.py +++ b/plotly/validators/table/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="table.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/_bgcolor.py b/plotly/validators/table/hoverlabel/_bgcolor.py index 5f87621bde..8b62a745d7 100644 --- a/plotly/validators/table/hoverlabel/_bgcolor.py +++ b/plotly/validators/table/hoverlabel/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="table.hoverlabel", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/table/hoverlabel/_bgcolorsrc.py b/plotly/validators/table/hoverlabel/_bgcolorsrc.py index 3ad225a5a0..eb3397ace8 100644 --- a/plotly/validators/table/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/table/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="table.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/_bordercolor.py b/plotly/validators/table/hoverlabel/_bordercolor.py index d5991080b5..4b2bdf84ed 100644 --- a/plotly/validators/table/hoverlabel/_bordercolor.py +++ b/plotly/validators/table/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="table.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/table/hoverlabel/_bordercolorsrc.py b/plotly/validators/table/hoverlabel/_bordercolorsrc.py index 15a491060d..490ec8068d 100644 --- a/plotly/validators/table/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/table/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="table.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/_font.py b/plotly/validators/table/hoverlabel/_font.py index 99629ce888..fdcd67b6a6 100644 --- a/plotly/validators/table/hoverlabel/_font.py +++ b/plotly/validators/table/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="table.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/table/hoverlabel/_namelength.py b/plotly/validators/table/hoverlabel/_namelength.py index 9a9ce0557c..8642f22bd1 100644 --- a/plotly/validators/table/hoverlabel/_namelength.py +++ b/plotly/validators/table/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="table.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/table/hoverlabel/_namelengthsrc.py b/plotly/validators/table/hoverlabel/_namelengthsrc.py index cc58cdec51..fe7ed41f33 100644 --- a/plotly/validators/table/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/table/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="table.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/__init__.py b/plotly/validators/table/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/table/hoverlabel/font/__init__.py +++ b/plotly/validators/table/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/table/hoverlabel/font/_color.py b/plotly/validators/table/hoverlabel/font/_color.py index de867c3aa7..0d4afbdb63 100644 --- a/plotly/validators/table/hoverlabel/font/_color.py +++ b/plotly/validators/table/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="table.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/table/hoverlabel/font/_colorsrc.py b/plotly/validators/table/hoverlabel/font/_colorsrc.py index 8db3eb6090..ccd9f383c0 100644 --- a/plotly/validators/table/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/table/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="table.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_family.py b/plotly/validators/table/hoverlabel/font/_family.py index 7a99f57ec1..2d67a8a814 100644 --- a/plotly/validators/table/hoverlabel/font/_family.py +++ b/plotly/validators/table/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="table.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/table/hoverlabel/font/_familysrc.py b/plotly/validators/table/hoverlabel/font/_familysrc.py index 6ec514b8d9..d8638fd32d 100644 --- a/plotly/validators/table/hoverlabel/font/_familysrc.py +++ b/plotly/validators/table/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="table.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_lineposition.py b/plotly/validators/table/hoverlabel/font/_lineposition.py index f55ffa1ce2..257750f53c 100644 --- a/plotly/validators/table/hoverlabel/font/_lineposition.py +++ b/plotly/validators/table/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="table.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/table/hoverlabel/font/_linepositionsrc.py b/plotly/validators/table/hoverlabel/font/_linepositionsrc.py index 4bb45ad457..c8b54fcd31 100644 --- a/plotly/validators/table/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/table/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="table.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_shadow.py b/plotly/validators/table/hoverlabel/font/_shadow.py index a00712fdbc..f7f861e65f 100644 --- a/plotly/validators/table/hoverlabel/font/_shadow.py +++ b/plotly/validators/table/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="table.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/table/hoverlabel/font/_shadowsrc.py b/plotly/validators/table/hoverlabel/font/_shadowsrc.py index bcfaea294e..7e2fd2b964 100644 --- a/plotly/validators/table/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/table/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="table.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_size.py b/plotly/validators/table/hoverlabel/font/_size.py index fb14362bea..3a7bde08af 100644 --- a/plotly/validators/table/hoverlabel/font/_size.py +++ b/plotly/validators/table/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="table.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/table/hoverlabel/font/_sizesrc.py b/plotly/validators/table/hoverlabel/font/_sizesrc.py index 2074a56016..f619ed5474 100644 --- a/plotly/validators/table/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/table/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="table.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_style.py b/plotly/validators/table/hoverlabel/font/_style.py index da1ac46ce7..f0f20fcfa3 100644 --- a/plotly/validators/table/hoverlabel/font/_style.py +++ b/plotly/validators/table/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="table.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/table/hoverlabel/font/_stylesrc.py b/plotly/validators/table/hoverlabel/font/_stylesrc.py index e229cfeaa5..8a7b2fb345 100644 --- a/plotly/validators/table/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/table/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="table.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_textcase.py b/plotly/validators/table/hoverlabel/font/_textcase.py index c238089a77..2576f53cd9 100644 --- a/plotly/validators/table/hoverlabel/font/_textcase.py +++ b/plotly/validators/table/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="table.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/table/hoverlabel/font/_textcasesrc.py b/plotly/validators/table/hoverlabel/font/_textcasesrc.py index 6bad92fb96..f784d34039 100644 --- a/plotly/validators/table/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/table/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="table.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_variant.py b/plotly/validators/table/hoverlabel/font/_variant.py index 519448c462..b11120b520 100644 --- a/plotly/validators/table/hoverlabel/font/_variant.py +++ b/plotly/validators/table/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="table.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/table/hoverlabel/font/_variantsrc.py b/plotly/validators/table/hoverlabel/font/_variantsrc.py index bd4766cc59..b769b45ede 100644 --- a/plotly/validators/table/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/table/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="table.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/hoverlabel/font/_weight.py b/plotly/validators/table/hoverlabel/font/_weight.py index 70fdb788c7..c5214cec25 100644 --- a/plotly/validators/table/hoverlabel/font/_weight.py +++ b/plotly/validators/table/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="table.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/table/hoverlabel/font/_weightsrc.py b/plotly/validators/table/hoverlabel/font/_weightsrc.py index f2c611f744..63ca44ec24 100644 --- a/plotly/validators/table/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/table/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="table.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/table/legendgrouptitle/__init__.py b/plotly/validators/table/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/table/legendgrouptitle/__init__.py +++ b/plotly/validators/table/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/table/legendgrouptitle/_font.py b/plotly/validators/table/legendgrouptitle/_font.py index 2f14750131..f89fd03e7e 100644 --- a/plotly/validators/table/legendgrouptitle/_font.py +++ b/plotly/validators/table/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="table.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/table/legendgrouptitle/_text.py b/plotly/validators/table/legendgrouptitle/_text.py index 438b6def34..4eab27d2a3 100644 --- a/plotly/validators/table/legendgrouptitle/_text.py +++ b/plotly/validators/table/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="table.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/table/legendgrouptitle/font/__init__.py b/plotly/validators/table/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/table/legendgrouptitle/font/__init__.py +++ b/plotly/validators/table/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/table/legendgrouptitle/font/_color.py b/plotly/validators/table/legendgrouptitle/font/_color.py index b3ea930dae..9e0bf1d560 100644 --- a/plotly/validators/table/legendgrouptitle/font/_color.py +++ b/plotly/validators/table/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="table.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/table/legendgrouptitle/font/_family.py b/plotly/validators/table/legendgrouptitle/font/_family.py index 3ced4fef3c..62e384c14e 100644 --- a/plotly/validators/table/legendgrouptitle/font/_family.py +++ b/plotly/validators/table/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="table.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/table/legendgrouptitle/font/_lineposition.py b/plotly/validators/table/legendgrouptitle/font/_lineposition.py index 1a237b36e8..7cf6f9a3bb 100644 --- a/plotly/validators/table/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/table/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="table.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/table/legendgrouptitle/font/_shadow.py b/plotly/validators/table/legendgrouptitle/font/_shadow.py index e5d51ac708..f3d91633ec 100644 --- a/plotly/validators/table/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/table/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="table.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/table/legendgrouptitle/font/_size.py b/plotly/validators/table/legendgrouptitle/font/_size.py index 50f7754805..65adc7163c 100644 --- a/plotly/validators/table/legendgrouptitle/font/_size.py +++ b/plotly/validators/table/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="table.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/table/legendgrouptitle/font/_style.py b/plotly/validators/table/legendgrouptitle/font/_style.py index 9e5c998568..9271a1d14d 100644 --- a/plotly/validators/table/legendgrouptitle/font/_style.py +++ b/plotly/validators/table/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="table.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/table/legendgrouptitle/font/_textcase.py b/plotly/validators/table/legendgrouptitle/font/_textcase.py index 9e182ef6d6..168d820ee7 100644 --- a/plotly/validators/table/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/table/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="table.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/table/legendgrouptitle/font/_variant.py b/plotly/validators/table/legendgrouptitle/font/_variant.py index 938a4bbf5e..86d74ecee5 100644 --- a/plotly/validators/table/legendgrouptitle/font/_variant.py +++ b/plotly/validators/table/legendgrouptitle/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="table.legendgrouptitle.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/table/legendgrouptitle/font/_weight.py b/plotly/validators/table/legendgrouptitle/font/_weight.py index 6c332f0e4c..4fea994407 100644 --- a/plotly/validators/table/legendgrouptitle/font/_weight.py +++ b/plotly/validators/table/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="table.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/table/stream/__init__.py b/plotly/validators/table/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/table/stream/__init__.py +++ b/plotly/validators/table/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/table/stream/_maxpoints.py b/plotly/validators/table/stream/_maxpoints.py index 75baeda5ef..b3db0e050b 100644 --- a/plotly/validators/table/stream/_maxpoints.py +++ b/plotly/validators/table/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="table.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/table/stream/_token.py b/plotly/validators/table/stream/_token.py index 463403bbfb..e3047293f6 100644 --- a/plotly/validators/table/stream/_token.py +++ b/plotly/validators/table/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="table.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/treemap/__init__.py b/plotly/validators/treemap/__init__.py index 2a7bd82d12..15fa2ddae1 100644 --- a/plotly/validators/treemap/__init__.py +++ b/plotly/validators/treemap/__init__.py @@ -1,109 +1,57 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._valuessrc import ValuessrcValidator - from ._values import ValuesValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._tiling import TilingValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textposition import TextpositionValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._sort import SortValidator - from ._root import RootValidator - from ._pathbar import PathbarValidator - from ._parentssrc import ParentssrcValidator - from ._parents import ParentsValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._maxdepth import MaxdepthValidator - from ._marker import MarkerValidator - from ._level import LevelValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legend import LegendValidator - from ._labelssrc import LabelssrcValidator - from ._labels import LabelsValidator - from ._insidetextfont import InsidetextfontValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._domain import DomainValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._count import CountValidator - from ._branchvalues import BranchvaluesValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._valuessrc.ValuessrcValidator", - "._values.ValuesValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._tiling.TilingValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textposition.TextpositionValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._sort.SortValidator", - "._root.RootValidator", - "._pathbar.PathbarValidator", - "._parentssrc.ParentssrcValidator", - "._parents.ParentsValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._maxdepth.MaxdepthValidator", - "._marker.MarkerValidator", - "._level.LevelValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legend.LegendValidator", - "._labelssrc.LabelssrcValidator", - "._labels.LabelsValidator", - "._insidetextfont.InsidetextfontValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._domain.DomainValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._count.CountValidator", - "._branchvalues.BranchvaluesValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._valuessrc.ValuessrcValidator", + "._values.ValuesValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._tiling.TilingValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._sort.SortValidator", + "._root.RootValidator", + "._pathbar.PathbarValidator", + "._parentssrc.ParentssrcValidator", + "._parents.ParentsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._maxdepth.MaxdepthValidator", + "._marker.MarkerValidator", + "._level.LevelValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legend.LegendValidator", + "._labelssrc.LabelssrcValidator", + "._labels.LabelsValidator", + "._insidetextfont.InsidetextfontValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._domain.DomainValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._count.CountValidator", + "._branchvalues.BranchvaluesValidator", + ], +) diff --git a/plotly/validators/treemap/_branchvalues.py b/plotly/validators/treemap/_branchvalues.py index cd56b1b5eb..0572ff6d6e 100644 --- a/plotly/validators/treemap/_branchvalues.py +++ b/plotly/validators/treemap/_branchvalues.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BranchvaluesValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class BranchvaluesValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="branchvalues", parent_name="treemap", **kwargs): - super(BranchvaluesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["remainder", "total"]), **kwargs, diff --git a/plotly/validators/treemap/_count.py b/plotly/validators/treemap/_count.py index 3877b5e3f3..21dca37669 100644 --- a/plotly/validators/treemap/_count.py +++ b/plotly/validators/treemap/_count.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountValidator(_plotly_utils.basevalidators.FlaglistValidator): +class CountValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="count", parent_name="treemap", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), flags=kwargs.pop("flags", ["branches", "leaves"]), **kwargs, diff --git a/plotly/validators/treemap/_customdata.py b/plotly/validators/treemap/_customdata.py index 8daa473fdd..c8815ff178 100644 --- a/plotly/validators/treemap/_customdata.py +++ b/plotly/validators/treemap/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="treemap", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/_customdatasrc.py b/plotly/validators/treemap/_customdatasrc.py index 8a8248eee8..1d377e7e15 100644 --- a/plotly/validators/treemap/_customdatasrc.py +++ b/plotly/validators/treemap/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="treemap", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_domain.py b/plotly/validators/treemap/_domain.py index 80eb44c813..c831bc849e 100644 --- a/plotly/validators/treemap/_domain.py +++ b/plotly/validators/treemap/_domain.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DomainValidator(_plotly_utils.basevalidators.CompoundValidator): +class DomainValidator(_bv.CompoundValidator): def __init__(self, plotly_name="domain", parent_name="treemap", **kwargs): - super(DomainValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Domain"), data_docs=kwargs.pop( "data_docs", """ - column - If there is a layout grid, use the domain for - this column in the grid for this treemap trace - . - row - If there is a layout grid, use the domain for - this row in the grid for this treemap trace . - x - Sets the horizontal domain of this treemap - trace (in plot fraction). - y - Sets the vertical domain of this treemap trace - (in plot fraction). """, ), **kwargs, diff --git a/plotly/validators/treemap/_hoverinfo.py b/plotly/validators/treemap/_hoverinfo.py index 8c5d60e6dc..39a9de9982 100644 --- a/plotly/validators/treemap/_hoverinfo.py +++ b/plotly/validators/treemap/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="treemap", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/treemap/_hoverinfosrc.py b/plotly/validators/treemap/_hoverinfosrc.py index b5cf721d7d..5cd87da27b 100644 --- a/plotly/validators/treemap/_hoverinfosrc.py +++ b/plotly/validators/treemap/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="treemap", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_hoverlabel.py b/plotly/validators/treemap/_hoverlabel.py index ff30168dda..e911d417f4 100644 --- a/plotly/validators/treemap/_hoverlabel.py +++ b/plotly/validators/treemap/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="treemap", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/treemap/_hovertemplate.py b/plotly/validators/treemap/_hovertemplate.py index 4e91a6aadb..04159585a2 100644 --- a/plotly/validators/treemap/_hovertemplate.py +++ b/plotly/validators/treemap/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="treemap", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/treemap/_hovertemplatesrc.py b/plotly/validators/treemap/_hovertemplatesrc.py index 4f3011b4ff..e66610b369 100644 --- a/plotly/validators/treemap/_hovertemplatesrc.py +++ b/plotly/validators/treemap/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="treemap", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_hovertext.py b/plotly/validators/treemap/_hovertext.py index 9b854a1266..221bc60ff3 100644 --- a/plotly/validators/treemap/_hovertext.py +++ b/plotly/validators/treemap/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="treemap", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/treemap/_hovertextsrc.py b/plotly/validators/treemap/_hovertextsrc.py index 99863753b5..31de00a88c 100644 --- a/plotly/validators/treemap/_hovertextsrc.py +++ b/plotly/validators/treemap/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="treemap", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_ids.py b/plotly/validators/treemap/_ids.py index 0accac3c69..98f179e705 100644 --- a/plotly/validators/treemap/_ids.py +++ b/plotly/validators/treemap/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="treemap", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/treemap/_idssrc.py b/plotly/validators/treemap/_idssrc.py index 4b6762b66a..3d2965d27f 100644 --- a/plotly/validators/treemap/_idssrc.py +++ b/plotly/validators/treemap/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="treemap", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_insidetextfont.py b/plotly/validators/treemap/_insidetextfont.py index 8872224fab..cc8eabe9f7 100644 --- a/plotly/validators/treemap/_insidetextfont.py +++ b/plotly/validators/treemap/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="treemap", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/treemap/_labels.py b/plotly/validators/treemap/_labels.py index 4de2071027..ee79c8dd3c 100644 --- a/plotly/validators/treemap/_labels.py +++ b/plotly/validators/treemap/_labels.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LabelsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="labels", parent_name="treemap", **kwargs): - super(LabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/_labelssrc.py b/plotly/validators/treemap/_labelssrc.py index 86d36b9399..f5aa9983ca 100644 --- a/plotly/validators/treemap/_labelssrc.py +++ b/plotly/validators/treemap/_labelssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LabelssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="labelssrc", parent_name="treemap", **kwargs): - super(LabelssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_legend.py b/plotly/validators/treemap/_legend.py index e66137b64f..b9b795d4ff 100644 --- a/plotly/validators/treemap/_legend.py +++ b/plotly/validators/treemap/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="treemap", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/treemap/_legendgrouptitle.py b/plotly/validators/treemap/_legendgrouptitle.py index bdc220d656..0f0861a11c 100644 --- a/plotly/validators/treemap/_legendgrouptitle.py +++ b/plotly/validators/treemap/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="treemap", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/treemap/_legendrank.py b/plotly/validators/treemap/_legendrank.py index fc2c07efb6..2dd6fddcca 100644 --- a/plotly/validators/treemap/_legendrank.py +++ b/plotly/validators/treemap/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="treemap", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/treemap/_legendwidth.py b/plotly/validators/treemap/_legendwidth.py index 3855f3f6b2..3e7a3d5519 100644 --- a/plotly/validators/treemap/_legendwidth.py +++ b/plotly/validators/treemap/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="treemap", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/_level.py b/plotly/validators/treemap/_level.py index d4036ff6ec..8fe003a7b6 100644 --- a/plotly/validators/treemap/_level.py +++ b/plotly/validators/treemap/_level.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LevelValidator(_plotly_utils.basevalidators.AnyValidator): +class LevelValidator(_bv.AnyValidator): def __init__(self, plotly_name="level", parent_name="treemap", **kwargs): - super(LevelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/_marker.py b/plotly/validators/treemap/_marker.py index 68c366d7ac..24b7bed58c 100644 --- a/plotly/validators/treemap/_marker.py +++ b/plotly/validators/treemap/_marker.py @@ -1,120 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="treemap", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - autocolorscale - Determines whether the colorscale is a default - palette (`autocolorscale: true`) or the palette - determined by `marker.colorscale`. Has an - effect only if colors is set to a numerical - array. In case `colorscale` is unspecified or - `autocolorscale` is true, the default palette - will be chosen according to whether numbers in - the `color` array are all positive, all - negative or mixed. - cauto - Determines whether or not the color domain is - computed with respect to the input data (here - colors) or the bounds set in `marker.cmin` and - `marker.cmax` Has an effect only if colors is - set to a numerical array. Defaults to `false` - when `marker.cmin` and `marker.cmax` are set by - the user. - cmax - Sets the upper bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmin` must be set as - well. - cmid - Sets the mid-point of the color domain by - scaling `marker.cmin` and/or `marker.cmax` to - be equidistant to this point. Has an effect - only if colors is set to a numerical array. - Value should have the same units as colors. Has - no effect when `marker.cauto` is `false`. - cmin - Sets the lower bound of the color domain. Has - an effect only if colors is set to a numerical - array. Value should have the same units as - colors and if set, `marker.cmax` must be set as - well. - coloraxis - Sets a reference to a shared color axis. - References to these shared color axes are - "coloraxis", "coloraxis2", "coloraxis3", etc. - Settings for these shared color axes are set in - the layout, under `layout.coloraxis`, - `layout.coloraxis2`, etc. Note that multiple - color scales can be linked to the same color - axis. - colorbar - :class:`plotly.graph_objects.treemap.marker.Col - orBar` instance or dict with compatible - properties - colors - Sets the color of each sector of this trace. If - not specified, the default trace color set is - used to pick the sector colors. - colorscale - Sets the colorscale. Has an effect only if - colors is set to a numerical array. The - colorscale must be an array containing arrays - mapping a normalized value to an rgb, rgba, - hex, hsl, hsv, or named color string. At - minimum, a mapping for the lowest (0) and - highest (1) values are required. For example, - `[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]`. - To control the bounds of the colorscale in - color space, use `marker.cmin` and - `marker.cmax`. Alternatively, `colorscale` may - be a palette name string of the following list: - Blackbody,Bluered,Blues,Cividis,Earth,Electric, - Greens,Greys,Hot,Jet,Picnic,Portland,Rainbow,Rd - Bu,Reds,Viridis,YlGnBu,YlOrRd. - colorssrc - Sets the source reference on Chart Studio Cloud - for `colors`. - cornerradius - Sets the maximum rounding of corners (in px). - depthfade - Determines if the sector colors are faded - towards the background from the leaves up to - the headers. This option is unavailable when a - `colorscale` is present, defaults to false when - `marker.colors` is set, but otherwise defaults - to true. When set to "reversed", the fading - direction is inverted, that is the top elements - within hierarchy are drawn with fully saturated - colors while the leaves are faded towards the - background color. - line - :class:`plotly.graph_objects.treemap.marker.Lin - e` instance or dict with compatible properties - pad - :class:`plotly.graph_objects.treemap.marker.Pad - ` instance or dict with compatible properties - pattern - Sets the pattern within the marker. - reversescale - Reverses the color mapping if true. Has an - effect only if colors is set to a numerical - array. If true, `marker.cmin` will correspond - to the last color in the array and - `marker.cmax` will correspond to the first - color. - showscale - Determines whether or not a colorbar is - displayed for this trace. Has an effect only if - colors is set to a numerical array. """, ), **kwargs, diff --git a/plotly/validators/treemap/_maxdepth.py b/plotly/validators/treemap/_maxdepth.py index 1690524b6a..8993425a96 100644 --- a/plotly/validators/treemap/_maxdepth.py +++ b/plotly/validators/treemap/_maxdepth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxdepthValidator(_plotly_utils.basevalidators.IntegerValidator): +class MaxdepthValidator(_bv.IntegerValidator): def __init__(self, plotly_name="maxdepth", parent_name="treemap", **kwargs): - super(MaxdepthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/treemap/_meta.py b/plotly/validators/treemap/_meta.py index 1c0b95c840..5e19280af1 100644 --- a/plotly/validators/treemap/_meta.py +++ b/plotly/validators/treemap/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="treemap", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/_metasrc.py b/plotly/validators/treemap/_metasrc.py index a32212bcec..396dac808f 100644 --- a/plotly/validators/treemap/_metasrc.py +++ b/plotly/validators/treemap/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="treemap", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_name.py b/plotly/validators/treemap/_name.py index 437300e9f6..adeb4f6204 100644 --- a/plotly/validators/treemap/_name.py +++ b/plotly/validators/treemap/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="treemap", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/treemap/_opacity.py b/plotly/validators/treemap/_opacity.py index 7d2b8ee120..f823d6b1a2 100644 --- a/plotly/validators/treemap/_opacity.py +++ b/plotly/validators/treemap/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="treemap", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/treemap/_outsidetextfont.py b/plotly/validators/treemap/_outsidetextfont.py index b51abf1eed..f80d204156 100644 --- a/plotly/validators/treemap/_outsidetextfont.py +++ b/plotly/validators/treemap/_outsidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="outsidetextfont", parent_name="treemap", **kwargs): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/treemap/_parents.py b/plotly/validators/treemap/_parents.py index 605bd06cf2..0b34b00910 100644 --- a/plotly/validators/treemap/_parents.py +++ b/plotly/validators/treemap/_parents.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParentsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ParentsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="parents", parent_name="treemap", **kwargs): - super(ParentsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/_parentssrc.py b/plotly/validators/treemap/_parentssrc.py index 5ca63b4dc8..6abb02c448 100644 --- a/plotly/validators/treemap/_parentssrc.py +++ b/plotly/validators/treemap/_parentssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ParentssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ParentssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="parentssrc", parent_name="treemap", **kwargs): - super(ParentssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_pathbar.py b/plotly/validators/treemap/_pathbar.py index 98490e956a..618d52c1bd 100644 --- a/plotly/validators/treemap/_pathbar.py +++ b/plotly/validators/treemap/_pathbar.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PathbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class PathbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pathbar", parent_name="treemap", **kwargs): - super(PathbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pathbar"), data_docs=kwargs.pop( "data_docs", """ - edgeshape - Determines which shape is used for edges - between `barpath` labels. - side - Determines on which side of the the treemap the - `pathbar` should be presented. - textfont - Sets the font used inside `pathbar`. - thickness - Sets the thickness of `pathbar` (in px). If not - specified the `pathbar.textfont.size` is used - with 3 pixles extra padding on each side. - visible - Determines if the path bar is drawn i.e. - outside the trace `domain` and with one pixel - gap. """, ), **kwargs, diff --git a/plotly/validators/treemap/_root.py b/plotly/validators/treemap/_root.py index 402aedf94d..e7c970bbbf 100644 --- a/plotly/validators/treemap/_root.py +++ b/plotly/validators/treemap/_root.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RootValidator(_plotly_utils.basevalidators.CompoundValidator): +class RootValidator(_bv.CompoundValidator): def __init__(self, plotly_name="root", parent_name="treemap", **kwargs): - super(RootValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Root"), data_docs=kwargs.pop( "data_docs", """ - color - sets the color of the root node for a - sunburst/treemap/icicle trace. this has no - effect when a colorscale is used to set the - markers. """, ), **kwargs, diff --git a/plotly/validators/treemap/_sort.py b/plotly/validators/treemap/_sort.py index 87f940bd6f..1b483052f3 100644 --- a/plotly/validators/treemap/_sort.py +++ b/plotly/validators/treemap/_sort.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SortValidator(_plotly_utils.basevalidators.BooleanValidator): +class SortValidator(_bv.BooleanValidator): def __init__(self, plotly_name="sort", parent_name="treemap", **kwargs): - super(SortValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/_stream.py b/plotly/validators/treemap/_stream.py index f7ca95b2cf..c53c0876ea 100644 --- a/plotly/validators/treemap/_stream.py +++ b/plotly/validators/treemap/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="treemap", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/treemap/_text.py b/plotly/validators/treemap/_text.py index 626cf9f455..a1194ab145 100644 --- a/plotly/validators/treemap/_text.py +++ b/plotly/validators/treemap/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="text", parent_name="treemap", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/treemap/_textfont.py b/plotly/validators/treemap/_textfont.py index 11cfb9ae2e..8286dc25fb 100644 --- a/plotly/validators/treemap/_textfont.py +++ b/plotly/validators/treemap/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="treemap", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/treemap/_textinfo.py b/plotly/validators/treemap/_textinfo.py index 5f5703d88a..59dcce6c4d 100644 --- a/plotly/validators/treemap/_textinfo.py +++ b/plotly/validators/treemap/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="treemap", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop( diff --git a/plotly/validators/treemap/_textposition.py b/plotly/validators/treemap/_textposition.py index 35833de9fe..d5060f9244 100644 --- a/plotly/validators/treemap/_textposition.py +++ b/plotly/validators/treemap/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="treemap", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/treemap/_textsrc.py b/plotly/validators/treemap/_textsrc.py index e35b3df4ed..7229f193d9 100644 --- a/plotly/validators/treemap/_textsrc.py +++ b/plotly/validators/treemap/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="treemap", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_texttemplate.py b/plotly/validators/treemap/_texttemplate.py index b40a2c49e5..36384d941c 100644 --- a/plotly/validators/treemap/_texttemplate.py +++ b/plotly/validators/treemap/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="treemap", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/_texttemplatesrc.py b/plotly/validators/treemap/_texttemplatesrc.py index bd236d152e..752c6e1a41 100644 --- a/plotly/validators/treemap/_texttemplatesrc.py +++ b/plotly/validators/treemap/_texttemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="texttemplatesrc", parent_name="treemap", **kwargs): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_tiling.py b/plotly/validators/treemap/_tiling.py index 05a4ad290c..9ded0e9a7f 100644 --- a/plotly/validators/treemap/_tiling.py +++ b/plotly/validators/treemap/_tiling.py @@ -1,40 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TilingValidator(_plotly_utils.basevalidators.CompoundValidator): +class TilingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tiling", parent_name="treemap", **kwargs): - super(TilingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tiling"), data_docs=kwargs.pop( "data_docs", """ - flip - Determines if the positions obtained from - solver are flipped on each axis. - packing - Determines d3 treemap solver. For more info - please refer to - https://github.com/d3/d3-hierarchy#treemap- - tiling - pad - Sets the inner padding (in px). - squarifyratio - When using "squarify" `packing` algorithm, - according to https://github.com/d3/d3- - hierarchy/blob/v3.1.1/README.md#squarify_ratio - this option specifies the desired aspect ratio - of the generated rectangles. The ratio must be - specified as a number greater than or equal to - one. Note that the orientation of the generated - rectangles (tall or wide) is not implied by the - ratio; for example, a ratio of two will attempt - to produce a mixture of rectangles whose - width:height ratio is either 2:1 or 1:2. When - using "squarify", unlike d3 which uses the - Golden Ratio i.e. 1.618034, Plotly applies 1 to - increase squares in treemap layouts. """, ), **kwargs, diff --git a/plotly/validators/treemap/_uid.py b/plotly/validators/treemap/_uid.py index ed37173fa5..3639f602d8 100644 --- a/plotly/validators/treemap/_uid.py +++ b/plotly/validators/treemap/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="treemap", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, anim=kwargs.pop("anim", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/_uirevision.py b/plotly/validators/treemap/_uirevision.py index 4bc3edfbeb..5a27628af2 100644 --- a/plotly/validators/treemap/_uirevision.py +++ b/plotly/validators/treemap/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="treemap", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_values.py b/plotly/validators/treemap/_values.py index 8f7a016586..54a3f8afc6 100644 --- a/plotly/validators/treemap/_values.py +++ b/plotly/validators/treemap/_values.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValuesValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="values", parent_name="treemap", **kwargs): - super(ValuesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/_valuessrc.py b/plotly/validators/treemap/_valuessrc.py index bb04aeb3d3..6fde26d3d0 100644 --- a/plotly/validators/treemap/_valuessrc.py +++ b/plotly/validators/treemap/_valuessrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuessrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuessrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuessrc", parent_name="treemap", **kwargs): - super(ValuessrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/_visible.py b/plotly/validators/treemap/_visible.py index cbb269de2d..a309e61c22 100644 --- a/plotly/validators/treemap/_visible.py +++ b/plotly/validators/treemap/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="treemap", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/treemap/domain/__init__.py b/plotly/validators/treemap/domain/__init__.py index 67de5030d0..42827f1d1e 100644 --- a/plotly/validators/treemap/domain/__init__.py +++ b/plotly/validators/treemap/domain/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._y import YValidator - from ._x import XValidator - from ._row import RowValidator - from ._column import ColumnValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._y.YValidator", - "._x.XValidator", - "._row.RowValidator", - "._column.ColumnValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._y.YValidator", + "._x.XValidator", + "._row.RowValidator", + "._column.ColumnValidator", + ], +) diff --git a/plotly/validators/treemap/domain/_column.py b/plotly/validators/treemap/domain/_column.py index b97e4550ec..14440e4d27 100644 --- a/plotly/validators/treemap/domain/_column.py +++ b/plotly/validators/treemap/domain/_column.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): +class ColumnValidator(_bv.IntegerValidator): def __init__(self, plotly_name="column", parent_name="treemap.domain", **kwargs): - super(ColumnValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/domain/_row.py b/plotly/validators/treemap/domain/_row.py index 4235839a05..2c6f29c646 100644 --- a/plotly/validators/treemap/domain/_row.py +++ b/plotly/validators/treemap/domain/_row.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RowValidator(_plotly_utils.basevalidators.IntegerValidator): +class RowValidator(_bv.IntegerValidator): def __init__(self, plotly_name="row", parent_name="treemap.domain", **kwargs): - super(RowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/domain/_x.py b/plotly/validators/treemap/domain/_x.py index 462ab187fb..8abfc251f0 100644 --- a/plotly/validators/treemap/domain/_x.py +++ b/plotly/validators/treemap/domain/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class XValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="x", parent_name="treemap.domain", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/treemap/domain/_y.py b/plotly/validators/treemap/domain/_y.py index db2df3898c..d5d3556b9c 100644 --- a/plotly/validators/treemap/domain/_y.py +++ b/plotly/validators/treemap/domain/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class YValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="y", parent_name="treemap.domain", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/treemap/hoverlabel/__init__.py b/plotly/validators/treemap/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/treemap/hoverlabel/__init__.py +++ b/plotly/validators/treemap/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/treemap/hoverlabel/_align.py b/plotly/validators/treemap/hoverlabel/_align.py index 5830530f19..b2d485bdf8 100644 --- a/plotly/validators/treemap/hoverlabel/_align.py +++ b/plotly/validators/treemap/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="treemap.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/treemap/hoverlabel/_alignsrc.py b/plotly/validators/treemap/hoverlabel/_alignsrc.py index c1e193f41f..002b9c18b8 100644 --- a/plotly/validators/treemap/hoverlabel/_alignsrc.py +++ b/plotly/validators/treemap/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="treemap.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/_bgcolor.py b/plotly/validators/treemap/hoverlabel/_bgcolor.py index 24e6695eb4..fced3d148c 100644 --- a/plotly/validators/treemap/hoverlabel/_bgcolor.py +++ b/plotly/validators/treemap/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="treemap.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py b/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py index 56070a3d4b..45947ee630 100644 --- a/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/treemap/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="treemap.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/_bordercolor.py b/plotly/validators/treemap/hoverlabel/_bordercolor.py index 3e68627cd9..a215b35f5c 100644 --- a/plotly/validators/treemap/hoverlabel/_bordercolor.py +++ b/plotly/validators/treemap/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="treemap.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py b/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py index 7bc5ec2526..b21133924e 100644 --- a/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/treemap/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="treemap.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/_font.py b/plotly/validators/treemap/hoverlabel/_font.py index 72d9ca48de..d9a75ff4c4 100644 --- a/plotly/validators/treemap/hoverlabel/_font.py +++ b/plotly/validators/treemap/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="treemap.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/treemap/hoverlabel/_namelength.py b/plotly/validators/treemap/hoverlabel/_namelength.py index d6b7a48a38..fd418e4fa7 100644 --- a/plotly/validators/treemap/hoverlabel/_namelength.py +++ b/plotly/validators/treemap/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="treemap.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/treemap/hoverlabel/_namelengthsrc.py b/plotly/validators/treemap/hoverlabel/_namelengthsrc.py index 99eb258c22..f95df91cfa 100644 --- a/plotly/validators/treemap/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/treemap/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="treemap.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/__init__.py b/plotly/validators/treemap/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/treemap/hoverlabel/font/__init__.py +++ b/plotly/validators/treemap/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/hoverlabel/font/_color.py b/plotly/validators/treemap/hoverlabel/font/_color.py index e00913fb6e..344ebd1d60 100644 --- a/plotly/validators/treemap/hoverlabel/font/_color.py +++ b/plotly/validators/treemap/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/treemap/hoverlabel/font/_colorsrc.py b/plotly/validators/treemap/hoverlabel/font/_colorsrc.py index 4bb309d3e7..1229822b21 100644 --- a/plotly/validators/treemap/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_family.py b/plotly/validators/treemap/hoverlabel/font/_family.py index d40e4b0a80..17062afa78 100644 --- a/plotly/validators/treemap/hoverlabel/font/_family.py +++ b/plotly/validators/treemap/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/treemap/hoverlabel/font/_familysrc.py b/plotly/validators/treemap/hoverlabel/font/_familysrc.py index ac1944324a..7d5c0a05c4 100644 --- a/plotly/validators/treemap/hoverlabel/font/_familysrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_lineposition.py b/plotly/validators/treemap/hoverlabel/font/_lineposition.py index 0b41d08c68..671df0be2e 100644 --- a/plotly/validators/treemap/hoverlabel/font/_lineposition.py +++ b/plotly/validators/treemap/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/treemap/hoverlabel/font/_linepositionsrc.py b/plotly/validators/treemap/hoverlabel/font/_linepositionsrc.py index b22ee6e3d2..793e33777b 100644 --- a/plotly/validators/treemap/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="treemap.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_shadow.py b/plotly/validators/treemap/hoverlabel/font/_shadow.py index 0e4f9d055f..978758aaf4 100644 --- a/plotly/validators/treemap/hoverlabel/font/_shadow.py +++ b/plotly/validators/treemap/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/treemap/hoverlabel/font/_shadowsrc.py b/plotly/validators/treemap/hoverlabel/font/_shadowsrc.py index 5f274e47e5..e1917867cf 100644 --- a/plotly/validators/treemap/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_size.py b/plotly/validators/treemap/hoverlabel/font/_size.py index 08cfc9c6aa..b58873668e 100644 --- a/plotly/validators/treemap/hoverlabel/font/_size.py +++ b/plotly/validators/treemap/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/treemap/hoverlabel/font/_sizesrc.py b/plotly/validators/treemap/hoverlabel/font/_sizesrc.py index c7f8dbfeae..d3a90bfd79 100644 --- a/plotly/validators/treemap/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_style.py b/plotly/validators/treemap/hoverlabel/font/_style.py index d43aee8afe..1a0ac4eb72 100644 --- a/plotly/validators/treemap/hoverlabel/font/_style.py +++ b/plotly/validators/treemap/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/treemap/hoverlabel/font/_stylesrc.py b/plotly/validators/treemap/hoverlabel/font/_stylesrc.py index be3fd2cd5e..4c314e33e8 100644 --- a/plotly/validators/treemap/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_textcase.py b/plotly/validators/treemap/hoverlabel/font/_textcase.py index 7f307f286f..85a835a798 100644 --- a/plotly/validators/treemap/hoverlabel/font/_textcase.py +++ b/plotly/validators/treemap/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/treemap/hoverlabel/font/_textcasesrc.py b/plotly/validators/treemap/hoverlabel/font/_textcasesrc.py index 931e56b28b..aefcaa0351 100644 --- a/plotly/validators/treemap/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_variant.py b/plotly/validators/treemap/hoverlabel/font/_variant.py index f716a9f339..c766969d75 100644 --- a/plotly/validators/treemap/hoverlabel/font/_variant.py +++ b/plotly/validators/treemap/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/treemap/hoverlabel/font/_variantsrc.py b/plotly/validators/treemap/hoverlabel/font/_variantsrc.py index 247e80448e..0f21fcf3eb 100644 --- a/plotly/validators/treemap/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/hoverlabel/font/_weight.py b/plotly/validators/treemap/hoverlabel/font/_weight.py index b28b2cf121..70ac26d480 100644 --- a/plotly/validators/treemap/hoverlabel/font/_weight.py +++ b/plotly/validators/treemap/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/treemap/hoverlabel/font/_weightsrc.py b/plotly/validators/treemap/hoverlabel/font/_weightsrc.py index 087aaff229..d8f5878398 100644 --- a/plotly/validators/treemap/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/treemap/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="treemap.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/__init__.py b/plotly/validators/treemap/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/treemap/insidetextfont/__init__.py +++ b/plotly/validators/treemap/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/insidetextfont/_color.py b/plotly/validators/treemap/insidetextfont/_color.py index e3fac707c4..369f11163b 100644 --- a/plotly/validators/treemap/insidetextfont/_color.py +++ b/plotly/validators/treemap/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/insidetextfont/_colorsrc.py b/plotly/validators/treemap/insidetextfont/_colorsrc.py index 4fb5ba1f0b..e515e400ba 100644 --- a/plotly/validators/treemap/insidetextfont/_colorsrc.py +++ b/plotly/validators/treemap/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="treemap.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_family.py b/plotly/validators/treemap/insidetextfont/_family.py index 8799e1f010..2c2bd06bf2 100644 --- a/plotly/validators/treemap/insidetextfont/_family.py +++ b/plotly/validators/treemap/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/treemap/insidetextfont/_familysrc.py b/plotly/validators/treemap/insidetextfont/_familysrc.py index f16f905dab..ac268af5fc 100644 --- a/plotly/validators/treemap/insidetextfont/_familysrc.py +++ b/plotly/validators/treemap/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="treemap.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_lineposition.py b/plotly/validators/treemap/insidetextfont/_lineposition.py index 514bd006d7..f09a78af30 100644 --- a/plotly/validators/treemap/insidetextfont/_lineposition.py +++ b/plotly/validators/treemap/insidetextfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.insidetextfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/treemap/insidetextfont/_linepositionsrc.py b/plotly/validators/treemap/insidetextfont/_linepositionsrc.py index 4103cda55d..6562d95091 100644 --- a/plotly/validators/treemap/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/treemap/insidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="treemap.insidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_shadow.py b/plotly/validators/treemap/insidetextfont/_shadow.py index 6f71c97d10..01fddab89e 100644 --- a/plotly/validators/treemap/insidetextfont/_shadow.py +++ b/plotly/validators/treemap/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/insidetextfont/_shadowsrc.py b/plotly/validators/treemap/insidetextfont/_shadowsrc.py index 76a299d3d9..a7d1f1751e 100644 --- a/plotly/validators/treemap/insidetextfont/_shadowsrc.py +++ b/plotly/validators/treemap/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="treemap.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_size.py b/plotly/validators/treemap/insidetextfont/_size.py index 0a02969d5c..b783686b09 100644 --- a/plotly/validators/treemap/insidetextfont/_size.py +++ b/plotly/validators/treemap/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/treemap/insidetextfont/_sizesrc.py b/plotly/validators/treemap/insidetextfont/_sizesrc.py index e451da2908..eb6fda86a1 100644 --- a/plotly/validators/treemap/insidetextfont/_sizesrc.py +++ b/plotly/validators/treemap/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="treemap.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_style.py b/plotly/validators/treemap/insidetextfont/_style.py index 696c745301..8af1da9f44 100644 --- a/plotly/validators/treemap/insidetextfont/_style.py +++ b/plotly/validators/treemap/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/treemap/insidetextfont/_stylesrc.py b/plotly/validators/treemap/insidetextfont/_stylesrc.py index b7e0fbf448..d6d0da29d9 100644 --- a/plotly/validators/treemap/insidetextfont/_stylesrc.py +++ b/plotly/validators/treemap/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="treemap.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_textcase.py b/plotly/validators/treemap/insidetextfont/_textcase.py index fe321302ee..82ad93b889 100644 --- a/plotly/validators/treemap/insidetextfont/_textcase.py +++ b/plotly/validators/treemap/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/treemap/insidetextfont/_textcasesrc.py b/plotly/validators/treemap/insidetextfont/_textcasesrc.py index 3f8b5c23d3..1f1dcb2da2 100644 --- a/plotly/validators/treemap/insidetextfont/_textcasesrc.py +++ b/plotly/validators/treemap/insidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="treemap.insidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_variant.py b/plotly/validators/treemap/insidetextfont/_variant.py index 53bb20d849..02f78e953a 100644 --- a/plotly/validators/treemap/insidetextfont/_variant.py +++ b/plotly/validators/treemap/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/treemap/insidetextfont/_variantsrc.py b/plotly/validators/treemap/insidetextfont/_variantsrc.py index 5a6c791dc1..337bd75ef7 100644 --- a/plotly/validators/treemap/insidetextfont/_variantsrc.py +++ b/plotly/validators/treemap/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="treemap.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/insidetextfont/_weight.py b/plotly/validators/treemap/insidetextfont/_weight.py index 29c1a41a9b..9aacd95477 100644 --- a/plotly/validators/treemap/insidetextfont/_weight.py +++ b/plotly/validators/treemap/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/treemap/insidetextfont/_weightsrc.py b/plotly/validators/treemap/insidetextfont/_weightsrc.py index f7193b830d..1a1342c0cc 100644 --- a/plotly/validators/treemap/insidetextfont/_weightsrc.py +++ b/plotly/validators/treemap/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="treemap.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/legendgrouptitle/__init__.py b/plotly/validators/treemap/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/treemap/legendgrouptitle/__init__.py +++ b/plotly/validators/treemap/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/treemap/legendgrouptitle/_font.py b/plotly/validators/treemap/legendgrouptitle/_font.py index b3569cd234..23f296d41a 100644 --- a/plotly/validators/treemap/legendgrouptitle/_font.py +++ b/plotly/validators/treemap/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="treemap.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/treemap/legendgrouptitle/_text.py b/plotly/validators/treemap/legendgrouptitle/_text.py index 2b4c6c493b..16f3523dcf 100644 --- a/plotly/validators/treemap/legendgrouptitle/_text.py +++ b/plotly/validators/treemap/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="treemap.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/treemap/legendgrouptitle/font/__init__.py b/plotly/validators/treemap/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/__init__.py +++ b/plotly/validators/treemap/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/legendgrouptitle/font/_color.py b/plotly/validators/treemap/legendgrouptitle/font/_color.py index 0458f8e1c2..4f2c64fc41 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_color.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/treemap/legendgrouptitle/font/_family.py b/plotly/validators/treemap/legendgrouptitle/font/_family.py index fd3217bbed..a8fc5d6955 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_family.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/treemap/legendgrouptitle/font/_lineposition.py b/plotly/validators/treemap/legendgrouptitle/font/_lineposition.py index 9f87182ccb..719a1f00c7 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/treemap/legendgrouptitle/font/_shadow.py b/plotly/validators/treemap/legendgrouptitle/font/_shadow.py index 9f30a8e6a1..2bbbb928f2 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/treemap/legendgrouptitle/font/_size.py b/plotly/validators/treemap/legendgrouptitle/font/_size.py index 4e1ba623a3..03a39069fd 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_size.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/treemap/legendgrouptitle/font/_style.py b/plotly/validators/treemap/legendgrouptitle/font/_style.py index 37feb4dbaf..c2304dc2d7 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_style.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/treemap/legendgrouptitle/font/_textcase.py b/plotly/validators/treemap/legendgrouptitle/font/_textcase.py index 4103fba932..f39ee076b0 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/treemap/legendgrouptitle/font/_variant.py b/plotly/validators/treemap/legendgrouptitle/font/_variant.py index 76cb54159b..4b47b5771e 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_variant.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/treemap/legendgrouptitle/font/_weight.py b/plotly/validators/treemap/legendgrouptitle/font/_weight.py index ced3a1d80f..93bffa0e2e 100644 --- a/plotly/validators/treemap/legendgrouptitle/font/_weight.py +++ b/plotly/validators/treemap/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/treemap/marker/__init__.py b/plotly/validators/treemap/marker/__init__.py index a0aa062ffc..425c1416cf 100644 --- a/plotly/validators/treemap/marker/__init__.py +++ b/plotly/validators/treemap/marker/__init__.py @@ -1,47 +1,26 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._showscale import ShowscaleValidator - from ._reversescale import ReversescaleValidator - from ._pattern import PatternValidator - from ._pad import PadValidator - from ._line import LineValidator - from ._depthfade import DepthfadeValidator - from ._cornerradius import CornerradiusValidator - from ._colorssrc import ColorssrcValidator - from ._colorscale import ColorscaleValidator - from ._colors import ColorsValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._showscale.ShowscaleValidator", - "._reversescale.ReversescaleValidator", - "._pattern.PatternValidator", - "._pad.PadValidator", - "._line.LineValidator", - "._depthfade.DepthfadeValidator", - "._cornerradius.CornerradiusValidator", - "._colorssrc.ColorssrcValidator", - "._colorscale.ColorscaleValidator", - "._colors.ColorsValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._showscale.ShowscaleValidator", + "._reversescale.ReversescaleValidator", + "._pattern.PatternValidator", + "._pad.PadValidator", + "._line.LineValidator", + "._depthfade.DepthfadeValidator", + "._cornerradius.CornerradiusValidator", + "._colorssrc.ColorssrcValidator", + "._colorscale.ColorscaleValidator", + "._colors.ColorsValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/treemap/marker/_autocolorscale.py b/plotly/validators/treemap/marker/_autocolorscale.py index 096523641e..8cefed7ef6 100644 --- a/plotly/validators/treemap/marker/_autocolorscale.py +++ b/plotly/validators/treemap/marker/_autocolorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="autocolorscale", parent_name="treemap.marker", **kwargs ): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/treemap/marker/_cauto.py b/plotly/validators/treemap/marker/_cauto.py index 5a30104bf8..b4c2707ec3 100644 --- a/plotly/validators/treemap/marker/_cauto.py +++ b/plotly/validators/treemap/marker/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="treemap.marker", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/treemap/marker/_cmax.py b/plotly/validators/treemap/marker/_cmax.py index 691f37e2e3..2ba06cab99 100644 --- a/plotly/validators/treemap/marker/_cmax.py +++ b/plotly/validators/treemap/marker/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="treemap.marker", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/treemap/marker/_cmid.py b/plotly/validators/treemap/marker/_cmid.py index 5fa73d39e5..a72837d783 100644 --- a/plotly/validators/treemap/marker/_cmid.py +++ b/plotly/validators/treemap/marker/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="treemap.marker", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/treemap/marker/_cmin.py b/plotly/validators/treemap/marker/_cmin.py index 0d84ad14df..417acc35f8 100644 --- a/plotly/validators/treemap/marker/_cmin.py +++ b/plotly/validators/treemap/marker/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="treemap.marker", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/treemap/marker/_coloraxis.py b/plotly/validators/treemap/marker/_coloraxis.py index 1537fac85f..85e10645f4 100644 --- a/plotly/validators/treemap/marker/_coloraxis.py +++ b/plotly/validators/treemap/marker/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="treemap.marker", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/treemap/marker/_colorbar.py b/plotly/validators/treemap/marker/_colorbar.py index f021987e8c..d647218b6d 100644 --- a/plotly/validators/treemap/marker/_colorbar.py +++ b/plotly/validators/treemap/marker/_colorbar.py @@ -1,279 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="treemap.marker", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.treemap - .marker.colorbar.Tickformatstop` instances or - dicts with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.treemap.marker.colorbar.tickformatstopdefault - s), sets the default property values to use for - elements of - treemap.marker.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.treemap.marker.col - orbar.Title` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/_colors.py b/plotly/validators/treemap/marker/_colors.py index 8f93057437..4fafc7538b 100644 --- a/plotly/validators/treemap/marker/_colors.py +++ b/plotly/validators/treemap/marker/_colors.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ColorsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="colors", parent_name="treemap.marker", **kwargs): - super(ColorsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/_colorscale.py b/plotly/validators/treemap/marker/_colorscale.py index b66e87e282..f8f6e20503 100644 --- a/plotly/validators/treemap/marker/_colorscale.py +++ b/plotly/validators/treemap/marker/_colorscale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__( self, plotly_name="colorscale", parent_name="treemap.marker", **kwargs ): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/treemap/marker/_colorssrc.py b/plotly/validators/treemap/marker/_colorssrc.py index 147ddb5bb2..b86819d6ff 100644 --- a/plotly/validators/treemap/marker/_colorssrc.py +++ b/plotly/validators/treemap/marker/_colorssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="colorssrc", parent_name="treemap.marker", **kwargs): - super(ColorssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/_cornerradius.py b/plotly/validators/treemap/marker/_cornerradius.py index 08e621567c..148d072e68 100644 --- a/plotly/validators/treemap/marker/_cornerradius.py +++ b/plotly/validators/treemap/marker/_cornerradius.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CornerradiusValidator(_plotly_utils.basevalidators.NumberValidator): +class CornerradiusValidator(_bv.NumberValidator): def __init__( self, plotly_name="cornerradius", parent_name="treemap.marker", **kwargs ): - super(CornerradiusValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/_depthfade.py b/plotly/validators/treemap/marker/_depthfade.py index 4243a6ca44..9bbf728a9a 100644 --- a/plotly/validators/treemap/marker/_depthfade.py +++ b/plotly/validators/treemap/marker/_depthfade.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DepthfadeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class DepthfadeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="depthfade", parent_name="treemap.marker", **kwargs): - super(DepthfadeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", [True, False, "reversed"]), **kwargs, diff --git a/plotly/validators/treemap/marker/_line.py b/plotly/validators/treemap/marker/_line.py index 4c462bfc3c..6289381a0a 100644 --- a/plotly/validators/treemap/marker/_line.py +++ b/plotly/validators/treemap/marker/_line.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="treemap.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the line enclosing each - sector. Defaults to the `paper_bgcolor` value. - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - width - Sets the width (in px) of the line enclosing - each sector. - widthsrc - Sets the source reference on Chart Studio Cloud - for `width`. """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/_pad.py b/plotly/validators/treemap/marker/_pad.py index 67133de07c..7048637b8f 100644 --- a/plotly/validators/treemap/marker/_pad.py +++ b/plotly/validators/treemap/marker/_pad.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.CompoundValidator): +class PadValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pad", parent_name="treemap.marker", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pad"), data_docs=kwargs.pop( "data_docs", """ - b - Sets the padding form the bottom (in px). - l - Sets the padding form the left (in px). - r - Sets the padding form the right (in px). - t - Sets the padding form the top (in px). """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/_pattern.py b/plotly/validators/treemap/marker/_pattern.py index 1aa5b1960d..1496778d62 100644 --- a/plotly/validators/treemap/marker/_pattern.py +++ b/plotly/validators/treemap/marker/_pattern.py @@ -1,63 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.CompoundValidator): +class PatternValidator(_bv.CompoundValidator): def __init__(self, plotly_name="pattern", parent_name="treemap.marker", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Pattern"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - When there is no colorscale sets the color of - background pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "overlay". Otherwise, defaults to a transparent - background. - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - fgcolor - When there is no colorscale sets the color of - foreground pattern fill. Defaults to a - `marker.color` background when `fillmode` is - "replace". Otherwise, defaults to dark grey or - white to increase contrast with the `bgcolor`. - fgcolorsrc - Sets the source reference on Chart Studio Cloud - for `fgcolor`. - fgopacity - Sets the opacity of the foreground pattern - fill. Defaults to a 0.5 when `fillmode` is - "overlay". Otherwise, defaults to 1. - fillmode - Determines whether `marker.color` should be - used as a default to `bgcolor` or a `fgcolor`. - shape - Sets the shape of the pattern fill. By default, - no pattern is used for filling the area. - shapesrc - Sets the source reference on Chart Studio Cloud - for `shape`. - size - Sets the size of unit squares of the pattern - fill in pixels, which corresponds to the - interval of repetition of the pattern. - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - solidity - Sets the solidity of the pattern fill. Solidity - is roughly the fraction of the area filled by - the pattern. Solidity of 0 shows only the - background color without pattern and solidty of - 1 shows only the foreground color without - pattern. - soliditysrc - Sets the source reference on Chart Studio Cloud - for `solidity`. """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/_reversescale.py b/plotly/validators/treemap/marker/_reversescale.py index b8d234af3a..a51a7c1eaf 100644 --- a/plotly/validators/treemap/marker/_reversescale.py +++ b/plotly/validators/treemap/marker/_reversescale.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="reversescale", parent_name="treemap.marker", **kwargs ): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/_showscale.py b/plotly/validators/treemap/marker/_showscale.py index e516392f6e..ee05e8352b 100644 --- a/plotly/validators/treemap/marker/_showscale.py +++ b/plotly/validators/treemap/marker/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="treemap.marker", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/__init__.py b/plotly/validators/treemap/marker/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/treemap/marker/colorbar/__init__.py +++ b/plotly/validators/treemap/marker/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/treemap/marker/colorbar/_bgcolor.py b/plotly/validators/treemap/marker/colorbar/_bgcolor.py index 8c8596e994..4c11d047b4 100644 --- a/plotly/validators/treemap/marker/colorbar/_bgcolor.py +++ b/plotly/validators/treemap/marker/colorbar/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="treemap.marker.colorbar", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_bordercolor.py b/plotly/validators/treemap/marker/colorbar/_bordercolor.py index 0317692835..c9dd2435e5 100644 --- a/plotly/validators/treemap/marker/colorbar/_bordercolor.py +++ b/plotly/validators/treemap/marker/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="treemap.marker.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_borderwidth.py b/plotly/validators/treemap/marker/colorbar/_borderwidth.py index 7a7b956d75..a67c20b436 100644 --- a/plotly/validators/treemap/marker/colorbar/_borderwidth.py +++ b/plotly/validators/treemap/marker/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="treemap.marker.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_dtick.py b/plotly/validators/treemap/marker/colorbar/_dtick.py index 87a1da03ad..890f41278f 100644 --- a/plotly/validators/treemap/marker/colorbar/_dtick.py +++ b/plotly/validators/treemap/marker/colorbar/_dtick.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__( self, plotly_name="dtick", parent_name="treemap.marker.colorbar", **kwargs ): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_exponentformat.py b/plotly/validators/treemap/marker/colorbar/_exponentformat.py index 018252d33f..536da823d3 100644 --- a/plotly/validators/treemap/marker/colorbar/_exponentformat.py +++ b/plotly/validators/treemap/marker/colorbar/_exponentformat.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="treemap.marker.colorbar", **kwargs, ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_labelalias.py b/plotly/validators/treemap/marker/colorbar/_labelalias.py index 2e93219223..b2f675456c 100644 --- a/plotly/validators/treemap/marker/colorbar/_labelalias.py +++ b/plotly/validators/treemap/marker/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="treemap.marker.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_len.py b/plotly/validators/treemap/marker/colorbar/_len.py index 2657cfaf35..97f81071ad 100644 --- a/plotly/validators/treemap/marker/colorbar/_len.py +++ b/plotly/validators/treemap/marker/colorbar/_len.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__( self, plotly_name="len", parent_name="treemap.marker.colorbar", **kwargs ): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_lenmode.py b/plotly/validators/treemap/marker/colorbar/_lenmode.py index e9ed8ca551..771dabc26c 100644 --- a/plotly/validators/treemap/marker/colorbar/_lenmode.py +++ b/plotly/validators/treemap/marker/colorbar/_lenmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="treemap.marker.colorbar", **kwargs ): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_minexponent.py b/plotly/validators/treemap/marker/colorbar/_minexponent.py index b6c4d269cd..84c755dd13 100644 --- a/plotly/validators/treemap/marker/colorbar/_minexponent.py +++ b/plotly/validators/treemap/marker/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="treemap.marker.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_nticks.py b/plotly/validators/treemap/marker/colorbar/_nticks.py index ac93f7d4eb..dd45baac94 100644 --- a/plotly/validators/treemap/marker/colorbar/_nticks.py +++ b/plotly/validators/treemap/marker/colorbar/_nticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="treemap.marker.colorbar", **kwargs ): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_orientation.py b/plotly/validators/treemap/marker/colorbar/_orientation.py index f29fb8a35c..0a8745f0c9 100644 --- a/plotly/validators/treemap/marker/colorbar/_orientation.py +++ b/plotly/validators/treemap/marker/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="treemap.marker.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_outlinecolor.py b/plotly/validators/treemap/marker/colorbar/_outlinecolor.py index 01b5ddb1fd..84643cce64 100644 --- a/plotly/validators/treemap/marker/colorbar/_outlinecolor.py +++ b/plotly/validators/treemap/marker/colorbar/_outlinecolor.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="treemap.marker.colorbar", **kwargs, ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_outlinewidth.py b/plotly/validators/treemap/marker/colorbar/_outlinewidth.py index 646db75d19..d1619eea71 100644 --- a/plotly/validators/treemap/marker/colorbar/_outlinewidth.py +++ b/plotly/validators/treemap/marker/colorbar/_outlinewidth.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="treemap.marker.colorbar", **kwargs, ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_separatethousands.py b/plotly/validators/treemap/marker/colorbar/_separatethousands.py index 707d045fe9..9d6868b8d1 100644 --- a/plotly/validators/treemap/marker/colorbar/_separatethousands.py +++ b/plotly/validators/treemap/marker/colorbar/_separatethousands.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="treemap.marker.colorbar", **kwargs, ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_showexponent.py b/plotly/validators/treemap/marker/colorbar/_showexponent.py index 38de4ffbb1..6476bbc87e 100644 --- a/plotly/validators/treemap/marker/colorbar/_showexponent.py +++ b/plotly/validators/treemap/marker/colorbar/_showexponent.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="treemap.marker.colorbar", **kwargs, ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_showticklabels.py b/plotly/validators/treemap/marker/colorbar/_showticklabels.py index 1a8a62919c..9c194d9a8d 100644 --- a/plotly/validators/treemap/marker/colorbar/_showticklabels.py +++ b/plotly/validators/treemap/marker/colorbar/_showticklabels.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="treemap.marker.colorbar", **kwargs, ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_showtickprefix.py b/plotly/validators/treemap/marker/colorbar/_showtickprefix.py index c88d4a1318..57e2b05518 100644 --- a/plotly/validators/treemap/marker/colorbar/_showtickprefix.py +++ b/plotly/validators/treemap/marker/colorbar/_showtickprefix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="treemap.marker.colorbar", **kwargs, ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_showticksuffix.py b/plotly/validators/treemap/marker/colorbar/_showticksuffix.py index c9432f1d2a..c30a1679cb 100644 --- a/plotly/validators/treemap/marker/colorbar/_showticksuffix.py +++ b/plotly/validators/treemap/marker/colorbar/_showticksuffix.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="treemap.marker.colorbar", **kwargs, ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_thickness.py b/plotly/validators/treemap/marker/colorbar/_thickness.py index 91ce3727ff..5c58c52022 100644 --- a/plotly/validators/treemap/marker/colorbar/_thickness.py +++ b/plotly/validators/treemap/marker/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="treemap.marker.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_thicknessmode.py b/plotly/validators/treemap/marker/colorbar/_thicknessmode.py index 805db8949d..c8264dbf79 100644 --- a/plotly/validators/treemap/marker/colorbar/_thicknessmode.py +++ b/plotly/validators/treemap/marker/colorbar/_thicknessmode.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="treemap.marker.colorbar", **kwargs, ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_tick0.py b/plotly/validators/treemap/marker/colorbar/_tick0.py index ed596ff3bb..90992c15a6 100644 --- a/plotly/validators/treemap/marker/colorbar/_tick0.py +++ b/plotly/validators/treemap/marker/colorbar/_tick0.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__( self, plotly_name="tick0", parent_name="treemap.marker.colorbar", **kwargs ): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_tickangle.py b/plotly/validators/treemap/marker/colorbar/_tickangle.py index 1e7b4543ab..533961185e 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickangle.py +++ b/plotly/validators/treemap/marker/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_tickcolor.py b/plotly/validators/treemap/marker/colorbar/_tickcolor.py index 0e713c4581..ed35236989 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickcolor.py +++ b/plotly/validators/treemap/marker/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_tickfont.py b/plotly/validators/treemap/marker/colorbar/_tickfont.py index 310740f714..75667d7213 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickfont.py +++ b/plotly/validators/treemap/marker/colorbar/_tickfont.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickfont", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_tickformat.py b/plotly/validators/treemap/marker/colorbar/_tickformat.py index 57cd524410..3ca0c9122d 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickformat.py +++ b/plotly/validators/treemap/marker/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py b/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py index e703dc0fc7..2979dfb617 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/treemap/marker/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="treemap.marker.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/treemap/marker/colorbar/_tickformatstops.py b/plotly/validators/treemap/marker/colorbar/_tickformatstops.py index c964355264..aec4fcee68 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickformatstops.py +++ b/plotly/validators/treemap/marker/colorbar/_tickformatstops.py @@ -1,53 +1,20 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="treemap.marker.colorbar", **kwargs, ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_ticklabeloverflow.py b/plotly/validators/treemap/marker/colorbar/_ticklabeloverflow.py index 4376eaa89d..9395075013 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/treemap/marker/colorbar/_ticklabeloverflow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="treemap.marker.colorbar", **kwargs, ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_ticklabelposition.py b/plotly/validators/treemap/marker/colorbar/_ticklabelposition.py index 9159ba7e57..f20679320a 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticklabelposition.py +++ b/plotly/validators/treemap/marker/colorbar/_ticklabelposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="treemap.marker.colorbar", **kwargs, ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/treemap/marker/colorbar/_ticklabelstep.py b/plotly/validators/treemap/marker/colorbar/_ticklabelstep.py index ba8246f3d0..2cecd6a060 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticklabelstep.py +++ b/plotly/validators/treemap/marker/colorbar/_ticklabelstep.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="treemap.marker.colorbar", **kwargs, ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_ticklen.py b/plotly/validators/treemap/marker/colorbar/_ticklen.py index 30b0b7cb3a..dc90ec9dec 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticklen.py +++ b/plotly/validators/treemap/marker/colorbar/_ticklen.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__( self, plotly_name="ticklen", parent_name="treemap.marker.colorbar", **kwargs ): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_tickmode.py b/plotly/validators/treemap/marker/colorbar/_tickmode.py index c3bce82de0..4a11a597db 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickmode.py +++ b/plotly/validators/treemap/marker/colorbar/_tickmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="tickmode", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/treemap/marker/colorbar/_tickprefix.py b/plotly/validators/treemap/marker/colorbar/_tickprefix.py index 52b422102c..a5fab77801 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickprefix.py +++ b/plotly/validators/treemap/marker/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_ticks.py b/plotly/validators/treemap/marker/colorbar/_ticks.py index 56930e49ad..f2c92dd6cd 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticks.py +++ b/plotly/validators/treemap/marker/colorbar/_ticks.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticks", parent_name="treemap.marker.colorbar", **kwargs ): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_ticksuffix.py b/plotly/validators/treemap/marker/colorbar/_ticksuffix.py index e4682a54d6..17152786a2 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticksuffix.py +++ b/plotly/validators/treemap/marker/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="treemap.marker.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_ticktext.py b/plotly/validators/treemap/marker/colorbar/_ticktext.py index 289e163246..65ecf60432 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticktext.py +++ b/plotly/validators/treemap/marker/colorbar/_ticktext.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="ticktext", parent_name="treemap.marker.colorbar", **kwargs ): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py b/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py index 53c05815ac..872a638bb8 100644 --- a/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py +++ b/plotly/validators/treemap/marker/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="treemap.marker.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_tickvals.py b/plotly/validators/treemap/marker/colorbar/_tickvals.py index cabfe7083d..388de41ba2 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickvals.py +++ b/plotly/validators/treemap/marker/colorbar/_tickvals.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="tickvals", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py b/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py index 56033a1dae..1bfc2fef88 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py +++ b/plotly/validators/treemap/marker/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_tickwidth.py b/plotly/validators/treemap/marker/colorbar/_tickwidth.py index 841899b42d..5fe0142371 100644 --- a/plotly/validators/treemap/marker/colorbar/_tickwidth.py +++ b/plotly/validators/treemap/marker/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="treemap.marker.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_title.py b/plotly/validators/treemap/marker/colorbar/_title.py index 9bec545dbb..6235fbe9a0 100644 --- a/plotly/validators/treemap/marker/colorbar/_title.py +++ b/plotly/validators/treemap/marker/colorbar/_title.py @@ -1,26 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__( self, plotly_name="title", parent_name="treemap.marker.colorbar", **kwargs ): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_x.py b/plotly/validators/treemap/marker/colorbar/_x.py index 88f3c88bfc..8b242c7bae 100644 --- a/plotly/validators/treemap/marker/colorbar/_x.py +++ b/plotly/validators/treemap/marker/colorbar/_x.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__( self, plotly_name="x", parent_name="treemap.marker.colorbar", **kwargs ): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_xanchor.py b/plotly/validators/treemap/marker/colorbar/_xanchor.py index 2bd9a2ce44..bc2cd360cd 100644 --- a/plotly/validators/treemap/marker/colorbar/_xanchor.py +++ b/plotly/validators/treemap/marker/colorbar/_xanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xanchor", parent_name="treemap.marker.colorbar", **kwargs ): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_xpad.py b/plotly/validators/treemap/marker/colorbar/_xpad.py index a4dc58f69a..68ae095f36 100644 --- a/plotly/validators/treemap/marker/colorbar/_xpad.py +++ b/plotly/validators/treemap/marker/colorbar/_xpad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="xpad", parent_name="treemap.marker.colorbar", **kwargs ): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_xref.py b/plotly/validators/treemap/marker/colorbar/_xref.py index 9e910d89ee..b734e555f7 100644 --- a/plotly/validators/treemap/marker/colorbar/_xref.py +++ b/plotly/validators/treemap/marker/colorbar/_xref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xref", parent_name="treemap.marker.colorbar", **kwargs ): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_y.py b/plotly/validators/treemap/marker/colorbar/_y.py index cf2f28bc1e..4396a55242 100644 --- a/plotly/validators/treemap/marker/colorbar/_y.py +++ b/plotly/validators/treemap/marker/colorbar/_y.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__( self, plotly_name="y", parent_name="treemap.marker.colorbar", **kwargs ): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/_yanchor.py b/plotly/validators/treemap/marker/colorbar/_yanchor.py index a647f36fe1..970b64374b 100644 --- a/plotly/validators/treemap/marker/colorbar/_yanchor.py +++ b/plotly/validators/treemap/marker/colorbar/_yanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="treemap.marker.colorbar", **kwargs ): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_ypad.py b/plotly/validators/treemap/marker/colorbar/_ypad.py index f4c4519edf..8734166666 100644 --- a/plotly/validators/treemap/marker/colorbar/_ypad.py +++ b/plotly/validators/treemap/marker/colorbar/_ypad.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__( self, plotly_name="ypad", parent_name="treemap.marker.colorbar", **kwargs ): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/_yref.py b/plotly/validators/treemap/marker/colorbar/_yref.py index 023d4c991a..6bf0ab3bcd 100644 --- a/plotly/validators/treemap/marker/colorbar/_yref.py +++ b/plotly/validators/treemap/marker/colorbar/_yref.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yref", parent_name="treemap.marker.colorbar", **kwargs ): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py b/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_color.py b/plotly/validators/treemap/marker/colorbar/tickfont/_color.py index ab6b92646e..83ec38976f 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_color.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_family.py b/plotly/validators/treemap/marker/colorbar/tickfont/_family.py index ffe222f9fa..8b5c4b568a 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_family.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_lineposition.py b/plotly/validators/treemap/marker/colorbar/tickfont/_lineposition.py index 500feadeb6..fbc2174a9d 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_shadow.py b/plotly/validators/treemap/marker/colorbar/tickfont/_shadow.py index 0b1ff33fb6..bc6f0170e5 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_shadow.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_size.py b/plotly/validators/treemap/marker/colorbar/tickfont/_size.py index 39900a11d8..41bf633457 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_size.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_style.py b/plotly/validators/treemap/marker/colorbar/tickfont/_style.py index 7310b5056d..25004422af 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_style.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_textcase.py b/plotly/validators/treemap/marker/colorbar/tickfont/_textcase.py index a6bbadc6f6..ec53b9e018 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_textcase.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_variant.py b/plotly/validators/treemap/marker/colorbar/tickfont/_variant.py index 0906b37710..fdc2f69551 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_variant.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/treemap/marker/colorbar/tickfont/_weight.py b/plotly/validators/treemap/marker/colorbar/tickfont/_weight.py index a43bbf41a8..b6109538f6 100644 --- a/plotly/validators/treemap/marker/colorbar/tickfont/_weight.py +++ b/plotly/validators/treemap/marker/colorbar/tickfont/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.marker.colorbar.tickfont", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py b/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/treemap/marker/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py index 4cc727cdba..a4cee79e36 100644 --- a/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/treemap/marker/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="treemap.marker.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), items=kwargs.pop( "items", diff --git a/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py b/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py index a40b16e3bc..a7ea52bfb8 100644 --- a/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/treemap/marker/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="treemap.marker.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py b/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py index e352bda9fb..60997c94d3 100644 --- a/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py +++ b/plotly/validators/treemap/marker/colorbar/tickformatstop/_name.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="treemap.marker.colorbar.tickformatstop", **kwargs, ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py index 0c43a49354..b9c04f0ca6 100644 --- a/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/treemap/marker/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="treemap.marker.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py b/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py index f37b30ad6e..ef9c77795c 100644 --- a/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py +++ b/plotly/validators/treemap/marker/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="treemap.marker.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/title/__init__.py b/plotly/validators/treemap/marker/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/treemap/marker/colorbar/title/__init__.py +++ b/plotly/validators/treemap/marker/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/treemap/marker/colorbar/title/_font.py b/plotly/validators/treemap/marker/colorbar/title/_font.py index d985f6a07f..3e4dd317d3 100644 --- a/plotly/validators/treemap/marker/colorbar/title/_font.py +++ b/plotly/validators/treemap/marker/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="treemap.marker.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/title/_side.py b/plotly/validators/treemap/marker/colorbar/title/_side.py index 647f505770..04bcbe53c6 100644 --- a/plotly/validators/treemap/marker/colorbar/title/_side.py +++ b/plotly/validators/treemap/marker/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="treemap.marker.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/title/_text.py b/plotly/validators/treemap/marker/colorbar/title/_text.py index 9315c2e809..32b35d1e31 100644 --- a/plotly/validators/treemap/marker/colorbar/title/_text.py +++ b/plotly/validators/treemap/marker/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="treemap.marker.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/title/font/__init__.py b/plotly/validators/treemap/marker/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/__init__.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_color.py b/plotly/validators/treemap/marker/colorbar/title/font/_color.py index e3f062b156..972a74140a 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_color.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_family.py b/plotly/validators/treemap/marker/colorbar/title/font/_family.py index 7faa23c80c..bd86459ada 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_family.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_lineposition.py b/plotly/validators/treemap/marker/colorbar/title/font/_lineposition.py index 59c3aa7bd0..1b28484929 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_lineposition.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_shadow.py b/plotly/validators/treemap/marker/colorbar/title/font/_shadow.py index 1c13391d09..537e294d31 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_shadow.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_size.py b/plotly/validators/treemap/marker/colorbar/title/font/_size.py index b248e0be1f..2c8a51addf 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_size.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_style.py b/plotly/validators/treemap/marker/colorbar/title/font/_style.py index 75df7acb14..4e2517f589 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_style.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_textcase.py b/plotly/validators/treemap/marker/colorbar/title/font/_textcase.py index 803b913977..2a1fadeabf 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_textcase.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_variant.py b/plotly/validators/treemap/marker/colorbar/title/font/_variant.py index af6d6b5408..05ffbcce28 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_variant.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), values=kwargs.pop( "values", diff --git a/plotly/validators/treemap/marker/colorbar/title/font/_weight.py b/plotly/validators/treemap/marker/colorbar/title/font/_weight.py index 2a4c5b48ed..6856b5e613 100644 --- a/plotly/validators/treemap/marker/colorbar/title/font/_weight.py +++ b/plotly/validators/treemap/marker/colorbar/title/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.marker.colorbar.title.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/treemap/marker/line/__init__.py b/plotly/validators/treemap/marker/line/__init__.py index a2b9e1ae50..ca6d32f725 100644 --- a/plotly/validators/treemap/marker/line/__init__.py +++ b/plotly/validators/treemap/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/marker/line/_color.py b/plotly/validators/treemap/marker/line/_color.py index b6879a5240..c11fe77c44 100644 --- a/plotly/validators/treemap/marker/line/_color.py +++ b/plotly/validators/treemap/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/treemap/marker/line/_colorsrc.py b/plotly/validators/treemap/marker/line/_colorsrc.py index 721a09edb0..481a0acf4d 100644 --- a/plotly/validators/treemap/marker/line/_colorsrc.py +++ b/plotly/validators/treemap/marker/line/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="treemap.marker.line", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/line/_width.py b/plotly/validators/treemap/marker/line/_width.py index 46816b0d69..a9fd6831d3 100644 --- a/plotly/validators/treemap/marker/line/_width.py +++ b/plotly/validators/treemap/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="treemap.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/treemap/marker/line/_widthsrc.py b/plotly/validators/treemap/marker/line/_widthsrc.py index 8f7c71b3c1..0d74da86f5 100644 --- a/plotly/validators/treemap/marker/line/_widthsrc.py +++ b/plotly/validators/treemap/marker/line/_widthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="widthsrc", parent_name="treemap.marker.line", **kwargs ): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/pad/__init__.py b/plotly/validators/treemap/marker/pad/__init__.py index 04e64dbc5e..4189bfbe1f 100644 --- a/plotly/validators/treemap/marker/pad/__init__.py +++ b/plotly/validators/treemap/marker/pad/__init__.py @@ -1,16 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._t import TValidator - from ._r import RValidator - from ._l import LValidator - from ._b import BValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._t.TValidator", "._r.RValidator", "._l.LValidator", "._b.BValidator"], +) diff --git a/plotly/validators/treemap/marker/pad/_b.py b/plotly/validators/treemap/marker/pad/_b.py index 916a64cd51..cb1d237f66 100644 --- a/plotly/validators/treemap/marker/pad/_b.py +++ b/plotly/validators/treemap/marker/pad/_b.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BValidator(_plotly_utils.basevalidators.NumberValidator): +class BValidator(_bv.NumberValidator): def __init__(self, plotly_name="b", parent_name="treemap.marker.pad", **kwargs): - super(BValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/pad/_l.py b/plotly/validators/treemap/marker/pad/_l.py index e3efb012b8..3b15616aaf 100644 --- a/plotly/validators/treemap/marker/pad/_l.py +++ b/plotly/validators/treemap/marker/pad/_l.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LValidator(_plotly_utils.basevalidators.NumberValidator): +class LValidator(_bv.NumberValidator): def __init__(self, plotly_name="l", parent_name="treemap.marker.pad", **kwargs): - super(LValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/pad/_r.py b/plotly/validators/treemap/marker/pad/_r.py index 97f5f81077..3373f11306 100644 --- a/plotly/validators/treemap/marker/pad/_r.py +++ b/plotly/validators/treemap/marker/pad/_r.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RValidator(_plotly_utils.basevalidators.NumberValidator): +class RValidator(_bv.NumberValidator): def __init__(self, plotly_name="r", parent_name="treemap.marker.pad", **kwargs): - super(RValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/pad/_t.py b/plotly/validators/treemap/marker/pad/_t.py index 7c37aebb64..4d45ee77fc 100644 --- a/plotly/validators/treemap/marker/pad/_t.py +++ b/plotly/validators/treemap/marker/pad/_t.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TValidator(_plotly_utils.basevalidators.NumberValidator): +class TValidator(_bv.NumberValidator): def __init__(self, plotly_name="t", parent_name="treemap.marker.pad", **kwargs): - super(TValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/marker/pattern/__init__.py b/plotly/validators/treemap/marker/pattern/__init__.py index e190f962c4..e42ccc4d0f 100644 --- a/plotly/validators/treemap/marker/pattern/__init__.py +++ b/plotly/validators/treemap/marker/pattern/__init__.py @@ -1,37 +1,21 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._soliditysrc import SoliditysrcValidator - from ._solidity import SolidityValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shapesrc import ShapesrcValidator - from ._shape import ShapeValidator - from ._fillmode import FillmodeValidator - from ._fgopacity import FgopacityValidator - from ._fgcolorsrc import FgcolorsrcValidator - from ._fgcolor import FgcolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._soliditysrc.SoliditysrcValidator", - "._solidity.SolidityValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shapesrc.ShapesrcValidator", - "._shape.ShapeValidator", - "._fillmode.FillmodeValidator", - "._fgopacity.FgopacityValidator", - "._fgcolorsrc.FgcolorsrcValidator", - "._fgcolor.FgcolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._soliditysrc.SoliditysrcValidator", + "._solidity.SolidityValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shapesrc.ShapesrcValidator", + "._shape.ShapeValidator", + "._fillmode.FillmodeValidator", + "._fgopacity.FgopacityValidator", + "._fgcolorsrc.FgcolorsrcValidator", + "._fgcolor.FgcolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/treemap/marker/pattern/_bgcolor.py b/plotly/validators/treemap/marker/pattern/_bgcolor.py index 81cbdb77db..c49257f4c0 100644 --- a/plotly/validators/treemap/marker/pattern/_bgcolor.py +++ b/plotly/validators/treemap/marker/pattern/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="treemap.marker.pattern", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/treemap/marker/pattern/_bgcolorsrc.py b/plotly/validators/treemap/marker/pattern/_bgcolorsrc.py index 64f183a597..3ddc4750bd 100644 --- a/plotly/validators/treemap/marker/pattern/_bgcolorsrc.py +++ b/plotly/validators/treemap/marker/pattern/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="treemap.marker.pattern", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/pattern/_fgcolor.py b/plotly/validators/treemap/marker/pattern/_fgcolor.py index 9c597f79cb..33c08de2ad 100644 --- a/plotly/validators/treemap/marker/pattern/_fgcolor.py +++ b/plotly/validators/treemap/marker/pattern/_fgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="fgcolor", parent_name="treemap.marker.pattern", **kwargs ): - super(FgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/treemap/marker/pattern/_fgcolorsrc.py b/plotly/validators/treemap/marker/pattern/_fgcolorsrc.py index f7e04ae874..8090921949 100644 --- a/plotly/validators/treemap/marker/pattern/_fgcolorsrc.py +++ b/plotly/validators/treemap/marker/pattern/_fgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="fgcolorsrc", parent_name="treemap.marker.pattern", **kwargs ): - super(FgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/pattern/_fgopacity.py b/plotly/validators/treemap/marker/pattern/_fgopacity.py index c94b1694e7..b92adf7bb2 100644 --- a/plotly/validators/treemap/marker/pattern/_fgopacity.py +++ b/plotly/validators/treemap/marker/pattern/_fgopacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FgopacityValidator(_plotly_utils.basevalidators.NumberValidator): +class FgopacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="fgopacity", parent_name="treemap.marker.pattern", **kwargs ): - super(FgopacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/treemap/marker/pattern/_fillmode.py b/plotly/validators/treemap/marker/pattern/_fillmode.py index 3889070d5e..ab6f1b75b2 100644 --- a/plotly/validators/treemap/marker/pattern/_fillmode.py +++ b/plotly/validators/treemap/marker/pattern/_fillmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class FillmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="fillmode", parent_name="treemap.marker.pattern", **kwargs ): - super(FillmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["replace", "overlay"]), **kwargs, diff --git a/plotly/validators/treemap/marker/pattern/_shape.py b/plotly/validators/treemap/marker/pattern/_shape.py index 286fb88eba..a43d3e3248 100644 --- a/plotly/validators/treemap/marker/pattern/_shape.py +++ b/plotly/validators/treemap/marker/pattern/_shape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="shape", parent_name="treemap.marker.pattern", **kwargs ): - super(ShapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["", "/", "\\", "x", "-", "|", "+", "."]), diff --git a/plotly/validators/treemap/marker/pattern/_shapesrc.py b/plotly/validators/treemap/marker/pattern/_shapesrc.py index 7ee5b6a9bc..f0885d5262 100644 --- a/plotly/validators/treemap/marker/pattern/_shapesrc.py +++ b/plotly/validators/treemap/marker/pattern/_shapesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShapesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShapesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shapesrc", parent_name="treemap.marker.pattern", **kwargs ): - super(ShapesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/pattern/_size.py b/plotly/validators/treemap/marker/pattern/_size.py index a41afa6472..7f9c6cb0df 100644 --- a/plotly/validators/treemap/marker/pattern/_size.py +++ b/plotly/validators/treemap/marker/pattern/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.marker.pattern", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/treemap/marker/pattern/_sizesrc.py b/plotly/validators/treemap/marker/pattern/_sizesrc.py index 5f588979bd..9a567914d3 100644 --- a/plotly/validators/treemap/marker/pattern/_sizesrc.py +++ b/plotly/validators/treemap/marker/pattern/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="treemap.marker.pattern", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/marker/pattern/_solidity.py b/plotly/validators/treemap/marker/pattern/_solidity.py index 2874820e44..e4f9bd5079 100644 --- a/plotly/validators/treemap/marker/pattern/_solidity.py +++ b/plotly/validators/treemap/marker/pattern/_solidity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SolidityValidator(_plotly_utils.basevalidators.NumberValidator): +class SolidityValidator(_bv.NumberValidator): def __init__( self, plotly_name="solidity", parent_name="treemap.marker.pattern", **kwargs ): - super(SolidityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/treemap/marker/pattern/_soliditysrc.py b/plotly/validators/treemap/marker/pattern/_soliditysrc.py index a066542abd..ff31008dd5 100644 --- a/plotly/validators/treemap/marker/pattern/_soliditysrc.py +++ b/plotly/validators/treemap/marker/pattern/_soliditysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SoliditysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SoliditysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="soliditysrc", parent_name="treemap.marker.pattern", **kwargs ): - super(SoliditysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/__init__.py b/plotly/validators/treemap/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/treemap/outsidetextfont/__init__.py +++ b/plotly/validators/treemap/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/outsidetextfont/_color.py b/plotly/validators/treemap/outsidetextfont/_color.py index 38d13faf58..5f7ea9d507 100644 --- a/plotly/validators/treemap/outsidetextfont/_color.py +++ b/plotly/validators/treemap/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/outsidetextfont/_colorsrc.py b/plotly/validators/treemap/outsidetextfont/_colorsrc.py index 5e740dca5e..960dcffc5c 100644 --- a/plotly/validators/treemap/outsidetextfont/_colorsrc.py +++ b/plotly/validators/treemap/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_family.py b/plotly/validators/treemap/outsidetextfont/_family.py index a4c57619a9..813ec77027 100644 --- a/plotly/validators/treemap/outsidetextfont/_family.py +++ b/plotly/validators/treemap/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/treemap/outsidetextfont/_familysrc.py b/plotly/validators/treemap/outsidetextfont/_familysrc.py index 70983dbf84..c806ab59dc 100644 --- a/plotly/validators/treemap/outsidetextfont/_familysrc.py +++ b/plotly/validators/treemap/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_lineposition.py b/plotly/validators/treemap/outsidetextfont/_lineposition.py index b7dabd6fba..29c2968bbc 100644 --- a/plotly/validators/treemap/outsidetextfont/_lineposition.py +++ b/plotly/validators/treemap/outsidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.outsidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/treemap/outsidetextfont/_linepositionsrc.py b/plotly/validators/treemap/outsidetextfont/_linepositionsrc.py index 694fcdda4a..ab3728b4a1 100644 --- a/plotly/validators/treemap/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/treemap/outsidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="treemap.outsidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_shadow.py b/plotly/validators/treemap/outsidetextfont/_shadow.py index a683a3ebdc..857ac7e61d 100644 --- a/plotly/validators/treemap/outsidetextfont/_shadow.py +++ b/plotly/validators/treemap/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/outsidetextfont/_shadowsrc.py b/plotly/validators/treemap/outsidetextfont/_shadowsrc.py index fa5bf2a1f7..413d1545ff 100644 --- a/plotly/validators/treemap/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/treemap/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_size.py b/plotly/validators/treemap/outsidetextfont/_size.py index 65691dc799..61564c6200 100644 --- a/plotly/validators/treemap/outsidetextfont/_size.py +++ b/plotly/validators/treemap/outsidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.outsidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/treemap/outsidetextfont/_sizesrc.py b/plotly/validators/treemap/outsidetextfont/_sizesrc.py index 63327aac83..0b3f5a7540 100644 --- a/plotly/validators/treemap/outsidetextfont/_sizesrc.py +++ b/plotly/validators/treemap/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_style.py b/plotly/validators/treemap/outsidetextfont/_style.py index a6918a55c3..a660058747 100644 --- a/plotly/validators/treemap/outsidetextfont/_style.py +++ b/plotly/validators/treemap/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/treemap/outsidetextfont/_stylesrc.py b/plotly/validators/treemap/outsidetextfont/_stylesrc.py index e231ad96e2..ce0b65776f 100644 --- a/plotly/validators/treemap/outsidetextfont/_stylesrc.py +++ b/plotly/validators/treemap/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_textcase.py b/plotly/validators/treemap/outsidetextfont/_textcase.py index 9563561ea5..5fdc19bf4c 100644 --- a/plotly/validators/treemap/outsidetextfont/_textcase.py +++ b/plotly/validators/treemap/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/treemap/outsidetextfont/_textcasesrc.py b/plotly/validators/treemap/outsidetextfont/_textcasesrc.py index 799eef30a6..6e78919dec 100644 --- a/plotly/validators/treemap/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/treemap/outsidetextfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_variant.py b/plotly/validators/treemap/outsidetextfont/_variant.py index 4fc5bef95d..97eaaa53d9 100644 --- a/plotly/validators/treemap/outsidetextfont/_variant.py +++ b/plotly/validators/treemap/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/treemap/outsidetextfont/_variantsrc.py b/plotly/validators/treemap/outsidetextfont/_variantsrc.py index 604365e7ea..9c2e325265 100644 --- a/plotly/validators/treemap/outsidetextfont/_variantsrc.py +++ b/plotly/validators/treemap/outsidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/outsidetextfont/_weight.py b/plotly/validators/treemap/outsidetextfont/_weight.py index 137ff49352..2e9b81a4e6 100644 --- a/plotly/validators/treemap/outsidetextfont/_weight.py +++ b/plotly/validators/treemap/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/treemap/outsidetextfont/_weightsrc.py b/plotly/validators/treemap/outsidetextfont/_weightsrc.py index a3d7fa7473..3ba0b3ba23 100644 --- a/plotly/validators/treemap/outsidetextfont/_weightsrc.py +++ b/plotly/validators/treemap/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="treemap.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/__init__.py b/plotly/validators/treemap/pathbar/__init__.py index fce05faf91..7b4da4ccad 100644 --- a/plotly/validators/treemap/pathbar/__init__.py +++ b/plotly/validators/treemap/pathbar/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._thickness import ThicknessValidator - from ._textfont import TextfontValidator - from ._side import SideValidator - from ._edgeshape import EdgeshapeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._visible.VisibleValidator", - "._thickness.ThicknessValidator", - "._textfont.TextfontValidator", - "._side.SideValidator", - "._edgeshape.EdgeshapeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._visible.VisibleValidator", + "._thickness.ThicknessValidator", + "._textfont.TextfontValidator", + "._side.SideValidator", + "._edgeshape.EdgeshapeValidator", + ], +) diff --git a/plotly/validators/treemap/pathbar/_edgeshape.py b/plotly/validators/treemap/pathbar/_edgeshape.py index c130649e81..06a2860736 100644 --- a/plotly/validators/treemap/pathbar/_edgeshape.py +++ b/plotly/validators/treemap/pathbar/_edgeshape.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EdgeshapeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class EdgeshapeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="edgeshape", parent_name="treemap.pathbar", **kwargs ): - super(EdgeshapeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", [">", "<", "|", "/", "\\"]), **kwargs, diff --git a/plotly/validators/treemap/pathbar/_side.py b/plotly/validators/treemap/pathbar/_side.py index 2122c8a1cd..6e3334740c 100644 --- a/plotly/validators/treemap/pathbar/_side.py +++ b/plotly/validators/treemap/pathbar/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="treemap.pathbar", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["top", "bottom"]), **kwargs, diff --git a/plotly/validators/treemap/pathbar/_textfont.py b/plotly/validators/treemap/pathbar/_textfont.py index 4211122707..157677e5c0 100644 --- a/plotly/validators/treemap/pathbar/_textfont.py +++ b/plotly/validators/treemap/pathbar/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="treemap.pathbar", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/treemap/pathbar/_thickness.py b/plotly/validators/treemap/pathbar/_thickness.py index 482c43dab4..31e624f1ed 100644 --- a/plotly/validators/treemap/pathbar/_thickness.py +++ b/plotly/validators/treemap/pathbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="treemap.pathbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 12), **kwargs, diff --git a/plotly/validators/treemap/pathbar/_visible.py b/plotly/validators/treemap/pathbar/_visible.py index b215e7e1d6..b75c46497e 100644 --- a/plotly/validators/treemap/pathbar/_visible.py +++ b/plotly/validators/treemap/pathbar/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="treemap.pathbar", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/__init__.py b/plotly/validators/treemap/pathbar/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/treemap/pathbar/textfont/__init__.py +++ b/plotly/validators/treemap/pathbar/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/pathbar/textfont/_color.py b/plotly/validators/treemap/pathbar/textfont/_color.py index a7413156c0..c2f59b513e 100644 --- a/plotly/validators/treemap/pathbar/textfont/_color.py +++ b/plotly/validators/treemap/pathbar/textfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="treemap.pathbar.textfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/pathbar/textfont/_colorsrc.py b/plotly/validators/treemap/pathbar/textfont/_colorsrc.py index 6d858a632f..5c9f823184 100644 --- a/plotly/validators/treemap/pathbar/textfont/_colorsrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_family.py b/plotly/validators/treemap/pathbar/textfont/_family.py index b4548afb08..3922eceece 100644 --- a/plotly/validators/treemap/pathbar/textfont/_family.py +++ b/plotly/validators/treemap/pathbar/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="treemap.pathbar.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/treemap/pathbar/textfont/_familysrc.py b/plotly/validators/treemap/pathbar/textfont/_familysrc.py index 84909a2cb5..63445f3129 100644 --- a/plotly/validators/treemap/pathbar/textfont/_familysrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_lineposition.py b/plotly/validators/treemap/pathbar/textfont/_lineposition.py index b0eff0ed7f..2b82934530 100644 --- a/plotly/validators/treemap/pathbar/textfont/_lineposition.py +++ b/plotly/validators/treemap/pathbar/textfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.pathbar.textfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/treemap/pathbar/textfont/_linepositionsrc.py b/plotly/validators/treemap/pathbar/textfont/_linepositionsrc.py index 51884873c0..e05f242394 100644 --- a/plotly/validators/treemap/pathbar/textfont/_linepositionsrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="treemap.pathbar.textfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_shadow.py b/plotly/validators/treemap/pathbar/textfont/_shadow.py index af0abe7b6d..0e023e7098 100644 --- a/plotly/validators/treemap/pathbar/textfont/_shadow.py +++ b/plotly/validators/treemap/pathbar/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="treemap.pathbar.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/pathbar/textfont/_shadowsrc.py b/plotly/validators/treemap/pathbar/textfont/_shadowsrc.py index d5e4cdf997..2d0f0b34e1 100644 --- a/plotly/validators/treemap/pathbar/textfont/_shadowsrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_size.py b/plotly/validators/treemap/pathbar/textfont/_size.py index 4f387c9585..a8f7661400 100644 --- a/plotly/validators/treemap/pathbar/textfont/_size.py +++ b/plotly/validators/treemap/pathbar/textfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="treemap.pathbar.textfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/treemap/pathbar/textfont/_sizesrc.py b/plotly/validators/treemap/pathbar/textfont/_sizesrc.py index 8b14d5e838..86632a3525 100644 --- a/plotly/validators/treemap/pathbar/textfont/_sizesrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_style.py b/plotly/validators/treemap/pathbar/textfont/_style.py index b8b9441097..539c8eee20 100644 --- a/plotly/validators/treemap/pathbar/textfont/_style.py +++ b/plotly/validators/treemap/pathbar/textfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="treemap.pathbar.textfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/treemap/pathbar/textfont/_stylesrc.py b/plotly/validators/treemap/pathbar/textfont/_stylesrc.py index 42df86151d..f0d8721ef7 100644 --- a/plotly/validators/treemap/pathbar/textfont/_stylesrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_textcase.py b/plotly/validators/treemap/pathbar/textfont/_textcase.py index e22c0c427c..83e45f7038 100644 --- a/plotly/validators/treemap/pathbar/textfont/_textcase.py +++ b/plotly/validators/treemap/pathbar/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.pathbar.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/treemap/pathbar/textfont/_textcasesrc.py b/plotly/validators/treemap/pathbar/textfont/_textcasesrc.py index ed14fa8494..4cfbcfee95 100644 --- a/plotly/validators/treemap/pathbar/textfont/_textcasesrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="treemap.pathbar.textfont", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_variant.py b/plotly/validators/treemap/pathbar/textfont/_variant.py index 1670f48f16..e85571c0bd 100644 --- a/plotly/validators/treemap/pathbar/textfont/_variant.py +++ b/plotly/validators/treemap/pathbar/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="treemap.pathbar.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/treemap/pathbar/textfont/_variantsrc.py b/plotly/validators/treemap/pathbar/textfont/_variantsrc.py index 7064e221dd..25f714b070 100644 --- a/plotly/validators/treemap/pathbar/textfont/_variantsrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/pathbar/textfont/_weight.py b/plotly/validators/treemap/pathbar/textfont/_weight.py index a4a41d80d7..37f9dd54f8 100644 --- a/plotly/validators/treemap/pathbar/textfont/_weight.py +++ b/plotly/validators/treemap/pathbar/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="treemap.pathbar.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/treemap/pathbar/textfont/_weightsrc.py b/plotly/validators/treemap/pathbar/textfont/_weightsrc.py index 7e91b186a3..d5a678f310 100644 --- a/plotly/validators/treemap/pathbar/textfont/_weightsrc.py +++ b/plotly/validators/treemap/pathbar/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="treemap.pathbar.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/root/__init__.py b/plotly/validators/treemap/root/__init__.py index a9f087e5af..85a4cc9573 100644 --- a/plotly/validators/treemap/root/__init__.py +++ b/plotly/validators/treemap/root/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._color.ColorValidator"] +) diff --git a/plotly/validators/treemap/root/_color.py b/plotly/validators/treemap/root/_color.py index 9a6872f9f3..089ddd9c87 100644 --- a/plotly/validators/treemap/root/_color.py +++ b/plotly/validators/treemap/root/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="treemap.root", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/treemap/stream/__init__.py b/plotly/validators/treemap/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/treemap/stream/__init__.py +++ b/plotly/validators/treemap/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/treemap/stream/_maxpoints.py b/plotly/validators/treemap/stream/_maxpoints.py index 17d9b1c8a5..0bd874985c 100644 --- a/plotly/validators/treemap/stream/_maxpoints.py +++ b/plotly/validators/treemap/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="treemap.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/treemap/stream/_token.py b/plotly/validators/treemap/stream/_token.py index f7ba539fd7..9afec850e4 100644 --- a/plotly/validators/treemap/stream/_token.py +++ b/plotly/validators/treemap/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="treemap.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/treemap/textfont/__init__.py b/plotly/validators/treemap/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/treemap/textfont/__init__.py +++ b/plotly/validators/treemap/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/treemap/textfont/_color.py b/plotly/validators/treemap/textfont/_color.py index cba4eb68ba..387b7a0270 100644 --- a/plotly/validators/treemap/textfont/_color.py +++ b/plotly/validators/treemap/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="treemap.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/textfont/_colorsrc.py b/plotly/validators/treemap/textfont/_colorsrc.py index 256336b1a0..556e85c677 100644 --- a/plotly/validators/treemap/textfont/_colorsrc.py +++ b/plotly/validators/treemap/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="treemap.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_family.py b/plotly/validators/treemap/textfont/_family.py index fa7e4b931d..eec5a05fd8 100644 --- a/plotly/validators/treemap/textfont/_family.py +++ b/plotly/validators/treemap/textfont/_family.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__(self, plotly_name="family", parent_name="treemap.textfont", **kwargs): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/treemap/textfont/_familysrc.py b/plotly/validators/treemap/textfont/_familysrc.py index d3ca788ac5..a2f33631a9 100644 --- a/plotly/validators/treemap/textfont/_familysrc.py +++ b/plotly/validators/treemap/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="treemap.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_lineposition.py b/plotly/validators/treemap/textfont/_lineposition.py index ec7915c66a..8abca97307 100644 --- a/plotly/validators/treemap/textfont/_lineposition.py +++ b/plotly/validators/treemap/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="treemap.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/treemap/textfont/_linepositionsrc.py b/plotly/validators/treemap/textfont/_linepositionsrc.py index c568cfe554..6ab3625f85 100644 --- a/plotly/validators/treemap/textfont/_linepositionsrc.py +++ b/plotly/validators/treemap/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="treemap.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_shadow.py b/plotly/validators/treemap/textfont/_shadow.py index 1af4e37168..66065683af 100644 --- a/plotly/validators/treemap/textfont/_shadow.py +++ b/plotly/validators/treemap/textfont/_shadow.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__(self, plotly_name="shadow", parent_name="treemap.textfont", **kwargs): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/treemap/textfont/_shadowsrc.py b/plotly/validators/treemap/textfont/_shadowsrc.py index fdfce21485..db3ecca1fd 100644 --- a/plotly/validators/treemap/textfont/_shadowsrc.py +++ b/plotly/validators/treemap/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="treemap.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_size.py b/plotly/validators/treemap/textfont/_size.py index 27decabbca..598b43a6b6 100644 --- a/plotly/validators/treemap/textfont/_size.py +++ b/plotly/validators/treemap/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="treemap.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/treemap/textfont/_sizesrc.py b/plotly/validators/treemap/textfont/_sizesrc.py index 1688188673..8b6c17020b 100644 --- a/plotly/validators/treemap/textfont/_sizesrc.py +++ b/plotly/validators/treemap/textfont/_sizesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="sizesrc", parent_name="treemap.textfont", **kwargs): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_style.py b/plotly/validators/treemap/textfont/_style.py index 478080a706..4e5e11829e 100644 --- a/plotly/validators/treemap/textfont/_style.py +++ b/plotly/validators/treemap/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="treemap.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/treemap/textfont/_stylesrc.py b/plotly/validators/treemap/textfont/_stylesrc.py index 6822f5c350..5066a65e25 100644 --- a/plotly/validators/treemap/textfont/_stylesrc.py +++ b/plotly/validators/treemap/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="treemap.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_textcase.py b/plotly/validators/treemap/textfont/_textcase.py index 319ef04a53..ddb9e25907 100644 --- a/plotly/validators/treemap/textfont/_textcase.py +++ b/plotly/validators/treemap/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="treemap.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/treemap/textfont/_textcasesrc.py b/plotly/validators/treemap/textfont/_textcasesrc.py index 673418f888..ba7e94f5ab 100644 --- a/plotly/validators/treemap/textfont/_textcasesrc.py +++ b/plotly/validators/treemap/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="treemap.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_variant.py b/plotly/validators/treemap/textfont/_variant.py index 062359cf1b..7def07c2a3 100644 --- a/plotly/validators/treemap/textfont/_variant.py +++ b/plotly/validators/treemap/textfont/_variant.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="variant", parent_name="treemap.textfont", **kwargs): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/treemap/textfont/_variantsrc.py b/plotly/validators/treemap/textfont/_variantsrc.py index 5ff4515129..75999b5e8a 100644 --- a/plotly/validators/treemap/textfont/_variantsrc.py +++ b/plotly/validators/treemap/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="treemap.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/textfont/_weight.py b/plotly/validators/treemap/textfont/_weight.py index c35081fb8e..08e9b4dfa7 100644 --- a/plotly/validators/treemap/textfont/_weight.py +++ b/plotly/validators/treemap/textfont/_weight.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__(self, plotly_name="weight", parent_name="treemap.textfont", **kwargs): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/treemap/textfont/_weightsrc.py b/plotly/validators/treemap/textfont/_weightsrc.py index e75ea98a59..92d25036eb 100644 --- a/plotly/validators/treemap/textfont/_weightsrc.py +++ b/plotly/validators/treemap/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="treemap.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/treemap/tiling/__init__.py b/plotly/validators/treemap/tiling/__init__.py index c7b32e8503..25a61cc598 100644 --- a/plotly/validators/treemap/tiling/__init__.py +++ b/plotly/validators/treemap/tiling/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._squarifyratio import SquarifyratioValidator - from ._pad import PadValidator - from ._packing import PackingValidator - from ._flip import FlipValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._squarifyratio.SquarifyratioValidator", - "._pad.PadValidator", - "._packing.PackingValidator", - "._flip.FlipValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._squarifyratio.SquarifyratioValidator", + "._pad.PadValidator", + "._packing.PackingValidator", + "._flip.FlipValidator", + ], +) diff --git a/plotly/validators/treemap/tiling/_flip.py b/plotly/validators/treemap/tiling/_flip.py index 2609239ce6..f21fc7d75a 100644 --- a/plotly/validators/treemap/tiling/_flip.py +++ b/plotly/validators/treemap/tiling/_flip.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FlipValidator(_plotly_utils.basevalidators.FlaglistValidator): +class FlipValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="flip", parent_name="treemap.tiling", **kwargs): - super(FlipValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), flags=kwargs.pop("flags", ["x", "y"]), **kwargs, diff --git a/plotly/validators/treemap/tiling/_packing.py b/plotly/validators/treemap/tiling/_packing.py index 7daeddeef2..46d2da0aec 100644 --- a/plotly/validators/treemap/tiling/_packing.py +++ b/plotly/validators/treemap/tiling/_packing.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PackingValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PackingValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="packing", parent_name="treemap.tiling", **kwargs): - super(PackingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( "values", diff --git a/plotly/validators/treemap/tiling/_pad.py b/plotly/validators/treemap/tiling/_pad.py index ff411ae377..70098d6769 100644 --- a/plotly/validators/treemap/tiling/_pad.py +++ b/plotly/validators/treemap/tiling/_pad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PadValidator(_plotly_utils.basevalidators.NumberValidator): +class PadValidator(_bv.NumberValidator): def __init__(self, plotly_name="pad", parent_name="treemap.tiling", **kwargs): - super(PadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/treemap/tiling/_squarifyratio.py b/plotly/validators/treemap/tiling/_squarifyratio.py index fcb3fd6748..a544168cd3 100644 --- a/plotly/validators/treemap/tiling/_squarifyratio.py +++ b/plotly/validators/treemap/tiling/_squarifyratio.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SquarifyratioValidator(_plotly_utils.basevalidators.NumberValidator): +class SquarifyratioValidator(_bv.NumberValidator): def __init__( self, plotly_name="squarifyratio", parent_name="treemap.tiling", **kwargs ): - super(SquarifyratioValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/violin/__init__.py b/plotly/validators/violin/__init__.py index 485ccd3476..4ae7416c75 100644 --- a/plotly/validators/violin/__init__.py +++ b/plotly/validators/violin/__init__.py @@ -1,135 +1,70 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._unselected import UnselectedValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._spanmode import SpanmodeValidator - from ._span import SpanValidator - from ._side import SideValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._selected import SelectedValidator - from ._scalemode import ScalemodeValidator - from ._scalegroup import ScalegroupValidator - from ._quartilemethod import QuartilemethodValidator - from ._points import PointsValidator - from ._pointpos import PointposValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetgroup import OffsetgroupValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._meanline import MeanlineValidator - from ._marker import MarkerValidator - from ._line import LineValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._jitter import JitterValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoveron import HoveronValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._fillcolor import FillcolorValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._box import BoxValidator - from ._bandwidth import BandwidthValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._unselected.UnselectedValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._spanmode.SpanmodeValidator", - "._span.SpanValidator", - "._side.SideValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._selected.SelectedValidator", - "._scalemode.ScalemodeValidator", - "._scalegroup.ScalegroupValidator", - "._quartilemethod.QuartilemethodValidator", - "._points.PointsValidator", - "._pointpos.PointposValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetgroup.OffsetgroupValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._meanline.MeanlineValidator", - "._marker.MarkerValidator", - "._line.LineValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._jitter.JitterValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoveron.HoveronValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._fillcolor.FillcolorValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._box.BoxValidator", - "._bandwidth.BandwidthValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._unselected.UnselectedValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._spanmode.SpanmodeValidator", + "._span.SpanValidator", + "._side.SideValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._selected.SelectedValidator", + "._scalemode.ScalemodeValidator", + "._scalegroup.ScalegroupValidator", + "._quartilemethod.QuartilemethodValidator", + "._points.PointsValidator", + "._pointpos.PointposValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetgroup.OffsetgroupValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._meanline.MeanlineValidator", + "._marker.MarkerValidator", + "._line.LineValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._jitter.JitterValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoveron.HoveronValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._fillcolor.FillcolorValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._box.BoxValidator", + "._bandwidth.BandwidthValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/violin/_alignmentgroup.py b/plotly/validators/violin/_alignmentgroup.py index 0de9852306..53760fe979 100644 --- a/plotly/validators/violin/_alignmentgroup.py +++ b/plotly/validators/violin/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="violin", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/violin/_bandwidth.py b/plotly/validators/violin/_bandwidth.py index 31eeea3311..40fddc6812 100644 --- a/plotly/validators/violin/_bandwidth.py +++ b/plotly/validators/violin/_bandwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BandwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BandwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="bandwidth", parent_name="violin", **kwargs): - super(BandwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/_box.py b/plotly/validators/violin/_box.py index 720613fcd4..807fef696f 100644 --- a/plotly/validators/violin/_box.py +++ b/plotly/validators/violin/_box.py @@ -1,27 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BoxValidator(_plotly_utils.basevalidators.CompoundValidator): +class BoxValidator(_bv.CompoundValidator): def __init__(self, plotly_name="box", parent_name="violin", **kwargs): - super(BoxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Box"), data_docs=kwargs.pop( "data_docs", """ - fillcolor - Sets the inner box plot fill color. - line - :class:`plotly.graph_objects.violin.box.Line` - instance or dict with compatible properties - visible - Determines if an miniature box plot is drawn - inside the violins. - width - Sets the width of the inner box plots relative - to the violins' width. For example, with 1, the - inner box plots are as wide as the violins. """, ), **kwargs, diff --git a/plotly/validators/violin/_customdata.py b/plotly/validators/violin/_customdata.py index 382104cd14..b50282d5df 100644 --- a/plotly/validators/violin/_customdata.py +++ b/plotly/validators/violin/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="violin", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/violin/_customdatasrc.py b/plotly/validators/violin/_customdatasrc.py index 3996bdc38f..bb8cdbdc2d 100644 --- a/plotly/validators/violin/_customdatasrc.py +++ b/plotly/validators/violin/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="violin", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_fillcolor.py b/plotly/validators/violin/_fillcolor.py index 99339b3f89..23cd9cf59f 100644 --- a/plotly/validators/violin/_fillcolor.py +++ b/plotly/validators/violin/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="violin", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/_hoverinfo.py b/plotly/validators/violin/_hoverinfo.py index 8471e12c2e..fe6d9396c9 100644 --- a/plotly/validators/violin/_hoverinfo.py +++ b/plotly/validators/violin/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="violin", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/violin/_hoverinfosrc.py b/plotly/validators/violin/_hoverinfosrc.py index 7d0dd771e9..44eb48eda7 100644 --- a/plotly/validators/violin/_hoverinfosrc.py +++ b/plotly/validators/violin/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="violin", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_hoverlabel.py b/plotly/validators/violin/_hoverlabel.py index 598cd84f21..69e222ac5b 100644 --- a/plotly/validators/violin/_hoverlabel.py +++ b/plotly/validators/violin/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="violin", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/violin/_hoveron.py b/plotly/validators/violin/_hoveron.py index 0197452481..6917fedf58 100644 --- a/plotly/validators/violin/_hoveron.py +++ b/plotly/validators/violin/_hoveron.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoveronValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoveronValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoveron", parent_name="violin", **kwargs): - super(HoveronValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["all"]), flags=kwargs.pop("flags", ["violins", "points", "kde"]), diff --git a/plotly/validators/violin/_hovertemplate.py b/plotly/validators/violin/_hovertemplate.py index 378384f1ce..1a6b1070f4 100644 --- a/plotly/validators/violin/_hovertemplate.py +++ b/plotly/validators/violin/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="violin", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/violin/_hovertemplatesrc.py b/plotly/validators/violin/_hovertemplatesrc.py index 5b540ec0e5..7430c90c1f 100644 --- a/plotly/validators/violin/_hovertemplatesrc.py +++ b/plotly/validators/violin/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="violin", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_hovertext.py b/plotly/validators/violin/_hovertext.py index 9d20d7e24a..fbf102111d 100644 --- a/plotly/validators/violin/_hovertext.py +++ b/plotly/validators/violin/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="violin", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/violin/_hovertextsrc.py b/plotly/validators/violin/_hovertextsrc.py index a809bdfaf3..389e60af66 100644 --- a/plotly/validators/violin/_hovertextsrc.py +++ b/plotly/validators/violin/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="violin", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_ids.py b/plotly/validators/violin/_ids.py index a00814f812..9da9e15127 100644 --- a/plotly/validators/violin/_ids.py +++ b/plotly/validators/violin/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="violin", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/violin/_idssrc.py b/plotly/validators/violin/_idssrc.py index 2f08f5abcd..3c0e76eaff 100644 --- a/plotly/validators/violin/_idssrc.py +++ b/plotly/validators/violin/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="violin", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_jitter.py b/plotly/validators/violin/_jitter.py index 22e0f66e62..4eaef3564b 100644 --- a/plotly/validators/violin/_jitter.py +++ b/plotly/validators/violin/_jitter.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class JitterValidator(_plotly_utils.basevalidators.NumberValidator): +class JitterValidator(_bv.NumberValidator): def __init__(self, plotly_name="jitter", parent_name="violin", **kwargs): - super(JitterValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/_legend.py b/plotly/validators/violin/_legend.py index 5e471d94e5..e344eb508a 100644 --- a/plotly/validators/violin/_legend.py +++ b/plotly/validators/violin/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="violin", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/violin/_legendgroup.py b/plotly/validators/violin/_legendgroup.py index 96e3aa48c5..10917bdd78 100644 --- a/plotly/validators/violin/_legendgroup.py +++ b/plotly/validators/violin/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="violin", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/_legendgrouptitle.py b/plotly/validators/violin/_legendgrouptitle.py index bc10033ea8..03642b3e78 100644 --- a/plotly/validators/violin/_legendgrouptitle.py +++ b/plotly/validators/violin/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="violin", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/violin/_legendrank.py b/plotly/validators/violin/_legendrank.py index c6be03eb7c..8968fa4220 100644 --- a/plotly/validators/violin/_legendrank.py +++ b/plotly/validators/violin/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="violin", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/_legendwidth.py b/plotly/validators/violin/_legendwidth.py index 9f924270dd..8fd896cecb 100644 --- a/plotly/validators/violin/_legendwidth.py +++ b/plotly/validators/violin/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="violin", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/_line.py b/plotly/validators/violin/_line.py index cabbc3705c..324313a382 100644 --- a/plotly/validators/violin/_line.py +++ b/plotly/validators/violin/_line.py @@ -1,20 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="violin", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of line bounding the violin(s). - width - Sets the width (in px) of line bounding the - violin(s). """, ), **kwargs, diff --git a/plotly/validators/violin/_marker.py b/plotly/validators/violin/_marker.py index 8528ad2acb..8af6c37723 100644 --- a/plotly/validators/violin/_marker.py +++ b/plotly/validators/violin/_marker.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="violin", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - angle - Sets the marker angle in respect to `angleref`. - color - Sets the marker color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.cmin` and `marker.cmax` if set. - line - :class:`plotly.graph_objects.violin.marker.Line - ` instance or dict with compatible properties - opacity - Sets the marker opacity. - outliercolor - Sets the color of the outlier sample points. - size - Sets the marker size (in px). - symbol - Sets the marker symbol type. Adding 100 is - equivalent to appending "-open" to a symbol - name. Adding 200 is equivalent to appending - "-dot" to a symbol name. Adding 300 is - equivalent to appending "-open-dot" or "dot- - open" to a symbol name. """, ), **kwargs, diff --git a/plotly/validators/violin/_meanline.py b/plotly/validators/violin/_meanline.py index e11c810966..73ba0989f4 100644 --- a/plotly/validators/violin/_meanline.py +++ b/plotly/validators/violin/_meanline.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MeanlineValidator(_plotly_utils.basevalidators.CompoundValidator): +class MeanlineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="meanline", parent_name="violin", **kwargs): - super(MeanlineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Meanline"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the mean line color. - visible - Determines if a line corresponding to the - sample's mean is shown inside the violins. If - `box.visible` is turned on, the mean line is - drawn inside the inner box. Otherwise, the mean - line is drawn from one side of the violin to - other. - width - Sets the mean line width. """, ), **kwargs, diff --git a/plotly/validators/violin/_meta.py b/plotly/validators/violin/_meta.py index 3837229a3c..ccc5e09372 100644 --- a/plotly/validators/violin/_meta.py +++ b/plotly/validators/violin/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="violin", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/violin/_metasrc.py b/plotly/validators/violin/_metasrc.py index 472079c3cb..4d20ff5ce9 100644 --- a/plotly/validators/violin/_metasrc.py +++ b/plotly/validators/violin/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="violin", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_name.py b/plotly/validators/violin/_name.py index 678c45846f..8f19b0e4a2 100644 --- a/plotly/validators/violin/_name.py +++ b/plotly/validators/violin/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="violin", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/violin/_offsetgroup.py b/plotly/validators/violin/_offsetgroup.py index 8bdbe9371d..74337ed4fc 100644 --- a/plotly/validators/violin/_offsetgroup.py +++ b/plotly/validators/violin/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="violin", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/violin/_opacity.py b/plotly/validators/violin/_opacity.py index 5617efcb65..644d652a00 100644 --- a/plotly/validators/violin/_opacity.py +++ b/plotly/validators/violin/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="violin", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/_orientation.py b/plotly/validators/violin/_orientation.py index 2c72a4e564..c537b406bc 100644 --- a/plotly/validators/violin/_orientation.py +++ b/plotly/validators/violin/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="violin", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/violin/_pointpos.py b/plotly/validators/violin/_pointpos.py index e29e752716..4a2d9eeb96 100644 --- a/plotly/validators/violin/_pointpos.py +++ b/plotly/validators/violin/_pointpos.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PointposValidator(_plotly_utils.basevalidators.NumberValidator): +class PointposValidator(_bv.NumberValidator): def __init__(self, plotly_name="pointpos", parent_name="violin", **kwargs): - super(PointposValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", -2), diff --git a/plotly/validators/violin/_points.py b/plotly/validators/violin/_points.py index 7d444090a4..472f9a3d67 100644 --- a/plotly/validators/violin/_points.py +++ b/plotly/validators/violin/_points.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PointsValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class PointsValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="points", parent_name="violin", **kwargs): - super(PointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", ["all", "outliers", "suspectedoutliers", False] diff --git a/plotly/validators/violin/_quartilemethod.py b/plotly/validators/violin/_quartilemethod.py index 209457568d..774d92f8fd 100644 --- a/plotly/validators/violin/_quartilemethod.py +++ b/plotly/validators/violin/_quartilemethod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class QuartilemethodValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class QuartilemethodValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="quartilemethod", parent_name="violin", **kwargs): - super(QuartilemethodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["linear", "exclusive", "inclusive"]), **kwargs, diff --git a/plotly/validators/violin/_scalegroup.py b/plotly/validators/violin/_scalegroup.py index f217e57f1f..f04920d8b8 100644 --- a/plotly/validators/violin/_scalegroup.py +++ b/plotly/validators/violin/_scalegroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScalegroupValidator(_plotly_utils.basevalidators.StringValidator): +class ScalegroupValidator(_bv.StringValidator): def __init__(self, plotly_name="scalegroup", parent_name="violin", **kwargs): - super(ScalegroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/violin/_scalemode.py b/plotly/validators/violin/_scalemode.py index cae972a5b9..26c5c0c23e 100644 --- a/plotly/validators/violin/_scalemode.py +++ b/plotly/validators/violin/_scalemode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ScalemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ScalemodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="scalemode", parent_name="violin", **kwargs): - super(ScalemodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["width", "count"]), **kwargs, diff --git a/plotly/validators/violin/_selected.py b/plotly/validators/violin/_selected.py index 1e2c2df1d6..00cbd79d57 100644 --- a/plotly/validators/violin/_selected.py +++ b/plotly/validators/violin/_selected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class SelectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="selected", parent_name="violin", **kwargs): - super(SelectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Selected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.violin.selected.Ma - rker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/violin/_selectedpoints.py b/plotly/validators/violin/_selectedpoints.py index 5561d51d60..9a8553869d 100644 --- a/plotly/validators/violin/_selectedpoints.py +++ b/plotly/validators/violin/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="violin", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/violin/_showlegend.py b/plotly/validators/violin/_showlegend.py index a578664b52..cdc3d644c5 100644 --- a/plotly/validators/violin/_showlegend.py +++ b/plotly/validators/violin/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="violin", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/_side.py b/plotly/validators/violin/_side.py index 897c892c9f..ba0a40e31b 100644 --- a/plotly/validators/violin/_side.py +++ b/plotly/validators/violin/_side.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="side", parent_name="violin", **kwargs): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["both", "positive", "negative"]), **kwargs, diff --git a/plotly/validators/violin/_span.py b/plotly/validators/violin/_span.py index 3b3e1d7b5d..f3b9ffa630 100644 --- a/plotly/validators/violin/_span.py +++ b/plotly/validators/violin/_span.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpanValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class SpanValidator(_bv.InfoArrayValidator): def __init__(self, plotly_name="span", parent_name="violin", **kwargs): - super(SpanValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/violin/_spanmode.py b/plotly/validators/violin/_spanmode.py index a0991c24bf..7314ad07ba 100644 --- a/plotly/validators/violin/_spanmode.py +++ b/plotly/validators/violin/_spanmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpanmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SpanmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="spanmode", parent_name="violin", **kwargs): - super(SpanmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["soft", "hard", "manual"]), **kwargs, diff --git a/plotly/validators/violin/_stream.py b/plotly/validators/violin/_stream.py index 66b434f1ae..73a4195247 100644 --- a/plotly/validators/violin/_stream.py +++ b/plotly/validators/violin/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="violin", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/violin/_text.py b/plotly/validators/violin/_text.py index 81fcf55f8f..273dca2cdb 100644 --- a/plotly/validators/violin/_text.py +++ b/plotly/validators/violin/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="violin", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/violin/_textsrc.py b/plotly/validators/violin/_textsrc.py index 1a4b39f804..69b22aef38 100644 --- a/plotly/validators/violin/_textsrc.py +++ b/plotly/validators/violin/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="violin", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_uid.py b/plotly/validators/violin/_uid.py index 5cb00b2251..58e2e87b41 100644 --- a/plotly/validators/violin/_uid.py +++ b/plotly/validators/violin/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="violin", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/violin/_uirevision.py b/plotly/validators/violin/_uirevision.py index 0ad0a112bf..04416c4ef8 100644 --- a/plotly/validators/violin/_uirevision.py +++ b/plotly/validators/violin/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="violin", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_unselected.py b/plotly/validators/violin/_unselected.py index a05cab50b5..8bb3d12dec 100644 --- a/plotly/validators/violin/_unselected.py +++ b/plotly/validators/violin/_unselected.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UnselectedValidator(_plotly_utils.basevalidators.CompoundValidator): +class UnselectedValidator(_bv.CompoundValidator): def __init__(self, plotly_name="unselected", parent_name="violin", **kwargs): - super(UnselectedValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Unselected"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.violin.unselected. - Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/violin/_visible.py b/plotly/validators/violin/_visible.py index 4771b82a3a..7378abfd40 100644 --- a/plotly/validators/violin/_visible.py +++ b/plotly/validators/violin/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="violin", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/violin/_width.py b/plotly/validators/violin/_width.py index d2195a3d2b..cd58c4920d 100644 --- a/plotly/validators/violin/_width.py +++ b/plotly/validators/violin/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/_x.py b/plotly/validators/violin/_x.py index 7391cd6f57..9a1dc83a7f 100644 --- a/plotly/validators/violin/_x.py +++ b/plotly/validators/violin/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="violin", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/violin/_x0.py b/plotly/validators/violin/_x0.py index b9524e8d9d..de03205da0 100644 --- a/plotly/validators/violin/_x0.py +++ b/plotly/validators/violin/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="violin", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/violin/_xaxis.py b/plotly/validators/violin/_xaxis.py index d33cc6a66e..8cc1c6e710 100644 --- a/plotly/validators/violin/_xaxis.py +++ b/plotly/validators/violin/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="violin", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/violin/_xhoverformat.py b/plotly/validators/violin/_xhoverformat.py index f7e12ee84c..950ad7b384 100644 --- a/plotly/validators/violin/_xhoverformat.py +++ b/plotly/validators/violin/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="violin", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_xsrc.py b/plotly/validators/violin/_xsrc.py index 1bdb453ec4..1abe411b3e 100644 --- a/plotly/validators/violin/_xsrc.py +++ b/plotly/validators/violin/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="violin", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_y.py b/plotly/validators/violin/_y.py index b93ea417a3..287a238f88 100644 --- a/plotly/validators/violin/_y.py +++ b/plotly/validators/violin/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="violin", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/violin/_y0.py b/plotly/validators/violin/_y0.py index bcd6829204..eb9fe6b3a0 100644 --- a/plotly/validators/violin/_y0.py +++ b/plotly/validators/violin/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="violin", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/violin/_yaxis.py b/plotly/validators/violin/_yaxis.py index 755a91c271..ee9b0fd487 100644 --- a/plotly/validators/violin/_yaxis.py +++ b/plotly/validators/violin/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="violin", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/violin/_yhoverformat.py b/plotly/validators/violin/_yhoverformat.py index 69d96fa1ed..8e544f381b 100644 --- a/plotly/validators/violin/_yhoverformat.py +++ b/plotly/validators/violin/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="violin", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_ysrc.py b/plotly/validators/violin/_ysrc.py index aaff2b3f1e..f3ed3f0327 100644 --- a/plotly/validators/violin/_ysrc.py +++ b/plotly/validators/violin/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="violin", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/_zorder.py b/plotly/validators/violin/_zorder.py index b9a46cf558..da833a692f 100644 --- a/plotly/validators/violin/_zorder.py +++ b/plotly/validators/violin/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="violin", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/violin/box/__init__.py b/plotly/validators/violin/box/__init__.py index e10d0b18d3..1075b67a07 100644 --- a/plotly/validators/violin/box/__init__.py +++ b/plotly/validators/violin/box/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._line import LineValidator - from ._fillcolor import FillcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._line.LineValidator", - "._fillcolor.FillcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._visible.VisibleValidator", + "._line.LineValidator", + "._fillcolor.FillcolorValidator", + ], +) diff --git a/plotly/validators/violin/box/_fillcolor.py b/plotly/validators/violin/box/_fillcolor.py index d27a2acbb2..588eb5abf9 100644 --- a/plotly/validators/violin/box/_fillcolor.py +++ b/plotly/validators/violin/box/_fillcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class FillcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="fillcolor", parent_name="violin.box", **kwargs): - super(FillcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/box/_line.py b/plotly/validators/violin/box/_line.py index ac2f81cfc8..1e434c48e1 100644 --- a/plotly/validators/violin/box/_line.py +++ b/plotly/validators/violin/box/_line.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="violin.box", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the inner box plot bounding line color. - width - Sets the inner box plot bounding line width. """, ), **kwargs, diff --git a/plotly/validators/violin/box/_visible.py b/plotly/validators/violin/box/_visible.py index e96053caac..aecf8d4dee 100644 --- a/plotly/validators/violin/box/_visible.py +++ b/plotly/validators/violin/box/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="violin.box", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/violin/box/_width.py b/plotly/validators/violin/box/_width.py index 3297389c70..fe39e1d867 100644 --- a/plotly/validators/violin/box/_width.py +++ b/plotly/validators/violin/box/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin.box", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/box/line/__init__.py b/plotly/validators/violin/box/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/violin/box/line/__init__.py +++ b/plotly/validators/violin/box/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/violin/box/line/_color.py b/plotly/validators/violin/box/line/_color.py index 28b2ea677e..3136b26e40 100644 --- a/plotly/validators/violin/box/line/_color.py +++ b/plotly/validators/violin/box/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="violin.box.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/box/line/_width.py b/plotly/validators/violin/box/line/_width.py index 8759f5e4b1..6265e6d84d 100644 --- a/plotly/validators/violin/box/line/_width.py +++ b/plotly/validators/violin/box/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin.box.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/hoverlabel/__init__.py b/plotly/validators/violin/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/violin/hoverlabel/__init__.py +++ b/plotly/validators/violin/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/violin/hoverlabel/_align.py b/plotly/validators/violin/hoverlabel/_align.py index 98c1da48da..8c42c1fdbd 100644 --- a/plotly/validators/violin/hoverlabel/_align.py +++ b/plotly/validators/violin/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="violin.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/violin/hoverlabel/_alignsrc.py b/plotly/validators/violin/hoverlabel/_alignsrc.py index 03c37f6c6a..5af369022d 100644 --- a/plotly/validators/violin/hoverlabel/_alignsrc.py +++ b/plotly/validators/violin/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="violin.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/_bgcolor.py b/plotly/validators/violin/hoverlabel/_bgcolor.py index e55c4dafd4..04f94ff66e 100644 --- a/plotly/validators/violin/hoverlabel/_bgcolor.py +++ b/plotly/validators/violin/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="violin.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/violin/hoverlabel/_bgcolorsrc.py b/plotly/validators/violin/hoverlabel/_bgcolorsrc.py index c578ef8e91..f4024e6cf2 100644 --- a/plotly/validators/violin/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/violin/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="violin.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/_bordercolor.py b/plotly/validators/violin/hoverlabel/_bordercolor.py index 25d19bc535..1d436cf89f 100644 --- a/plotly/validators/violin/hoverlabel/_bordercolor.py +++ b/plotly/validators/violin/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="violin.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/violin/hoverlabel/_bordercolorsrc.py b/plotly/validators/violin/hoverlabel/_bordercolorsrc.py index 2f862e00a2..70c8d65b50 100644 --- a/plotly/validators/violin/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/violin/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="violin.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/_font.py b/plotly/validators/violin/hoverlabel/_font.py index 8c43898037..aa51e97838 100644 --- a/plotly/validators/violin/hoverlabel/_font.py +++ b/plotly/validators/violin/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="violin.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/violin/hoverlabel/_namelength.py b/plotly/validators/violin/hoverlabel/_namelength.py index 994b5c4db6..2b3e372815 100644 --- a/plotly/validators/violin/hoverlabel/_namelength.py +++ b/plotly/validators/violin/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="violin.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/violin/hoverlabel/_namelengthsrc.py b/plotly/validators/violin/hoverlabel/_namelengthsrc.py index 4e961d627a..a4f4630ef3 100644 --- a/plotly/validators/violin/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/violin/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="violin.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/__init__.py b/plotly/validators/violin/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/violin/hoverlabel/font/__init__.py +++ b/plotly/validators/violin/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/violin/hoverlabel/font/_color.py b/plotly/validators/violin/hoverlabel/font/_color.py index 3ce818bfcb..51c9a93e3c 100644 --- a/plotly/validators/violin/hoverlabel/font/_color.py +++ b/plotly/validators/violin/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="violin.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/violin/hoverlabel/font/_colorsrc.py b/plotly/validators/violin/hoverlabel/font/_colorsrc.py index 92bda99163..2d8d0c7549 100644 --- a/plotly/validators/violin/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/violin/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_family.py b/plotly/validators/violin/hoverlabel/font/_family.py index f024c13c14..71b0ba9acb 100644 --- a/plotly/validators/violin/hoverlabel/font/_family.py +++ b/plotly/validators/violin/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="violin.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/violin/hoverlabel/font/_familysrc.py b/plotly/validators/violin/hoverlabel/font/_familysrc.py index 0690eb5f5e..3f182f80b4 100644 --- a/plotly/validators/violin/hoverlabel/font/_familysrc.py +++ b/plotly/validators/violin/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_lineposition.py b/plotly/validators/violin/hoverlabel/font/_lineposition.py index 9b67ce9d5c..3a2706258d 100644 --- a/plotly/validators/violin/hoverlabel/font/_lineposition.py +++ b/plotly/validators/violin/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="violin.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/violin/hoverlabel/font/_linepositionsrc.py b/plotly/validators/violin/hoverlabel/font/_linepositionsrc.py index 2689c37b62..638cd99e26 100644 --- a/plotly/validators/violin/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/violin/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="violin.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_shadow.py b/plotly/validators/violin/hoverlabel/font/_shadow.py index 3b91703e46..f4123fac04 100644 --- a/plotly/validators/violin/hoverlabel/font/_shadow.py +++ b/plotly/validators/violin/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="violin.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/violin/hoverlabel/font/_shadowsrc.py b/plotly/validators/violin/hoverlabel/font/_shadowsrc.py index d7a7957b3c..0c01b0f2f2 100644 --- a/plotly/validators/violin/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/violin/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_size.py b/plotly/validators/violin/hoverlabel/font/_size.py index 31ec9b10a4..4a5a95b038 100644 --- a/plotly/validators/violin/hoverlabel/font/_size.py +++ b/plotly/validators/violin/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="violin.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/violin/hoverlabel/font/_sizesrc.py b/plotly/validators/violin/hoverlabel/font/_sizesrc.py index f6952a0049..6ce3d21b8a 100644 --- a/plotly/validators/violin/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/violin/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_style.py b/plotly/validators/violin/hoverlabel/font/_style.py index 3e54c947d5..5b395adc33 100644 --- a/plotly/validators/violin/hoverlabel/font/_style.py +++ b/plotly/validators/violin/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="violin.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/violin/hoverlabel/font/_stylesrc.py b/plotly/validators/violin/hoverlabel/font/_stylesrc.py index 84c5310301..02cc734735 100644 --- a/plotly/validators/violin/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/violin/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_textcase.py b/plotly/validators/violin/hoverlabel/font/_textcase.py index 63e0821079..42b216ae5d 100644 --- a/plotly/validators/violin/hoverlabel/font/_textcase.py +++ b/plotly/validators/violin/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="violin.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/violin/hoverlabel/font/_textcasesrc.py b/plotly/validators/violin/hoverlabel/font/_textcasesrc.py index 59e0715919..831a4265a1 100644 --- a/plotly/validators/violin/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/violin/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_variant.py b/plotly/validators/violin/hoverlabel/font/_variant.py index 1c2ef5bb25..e29658804d 100644 --- a/plotly/validators/violin/hoverlabel/font/_variant.py +++ b/plotly/validators/violin/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="violin.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/violin/hoverlabel/font/_variantsrc.py b/plotly/validators/violin/hoverlabel/font/_variantsrc.py index bf94c96ad7..fbbcd204d4 100644 --- a/plotly/validators/violin/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/violin/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/hoverlabel/font/_weight.py b/plotly/validators/violin/hoverlabel/font/_weight.py index 1117ec9dc1..603d465887 100644 --- a/plotly/validators/violin/hoverlabel/font/_weight.py +++ b/plotly/validators/violin/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="violin.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/violin/hoverlabel/font/_weightsrc.py b/plotly/validators/violin/hoverlabel/font/_weightsrc.py index 585e65673d..6551b52566 100644 --- a/plotly/validators/violin/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/violin/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="violin.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/violin/legendgrouptitle/__init__.py b/plotly/validators/violin/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/violin/legendgrouptitle/__init__.py +++ b/plotly/validators/violin/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/violin/legendgrouptitle/_font.py b/plotly/validators/violin/legendgrouptitle/_font.py index 602f31327b..9bce40dd3c 100644 --- a/plotly/validators/violin/legendgrouptitle/_font.py +++ b/plotly/validators/violin/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="violin.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/violin/legendgrouptitle/_text.py b/plotly/validators/violin/legendgrouptitle/_text.py index 591dd130ca..522fce3da6 100644 --- a/plotly/validators/violin/legendgrouptitle/_text.py +++ b/plotly/validators/violin/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="violin.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/legendgrouptitle/font/__init__.py b/plotly/validators/violin/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/violin/legendgrouptitle/font/__init__.py +++ b/plotly/validators/violin/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/violin/legendgrouptitle/font/_color.py b/plotly/validators/violin/legendgrouptitle/font/_color.py index 40c3b86544..01ad70f5e3 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_color.py +++ b/plotly/validators/violin/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="violin.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/legendgrouptitle/font/_family.py b/plotly/validators/violin/legendgrouptitle/font/_family.py index 372e622f25..22da34a391 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_family.py +++ b/plotly/validators/violin/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="violin.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/violin/legendgrouptitle/font/_lineposition.py b/plotly/validators/violin/legendgrouptitle/font/_lineposition.py index df9ccadd19..f4fd4d676e 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/violin/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="violin.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/violin/legendgrouptitle/font/_shadow.py b/plotly/validators/violin/legendgrouptitle/font/_shadow.py index 6eb96dd199..fcafde8ef6 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/violin/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="violin.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/legendgrouptitle/font/_size.py b/plotly/validators/violin/legendgrouptitle/font/_size.py index 1fc7e29c3d..99568c9066 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_size.py +++ b/plotly/validators/violin/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="violin.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/violin/legendgrouptitle/font/_style.py b/plotly/validators/violin/legendgrouptitle/font/_style.py index 2f1ea404f8..88767dd87b 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_style.py +++ b/plotly/validators/violin/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="violin.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/violin/legendgrouptitle/font/_textcase.py b/plotly/validators/violin/legendgrouptitle/font/_textcase.py index f27d38939f..2ef494b17c 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/violin/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="violin.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/violin/legendgrouptitle/font/_variant.py b/plotly/validators/violin/legendgrouptitle/font/_variant.py index e03b238d5f..f14bd7d820 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_variant.py +++ b/plotly/validators/violin/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="violin.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/violin/legendgrouptitle/font/_weight.py b/plotly/validators/violin/legendgrouptitle/font/_weight.py index 7c23be9ee8..9fd3492805 100644 --- a/plotly/validators/violin/legendgrouptitle/font/_weight.py +++ b/plotly/validators/violin/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="violin.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/violin/line/__init__.py b/plotly/validators/violin/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/violin/line/__init__.py +++ b/plotly/validators/violin/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/violin/line/_color.py b/plotly/validators/violin/line/_color.py index 3f9bd1696f..5b9f5ad496 100644 --- a/plotly/validators/violin/line/_color.py +++ b/plotly/validators/violin/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="violin.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/line/_width.py b/plotly/validators/violin/line/_width.py index 9168699e17..b00396357d 100644 --- a/plotly/validators/violin/line/_width.py +++ b/plotly/validators/violin/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/marker/__init__.py b/plotly/validators/violin/marker/__init__.py index 59cc1848f1..e15653f2f3 100644 --- a/plotly/validators/violin/marker/__init__.py +++ b/plotly/validators/violin/marker/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._symbol import SymbolValidator - from ._size import SizeValidator - from ._outliercolor import OutliercolorValidator - from ._opacity import OpacityValidator - from ._line import LineValidator - from ._color import ColorValidator - from ._angle import AngleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._symbol.SymbolValidator", - "._size.SizeValidator", - "._outliercolor.OutliercolorValidator", - "._opacity.OpacityValidator", - "._line.LineValidator", - "._color.ColorValidator", - "._angle.AngleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._symbol.SymbolValidator", + "._size.SizeValidator", + "._outliercolor.OutliercolorValidator", + "._opacity.OpacityValidator", + "._line.LineValidator", + "._color.ColorValidator", + "._angle.AngleValidator", + ], +) diff --git a/plotly/validators/violin/marker/_angle.py b/plotly/validators/violin/marker/_angle.py index bb12f00731..1434ccef9e 100644 --- a/plotly/validators/violin/marker/_angle.py +++ b/plotly/validators/violin/marker/_angle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AngleValidator(_plotly_utils.basevalidators.AngleValidator): +class AngleValidator(_bv.AngleValidator): def __init__(self, plotly_name="angle", parent_name="violin.marker", **kwargs): - super(AngleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/violin/marker/_color.py b/plotly/validators/violin/marker/_color.py index 1b9e537f7e..a6128799a0 100644 --- a/plotly/validators/violin/marker/_color.py +++ b/plotly/validators/violin/marker/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="violin.marker", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/violin/marker/_line.py b/plotly/validators/violin/marker/_line.py index 0a64320e15..7e43dc4b83 100644 --- a/plotly/validators/violin/marker/_line.py +++ b/plotly/validators/violin/marker/_line.py @@ -1,31 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="violin.marker", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker.line color. It accepts either a - specific color or an array of numbers that are - mapped to the colorscale relative to the max - and min values of the array or relative to - `marker.line.cmin` and `marker.line.cmax` if - set. - outliercolor - Sets the border line color of the outlier - sample points. Defaults to marker.color - outlierwidth - Sets the border line width (in px) of the - outlier sample points. - width - Sets the width (in px) of the lines bounding - the marker points. """, ), **kwargs, diff --git a/plotly/validators/violin/marker/_opacity.py b/plotly/validators/violin/marker/_opacity.py index 54b1ed78cf..ac2406fe5c 100644 --- a/plotly/validators/violin/marker/_opacity.py +++ b/plotly/validators/violin/marker/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="violin.marker", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), diff --git a/plotly/validators/violin/marker/_outliercolor.py b/plotly/validators/violin/marker/_outliercolor.py index 3ffa778f15..b56219a550 100644 --- a/plotly/validators/violin/marker/_outliercolor.py +++ b/plotly/validators/violin/marker/_outliercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutliercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outliercolor", parent_name="violin.marker", **kwargs ): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/marker/_size.py b/plotly/validators/violin/marker/_size.py index fc4079e7d3..fe58c1f23e 100644 --- a/plotly/validators/violin/marker/_size.py +++ b/plotly/validators/violin/marker/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="violin.marker", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/marker/_symbol.py b/plotly/validators/violin/marker/_symbol.py index 4dffec4060..b3681979a6 100644 --- a/plotly/validators/violin/marker/_symbol.py +++ b/plotly/validators/violin/marker/_symbol.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SymbolValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SymbolValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="symbol", parent_name="violin.marker", **kwargs): - super(SymbolValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop( diff --git a/plotly/validators/violin/marker/line/__init__.py b/plotly/validators/violin/marker/line/__init__.py index 7778bf581e..e296cd4850 100644 --- a/plotly/validators/violin/marker/line/__init__.py +++ b/plotly/validators/violin/marker/line/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._outlierwidth import OutlierwidthValidator - from ._outliercolor import OutliercolorValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._outlierwidth.OutlierwidthValidator", - "._outliercolor.OutliercolorValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._width.WidthValidator", + "._outlierwidth.OutlierwidthValidator", + "._outliercolor.OutliercolorValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/violin/marker/line/_color.py b/plotly/validators/violin/marker/line/_color.py index c683688bfb..b1a6f26a5b 100644 --- a/plotly/validators/violin/marker/line/_color.py +++ b/plotly/validators/violin/marker/line/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="violin.marker.line", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/violin/marker/line/_outliercolor.py b/plotly/validators/violin/marker/line/_outliercolor.py index c227746509..3ccfec8a54 100644 --- a/plotly/validators/violin/marker/line/_outliercolor.py +++ b/plotly/validators/violin/marker/line/_outliercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutliercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutliercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outliercolor", parent_name="violin.marker.line", **kwargs ): - super(OutliercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/marker/line/_outlierwidth.py b/plotly/validators/violin/marker/line/_outlierwidth.py index d58dcb7657..8d04aad873 100644 --- a/plotly/validators/violin/marker/line/_outlierwidth.py +++ b/plotly/validators/violin/marker/line/_outlierwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlierwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlierwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlierwidth", parent_name="violin.marker.line", **kwargs ): - super(OutlierwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/marker/line/_width.py b/plotly/validators/violin/marker/line/_width.py index b7515c2a91..90b4f5902e 100644 --- a/plotly/validators/violin/marker/line/_width.py +++ b/plotly/validators/violin/marker/line/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin.marker.line", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/meanline/__init__.py b/plotly/validators/violin/meanline/__init__.py index 57028e9aac..2e1ba96792 100644 --- a/plotly/validators/violin/meanline/__init__.py +++ b/plotly/validators/violin/meanline/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._width.WidthValidator", - "._visible.VisibleValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._visible.VisibleValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/violin/meanline/_color.py b/plotly/validators/violin/meanline/_color.py index 8baa987bd2..47972a577f 100644 --- a/plotly/validators/violin/meanline/_color.py +++ b/plotly/validators/violin/meanline/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="violin.meanline", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/meanline/_visible.py b/plotly/validators/violin/meanline/_visible.py index b7d9e09202..ebbd6af5b8 100644 --- a/plotly/validators/violin/meanline/_visible.py +++ b/plotly/validators/violin/meanline/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="visible", parent_name="violin.meanline", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/violin/meanline/_width.py b/plotly/validators/violin/meanline/_width.py index 4e62b834f3..622e8ff85b 100644 --- a/plotly/validators/violin/meanline/_width.py +++ b/plotly/validators/violin/meanline/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="violin.meanline", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/selected/__init__.py b/plotly/validators/violin/selected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/violin/selected/__init__.py +++ b/plotly/validators/violin/selected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/violin/selected/_marker.py b/plotly/validators/violin/selected/_marker.py index 44adbebc91..45d2d51a11 100644 --- a/plotly/validators/violin/selected/_marker.py +++ b/plotly/validators/violin/selected/_marker.py @@ -1,21 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="violin.selected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of selected points. - opacity - Sets the marker opacity of selected points. - size - Sets the marker size of selected points. """, ), **kwargs, diff --git a/plotly/validators/violin/selected/marker/__init__.py b/plotly/validators/violin/selected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/violin/selected/marker/__init__.py +++ b/plotly/validators/violin/selected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/violin/selected/marker/_color.py b/plotly/validators/violin/selected/marker/_color.py index 62d77d9547..0637ac5018 100644 --- a/plotly/validators/violin/selected/marker/_color.py +++ b/plotly/validators/violin/selected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="violin.selected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/selected/marker/_opacity.py b/plotly/validators/violin/selected/marker/_opacity.py index 26139543ba..77f59d641f 100644 --- a/plotly/validators/violin/selected/marker/_opacity.py +++ b/plotly/validators/violin/selected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="violin.selected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/selected/marker/_size.py b/plotly/validators/violin/selected/marker/_size.py index 111fa76f33..d2d86f50ea 100644 --- a/plotly/validators/violin/selected/marker/_size.py +++ b/plotly/validators/violin/selected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="violin.selected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/violin/stream/__init__.py b/plotly/validators/violin/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/violin/stream/__init__.py +++ b/plotly/validators/violin/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/violin/stream/_maxpoints.py b/plotly/validators/violin/stream/_maxpoints.py index b931754a2d..264d430b22 100644 --- a/plotly/validators/violin/stream/_maxpoints.py +++ b/plotly/validators/violin/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="violin.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/stream/_token.py b/plotly/validators/violin/stream/_token.py index d83c3c7377..d6e39d2d76 100644 --- a/plotly/validators/violin/stream/_token.py +++ b/plotly/validators/violin/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="violin.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/violin/unselected/__init__.py b/plotly/validators/violin/unselected/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/violin/unselected/__init__.py +++ b/plotly/validators/violin/unselected/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/violin/unselected/_marker.py b/plotly/validators/violin/unselected/_marker.py index 7bad4942f1..831207012e 100644 --- a/plotly/validators/violin/unselected/_marker.py +++ b/plotly/validators/violin/unselected/_marker.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="violin.unselected", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of unselected points, - applied only when a selection exists. - opacity - Sets the marker opacity of unselected points, - applied only when a selection exists. - size - Sets the marker size of unselected points, - applied only when a selection exists. """, ), **kwargs, diff --git a/plotly/validators/violin/unselected/marker/__init__.py b/plotly/validators/violin/unselected/marker/__init__.py index 8c321a38bc..c9c7226fe4 100644 --- a/plotly/validators/violin/unselected/marker/__init__.py +++ b/plotly/validators/violin/unselected/marker/__init__.py @@ -1,19 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._size import SizeValidator - from ._opacity import OpacityValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._size.SizeValidator", - "._opacity.OpacityValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._size.SizeValidator", "._opacity.OpacityValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/violin/unselected/marker/_color.py b/plotly/validators/violin/unselected/marker/_color.py index 02c28349df..4d5fcd42ea 100644 --- a/plotly/validators/violin/unselected/marker/_color.py +++ b/plotly/validators/violin/unselected/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="violin.unselected.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/violin/unselected/marker/_opacity.py b/plotly/validators/violin/unselected/marker/_opacity.py index acdbc93856..758b58f068 100644 --- a/plotly/validators/violin/unselected/marker/_opacity.py +++ b/plotly/validators/violin/unselected/marker/_opacity.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__( self, plotly_name="opacity", parent_name="violin.unselected.marker", **kwargs ): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/violin/unselected/marker/_size.py b/plotly/validators/violin/unselected/marker/_size.py index 06eb018ee0..24758ba599 100644 --- a/plotly/validators/violin/unselected/marker/_size.py +++ b/plotly/validators/violin/unselected/marker/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="violin.unselected.marker", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/__init__.py b/plotly/validators/volume/__init__.py index bad97b9a27..dd485aa43a 100644 --- a/plotly/validators/volume/__init__.py +++ b/plotly/validators/volume/__init__.py @@ -1,135 +1,70 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zsrc import ZsrcValidator - from ._zhoverformat import ZhoverformatValidator - from ._z import ZValidator - from ._ysrc import YsrcValidator - from ._yhoverformat import YhoverformatValidator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xhoverformat import XhoverformatValidator - from ._x import XValidator - from ._visible import VisibleValidator - from ._valuesrc import ValuesrcValidator - from ._valuehoverformat import ValuehoverformatValidator - from ._value import ValueValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._textsrc import TextsrcValidator - from ._text import TextValidator - from ._surface import SurfaceValidator - from ._stream import StreamValidator - from ._spaceframe import SpaceframeValidator - from ._slices import SlicesValidator - from ._showscale import ShowscaleValidator - from ._showlegend import ShowlegendValidator - from ._scene import SceneValidator - from ._reversescale import ReversescaleValidator - from ._opacityscale import OpacityscaleValidator - from ._opacity import OpacityValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._lightposition import LightpositionValidator - from ._lighting import LightingValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._isomin import IsominValidator - from ._isomax import IsomaxValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._flatshading import FlatshadingValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._contour import ContourValidator - from ._colorscale import ColorscaleValidator - from ._colorbar import ColorbarValidator - from ._coloraxis import ColoraxisValidator - from ._cmin import CminValidator - from ._cmid import CmidValidator - from ._cmax import CmaxValidator - from ._cauto import CautoValidator - from ._caps import CapsValidator - from ._autocolorscale import AutocolorscaleValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zsrc.ZsrcValidator", - "._zhoverformat.ZhoverformatValidator", - "._z.ZValidator", - "._ysrc.YsrcValidator", - "._yhoverformat.YhoverformatValidator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xhoverformat.XhoverformatValidator", - "._x.XValidator", - "._visible.VisibleValidator", - "._valuesrc.ValuesrcValidator", - "._valuehoverformat.ValuehoverformatValidator", - "._value.ValueValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._textsrc.TextsrcValidator", - "._text.TextValidator", - "._surface.SurfaceValidator", - "._stream.StreamValidator", - "._spaceframe.SpaceframeValidator", - "._slices.SlicesValidator", - "._showscale.ShowscaleValidator", - "._showlegend.ShowlegendValidator", - "._scene.SceneValidator", - "._reversescale.ReversescaleValidator", - "._opacityscale.OpacityscaleValidator", - "._opacity.OpacityValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._lightposition.LightpositionValidator", - "._lighting.LightingValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._isomin.IsominValidator", - "._isomax.IsomaxValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._flatshading.FlatshadingValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._contour.ContourValidator", - "._colorscale.ColorscaleValidator", - "._colorbar.ColorbarValidator", - "._coloraxis.ColoraxisValidator", - "._cmin.CminValidator", - "._cmid.CmidValidator", - "._cmax.CmaxValidator", - "._cauto.CautoValidator", - "._caps.CapsValidator", - "._autocolorscale.AutocolorscaleValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zsrc.ZsrcValidator", + "._zhoverformat.ZhoverformatValidator", + "._z.ZValidator", + "._ysrc.YsrcValidator", + "._yhoverformat.YhoverformatValidator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xhoverformat.XhoverformatValidator", + "._x.XValidator", + "._visible.VisibleValidator", + "._valuesrc.ValuesrcValidator", + "._valuehoverformat.ValuehoverformatValidator", + "._value.ValueValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._textsrc.TextsrcValidator", + "._text.TextValidator", + "._surface.SurfaceValidator", + "._stream.StreamValidator", + "._spaceframe.SpaceframeValidator", + "._slices.SlicesValidator", + "._showscale.ShowscaleValidator", + "._showlegend.ShowlegendValidator", + "._scene.SceneValidator", + "._reversescale.ReversescaleValidator", + "._opacityscale.OpacityscaleValidator", + "._opacity.OpacityValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._lightposition.LightpositionValidator", + "._lighting.LightingValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._isomin.IsominValidator", + "._isomax.IsomaxValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._flatshading.FlatshadingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._contour.ContourValidator", + "._colorscale.ColorscaleValidator", + "._colorbar.ColorbarValidator", + "._coloraxis.ColoraxisValidator", + "._cmin.CminValidator", + "._cmid.CmidValidator", + "._cmax.CmaxValidator", + "._cauto.CautoValidator", + "._caps.CapsValidator", + "._autocolorscale.AutocolorscaleValidator", + ], +) diff --git a/plotly/validators/volume/_autocolorscale.py b/plotly/validators/volume/_autocolorscale.py index 2f2526b2d5..9f496676eb 100644 --- a/plotly/validators/volume/_autocolorscale.py +++ b/plotly/validators/volume/_autocolorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AutocolorscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class AutocolorscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="autocolorscale", parent_name="volume", **kwargs): - super(AutocolorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/volume/_caps.py b/plotly/validators/volume/_caps.py index 3ca43c7b4f..33c11f658a 100644 --- a/plotly/validators/volume/_caps.py +++ b/plotly/validators/volume/_caps.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CapsValidator(_plotly_utils.basevalidators.CompoundValidator): +class CapsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="caps", parent_name="volume", **kwargs): - super(CapsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Caps"), data_docs=kwargs.pop( "data_docs", """ - x - :class:`plotly.graph_objects.volume.caps.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.caps.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.caps.Z` - instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/volume/_cauto.py b/plotly/validators/volume/_cauto.py index 3fd71964d8..5c72cec2fc 100644 --- a/plotly/validators/volume/_cauto.py +++ b/plotly/validators/volume/_cauto.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CautoValidator(_plotly_utils.basevalidators.BooleanValidator): +class CautoValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cauto", parent_name="volume", **kwargs): - super(CautoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/volume/_cmax.py b/plotly/validators/volume/_cmax.py index 7f4653dddf..2029a2f6c6 100644 --- a/plotly/validators/volume/_cmax.py +++ b/plotly/validators/volume/_cmax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmaxValidator(_plotly_utils.basevalidators.NumberValidator): +class CmaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmax", parent_name="volume", **kwargs): - super(CmaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/volume/_cmid.py b/plotly/validators/volume/_cmid.py index ab642903a5..b7082d353e 100644 --- a/plotly/validators/volume/_cmid.py +++ b/plotly/validators/volume/_cmid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CmidValidator(_plotly_utils.basevalidators.NumberValidator): +class CmidValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmid", parent_name="volume", **kwargs): - super(CmidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), **kwargs, diff --git a/plotly/validators/volume/_cmin.py b/plotly/validators/volume/_cmin.py index 630476efb7..8df506bfd0 100644 --- a/plotly/validators/volume/_cmin.py +++ b/plotly/validators/volume/_cmin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CminValidator(_plotly_utils.basevalidators.NumberValidator): +class CminValidator(_bv.NumberValidator): def __init__(self, plotly_name="cmin", parent_name="volume", **kwargs): - super(CminValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"cauto": False}), **kwargs, diff --git a/plotly/validators/volume/_coloraxis.py b/plotly/validators/volume/_coloraxis.py index 0be6415077..1d653a794b 100644 --- a/plotly/validators/volume/_coloraxis.py +++ b/plotly/validators/volume/_coloraxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColoraxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class ColoraxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="coloraxis", parent_name="volume", **kwargs): - super(ColoraxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", None), edit_type=kwargs.pop("edit_type", "calc"), regex=kwargs.pop("regex", "/^coloraxis([2-9]|[1-9][0-9]+)?$/"), diff --git a/plotly/validators/volume/_colorbar.py b/plotly/validators/volume/_colorbar.py index 868ee3aa4f..951102ec25 100644 --- a/plotly/validators/volume/_colorbar.py +++ b/plotly/validators/volume/_colorbar.py @@ -1,278 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorbarValidator(_plotly_utils.basevalidators.CompoundValidator): +class ColorbarValidator(_bv.CompoundValidator): def __init__(self, plotly_name="colorbar", parent_name="volume", **kwargs): - super(ColorbarValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "ColorBar"), data_docs=kwargs.pop( "data_docs", """ - bgcolor - Sets the color of padded area. - bordercolor - Sets the axis line color. - borderwidth - Sets the width (in px) or the border enclosing - this color bar. - dtick - Sets the step in-between ticks on this axis. - Use with `tick0`. Must be a positive number, or - special strings available to "log" and "date" - axes. If the axis `type` is "log", then ticks - are set every 10^(n*dtick) where n is the tick - number. For example, to set a tick mark at 1, - 10, 100, 1000, ... set dtick to 1. To set tick - marks at 1, 100, 10000, ... set dtick to 2. To - set tick marks at 1, 5, 25, 125, 625, 3125, ... - set dtick to log_10(5), or 0.69897000433. "log" - has several special values; "L", where `f` - is a positive number, gives ticks linearly - spaced in value (but not position). For example - `tick0` = 0.1, `dtick` = "L0.5" will put ticks - at 0.1, 0.6, 1.1, 1.6 etc. To show powers of 10 - plus small digits between, use "D1" (all - digits) or "D2" (only 2 and 5). `tick0` is - ignored for "D1" and "D2". If the axis `type` - is "date", then you must convert the time to - milliseconds. For example, to set the interval - between ticks to one day, set `dtick` to - 86400000.0. "date" also has special values - "M" gives ticks spaced by a number of - months. `n` must be a positive integer. To set - ticks on the 15th of every third month, set - `tick0` to "2000-01-15" and `dtick` to "M3". To - set ticks every 4 years, set `dtick` to "M48" - exponentformat - Determines a formatting rule for the tick - exponents. For example, consider the number - 1,000,000,000. If "none", it appears as - 1,000,000,000. If "e", 1e+9. If "E", 1E+9. If - "power", 1x10^9 (with 9 in a super script). If - "SI", 1G. If "B", 1B. - labelalias - Replacement text for specific tick or hover - labels. For example using {US: 'USA', CA: - 'Canada'} changes US to USA and CA to Canada. - The labels we would have shown must match the - keys exactly, after adding any tickprefix or - ticksuffix. For negative numbers the minus sign - symbol used (U+2212) is wider than the regular - ascii dash. That means you need to use −1 - instead of -1. labelalias can be used with any - axis type, and both keys (if needed) and values - (if desired) can include html-like tags or - MathJax. - len - Sets the length of the color bar This measure - excludes the padding of both ends. That is, the - color bar length is this length minus the - padding on both ends. - lenmode - Determines whether this color bar's length - (i.e. the measure in the color variation - direction) is set in units of plot "fraction" - or in *pixels. Use `len` to set the value. - minexponent - Hide SI prefix for 10^n if |n| is below this - number. This only has an effect when - `tickformat` is "SI" or "B". - nticks - Specifies the maximum number of ticks for the - particular axis. The actual number of ticks - will be chosen automatically to be less than or - equal to `nticks`. Has an effect only if - `tickmode` is set to "auto". - orientation - Sets the orientation of the colorbar. - outlinecolor - Sets the axis line color. - outlinewidth - Sets the width (in px) of the axis line. - separatethousands - If "true", even 4-digit integers are separated - showexponent - If "all", all exponents are shown besides their - significands. If "first", only the exponent of - the first tick is shown. If "last", only the - exponent of the last tick is shown. If "none", - no exponents appear. - showticklabels - Determines whether or not the tick labels are - drawn. - showtickprefix - If "all", all tick labels are displayed with a - prefix. If "first", only the first tick is - displayed with a prefix. If "last", only the - last tick is displayed with a suffix. If - "none", tick prefixes are hidden. - showticksuffix - Same as `showtickprefix` but for tick suffixes. - thickness - Sets the thickness of the color bar This - measure excludes the size of the padding, ticks - and labels. - thicknessmode - Determines whether this color bar's thickness - (i.e. the measure in the constant color - direction) is set in units of plot "fraction" - or in "pixels". Use `thickness` to set the - value. - tick0 - Sets the placement of the first tick on this - axis. Use with `dtick`. If the axis `type` is - "log", then you must take the log of your - starting tick (e.g. to set the starting tick to - 100, set the `tick0` to 2) except when - `dtick`=*L* (see `dtick` for more info). If - the axis `type` is "date", it should be a date - string, like date data. If the axis `type` is - "category", it should be a number, using the - scale where each category is assigned a serial - number from zero in the order it appears. - tickangle - Sets the angle of the tick labels with respect - to the horizontal. For example, a `tickangle` - of -90 draws the tick labels vertically. - tickcolor - Sets the tick color. - tickfont - Sets the color bar's tick label font - tickformat - Sets the tick label formatting rule using d3 - formatting mini-languages which are very - similar to those in Python. For numbers, see: h - ttps://github.com/d3/d3-format/tree/v1.4.5#d3- - format. And for dates see: - https://github.com/d3/d3-time- - format/tree/v2.2.3#locale_format. We add two - items to d3's date formatter: "%h" for half of - the year as a decimal number as well as "%{n}f" - for fractional seconds with n digits. For - example, *2016-10-13 09:15:23.456* with - tickformat "%H~%M~%S.%2f" would display - "09~15~23.46" - tickformatstops - A tuple of :class:`plotly.graph_objects.volume. - colorbar.Tickformatstop` instances or dicts - with compatible properties - tickformatstopdefaults - When used in a template (as layout.template.dat - a.volume.colorbar.tickformatstopdefaults), sets - the default property values to use for elements - of volume.colorbar.tickformatstops - ticklabeloverflow - Determines how we handle tick labels that would - overflow either the graph div or the domain of - the axis. The default value for inside tick - labels is *hide past domain*. In other cases - the default is *hide past div*. - ticklabelposition - Determines where tick labels are drawn relative - to the ticks. Left and right options are used - when `orientation` is "h", top and bottom when - `orientation` is "v". - ticklabelstep - Sets the spacing between tick labels as - compared to the spacing between ticks. A value - of 1 (default) means each tick gets a label. A - value of 2 means shows every 2nd label. A - larger value n means only every nth tick is - labeled. `tick0` determines which labels are - shown. Not implemented for axes with `type` - "log" or "multicategory", or when `tickmode` is - "array". - ticklen - Sets the tick length (in px). - tickmode - Sets the tick mode for this axis. If "auto", - the number of ticks is set via `nticks`. If - "linear", the placement of the ticks is - determined by a starting position `tick0` and a - tick step `dtick` ("linear" is the default - value if `tick0` and `dtick` are provided). If - "array", the placement of the ticks is set via - `tickvals` and the tick text is `ticktext`. - ("array" is the default value if `tickvals` is - provided). - tickprefix - Sets a tick label prefix. - ticks - Determines whether ticks are drawn or not. If - "", this axis' ticks are not drawn. If - "outside" ("inside"), this axis' are drawn - outside (inside) the axis lines. - ticksuffix - Sets a tick label suffix. - ticktext - Sets the text displayed at the ticks position - via `tickvals`. Only has an effect if - `tickmode` is set to "array". Used with - `tickvals`. - ticktextsrc - Sets the source reference on Chart Studio Cloud - for `ticktext`. - tickvals - Sets the values at which ticks on this axis - appear. Only has an effect if `tickmode` is set - to "array". Used with `ticktext`. - tickvalssrc - Sets the source reference on Chart Studio Cloud - for `tickvals`. - tickwidth - Sets the tick width (in px). - title - :class:`plotly.graph_objects.volume.colorbar.Ti - tle` instance or dict with compatible - properties - x - Sets the x position with respect to `xref` of - the color bar (in plot fraction). When `xref` - is "paper", defaults to 1.02 when `orientation` - is "v" and 0.5 when `orientation` is "h". When - `xref` is "container", defaults to 1 when - `orientation` is "v" and 0.5 when `orientation` - is "h". Must be between 0 and 1 if `xref` is - "container" and between "-2" and 3 if `xref` is - "paper". - xanchor - Sets this color bar's horizontal position - anchor. This anchor binds the `x` position to - the "left", "center" or "right" of the color - bar. Defaults to "left" when `orientation` is - "v" and "center" when `orientation` is "h". - xpad - Sets the amount of padding (in px) along the x - direction. - xref - Sets the container `x` refers to. "container" - spans the entire `width` of the plot. "paper" - refers to the width of the plotting area only. - y - Sets the y position with respect to `yref` of - the color bar (in plot fraction). When `yref` - is "paper", defaults to 0.5 when `orientation` - is "v" and 1.02 when `orientation` is "h". When - `yref` is "container", defaults to 0.5 when - `orientation` is "v" and 1 when `orientation` - is "h". Must be between 0 and 1 if `yref` is - "container" and between "-2" and 3 if `yref` is - "paper". - yanchor - Sets this color bar's vertical position anchor - This anchor binds the `y` position to the - "top", "middle" or "bottom" of the color bar. - Defaults to "middle" when `orientation` is "v" - and "bottom" when `orientation` is "h". - ypad - Sets the amount of padding (in px) along the y - direction. - yref - Sets the container `y` refers to. "container" - spans the entire `height` of the plot. "paper" - refers to the height of the plotting area only. """, ), **kwargs, diff --git a/plotly/validators/volume/_colorscale.py b/plotly/validators/volume/_colorscale.py index 5e83710f9f..44cf7c6fb6 100644 --- a/plotly/validators/volume/_colorscale.py +++ b/plotly/validators/volume/_colorscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorscaleValidator(_plotly_utils.basevalidators.ColorscaleValidator): +class ColorscaleValidator(_bv.ColorscaleValidator): def __init__(self, plotly_name="colorscale", parent_name="volume", **kwargs): - super(ColorscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"autocolorscale": False}), **kwargs, diff --git a/plotly/validators/volume/_contour.py b/plotly/validators/volume/_contour.py index a5c1cd2271..3d7bf52a24 100644 --- a/plotly/validators/volume/_contour.py +++ b/plotly/validators/volume/_contour.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ContourValidator(_plotly_utils.basevalidators.CompoundValidator): +class ContourValidator(_bv.CompoundValidator): def __init__(self, plotly_name="contour", parent_name="volume", **kwargs): - super(ContourValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Contour"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the color of the contour lines. - show - Sets whether or not dynamic contours are shown - on hover - width - Sets the width of the contour lines. """, ), **kwargs, diff --git a/plotly/validators/volume/_customdata.py b/plotly/validators/volume/_customdata.py index 78519bc1e6..a6f26991ef 100644 --- a/plotly/validators/volume/_customdata.py +++ b/plotly/validators/volume/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="volume", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_customdatasrc.py b/plotly/validators/volume/_customdatasrc.py index d1836b85d3..0d787f9934 100644 --- a/plotly/validators/volume/_customdatasrc.py +++ b/plotly/validators/volume/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="volume", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_flatshading.py b/plotly/validators/volume/_flatshading.py index 427727e430..6741500ea2 100644 --- a/plotly/validators/volume/_flatshading.py +++ b/plotly/validators/volume/_flatshading.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FlatshadingValidator(_plotly_utils.basevalidators.BooleanValidator): +class FlatshadingValidator(_bv.BooleanValidator): def __init__(self, plotly_name="flatshading", parent_name="volume", **kwargs): - super(FlatshadingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_hoverinfo.py b/plotly/validators/volume/_hoverinfo.py index 25501fb55a..2115e3c456 100644 --- a/plotly/validators/volume/_hoverinfo.py +++ b/plotly/validators/volume/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="volume", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/volume/_hoverinfosrc.py b/plotly/validators/volume/_hoverinfosrc.py index 337db39841..b1506a4e1e 100644 --- a/plotly/validators/volume/_hoverinfosrc.py +++ b/plotly/validators/volume/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="volume", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_hoverlabel.py b/plotly/validators/volume/_hoverlabel.py index b0375beaea..1219df8923 100644 --- a/plotly/validators/volume/_hoverlabel.py +++ b/plotly/validators/volume/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="volume", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/volume/_hovertemplate.py b/plotly/validators/volume/_hovertemplate.py index 31f03fe8dd..4db4076b6e 100644 --- a/plotly/validators/volume/_hovertemplate.py +++ b/plotly/validators/volume/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="volume", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/volume/_hovertemplatesrc.py b/plotly/validators/volume/_hovertemplatesrc.py index c7d14b4476..3b27f4dec9 100644 --- a/plotly/validators/volume/_hovertemplatesrc.py +++ b/plotly/validators/volume/_hovertemplatesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertemplatesrc", parent_name="volume", **kwargs): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_hovertext.py b/plotly/validators/volume/_hovertext.py index b9570b24e3..88f9d179eb 100644 --- a/plotly/validators/volume/_hovertext.py +++ b/plotly/validators/volume/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="volume", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/volume/_hovertextsrc.py b/plotly/validators/volume/_hovertextsrc.py index 29c815fc12..0fd1bea170 100644 --- a/plotly/validators/volume/_hovertextsrc.py +++ b/plotly/validators/volume/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="volume", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_ids.py b/plotly/validators/volume/_ids.py index d5dc060e3c..0363e587bb 100644 --- a/plotly/validators/volume/_ids.py +++ b/plotly/validators/volume/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="volume", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_idssrc.py b/plotly/validators/volume/_idssrc.py index fb6d2546f7..30bf91f44e 100644 --- a/plotly/validators/volume/_idssrc.py +++ b/plotly/validators/volume/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="volume", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_isomax.py b/plotly/validators/volume/_isomax.py index 2031d8f297..ab4ba83a5d 100644 --- a/plotly/validators/volume/_isomax.py +++ b/plotly/validators/volume/_isomax.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsomaxValidator(_plotly_utils.basevalidators.NumberValidator): +class IsomaxValidator(_bv.NumberValidator): def __init__(self, plotly_name="isomax", parent_name="volume", **kwargs): - super(IsomaxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_isomin.py b/plotly/validators/volume/_isomin.py index 8fc4808c0e..6f89db6fc3 100644 --- a/plotly/validators/volume/_isomin.py +++ b/plotly/validators/volume/_isomin.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IsominValidator(_plotly_utils.basevalidators.NumberValidator): +class IsominValidator(_bv.NumberValidator): def __init__(self, plotly_name="isomin", parent_name="volume", **kwargs): - super(IsominValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_legend.py b/plotly/validators/volume/_legend.py index 8ef46b6e9e..dc4e876875 100644 --- a/plotly/validators/volume/_legend.py +++ b/plotly/validators/volume/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="volume", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/volume/_legendgroup.py b/plotly/validators/volume/_legendgroup.py index 560bd3449d..e79b625d2d 100644 --- a/plotly/validators/volume/_legendgroup.py +++ b/plotly/validators/volume/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="volume", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/volume/_legendgrouptitle.py b/plotly/validators/volume/_legendgrouptitle.py index aa90f0d603..c4695c0ed2 100644 --- a/plotly/validators/volume/_legendgrouptitle.py +++ b/plotly/validators/volume/_legendgrouptitle.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="volume", **kwargs): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/volume/_legendrank.py b/plotly/validators/volume/_legendrank.py index cc8f829ad7..31cac9d951 100644 --- a/plotly/validators/volume/_legendrank.py +++ b/plotly/validators/volume/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="volume", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/volume/_legendwidth.py b/plotly/validators/volume/_legendwidth.py index ee091daf63..7876136b11 100644 --- a/plotly/validators/volume/_legendwidth.py +++ b/plotly/validators/volume/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="volume", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/_lighting.py b/plotly/validators/volume/_lighting.py index a6dc7ec7fe..ba6c92770f 100644 --- a/plotly/validators/volume/_lighting.py +++ b/plotly/validators/volume/_lighting.py @@ -1,39 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightingValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lighting", parent_name="volume", **kwargs): - super(LightingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lighting"), data_docs=kwargs.pop( "data_docs", """ - ambient - Ambient light increases overall color - visibility but can wash out the image. - diffuse - Represents the extent that incident rays are - reflected in a range of angles. - facenormalsepsilon - Epsilon for face normals calculation avoids - math issues arising from degenerate geometry. - fresnel - Represents the reflectance as a dependency of - the viewing angle; e.g. paper is reflective - when viewing it from the edge of the paper - (almost 90 degrees), causing shine. - roughness - Alters specular reflection; the rougher the - surface, the wider and less contrasty the - shine. - specular - Represents the level that incident rays are - reflected in a single direction, causing shine. - vertexnormalsepsilon - Epsilon for vertex normals calculation avoids - math issues arising from degenerate geometry. """, ), **kwargs, diff --git a/plotly/validators/volume/_lightposition.py b/plotly/validators/volume/_lightposition.py index 0ec60509ba..021a02400e 100644 --- a/plotly/validators/volume/_lightposition.py +++ b/plotly/validators/volume/_lightposition.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LightpositionValidator(_plotly_utils.basevalidators.CompoundValidator): +class LightpositionValidator(_bv.CompoundValidator): def __init__(self, plotly_name="lightposition", parent_name="volume", **kwargs): - super(LightpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Lightposition"), data_docs=kwargs.pop( "data_docs", """ - x - Numeric vector, representing the X coordinate - for each vertex. - y - Numeric vector, representing the Y coordinate - for each vertex. - z - Numeric vector, representing the Z coordinate - for each vertex. """, ), **kwargs, diff --git a/plotly/validators/volume/_meta.py b/plotly/validators/volume/_meta.py index aa2a70ad64..363f0e8123 100644 --- a/plotly/validators/volume/_meta.py +++ b/plotly/validators/volume/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="volume", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/volume/_metasrc.py b/plotly/validators/volume/_metasrc.py index 559a211b88..1d9b80c230 100644 --- a/plotly/validators/volume/_metasrc.py +++ b/plotly/validators/volume/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="volume", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_name.py b/plotly/validators/volume/_name.py index 590af2b266..e407c5d790 100644 --- a/plotly/validators/volume/_name.py +++ b/plotly/validators/volume/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="volume", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/volume/_opacity.py b/plotly/validators/volume/_opacity.py index 38b093909b..6d3e3126d5 100644 --- a/plotly/validators/volume/_opacity.py +++ b/plotly/validators/volume/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="volume", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/_opacityscale.py b/plotly/validators/volume/_opacityscale.py index 27b8b604db..d484ff9920 100644 --- a/plotly/validators/volume/_opacityscale.py +++ b/plotly/validators/volume/_opacityscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityscaleValidator(_plotly_utils.basevalidators.AnyValidator): +class OpacityscaleValidator(_bv.AnyValidator): def __init__(self, plotly_name="opacityscale", parent_name="volume", **kwargs): - super(OpacityscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_reversescale.py b/plotly/validators/volume/_reversescale.py index d0e3e50648..0e9236c800 100644 --- a/plotly/validators/volume/_reversescale.py +++ b/plotly/validators/volume/_reversescale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ReversescaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ReversescaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="reversescale", parent_name="volume", **kwargs): - super(ReversescaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_scene.py b/plotly/validators/volume/_scene.py index ef43dfe33a..d56fc627f8 100644 --- a/plotly/validators/volume/_scene.py +++ b/plotly/validators/volume/_scene.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SceneValidator(_plotly_utils.basevalidators.SubplotidValidator): +class SceneValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="scene", parent_name="volume", **kwargs): - super(SceneValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "scene"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/volume/_showlegend.py b/plotly/validators/volume/_showlegend.py index 16d42b61a9..91857e99b0 100644 --- a/plotly/validators/volume/_showlegend.py +++ b/plotly/validators/volume/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="volume", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_showscale.py b/plotly/validators/volume/_showscale.py index 09feab94f5..5d2573c14b 100644 --- a/plotly/validators/volume/_showscale.py +++ b/plotly/validators/volume/_showscale.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowscaleValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowscaleValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showscale", parent_name="volume", **kwargs): - super(ShowscaleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_slices.py b/plotly/validators/volume/_slices.py index a8ed69ad1a..262fc41112 100644 --- a/plotly/validators/volume/_slices.py +++ b/plotly/validators/volume/_slices.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SlicesValidator(_plotly_utils.basevalidators.CompoundValidator): +class SlicesValidator(_bv.CompoundValidator): def __init__(self, plotly_name="slices", parent_name="volume", **kwargs): - super(SlicesValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Slices"), data_docs=kwargs.pop( "data_docs", """ - x - :class:`plotly.graph_objects.volume.slices.X` - instance or dict with compatible properties - y - :class:`plotly.graph_objects.volume.slices.Y` - instance or dict with compatible properties - z - :class:`plotly.graph_objects.volume.slices.Z` - instance or dict with compatible properties """, ), **kwargs, diff --git a/plotly/validators/volume/_spaceframe.py b/plotly/validators/volume/_spaceframe.py index c67077d140..f6d8df9447 100644 --- a/plotly/validators/volume/_spaceframe.py +++ b/plotly/validators/volume/_spaceframe.py @@ -1,26 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpaceframeValidator(_plotly_utils.basevalidators.CompoundValidator): +class SpaceframeValidator(_bv.CompoundValidator): def __init__(self, plotly_name="spaceframe", parent_name="volume", **kwargs): - super(SpaceframeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Spaceframe"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `spaceframe` - elements. The default fill value is 1 meaning - that they are entirely shaded. Applying a - `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Displays/hides tetrahedron shapes between - minimum and maximum iso-values. Often useful - when either caps or surfaces are disabled or - filled with values less than 1. """, ), **kwargs, diff --git a/plotly/validators/volume/_stream.py b/plotly/validators/volume/_stream.py index 9c0e63d5da..6b70ccdbda 100644 --- a/plotly/validators/volume/_stream.py +++ b/plotly/validators/volume/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="volume", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/volume/_surface.py b/plotly/validators/volume/_surface.py index 2ac70d5227..27a165511a 100644 --- a/plotly/validators/volume/_surface.py +++ b/plotly/validators/volume/_surface.py @@ -1,41 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SurfaceValidator(_plotly_utils.basevalidators.CompoundValidator): +class SurfaceValidator(_bv.CompoundValidator): def __init__(self, plotly_name="surface", parent_name="volume", **kwargs): - super(SurfaceValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Surface"), data_docs=kwargs.pop( "data_docs", """ - count - Sets the number of iso-surfaces between minimum - and maximum iso-values. By default this value - is 2 meaning that only minimum and maximum - surfaces would be drawn. - fill - Sets the fill ratio of the iso-surface. The - default fill value of the surface is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - pattern - Sets the surface pattern of the iso-surface 3-D - sections. The default pattern of the surface is - `all` meaning that the rest of surface elements - would be shaded. The check options (either 1 or - 2) could be used to draw half of the squares on - the surface. Using various combinations of - capital `A`, `B`, `C`, `D` and `E` may also be - used to reduce the number of triangles on the - iso-surfaces and creating other patterns of - interest. - show - Hides/displays surfaces between minimum and - maximum iso-values. """, ), **kwargs, diff --git a/plotly/validators/volume/_text.py b/plotly/validators/volume/_text.py index 953fb1ed5f..0d1f62abf8 100644 --- a/plotly/validators/volume/_text.py +++ b/plotly/validators/volume/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="volume", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/volume/_textsrc.py b/plotly/validators/volume/_textsrc.py index f3810a9632..d6c2a7a89d 100644 --- a/plotly/validators/volume/_textsrc.py +++ b/plotly/validators/volume/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="volume", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_uid.py b/plotly/validators/volume/_uid.py index cbd6dbfee1..696f225c90 100644 --- a/plotly/validators/volume/_uid.py +++ b/plotly/validators/volume/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="volume", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/volume/_uirevision.py b/plotly/validators/volume/_uirevision.py index 18ae368c7a..0c9b7113f5 100644 --- a/plotly/validators/volume/_uirevision.py +++ b/plotly/validators/volume/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="volume", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_value.py b/plotly/validators/volume/_value.py index 3d01802101..da7dbc4ada 100644 --- a/plotly/validators/volume/_value.py +++ b/plotly/validators/volume/_value.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ValueValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="value", parent_name="volume", **kwargs): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/volume/_valuehoverformat.py b/plotly/validators/volume/_valuehoverformat.py index de37484e98..f73a8cc4f2 100644 --- a/plotly/validators/volume/_valuehoverformat.py +++ b/plotly/validators/volume/_valuehoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuehoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ValuehoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="valuehoverformat", parent_name="volume", **kwargs): - super(ValuehoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_valuesrc.py b/plotly/validators/volume/_valuesrc.py index 90b461e8ed..fd720f5317 100644 --- a/plotly/validators/volume/_valuesrc.py +++ b/plotly/validators/volume/_valuesrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValuesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ValuesrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="valuesrc", parent_name="volume", **kwargs): - super(ValuesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_visible.py b/plotly/validators/volume/_visible.py index 5839b64d46..f9617a3e3a 100644 --- a/plotly/validators/volume/_visible.py +++ b/plotly/validators/volume/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="volume", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/volume/_x.py b/plotly/validators/volume/_x.py index bad81ad954..6e2f614712 100644 --- a/plotly/validators/volume/_x.py +++ b/plotly/validators/volume/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="volume", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/volume/_xhoverformat.py b/plotly/validators/volume/_xhoverformat.py index aa1c789505..b070fc66ea 100644 --- a/plotly/validators/volume/_xhoverformat.py +++ b/plotly/validators/volume/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="volume", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_xsrc.py b/plotly/validators/volume/_xsrc.py index 6dd4c7c11c..c9c209990f 100644 --- a/plotly/validators/volume/_xsrc.py +++ b/plotly/validators/volume/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="volume", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_y.py b/plotly/validators/volume/_y.py index 4856d47c60..4c552b01d9 100644 --- a/plotly/validators/volume/_y.py +++ b/plotly/validators/volume/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="volume", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/volume/_yhoverformat.py b/plotly/validators/volume/_yhoverformat.py index 952c8abcae..97eeb80e36 100644 --- a/plotly/validators/volume/_yhoverformat.py +++ b/plotly/validators/volume/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="volume", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_ysrc.py b/plotly/validators/volume/_ysrc.py index 81b7c481fb..132563810d 100644 --- a/plotly/validators/volume/_ysrc.py +++ b/plotly/validators/volume/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="volume", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/_z.py b/plotly/validators/volume/_z.py index 3344f4775f..4311e61177 100644 --- a/plotly/validators/volume/_z.py +++ b/plotly/validators/volume/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.DataArrayValidator): +class ZValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="z", parent_name="volume", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/volume/_zhoverformat.py b/plotly/validators/volume/_zhoverformat.py index 76962dba65..ac27cadd10 100644 --- a/plotly/validators/volume/_zhoverformat.py +++ b/plotly/validators/volume/_zhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class ZhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="zhoverformat", parent_name="volume", **kwargs): - super(ZhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/_zsrc.py b/plotly/validators/volume/_zsrc.py index 525ac4448a..fefeed5236 100644 --- a/plotly/validators/volume/_zsrc.py +++ b/plotly/validators/volume/_zsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ZsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="zsrc", parent_name="volume", **kwargs): - super(ZsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/caps/__init__.py b/plotly/validators/volume/caps/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/volume/caps/__init__.py +++ b/plotly/validators/volume/caps/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/volume/caps/_x.py b/plotly/validators/volume/caps/_x.py index ec36820892..9bb3b2245b 100644 --- a/plotly/validators/volume/caps/_x.py +++ b/plotly/validators/volume/caps/_x.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.CompoundValidator): +class XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="x", parent_name="volume.caps", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "X"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the x `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. """, ), **kwargs, diff --git a/plotly/validators/volume/caps/_y.py b/plotly/validators/volume/caps/_y.py index 742099a6a4..cd815ab115 100644 --- a/plotly/validators/volume/caps/_y.py +++ b/plotly/validators/volume/caps/_y.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.CompoundValidator): +class YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="y", parent_name="volume.caps", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the y `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. """, ), **kwargs, diff --git a/plotly/validators/volume/caps/_z.py b/plotly/validators/volume/caps/_z.py index e2cd6b89c7..ad7758ff03 100644 --- a/plotly/validators/volume/caps/_z.py +++ b/plotly/validators/volume/caps/_z.py @@ -1,28 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="z", parent_name="volume.caps", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Z"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `caps`. The default - fill value of the `caps` is 1 meaning that they - are entirely shaded. On the other hand Applying - a `fill` ratio less than one would allow the - creation of openings parallel to the edges. - show - Sets the fill ratio of the `slices`. The - default fill value of the z `slices` is 1 - meaning that they are entirely shaded. On the - other hand Applying a `fill` ratio less than - one would allow the creation of openings - parallel to the edges. """, ), **kwargs, diff --git a/plotly/validators/volume/caps/x/__init__.py b/plotly/validators/volume/caps/x/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/volume/caps/x/__init__.py +++ b/plotly/validators/volume/caps/x/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/volume/caps/x/_fill.py b/plotly/validators/volume/caps/x/_fill.py index 78d2fc67d4..18d13c7718 100644 --- a/plotly/validators/volume/caps/x/_fill.py +++ b/plotly/validators/volume/caps/x/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.caps.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/caps/x/_show.py b/plotly/validators/volume/caps/x/_show.py index b8c756e69e..3980bb39fa 100644 --- a/plotly/validators/volume/caps/x/_show.py +++ b/plotly/validators/volume/caps/x/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.caps.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/caps/y/__init__.py b/plotly/validators/volume/caps/y/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/volume/caps/y/__init__.py +++ b/plotly/validators/volume/caps/y/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/volume/caps/y/_fill.py b/plotly/validators/volume/caps/y/_fill.py index ab08833f38..da932037fc 100644 --- a/plotly/validators/volume/caps/y/_fill.py +++ b/plotly/validators/volume/caps/y/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.caps.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/caps/y/_show.py b/plotly/validators/volume/caps/y/_show.py index 60504380ba..34225a98e4 100644 --- a/plotly/validators/volume/caps/y/_show.py +++ b/plotly/validators/volume/caps/y/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.caps.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/caps/z/__init__.py b/plotly/validators/volume/caps/z/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/volume/caps/z/__init__.py +++ b/plotly/validators/volume/caps/z/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/volume/caps/z/_fill.py b/plotly/validators/volume/caps/z/_fill.py index 2e86e611ab..f4fbda1fd9 100644 --- a/plotly/validators/volume/caps/z/_fill.py +++ b/plotly/validators/volume/caps/z/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.caps.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/caps/z/_show.py b/plotly/validators/volume/caps/z/_show.py index c99ded1cc6..e39e556b72 100644 --- a/plotly/validators/volume/caps/z/_show.py +++ b/plotly/validators/volume/caps/z/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.caps.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/__init__.py b/plotly/validators/volume/colorbar/__init__.py index 84963a2c1b..abd0778e60 100644 --- a/plotly/validators/volume/colorbar/__init__.py +++ b/plotly/validators/volume/colorbar/__init__.py @@ -1,111 +1,58 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._yref import YrefValidator - from ._ypad import YpadValidator - from ._yanchor import YanchorValidator - from ._y import YValidator - from ._xref import XrefValidator - from ._xpad import XpadValidator - from ._xanchor import XanchorValidator - from ._x import XValidator - from ._title import TitleValidator - from ._tickwidth import TickwidthValidator - from ._tickvalssrc import TickvalssrcValidator - from ._tickvals import TickvalsValidator - from ._ticktextsrc import TicktextsrcValidator - from ._ticktext import TicktextValidator - from ._ticksuffix import TicksuffixValidator - from ._ticks import TicksValidator - from ._tickprefix import TickprefixValidator - from ._tickmode import TickmodeValidator - from ._ticklen import TicklenValidator - from ._ticklabelstep import TicklabelstepValidator - from ._ticklabelposition import TicklabelpositionValidator - from ._ticklabeloverflow import TicklabeloverflowValidator - from ._tickformatstopdefaults import TickformatstopdefaultsValidator - from ._tickformatstops import TickformatstopsValidator - from ._tickformat import TickformatValidator - from ._tickfont import TickfontValidator - from ._tickcolor import TickcolorValidator - from ._tickangle import TickangleValidator - from ._tick0 import Tick0Validator - from ._thicknessmode import ThicknessmodeValidator - from ._thickness import ThicknessValidator - from ._showticksuffix import ShowticksuffixValidator - from ._showtickprefix import ShowtickprefixValidator - from ._showticklabels import ShowticklabelsValidator - from ._showexponent import ShowexponentValidator - from ._separatethousands import SeparatethousandsValidator - from ._outlinewidth import OutlinewidthValidator - from ._outlinecolor import OutlinecolorValidator - from ._orientation import OrientationValidator - from ._nticks import NticksValidator - from ._minexponent import MinexponentValidator - from ._lenmode import LenmodeValidator - from ._len import LenValidator - from ._labelalias import LabelaliasValidator - from ._exponentformat import ExponentformatValidator - from ._dtick import DtickValidator - from ._borderwidth import BorderwidthValidator - from ._bordercolor import BordercolorValidator - from ._bgcolor import BgcolorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._yref.YrefValidator", - "._ypad.YpadValidator", - "._yanchor.YanchorValidator", - "._y.YValidator", - "._xref.XrefValidator", - "._xpad.XpadValidator", - "._xanchor.XanchorValidator", - "._x.XValidator", - "._title.TitleValidator", - "._tickwidth.TickwidthValidator", - "._tickvalssrc.TickvalssrcValidator", - "._tickvals.TickvalsValidator", - "._ticktextsrc.TicktextsrcValidator", - "._ticktext.TicktextValidator", - "._ticksuffix.TicksuffixValidator", - "._ticks.TicksValidator", - "._tickprefix.TickprefixValidator", - "._tickmode.TickmodeValidator", - "._ticklen.TicklenValidator", - "._ticklabelstep.TicklabelstepValidator", - "._ticklabelposition.TicklabelpositionValidator", - "._ticklabeloverflow.TicklabeloverflowValidator", - "._tickformatstopdefaults.TickformatstopdefaultsValidator", - "._tickformatstops.TickformatstopsValidator", - "._tickformat.TickformatValidator", - "._tickfont.TickfontValidator", - "._tickcolor.TickcolorValidator", - "._tickangle.TickangleValidator", - "._tick0.Tick0Validator", - "._thicknessmode.ThicknessmodeValidator", - "._thickness.ThicknessValidator", - "._showticksuffix.ShowticksuffixValidator", - "._showtickprefix.ShowtickprefixValidator", - "._showticklabels.ShowticklabelsValidator", - "._showexponent.ShowexponentValidator", - "._separatethousands.SeparatethousandsValidator", - "._outlinewidth.OutlinewidthValidator", - "._outlinecolor.OutlinecolorValidator", - "._orientation.OrientationValidator", - "._nticks.NticksValidator", - "._minexponent.MinexponentValidator", - "._lenmode.LenmodeValidator", - "._len.LenValidator", - "._labelalias.LabelaliasValidator", - "._exponentformat.ExponentformatValidator", - "._dtick.DtickValidator", - "._borderwidth.BorderwidthValidator", - "._bordercolor.BordercolorValidator", - "._bgcolor.BgcolorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._yref.YrefValidator", + "._ypad.YpadValidator", + "._yanchor.YanchorValidator", + "._y.YValidator", + "._xref.XrefValidator", + "._xpad.XpadValidator", + "._xanchor.XanchorValidator", + "._x.XValidator", + "._title.TitleValidator", + "._tickwidth.TickwidthValidator", + "._tickvalssrc.TickvalssrcValidator", + "._tickvals.TickvalsValidator", + "._ticktextsrc.TicktextsrcValidator", + "._ticktext.TicktextValidator", + "._ticksuffix.TicksuffixValidator", + "._ticks.TicksValidator", + "._tickprefix.TickprefixValidator", + "._tickmode.TickmodeValidator", + "._ticklen.TicklenValidator", + "._ticklabelstep.TicklabelstepValidator", + "._ticklabelposition.TicklabelpositionValidator", + "._ticklabeloverflow.TicklabeloverflowValidator", + "._tickformatstopdefaults.TickformatstopdefaultsValidator", + "._tickformatstops.TickformatstopsValidator", + "._tickformat.TickformatValidator", + "._tickfont.TickfontValidator", + "._tickcolor.TickcolorValidator", + "._tickangle.TickangleValidator", + "._tick0.Tick0Validator", + "._thicknessmode.ThicknessmodeValidator", + "._thickness.ThicknessValidator", + "._showticksuffix.ShowticksuffixValidator", + "._showtickprefix.ShowtickprefixValidator", + "._showticklabels.ShowticklabelsValidator", + "._showexponent.ShowexponentValidator", + "._separatethousands.SeparatethousandsValidator", + "._outlinewidth.OutlinewidthValidator", + "._outlinecolor.OutlinecolorValidator", + "._orientation.OrientationValidator", + "._nticks.NticksValidator", + "._minexponent.MinexponentValidator", + "._lenmode.LenmodeValidator", + "._len.LenValidator", + "._labelalias.LabelaliasValidator", + "._exponentformat.ExponentformatValidator", + "._dtick.DtickValidator", + "._borderwidth.BorderwidthValidator", + "._bordercolor.BordercolorValidator", + "._bgcolor.BgcolorValidator", + ], +) diff --git a/plotly/validators/volume/colorbar/_bgcolor.py b/plotly/validators/volume/colorbar/_bgcolor.py index 5e04811664..d14485af4f 100644 --- a/plotly/validators/volume/colorbar/_bgcolor.py +++ b/plotly/validators/volume/colorbar/_bgcolor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__(self, plotly_name="bgcolor", parent_name="volume.colorbar", **kwargs): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_bordercolor.py b/plotly/validators/volume/colorbar/_bordercolor.py index 3cf7dc93c5..ad6d1303bc 100644 --- a/plotly/validators/volume/colorbar/_bordercolor.py +++ b/plotly/validators/volume/colorbar/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="volume.colorbar", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_borderwidth.py b/plotly/validators/volume/colorbar/_borderwidth.py index 0fc61fa131..8ef385a5e3 100644 --- a/plotly/validators/volume/colorbar/_borderwidth.py +++ b/plotly/validators/volume/colorbar/_borderwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BorderwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class BorderwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="borderwidth", parent_name="volume.colorbar", **kwargs ): - super(BorderwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_dtick.py b/plotly/validators/volume/colorbar/_dtick.py index beb75921c0..d6e6ab7f8d 100644 --- a/plotly/validators/volume/colorbar/_dtick.py +++ b/plotly/validators/volume/colorbar/_dtick.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickValidator(_plotly_utils.basevalidators.AnyValidator): +class DtickValidator(_bv.AnyValidator): def __init__(self, plotly_name="dtick", parent_name="volume.colorbar", **kwargs): - super(DtickValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/volume/colorbar/_exponentformat.py b/plotly/validators/volume/colorbar/_exponentformat.py index 406ac26c3d..31e382b55e 100644 --- a/plotly/validators/volume/colorbar/_exponentformat.py +++ b/plotly/validators/volume/colorbar/_exponentformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ExponentformatValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ExponentformatValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="exponentformat", parent_name="volume.colorbar", **kwargs ): - super(ExponentformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["none", "e", "E", "power", "SI", "B"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_labelalias.py b/plotly/validators/volume/colorbar/_labelalias.py index e1eaf06e52..aa7e921102 100644 --- a/plotly/validators/volume/colorbar/_labelalias.py +++ b/plotly/validators/volume/colorbar/_labelalias.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LabelaliasValidator(_plotly_utils.basevalidators.AnyValidator): +class LabelaliasValidator(_bv.AnyValidator): def __init__( self, plotly_name="labelalias", parent_name="volume.colorbar", **kwargs ): - super(LabelaliasValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_len.py b/plotly/validators/volume/colorbar/_len.py index 031a3d5fc8..d5abfbf1f2 100644 --- a/plotly/validators/volume/colorbar/_len.py +++ b/plotly/validators/volume/colorbar/_len.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenValidator(_plotly_utils.basevalidators.NumberValidator): +class LenValidator(_bv.NumberValidator): def __init__(self, plotly_name="len", parent_name="volume.colorbar", **kwargs): - super(LenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_lenmode.py b/plotly/validators/volume/colorbar/_lenmode.py index 9cf413d0a2..417fcb885c 100644 --- a/plotly/validators/volume/colorbar/_lenmode.py +++ b/plotly/validators/volume/colorbar/_lenmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class LenmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="lenmode", parent_name="volume.colorbar", **kwargs): - super(LenmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_minexponent.py b/plotly/validators/volume/colorbar/_minexponent.py index 6e77c8b878..ec4008f436 100644 --- a/plotly/validators/volume/colorbar/_minexponent.py +++ b/plotly/validators/volume/colorbar/_minexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): +class MinexponentValidator(_bv.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="volume.colorbar", **kwargs ): - super(MinexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_nticks.py b/plotly/validators/volume/colorbar/_nticks.py index 80113752ac..9129bc0f65 100644 --- a/plotly/validators/volume/colorbar/_nticks.py +++ b/plotly/validators/volume/colorbar/_nticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): +class NticksValidator(_bv.IntegerValidator): def __init__(self, plotly_name="nticks", parent_name="volume.colorbar", **kwargs): - super(NticksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_orientation.py b/plotly/validators/volume/colorbar/_orientation.py index dfb40e658c..757d06e644 100644 --- a/plotly/validators/volume/colorbar/_orientation.py +++ b/plotly/validators/volume/colorbar/_orientation.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="orientation", parent_name="volume.colorbar", **kwargs ): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["h", "v"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_outlinecolor.py b/plotly/validators/volume/colorbar/_outlinecolor.py index 4344235891..8be7302b9f 100644 --- a/plotly/validators/volume/colorbar/_outlinecolor.py +++ b/plotly/validators/volume/colorbar/_outlinecolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinecolorValidator(_plotly_utils.basevalidators.ColorValidator): +class OutlinecolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="outlinecolor", parent_name="volume.colorbar", **kwargs ): - super(OutlinecolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_outlinewidth.py b/plotly/validators/volume/colorbar/_outlinewidth.py index 23a7376625..fe3a401615 100644 --- a/plotly/validators/volume/colorbar/_outlinewidth.py +++ b/plotly/validators/volume/colorbar/_outlinewidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutlinewidthValidator(_plotly_utils.basevalidators.NumberValidator): +class OutlinewidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="outlinewidth", parent_name="volume.colorbar", **kwargs ): - super(OutlinewidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_separatethousands.py b/plotly/validators/volume/colorbar/_separatethousands.py index 9b8fa68637..68c61ab372 100644 --- a/plotly/validators/volume/colorbar/_separatethousands.py +++ b/plotly/validators/volume/colorbar/_separatethousands.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SeparatethousandsValidator(_plotly_utils.basevalidators.BooleanValidator): +class SeparatethousandsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="separatethousands", parent_name="volume.colorbar", **kwargs ): - super(SeparatethousandsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_showexponent.py b/plotly/validators/volume/colorbar/_showexponent.py index fda6ad518f..399c32a681 100644 --- a/plotly/validators/volume/colorbar/_showexponent.py +++ b/plotly/validators/volume/colorbar/_showexponent.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowexponentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowexponentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showexponent", parent_name="volume.colorbar", **kwargs ): - super(ShowexponentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_showticklabels.py b/plotly/validators/volume/colorbar/_showticklabels.py index 4c95b5be1a..642f3168af 100644 --- a/plotly/validators/volume/colorbar/_showticklabels.py +++ b/plotly/validators/volume/colorbar/_showticklabels.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticklabelsValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowticklabelsValidator(_bv.BooleanValidator): def __init__( self, plotly_name="showticklabels", parent_name="volume.colorbar", **kwargs ): - super(ShowticklabelsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_showtickprefix.py b/plotly/validators/volume/colorbar/_showtickprefix.py index 1d56db9cda..16ef42d4d5 100644 --- a/plotly/validators/volume/colorbar/_showtickprefix.py +++ b/plotly/validators/volume/colorbar/_showtickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowtickprefixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowtickprefixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showtickprefix", parent_name="volume.colorbar", **kwargs ): - super(ShowtickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_showticksuffix.py b/plotly/validators/volume/colorbar/_showticksuffix.py index ca0d51fa99..c8a4c4c076 100644 --- a/plotly/validators/volume/colorbar/_showticksuffix.py +++ b/plotly/validators/volume/colorbar/_showticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ShowticksuffixValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="volume.colorbar", **kwargs ): - super(ShowticksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["all", "first", "last", "none"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_thickness.py b/plotly/validators/volume/colorbar/_thickness.py index 2c9aedfc8a..5316189950 100644 --- a/plotly/validators/volume/colorbar/_thickness.py +++ b/plotly/validators/volume/colorbar/_thickness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): +class ThicknessValidator(_bv.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="volume.colorbar", **kwargs ): - super(ThicknessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_thicknessmode.py b/plotly/validators/volume/colorbar/_thicknessmode.py index 389ac7245b..8d3a809341 100644 --- a/plotly/validators/volume/colorbar/_thicknessmode.py +++ b/plotly/validators/volume/colorbar/_thicknessmode.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ThicknessmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ThicknessmodeValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="thicknessmode", parent_name="volume.colorbar", **kwargs ): - super(ThicknessmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["fraction", "pixels"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_tick0.py b/plotly/validators/volume/colorbar/_tick0.py index a816e01888..350b0dc442 100644 --- a/plotly/validators/volume/colorbar/_tick0.py +++ b/plotly/validators/volume/colorbar/_tick0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Tick0Validator(_plotly_utils.basevalidators.AnyValidator): +class Tick0Validator(_bv.AnyValidator): def __init__(self, plotly_name="tick0", parent_name="volume.colorbar", **kwargs): - super(Tick0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {"tickmode": "linear"}), **kwargs, diff --git a/plotly/validators/volume/colorbar/_tickangle.py b/plotly/validators/volume/colorbar/_tickangle.py index 6e4399f622..dcc718e2ae 100644 --- a/plotly/validators/volume/colorbar/_tickangle.py +++ b/plotly/validators/volume/colorbar/_tickangle.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TickangleValidator(_bv.AngleValidator): def __init__( self, plotly_name="tickangle", parent_name="volume.colorbar", **kwargs ): - super(TickangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_tickcolor.py b/plotly/validators/volume/colorbar/_tickcolor.py index c9b04e3653..991fc50f9e 100644 --- a/plotly/validators/volume/colorbar/_tickcolor.py +++ b/plotly/validators/volume/colorbar/_tickcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class TickcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="tickcolor", parent_name="volume.colorbar", **kwargs ): - super(TickcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_tickfont.py b/plotly/validators/volume/colorbar/_tickfont.py index ae4c8832f8..faa17685b8 100644 --- a/plotly/validators/volume/colorbar/_tickfont.py +++ b/plotly/validators/volume/colorbar/_tickfont.py @@ -1,58 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="tickfont", parent_name="volume.colorbar", **kwargs): - super(TickfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickfont"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/volume/colorbar/_tickformat.py b/plotly/validators/volume/colorbar/_tickformat.py index d90a099b1f..df4e0ca29a 100644 --- a/plotly/validators/volume/colorbar/_tickformat.py +++ b/plotly/validators/volume/colorbar/_tickformat.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatValidator(_plotly_utils.basevalidators.StringValidator): +class TickformatValidator(_bv.StringValidator): def __init__( self, plotly_name="tickformat", parent_name="volume.colorbar", **kwargs ): - super(TickformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_tickformatstopdefaults.py b/plotly/validators/volume/colorbar/_tickformatstopdefaults.py index f98a1f4dd5..872be7b886 100644 --- a/plotly/validators/volume/colorbar/_tickformatstopdefaults.py +++ b/plotly/validators/volume/colorbar/_tickformatstopdefaults.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopdefaultsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TickformatstopdefaultsValidator(_bv.CompoundValidator): def __init__( self, plotly_name="tickformatstopdefaults", parent_name="volume.colorbar", **kwargs, ): - super(TickformatstopdefaultsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", diff --git a/plotly/validators/volume/colorbar/_tickformatstops.py b/plotly/validators/volume/colorbar/_tickformatstops.py index b3dfeef23a..eaa0aab427 100644 --- a/plotly/validators/volume/colorbar/_tickformatstops.py +++ b/plotly/validators/volume/colorbar/_tickformatstops.py @@ -1,50 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickformatstopsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): +class TickformatstopsValidator(_bv.CompoundArrayValidator): def __init__( self, plotly_name="tickformatstops", parent_name="volume.colorbar", **kwargs ): - super(TickformatstopsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Tickformatstop"), data_docs=kwargs.pop( "data_docs", """ - dtickrange - range [*min*, *max*], where "min", "max" - - dtick values which describe some zoom level, it - is possible to omit "min" or "max" value by - passing "null" - enabled - Determines whether or not this stop is used. If - `false`, this stop is ignored even within its - `dtickrange`. - name - When used in a template, named items are - created in the output figure in addition to any - items the figure already has in this array. You - can modify these items in the output figure by - making your own item with `templateitemname` - matching this `name` alongside your - modifications (including `visible: false` or - `enabled: false` to hide it). Has no effect - outside of a template. - templateitemname - Used to refer to a named item in this array in - the template. Named items from the template - will be created even without a matching item in - the input figure, but you can modify one by - making an item with `templateitemname` matching - its `name`, alongside your modifications - (including `visible: false` or `enabled: false` - to hide it). If there is no template or no - matching item, this item will be hidden unless - you explicitly show it with `visible: true`. - value - string - dtickformat for described zoom level, - the same as "tickformat" """, ), **kwargs, diff --git a/plotly/validators/volume/colorbar/_ticklabeloverflow.py b/plotly/validators/volume/colorbar/_ticklabeloverflow.py index f1b8e4f2e1..6bc88f86c3 100644 --- a/plotly/validators/volume/colorbar/_ticklabeloverflow.py +++ b/plotly/validators/volume/colorbar/_ticklabeloverflow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabeloverflowValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabeloverflowValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabeloverflow", parent_name="volume.colorbar", **kwargs ): - super(TicklabeloverflowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["allow", "hide past div", "hide past domain"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_ticklabelposition.py b/plotly/validators/volume/colorbar/_ticklabelposition.py index db52f99ffc..9a393c448a 100644 --- a/plotly/validators/volume/colorbar/_ticklabelposition.py +++ b/plotly/validators/volume/colorbar/_ticklabelposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicklabelpositionValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="ticklabelposition", parent_name="volume.colorbar", **kwargs ): - super(TicklabelpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/volume/colorbar/_ticklabelstep.py b/plotly/validators/volume/colorbar/_ticklabelstep.py index e058309c5b..789e6ba6ad 100644 --- a/plotly/validators/volume/colorbar/_ticklabelstep.py +++ b/plotly/validators/volume/colorbar/_ticklabelstep.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklabelstepValidator(_plotly_utils.basevalidators.IntegerValidator): +class TicklabelstepValidator(_bv.IntegerValidator): def __init__( self, plotly_name="ticklabelstep", parent_name="volume.colorbar", **kwargs ): - super(TicklabelstepValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/volume/colorbar/_ticklen.py b/plotly/validators/volume/colorbar/_ticklen.py index 7680d6e8f0..69745bcd0d 100644 --- a/plotly/validators/volume/colorbar/_ticklen.py +++ b/plotly/validators/volume/colorbar/_ticklen.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicklenValidator(_plotly_utils.basevalidators.NumberValidator): +class TicklenValidator(_bv.NumberValidator): def __init__(self, plotly_name="ticklen", parent_name="volume.colorbar", **kwargs): - super(TicklenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_tickmode.py b/plotly/validators/volume/colorbar/_tickmode.py index 96ed169985..a59168b7ec 100644 --- a/plotly/validators/volume/colorbar/_tickmode.py +++ b/plotly/validators/volume/colorbar/_tickmode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TickmodeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="tickmode", parent_name="volume.colorbar", **kwargs): - super(TickmodeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), implied_edits=kwargs.pop("implied_edits", {}), values=kwargs.pop("values", ["auto", "linear", "array"]), diff --git a/plotly/validators/volume/colorbar/_tickprefix.py b/plotly/validators/volume/colorbar/_tickprefix.py index 2911fda0c7..b13f4bcbd9 100644 --- a/plotly/validators/volume/colorbar/_tickprefix.py +++ b/plotly/validators/volume/colorbar/_tickprefix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickprefixValidator(_plotly_utils.basevalidators.StringValidator): +class TickprefixValidator(_bv.StringValidator): def __init__( self, plotly_name="tickprefix", parent_name="volume.colorbar", **kwargs ): - super(TickprefixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_ticks.py b/plotly/validators/volume/colorbar/_ticks.py index 486767020e..47c7ed60b0 100644 --- a/plotly/validators/volume/colorbar/_ticks.py +++ b/plotly/validators/volume/colorbar/_ticks.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TicksValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="ticks", parent_name="volume.colorbar", **kwargs): - super(TicksValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["outside", "inside", ""]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_ticksuffix.py b/plotly/validators/volume/colorbar/_ticksuffix.py index 70f5c9913e..aa3e6fa7a3 100644 --- a/plotly/validators/volume/colorbar/_ticksuffix.py +++ b/plotly/validators/volume/colorbar/_ticksuffix.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): +class TicksuffixValidator(_bv.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="volume.colorbar", **kwargs ): - super(TicksuffixValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_ticktext.py b/plotly/validators/volume/colorbar/_ticktext.py index 5916b6d86b..e62830817e 100644 --- a/plotly/validators/volume/colorbar/_ticktext.py +++ b/plotly/validators/volume/colorbar/_ticktext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TicktextValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ticktext", parent_name="volume.colorbar", **kwargs): - super(TicktextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_ticktextsrc.py b/plotly/validators/volume/colorbar/_ticktextsrc.py index 0705e477f3..a5d2fd01ad 100644 --- a/plotly/validators/volume/colorbar/_ticktextsrc.py +++ b/plotly/validators/volume/colorbar/_ticktextsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TicktextsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="ticktextsrc", parent_name="volume.colorbar", **kwargs ): - super(TicktextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_tickvals.py b/plotly/validators/volume/colorbar/_tickvals.py index 56999179b8..ad3adac0b2 100644 --- a/plotly/validators/volume/colorbar/_tickvals.py +++ b/plotly/validators/volume/colorbar/_tickvals.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class TickvalsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="tickvals", parent_name="volume.colorbar", **kwargs): - super(TickvalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_tickvalssrc.py b/plotly/validators/volume/colorbar/_tickvalssrc.py index c09d9e02b2..433b2f999f 100644 --- a/plotly/validators/volume/colorbar/_tickvalssrc.py +++ b/plotly/validators/volume/colorbar/_tickvalssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickvalssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TickvalssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="tickvalssrc", parent_name="volume.colorbar", **kwargs ): - super(TickvalssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_tickwidth.py b/plotly/validators/volume/colorbar/_tickwidth.py index 0a4242444c..221f000aaf 100644 --- a/plotly/validators/volume/colorbar/_tickwidth.py +++ b/plotly/validators/volume/colorbar/_tickwidth.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TickwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class TickwidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="tickwidth", parent_name="volume.colorbar", **kwargs ): - super(TickwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_title.py b/plotly/validators/volume/colorbar/_title.py index f53559f69d..ab306746b7 100644 --- a/plotly/validators/volume/colorbar/_title.py +++ b/plotly/validators/volume/colorbar/_title.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TitleValidator(_plotly_utils.basevalidators.TitleValidator): +class TitleValidator(_bv.TitleValidator): def __init__(self, plotly_name="title", parent_name="volume.colorbar", **kwargs): - super(TitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Title"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this color bar's title font. - side - Determines the location of color bar's title - with respect to the color bar. Defaults to - "top" when `orientation` if "v" and defaults - to "right" when `orientation` if "h". - text - Sets the title of the color bar. """, ), **kwargs, diff --git a/plotly/validators/volume/colorbar/_x.py b/plotly/validators/volume/colorbar/_x.py index 170aed8caf..47edd80f98 100644 --- a/plotly/validators/volume/colorbar/_x.py +++ b/plotly/validators/volume/colorbar/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="volume.colorbar", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_xanchor.py b/plotly/validators/volume/colorbar/_xanchor.py index 5171595d22..4bc0749e36 100644 --- a/plotly/validators/volume/colorbar/_xanchor.py +++ b/plotly/validators/volume/colorbar/_xanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xanchor", parent_name="volume.colorbar", **kwargs): - super(XanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["left", "center", "right"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_xpad.py b/plotly/validators/volume/colorbar/_xpad.py index 3cfdcfa8d2..85a2820846 100644 --- a/plotly/validators/volume/colorbar/_xpad.py +++ b/plotly/validators/volume/colorbar/_xpad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XpadValidator(_plotly_utils.basevalidators.NumberValidator): +class XpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="xpad", parent_name="volume.colorbar", **kwargs): - super(XpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_xref.py b/plotly/validators/volume/colorbar/_xref.py index 17bf3f82aa..b0ec6cd957 100644 --- a/plotly/validators/volume/colorbar/_xref.py +++ b/plotly/validators/volume/colorbar/_xref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="xref", parent_name="volume.colorbar", **kwargs): - super(XrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_y.py b/plotly/validators/volume/colorbar/_y.py index a2f5901265..80dd675f7a 100644 --- a/plotly/validators/volume/colorbar/_y.py +++ b/plotly/validators/volume/colorbar/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="volume.colorbar", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/_yanchor.py b/plotly/validators/volume/colorbar/_yanchor.py index 3774110545..371a3a425b 100644 --- a/plotly/validators/volume/colorbar/_yanchor.py +++ b/plotly/validators/volume/colorbar/_yanchor.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YanchorValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yanchor", parent_name="volume.colorbar", **kwargs): - super(YanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["top", "middle", "bottom"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/_ypad.py b/plotly/validators/volume/colorbar/_ypad.py index 919ae21ce4..04ebdcd617 100644 --- a/plotly/validators/volume/colorbar/_ypad.py +++ b/plotly/validators/volume/colorbar/_ypad.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YpadValidator(_plotly_utils.basevalidators.NumberValidator): +class YpadValidator(_bv.NumberValidator): def __init__(self, plotly_name="ypad", parent_name="volume.colorbar", **kwargs): - super(YpadValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/volume/colorbar/_yref.py b/plotly/validators/volume/colorbar/_yref.py index 15276d97ac..c5ce09e683 100644 --- a/plotly/validators/volume/colorbar/_yref.py +++ b/plotly/validators/volume/colorbar/_yref.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YrefValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YrefValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="yref", parent_name="volume.colorbar", **kwargs): - super(YrefValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["container", "paper"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/tickfont/__init__.py b/plotly/validators/volume/colorbar/tickfont/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/volume/colorbar/tickfont/__init__.py +++ b/plotly/validators/volume/colorbar/tickfont/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/volume/colorbar/tickfont/_color.py b/plotly/validators/volume/colorbar/tickfont/_color.py index ae47f79177..fd491e2fa3 100644 --- a/plotly/validators/volume/colorbar/tickfont/_color.py +++ b/plotly/validators/volume/colorbar/tickfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="volume.colorbar.tickfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/tickfont/_family.py b/plotly/validators/volume/colorbar/tickfont/_family.py index 3284e76d2f..35a01d8b69 100644 --- a/plotly/validators/volume/colorbar/tickfont/_family.py +++ b/plotly/validators/volume/colorbar/tickfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="volume.colorbar.tickfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/volume/colorbar/tickfont/_lineposition.py b/plotly/validators/volume/colorbar/tickfont/_lineposition.py index dd2c847c4a..1a821bb323 100644 --- a/plotly/validators/volume/colorbar/tickfont/_lineposition.py +++ b/plotly/validators/volume/colorbar/tickfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="volume.colorbar.tickfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/volume/colorbar/tickfont/_shadow.py b/plotly/validators/volume/colorbar/tickfont/_shadow.py index 267a9e591b..a35cf79e79 100644 --- a/plotly/validators/volume/colorbar/tickfont/_shadow.py +++ b/plotly/validators/volume/colorbar/tickfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="volume.colorbar.tickfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/tickfont/_size.py b/plotly/validators/volume/colorbar/tickfont/_size.py index 743f7b5c2a..981425cfd9 100644 --- a/plotly/validators/volume/colorbar/tickfont/_size.py +++ b/plotly/validators/volume/colorbar/tickfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="volume.colorbar.tickfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/volume/colorbar/tickfont/_style.py b/plotly/validators/volume/colorbar/tickfont/_style.py index fcb73b3f58..26bbdb9e1e 100644 --- a/plotly/validators/volume/colorbar/tickfont/_style.py +++ b/plotly/validators/volume/colorbar/tickfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="volume.colorbar.tickfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/tickfont/_textcase.py b/plotly/validators/volume/colorbar/tickfont/_textcase.py index b0397b4541..c94b7b9bf4 100644 --- a/plotly/validators/volume/colorbar/tickfont/_textcase.py +++ b/plotly/validators/volume/colorbar/tickfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="volume.colorbar.tickfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/tickfont/_variant.py b/plotly/validators/volume/colorbar/tickfont/_variant.py index 4d1705732e..8f22753b6c 100644 --- a/plotly/validators/volume/colorbar/tickfont/_variant.py +++ b/plotly/validators/volume/colorbar/tickfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="volume.colorbar.tickfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/volume/colorbar/tickfont/_weight.py b/plotly/validators/volume/colorbar/tickfont/_weight.py index 50e15d0c69..6034b172c6 100644 --- a/plotly/validators/volume/colorbar/tickfont/_weight.py +++ b/plotly/validators/volume/colorbar/tickfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="volume.colorbar.tickfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/volume/colorbar/tickformatstop/__init__.py b/plotly/validators/volume/colorbar/tickformatstop/__init__.py index 559090a1de..59ff89e603 100644 --- a/plotly/validators/volume/colorbar/tickformatstop/__init__.py +++ b/plotly/validators/volume/colorbar/tickformatstop/__init__.py @@ -1,23 +1,14 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._value import ValueValidator - from ._templateitemname import TemplateitemnameValidator - from ._name import NameValidator - from ._enabled import EnabledValidator - from ._dtickrange import DtickrangeValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._value.ValueValidator", - "._templateitemname.TemplateitemnameValidator", - "._name.NameValidator", - "._enabled.EnabledValidator", - "._dtickrange.DtickrangeValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._value.ValueValidator", + "._templateitemname.TemplateitemnameValidator", + "._name.NameValidator", + "._enabled.EnabledValidator", + "._dtickrange.DtickrangeValidator", + ], +) diff --git a/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py b/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py index 2292d75b7c..16fa972c3c 100644 --- a/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py +++ b/plotly/validators/volume/colorbar/tickformatstop/_dtickrange.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): +class DtickrangeValidator(_bv.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="volume.colorbar.tickformatstop", **kwargs, ): - super(DtickrangeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), items=kwargs.pop( "items", diff --git a/plotly/validators/volume/colorbar/tickformatstop/_enabled.py b/plotly/validators/volume/colorbar/tickformatstop/_enabled.py index 0562c837fa..fbde5d1af0 100644 --- a/plotly/validators/volume/colorbar/tickformatstop/_enabled.py +++ b/plotly/validators/volume/colorbar/tickformatstop/_enabled.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class EnabledValidator(_plotly_utils.basevalidators.BooleanValidator): +class EnabledValidator(_bv.BooleanValidator): def __init__( self, plotly_name="enabled", parent_name="volume.colorbar.tickformatstop", **kwargs, ): - super(EnabledValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/tickformatstop/_name.py b/plotly/validators/volume/colorbar/tickformatstop/_name.py index b9ca37ebea..da692607e5 100644 --- a/plotly/validators/volume/colorbar/tickformatstop/_name.py +++ b/plotly/validators/volume/colorbar/tickformatstop/_name.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__( self, plotly_name="name", parent_name="volume.colorbar.tickformatstop", **kwargs ): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py b/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py index b92cda04be..8e989fcd03 100644 --- a/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py +++ b/plotly/validators/volume/colorbar/tickformatstop/_templateitemname.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): +class TemplateitemnameValidator(_bv.StringValidator): def __init__( self, plotly_name="templateitemname", parent_name="volume.colorbar.tickformatstop", **kwargs, ): - super(TemplateitemnameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/tickformatstop/_value.py b/plotly/validators/volume/colorbar/tickformatstop/_value.py index 961347a67b..68ef5ff69a 100644 --- a/plotly/validators/volume/colorbar/tickformatstop/_value.py +++ b/plotly/validators/volume/colorbar/tickformatstop/_value.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ValueValidator(_plotly_utils.basevalidators.StringValidator): +class ValueValidator(_bv.StringValidator): def __init__( self, plotly_name="value", parent_name="volume.colorbar.tickformatstop", **kwargs, ): - super(ValueValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/title/__init__.py b/plotly/validators/volume/colorbar/title/__init__.py index 1aae6a91aa..d5af3ccb3a 100644 --- a/plotly/validators/volume/colorbar/title/__init__.py +++ b/plotly/validators/volume/colorbar/title/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._side import SideValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._text.TextValidator", "._side.SideValidator", "._font.FontValidator"], +) diff --git a/plotly/validators/volume/colorbar/title/_font.py b/plotly/validators/volume/colorbar/title/_font.py index 106ec7fa5e..3d0b833352 100644 --- a/plotly/validators/volume/colorbar/title/_font.py +++ b/plotly/validators/volume/colorbar/title/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="volume.colorbar.title", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/volume/colorbar/title/_side.py b/plotly/validators/volume/colorbar/title/_side.py index 51c9230da5..e72d919fed 100644 --- a/plotly/validators/volume/colorbar/title/_side.py +++ b/plotly/validators/volume/colorbar/title/_side.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SideValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class SideValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="side", parent_name="volume.colorbar.title", **kwargs ): - super(SideValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["right", "top", "bottom"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/title/_text.py b/plotly/validators/volume/colorbar/title/_text.py index 12c9d39663..839d53f694 100644 --- a/plotly/validators/volume/colorbar/title/_text.py +++ b/plotly/validators/volume/colorbar/title/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="volume.colorbar.title", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/title/font/__init__.py b/plotly/validators/volume/colorbar/title/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/volume/colorbar/title/font/__init__.py +++ b/plotly/validators/volume/colorbar/title/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/volume/colorbar/title/font/_color.py b/plotly/validators/volume/colorbar/title/font/_color.py index 84d2f45c2e..99bf03116e 100644 --- a/plotly/validators/volume/colorbar/title/font/_color.py +++ b/plotly/validators/volume/colorbar/title/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="volume.colorbar.title.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/title/font/_family.py b/plotly/validators/volume/colorbar/title/font/_family.py index 8fc22e6831..312f9a2c8e 100644 --- a/plotly/validators/volume/colorbar/title/font/_family.py +++ b/plotly/validators/volume/colorbar/title/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="volume.colorbar.title.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/volume/colorbar/title/font/_lineposition.py b/plotly/validators/volume/colorbar/title/font/_lineposition.py index 43a6b1ec8b..3e604f07db 100644 --- a/plotly/validators/volume/colorbar/title/font/_lineposition.py +++ b/plotly/validators/volume/colorbar/title/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="volume.colorbar.title.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/volume/colorbar/title/font/_shadow.py b/plotly/validators/volume/colorbar/title/font/_shadow.py index d8a75c3768..6d304df54c 100644 --- a/plotly/validators/volume/colorbar/title/font/_shadow.py +++ b/plotly/validators/volume/colorbar/title/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="volume.colorbar.title.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/colorbar/title/font/_size.py b/plotly/validators/volume/colorbar/title/font/_size.py index 95075d66c2..bf4b894024 100644 --- a/plotly/validators/volume/colorbar/title/font/_size.py +++ b/plotly/validators/volume/colorbar/title/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="volume.colorbar.title.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/volume/colorbar/title/font/_style.py b/plotly/validators/volume/colorbar/title/font/_style.py index 21fe72ee45..bf4ef64926 100644 --- a/plotly/validators/volume/colorbar/title/font/_style.py +++ b/plotly/validators/volume/colorbar/title/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="volume.colorbar.title.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/title/font/_textcase.py b/plotly/validators/volume/colorbar/title/font/_textcase.py index c5ca7ce220..f5d52d9098 100644 --- a/plotly/validators/volume/colorbar/title/font/_textcase.py +++ b/plotly/validators/volume/colorbar/title/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="volume.colorbar.title.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/volume/colorbar/title/font/_variant.py b/plotly/validators/volume/colorbar/title/font/_variant.py index 2840848d7c..cdc0efaeac 100644 --- a/plotly/validators/volume/colorbar/title/font/_variant.py +++ b/plotly/validators/volume/colorbar/title/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="volume.colorbar.title.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( "values", diff --git a/plotly/validators/volume/colorbar/title/font/_weight.py b/plotly/validators/volume/colorbar/title/font/_weight.py index 0df0a68364..f0299cd4cf 100644 --- a/plotly/validators/volume/colorbar/title/font/_weight.py +++ b/plotly/validators/volume/colorbar/title/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="volume.colorbar.title.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/volume/contour/__init__.py b/plotly/validators/volume/contour/__init__.py index 8d51b1d4c0..1a1cc3031d 100644 --- a/plotly/validators/volume/contour/__init__.py +++ b/plotly/validators/volume/contour/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._show import ShowValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._show.ShowValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/volume/contour/_color.py b/plotly/validators/volume/contour/_color.py index 21dc7dd171..448f8eb472 100644 --- a/plotly/validators/volume/contour/_color.py +++ b/plotly/validators/volume/contour/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="volume.contour", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/contour/_show.py b/plotly/validators/volume/contour/_show.py index 2dda119169..6fa10064ca 100644 --- a/plotly/validators/volume/contour/_show.py +++ b/plotly/validators/volume/contour/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.contour", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/contour/_width.py b/plotly/validators/volume/contour/_width.py index 6a9cfb4f63..27d587e060 100644 --- a/plotly/validators/volume/contour/_width.py +++ b/plotly/validators/volume/contour/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="volume.contour", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 16), min=kwargs.pop("min", 1), diff --git a/plotly/validators/volume/hoverlabel/__init__.py b/plotly/validators/volume/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/volume/hoverlabel/__init__.py +++ b/plotly/validators/volume/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/volume/hoverlabel/_align.py b/plotly/validators/volume/hoverlabel/_align.py index 699a124b26..9029ce95b9 100644 --- a/plotly/validators/volume/hoverlabel/_align.py +++ b/plotly/validators/volume/hoverlabel/_align.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="align", parent_name="volume.hoverlabel", **kwargs): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/volume/hoverlabel/_alignsrc.py b/plotly/validators/volume/hoverlabel/_alignsrc.py index fa1623625d..617756fa8b 100644 --- a/plotly/validators/volume/hoverlabel/_alignsrc.py +++ b/plotly/validators/volume/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="volume.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/_bgcolor.py b/plotly/validators/volume/hoverlabel/_bgcolor.py index ef638e52f2..bd4f44680f 100644 --- a/plotly/validators/volume/hoverlabel/_bgcolor.py +++ b/plotly/validators/volume/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="volume.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/volume/hoverlabel/_bgcolorsrc.py b/plotly/validators/volume/hoverlabel/_bgcolorsrc.py index fb9d54199d..c3a8559c49 100644 --- a/plotly/validators/volume/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/volume/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="volume.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/_bordercolor.py b/plotly/validators/volume/hoverlabel/_bordercolor.py index 413395a071..d5c13dfee5 100644 --- a/plotly/validators/volume/hoverlabel/_bordercolor.py +++ b/plotly/validators/volume/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="volume.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/volume/hoverlabel/_bordercolorsrc.py b/plotly/validators/volume/hoverlabel/_bordercolorsrc.py index 11739e7f87..f23c5f3b56 100644 --- a/plotly/validators/volume/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/volume/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="volume.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/_font.py b/plotly/validators/volume/hoverlabel/_font.py index 99a69986ac..f36111bd2c 100644 --- a/plotly/validators/volume/hoverlabel/_font.py +++ b/plotly/validators/volume/hoverlabel/_font.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="font", parent_name="volume.hoverlabel", **kwargs): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/volume/hoverlabel/_namelength.py b/plotly/validators/volume/hoverlabel/_namelength.py index 183c888e0c..5f3ca773d2 100644 --- a/plotly/validators/volume/hoverlabel/_namelength.py +++ b/plotly/validators/volume/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="volume.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/volume/hoverlabel/_namelengthsrc.py b/plotly/validators/volume/hoverlabel/_namelengthsrc.py index 14c94db660..b9801f52cd 100644 --- a/plotly/validators/volume/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/volume/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="volume.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/__init__.py b/plotly/validators/volume/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/volume/hoverlabel/font/__init__.py +++ b/plotly/validators/volume/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/volume/hoverlabel/font/_color.py b/plotly/validators/volume/hoverlabel/font/_color.py index 82c7199d64..6e4d7f04b8 100644 --- a/plotly/validators/volume/hoverlabel/font/_color.py +++ b/plotly/validators/volume/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="volume.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/volume/hoverlabel/font/_colorsrc.py b/plotly/validators/volume/hoverlabel/font/_colorsrc.py index 83ac6c8ff4..e8f3debe43 100644 --- a/plotly/validators/volume/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/volume/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_family.py b/plotly/validators/volume/hoverlabel/font/_family.py index 1731332694..3666e529d2 100644 --- a/plotly/validators/volume/hoverlabel/font/_family.py +++ b/plotly/validators/volume/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="volume.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/volume/hoverlabel/font/_familysrc.py b/plotly/validators/volume/hoverlabel/font/_familysrc.py index b517bb538a..9bf1de91c9 100644 --- a/plotly/validators/volume/hoverlabel/font/_familysrc.py +++ b/plotly/validators/volume/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_lineposition.py b/plotly/validators/volume/hoverlabel/font/_lineposition.py index 8356669e4f..184f1cf1d4 100644 --- a/plotly/validators/volume/hoverlabel/font/_lineposition.py +++ b/plotly/validators/volume/hoverlabel/font/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="volume.hoverlabel.font", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/volume/hoverlabel/font/_linepositionsrc.py b/plotly/validators/volume/hoverlabel/font/_linepositionsrc.py index 43683aae5e..e39bf6232c 100644 --- a/plotly/validators/volume/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/volume/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="volume.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_shadow.py b/plotly/validators/volume/hoverlabel/font/_shadow.py index ad268f99da..8b04b03be7 100644 --- a/plotly/validators/volume/hoverlabel/font/_shadow.py +++ b/plotly/validators/volume/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="volume.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/volume/hoverlabel/font/_shadowsrc.py b/plotly/validators/volume/hoverlabel/font/_shadowsrc.py index e632b27076..c66c4bdb5c 100644 --- a/plotly/validators/volume/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/volume/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_size.py b/plotly/validators/volume/hoverlabel/font/_size.py index dcfaa0ad17..91f196ec8f 100644 --- a/plotly/validators/volume/hoverlabel/font/_size.py +++ b/plotly/validators/volume/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="volume.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/volume/hoverlabel/font/_sizesrc.py b/plotly/validators/volume/hoverlabel/font/_sizesrc.py index 8769f6f1b5..b53e79449d 100644 --- a/plotly/validators/volume/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/volume/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_style.py b/plotly/validators/volume/hoverlabel/font/_style.py index 7b7f68e73e..44f10f2fed 100644 --- a/plotly/validators/volume/hoverlabel/font/_style.py +++ b/plotly/validators/volume/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="volume.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/volume/hoverlabel/font/_stylesrc.py b/plotly/validators/volume/hoverlabel/font/_stylesrc.py index 5460a89281..a2e9870f4c 100644 --- a/plotly/validators/volume/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/volume/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_textcase.py b/plotly/validators/volume/hoverlabel/font/_textcase.py index 0bbf27ebe5..d8ab9f6b11 100644 --- a/plotly/validators/volume/hoverlabel/font/_textcase.py +++ b/plotly/validators/volume/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="volume.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/volume/hoverlabel/font/_textcasesrc.py b/plotly/validators/volume/hoverlabel/font/_textcasesrc.py index 68d48a0422..60fec29182 100644 --- a/plotly/validators/volume/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/volume/hoverlabel/font/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_variant.py b/plotly/validators/volume/hoverlabel/font/_variant.py index fc29be909f..6580d4c5a8 100644 --- a/plotly/validators/volume/hoverlabel/font/_variant.py +++ b/plotly/validators/volume/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="volume.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/volume/hoverlabel/font/_variantsrc.py b/plotly/validators/volume/hoverlabel/font/_variantsrc.py index b351b21800..4323f7a571 100644 --- a/plotly/validators/volume/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/volume/hoverlabel/font/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/hoverlabel/font/_weight.py b/plotly/validators/volume/hoverlabel/font/_weight.py index fdb1f9d5cb..312b11f942 100644 --- a/plotly/validators/volume/hoverlabel/font/_weight.py +++ b/plotly/validators/volume/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="volume.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/volume/hoverlabel/font/_weightsrc.py b/plotly/validators/volume/hoverlabel/font/_weightsrc.py index 4fe8d5561b..66850b514a 100644 --- a/plotly/validators/volume/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/volume/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="volume.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/legendgrouptitle/__init__.py b/plotly/validators/volume/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/volume/legendgrouptitle/__init__.py +++ b/plotly/validators/volume/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/volume/legendgrouptitle/_font.py b/plotly/validators/volume/legendgrouptitle/_font.py index de8ce1802a..5063f9f2d9 100644 --- a/plotly/validators/volume/legendgrouptitle/_font.py +++ b/plotly/validators/volume/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="volume.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/volume/legendgrouptitle/_text.py b/plotly/validators/volume/legendgrouptitle/_text.py index e5114d2784..096658f868 100644 --- a/plotly/validators/volume/legendgrouptitle/_text.py +++ b/plotly/validators/volume/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="volume.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/volume/legendgrouptitle/font/__init__.py b/plotly/validators/volume/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/volume/legendgrouptitle/font/__init__.py +++ b/plotly/validators/volume/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/volume/legendgrouptitle/font/_color.py b/plotly/validators/volume/legendgrouptitle/font/_color.py index 0f5cb4269c..f5adebde25 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_color.py +++ b/plotly/validators/volume/legendgrouptitle/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="volume.legendgrouptitle.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/volume/legendgrouptitle/font/_family.py b/plotly/validators/volume/legendgrouptitle/font/_family.py index 08a1202521..3fef359888 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_family.py +++ b/plotly/validators/volume/legendgrouptitle/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="volume.legendgrouptitle.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/volume/legendgrouptitle/font/_lineposition.py b/plotly/validators/volume/legendgrouptitle/font/_lineposition.py index 27d5f154aa..59edbda3af 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/volume/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="volume.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/volume/legendgrouptitle/font/_shadow.py b/plotly/validators/volume/legendgrouptitle/font/_shadow.py index b9bd1a45b2..97bc436dd7 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/volume/legendgrouptitle/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="volume.legendgrouptitle.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/volume/legendgrouptitle/font/_size.py b/plotly/validators/volume/legendgrouptitle/font/_size.py index a4dc323b09..4a5a7260d3 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_size.py +++ b/plotly/validators/volume/legendgrouptitle/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="volume.legendgrouptitle.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/volume/legendgrouptitle/font/_style.py b/plotly/validators/volume/legendgrouptitle/font/_style.py index 94199d7ba0..5ccff0784a 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_style.py +++ b/plotly/validators/volume/legendgrouptitle/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="volume.legendgrouptitle.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/volume/legendgrouptitle/font/_textcase.py b/plotly/validators/volume/legendgrouptitle/font/_textcase.py index 6ee77668a6..51203cb605 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/volume/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="volume.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/volume/legendgrouptitle/font/_variant.py b/plotly/validators/volume/legendgrouptitle/font/_variant.py index 82c74c104d..315dd2d933 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_variant.py +++ b/plotly/validators/volume/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="volume.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/volume/legendgrouptitle/font/_weight.py b/plotly/validators/volume/legendgrouptitle/font/_weight.py index fc7fc3e2d0..99e4752fc3 100644 --- a/plotly/validators/volume/legendgrouptitle/font/_weight.py +++ b/plotly/validators/volume/legendgrouptitle/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="volume.legendgrouptitle.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/volume/lighting/__init__.py b/plotly/validators/volume/lighting/__init__.py index 028351f35d..1f11e1b86f 100644 --- a/plotly/validators/volume/lighting/__init__.py +++ b/plotly/validators/volume/lighting/__init__.py @@ -1,27 +1,16 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._vertexnormalsepsilon import VertexnormalsepsilonValidator - from ._specular import SpecularValidator - from ._roughness import RoughnessValidator - from ._fresnel import FresnelValidator - from ._facenormalsepsilon import FacenormalsepsilonValidator - from ._diffuse import DiffuseValidator - from ._ambient import AmbientValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._vertexnormalsepsilon.VertexnormalsepsilonValidator", - "._specular.SpecularValidator", - "._roughness.RoughnessValidator", - "._fresnel.FresnelValidator", - "._facenormalsepsilon.FacenormalsepsilonValidator", - "._diffuse.DiffuseValidator", - "._ambient.AmbientValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._vertexnormalsepsilon.VertexnormalsepsilonValidator", + "._specular.SpecularValidator", + "._roughness.RoughnessValidator", + "._fresnel.FresnelValidator", + "._facenormalsepsilon.FacenormalsepsilonValidator", + "._diffuse.DiffuseValidator", + "._ambient.AmbientValidator", + ], +) diff --git a/plotly/validators/volume/lighting/_ambient.py b/plotly/validators/volume/lighting/_ambient.py index d1880fe9d5..1eebecb15c 100644 --- a/plotly/validators/volume/lighting/_ambient.py +++ b/plotly/validators/volume/lighting/_ambient.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AmbientValidator(_plotly_utils.basevalidators.NumberValidator): +class AmbientValidator(_bv.NumberValidator): def __init__(self, plotly_name="ambient", parent_name="volume.lighting", **kwargs): - super(AmbientValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lighting/_diffuse.py b/plotly/validators/volume/lighting/_diffuse.py index f28d2251cb..7212b17dce 100644 --- a/plotly/validators/volume/lighting/_diffuse.py +++ b/plotly/validators/volume/lighting/_diffuse.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DiffuseValidator(_plotly_utils.basevalidators.NumberValidator): +class DiffuseValidator(_bv.NumberValidator): def __init__(self, plotly_name="diffuse", parent_name="volume.lighting", **kwargs): - super(DiffuseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lighting/_facenormalsepsilon.py b/plotly/validators/volume/lighting/_facenormalsepsilon.py index 7ebedd2428..deeffc0b22 100644 --- a/plotly/validators/volume/lighting/_facenormalsepsilon.py +++ b/plotly/validators/volume/lighting/_facenormalsepsilon.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FacenormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class FacenormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="facenormalsepsilon", parent_name="volume.lighting", **kwargs ): - super(FacenormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lighting/_fresnel.py b/plotly/validators/volume/lighting/_fresnel.py index 1afd128397..3c771f27b4 100644 --- a/plotly/validators/volume/lighting/_fresnel.py +++ b/plotly/validators/volume/lighting/_fresnel.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FresnelValidator(_plotly_utils.basevalidators.NumberValidator): +class FresnelValidator(_bv.NumberValidator): def __init__(self, plotly_name="fresnel", parent_name="volume.lighting", **kwargs): - super(FresnelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 5), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lighting/_roughness.py b/plotly/validators/volume/lighting/_roughness.py index de256c1858..2247b416b5 100644 --- a/plotly/validators/volume/lighting/_roughness.py +++ b/plotly/validators/volume/lighting/_roughness.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class RoughnessValidator(_plotly_utils.basevalidators.NumberValidator): +class RoughnessValidator(_bv.NumberValidator): def __init__( self, plotly_name="roughness", parent_name="volume.lighting", **kwargs ): - super(RoughnessValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lighting/_specular.py b/plotly/validators/volume/lighting/_specular.py index 7581692c0a..0679327725 100644 --- a/plotly/validators/volume/lighting/_specular.py +++ b/plotly/validators/volume/lighting/_specular.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SpecularValidator(_plotly_utils.basevalidators.NumberValidator): +class SpecularValidator(_bv.NumberValidator): def __init__(self, plotly_name="specular", parent_name="volume.lighting", **kwargs): - super(SpecularValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 2), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lighting/_vertexnormalsepsilon.py b/plotly/validators/volume/lighting/_vertexnormalsepsilon.py index 45254909fc..78eff394cc 100644 --- a/plotly/validators/volume/lighting/_vertexnormalsepsilon.py +++ b/plotly/validators/volume/lighting/_vertexnormalsepsilon.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VertexnormalsepsilonValidator(_plotly_utils.basevalidators.NumberValidator): +class VertexnormalsepsilonValidator(_bv.NumberValidator): def __init__( self, plotly_name="vertexnormalsepsilon", parent_name="volume.lighting", **kwargs, ): - super(VertexnormalsepsilonValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/lightposition/__init__.py b/plotly/validators/volume/lightposition/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/volume/lightposition/__init__.py +++ b/plotly/validators/volume/lightposition/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/volume/lightposition/_x.py b/plotly/validators/volume/lightposition/_x.py index 15c8ed7b4d..130047a502 100644 --- a/plotly/validators/volume/lightposition/_x.py +++ b/plotly/validators/volume/lightposition/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.NumberValidator): +class XValidator(_bv.NumberValidator): def __init__(self, plotly_name="x", parent_name="volume.lightposition", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/volume/lightposition/_y.py b/plotly/validators/volume/lightposition/_y.py index e392d07200..a55b889259 100644 --- a/plotly/validators/volume/lightposition/_y.py +++ b/plotly/validators/volume/lightposition/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.NumberValidator): +class YValidator(_bv.NumberValidator): def __init__(self, plotly_name="y", parent_name="volume.lightposition", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/volume/lightposition/_z.py b/plotly/validators/volume/lightposition/_z.py index bddb66ccdc..d9abe2ba41 100644 --- a/plotly/validators/volume/lightposition/_z.py +++ b/plotly/validators/volume/lightposition/_z.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.NumberValidator): +class ZValidator(_bv.NumberValidator): def __init__(self, plotly_name="z", parent_name="volume.lightposition", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 100000), min=kwargs.pop("min", -100000), diff --git a/plotly/validators/volume/slices/__init__.py b/plotly/validators/volume/slices/__init__.py index 52779f59bc..8c47d2db5f 100644 --- a/plotly/validators/volume/slices/__init__.py +++ b/plotly/validators/volume/slices/__init__.py @@ -1,13 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._z import ZValidator - from ._y import YValidator - from ._x import XValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._z.ZValidator", "._y.YValidator", "._x.XValidator"] +) diff --git a/plotly/validators/volume/slices/_x.py b/plotly/validators/volume/slices/_x.py index 5f0fb5c1aa..8d7da88502 100644 --- a/plotly/validators/volume/slices/_x.py +++ b/plotly/validators/volume/slices/_x.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.CompoundValidator): +class XValidator(_bv.CompoundValidator): def __init__(self, plotly_name="x", parent_name="volume.slices", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "X"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis x except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the x dimension are drawn. """, ), **kwargs, diff --git a/plotly/validators/volume/slices/_y.py b/plotly/validators/volume/slices/_y.py index a209974de2..a18e32f72a 100644 --- a/plotly/validators/volume/slices/_y.py +++ b/plotly/validators/volume/slices/_y.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.CompoundValidator): +class YValidator(_bv.CompoundValidator): def __init__(self, plotly_name="y", parent_name="volume.slices", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Y"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis y except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the y dimension are drawn. """, ), **kwargs, diff --git a/plotly/validators/volume/slices/_z.py b/plotly/validators/volume/slices/_z.py index 1af2c745b8..1e2bab5557 100644 --- a/plotly/validators/volume/slices/_z.py +++ b/plotly/validators/volume/slices/_z.py @@ -1,33 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZValidator(_plotly_utils.basevalidators.CompoundValidator): +class ZValidator(_bv.CompoundValidator): def __init__(self, plotly_name="z", parent_name="volume.slices", **kwargs): - super(ZValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Z"), data_docs=kwargs.pop( "data_docs", """ - fill - Sets the fill ratio of the `slices`. The - default fill value of the `slices` is 1 meaning - that they are entirely shaded. On the other - hand Applying a `fill` ratio less than one - would allow the creation of openings parallel - to the edges. - locations - Specifies the location(s) of slices on the - axis. When not specified slices would be - created for all points of the axis z except - start and end. - locationssrc - Sets the source reference on Chart Studio Cloud - for `locations`. - show - Determines whether or not slice planes about - the z dimension are drawn. """, ), **kwargs, diff --git a/plotly/validators/volume/slices/x/__init__.py b/plotly/validators/volume/slices/x/__init__.py index 9085068fff..69805fd611 100644 --- a/plotly/validators/volume/slices/x/__init__.py +++ b/plotly/validators/volume/slices/x/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._fill.FillValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], +) diff --git a/plotly/validators/volume/slices/x/_fill.py b/plotly/validators/volume/slices/x/_fill.py index 6bd4ea8cdb..62fb7809a2 100644 --- a/plotly/validators/volume/slices/x/_fill.py +++ b/plotly/validators/volume/slices/x/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.slices.x", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/slices/x/_locations.py b/plotly/validators/volume/slices/x/_locations.py index b3bca099de..ca3cd0f03f 100644 --- a/plotly/validators/volume/slices/x/_locations.py +++ b/plotly/validators/volume/slices/x/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="volume.slices.x", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/slices/x/_locationssrc.py b/plotly/validators/volume/slices/x/_locationssrc.py index 2831e3eb7a..bdc48ff192 100644 --- a/plotly/validators/volume/slices/x/_locationssrc.py +++ b/plotly/validators/volume/slices/x/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="volume.slices.x", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/slices/x/_show.py b/plotly/validators/volume/slices/x/_show.py index e3a03356af..2553e05930 100644 --- a/plotly/validators/volume/slices/x/_show.py +++ b/plotly/validators/volume/slices/x/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.slices.x", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/slices/y/__init__.py b/plotly/validators/volume/slices/y/__init__.py index 9085068fff..69805fd611 100644 --- a/plotly/validators/volume/slices/y/__init__.py +++ b/plotly/validators/volume/slices/y/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._fill.FillValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], +) diff --git a/plotly/validators/volume/slices/y/_fill.py b/plotly/validators/volume/slices/y/_fill.py index eaa0a4f5b6..cb1d8c9524 100644 --- a/plotly/validators/volume/slices/y/_fill.py +++ b/plotly/validators/volume/slices/y/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.slices.y", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/slices/y/_locations.py b/plotly/validators/volume/slices/y/_locations.py index ec36af5c38..8ea1a36974 100644 --- a/plotly/validators/volume/slices/y/_locations.py +++ b/plotly/validators/volume/slices/y/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="volume.slices.y", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/slices/y/_locationssrc.py b/plotly/validators/volume/slices/y/_locationssrc.py index 3ddf7ccbb8..a59a3949c3 100644 --- a/plotly/validators/volume/slices/y/_locationssrc.py +++ b/plotly/validators/volume/slices/y/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="volume.slices.y", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/slices/y/_show.py b/plotly/validators/volume/slices/y/_show.py index 6314c8d550..ddd9a783ae 100644 --- a/plotly/validators/volume/slices/y/_show.py +++ b/plotly/validators/volume/slices/y/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.slices.y", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/slices/z/__init__.py b/plotly/validators/volume/slices/z/__init__.py index 9085068fff..69805fd611 100644 --- a/plotly/validators/volume/slices/z/__init__.py +++ b/plotly/validators/volume/slices/z/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._locationssrc import LocationssrcValidator - from ._locations import LocationsValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._locationssrc.LocationssrcValidator", - "._locations.LocationsValidator", - "._fill.FillValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._locationssrc.LocationssrcValidator", + "._locations.LocationsValidator", + "._fill.FillValidator", + ], +) diff --git a/plotly/validators/volume/slices/z/_fill.py b/plotly/validators/volume/slices/z/_fill.py index 9fb3835d21..b5b01f2e04 100644 --- a/plotly/validators/volume/slices/z/_fill.py +++ b/plotly/validators/volume/slices/z/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.slices.z", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/slices/z/_locations.py b/plotly/validators/volume/slices/z/_locations.py index 780ce14d40..e4dd37eaf7 100644 --- a/plotly/validators/volume/slices/z/_locations.py +++ b/plotly/validators/volume/slices/z/_locations.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class LocationsValidator(_bv.DataArrayValidator): def __init__( self, plotly_name="locations", parent_name="volume.slices.z", **kwargs ): - super(LocationsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/slices/z/_locationssrc.py b/plotly/validators/volume/slices/z/_locationssrc.py index cdf1f968c5..f7e0f63a74 100644 --- a/plotly/validators/volume/slices/z/_locationssrc.py +++ b/plotly/validators/volume/slices/z/_locationssrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LocationssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LocationssrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="locationssrc", parent_name="volume.slices.z", **kwargs ): - super(LocationssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/volume/slices/z/_show.py b/plotly/validators/volume/slices/z/_show.py index 351ac46da7..f5d965fb70 100644 --- a/plotly/validators/volume/slices/z/_show.py +++ b/plotly/validators/volume/slices/z/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.slices.z", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/spaceframe/__init__.py b/plotly/validators/volume/spaceframe/__init__.py index 63a14620d2..db8b1b549e 100644 --- a/plotly/validators/volume/spaceframe/__init__.py +++ b/plotly/validators/volume/spaceframe/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._fill import FillValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._show.ShowValidator", "._fill.FillValidator"] +) diff --git a/plotly/validators/volume/spaceframe/_fill.py b/plotly/validators/volume/spaceframe/_fill.py index 7a03080d9a..342694bb9b 100644 --- a/plotly/validators/volume/spaceframe/_fill.py +++ b/plotly/validators/volume/spaceframe/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.spaceframe", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/spaceframe/_show.py b/plotly/validators/volume/spaceframe/_show.py index b44e6cae8f..ee0294cd68 100644 --- a/plotly/validators/volume/spaceframe/_show.py +++ b/plotly/validators/volume/spaceframe/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.spaceframe", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/volume/stream/__init__.py b/plotly/validators/volume/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/volume/stream/__init__.py +++ b/plotly/validators/volume/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/volume/stream/_maxpoints.py b/plotly/validators/volume/stream/_maxpoints.py index 758c0abd91..d21a7f5fed 100644 --- a/plotly/validators/volume/stream/_maxpoints.py +++ b/plotly/validators/volume/stream/_maxpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__(self, plotly_name="maxpoints", parent_name="volume.stream", **kwargs): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/stream/_token.py b/plotly/validators/volume/stream/_token.py index fdc2a4af22..1ee68fc95f 100644 --- a/plotly/validators/volume/stream/_token.py +++ b/plotly/validators/volume/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="volume.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/volume/surface/__init__.py b/plotly/validators/volume/surface/__init__.py index 79e3ea4c55..e200f4835e 100644 --- a/plotly/validators/volume/surface/__init__.py +++ b/plotly/validators/volume/surface/__init__.py @@ -1,21 +1,13 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._show import ShowValidator - from ._pattern import PatternValidator - from ._fill import FillValidator - from ._count import CountValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._show.ShowValidator", - "._pattern.PatternValidator", - "._fill.FillValidator", - "._count.CountValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._show.ShowValidator", + "._pattern.PatternValidator", + "._fill.FillValidator", + "._count.CountValidator", + ], +) diff --git a/plotly/validators/volume/surface/_count.py b/plotly/validators/volume/surface/_count.py index 77419b3c87..64fae814e8 100644 --- a/plotly/validators/volume/surface/_count.py +++ b/plotly/validators/volume/surface/_count.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CountValidator(_plotly_utils.basevalidators.IntegerValidator): +class CountValidator(_bv.IntegerValidator): def __init__(self, plotly_name="count", parent_name="volume.surface", **kwargs): - super(CountValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/volume/surface/_fill.py b/plotly/validators/volume/surface/_fill.py index 97313e9f47..85d51851e2 100644 --- a/plotly/validators/volume/surface/_fill.py +++ b/plotly/validators/volume/surface/_fill.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FillValidator(_plotly_utils.basevalidators.NumberValidator): +class FillValidator(_bv.NumberValidator): def __init__(self, plotly_name="fill", parent_name="volume.surface", **kwargs): - super(FillValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/volume/surface/_pattern.py b/plotly/validators/volume/surface/_pattern.py index 689a811f25..5b7d13b965 100644 --- a/plotly/validators/volume/surface/_pattern.py +++ b/plotly/validators/volume/surface/_pattern.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class PatternValidator(_plotly_utils.basevalidators.FlaglistValidator): +class PatternValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="pattern", parent_name="volume.surface", **kwargs): - super(PatternValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["all", "odd", "even"]), flags=kwargs.pop("flags", ["A", "B", "C", "D", "E"]), diff --git a/plotly/validators/volume/surface/_show.py b/plotly/validators/volume/surface/_show.py index 80116262ec..c89dea6edd 100644 --- a/plotly/validators/volume/surface/_show.py +++ b/plotly/validators/volume/surface/_show.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowValidator(_bv.BooleanValidator): def __init__(self, plotly_name="show", parent_name="volume.surface", **kwargs): - super(ShowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/__init__.py b/plotly/validators/waterfall/__init__.py index 74a3383093..3049f7babc 100644 --- a/plotly/validators/waterfall/__init__.py +++ b/plotly/validators/waterfall/__init__.py @@ -1,159 +1,82 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._zorder import ZorderValidator - from ._ysrc import YsrcValidator - from ._yperiodalignment import YperiodalignmentValidator - from ._yperiod0 import Yperiod0Validator - from ._yperiod import YperiodValidator - from ._yhoverformat import YhoverformatValidator - from ._yaxis import YaxisValidator - from ._y0 import Y0Validator - from ._y import YValidator - from ._xsrc import XsrcValidator - from ._xperiodalignment import XperiodalignmentValidator - from ._xperiod0 import Xperiod0Validator - from ._xperiod import XperiodValidator - from ._xhoverformat import XhoverformatValidator - from ._xaxis import XaxisValidator - from ._x0 import X0Validator - from ._x import XValidator - from ._widthsrc import WidthsrcValidator - from ._width import WidthValidator - from ._visible import VisibleValidator - from ._uirevision import UirevisionValidator - from ._uid import UidValidator - from ._totals import TotalsValidator - from ._texttemplatesrc import TexttemplatesrcValidator - from ._texttemplate import TexttemplateValidator - from ._textsrc import TextsrcValidator - from ._textpositionsrc import TextpositionsrcValidator - from ._textposition import TextpositionValidator - from ._textinfo import TextinfoValidator - from ._textfont import TextfontValidator - from ._textangle import TextangleValidator - from ._text import TextValidator - from ._stream import StreamValidator - from ._showlegend import ShowlegendValidator - from ._selectedpoints import SelectedpointsValidator - from ._outsidetextfont import OutsidetextfontValidator - from ._orientation import OrientationValidator - from ._opacity import OpacityValidator - from ._offsetsrc import OffsetsrcValidator - from ._offsetgroup import OffsetgroupValidator - from ._offset import OffsetValidator - from ._name import NameValidator - from ._metasrc import MetasrcValidator - from ._meta import MetaValidator - from ._measuresrc import MeasuresrcValidator - from ._measure import MeasureValidator - from ._legendwidth import LegendwidthValidator - from ._legendrank import LegendrankValidator - from ._legendgrouptitle import LegendgrouptitleValidator - from ._legendgroup import LegendgroupValidator - from ._legend import LegendValidator - from ._insidetextfont import InsidetextfontValidator - from ._insidetextanchor import InsidetextanchorValidator - from ._increasing import IncreasingValidator - from ._idssrc import IdssrcValidator - from ._ids import IdsValidator - from ._hovertextsrc import HovertextsrcValidator - from ._hovertext import HovertextValidator - from ._hovertemplatesrc import HovertemplatesrcValidator - from ._hovertemplate import HovertemplateValidator - from ._hoverlabel import HoverlabelValidator - from ._hoverinfosrc import HoverinfosrcValidator - from ._hoverinfo import HoverinfoValidator - from ._dy import DyValidator - from ._dx import DxValidator - from ._decreasing import DecreasingValidator - from ._customdatasrc import CustomdatasrcValidator - from ._customdata import CustomdataValidator - from ._constraintext import ConstraintextValidator - from ._connector import ConnectorValidator - from ._cliponaxis import CliponaxisValidator - from ._base import BaseValidator - from ._alignmentgroup import AlignmentgroupValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._zorder.ZorderValidator", - "._ysrc.YsrcValidator", - "._yperiodalignment.YperiodalignmentValidator", - "._yperiod0.Yperiod0Validator", - "._yperiod.YperiodValidator", - "._yhoverformat.YhoverformatValidator", - "._yaxis.YaxisValidator", - "._y0.Y0Validator", - "._y.YValidator", - "._xsrc.XsrcValidator", - "._xperiodalignment.XperiodalignmentValidator", - "._xperiod0.Xperiod0Validator", - "._xperiod.XperiodValidator", - "._xhoverformat.XhoverformatValidator", - "._xaxis.XaxisValidator", - "._x0.X0Validator", - "._x.XValidator", - "._widthsrc.WidthsrcValidator", - "._width.WidthValidator", - "._visible.VisibleValidator", - "._uirevision.UirevisionValidator", - "._uid.UidValidator", - "._totals.TotalsValidator", - "._texttemplatesrc.TexttemplatesrcValidator", - "._texttemplate.TexttemplateValidator", - "._textsrc.TextsrcValidator", - "._textpositionsrc.TextpositionsrcValidator", - "._textposition.TextpositionValidator", - "._textinfo.TextinfoValidator", - "._textfont.TextfontValidator", - "._textangle.TextangleValidator", - "._text.TextValidator", - "._stream.StreamValidator", - "._showlegend.ShowlegendValidator", - "._selectedpoints.SelectedpointsValidator", - "._outsidetextfont.OutsidetextfontValidator", - "._orientation.OrientationValidator", - "._opacity.OpacityValidator", - "._offsetsrc.OffsetsrcValidator", - "._offsetgroup.OffsetgroupValidator", - "._offset.OffsetValidator", - "._name.NameValidator", - "._metasrc.MetasrcValidator", - "._meta.MetaValidator", - "._measuresrc.MeasuresrcValidator", - "._measure.MeasureValidator", - "._legendwidth.LegendwidthValidator", - "._legendrank.LegendrankValidator", - "._legendgrouptitle.LegendgrouptitleValidator", - "._legendgroup.LegendgroupValidator", - "._legend.LegendValidator", - "._insidetextfont.InsidetextfontValidator", - "._insidetextanchor.InsidetextanchorValidator", - "._increasing.IncreasingValidator", - "._idssrc.IdssrcValidator", - "._ids.IdsValidator", - "._hovertextsrc.HovertextsrcValidator", - "._hovertext.HovertextValidator", - "._hovertemplatesrc.HovertemplatesrcValidator", - "._hovertemplate.HovertemplateValidator", - "._hoverlabel.HoverlabelValidator", - "._hoverinfosrc.HoverinfosrcValidator", - "._hoverinfo.HoverinfoValidator", - "._dy.DyValidator", - "._dx.DxValidator", - "._decreasing.DecreasingValidator", - "._customdatasrc.CustomdatasrcValidator", - "._customdata.CustomdataValidator", - "._constraintext.ConstraintextValidator", - "._connector.ConnectorValidator", - "._cliponaxis.CliponaxisValidator", - "._base.BaseValidator", - "._alignmentgroup.AlignmentgroupValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._zorder.ZorderValidator", + "._ysrc.YsrcValidator", + "._yperiodalignment.YperiodalignmentValidator", + "._yperiod0.Yperiod0Validator", + "._yperiod.YperiodValidator", + "._yhoverformat.YhoverformatValidator", + "._yaxis.YaxisValidator", + "._y0.Y0Validator", + "._y.YValidator", + "._xsrc.XsrcValidator", + "._xperiodalignment.XperiodalignmentValidator", + "._xperiod0.Xperiod0Validator", + "._xperiod.XperiodValidator", + "._xhoverformat.XhoverformatValidator", + "._xaxis.XaxisValidator", + "._x0.X0Validator", + "._x.XValidator", + "._widthsrc.WidthsrcValidator", + "._width.WidthValidator", + "._visible.VisibleValidator", + "._uirevision.UirevisionValidator", + "._uid.UidValidator", + "._totals.TotalsValidator", + "._texttemplatesrc.TexttemplatesrcValidator", + "._texttemplate.TexttemplateValidator", + "._textsrc.TextsrcValidator", + "._textpositionsrc.TextpositionsrcValidator", + "._textposition.TextpositionValidator", + "._textinfo.TextinfoValidator", + "._textfont.TextfontValidator", + "._textangle.TextangleValidator", + "._text.TextValidator", + "._stream.StreamValidator", + "._showlegend.ShowlegendValidator", + "._selectedpoints.SelectedpointsValidator", + "._outsidetextfont.OutsidetextfontValidator", + "._orientation.OrientationValidator", + "._opacity.OpacityValidator", + "._offsetsrc.OffsetsrcValidator", + "._offsetgroup.OffsetgroupValidator", + "._offset.OffsetValidator", + "._name.NameValidator", + "._metasrc.MetasrcValidator", + "._meta.MetaValidator", + "._measuresrc.MeasuresrcValidator", + "._measure.MeasureValidator", + "._legendwidth.LegendwidthValidator", + "._legendrank.LegendrankValidator", + "._legendgrouptitle.LegendgrouptitleValidator", + "._legendgroup.LegendgroupValidator", + "._legend.LegendValidator", + "._insidetextfont.InsidetextfontValidator", + "._insidetextanchor.InsidetextanchorValidator", + "._increasing.IncreasingValidator", + "._idssrc.IdssrcValidator", + "._ids.IdsValidator", + "._hovertextsrc.HovertextsrcValidator", + "._hovertext.HovertextValidator", + "._hovertemplatesrc.HovertemplatesrcValidator", + "._hovertemplate.HovertemplateValidator", + "._hoverlabel.HoverlabelValidator", + "._hoverinfosrc.HoverinfosrcValidator", + "._hoverinfo.HoverinfoValidator", + "._dy.DyValidator", + "._dx.DxValidator", + "._decreasing.DecreasingValidator", + "._customdatasrc.CustomdatasrcValidator", + "._customdata.CustomdataValidator", + "._constraintext.ConstraintextValidator", + "._connector.ConnectorValidator", + "._cliponaxis.CliponaxisValidator", + "._base.BaseValidator", + "._alignmentgroup.AlignmentgroupValidator", + ], +) diff --git a/plotly/validators/waterfall/_alignmentgroup.py b/plotly/validators/waterfall/_alignmentgroup.py index 66b314d995..87d1b97279 100644 --- a/plotly/validators/waterfall/_alignmentgroup.py +++ b/plotly/validators/waterfall/_alignmentgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignmentgroupValidator(_plotly_utils.basevalidators.StringValidator): +class AlignmentgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="alignmentgroup", parent_name="waterfall", **kwargs): - super(AlignmentgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_base.py b/plotly/validators/waterfall/_base.py index 3b0a6a869d..89e5e6ca39 100644 --- a/plotly/validators/waterfall/_base.py +++ b/plotly/validators/waterfall/_base.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BaseValidator(_plotly_utils.basevalidators.NumberValidator): +class BaseValidator(_bv.NumberValidator): def __init__(self, plotly_name="base", parent_name="waterfall", **kwargs): - super(BaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/waterfall/_cliponaxis.py b/plotly/validators/waterfall/_cliponaxis.py index 0113bfb38a..68105d4896 100644 --- a/plotly/validators/waterfall/_cliponaxis.py +++ b/plotly/validators/waterfall/_cliponaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CliponaxisValidator(_plotly_utils.basevalidators.BooleanValidator): +class CliponaxisValidator(_bv.BooleanValidator): def __init__(self, plotly_name="cliponaxis", parent_name="waterfall", **kwargs): - super(CliponaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/waterfall/_connector.py b/plotly/validators/waterfall/_connector.py index 3fbedfecdc..013119d151 100644 --- a/plotly/validators/waterfall/_connector.py +++ b/plotly/validators/waterfall/_connector.py @@ -1,23 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): +class ConnectorValidator(_bv.CompoundValidator): def __init__(self, plotly_name="connector", parent_name="waterfall", **kwargs): - super(ConnectorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Connector"), data_docs=kwargs.pop( "data_docs", """ - line - :class:`plotly.graph_objects.waterfall.connecto - r.Line` instance or dict with compatible - properties - mode - Sets the shape of connector lines. - visible - Determines if connector lines are drawn. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_constraintext.py b/plotly/validators/waterfall/_constraintext.py index 9a65200635..323fbe744f 100644 --- a/plotly/validators/waterfall/_constraintext.py +++ b/plotly/validators/waterfall/_constraintext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ConstraintextValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ConstraintextValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="constraintext", parent_name="waterfall", **kwargs): - super(ConstraintextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "both", "none"]), **kwargs, diff --git a/plotly/validators/waterfall/_customdata.py b/plotly/validators/waterfall/_customdata.py index 3f2abd54ad..fec81d4e68 100644 --- a/plotly/validators/waterfall/_customdata.py +++ b/plotly/validators/waterfall/_customdata.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdataValidator(_plotly_utils.basevalidators.DataArrayValidator): +class CustomdataValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="customdata", parent_name="waterfall", **kwargs): - super(CustomdataValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_customdatasrc.py b/plotly/validators/waterfall/_customdatasrc.py index c15d17ea62..082e4baaf3 100644 --- a/plotly/validators/waterfall/_customdatasrc.py +++ b/plotly/validators/waterfall/_customdatasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class CustomdatasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class CustomdatasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="customdatasrc", parent_name="waterfall", **kwargs): - super(CustomdatasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_decreasing.py b/plotly/validators/waterfall/_decreasing.py index 3677db8b32..7dc3d4aa39 100644 --- a/plotly/validators/waterfall/_decreasing.py +++ b/plotly/validators/waterfall/_decreasing.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DecreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class DecreasingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="decreasing", parent_name="waterfall", **kwargs): - super(DecreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Decreasing"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.waterfall.decreasi - ng.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/waterfall/_dx.py b/plotly/validators/waterfall/_dx.py index 333615690c..6a32aabe16 100644 --- a/plotly/validators/waterfall/_dx.py +++ b/plotly/validators/waterfall/_dx.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DxValidator(_plotly_utils.basevalidators.NumberValidator): +class DxValidator(_bv.NumberValidator): def __init__(self, plotly_name="dx", parent_name="waterfall", **kwargs): - super(DxValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_dy.py b/plotly/validators/waterfall/_dy.py index 6162d9049d..d547603835 100644 --- a/plotly/validators/waterfall/_dy.py +++ b/plotly/validators/waterfall/_dy.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DyValidator(_plotly_utils.basevalidators.NumberValidator): +class DyValidator(_bv.NumberValidator): def __init__(self, plotly_name="dy", parent_name="waterfall", **kwargs): - super(DyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_hoverinfo.py b/plotly/validators/waterfall/_hoverinfo.py index 525eefcf4b..d91aea85c0 100644 --- a/plotly/validators/waterfall/_hoverinfo.py +++ b/plotly/validators/waterfall/_hoverinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class HoverinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="hoverinfo", parent_name="waterfall", **kwargs): - super(HoverinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["all", "none", "skip"]), diff --git a/plotly/validators/waterfall/_hoverinfosrc.py b/plotly/validators/waterfall/_hoverinfosrc.py index e2a6baf14a..612a3cca13 100644 --- a/plotly/validators/waterfall/_hoverinfosrc.py +++ b/plotly/validators/waterfall/_hoverinfosrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverinfosrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HoverinfosrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hoverinfosrc", parent_name="waterfall", **kwargs): - super(HoverinfosrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_hoverlabel.py b/plotly/validators/waterfall/_hoverlabel.py index 1782fbbe59..4e4f93d872 100644 --- a/plotly/validators/waterfall/_hoverlabel.py +++ b/plotly/validators/waterfall/_hoverlabel.py @@ -1,50 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): +class HoverlabelValidator(_bv.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="waterfall", **kwargs): - super(HoverlabelValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Hoverlabel"), data_docs=kwargs.pop( "data_docs", """ - align - Sets the horizontal alignment of the text - content within hover label box. Has an effect - only if the hover label text spans more two or - more lines - alignsrc - Sets the source reference on Chart Studio Cloud - for `align`. - bgcolor - Sets the background color of the hover labels - for this trace - bgcolorsrc - Sets the source reference on Chart Studio Cloud - for `bgcolor`. - bordercolor - Sets the border color of the hover labels for - this trace. - bordercolorsrc - Sets the source reference on Chart Studio Cloud - for `bordercolor`. - font - Sets the font used in hover labels. - namelength - Sets the default length (in number of - characters) of the trace name in the hover - labels for all traces. -1 shows the whole name - regardless of length. 0-3 shows the first 0-3 - characters, and an integer >3 will show the - whole name if it is less than that many - characters, but if it is longer, will truncate - to `namelength - 3` characters and add an - ellipsis. - namelengthsrc - Sets the source reference on Chart Studio Cloud - for `namelength`. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_hovertemplate.py b/plotly/validators/waterfall/_hovertemplate.py index bd1897144b..7511fef7e5 100644 --- a/plotly/validators/waterfall/_hovertemplate.py +++ b/plotly/validators/waterfall/_hovertemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplateValidator(_plotly_utils.basevalidators.StringValidator): +class HovertemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertemplate", parent_name="waterfall", **kwargs): - super(HovertemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/waterfall/_hovertemplatesrc.py b/plotly/validators/waterfall/_hovertemplatesrc.py index 6db575e04c..c804025c93 100644 --- a/plotly/validators/waterfall/_hovertemplatesrc.py +++ b/plotly/validators/waterfall/_hovertemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="hovertemplatesrc", parent_name="waterfall", **kwargs ): - super(HovertemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_hovertext.py b/plotly/validators/waterfall/_hovertext.py index 8e67e37b58..a9a34a2763 100644 --- a/plotly/validators/waterfall/_hovertext.py +++ b/plotly/validators/waterfall/_hovertext.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextValidator(_plotly_utils.basevalidators.StringValidator): +class HovertextValidator(_bv.StringValidator): def __init__(self, plotly_name="hovertext", parent_name="waterfall", **kwargs): - super(HovertextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/_hovertextsrc.py b/plotly/validators/waterfall/_hovertextsrc.py index 50bcee98b1..e27276c116 100644 --- a/plotly/validators/waterfall/_hovertextsrc.py +++ b/plotly/validators/waterfall/_hovertextsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class HovertextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class HovertextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="hovertextsrc", parent_name="waterfall", **kwargs): - super(HovertextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_ids.py b/plotly/validators/waterfall/_ids.py index dd8798b51d..93251380d6 100644 --- a/plotly/validators/waterfall/_ids.py +++ b/plotly/validators/waterfall/_ids.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdsValidator(_plotly_utils.basevalidators.DataArrayValidator): +class IdsValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="ids", parent_name="waterfall", **kwargs): - super(IdsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_idssrc.py b/plotly/validators/waterfall/_idssrc.py index 7480c978f7..ce94f23ab5 100644 --- a/plotly/validators/waterfall/_idssrc.py +++ b/plotly/validators/waterfall/_idssrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IdssrcValidator(_plotly_utils.basevalidators.SrcValidator): +class IdssrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="idssrc", parent_name="waterfall", **kwargs): - super(IdssrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_increasing.py b/plotly/validators/waterfall/_increasing.py index 792c4f589c..47292970aa 100644 --- a/plotly/validators/waterfall/_increasing.py +++ b/plotly/validators/waterfall/_increasing.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class IncreasingValidator(_plotly_utils.basevalidators.CompoundValidator): +class IncreasingValidator(_bv.CompoundValidator): def __init__(self, plotly_name="increasing", parent_name="waterfall", **kwargs): - super(IncreasingValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Increasing"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.waterfall.increasi - ng.Marker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/waterfall/_insidetextanchor.py b/plotly/validators/waterfall/_insidetextanchor.py index 3cb72f8b0d..27b4e05d2d 100644 --- a/plotly/validators/waterfall/_insidetextanchor.py +++ b/plotly/validators/waterfall/_insidetextanchor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class InsidetextanchorValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="insidetextanchor", parent_name="waterfall", **kwargs ): - super(InsidetextanchorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["end", "middle", "start"]), **kwargs, diff --git a/plotly/validators/waterfall/_insidetextfont.py b/plotly/validators/waterfall/_insidetextfont.py index f9642da377..f0a1691f20 100644 --- a/plotly/validators/waterfall/_insidetextfont.py +++ b/plotly/validators/waterfall/_insidetextfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class InsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class InsidetextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="insidetextfont", parent_name="waterfall", **kwargs): - super(InsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Insidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_legend.py b/plotly/validators/waterfall/_legend.py index a68e467652..87836ff9d4 100644 --- a/plotly/validators/waterfall/_legend.py +++ b/plotly/validators/waterfall/_legend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendValidator(_plotly_utils.basevalidators.SubplotidValidator): +class LegendValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="legend", parent_name="waterfall", **kwargs): - super(LegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "legend"), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/_legendgroup.py b/plotly/validators/waterfall/_legendgroup.py index 8cfac6d855..3a6a1001ca 100644 --- a/plotly/validators/waterfall/_legendgroup.py +++ b/plotly/validators/waterfall/_legendgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgroupValidator(_plotly_utils.basevalidators.StringValidator): +class LegendgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="legendgroup", parent_name="waterfall", **kwargs): - super(LegendgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/_legendgrouptitle.py b/plotly/validators/waterfall/_legendgrouptitle.py index 5157d3ad8c..b117c06943 100644 --- a/plotly/validators/waterfall/_legendgrouptitle.py +++ b/plotly/validators/waterfall/_legendgrouptitle.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): +class LegendgrouptitleValidator(_bv.CompoundValidator): def __init__( self, plotly_name="legendgrouptitle", parent_name="waterfall", **kwargs ): - super(LegendgrouptitleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Legendgrouptitle"), data_docs=kwargs.pop( "data_docs", """ - font - Sets this legend group's title font. - text - Sets the title of the legend group. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_legendrank.py b/plotly/validators/waterfall/_legendrank.py index 19e62098e5..3ed0fef8e0 100644 --- a/plotly/validators/waterfall/_legendrank.py +++ b/plotly/validators/waterfall/_legendrank.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendrankValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendrankValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendrank", parent_name="waterfall", **kwargs): - super(LegendrankValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/_legendwidth.py b/plotly/validators/waterfall/_legendwidth.py index 33fbb7e7d3..621a2e2ec3 100644 --- a/plotly/validators/waterfall/_legendwidth.py +++ b/plotly/validators/waterfall/_legendwidth.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LegendwidthValidator(_plotly_utils.basevalidators.NumberValidator): +class LegendwidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="legendwidth", parent_name="waterfall", **kwargs): - super(LegendwidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/waterfall/_measure.py b/plotly/validators/waterfall/_measure.py index 128c69f90d..557f24c893 100644 --- a/plotly/validators/waterfall/_measure.py +++ b/plotly/validators/waterfall/_measure.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MeasureValidator(_plotly_utils.basevalidators.DataArrayValidator): +class MeasureValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="measure", parent_name="waterfall", **kwargs): - super(MeasureValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_measuresrc.py b/plotly/validators/waterfall/_measuresrc.py index fc5a061e88..666bb92dcf 100644 --- a/plotly/validators/waterfall/_measuresrc.py +++ b/plotly/validators/waterfall/_measuresrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MeasuresrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MeasuresrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="measuresrc", parent_name="waterfall", **kwargs): - super(MeasuresrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_meta.py b/plotly/validators/waterfall/_meta.py index 8a0bff122c..6756195d2f 100644 --- a/plotly/validators/waterfall/_meta.py +++ b/plotly/validators/waterfall/_meta.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetaValidator(_plotly_utils.basevalidators.AnyValidator): +class MetaValidator(_bv.AnyValidator): def __init__(self, plotly_name="meta", parent_name="waterfall", **kwargs): - super(MetaValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/waterfall/_metasrc.py b/plotly/validators/waterfall/_metasrc.py index 9024394926..d967dd0ee4 100644 --- a/plotly/validators/waterfall/_metasrc.py +++ b/plotly/validators/waterfall/_metasrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator): +class MetasrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="metasrc", parent_name="waterfall", **kwargs): - super(MetasrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_name.py b/plotly/validators/waterfall/_name.py index 6dff281339..ba6179dcdb 100644 --- a/plotly/validators/waterfall/_name.py +++ b/plotly/validators/waterfall/_name.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NameValidator(_plotly_utils.basevalidators.StringValidator): +class NameValidator(_bv.StringValidator): def __init__(self, plotly_name="name", parent_name="waterfall", **kwargs): - super(NameValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/_offset.py b/plotly/validators/waterfall/_offset.py index bddd29bb3e..b87085e504 100644 --- a/plotly/validators/waterfall/_offset.py +++ b/plotly/validators/waterfall/_offset.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetValidator(_plotly_utils.basevalidators.NumberValidator): +class OffsetValidator(_bv.NumberValidator): def __init__(self, plotly_name="offset", parent_name="waterfall", **kwargs): - super(OffsetValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/waterfall/_offsetgroup.py b/plotly/validators/waterfall/_offsetgroup.py index b98ac8d2a6..d49b9d8b81 100644 --- a/plotly/validators/waterfall/_offsetgroup.py +++ b/plotly/validators/waterfall/_offsetgroup.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetgroupValidator(_plotly_utils.basevalidators.StringValidator): +class OffsetgroupValidator(_bv.StringValidator): def __init__(self, plotly_name="offsetgroup", parent_name="waterfall", **kwargs): - super(OffsetgroupValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_offsetsrc.py b/plotly/validators/waterfall/_offsetsrc.py index 1fbe7bf0b0..3763550177 100644 --- a/plotly/validators/waterfall/_offsetsrc.py +++ b/plotly/validators/waterfall/_offsetsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OffsetsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class OffsetsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="offsetsrc", parent_name="waterfall", **kwargs): - super(OffsetsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_opacity.py b/plotly/validators/waterfall/_opacity.py index a1a5b0a20d..776e38adf3 100644 --- a/plotly/validators/waterfall/_opacity.py +++ b/plotly/validators/waterfall/_opacity.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OpacityValidator(_plotly_utils.basevalidators.NumberValidator): +class OpacityValidator(_bv.NumberValidator): def __init__(self, plotly_name="opacity", parent_name="waterfall", **kwargs): - super(OpacityValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), max=kwargs.pop("max", 1), min=kwargs.pop("min", 0), diff --git a/plotly/validators/waterfall/_orientation.py b/plotly/validators/waterfall/_orientation.py index 111510998c..36df300c80 100644 --- a/plotly/validators/waterfall/_orientation.py +++ b/plotly/validators/waterfall/_orientation.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OrientationValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class OrientationValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="orientation", parent_name="waterfall", **kwargs): - super(OrientationValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), values=kwargs.pop("values", ["v", "h"]), **kwargs, diff --git a/plotly/validators/waterfall/_outsidetextfont.py b/plotly/validators/waterfall/_outsidetextfont.py index a027ab2303..7ae4862209 100644 --- a/plotly/validators/waterfall/_outsidetextfont.py +++ b/plotly/validators/waterfall/_outsidetextfont.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class OutsidetextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class OutsidetextfontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="outsidetextfont", parent_name="waterfall", **kwargs ): - super(OutsidetextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Outsidetextfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_selectedpoints.py b/plotly/validators/waterfall/_selectedpoints.py index c53675d549..ba62ab4745 100644 --- a/plotly/validators/waterfall/_selectedpoints.py +++ b/plotly/validators/waterfall/_selectedpoints.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SelectedpointsValidator(_plotly_utils.basevalidators.AnyValidator): +class SelectedpointsValidator(_bv.AnyValidator): def __init__(self, plotly_name="selectedpoints", parent_name="waterfall", **kwargs): - super(SelectedpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_showlegend.py b/plotly/validators/waterfall/_showlegend.py index abcedae929..0b3cbeb3fd 100644 --- a/plotly/validators/waterfall/_showlegend.py +++ b/plotly/validators/waterfall/_showlegend.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator): +class ShowlegendValidator(_bv.BooleanValidator): def __init__(self, plotly_name="showlegend", parent_name="waterfall", **kwargs): - super(ShowlegendValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/_stream.py b/plotly/validators/waterfall/_stream.py index a436dd4fd0..53e2a00f96 100644 --- a/plotly/validators/waterfall/_stream.py +++ b/plotly/validators/waterfall/_stream.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StreamValidator(_plotly_utils.basevalidators.CompoundValidator): +class StreamValidator(_bv.CompoundValidator): def __init__(self, plotly_name="stream", parent_name="waterfall", **kwargs): - super(StreamValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Stream"), data_docs=kwargs.pop( "data_docs", """ - maxpoints - Sets the maximum number of points to keep on - the plots from an incoming stream. If - `maxpoints` is set to 50, only the newest 50 - points will be displayed on the plot. - token - The stream id number links a data trace on a - plot with a stream. See https://chart- - studio.plotly.com/settings for more details. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_text.py b/plotly/validators/waterfall/_text.py index 1f6da01b61..96e9fa2332 100644 --- a/plotly/validators/waterfall/_text.py +++ b/plotly/validators/waterfall/_text.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__(self, plotly_name="text", parent_name="waterfall", **kwargs): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/waterfall/_textangle.py b/plotly/validators/waterfall/_textangle.py index ee7d15ea87..dade2d9082 100644 --- a/plotly/validators/waterfall/_textangle.py +++ b/plotly/validators/waterfall/_textangle.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextangleValidator(_plotly_utils.basevalidators.AngleValidator): +class TextangleValidator(_bv.AngleValidator): def __init__(self, plotly_name="textangle", parent_name="waterfall", **kwargs): - super(TextangleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/waterfall/_textfont.py b/plotly/validators/waterfall/_textfont.py index 8ce970c9f0..27e5e67303 100644 --- a/plotly/validators/waterfall/_textfont.py +++ b/plotly/validators/waterfall/_textfont.py @@ -1,85 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): +class TextfontValidator(_bv.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="waterfall", **kwargs): - super(TextfontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Textfont"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/waterfall/_textinfo.py b/plotly/validators/waterfall/_textinfo.py index 4334e1559b..b193f214a7 100644 --- a/plotly/validators/waterfall/_textinfo.py +++ b/plotly/validators/waterfall/_textinfo.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextinfoValidator(_plotly_utils.basevalidators.FlaglistValidator): +class TextinfoValidator(_bv.FlaglistValidator): def __init__(self, plotly_name="textinfo", parent_name="waterfall", **kwargs): - super(TextinfoValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "plot"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/waterfall/_textposition.py b/plotly/validators/waterfall/_textposition.py index 9f588b0eb5..1c90e75ce3 100644 --- a/plotly/validators/waterfall/_textposition.py +++ b/plotly/validators/waterfall/_textposition.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextpositionValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="textposition", parent_name="waterfall", **kwargs): - super(TextpositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["inside", "outside", "auto", "none"]), diff --git a/plotly/validators/waterfall/_textpositionsrc.py b/plotly/validators/waterfall/_textpositionsrc.py index 90be472cd7..5ab9b904c4 100644 --- a/plotly/validators/waterfall/_textpositionsrc.py +++ b/plotly/validators/waterfall/_textpositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextpositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextpositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textpositionsrc", parent_name="waterfall", **kwargs ): - super(TextpositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_textsrc.py b/plotly/validators/waterfall/_textsrc.py index deabaa1cd0..9ae6106907 100644 --- a/plotly/validators/waterfall/_textsrc.py +++ b/plotly/validators/waterfall/_textsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="textsrc", parent_name="waterfall", **kwargs): - super(TextsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_texttemplate.py b/plotly/validators/waterfall/_texttemplate.py index fcdb8ff6c3..e69b97a8d1 100644 --- a/plotly/validators/waterfall/_texttemplate.py +++ b/plotly/validators/waterfall/_texttemplate.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplateValidator(_plotly_utils.basevalidators.StringValidator): +class TexttemplateValidator(_bv.StringValidator): def __init__(self, plotly_name="texttemplate", parent_name="waterfall", **kwargs): - super(TexttemplateValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "plot"), **kwargs, diff --git a/plotly/validators/waterfall/_texttemplatesrc.py b/plotly/validators/waterfall/_texttemplatesrc.py index e8b5614c87..8099bec0da 100644 --- a/plotly/validators/waterfall/_texttemplatesrc.py +++ b/plotly/validators/waterfall/_texttemplatesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TexttemplatesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TexttemplatesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="texttemplatesrc", parent_name="waterfall", **kwargs ): - super(TexttemplatesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_totals.py b/plotly/validators/waterfall/_totals.py index 8a5ec9cd99..68d4b34b0a 100644 --- a/plotly/validators/waterfall/_totals.py +++ b/plotly/validators/waterfall/_totals.py @@ -1,19 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TotalsValidator(_plotly_utils.basevalidators.CompoundValidator): +class TotalsValidator(_bv.CompoundValidator): def __init__(self, plotly_name="totals", parent_name="waterfall", **kwargs): - super(TotalsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Totals"), data_docs=kwargs.pop( "data_docs", """ - marker - :class:`plotly.graph_objects.waterfall.totals.M - arker` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/waterfall/_uid.py b/plotly/validators/waterfall/_uid.py index 6c9561b24e..e24bf665ec 100644 --- a/plotly/validators/waterfall/_uid.py +++ b/plotly/validators/waterfall/_uid.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UidValidator(_plotly_utils.basevalidators.StringValidator): +class UidValidator(_bv.StringValidator): def __init__(self, plotly_name="uid", parent_name="waterfall", **kwargs): - super(UidValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/waterfall/_uirevision.py b/plotly/validators/waterfall/_uirevision.py index 6bb082428d..bd362cf332 100644 --- a/plotly/validators/waterfall/_uirevision.py +++ b/plotly/validators/waterfall/_uirevision.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): +class UirevisionValidator(_bv.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="waterfall", **kwargs): - super(UirevisionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_visible.py b/plotly/validators/waterfall/_visible.py index 8615c9fd13..8c0a27bce7 100644 --- a/plotly/validators/waterfall/_visible.py +++ b/plotly/validators/waterfall/_visible.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VisibleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="waterfall", **kwargs): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", [True, False, "legendonly"]), **kwargs, diff --git a/plotly/validators/waterfall/_width.py b/plotly/validators/waterfall/_width.py index fce66aa9b4..c525e89d6f 100644 --- a/plotly/validators/waterfall/_width.py +++ b/plotly/validators/waterfall/_width.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__(self, plotly_name="width", parent_name="waterfall", **kwargs): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/waterfall/_widthsrc.py b/plotly/validators/waterfall/_widthsrc.py index 740abde2fa..15a11b2f93 100644 --- a/plotly/validators/waterfall/_widthsrc.py +++ b/plotly/validators/waterfall/_widthsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WidthsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="widthsrc", parent_name="waterfall", **kwargs): - super(WidthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_x.py b/plotly/validators/waterfall/_x.py index 56fbdd6608..35ef2d7334 100644 --- a/plotly/validators/waterfall/_x.py +++ b/plotly/validators/waterfall/_x.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XValidator(_plotly_utils.basevalidators.DataArrayValidator): +class XValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="x", parent_name="waterfall", **kwargs): - super(XValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/waterfall/_x0.py b/plotly/validators/waterfall/_x0.py index 9db7cdcdd1..64b50093fd 100644 --- a/plotly/validators/waterfall/_x0.py +++ b/plotly/validators/waterfall/_x0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class X0Validator(_plotly_utils.basevalidators.AnyValidator): +class X0Validator(_bv.AnyValidator): def __init__(self, plotly_name="x0", parent_name="waterfall", **kwargs): - super(X0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/waterfall/_xaxis.py b/plotly/validators/waterfall/_xaxis.py index 6fe6367eb5..a63b0d080f 100644 --- a/plotly/validators/waterfall/_xaxis.py +++ b/plotly/validators/waterfall/_xaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class XaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="xaxis", parent_name="waterfall", **kwargs): - super(XaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "x"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/waterfall/_xhoverformat.py b/plotly/validators/waterfall/_xhoverformat.py index 798da875ae..66ece51dcf 100644 --- a/plotly/validators/waterfall/_xhoverformat.py +++ b/plotly/validators/waterfall/_xhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class XhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="xhoverformat", parent_name="waterfall", **kwargs): - super(XhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_xperiod.py b/plotly/validators/waterfall/_xperiod.py index ba2f16bc3b..58c00682d7 100644 --- a/plotly/validators/waterfall/_xperiod.py +++ b/plotly/validators/waterfall/_xperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class XperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod", parent_name="waterfall", **kwargs): - super(XperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_xperiod0.py b/plotly/validators/waterfall/_xperiod0.py index 9cbe13a87d..a4482326b4 100644 --- a/plotly/validators/waterfall/_xperiod0.py +++ b/plotly/validators/waterfall/_xperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Xperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Xperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="xperiod0", parent_name="waterfall", **kwargs): - super(Xperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_xperiodalignment.py b/plotly/validators/waterfall/_xperiodalignment.py index 5b5a78dd37..cdf4dfc766 100644 --- a/plotly/validators/waterfall/_xperiodalignment.py +++ b/plotly/validators/waterfall/_xperiodalignment.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class XperiodalignmentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="xperiodalignment", parent_name="waterfall", **kwargs ): - super(XperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/waterfall/_xsrc.py b/plotly/validators/waterfall/_xsrc.py index 125b52958a..4b41e31e89 100644 --- a/plotly/validators/waterfall/_xsrc.py +++ b/plotly/validators/waterfall/_xsrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class XsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class XsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="xsrc", parent_name="waterfall", **kwargs): - super(XsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_y.py b/plotly/validators/waterfall/_y.py index e309b41a16..22aae8d379 100644 --- a/plotly/validators/waterfall/_y.py +++ b/plotly/validators/waterfall/_y.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YValidator(_plotly_utils.basevalidators.DataArrayValidator): +class YValidator(_bv.DataArrayValidator): def __init__(self, plotly_name="y", parent_name="waterfall", **kwargs): - super(YValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/waterfall/_y0.py b/plotly/validators/waterfall/_y0.py index ffbafc7424..2e67272f9b 100644 --- a/plotly/validators/waterfall/_y0.py +++ b/plotly/validators/waterfall/_y0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Y0Validator(_plotly_utils.basevalidators.AnyValidator): +class Y0Validator(_bv.AnyValidator): def __init__(self, plotly_name="y0", parent_name="waterfall", **kwargs): - super(Y0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, ) diff --git a/plotly/validators/waterfall/_yaxis.py b/plotly/validators/waterfall/_yaxis.py index 47b68a530d..60f469d4b6 100644 --- a/plotly/validators/waterfall/_yaxis.py +++ b/plotly/validators/waterfall/_yaxis.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YaxisValidator(_plotly_utils.basevalidators.SubplotidValidator): +class YaxisValidator(_bv.SubplotidValidator): def __init__(self, plotly_name="yaxis", parent_name="waterfall", **kwargs): - super(YaxisValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, dflt=kwargs.pop("dflt", "y"), edit_type=kwargs.pop("edit_type", "calc+clearAxisTypes"), **kwargs, diff --git a/plotly/validators/waterfall/_yhoverformat.py b/plotly/validators/waterfall/_yhoverformat.py index bd86a8daf9..10fc0fbdac 100644 --- a/plotly/validators/waterfall/_yhoverformat.py +++ b/plotly/validators/waterfall/_yhoverformat.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YhoverformatValidator(_plotly_utils.basevalidators.StringValidator): +class YhoverformatValidator(_bv.StringValidator): def __init__(self, plotly_name="yhoverformat", parent_name="waterfall", **kwargs): - super(YhoverformatValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_yperiod.py b/plotly/validators/waterfall/_yperiod.py index d7863f3130..9e9887887f 100644 --- a/plotly/validators/waterfall/_yperiod.py +++ b/plotly/validators/waterfall/_yperiod.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodValidator(_plotly_utils.basevalidators.AnyValidator): +class YperiodValidator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod", parent_name="waterfall", **kwargs): - super(YperiodValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_yperiod0.py b/plotly/validators/waterfall/_yperiod0.py index 3e24a4792f..caeb68a1b0 100644 --- a/plotly/validators/waterfall/_yperiod0.py +++ b/plotly/validators/waterfall/_yperiod0.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class Yperiod0Validator(_plotly_utils.basevalidators.AnyValidator): +class Yperiod0Validator(_bv.AnyValidator): def __init__(self, plotly_name="yperiod0", parent_name="waterfall", **kwargs): - super(Yperiod0Validator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), **kwargs, ) diff --git a/plotly/validators/waterfall/_yperiodalignment.py b/plotly/validators/waterfall/_yperiodalignment.py index 7d6d6fd603..5a9c1dd134 100644 --- a/plotly/validators/waterfall/_yperiodalignment.py +++ b/plotly/validators/waterfall/_yperiodalignment.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YperiodalignmentValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class YperiodalignmentValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="yperiodalignment", parent_name="waterfall", **kwargs ): - super(YperiodalignmentValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["start", "middle", "end"]), **kwargs, diff --git a/plotly/validators/waterfall/_ysrc.py b/plotly/validators/waterfall/_ysrc.py index 363257a1f6..6313543adb 100644 --- a/plotly/validators/waterfall/_ysrc.py +++ b/plotly/validators/waterfall/_ysrc.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class YsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class YsrcValidator(_bv.SrcValidator): def __init__(self, plotly_name="ysrc", parent_name="waterfall", **kwargs): - super(YsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/_zorder.py b/plotly/validators/waterfall/_zorder.py index 5ee7a49bca..c7f0679a50 100644 --- a/plotly/validators/waterfall/_zorder.py +++ b/plotly/validators/waterfall/_zorder.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ZorderValidator(_plotly_utils.basevalidators.IntegerValidator): +class ZorderValidator(_bv.IntegerValidator): def __init__(self, plotly_name="zorder", parent_name="waterfall", **kwargs): - super(ZorderValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/waterfall/connector/__init__.py b/plotly/validators/waterfall/connector/__init__.py index 128cd52908..bd950c4fbd 100644 --- a/plotly/validators/waterfall/connector/__init__.py +++ b/plotly/validators/waterfall/connector/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._visible import VisibleValidator - from ._mode import ModeValidator - from ._line import LineValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._visible.VisibleValidator", "._mode.ModeValidator", "._line.LineValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._visible.VisibleValidator", "._mode.ModeValidator", "._line.LineValidator"], +) diff --git a/plotly/validators/waterfall/connector/_line.py b/plotly/validators/waterfall/connector/_line.py index 84ef2ac6d9..b258a75b99 100644 --- a/plotly/validators/waterfall/connector/_line.py +++ b/plotly/validators/waterfall/connector/_line.py @@ -1,24 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__(self, plotly_name="line", parent_name="waterfall.connector", **kwargs): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color. - dash - Sets the dash style of lines. Set to a dash - type string ("solid", "dot", "dash", - "longdash", "dashdot", or "longdashdot") or a - dash length list in px (eg "5px,10px,2px,2px"). - width - Sets the line width (in px). """, ), **kwargs, diff --git a/plotly/validators/waterfall/connector/_mode.py b/plotly/validators/waterfall/connector/_mode.py index 8cf2b29dfe..8728234c0f 100644 --- a/plotly/validators/waterfall/connector/_mode.py +++ b/plotly/validators/waterfall/connector/_mode.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ModeValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class ModeValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="mode", parent_name="waterfall.connector", **kwargs): - super(ModeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), values=kwargs.pop("values", ["spanning", "between"]), **kwargs, diff --git a/plotly/validators/waterfall/connector/_visible.py b/plotly/validators/waterfall/connector/_visible.py index d517a8e7cd..81cbe919a3 100644 --- a/plotly/validators/waterfall/connector/_visible.py +++ b/plotly/validators/waterfall/connector/_visible.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VisibleValidator(_plotly_utils.basevalidators.BooleanValidator): +class VisibleValidator(_bv.BooleanValidator): def __init__( self, plotly_name="visible", parent_name="waterfall.connector", **kwargs ): - super(VisibleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), **kwargs, ) diff --git a/plotly/validators/waterfall/connector/line/__init__.py b/plotly/validators/waterfall/connector/line/__init__.py index cff4146651..c5140ef758 100644 --- a/plotly/validators/waterfall/connector/line/__init__.py +++ b/plotly/validators/waterfall/connector/line/__init__.py @@ -1,15 +1,8 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._dash import DashValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + ["._width.WidthValidator", "._dash.DashValidator", "._color.ColorValidator"], +) diff --git a/plotly/validators/waterfall/connector/line/_color.py b/plotly/validators/waterfall/connector/line/_color.py index 528b014f3d..bd9db6909c 100644 --- a/plotly/validators/waterfall/connector/line/_color.py +++ b/plotly/validators/waterfall/connector/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.connector.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/connector/line/_dash.py b/plotly/validators/waterfall/connector/line/_dash.py index ed8535717e..a4fd11284b 100644 --- a/plotly/validators/waterfall/connector/line/_dash.py +++ b/plotly/validators/waterfall/connector/line/_dash.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class DashValidator(_plotly_utils.basevalidators.DashValidator): +class DashValidator(_bv.DashValidator): def __init__( self, plotly_name="dash", parent_name="waterfall.connector.line", **kwargs ): - super(DashValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", ["solid", "dot", "dash", "longdash", "dashdot", "longdashdot"] diff --git a/plotly/validators/waterfall/connector/line/_width.py b/plotly/validators/waterfall/connector/line/_width.py index 483c363ca5..b5c50a82f2 100644 --- a/plotly/validators/waterfall/connector/line/_width.py +++ b/plotly/validators/waterfall/connector/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="waterfall.connector.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), **kwargs, diff --git a/plotly/validators/waterfall/decreasing/__init__.py b/plotly/validators/waterfall/decreasing/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/waterfall/decreasing/__init__.py +++ b/plotly/validators/waterfall/decreasing/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/waterfall/decreasing/_marker.py b/plotly/validators/waterfall/decreasing/_marker.py index cd4537d607..ec4a7c308d 100644 --- a/plotly/validators/waterfall/decreasing/_marker.py +++ b/plotly/validators/waterfall/decreasing/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="waterfall.decreasing", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of all decreasing values. - line - :class:`plotly.graph_objects.waterfall.decreasi - ng.marker.Line` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/waterfall/decreasing/marker/__init__.py b/plotly/validators/waterfall/decreasing/marker/__init__.py index 9819cbc359..1a3eaa8b6b 100644 --- a/plotly/validators/waterfall/decreasing/marker/__init__.py +++ b/plotly/validators/waterfall/decreasing/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/waterfall/decreasing/marker/_color.py b/plotly/validators/waterfall/decreasing/marker/_color.py index 733ebb62c0..ee8e29703c 100644 --- a/plotly/validators/waterfall/decreasing/marker/_color.py +++ b/plotly/validators/waterfall/decreasing/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.decreasing.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/decreasing/marker/_line.py b/plotly/validators/waterfall/decreasing/marker/_line.py index 94fa200b2d..3a30e5761b 100644 --- a/plotly/validators/waterfall/decreasing/marker/_line.py +++ b/plotly/validators/waterfall/decreasing/marker/_line.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="waterfall.decreasing.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color of all decreasing values. - width - Sets the line width of all decreasing values. """, ), **kwargs, diff --git a/plotly/validators/waterfall/decreasing/marker/line/__init__.py b/plotly/validators/waterfall/decreasing/marker/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/waterfall/decreasing/marker/line/__init__.py +++ b/plotly/validators/waterfall/decreasing/marker/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/waterfall/decreasing/marker/line/_color.py b/plotly/validators/waterfall/decreasing/marker/line/_color.py index 466b0efc38..1d04a51db3 100644 --- a/plotly/validators/waterfall/decreasing/marker/line/_color.py +++ b/plotly/validators/waterfall/decreasing/marker/line/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.decreasing.marker.line", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/decreasing/marker/line/_width.py b/plotly/validators/waterfall/decreasing/marker/line/_width.py index 76dfdd5636..efb99fae8c 100644 --- a/plotly/validators/waterfall/decreasing/marker/line/_width.py +++ b/plotly/validators/waterfall/decreasing/marker/line/_width.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="waterfall.decreasing.marker.line", **kwargs, ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/waterfall/hoverlabel/__init__.py b/plotly/validators/waterfall/hoverlabel/__init__.py index c6ee8b5967..bd6ede5882 100644 --- a/plotly/validators/waterfall/hoverlabel/__init__.py +++ b/plotly/validators/waterfall/hoverlabel/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._namelengthsrc import NamelengthsrcValidator - from ._namelength import NamelengthValidator - from ._font import FontValidator - from ._bordercolorsrc import BordercolorsrcValidator - from ._bordercolor import BordercolorValidator - from ._bgcolorsrc import BgcolorsrcValidator - from ._bgcolor import BgcolorValidator - from ._alignsrc import AlignsrcValidator - from ._align import AlignValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._namelengthsrc.NamelengthsrcValidator", - "._namelength.NamelengthValidator", - "._font.FontValidator", - "._bordercolorsrc.BordercolorsrcValidator", - "._bordercolor.BordercolorValidator", - "._bgcolorsrc.BgcolorsrcValidator", - "._bgcolor.BgcolorValidator", - "._alignsrc.AlignsrcValidator", - "._align.AlignValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._namelengthsrc.NamelengthsrcValidator", + "._namelength.NamelengthValidator", + "._font.FontValidator", + "._bordercolorsrc.BordercolorsrcValidator", + "._bordercolor.BordercolorValidator", + "._bgcolorsrc.BgcolorsrcValidator", + "._bgcolor.BgcolorValidator", + "._alignsrc.AlignsrcValidator", + "._align.AlignValidator", + ], +) diff --git a/plotly/validators/waterfall/hoverlabel/_align.py b/plotly/validators/waterfall/hoverlabel/_align.py index 3723cd964e..8ad6f64a98 100644 --- a/plotly/validators/waterfall/hoverlabel/_align.py +++ b/plotly/validators/waterfall/hoverlabel/_align.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class AlignValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="waterfall.hoverlabel", **kwargs ): - super(AlignValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["left", "right", "auto"]), diff --git a/plotly/validators/waterfall/hoverlabel/_alignsrc.py b/plotly/validators/waterfall/hoverlabel/_alignsrc.py index f45e09f3cd..abd5f84184 100644 --- a/plotly/validators/waterfall/hoverlabel/_alignsrc.py +++ b/plotly/validators/waterfall/hoverlabel/_alignsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class AlignsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class AlignsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="alignsrc", parent_name="waterfall.hoverlabel", **kwargs ): - super(AlignsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/_bgcolor.py b/plotly/validators/waterfall/hoverlabel/_bgcolor.py index 4b28e5698c..08d18b6e00 100644 --- a/plotly/validators/waterfall/hoverlabel/_bgcolor.py +++ b/plotly/validators/waterfall/hoverlabel/_bgcolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BgcolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="waterfall.hoverlabel", **kwargs ): - super(BgcolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py b/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py index 1c01528085..9a4600c55c 100644 --- a/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py +++ b/plotly/validators/waterfall/hoverlabel/_bgcolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BgcolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BgcolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bgcolorsrc", parent_name="waterfall.hoverlabel", **kwargs ): - super(BgcolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/_bordercolor.py b/plotly/validators/waterfall/hoverlabel/_bordercolor.py index 81e3f7c5fd..ccbea309f6 100644 --- a/plotly/validators/waterfall/hoverlabel/_bordercolor.py +++ b/plotly/validators/waterfall/hoverlabel/_bordercolor.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorValidator(_plotly_utils.basevalidators.ColorValidator): +class BordercolorValidator(_bv.ColorValidator): def __init__( self, plotly_name="bordercolor", parent_name="waterfall.hoverlabel", **kwargs ): - super(BordercolorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py b/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py index 2ca194261a..66b8c8e8bb 100644 --- a/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py +++ b/plotly/validators/waterfall/hoverlabel/_bordercolorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class BordercolorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class BordercolorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="bordercolorsrc", parent_name="waterfall.hoverlabel", **kwargs ): - super(BordercolorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/_font.py b/plotly/validators/waterfall/hoverlabel/_font.py index 3cee3f426c..3cdab6fda8 100644 --- a/plotly/validators/waterfall/hoverlabel/_font.py +++ b/plotly/validators/waterfall/hoverlabel/_font.py @@ -1,87 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="waterfall.hoverlabel", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - colorsrc - Sets the source reference on Chart Studio Cloud - for `color`. - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - familysrc - Sets the source reference on Chart Studio Cloud - for `family`. - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - linepositionsrc - Sets the source reference on Chart Studio Cloud - for `lineposition`. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - shadowsrc - Sets the source reference on Chart Studio Cloud - for `shadow`. - size - - sizesrc - Sets the source reference on Chart Studio Cloud - for `size`. - style - Sets whether a font should be styled with a - normal or italic face from its family. - stylesrc - Sets the source reference on Chart Studio Cloud - for `style`. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - textcasesrc - Sets the source reference on Chart Studio Cloud - for `textcase`. - variant - Sets the variant of the font. - variantsrc - Sets the source reference on Chart Studio Cloud - for `variant`. - weight - Sets the weight (or boldness) of the font. - weightsrc - Sets the source reference on Chart Studio Cloud - for `weight`. """, ), **kwargs, diff --git a/plotly/validators/waterfall/hoverlabel/_namelength.py b/plotly/validators/waterfall/hoverlabel/_namelength.py index f46ae01f67..9a7e4e67d4 100644 --- a/plotly/validators/waterfall/hoverlabel/_namelength.py +++ b/plotly/validators/waterfall/hoverlabel/_namelength.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthValidator(_plotly_utils.basevalidators.IntegerValidator): +class NamelengthValidator(_bv.IntegerValidator): def __init__( self, plotly_name="namelength", parent_name="waterfall.hoverlabel", **kwargs ): - super(NamelengthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", -1), diff --git a/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py b/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py index cde07123f4..a394d61758 100644 --- a/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py +++ b/plotly/validators/waterfall/hoverlabel/_namelengthsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class NamelengthsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="namelengthsrc", parent_name="waterfall.hoverlabel", **kwargs ): - super(NamelengthsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/__init__.py b/plotly/validators/waterfall/hoverlabel/font/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/waterfall/hoverlabel/font/__init__.py +++ b/plotly/validators/waterfall/hoverlabel/font/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/waterfall/hoverlabel/font/_color.py b/plotly/validators/waterfall/hoverlabel/font/_color.py index 31bb419ae3..b7401a711a 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_color.py +++ b/plotly/validators/waterfall/hoverlabel/font/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py b/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py index 82dfbc4b75..61e565801b 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_family.py b/plotly/validators/waterfall/hoverlabel/font/_family.py index 8be63b586c..8543565cc6 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_family.py +++ b/plotly/validators/waterfall/hoverlabel/font/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/waterfall/hoverlabel/font/_familysrc.py b/plotly/validators/waterfall/hoverlabel/font/_familysrc.py index 39d79fa040..491d4663be 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_familysrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_lineposition.py b/plotly/validators/waterfall/hoverlabel/font/_lineposition.py index 2100b3818a..9d40438e9a 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_lineposition.py +++ b/plotly/validators/waterfall/hoverlabel/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="waterfall.hoverlabel.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/waterfall/hoverlabel/font/_linepositionsrc.py b/plotly/validators/waterfall/hoverlabel/font/_linepositionsrc.py index 7f076d1a73..f9a14f2795 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_linepositionsrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="waterfall.hoverlabel.font", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_shadow.py b/plotly/validators/waterfall/hoverlabel/font/_shadow.py index 76c963eaf1..d152386d33 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_shadow.py +++ b/plotly/validators/waterfall/hoverlabel/font/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), **kwargs, diff --git a/plotly/validators/waterfall/hoverlabel/font/_shadowsrc.py b/plotly/validators/waterfall/hoverlabel/font/_shadowsrc.py index eba7ca46a9..e5d9b1acf1 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_shadowsrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_size.py b/plotly/validators/waterfall/hoverlabel/font/_size.py index 479ae91db8..05b613588d 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_size.py +++ b/plotly/validators/waterfall/hoverlabel/font/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py b/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py index 20b1f1fcb1..47fbe945f7 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_style.py b/plotly/validators/waterfall/hoverlabel/font/_style.py index 3ece6f8e84..1032cc4d67 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_style.py +++ b/plotly/validators/waterfall/hoverlabel/font/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/waterfall/hoverlabel/font/_stylesrc.py b/plotly/validators/waterfall/hoverlabel/font/_stylesrc.py index f3f09f16b5..b627198f7d 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_stylesrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_textcase.py b/plotly/validators/waterfall/hoverlabel/font/_textcase.py index 02386d21b9..fb19e55046 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_textcase.py +++ b/plotly/validators/waterfall/hoverlabel/font/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/waterfall/hoverlabel/font/_textcasesrc.py b/plotly/validators/waterfall/hoverlabel/font/_textcasesrc.py index 5263db2514..5fcc6ea7b8 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_textcasesrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="waterfall.hoverlabel.font", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_variant.py b/plotly/validators/waterfall/hoverlabel/font/_variant.py index 0050774093..bce4158c60 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_variant.py +++ b/plotly/validators/waterfall/hoverlabel/font/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), values=kwargs.pop( diff --git a/plotly/validators/waterfall/hoverlabel/font/_variantsrc.py b/plotly/validators/waterfall/hoverlabel/font/_variantsrc.py index a1ea5d6420..d18269d3f2 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_variantsrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="waterfall.hoverlabel.font", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/hoverlabel/font/_weight.py b/plotly/validators/waterfall/hoverlabel/font/_weight.py index ae931fe9b5..a38c751d95 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_weight.py +++ b/plotly/validators/waterfall/hoverlabel/font/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "none"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/waterfall/hoverlabel/font/_weightsrc.py b/plotly/validators/waterfall/hoverlabel/font/_weightsrc.py index 34ce4fa77f..0ea214add5 100644 --- a/plotly/validators/waterfall/hoverlabel/font/_weightsrc.py +++ b/plotly/validators/waterfall/hoverlabel/font/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="waterfall.hoverlabel.font", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/increasing/__init__.py b/plotly/validators/waterfall/increasing/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/waterfall/increasing/__init__.py +++ b/plotly/validators/waterfall/increasing/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/waterfall/increasing/_marker.py b/plotly/validators/waterfall/increasing/_marker.py index d2da29c39a..374c5dbcc9 100644 --- a/plotly/validators/waterfall/increasing/_marker.py +++ b/plotly/validators/waterfall/increasing/_marker.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__( self, plotly_name="marker", parent_name="waterfall.increasing", **kwargs ): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of all increasing values. - line - :class:`plotly.graph_objects.waterfall.increasi - ng.marker.Line` instance or dict with - compatible properties """, ), **kwargs, diff --git a/plotly/validators/waterfall/increasing/marker/__init__.py b/plotly/validators/waterfall/increasing/marker/__init__.py index 9819cbc359..1a3eaa8b6b 100644 --- a/plotly/validators/waterfall/increasing/marker/__init__.py +++ b/plotly/validators/waterfall/increasing/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/waterfall/increasing/marker/_color.py b/plotly/validators/waterfall/increasing/marker/_color.py index 05670e3f7b..96197a2f03 100644 --- a/plotly/validators/waterfall/increasing/marker/_color.py +++ b/plotly/validators/waterfall/increasing/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.increasing.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/increasing/marker/_line.py b/plotly/validators/waterfall/increasing/marker/_line.py index 131eb78136..957e9b1894 100644 --- a/plotly/validators/waterfall/increasing/marker/_line.py +++ b/plotly/validators/waterfall/increasing/marker/_line.py @@ -1,21 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="waterfall.increasing.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color of all increasing values. - width - Sets the line width of all increasing values. """, ), **kwargs, diff --git a/plotly/validators/waterfall/increasing/marker/line/__init__.py b/plotly/validators/waterfall/increasing/marker/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/waterfall/increasing/marker/line/__init__.py +++ b/plotly/validators/waterfall/increasing/marker/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/waterfall/increasing/marker/line/_color.py b/plotly/validators/waterfall/increasing/marker/line/_color.py index db94587181..cb83f1f7eb 100644 --- a/plotly/validators/waterfall/increasing/marker/line/_color.py +++ b/plotly/validators/waterfall/increasing/marker/line/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.increasing.marker.line", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/increasing/marker/line/_width.py b/plotly/validators/waterfall/increasing/marker/line/_width.py index 6573f78bf7..cbecbc53aa 100644 --- a/plotly/validators/waterfall/increasing/marker/line/_width.py +++ b/plotly/validators/waterfall/increasing/marker/line/_width.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="waterfall.increasing.marker.line", **kwargs, ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/plotly/validators/waterfall/insidetextfont/__init__.py b/plotly/validators/waterfall/insidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/waterfall/insidetextfont/__init__.py +++ b/plotly/validators/waterfall/insidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/waterfall/insidetextfont/_color.py b/plotly/validators/waterfall/insidetextfont/_color.py index d140271002..4953df4f9a 100644 --- a/plotly/validators/waterfall/insidetextfont/_color.py +++ b/plotly/validators/waterfall/insidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.insidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/insidetextfont/_colorsrc.py b/plotly/validators/waterfall/insidetextfont/_colorsrc.py index 24d0554816..9a6d291129 100644 --- a/plotly/validators/waterfall/insidetextfont/_colorsrc.py +++ b/plotly/validators/waterfall/insidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_family.py b/plotly/validators/waterfall/insidetextfont/_family.py index 1be6e1d8c2..d8c2f58281 100644 --- a/plotly/validators/waterfall/insidetextfont/_family.py +++ b/plotly/validators/waterfall/insidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="waterfall.insidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/waterfall/insidetextfont/_familysrc.py b/plotly/validators/waterfall/insidetextfont/_familysrc.py index f480a7654f..baf4fab27b 100644 --- a/plotly/validators/waterfall/insidetextfont/_familysrc.py +++ b/plotly/validators/waterfall/insidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_lineposition.py b/plotly/validators/waterfall/insidetextfont/_lineposition.py index 1897bfaa53..d0efc163ad 100644 --- a/plotly/validators/waterfall/insidetextfont/_lineposition.py +++ b/plotly/validators/waterfall/insidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="waterfall.insidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/waterfall/insidetextfont/_linepositionsrc.py b/plotly/validators/waterfall/insidetextfont/_linepositionsrc.py index 134371abe2..1d83e5164a 100644 --- a/plotly/validators/waterfall/insidetextfont/_linepositionsrc.py +++ b/plotly/validators/waterfall/insidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="waterfall.insidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_shadow.py b/plotly/validators/waterfall/insidetextfont/_shadow.py index 4b1c6ca368..a66be29b20 100644 --- a/plotly/validators/waterfall/insidetextfont/_shadow.py +++ b/plotly/validators/waterfall/insidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="waterfall.insidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/waterfall/insidetextfont/_shadowsrc.py b/plotly/validators/waterfall/insidetextfont/_shadowsrc.py index cbe396e9a2..dbf84731c5 100644 --- a/plotly/validators/waterfall/insidetextfont/_shadowsrc.py +++ b/plotly/validators/waterfall/insidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_size.py b/plotly/validators/waterfall/insidetextfont/_size.py index a3bb9e09af..1d6c6430ed 100644 --- a/plotly/validators/waterfall/insidetextfont/_size.py +++ b/plotly/validators/waterfall/insidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="waterfall.insidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/waterfall/insidetextfont/_sizesrc.py b/plotly/validators/waterfall/insidetextfont/_sizesrc.py index fd5346b381..a20b2182dc 100644 --- a/plotly/validators/waterfall/insidetextfont/_sizesrc.py +++ b/plotly/validators/waterfall/insidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_style.py b/plotly/validators/waterfall/insidetextfont/_style.py index d62b252d69..4fa3cab2b9 100644 --- a/plotly/validators/waterfall/insidetextfont/_style.py +++ b/plotly/validators/waterfall/insidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="waterfall.insidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/waterfall/insidetextfont/_stylesrc.py b/plotly/validators/waterfall/insidetextfont/_stylesrc.py index 4c4ae71321..64c8f0e2dc 100644 --- a/plotly/validators/waterfall/insidetextfont/_stylesrc.py +++ b/plotly/validators/waterfall/insidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_textcase.py b/plotly/validators/waterfall/insidetextfont/_textcase.py index 3145e1e66b..db54a757a1 100644 --- a/plotly/validators/waterfall/insidetextfont/_textcase.py +++ b/plotly/validators/waterfall/insidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="waterfall.insidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/waterfall/insidetextfont/_textcasesrc.py b/plotly/validators/waterfall/insidetextfont/_textcasesrc.py index 4a14f61a47..a0d16b610e 100644 --- a/plotly/validators/waterfall/insidetextfont/_textcasesrc.py +++ b/plotly/validators/waterfall/insidetextfont/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="waterfall.insidetextfont", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_variant.py b/plotly/validators/waterfall/insidetextfont/_variant.py index 87fab5a63c..d4380c28d3 100644 --- a/plotly/validators/waterfall/insidetextfont/_variant.py +++ b/plotly/validators/waterfall/insidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="waterfall.insidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/waterfall/insidetextfont/_variantsrc.py b/plotly/validators/waterfall/insidetextfont/_variantsrc.py index a32c1f1e0a..346bdeb215 100644 --- a/plotly/validators/waterfall/insidetextfont/_variantsrc.py +++ b/plotly/validators/waterfall/insidetextfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/insidetextfont/_weight.py b/plotly/validators/waterfall/insidetextfont/_weight.py index fdc5991699..38ed5a8403 100644 --- a/plotly/validators/waterfall/insidetextfont/_weight.py +++ b/plotly/validators/waterfall/insidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="waterfall.insidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/waterfall/insidetextfont/_weightsrc.py b/plotly/validators/waterfall/insidetextfont/_weightsrc.py index 5e7839d603..df859eabc3 100644 --- a/plotly/validators/waterfall/insidetextfont/_weightsrc.py +++ b/plotly/validators/waterfall/insidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="waterfall.insidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/legendgrouptitle/__init__.py b/plotly/validators/waterfall/legendgrouptitle/__init__.py index ad27d3ad3e..64dac54dfa 100644 --- a/plotly/validators/waterfall/legendgrouptitle/__init__.py +++ b/plotly/validators/waterfall/legendgrouptitle/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._text import TextValidator - from ._font import FontValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._text.TextValidator", "._font.FontValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._text.TextValidator", "._font.FontValidator"] +) diff --git a/plotly/validators/waterfall/legendgrouptitle/_font.py b/plotly/validators/waterfall/legendgrouptitle/_font.py index 0f1b1962f1..540ebb7e78 100644 --- a/plotly/validators/waterfall/legendgrouptitle/_font.py +++ b/plotly/validators/waterfall/legendgrouptitle/_font.py @@ -1,60 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FontValidator(_plotly_utils.basevalidators.CompoundValidator): +class FontValidator(_bv.CompoundValidator): def __init__( self, plotly_name="font", parent_name="waterfall.legendgrouptitle", **kwargs ): - super(FontValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Font"), data_docs=kwargs.pop( "data_docs", """ - color - - family - HTML font family - the typeface that will be - applied by the web browser. The web browser - will only be able to apply a font if it is - available on the system which it operates. - Provide multiple font families, separated by - commas, to indicate the preference in which to - apply fonts if they aren't available on the - system. The Chart Studio Cloud (at - https://chart-studio.plotly.com or on-premise) - generates images on a server, where only a - select number of fonts are installed and - supported. These include "Arial", "Balto", - "Courier New", "Droid Sans", "Droid Serif", - "Droid Sans Mono", "Gravitas One", "Old - Standard TT", "Open Sans", "Overpass", "PT Sans - Narrow", "Raleway", "Times New Roman". - lineposition - Sets the kind of decoration line(s) with text, - such as an "under", "over" or "through" as well - as combinations e.g. "under+over", etc. - shadow - Sets the shape and color of the shadow behind - text. "auto" places minimal shadow and applies - contrast text font color. See - https://developer.mozilla.org/en- - US/docs/Web/CSS/text-shadow for additional - options. - size - - style - Sets whether a font should be styled with a - normal or italic face from its family. - textcase - Sets capitalization of text. It can be used to - make text appear in all-uppercase or all- - lowercase, or with each word capitalized. - variant - Sets the variant of the font. - weight - Sets the weight (or boldness) of the font. """, ), **kwargs, diff --git a/plotly/validators/waterfall/legendgrouptitle/_text.py b/plotly/validators/waterfall/legendgrouptitle/_text.py index 863602d3f2..31bd0a1235 100644 --- a/plotly/validators/waterfall/legendgrouptitle/_text.py +++ b/plotly/validators/waterfall/legendgrouptitle/_text.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextValidator(_plotly_utils.basevalidators.StringValidator): +class TextValidator(_bv.StringValidator): def __init__( self, plotly_name="text", parent_name="waterfall.legendgrouptitle", **kwargs ): - super(TextValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/legendgrouptitle/font/__init__.py b/plotly/validators/waterfall/legendgrouptitle/font/__init__.py index 983f9a04e5..b29a76f800 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/__init__.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/__init__.py @@ -1,31 +1,18 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weight import WeightValidator - from ._variant import VariantValidator - from ._textcase import TextcaseValidator - from ._style import StyleValidator - from ._size import SizeValidator - from ._shadow import ShadowValidator - from ._lineposition import LinepositionValidator - from ._family import FamilyValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weight.WeightValidator", - "._variant.VariantValidator", - "._textcase.TextcaseValidator", - "._style.StyleValidator", - "._size.SizeValidator", - "._shadow.ShadowValidator", - "._lineposition.LinepositionValidator", - "._family.FamilyValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weight.WeightValidator", + "._variant.VariantValidator", + "._textcase.TextcaseValidator", + "._style.StyleValidator", + "._size.SizeValidator", + "._shadow.ShadowValidator", + "._lineposition.LinepositionValidator", + "._family.FamilyValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_color.py b/plotly/validators/waterfall/legendgrouptitle/font/_color.py index 8e487f6b89..8c569b96e7 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_color.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_color.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_family.py b/plotly/validators/waterfall/legendgrouptitle/font/_family.py index 1cf4b4be33..fd77408a7b 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_family.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_family.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_lineposition.py b/plotly/validators/waterfall/legendgrouptitle/font/_lineposition.py index 0cd12504ed..2021ec56d9 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_lineposition.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["none"]), flags=kwargs.pop("flags", ["under", "over", "through"]), diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_shadow.py b/plotly/validators/waterfall/legendgrouptitle/font/_shadow.py index c1cc10caa0..deb25a038d 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_shadow.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_shadow.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), **kwargs, ) diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_size.py b/plotly/validators/waterfall/legendgrouptitle/font/_size.py index 89e6ac69d2..0449afba1b 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_size.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_size.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 1), **kwargs, diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_style.py b/plotly/validators/waterfall/legendgrouptitle/font/_style.py index 13d4c757cc..d23da442fa 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_style.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_style.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "italic"]), **kwargs, diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_textcase.py b/plotly/validators/waterfall/legendgrouptitle/font/_textcase.py index de12cc6a7e..1a32736021 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_textcase.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_textcase.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), **kwargs, diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_variant.py b/plotly/validators/waterfall/legendgrouptitle/font/_variant.py index c5f64fcabc..2ab45407fa 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_variant.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_variant.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), values=kwargs.pop( "values", diff --git a/plotly/validators/waterfall/legendgrouptitle/font/_weight.py b/plotly/validators/waterfall/legendgrouptitle/font/_weight.py index e6ccea00bf..4452e83595 100644 --- a/plotly/validators/waterfall/legendgrouptitle/font/_weight.py +++ b/plotly/validators/waterfall/legendgrouptitle/font/_weight.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="waterfall.legendgrouptitle.font", **kwargs, ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "style"), extras=kwargs.pop("extras", ["normal", "bold"]), max=kwargs.pop("max", 1000), diff --git a/plotly/validators/waterfall/outsidetextfont/__init__.py b/plotly/validators/waterfall/outsidetextfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/waterfall/outsidetextfont/__init__.py +++ b/plotly/validators/waterfall/outsidetextfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/waterfall/outsidetextfont/_color.py b/plotly/validators/waterfall/outsidetextfont/_color.py index 16735b2e8c..bf468b695b 100644 --- a/plotly/validators/waterfall/outsidetextfont/_color.py +++ b/plotly/validators/waterfall/outsidetextfont/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.outsidetextfont", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/outsidetextfont/_colorsrc.py b/plotly/validators/waterfall/outsidetextfont/_colorsrc.py index 33c48a7e17..c955c091cd 100644 --- a/plotly/validators/waterfall/outsidetextfont/_colorsrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="waterfall.outsidetextfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_family.py b/plotly/validators/waterfall/outsidetextfont/_family.py index 9ca06821d8..b246eab3dc 100644 --- a/plotly/validators/waterfall/outsidetextfont/_family.py +++ b/plotly/validators/waterfall/outsidetextfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="waterfall.outsidetextfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/waterfall/outsidetextfont/_familysrc.py b/plotly/validators/waterfall/outsidetextfont/_familysrc.py index c69a1c59cf..c65f542bb0 100644 --- a/plotly/validators/waterfall/outsidetextfont/_familysrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="waterfall.outsidetextfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_lineposition.py b/plotly/validators/waterfall/outsidetextfont/_lineposition.py index b71df54763..73efc4d598 100644 --- a/plotly/validators/waterfall/outsidetextfont/_lineposition.py +++ b/plotly/validators/waterfall/outsidetextfont/_lineposition.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="waterfall.outsidetextfont", **kwargs, ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/waterfall/outsidetextfont/_linepositionsrc.py b/plotly/validators/waterfall/outsidetextfont/_linepositionsrc.py index c46bdf413f..5ac401613f 100644 --- a/plotly/validators/waterfall/outsidetextfont/_linepositionsrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_linepositionsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="waterfall.outsidetextfont", **kwargs, ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_shadow.py b/plotly/validators/waterfall/outsidetextfont/_shadow.py index 3889171585..93a4584685 100644 --- a/plotly/validators/waterfall/outsidetextfont/_shadow.py +++ b/plotly/validators/waterfall/outsidetextfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="waterfall.outsidetextfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/waterfall/outsidetextfont/_shadowsrc.py b/plotly/validators/waterfall/outsidetextfont/_shadowsrc.py index fde636f70c..e10614cdc8 100644 --- a/plotly/validators/waterfall/outsidetextfont/_shadowsrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="waterfall.outsidetextfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_size.py b/plotly/validators/waterfall/outsidetextfont/_size.py index 8472a23f4c..5c52150eb6 100644 --- a/plotly/validators/waterfall/outsidetextfont/_size.py +++ b/plotly/validators/waterfall/outsidetextfont/_size.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__( self, plotly_name="size", parent_name="waterfall.outsidetextfont", **kwargs ): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/waterfall/outsidetextfont/_sizesrc.py b/plotly/validators/waterfall/outsidetextfont/_sizesrc.py index fda25a09ab..29e1b863b5 100644 --- a/plotly/validators/waterfall/outsidetextfont/_sizesrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="waterfall.outsidetextfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_style.py b/plotly/validators/waterfall/outsidetextfont/_style.py index 69e9486086..2da3494758 100644 --- a/plotly/validators/waterfall/outsidetextfont/_style.py +++ b/plotly/validators/waterfall/outsidetextfont/_style.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="style", parent_name="waterfall.outsidetextfont", **kwargs ): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/waterfall/outsidetextfont/_stylesrc.py b/plotly/validators/waterfall/outsidetextfont/_stylesrc.py index fb2d4e66d2..d06ff7397a 100644 --- a/plotly/validators/waterfall/outsidetextfont/_stylesrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="waterfall.outsidetextfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_textcase.py b/plotly/validators/waterfall/outsidetextfont/_textcase.py index 55eb23a9c6..72d772ff11 100644 --- a/plotly/validators/waterfall/outsidetextfont/_textcase.py +++ b/plotly/validators/waterfall/outsidetextfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="waterfall.outsidetextfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/waterfall/outsidetextfont/_textcasesrc.py b/plotly/validators/waterfall/outsidetextfont/_textcasesrc.py index 85352b281b..59a4fe8307 100644 --- a/plotly/validators/waterfall/outsidetextfont/_textcasesrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_textcasesrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="waterfall.outsidetextfont", **kwargs, ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_variant.py b/plotly/validators/waterfall/outsidetextfont/_variant.py index 71ff45da1c..44bef2d76d 100644 --- a/plotly/validators/waterfall/outsidetextfont/_variant.py +++ b/plotly/validators/waterfall/outsidetextfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="waterfall.outsidetextfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/waterfall/outsidetextfont/_variantsrc.py b/plotly/validators/waterfall/outsidetextfont/_variantsrc.py index 89bc65545b..b5657c92f8 100644 --- a/plotly/validators/waterfall/outsidetextfont/_variantsrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_variantsrc.py @@ -1,16 +1,16 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="waterfall.outsidetextfont", **kwargs, ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/outsidetextfont/_weight.py b/plotly/validators/waterfall/outsidetextfont/_weight.py index 0f705a8a3d..bf7940b335 100644 --- a/plotly/validators/waterfall/outsidetextfont/_weight.py +++ b/plotly/validators/waterfall/outsidetextfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="waterfall.outsidetextfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/waterfall/outsidetextfont/_weightsrc.py b/plotly/validators/waterfall/outsidetextfont/_weightsrc.py index fd91b8ccfa..aef4905cdd 100644 --- a/plotly/validators/waterfall/outsidetextfont/_weightsrc.py +++ b/plotly/validators/waterfall/outsidetextfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="waterfall.outsidetextfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/stream/__init__.py b/plotly/validators/waterfall/stream/__init__.py index a6c0eed763..4738282312 100644 --- a/plotly/validators/waterfall/stream/__init__.py +++ b/plotly/validators/waterfall/stream/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._token import TokenValidator - from ._maxpoints import MaxpointsValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValidator"] +) diff --git a/plotly/validators/waterfall/stream/_maxpoints.py b/plotly/validators/waterfall/stream/_maxpoints.py index da0888d8d6..0b6674db4e 100644 --- a/plotly/validators/waterfall/stream/_maxpoints.py +++ b/plotly/validators/waterfall/stream/_maxpoints.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MaxpointsValidator(_plotly_utils.basevalidators.NumberValidator): +class MaxpointsValidator(_bv.NumberValidator): def __init__( self, plotly_name="maxpoints", parent_name="waterfall.stream", **kwargs ): - super(MaxpointsValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), max=kwargs.pop("max", 10000), min=kwargs.pop("min", 0), diff --git a/plotly/validators/waterfall/stream/_token.py b/plotly/validators/waterfall/stream/_token.py index 6fddd9c5c0..0668c3da5c 100644 --- a/plotly/validators/waterfall/stream/_token.py +++ b/plotly/validators/waterfall/stream/_token.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TokenValidator(_plotly_utils.basevalidators.StringValidator): +class TokenValidator(_bv.StringValidator): def __init__(self, plotly_name="token", parent_name="waterfall.stream", **kwargs): - super(TokenValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), strict=kwargs.pop("strict", True), diff --git a/plotly/validators/waterfall/textfont/__init__.py b/plotly/validators/waterfall/textfont/__init__.py index 487c2f8676..3dc491e089 100644 --- a/plotly/validators/waterfall/textfont/__init__.py +++ b/plotly/validators/waterfall/textfont/__init__.py @@ -1,49 +1,27 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._weightsrc import WeightsrcValidator - from ._weight import WeightValidator - from ._variantsrc import VariantsrcValidator - from ._variant import VariantValidator - from ._textcasesrc import TextcasesrcValidator - from ._textcase import TextcaseValidator - from ._stylesrc import StylesrcValidator - from ._style import StyleValidator - from ._sizesrc import SizesrcValidator - from ._size import SizeValidator - from ._shadowsrc import ShadowsrcValidator - from ._shadow import ShadowValidator - from ._linepositionsrc import LinepositionsrcValidator - from ._lineposition import LinepositionValidator - from ._familysrc import FamilysrcValidator - from ._family import FamilyValidator - from ._colorsrc import ColorsrcValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, - [], - [ - "._weightsrc.WeightsrcValidator", - "._weight.WeightValidator", - "._variantsrc.VariantsrcValidator", - "._variant.VariantValidator", - "._textcasesrc.TextcasesrcValidator", - "._textcase.TextcaseValidator", - "._stylesrc.StylesrcValidator", - "._style.StyleValidator", - "._sizesrc.SizesrcValidator", - "._size.SizeValidator", - "._shadowsrc.ShadowsrcValidator", - "._shadow.ShadowValidator", - "._linepositionsrc.LinepositionsrcValidator", - "._lineposition.LinepositionValidator", - "._familysrc.FamilysrcValidator", - "._family.FamilyValidator", - "._colorsrc.ColorsrcValidator", - "._color.ColorValidator", - ], - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, + [], + [ + "._weightsrc.WeightsrcValidator", + "._weight.WeightValidator", + "._variantsrc.VariantsrcValidator", + "._variant.VariantValidator", + "._textcasesrc.TextcasesrcValidator", + "._textcase.TextcaseValidator", + "._stylesrc.StylesrcValidator", + "._style.StyleValidator", + "._sizesrc.SizesrcValidator", + "._size.SizeValidator", + "._shadowsrc.ShadowsrcValidator", + "._shadow.ShadowValidator", + "._linepositionsrc.LinepositionsrcValidator", + "._lineposition.LinepositionValidator", + "._familysrc.FamilysrcValidator", + "._family.FamilyValidator", + "._colorsrc.ColorsrcValidator", + "._color.ColorValidator", + ], +) diff --git a/plotly/validators/waterfall/textfont/_color.py b/plotly/validators/waterfall/textfont/_color.py index ea63d87ad8..8734158532 100644 --- a/plotly/validators/waterfall/textfont/_color.py +++ b/plotly/validators/waterfall/textfont/_color.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__(self, plotly_name="color", parent_name="waterfall.textfont", **kwargs): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/textfont/_colorsrc.py b/plotly/validators/waterfall/textfont/_colorsrc.py index e39858e618..236c6f0966 100644 --- a/plotly/validators/waterfall/textfont/_colorsrc.py +++ b/plotly/validators/waterfall/textfont/_colorsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ColorsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="colorsrc", parent_name="waterfall.textfont", **kwargs ): - super(ColorsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_family.py b/plotly/validators/waterfall/textfont/_family.py index 82668c5414..18776eca0e 100644 --- a/plotly/validators/waterfall/textfont/_family.py +++ b/plotly/validators/waterfall/textfont/_family.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilyValidator(_plotly_utils.basevalidators.StringValidator): +class FamilyValidator(_bv.StringValidator): def __init__( self, plotly_name="family", parent_name="waterfall.textfont", **kwargs ): - super(FamilyValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), no_blank=kwargs.pop("no_blank", True), diff --git a/plotly/validators/waterfall/textfont/_familysrc.py b/plotly/validators/waterfall/textfont/_familysrc.py index f1036a6cb1..df19074bf1 100644 --- a/plotly/validators/waterfall/textfont/_familysrc.py +++ b/plotly/validators/waterfall/textfont/_familysrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class FamilysrcValidator(_plotly_utils.basevalidators.SrcValidator): +class FamilysrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="familysrc", parent_name="waterfall.textfont", **kwargs ): - super(FamilysrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_lineposition.py b/plotly/validators/waterfall/textfont/_lineposition.py index 84ef833959..01d6f070e6 100644 --- a/plotly/validators/waterfall/textfont/_lineposition.py +++ b/plotly/validators/waterfall/textfont/_lineposition.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionValidator(_plotly_utils.basevalidators.FlaglistValidator): +class LinepositionValidator(_bv.FlaglistValidator): def __init__( self, plotly_name="lineposition", parent_name="waterfall.textfont", **kwargs ): - super(LinepositionValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["none"]), diff --git a/plotly/validators/waterfall/textfont/_linepositionsrc.py b/plotly/validators/waterfall/textfont/_linepositionsrc.py index 1db65d5fed..5a1dd5b3be 100644 --- a/plotly/validators/waterfall/textfont/_linepositionsrc.py +++ b/plotly/validators/waterfall/textfont/_linepositionsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LinepositionsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class LinepositionsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="linepositionsrc", parent_name="waterfall.textfont", **kwargs ): - super(LinepositionsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_shadow.py b/plotly/validators/waterfall/textfont/_shadow.py index 974c21c806..69a2a5ddd6 100644 --- a/plotly/validators/waterfall/textfont/_shadow.py +++ b/plotly/validators/waterfall/textfont/_shadow.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowValidator(_plotly_utils.basevalidators.StringValidator): +class ShadowValidator(_bv.StringValidator): def __init__( self, plotly_name="shadow", parent_name="waterfall.textfont", **kwargs ): - super(ShadowValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), **kwargs, diff --git a/plotly/validators/waterfall/textfont/_shadowsrc.py b/plotly/validators/waterfall/textfont/_shadowsrc.py index dfaac9cd68..02e1117414 100644 --- a/plotly/validators/waterfall/textfont/_shadowsrc.py +++ b/plotly/validators/waterfall/textfont/_shadowsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ShadowsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class ShadowsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="shadowsrc", parent_name="waterfall.textfont", **kwargs ): - super(ShadowsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_size.py b/plotly/validators/waterfall/textfont/_size.py index fa4793c0f1..2a37fb6080 100644 --- a/plotly/validators/waterfall/textfont/_size.py +++ b/plotly/validators/waterfall/textfont/_size.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizeValidator(_plotly_utils.basevalidators.NumberValidator): +class SizeValidator(_bv.NumberValidator): def __init__(self, plotly_name="size", parent_name="waterfall.textfont", **kwargs): - super(SizeValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), min=kwargs.pop("min", 1), diff --git a/plotly/validators/waterfall/textfont/_sizesrc.py b/plotly/validators/waterfall/textfont/_sizesrc.py index b4b3a1236d..29e5c84f77 100644 --- a/plotly/validators/waterfall/textfont/_sizesrc.py +++ b/plotly/validators/waterfall/textfont/_sizesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class SizesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="sizesrc", parent_name="waterfall.textfont", **kwargs ): - super(SizesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_style.py b/plotly/validators/waterfall/textfont/_style.py index 0cf374d85b..75cb079a80 100644 --- a/plotly/validators/waterfall/textfont/_style.py +++ b/plotly/validators/waterfall/textfont/_style.py @@ -1,11 +1,11 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StyleValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class StyleValidator(_bv.EnumeratedValidator): def __init__(self, plotly_name="style", parent_name="waterfall.textfont", **kwargs): - super(StyleValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "italic"]), diff --git a/plotly/validators/waterfall/textfont/_stylesrc.py b/plotly/validators/waterfall/textfont/_stylesrc.py index e7fe4f4eac..a5baebbf22 100644 --- a/plotly/validators/waterfall/textfont/_stylesrc.py +++ b/plotly/validators/waterfall/textfont/_stylesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class StylesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class StylesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="stylesrc", parent_name="waterfall.textfont", **kwargs ): - super(StylesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_textcase.py b/plotly/validators/waterfall/textfont/_textcase.py index be197115b7..a8f1263085 100644 --- a/plotly/validators/waterfall/textfont/_textcase.py +++ b/plotly/validators/waterfall/textfont/_textcase.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcaseValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class TextcaseValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="textcase", parent_name="waterfall.textfont", **kwargs ): - super(TextcaseValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop("values", ["normal", "word caps", "upper", "lower"]), diff --git a/plotly/validators/waterfall/textfont/_textcasesrc.py b/plotly/validators/waterfall/textfont/_textcasesrc.py index 0df600db6a..b981a913a0 100644 --- a/plotly/validators/waterfall/textfont/_textcasesrc.py +++ b/plotly/validators/waterfall/textfont/_textcasesrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class TextcasesrcValidator(_plotly_utils.basevalidators.SrcValidator): +class TextcasesrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="textcasesrc", parent_name="waterfall.textfont", **kwargs ): - super(TextcasesrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_variant.py b/plotly/validators/waterfall/textfont/_variant.py index e4d7a25bbc..cb5354810a 100644 --- a/plotly/validators/waterfall/textfont/_variant.py +++ b/plotly/validators/waterfall/textfont/_variant.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantValidator(_plotly_utils.basevalidators.EnumeratedValidator): +class VariantValidator(_bv.EnumeratedValidator): def __init__( self, plotly_name="variant", parent_name="waterfall.textfont", **kwargs ): - super(VariantValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), values=kwargs.pop( diff --git a/plotly/validators/waterfall/textfont/_variantsrc.py b/plotly/validators/waterfall/textfont/_variantsrc.py index c3996d4a04..beb13c0422 100644 --- a/plotly/validators/waterfall/textfont/_variantsrc.py +++ b/plotly/validators/waterfall/textfont/_variantsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class VariantsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class VariantsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="variantsrc", parent_name="waterfall.textfont", **kwargs ): - super(VariantsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/textfont/_weight.py b/plotly/validators/waterfall/textfont/_weight.py index 4a1036176b..95acb647cf 100644 --- a/plotly/validators/waterfall/textfont/_weight.py +++ b/plotly/validators/waterfall/textfont/_weight.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightValidator(_plotly_utils.basevalidators.IntegerValidator): +class WeightValidator(_bv.IntegerValidator): def __init__( self, plotly_name="weight", parent_name="waterfall.textfont", **kwargs ): - super(WeightValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", True), edit_type=kwargs.pop("edit_type", "calc"), extras=kwargs.pop("extras", ["normal", "bold"]), diff --git a/plotly/validators/waterfall/textfont/_weightsrc.py b/plotly/validators/waterfall/textfont/_weightsrc.py index fcfc703880..b12ec06125 100644 --- a/plotly/validators/waterfall/textfont/_weightsrc.py +++ b/plotly/validators/waterfall/textfont/_weightsrc.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WeightsrcValidator(_plotly_utils.basevalidators.SrcValidator): +class WeightsrcValidator(_bv.SrcValidator): def __init__( self, plotly_name="weightsrc", parent_name="waterfall.textfont", **kwargs ): - super(WeightsrcValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, edit_type=kwargs.pop("edit_type", "none"), **kwargs, ) diff --git a/plotly/validators/waterfall/totals/__init__.py b/plotly/validators/waterfall/totals/__init__.py index e9bdb89f26..20900abc1a 100644 --- a/plotly/validators/waterfall/totals/__init__.py +++ b/plotly/validators/waterfall/totals/__init__.py @@ -1,11 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._marker import MarkerValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._marker.MarkerValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._marker.MarkerValidator"] +) diff --git a/plotly/validators/waterfall/totals/_marker.py b/plotly/validators/waterfall/totals/_marker.py index 23297a12c0..66538535a9 100644 --- a/plotly/validators/waterfall/totals/_marker.py +++ b/plotly/validators/waterfall/totals/_marker.py @@ -1,22 +1,15 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class MarkerValidator(_plotly_utils.basevalidators.CompoundValidator): +class MarkerValidator(_bv.CompoundValidator): def __init__(self, plotly_name="marker", parent_name="waterfall.totals", **kwargs): - super(MarkerValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Marker"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the marker color of all intermediate sums - and total values. - line - :class:`plotly.graph_objects.waterfall.totals.m - arker.Line` instance or dict with compatible - properties """, ), **kwargs, diff --git a/plotly/validators/waterfall/totals/marker/__init__.py b/plotly/validators/waterfall/totals/marker/__init__.py index 9819cbc359..1a3eaa8b6b 100644 --- a/plotly/validators/waterfall/totals/marker/__init__.py +++ b/plotly/validators/waterfall/totals/marker/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._line import LineValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._line.LineValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._line.LineValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/waterfall/totals/marker/_color.py b/plotly/validators/waterfall/totals/marker/_color.py index efe4635fc6..99ce730532 100644 --- a/plotly/validators/waterfall/totals/marker/_color.py +++ b/plotly/validators/waterfall/totals/marker/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.totals.marker", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/totals/marker/_line.py b/plotly/validators/waterfall/totals/marker/_line.py index c6f80e2623..ae7ed744d6 100644 --- a/plotly/validators/waterfall/totals/marker/_line.py +++ b/plotly/validators/waterfall/totals/marker/_line.py @@ -1,23 +1,17 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class LineValidator(_plotly_utils.basevalidators.CompoundValidator): +class LineValidator(_bv.CompoundValidator): def __init__( self, plotly_name="line", parent_name="waterfall.totals.marker", **kwargs ): - super(LineValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, data_class_str=kwargs.pop("data_class_str", "Line"), data_docs=kwargs.pop( "data_docs", """ - color - Sets the line color of all intermediate sums - and total values. - width - Sets the line width of all intermediate sums - and total values. """, ), **kwargs, diff --git a/plotly/validators/waterfall/totals/marker/line/__init__.py b/plotly/validators/waterfall/totals/marker/line/__init__.py index 63a516578b..d49328faac 100644 --- a/plotly/validators/waterfall/totals/marker/line/__init__.py +++ b/plotly/validators/waterfall/totals/marker/line/__init__.py @@ -1,12 +1,6 @@ import sys -from typing import TYPE_CHECKING +from _plotly_utils.importers import relative_import -if sys.version_info < (3, 7) or TYPE_CHECKING: - from ._width import WidthValidator - from ._color import ColorValidator -else: - from _plotly_utils.importers import relative_import - - __all__, __getattr__, __dir__ = relative_import( - __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] - ) +__all__, __getattr__, __dir__ = relative_import( + __name__, [], ["._width.WidthValidator", "._color.ColorValidator"] +) diff --git a/plotly/validators/waterfall/totals/marker/line/_color.py b/plotly/validators/waterfall/totals/marker/line/_color.py index 7257783934..a792be6c4d 100644 --- a/plotly/validators/waterfall/totals/marker/line/_color.py +++ b/plotly/validators/waterfall/totals/marker/line/_color.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class ColorValidator(_plotly_utils.basevalidators.ColorValidator): +class ColorValidator(_bv.ColorValidator): def __init__( self, plotly_name="color", parent_name="waterfall.totals.marker.line", **kwargs ): - super(ColorValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), **kwargs, diff --git a/plotly/validators/waterfall/totals/marker/line/_width.py b/plotly/validators/waterfall/totals/marker/line/_width.py index 59f0d19205..575f39a99b 100644 --- a/plotly/validators/waterfall/totals/marker/line/_width.py +++ b/plotly/validators/waterfall/totals/marker/line/_width.py @@ -1,13 +1,13 @@ -import _plotly_utils.basevalidators +import _plotly_utils.basevalidators as _bv -class WidthValidator(_plotly_utils.basevalidators.NumberValidator): +class WidthValidator(_bv.NumberValidator): def __init__( self, plotly_name="width", parent_name="waterfall.totals.marker.line", **kwargs ): - super(WidthValidator, self).__init__( - plotly_name=plotly_name, - parent_name=parent_name, + super().__init__( + plotly_name, + parent_name, array_ok=kwargs.pop("array_ok", False), edit_type=kwargs.pop("edit_type", "style"), min=kwargs.pop("min", 0), diff --git a/pyproject.toml b/pyproject.toml index 579a914d6a..37f3ee3821 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,9 @@ dependencies = [ [project.optional-dependencies] express = ["numpy"] +dev = [ + "black==25.1.0" +] [tool.setuptools.packages.find] where = ["."] @@ -61,7 +64,7 @@ plotly = [ [tool.black] line-length = 88 -target_version = ['py36', 'py37', 'py38', 'py39'] +target_version = ['py38', 'py39', 'py310', 'py311', 'py312'] include = '\.pyi?$' exclude = ''' diff --git a/tests/test_core/test_graph_objs/test_annotations.py b/tests/test_core/test_graph_objs/test_annotations.py index d4b1f6ccc5..f6f0cac798 100644 --- a/tests/test_core/test_graph_objs/test_annotations.py +++ b/tests/test_core/test_graph_objs/test_annotations.py @@ -5,6 +5,7 @@ A module intended for use with Nose. """ + from unittest import skip from plotly.exceptions import ( diff --git a/tests/test_core/test_graph_objs/test_data.py b/tests/test_core/test_graph_objs/test_data.py index 7b0f643835..b2e3ba4270 100644 --- a/tests/test_core/test_graph_objs/test_data.py +++ b/tests/test_core/test_graph_objs/test_data.py @@ -5,6 +5,7 @@ A module intended for use with Nose. """ + from unittest import skip diff --git a/tests/test_core/test_graph_objs/test_error_bars.py b/tests/test_core/test_graph_objs/test_error_bars.py index 83d6ad7af9..f29b8155be 100644 --- a/tests/test_core/test_graph_objs/test_error_bars.py +++ b/tests/test_core/test_graph_objs/test_error_bars.py @@ -5,6 +5,7 @@ A module intended for use with Nose. """ + from plotly.graph_objs import ErrorX, ErrorY from plotly.exceptions import PlotlyDictKeyError diff --git a/tests/test_core/test_graph_objs/test_scatter.py b/tests/test_core/test_graph_objs/test_scatter.py index 81bca41da4..12ab7eb4af 100644 --- a/tests/test_core/test_graph_objs/test_scatter.py +++ b/tests/test_core/test_graph_objs/test_scatter.py @@ -5,6 +5,7 @@ A module intended for use with Nose. """ + from plotly.graph_objs import Scatter from plotly.exceptions import PlotlyError diff --git a/tests/test_core/test_graph_objs/test_template.py b/tests/test_core/test_graph_objs/test_template.py index 7b03beea49..6ffa416ea0 100644 --- a/tests/test_core/test_graph_objs/test_template.py +++ b/tests/test_core/test_graph_objs/test_template.py @@ -416,7 +416,7 @@ def setUp(self): go.Bar(marker={"opacity": 0.7}), go.Bar(marker={"opacity": 0.4}), ], - "parcoords": [go.Parcoords(dimensiondefaults={"multiselect": True})] + "parcoords": [go.Parcoords(dimensiondefaults={"multiselect": True})], # no 'scattergl' }, ) diff --git a/tests/test_core/test_offline/test_offline.py b/tests/test_core/test_offline/test_offline.py index 37076f501a..d0a9c80e1c 100644 --- a/tests/test_core/test_offline/test_offline.py +++ b/tests/test_core/test_offline/test_offline.py @@ -2,6 +2,7 @@ test__offline """ + import json import os from unittest import TestCase diff --git a/tests/test_io/test_html.py b/tests/test_io/test_html.py index a056fd8f87..67f161af68 100644 --- a/tests/test_io/test_html.py +++ b/tests/test_io/test_html.py @@ -16,6 +16,7 @@ import mock from mock import MagicMock + # fixtures # -------- @pytest.fixture diff --git a/tests/test_optional/test_offline/test_offline.py b/tests/test_optional/test_offline/test_offline.py index ac09966563..88898e2c02 100644 --- a/tests/test_optional/test_offline/test_offline.py +++ b/tests/test_optional/test_offline/test_offline.py @@ -2,6 +2,7 @@ test__offline """ + import re from unittest import TestCase diff --git a/tests/test_optional/test_utils/test_utils.py b/tests/test_optional/test_utils/test_utils.py index 34a708dfe5..0a998a382b 100644 --- a/tests/test_optional/test_utils/test_utils.py +++ b/tests/test_optional/test_utils/test_utils.py @@ -2,6 +2,7 @@ Module to test plotly.utils with optional dependencies. """ + import datetime import math import decimal diff --git a/tests/test_plotly_utils/validators/test_boolean_validator.py b/tests/test_plotly_utils/validators/test_boolean_validator.py index ee739f0497..865f72e684 100644 --- a/tests/test_plotly_utils/validators/test_boolean_validator.py +++ b/tests/test_plotly_utils/validators/test_boolean_validator.py @@ -2,6 +2,7 @@ from _plotly_utils.basevalidators import BooleanValidator from ...test_optional.test_utils.test_utils import np_nan + # Boolean Validator # ================= # ### Fixtures ### diff --git a/tests/test_plotly_utils/validators/test_colorscale_validator.py b/tests/test_plotly_utils/validators/test_colorscale_validator.py index a40af5a184..1e1d6853c8 100644 --- a/tests/test_plotly_utils/validators/test_colorscale_validator.py +++ b/tests/test_plotly_utils/validators/test_colorscale_validator.py @@ -5,6 +5,7 @@ import inspect import itertools + # Fixtures # -------- @pytest.fixture() diff --git a/tests/test_plotly_utils/validators/test_dataarray_validator.py b/tests/test_plotly_utils/validators/test_dataarray_validator.py index fb85863a11..d3a3b42245 100644 --- a/tests/test_plotly_utils/validators/test_dataarray_validator.py +++ b/tests/test_plotly_utils/validators/test_dataarray_validator.py @@ -3,6 +3,7 @@ import numpy as np import pandas as pd + # Fixtures # -------- @pytest.fixture() diff --git a/tests/test_plotly_utils/validators/test_enumerated_validator.py b/tests/test_plotly_utils/validators/test_enumerated_validator.py index 6aa5fa9901..d86cabf63b 100644 --- a/tests/test_plotly_utils/validators/test_enumerated_validator.py +++ b/tests/test_plotly_utils/validators/test_enumerated_validator.py @@ -4,6 +4,7 @@ from _plotly_utils.basevalidators import EnumeratedValidator from ...test_optional.test_utils.test_utils import np_inf + # Fixtures # -------- @pytest.fixture() diff --git a/tests/test_plotly_utils/validators/test_flaglist_validator.py b/tests/test_plotly_utils/validators/test_flaglist_validator.py index 4ce30022da..8b9ce2f859 100644 --- a/tests/test_plotly_utils/validators/test_flaglist_validator.py +++ b/tests/test_plotly_utils/validators/test_flaglist_validator.py @@ -7,6 +7,7 @@ EXTRAS = ["none", "all", True, False, 3] FLAGS = ["lines", "markers", "text"] + # Fixtures # -------- @pytest.fixture(params=[None, EXTRAS]) diff --git a/tests/test_plotly_utils/validators/test_integer_validator.py b/tests/test_plotly_utils/validators/test_integer_validator.py index 64d27c0d23..75337c018b 100644 --- a/tests/test_plotly_utils/validators/test_integer_validator.py +++ b/tests/test_plotly_utils/validators/test_integer_validator.py @@ -7,6 +7,7 @@ import pandas as pd from ...test_optional.test_utils.test_utils import np_nan, np_inf + # ### Fixtures ### @pytest.fixture() def validator(): diff --git a/tests/test_plotly_utils/validators/test_number_validator.py b/tests/test_plotly_utils/validators/test_number_validator.py index bb81f630bf..d7f058db6a 100644 --- a/tests/test_plotly_utils/validators/test_number_validator.py +++ b/tests/test_plotly_utils/validators/test_number_validator.py @@ -6,6 +6,7 @@ import pandas as pd from ...test_optional.test_utils.test_utils import np_nan, np_inf + # Fixtures # -------- @pytest.fixture diff --git a/tests/test_plotly_utils/validators/test_string_validator.py b/tests/test_plotly_utils/validators/test_string_validator.py index 01c336df46..1ab9016fa0 100644 --- a/tests/test_plotly_utils/validators/test_string_validator.py +++ b/tests/test_plotly_utils/validators/test_string_validator.py @@ -54,7 +54,7 @@ def validator_no_blanks_aok(): # Not strict # ### Acceptance ### @pytest.mark.parametrize( - "val", ["bar", 234, np_nan(), "HELLO!!!", "world!@#$%^&*()", "", "\u03BC"] + "val", ["bar", 234, np_nan(), "HELLO!!!", "world!@#$%^&*()", "", "\u03bc"] ) def test_acceptance(val, validator): expected = str(val) if not isinstance(val, str) else val @@ -87,7 +87,7 @@ def test_rejection_values(val, validator_values): # ### No blanks ### -@pytest.mark.parametrize("val", ["bar", "HELLO!!!", "world!@#$%^&*()", "\u03BC"]) +@pytest.mark.parametrize("val", ["bar", "HELLO!!!", "world!@#$%^&*()", "\u03bc"]) def test_acceptance_no_blanks(val, validator_no_blanks): assert validator_no_blanks.validate_coerce(val) == val @@ -103,7 +103,7 @@ def test_rejection_no_blanks(val, validator_no_blanks): # Strict # ------ # ### Acceptance ### -@pytest.mark.parametrize("val", ["bar", "HELLO!!!", "world!@#$%^&*()", "", "\u03BC"]) +@pytest.mark.parametrize("val", ["bar", "HELLO!!!", "world!@#$%^&*()", "", "\u03bc"]) def test_acceptance_strict(val, validator_strict): assert validator_strict.validate_coerce(val) == val @@ -120,7 +120,7 @@ def test_rejection_strict(val, validator_strict): # Array ok # -------- # ### Acceptance ### -@pytest.mark.parametrize("val", ["foo", "BAR", "", "baz", "\u03BC"]) +@pytest.mark.parametrize("val", ["foo", "BAR", "", "baz", "\u03bc"]) def test_acceptance_aok_scalars(val, validator_aok): assert validator_aok.validate_coerce(val) == val @@ -130,9 +130,9 @@ def test_acceptance_aok_scalars(val, validator_aok): [ "foo", ["foo"], - np.array(["BAR", "", "\u03BC"], dtype="object"), + np.array(["BAR", "", "\u03bc"], dtype="object"), ["baz", "baz", "baz"], - ["foo", None, "bar", "\u03BC"], + ["foo", None, "bar", "\u03bc"], ], ) def test_acceptance_aok_list(val, validator_aok): @@ -173,7 +173,7 @@ def test_rejection_aok_values(val, validator_aok_values): "123", ["bar", "HELLO!!!"], np.array(["bar", "HELLO!!!"], dtype="object"), - ["world!@#$%^&*()", "\u03BC"], + ["world!@#$%^&*()", "\u03bc"], ], ) def test_acceptance_no_blanks_aok(val, validator_no_blanks_aok):